From cc1d350b9e3053191d71bf208c63257ac8a6d024 Mon Sep 17 00:00:00 2001 From: ficristo Date: Wed, 3 Feb 2016 16:10:51 +0100 Subject: [PATCH 01/37] Use chokidar instead of the fsevents/fsevents_win combo Use chokidar 1.6.0 installed with npm@3 and npm install --production --- .../impls/appshell/node/FileWatcherDomain.js | 110 +- .../node/node_modules/anymatch/LICENSE | 15 + .../node/node_modules/anymatch/README.md | 91 + .../node/node_modules/anymatch/index.js | 64 + .../node/node_modules/anymatch/package.json | 95 + .../node/node_modules/arr-diff/LICENSE | 21 + .../node/node_modules/arr-diff/README.md | 74 + .../node/node_modules/arr-diff/index.js | 58 + .../node/node_modules/arr-diff/package.json | 111 + .../node/node_modules/arr-flatten/LICENSE | 21 + .../node/node_modules/arr-flatten/README.md | 73 + .../node/node_modules/arr-flatten/index.js | 27 + .../node_modules/arr-flatten/package.json | 100 + .../node/node_modules/array-unique/LICENSE | 21 + .../node/node_modules/array-unique/README.md | 51 + .../node/node_modules/array-unique/index.js | 28 + .../node_modules/array-unique/package.json | 86 + .../node/node_modules/arrify/index.js | 8 + .../appshell/node/node_modules/arrify/license | 21 + .../node/node_modules/arrify/package.json | 89 + .../node/node_modules/arrify/readme.md | 36 + .../node/node_modules/async-each/.npmignore | 25 + .../node/node_modules/async-each/CHANGELOG.md | 23 + .../node/node_modules/async-each/README.md | 64 + .../node/node_modules/async-each/bower.json | 22 + .../node_modules/async-each/component.json | 18 + .../node/node_modules/async-each/index.js | 38 + .../node/node_modules/async-each/package.json | 89 + .../node/node_modules/async-each/test.js | 13 + .../node_modules/balanced-match/.npmignore | 5 + .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/README.md | 91 + .../node/node_modules/balanced-match/index.js | 58 + .../node_modules/balanced-match/package.json | 102 + .../binary-extensions/binary-extensions.json | 238 + .../node_modules/binary-extensions/license | 21 + .../binary-extensions/package.json | 108 + .../node_modules/binary-extensions/readme.md | 33 + .../node_modules/brace-expansion/README.md | 122 + .../node_modules/brace-expansion/index.js | 201 + .../node_modules/brace-expansion/package.json | 104 + .../appshell/node/node_modules/braces/LICENSE | 21 + .../node/node_modules/braces/README.md | 248 + .../node/node_modules/braces/index.js | 399 + .../node/node_modules/braces/package.json | 149 + .../node/node_modules/buffer-shims/index.js | 108 + .../node/node_modules/buffer-shims/license.md | 19 + .../node_modules/buffer-shims/package.json | 77 + .../node/node_modules/buffer-shims/readme.md | 21 + .../node/node_modules/chokidar/CHANGELOG.md | 268 + .../node/node_modules/chokidar/README.md | 287 + .../node/node_modules/chokidar/index.js | 710 ++ .../chokidar/lib/fsevents-handler.js | 396 + .../chokidar/lib/nodefs-handler.js | 481 ++ .../node/node_modules/chokidar/package.json | 114 + .../node/node_modules/concat-map/.travis.yml | 4 + .../node/node_modules/concat-map/LICENSE | 18 + .../node_modules/concat-map/README.markdown | 62 + .../node_modules/concat-map/example/map.js | 6 + .../node/node_modules/concat-map/index.js | 13 + .../node/node_modules/concat-map/package.json | 109 + .../node/node_modules/concat-map/test/map.js | 39 + .../node/node_modules/core-util-is/LICENSE | 19 + .../node/node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 ++ .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 86 + .../node/node_modules/core-util-is/test.js | 68 + .../node/node_modules/expand-brackets/LICENSE | 21 + .../node_modules/expand-brackets/README.md | 107 + .../node_modules/expand-brackets/index.js | 163 + .../node_modules/expand-brackets/package.json | 128 + .../node/node_modules/expand-range/LICENSE | 24 + .../node/node_modules/expand-range/README.md | 145 + .../node/node_modules/expand-range/index.js | 43 + .../node_modules/expand-range/package.json | 135 + .../node/node_modules/extglob/LICENSE | 21 + .../node/node_modules/extglob/README.md | 88 + .../node/node_modules/extglob/index.js | 178 + .../node/node_modules/extglob/package.json | 108 + .../node_modules/filename-regex/README.md | 51 + .../node/node_modules/filename-regex/index.js | 10 + .../node_modules/filename-regex/package.json | 92 + .../node/node_modules/fill-range/LICENSE | 21 + .../node/node_modules/fill-range/README.md | 290 + .../node/node_modules/fill-range/index.js | 408 + .../node/node_modules/fill-range/package.json | 123 + .../appshell/node/node_modules/for-in/LICENSE | 21 + .../node/node_modules/for-in/README.md | 74 + .../node/node_modules/for-in/index.js | 16 + .../node/node_modules/for-in/package.json | 119 + .../node/node_modules/for-own/LICENSE | 21 + .../node/node_modules/for-own/README.md | 52 + .../node/node_modules/for-own/index.js | 19 + .../node/node_modules/for-own/package.json | 120 + .../node/node_modules/fsevents/.npmignore | 1 + .../node/node_modules/fsevents/.travis.yml | 102 + .../node/node_modules/fsevents/CHANGELOG.md | 10 - .../node/node_modules/fsevents/LICENSE | 2 +- .../node/node_modules/fsevents/Readme.md | 64 +- .../node/node_modules/fsevents/binding.gyp | 33 +- .../node_modules/fsevents/build/.target.mk | 49 + .../node/node_modules/fsevents/build/Makefile | 28 +- .../fsevents/build/Release/.deps/Makefile.d | 1 - .../Release/.deps/Release/fswatch.node.d | 1 - .../obj.target/fswatch/nodefsevents.o.d | 19 - .../fsevents/build/Release/fswatch.node | Bin 25480 -> 0 bytes .../Release/obj.target/fswatch/nodefsevents.o | Bin 103332 -> 0 bytes .../build/action_after_build.target.mk | 32 + .../fsevents/build/binding.Makefile | 4 +- .../node_modules/fsevents/build/config.gypi | 36 - .../{fswatch.target.mk => fse.target.mk} | 65 +- .../node_modules/fsevents/build/gyp-mac-tool | 361 +- .../node/node_modules/fsevents/fsevents.cc | 102 + .../node/node_modules/fsevents/fsevents.js | 154 +- .../Release/node-v11-darwin-x64/fse.node | Bin 0 -> 33384 bytes .../Release/node-v46-darwin-x64/fse.node | Bin 0 -> 34672 bytes .../Release/node-v47-darwin-x64/fse.node | Bin 0 -> 34672 bytes .../fsevents/node_modules/.bin/har-validator | 1 + .../fsevents/node_modules/.bin/mkdirp | 1 + .../fsevents/node_modules/.bin/node-pre-gyp | 1 + .../fsevents/node_modules/.bin/nopt | 1 + .../fsevents/node_modules/.bin/rc | 1 + .../fsevents/node_modules/.bin/rimraf | 1 + .../fsevents/node_modules/.bin/semver | 1 + .../fsevents/node_modules/.bin/sshpk-conv | 1 + .../fsevents/node_modules/.bin/sshpk-sign | 1 + .../fsevents/node_modules/.bin/sshpk-verify | 1 + .../node_modules/.bin/strip-json-comments | 1 + .../fsevents/node_modules/.bin/uuid | 1 + .../fsevents/node_modules/abbrev/LICENSE | 15 + .../fsevents/node_modules/abbrev/README.md | 23 + .../fsevents/node_modules/abbrev/abbrev.js | 62 + .../fsevents/node_modules/abbrev/package.json | 81 + .../fsevents/node_modules/ansi-regex/index.js | 4 + .../fsevents/node_modules/ansi-regex/license | 21 + .../node_modules/ansi-regex/package.json | 113 + .../node_modules/ansi-regex/readme.md | 31 + .../node_modules/ansi-styles/index.js | 65 + .../fsevents/node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 106 + .../node_modules/ansi-styles/readme.md | 86 + .../fsevents/node_modules/aproba/LICENSE | 14 + .../fsevents/node_modules/aproba/README.md | 59 + .../fsevents/node_modules/aproba/index.js | 62 + .../fsevents/node_modules/aproba/package.json | 88 + .../node_modules/are-we-there-yet/.npmignore | 5 + .../node_modules/are-we-there-yet/CHANGES.md | 19 + .../node_modules/are-we-there-yet/LICENSE | 5 + .../node_modules/are-we-there-yet/README.md | 194 + .../node_modules/are-we-there-yet/index.js | 4 + .../are-we-there-yet/package.json | 82 + .../are-we-there-yet/test/lib/test-event.js | 29 + .../are-we-there-yet/test/tracker.js | 57 + .../are-we-there-yet/test/trackergroup.js | 96 + .../are-we-there-yet/test/trackerstream.js | 51 + .../are-we-there-yet/tracker-base.js | 11 + .../are-we-there-yet/tracker-group.js | 107 + .../are-we-there-yet/tracker-stream.js | 35 + .../node_modules/are-we-there-yet/tracker.js | 30 + .../fsevents/node_modules/asn1/.npmignore | 2 + .../fsevents/node_modules/asn1/.travis.yml | 4 + .../fsevents/node_modules/asn1/LICENSE | 19 + .../fsevents/node_modules/asn1/README.md | 50 + .../node_modules/asn1/lib/ber/errors.js | 13 + .../node_modules/asn1/lib/ber/index.js | 27 + .../node_modules/asn1/lib/ber/reader.js | 261 + .../node_modules/asn1/lib/ber/types.js | 36 + .../node_modules/asn1/lib/ber/writer.js | 316 + .../fsevents/node_modules/asn1/lib/index.js | 20 + .../fsevents/node_modules/asn1/package.json | 90 + .../node_modules/asn1/tst/ber/reader.test.js | 208 + .../node_modules/asn1/tst/ber/writer.test.js | 370 + .../fsevents/node_modules/assert-plus/AUTHORS | 6 + .../node_modules/assert-plus/CHANGES.md | 8 + .../node_modules/assert-plus/README.md | 155 + .../node_modules/assert-plus/assert.js | 206 + .../node_modules/assert-plus/package.json | 107 + .../fsevents/node_modules/async/CHANGELOG.md | 125 + .../fsevents/node_modules/async/LICENSE | 19 + .../fsevents/node_modules/async/README.md | 1877 +++++ .../fsevents/node_modules/async/dist/async.js | 1265 ++++ .../node_modules/async/dist/async.min.js | 2 + .../fsevents/node_modules/async/lib/async.js | 1265 ++++ .../fsevents/node_modules/async/package.json | 149 + .../fsevents/node_modules/aws-sign2/LICENSE | 55 + .../fsevents/node_modules/aws-sign2/README.md | 4 + .../fsevents/node_modules/aws-sign2/index.js | 212 + .../node_modules/aws-sign2/package.json | 73 + .../fsevents/node_modules/aws4/.npmignore | 4 + .../fsevents/node_modules/aws4/.tern-port | 1 + .../fsevents/node_modules/aws4/.travis.yml | 5 + .../fsevents/node_modules/aws4/LICENSE | 19 + .../fsevents/node_modules/aws4/README.md | 514 ++ .../fsevents/node_modules/aws4/aws4.js | 318 + .../fsevents/node_modules/aws4/lru.js | 96 + .../fsevents/node_modules/aws4/package.json | 132 + .../node_modules/balanced-match/.npmignore | 5 + .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/README.md | 91 + .../node_modules/balanced-match/index.js | 58 + .../node_modules/balanced-match/package.json | 102 + .../fsevents/node_modules/bl/.jshintrc | 59 + .../fsevents/node_modules/bl/.npmignore | 1 + .../fsevents/node_modules/bl/.travis.yml | 13 + .../fsevents/node_modules/bl/LICENSE.md | 13 + .../fsevents/node_modules/bl/README.md | 200 + .../fsevents/node_modules/bl/bl.js | 243 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/.travis.yml | 52 + .../bl/node_modules/readable-stream/.zuul.yml | 1 + .../bl/node_modules/readable-stream/LICENSE | 18 + .../bl/node_modules/readable-stream/README.md | 36 + .../readable-stream/doc/stream.markdown | 1760 +++++ .../doc/wg-meetings/2015-01-30.md | 60 + .../bl/node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 75 + .../lib/_stream_passthrough.js | 26 + .../readable-stream/lib/_stream_readable.js | 880 +++ .../readable-stream/lib/_stream_transform.js | 180 + .../readable-stream/lib/_stream_writable.js | 516 ++ .../node_modules/readable-stream/package.json | 105 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 12 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../fsevents/node_modules/bl/package.json | 96 + .../fsevents/node_modules/bl/test/test.js | 640 ++ .../node_modules/block-stream/LICENCE | 25 + .../node_modules/block-stream/LICENSE | 15 + .../node_modules/block-stream/README.md | 14 + .../node_modules/block-stream/block-stream.js | 209 + .../node_modules/block-stream/package.json | 87 + .../fsevents/node_modules/boom/.npmignore | 18 + .../fsevents/node_modules/boom/.travis.yml | 8 + .../node_modules/boom/CONTRIBUTING.md | 1 + .../fsevents/node_modules/boom/LICENSE | 28 + .../fsevents/node_modules/boom/README.md | 652 ++ .../node_modules/boom/images/boom.png | Bin 0 -> 29479 bytes .../fsevents/node_modules/boom/lib/index.js | 318 + .../fsevents/node_modules/boom/package.json | 90 + .../fsevents/node_modules/boom/test/index.js | 654 ++ .../node_modules/brace-expansion/README.md | 122 + .../node_modules/brace-expansion/index.js | 191 + .../node_modules/brace-expansion/package.json | 104 + .../node_modules/buffer-shims/index.js | 108 + .../node_modules/buffer-shims/license.md | 19 + .../node_modules/buffer-shims/package.json | 77 + .../node_modules/buffer-shims/readme.md | 21 + .../fsevents/node_modules/caseless/LICENSE | 28 + .../fsevents/node_modules/caseless/README.md | 45 + .../fsevents/node_modules/caseless/index.js | 66 + .../node_modules/caseless/package.json | 88 + .../fsevents/node_modules/caseless/test.js | 40 + .../fsevents/node_modules/chalk/index.js | 116 + .../fsevents/node_modules/chalk/license | 21 + .../fsevents/node_modules/chalk/package.json | 132 + .../fsevents/node_modules/chalk/readme.md | 213 + .../node_modules/code-point-at/index.js | 33 + .../node_modules/code-point-at/license | 21 + .../node_modules/code-point-at/package.json | 96 + .../node_modules/code-point-at/readme.md | 34 + .../node_modules/combined-stream/License | 19 + .../node_modules/combined-stream/Readme.md | 138 + .../combined-stream/lib/combined_stream.js | 188 + .../node_modules/combined-stream/package.json | 93 + .../node_modules/commander/History.md | 261 + .../fsevents/node_modules/commander/LICENSE | 22 + .../fsevents/node_modules/commander/Readme.md | 351 + .../fsevents/node_modules/commander/index.js | 1110 +++ .../node_modules/commander/package.json | 96 + .../node_modules/concat-map/.travis.yml | 4 + .../fsevents/node_modules/concat-map/LICENSE | 18 + .../node_modules/concat-map/README.markdown | 62 + .../node_modules/concat-map/example/map.js | 6 + .../fsevents/node_modules/concat-map/index.js | 13 + .../node_modules/concat-map/package.json | 109 + .../node_modules/concat-map/test/map.js | 39 + .../console-control-strings/LICENSE | 13 + .../console-control-strings/README.md | 145 + .../console-control-strings/index.js | 125 + .../console-control-strings/package.json | 88 + .../node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 ++ .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 87 + .../node_modules/core-util-is/test.js | 68 + .../node_modules/cryptiles/.npmignore | 18 + .../node_modules/cryptiles/.travis.yml | 8 + .../fsevents/node_modules/cryptiles/LICENSE | 28 + .../fsevents/node_modules/cryptiles/README.md | 16 + .../node_modules/cryptiles/lib/index.js | 68 + .../node_modules/cryptiles/package.json | 86 + .../node_modules/cryptiles/test/index.js | 102 + .../fsevents/node_modules/dashdash/README.md | 574 ++ .../dashdash/etc/dashdash.bash_completion.in | 388 + .../node_modules/dashdash/lib/dashdash.js | 1055 +++ .../dashdash/node_modules/assert-plus/AUTHORS | 6 + .../node_modules/assert-plus/CHANGES.md | 14 + .../node_modules/assert-plus/README.md | 162 + .../node_modules/assert-plus/assert.js | 211 + .../node_modules/assert-plus/package.json | 107 + .../node_modules/dashdash/package.json | 116 + .../fsevents/node_modules/debug/.jshintrc | 3 + .../fsevents/node_modules/debug/.npmignore | 6 + .../fsevents/node_modules/debug/History.md | 195 + .../fsevents/node_modules/debug/Makefile | 36 + .../fsevents/node_modules/debug/Readme.md | 188 + .../fsevents/node_modules/debug/bower.json | 28 + .../fsevents/node_modules/debug/browser.js | 168 + .../node_modules/debug/component.json | 19 + .../fsevents/node_modules/debug/debug.js | 197 + .../fsevents/node_modules/debug/node.js | 209 + .../fsevents/node_modules/debug/package.json | 98 + .../node_modules/deep-extend/CHANGELOG.md | 21 + .../fsevents/node_modules/deep-extend/LICENSE | 20 + .../node_modules/deep-extend/README.md | 90 + .../node_modules/deep-extend/index.js | 1 + .../deep-extend/lib/deep-extend.js | 144 + .../node_modules/deep-extend/package.json | 112 + .../node_modules/delayed-stream/.npmignore | 1 + .../node_modules/delayed-stream/License | 19 + .../node_modules/delayed-stream/Makefile | 7 + .../node_modules/delayed-stream/Readme.md | 141 + .../delayed-stream/lib/delayed_stream.js | 107 + .../node_modules/delayed-stream/package.json | 89 + .../node_modules/delegates/.npmignore | 1 + .../node_modules/delegates/History.md | 22 + .../fsevents/node_modules/delegates/License | 20 + .../fsevents/node_modules/delegates/Makefile | 8 + .../fsevents/node_modules/delegates/Readme.md | 94 + .../fsevents/node_modules/delegates/index.js | 121 + .../node_modules/delegates/package.json | 76 + .../node_modules/delegates/test/index.js | 94 + .../fsevents/node_modules/ecc-jsbn/.npmignore | 15 + .../fsevents/node_modules/ecc-jsbn/LICENSE | 21 + .../fsevents/node_modules/ecc-jsbn/README.md | 8 + .../fsevents/node_modules/ecc-jsbn/index.js | 57 + .../node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 + .../fsevents/node_modules/ecc-jsbn/lib/ec.js | 561 ++ .../fsevents/node_modules/ecc-jsbn/lib/sec.js | 170 + .../node_modules/ecc-jsbn/package.json | 82 + .../fsevents/node_modules/ecc-jsbn/test.js | 14 + .../escape-string-regexp/index.js | 11 + .../node_modules/escape-string-regexp/license | 21 + .../escape-string-regexp/package.json | 101 + .../escape-string-regexp/readme.md | 27 + .../fsevents/node_modules/extend/.eslintrc | 192 + .../fsevents/node_modules/extend/.jscs.json | 104 + .../fsevents/node_modules/extend/.npmignore | 1 + .../fsevents/node_modules/extend/.travis.yml | 44 + .../fsevents/node_modules/extend/CHANGELOG.md | 69 + .../fsevents/node_modules/extend/LICENSE | 23 + .../fsevents/node_modules/extend/README.md | 62 + .../node_modules/extend/component.json | 32 + .../fsevents/node_modules/extend/index.js | 86 + .../fsevents/node_modules/extend/package.json | 98 + .../node_modules/extsprintf/.gitmodules | 6 + .../fsevents/node_modules/extsprintf/LICENSE | 19 + .../fsevents/node_modules/extsprintf/Makefile | 23 + .../node_modules/extsprintf/Makefile.deps | 39 + .../node_modules/extsprintf/Makefile.targ | 285 + .../node_modules/extsprintf/README.md | 39 + .../extsprintf/examples/simple.js | 2 + .../node_modules/extsprintf/jsl.node.conf | 137 + .../node_modules/extsprintf/lib/extsprintf.js | 166 + .../node_modules/extsprintf/package.json | 66 + .../node_modules/forever-agent/LICENSE | 55 + .../node_modules/forever-agent/README.md | 4 + .../node_modules/forever-agent/index.js | 138 + .../node_modules/forever-agent/package.json | 80 + .../node_modules/form-data/.dockerignore | 7 + .../node_modules/form-data/.editorconfig | 10 + .../node_modules/form-data/.eslintignore | 1 + .../fsevents/node_modules/form-data/.eslintrc | 64 + .../fsevents/node_modules/form-data/License | 19 + .../fsevents/node_modules/form-data/README.md | 218 + .../node_modules/form-data/lib/browser.js | 2 + .../node_modules/form-data/lib/form_data.js | 411 + .../node_modules/form-data/lib/populate.js | 9 + .../node_modules/form-data/package.json | 129 + .../node_modules/form-data/wercker.yml | 36 + .../fsevents/node_modules/fs.realpath/LICENSE | 43 + .../node_modules/fs.realpath/README.md | 33 + .../node_modules/fs.realpath/index.js | 66 + .../fsevents/node_modules/fs.realpath/old.js | 303 + .../node_modules/fs.realpath/package.json | 86 + .../node_modules/fstream-ignore/LICENSE | 15 + .../node_modules/fstream-ignore/README.md | 22 + .../node_modules/fstream-ignore/ignore.js | 275 + .../node_modules/fstream-ignore/package.json | 96 + .../fsevents/node_modules/fstream/.npmignore | 5 + .../fsevents/node_modules/fstream/.travis.yml | 9 + .../fsevents/node_modules/fstream/LICENSE | 15 + .../fsevents/node_modules/fstream/README.md | 76 + .../fstream/examples/filter-pipe.js | 134 + .../node_modules/fstream/examples/pipe.js | 118 + .../node_modules/fstream/examples/reader.js | 68 + .../fstream/examples/symlink-write.js | 27 + .../fsevents/node_modules/fstream/fstream.js | 35 + .../node_modules/fstream/lib/abstract.js | 85 + .../node_modules/fstream/lib/collect.js | 70 + .../node_modules/fstream/lib/dir-reader.js | 252 + .../node_modules/fstream/lib/dir-writer.js | 174 + .../node_modules/fstream/lib/file-reader.js | 150 + .../node_modules/fstream/lib/file-writer.js | 107 + .../node_modules/fstream/lib/get-type.js | 33 + .../node_modules/fstream/lib/link-reader.js | 53 + .../node_modules/fstream/lib/link-writer.js | 95 + .../node_modules/fstream/lib/proxy-reader.js | 95 + .../node_modules/fstream/lib/proxy-writer.js | 111 + .../node_modules/fstream/lib/reader.js | 255 + .../node_modules/fstream/lib/socket-reader.js | 36 + .../node_modules/fstream/lib/writer.js | 390 + .../node_modules/fstream/package.json | 102 + .../fsevents/node_modules/gauge/CHANGELOG.md | 131 + .../fsevents/node_modules/gauge/LICENSE | 13 + .../fsevents/node_modules/gauge/README.md | 395 + .../fsevents/node_modules/gauge/base-theme.js | 14 + .../fsevents/node_modules/gauge/error.js | 24 + .../fsevents/node_modules/gauge/has-color.js | 12 + .../fsevents/node_modules/gauge/index.js | 226 + .../fsevents/node_modules/gauge/package.json | 118 + .../fsevents/node_modules/gauge/plumbing.js | 47 + .../fsevents/node_modules/gauge/process.js | 3 + .../node_modules/gauge/progress-bar.js | 35 + .../node_modules/gauge/render-template.js | 181 + .../node_modules/gauge/set-immediate.js | 7 + .../node_modules/gauge/set-interval.js | 3 + .../fsevents/node_modules/gauge/spin.js | 5 + .../node_modules/gauge/template-item.js | 73 + .../fsevents/node_modules/gauge/theme-set.js | 115 + .../fsevents/node_modules/gauge/themes.js | 54 + .../node_modules/gauge/wide-truncate.js | 25 + .../node_modules/generate-function/.npmignore | 1 + .../generate-function/.travis.yml | 3 + .../node_modules/generate-function/README.md | 72 + .../node_modules/generate-function/example.js | 27 + .../node_modules/generate-function/index.js | 61 + .../generate-function/package.json | 79 + .../node_modules/generate-function/test.js | 33 + .../generate-object-property/.npmignore | 1 + .../generate-object-property/.travis.yml | 3 + .../generate-object-property/LICENSE | 21 + .../generate-object-property/README.md | 19 + .../generate-object-property/index.js | 12 + .../generate-object-property/package.json | 76 + .../generate-object-property/test.js | 12 + .../fsevents/node_modules/getpass/.npmignore | 8 + .../fsevents/node_modules/getpass/.travis.yml | 9 + .../fsevents/node_modules/getpass/LICENSE | 18 + .../fsevents/node_modules/getpass/README.md | 32 + .../node_modules/getpass/lib/index.js | 123 + .../getpass/node_modules/assert-plus/AUTHORS | 6 + .../node_modules/assert-plus/CHANGES.md | 14 + .../node_modules/assert-plus/README.md | 162 + .../node_modules/assert-plus/assert.js | 211 + .../node_modules/assert-plus/package.json | 107 + .../node_modules/getpass/package.json | 82 + .../fsevents/node_modules/glob/LICENSE | 15 + .../fsevents/node_modules/glob/README.md | 365 + .../fsevents/node_modules/glob/changelog.md | 67 + .../fsevents/node_modules/glob/common.js | 235 + .../fsevents/node_modules/glob/glob.js | 783 ++ .../fsevents/node_modules/glob/package.json | 103 + .../fsevents/node_modules/glob/sync.js | 468 ++ .../fsevents/node_modules/graceful-fs/LICENSE | 15 + .../node_modules/graceful-fs/README.md | 133 + .../fsevents/node_modules/graceful-fs/fs.js | 21 + .../node_modules/graceful-fs/graceful-fs.js | 253 + .../graceful-fs/legacy-streams.js | 118 + .../node_modules/graceful-fs/package.json | 103 + .../node_modules/graceful-fs/polyfills.js | 252 + .../node_modules/graceful-readlink/.npmignore | 3 + .../graceful-readlink/.travis.yml | 5 + .../node_modules/graceful-readlink/LICENSE | 22 + .../node_modules/graceful-readlink/README.md | 17 + .../node_modules/graceful-readlink/index.js | 12 + .../graceful-readlink/package.json | 75 + .../node_modules/har-validator/LICENSE | 13 + .../node_modules/har-validator/README.md | 309 + .../har-validator/bin/har-validator | 56 + .../node_modules/har-validator/lib/async.js | 14 + .../node_modules/har-validator/lib/error.js | 10 + .../node_modules/har-validator/lib/index.js | 22 + .../node_modules/har-validator/lib/runner.js | 29 + .../har-validator/lib/schemas/cache.json | 13 + .../har-validator/lib/schemas/cacheEntry.json | 31 + .../har-validator/lib/schemas/content.json | 27 + .../har-validator/lib/schemas/cookie.json | 34 + .../har-validator/lib/schemas/creator.json | 18 + .../har-validator/lib/schemas/entry.json | 51 + .../har-validator/lib/schemas/har.json | 11 + .../har-validator/lib/schemas/index.js | 49 + .../har-validator/lib/schemas/log.json | 34 + .../har-validator/lib/schemas/page.json | 30 + .../lib/schemas/pageTimings.json | 16 + .../har-validator/lib/schemas/postData.json | 41 + .../har-validator/lib/schemas/record.json | 18 + .../har-validator/lib/schemas/request.json | 55 + .../har-validator/lib/schemas/response.json | 52 + .../har-validator/lib/schemas/timings.json | 40 + .../node_modules/har-validator/package.json | 112 + .../fsevents/node_modules/has-ansi/index.js | 4 + .../fsevents/node_modules/has-ansi/license | 21 + .../node_modules/has-ansi/package.json | 110 + .../fsevents/node_modules/has-ansi/readme.md | 36 + .../fsevents/node_modules/has-color/index.js | 32 + .../node_modules/has-color/package.json | 97 + .../fsevents/node_modules/has-color/readme.md | 30 + .../fsevents/node_modules/has-unicode/LICENSE | 14 + .../node_modules/has-unicode/README.md | 43 + .../node_modules/has-unicode/index.js | 16 + .../node_modules/has-unicode/package.json | 86 + .../fsevents/node_modules/hawk/.npmignore | 20 + .../fsevents/node_modules/hawk/.travis.yml | 5 + .../fsevents/node_modules/hawk/LICENSE | 28 + .../fsevents/node_modules/hawk/README.md | 634 ++ .../fsevents/node_modules/hawk/bower.json | 24 + .../fsevents/node_modules/hawk/component.json | 19 + .../fsevents/node_modules/hawk/dist/client.js | 343 + .../node_modules/hawk/example/usage.js | 78 + .../node_modules/hawk/images/hawk.png | Bin 0 -> 6945 bytes .../node_modules/hawk/images/logo.png | Bin 0 -> 71732 bytes .../fsevents/node_modules/hawk/lib/browser.js | 637 ++ .../fsevents/node_modules/hawk/lib/client.js | 369 + .../fsevents/node_modules/hawk/lib/crypto.js | 126 + .../fsevents/node_modules/hawk/lib/index.js | 15 + .../fsevents/node_modules/hawk/lib/server.js | 548 ++ .../fsevents/node_modules/hawk/lib/utils.js | 184 + .../fsevents/node_modules/hawk/package.json | 93 + .../node_modules/hawk/test/browser.js | 1492 ++++ .../fsevents/node_modules/hawk/test/client.js | 440 ++ .../fsevents/node_modules/hawk/test/crypto.js | 70 + .../fsevents/node_modules/hawk/test/index.js | 378 + .../fsevents/node_modules/hawk/test/readme.js | 95 + .../fsevents/node_modules/hawk/test/server.js | 1329 ++++ .../fsevents/node_modules/hawk/test/uri.js | 838 +++ .../fsevents/node_modules/hawk/test/utils.js | 149 + .../fsevents/node_modules/hoek/.npmignore | 18 + .../fsevents/node_modules/hoek/.travis.yml | 7 + .../node_modules/hoek/CONTRIBUTING.md | 1 + .../fsevents/node_modules/hoek/LICENSE | 31 + .../fsevents/node_modules/hoek/README.md | 584 ++ .../node_modules/hoek/images/hoek.png | Bin 0 -> 37939 bytes .../fsevents/node_modules/hoek/lib/escape.js | 132 + .../fsevents/node_modules/hoek/lib/index.js | 993 +++ .../fsevents/node_modules/hoek/package.json | 88 + .../node_modules/hoek/test/escaper.js | 88 + .../fsevents/node_modules/hoek/test/index.js | 2513 +++++++ .../hoek/test/modules/ignore.txt} | 0 .../node_modules/hoek/test/modules/test1.js | 1 + .../node_modules/hoek/test/modules/test2.js | 1 + .../node_modules/hoek/test/modules/test3.js | 1 + .../http-signature/.dir-locals.el | 6 + .../node_modules/http-signature/.npmignore | 7 + .../node_modules/http-signature/CHANGES.md | 46 + .../node_modules/http-signature/LICENSE | 18 + .../node_modules/http-signature/README.md | 79 + .../http-signature/http_signing.md | 363 + .../node_modules/http-signature/lib/index.js | 29 + .../node_modules/http-signature/lib/parser.js | 318 + .../node_modules/http-signature/lib/signer.js | 399 + .../node_modules/http-signature/lib/utils.js | 112 + .../node_modules/http-signature/lib/verify.js | 88 + .../node_modules/http-signature/package.json | 108 + .../fsevents/node_modules/inflight/LICENSE | 15 + .../fsevents/node_modules/inflight/README.md | 37 + .../node_modules/inflight/inflight.js | 44 + .../node_modules/inflight/package.json | 97 + .../fsevents/node_modules/inherits/LICENSE | 16 + .../fsevents/node_modules/inherits/README.md | 42 + .../node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../node_modules/inherits/package.json | 83 + .../fsevents/node_modules/inherits/test.js | 25 + .../fsevents/node_modules/ini/LICENSE | 15 + .../fsevents/node_modules/ini/README.md | 102 + .../fsevents/node_modules/ini/ini.js | 190 + .../fsevents/node_modules/ini/package.json | 81 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 100 + .../is-fullwidth-code-point/readme.md | 39 + .../node_modules/is-my-json-valid/.npmignore | 2 + .../node_modules/is-my-json-valid/.travis.yml | 3 + .../node_modules/is-my-json-valid/LICENSE | 21 + .../node_modules/is-my-json-valid/README.md | 173 + .../node_modules/is-my-json-valid/example.js | 18 + .../node_modules/is-my-json-valid/formats.js | 14 + .../node_modules/is-my-json-valid/index.js | 584 ++ .../is-my-json-valid/package.json | 100 + .../node_modules/is-my-json-valid/require.js | 12 + .../is-my-json-valid/test/fixtures/cosmic.js | 84 + .../json-schema-draft4/additionalItems.json | 82 + .../additionalProperties.json | 88 + .../test/json-schema-draft4/allOf.json | 112 + .../test/json-schema-draft4/anyOf.json | 68 + .../test/json-schema-draft4/bignum.json | 107 + .../test/json-schema-draft4/default.json | 49 + .../test/json-schema-draft4/definitions.json | 32 + .../test/json-schema-draft4/dependencies.json | 113 + .../test/json-schema-draft4/enum.json | 72 + .../test/json-schema-draft4/format.json | 143 + .../test/json-schema-draft4/items.json | 46 + .../test/json-schema-draft4/maxItems.json | 28 + .../test/json-schema-draft4/maxLength.json | 28 + .../json-schema-draft4/maxProperties.json | 28 + .../test/json-schema-draft4/maximum.json | 42 + .../test/json-schema-draft4/minItems.json | 28 + .../test/json-schema-draft4/minLength.json | 28 + .../json-schema-draft4/minProperties.json | 28 + .../test/json-schema-draft4/minimum.json | 42 + .../test/json-schema-draft4/multipleOf.json | 96 + .../test/json-schema-draft4/not.json | 96 + .../json-schema-draft4/nullAndFormat.json | 18 + .../json-schema-draft4/nullAndObject.json | 18 + .../test/json-schema-draft4/oneOf.json | 68 + .../test/json-schema-draft4/pattern.json | 23 + .../json-schema-draft4/patternProperties.json | 110 + .../test/json-schema-draft4/properties.json | 92 + .../test/json-schema-draft4/ref.json | 128 + .../test/json-schema-draft4/refRemote.json | 74 + .../test/json-schema-draft4/required.json | 39 + .../test/json-schema-draft4/type.json | 330 + .../test/json-schema-draft4/uniqueItems.json | 79 + .../is-my-json-valid/test/json-schema.js | 23 + .../is-my-json-valid/test/misc.js | 447 ++ .../node_modules/is-property/.npmignore | 17 + .../fsevents/node_modules/is-property/LICENSE | 22 + .../node_modules/is-property/README.md | 28 + .../node_modules/is-property/is-property.js | 5 + .../node_modules/is-property/package.json | 84 + .../node_modules/is-typedarray/LICENSE.md | 18 + .../node_modules/is-typedarray/README.md | 16 + .../node_modules/is-typedarray/index.js | 41 + .../node_modules/is-typedarray/package.json | 82 + .../node_modules/is-typedarray/test.js | 34 + .../fsevents/node_modules/isarray/.npmignore | 1 + .../fsevents/node_modules/isarray/.travis.yml | 4 + .../fsevents/node_modules/isarray/Makefile | 6 + .../fsevents/node_modules/isarray/README.md | 60 + .../node_modules/isarray/component.json | 19 + .../fsevents/node_modules/isarray/index.js | 5 + .../node_modules/isarray/package.json | 97 + .../fsevents/node_modules/isarray/test.js | 20 + .../fsevents/node_modules/isstream/.jshintrc | 59 + .../fsevents/node_modules/isstream/.npmignore | 1 + .../node_modules/isstream/.travis.yml | 12 + .../fsevents/node_modules/isstream/LICENSE.md | 11 + .../fsevents/node_modules/isstream/README.md | 66 + .../node_modules/isstream/isstream.js | 27 + .../node_modules/isstream/package.json | 85 + .../fsevents/node_modules/isstream/test.js | 168 + .../node_modules/jodid25519/.npmignore | 11 + .../node_modules/jodid25519/.travis.yml | 7 + .../node_modules/jodid25519/AUTHORS.md | 3 + .../fsevents/node_modules/jodid25519/LICENSE | 23 + .../node_modules/jodid25519/README.md | 51 + .../fsevents/node_modules/jodid25519/almond.0 | 42 + .../fsevents/node_modules/jodid25519/almond.1 | 13 + .../fsevents/node_modules/jodid25519/index.js | 35 + .../node_modules/jodid25519/jsdoc.json | 19 + .../node_modules/jodid25519/lib/core.js | 481 ++ .../node_modules/jodid25519/lib/curve255.js | 221 + .../node_modules/jodid25519/lib/dh.js | 111 + .../node_modules/jodid25519/lib/eddsa.js | 573 ++ .../node_modules/jodid25519/lib/utils.js | 198 + .../node_modules/jodid25519/package.json | 96 + .../fsevents/node_modules/jsbn/.npmignore | 2 + .../fsevents/node_modules/jsbn/LICENSE | 40 + .../fsevents/node_modules/jsbn/README.md | 175 + .../fsevents/node_modules/jsbn/example.html | 12 + .../fsevents/node_modules/jsbn/example.js | 3 + .../fsevents/node_modules/jsbn/index.js | 1358 ++++ .../fsevents/node_modules/jsbn/package.json | 79 + .../node_modules/json-schema/README.md | 5 + .../json-schema/draft-00/hyper-schema | 68 + .../json-schema/draft-00/json-ref | 26 + .../node_modules/json-schema/draft-00/links | 33 + .../node_modules/json-schema/draft-00/schema | 155 + .../json-schema/draft-01/hyper-schema | 68 + .../json-schema/draft-01/json-ref | 26 + .../node_modules/json-schema/draft-01/links | 33 + .../node_modules/json-schema/draft-01/schema | 155 + .../json-schema/draft-02/hyper-schema | 68 + .../json-schema/draft-02/json-ref | 26 + .../node_modules/json-schema/draft-02/links | 35 + .../node_modules/json-schema/draft-02/schema | 166 + .../json-schema/draft-03/examples/address | 20 + .../json-schema/draft-03/examples/calendar | 53 + .../json-schema/draft-03/examples/card | 105 + .../json-schema/draft-03/examples/geo | 8 + .../json-schema/draft-03/examples/interfaces | 23 + .../json-schema/draft-03/hyper-schema | 60 + .../json-schema/draft-03/json-ref | 26 + .../node_modules/json-schema/draft-03/links | 35 + .../node_modules/json-schema/draft-03/schema | 174 + .../json-schema/draft-04/hyper-schema | 60 + .../node_modules/json-schema/draft-04/links | 41 + .../node_modules/json-schema/draft-04/schema | 189 + .../json-schema/draft-zyp-json-schema-03.xml | 1120 +++ .../json-schema/draft-zyp-json-schema-04.xml | 1072 +++ .../node_modules/json-schema/lib/links.js | 52 + .../node_modules/json-schema/lib/validate.js | 260 + .../node_modules/json-schema/package.json | 86 + .../node_modules/json-schema/test/tests.js | 95 + .../json-stringify-safe/.npmignore | 1 + .../json-stringify-safe/CHANGELOG.md | 14 + .../node_modules/json-stringify-safe/LICENSE | 15 + .../node_modules/json-stringify-safe/Makefile | 35 + .../json-stringify-safe/README.md | 52 + .../json-stringify-safe/package.json | 94 + .../json-stringify-safe/stringify.js | 27 + .../json-stringify-safe/test/mocha.opts | 2 + .../test/stringify_test.js | 246 + .../node_modules/jsonpointer/.travis.yml | 10 + .../node_modules/jsonpointer/README.md | 32 + .../node_modules/jsonpointer/jsonpointer.js | 76 + .../node_modules/jsonpointer/package.json | 91 + .../fsevents/node_modules/jsonpointer/test.js | 98 + .../fsevents/node_modules/jsprim/CHANGES.md | 35 + .../fsevents/node_modules/jsprim/LICENSE | 19 + .../fsevents/node_modules/jsprim/README.md | 237 + .../node_modules/jsprim/lib/jsprim.js | 488 ++ .../fsevents/node_modules/jsprim/package.json | 77 + .../fsevents/node_modules/mime-db/HISTORY.md | 341 + .../fsevents/node_modules/mime-db/LICENSE | 22 + .../fsevents/node_modules/mime-db/README.md | 82 + .../fsevents/node_modules/mime-db/db.json | 6627 +++++++++++++++++ .../fsevents/node_modules/mime-db/index.js | 11 + .../node_modules/mime-db/package.json | 125 + .../node_modules/mime-types/HISTORY.md | 197 + .../fsevents/node_modules/mime-types/LICENSE | 23 + .../node_modules/mime-types/README.md | 103 + .../fsevents/node_modules/mime-types/index.js | 188 + .../node_modules/mime-types/package.json | 115 + .../fsevents/node_modules/minimatch/LICENSE | 15 + .../fsevents/node_modules/minimatch/README.md | 209 + .../node_modules/minimatch/minimatch.js | 924 +++ .../node_modules/minimatch/package.json | 90 + .../node_modules/minimist/.travis.yml | 4 + .../fsevents/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../fsevents/node_modules/minimist/index.js | 187 + .../node_modules/minimist/package.json | 93 + .../node_modules/minimist/readme.markdown | 73 + .../node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + .../fsevents/node_modules/mkdirp/.travis.yml | 8 + .../fsevents/node_modules/mkdirp/LICENSE | 21 + .../fsevents/node_modules/mkdirp/bin/cmd.js | 33 + .../node_modules/mkdirp/bin/usage.txt | 12 + .../node_modules/mkdirp/examples/pow.js | 6 + .../fsevents/node_modules/mkdirp/index.js | 98 + .../fsevents/node_modules/mkdirp/package.json | 86 + .../node_modules/mkdirp/readme.markdown | 100 + .../node_modules/mkdirp/test/chmod.js | 41 + .../node_modules/mkdirp/test/clobber.js | 38 + .../node_modules/mkdirp/test/mkdirp.js | 28 + .../node_modules/mkdirp/test/opts_fs.js | 29 + .../node_modules/mkdirp/test/opts_fs_sync.js | 27 + .../fsevents/node_modules/mkdirp/test/perm.js | 32 + .../node_modules/mkdirp/test/perm_sync.js | 36 + .../fsevents/node_modules/mkdirp/test/race.js | 37 + .../fsevents/node_modules/mkdirp/test/rel.js | 32 + .../node_modules/mkdirp/test/return.js | 25 + .../node_modules/mkdirp/test/return_sync.js | 24 + .../fsevents/node_modules/mkdirp/test/root.js | 19 + .../fsevents/node_modules/mkdirp/test/sync.js | 32 + .../node_modules/mkdirp/test/umask.js | 28 + .../node_modules/mkdirp/test/umask_sync.js | 32 + .../fsevents/node_modules/ms/.npmignore | 5 + .../fsevents/node_modules/ms/History.md | 66 + .../fsevents/node_modules/ms/LICENSE | 20 + .../fsevents/node_modules/ms/README.md | 35 + .../fsevents/node_modules/ms/index.js | 125 + .../fsevents/node_modules/ms/package.json | 74 + .../node_modules/node-pre-gyp/CHANGELOG.md | 323 + .../node_modules/node-pre-gyp/LICENSE | 27 + .../node_modules/node-pre-gyp/appveyor.yml | 30 + .../node-pre-gyp/bin/node-pre-gyp | 131 + .../node-pre-gyp/bin/node-pre-gyp.cmd | 2 + .../node_modules/node-pre-gyp/lib/build.js | 43 + .../node_modules/node-pre-gyp/lib/clean.js | 23 + .../node-pre-gyp/lib/configure.js | 48 + .../node_modules/node-pre-gyp/lib/info.js | 40 + .../node_modules/node-pre-gyp/lib/install.js | 215 + .../node-pre-gyp/lib/node-pre-gyp.js | 192 + .../node_modules/node-pre-gyp/lib/package.js | 46 + .../node-pre-gyp/lib/pre-binding.js | 25 + .../node_modules/node-pre-gyp/lib/publish.js | 77 + .../node_modules/node-pre-gyp/lib/rebuild.js | 13 + .../node-pre-gyp/lib/reinstall.js | 13 + .../node_modules/node-pre-gyp/lib/reveal.js | 31 + .../node-pre-gyp/lib/testbinary.js | 73 + .../node-pre-gyp/lib/testpackage.js | 49 + .../node-pre-gyp/lib/unpublish.js | 41 + .../node-pre-gyp/lib/util/abi_crosswalk.json | 1274 ++++ .../node-pre-gyp/lib/util/compile.js | 87 + .../node-pre-gyp/lib/util/handle_gyp_opts.js | 94 + .../lib/util/nw-pre-gyp/index.html | 26 + .../lib/util/nw-pre-gyp/package.json | 9 + .../node-pre-gyp/lib/util/s3_setup.js | 27 + .../node-pre-gyp/lib/util/versioning.js | 308 + .../node_modules/node-pre-gyp/package.json | 129 + .../node_modules/node-uuid/.npmignore | 4 + .../node_modules/node-uuid/LICENSE.md | 21 + .../fsevents/node_modules/node-uuid/README.md | 254 + .../node-uuid/benchmark/README.md | 53 + .../node-uuid/benchmark/bench.gnu | 174 + .../node_modules/node-uuid/benchmark/bench.sh | 34 + .../node-uuid/benchmark/benchmark-native.c | 34 + .../node-uuid/benchmark/benchmark.js | 84 + .../fsevents/node_modules/node-uuid/bin/uuid | 26 + .../node_modules/node-uuid/bower.json | 23 + .../node_modules/node-uuid/component.json | 25 + .../node_modules/node-uuid/package.json | 105 + .../node_modules/node-uuid/test/compare_v1.js | 63 + .../node_modules/node-uuid/test/test.html | 17 + .../node_modules/node-uuid/test/test.js | 231 + .../fsevents/node_modules/node-uuid/uuid.js | 272 + .../fsevents/node_modules/nopt/.npmignore | 1 + .../fsevents/node_modules/nopt/.travis.yml | 9 + .../fsevents/node_modules/nopt/LICENSE | 15 + .../fsevents/node_modules/nopt/README.md | 211 + .../fsevents/node_modules/nopt/bin/nopt.js | 54 + .../node_modules/nopt/examples/my-program.js | 30 + .../fsevents/node_modules/nopt/lib/nopt.js | 415 ++ .../fsevents/node_modules/nopt/package.json | 88 + .../fsevents/node_modules/nopt/test/basic.js | 273 + .../fsevents/node_modules/npmlog/CHANGELOG.md | 36 + .../fsevents/node_modules/npmlog/LICENSE | 15 + .../fsevents/node_modules/npmlog/README.md | 210 + .../fsevents/node_modules/npmlog/log.js | 298 + .../fsevents/node_modules/npmlog/package.json | 100 + .../node_modules/number-is-nan/index.js | 4 + .../node_modules/number-is-nan/license | 21 + .../node_modules/number-is-nan/package.json | 94 + .../node_modules/number-is-nan/readme.md | 30 + .../fsevents/node_modules/oauth-sign/LICENSE | 55 + .../node_modules/oauth-sign/README.md | 4 + .../fsevents/node_modules/oauth-sign/index.js | 136 + .../node_modules/oauth-sign/package.json | 90 + .../node_modules/object-assign/index.js | 83 + .../node_modules/object-assign/license | 21 + .../node_modules/object-assign/package.json | 106 + .../node_modules/object-assign/readme.md | 56 + .../fsevents/node_modules/once/LICENSE | 15 + .../fsevents/node_modules/once/README.md | 51 + .../fsevents/node_modules/once/once.js | 21 + .../fsevents/node_modules/once/package.json | 90 + .../node_modules/path-is-absolute/index.js | 20 + .../node_modules/path-is-absolute/license | 21 + .../path-is-absolute/package.json | 97 + .../node_modules/path-is-absolute/readme.md | 51 + .../node_modules/pinkie-promise/index.js | 3 + .../node_modules/pinkie-promise/license | 21 + .../node_modules/pinkie-promise/package.json | 94 + .../node_modules/pinkie-promise/readme.md | 28 + .../fsevents/node_modules/pinkie/index.js | 292 + .../fsevents/node_modules/pinkie/license | 21 + .../fsevents/node_modules/pinkie/package.json | 92 + .../fsevents/node_modules/pinkie/readme.md | 83 + .../process-nextick-args/.travis.yml | 12 + .../process-nextick-args/index.js | 43 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 76 + .../process-nextick-args/readme.md | 18 + .../node_modules/process-nextick-args/test.js | 24 + .../fsevents/node_modules/qs/.eslintignore | 1 + .../fsevents/node_modules/qs/.eslintrc | 19 + .../fsevents/node_modules/qs/.jscs.json | 176 + .../fsevents/node_modules/qs/CHANGELOG.md | 120 + .../fsevents/node_modules/qs/CONTRIBUTING.md | 1 + .../fsevents/node_modules/qs/LICENSE | 28 + .../fsevents/node_modules/qs/dist/qs.js | 487 ++ .../fsevents/node_modules/qs/lib/index.js | 9 + .../fsevents/node_modules/qs/lib/parse.js | 167 + .../fsevents/node_modules/qs/lib/stringify.js | 137 + .../fsevents/node_modules/qs/lib/utils.js | 164 + .../fsevents/node_modules/qs/package.json | 111 + .../fsevents/node_modules/qs/test/index.js | 5 + .../fsevents/node_modules/qs/test/parse.js | 423 ++ .../node_modules/qs/test/stringify.js | 305 + .../fsevents/node_modules/qs/test/utils.js | 9 + .../fsevents/node_modules/rc/.npmignore | 3 + .../fsevents/node_modules/rc/LICENSE.APACHE2 | 15 + .../fsevents/node_modules/rc/LICENSE.BSD | 26 + .../fsevents/node_modules/rc/LICENSE.MIT | 24 + .../fsevents/node_modules/rc/README.md | 149 + .../fsevents/node_modules/rc/browser.js | 7 + .../fsevents/node_modules/rc/index.js | 60 + .../fsevents/node_modules/rc/lib/utils.js | 103 + .../rc/node_modules/minimist/.travis.yml | 8 + .../rc/node_modules/minimist/LICENSE | 18 + .../rc/node_modules/minimist/example/parse.js | 2 + .../rc/node_modules/minimist/index.js | 236 + .../rc/node_modules/minimist/package.json | 97 + .../rc/node_modules/minimist/readme.markdown | 91 + .../rc/node_modules/minimist/test/all_bool.js | 32 + .../rc/node_modules/minimist/test/bool.js | 166 + .../rc/node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../rc/node_modules/minimist/test/dotted.js | 22 + .../rc/node_modules/minimist/test/kv_short.js | 16 + .../rc/node_modules/minimist/test/long.js | 31 + .../rc/node_modules/minimist/test/num.js | 36 + .../rc/node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../rc/node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../rc/node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + .../fsevents/node_modules/rc/package.json | 88 + .../fsevents/node_modules/rc/test/ini.js | 16 + .../node_modules/rc/test/nested-env-vars.js | 40 + .../fsevents/node_modules/rc/test/test.js | 59 + .../node_modules/readable-stream/.npmignore | 8 + .../node_modules/readable-stream/.travis.yml | 54 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 36 + .../readable-stream/doc/stream.md | 1772 +++++ .../doc/wg-meetings/2015-01-30.md | 60 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 75 + .../lib/_stream_passthrough.js | 26 + .../readable-stream/lib/_stream_readable.js | 893 +++ .../readable-stream/lib/_stream_transform.js | 180 + .../readable-stream/lib/_stream_writable.js | 526 ++ .../node_modules/readable-stream/package.json | 118 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 16 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../fsevents/node_modules/request/.eslintrc | 45 + .../fsevents/node_modules/request/.npmignore | 6 + .../fsevents/node_modules/request/.travis.yml | 21 + .../node_modules/request/CHANGELOG.md | 631 ++ .../node_modules/request/CONTRIBUTING.md | 81 + .../fsevents/node_modules/request/LICENSE | 55 + .../fsevents/node_modules/request/README.md | 1097 +++ .../fsevents/node_modules/request/codecov.yml | 2 + .../fsevents/node_modules/request/index.js | 157 + .../fsevents/node_modules/request/lib/auth.js | 168 + .../node_modules/request/lib/cookies.js | 39 + .../request/lib/getProxyFromURI.js | 79 + .../fsevents/node_modules/request/lib/har.js | 215 + .../node_modules/request/lib/helpers.js | 74 + .../node_modules/request/lib/multipart.js | 112 + .../node_modules/request/lib/oauth.js | 147 + .../node_modules/request/lib/querystring.js | 51 + .../node_modules/request/lib/redirect.js | 153 + .../node_modules/request/lib/tunnel.js | 176 + .../node_modules/request/package.json | 144 + .../fsevents/node_modules/request/request.js | 1434 ++++ .../fsevents/node_modules/rimraf/LICENSE | 15 + .../fsevents/node_modules/rimraf/README.md | 101 + .../fsevents/node_modules/rimraf/bin.js | 40 + .../fsevents/node_modules/rimraf/package.json | 93 + .../fsevents/node_modules/rimraf/rimraf.js | 343 + .../fsevents/node_modules/semver/LICENSE | 15 + .../fsevents/node_modules/semver/README.md | 346 + .../fsevents/node_modules/semver/bin/semver | 133 + .../fsevents/node_modules/semver/package.json | 86 + .../fsevents/node_modules/semver/range.bnf | 16 + .../fsevents/node_modules/semver/semver.js | 1194 +++ .../node_modules/set-blocking/CHANGELOG.md | 26 + .../node_modules/set-blocking/LICENSE.txt | 14 + .../node_modules/set-blocking/README.md | 31 + .../node_modules/set-blocking/index.js | 7 + .../node_modules/set-blocking/package.json | 98 + .../node_modules/signal-exit/CHANGELOG.md | 17 + .../node_modules/signal-exit/LICENSE.txt | 14 + .../node_modules/signal-exit/README.md | 40 + .../node_modules/signal-exit/index.js | 148 + .../node_modules/signal-exit/package.json | 98 + .../node_modules/signal-exit/signals.js | 52 + .../fsevents/node_modules/sntp/.npmignore | 18 + .../fsevents/node_modules/sntp/.travis.yml | 5 + .../fsevents/node_modules/sntp/LICENSE | 28 + .../fsevents/node_modules/sntp/Makefile | 9 + .../fsevents/node_modules/sntp/README.md | 68 + .../node_modules/sntp/examples/offset.js | 16 + .../node_modules/sntp/examples/time.js | 25 + .../fsevents/node_modules/sntp/index.js | 1 + .../fsevents/node_modules/sntp/lib/index.js | 412 + .../fsevents/node_modules/sntp/package.json | 90 + .../fsevents/node_modules/sntp/test/index.js | 435 ++ .../fsevents/node_modules/sshpk/.npmignore | 9 + .../fsevents/node_modules/sshpk/.travis.yml | 11 + .../fsevents/node_modules/sshpk/LICENSE | 18 + .../fsevents/node_modules/sshpk/README.md | 455 ++ .../node_modules/sshpk/bin/sshpk-conv | 195 + .../node_modules/sshpk/bin/sshpk-sign | 191 + .../node_modules/sshpk/bin/sshpk-verify | 166 + .../fsevents/node_modules/sshpk/lib/algs.js | 168 + .../fsevents/node_modules/sshpk/lib/dhe.js | 311 + .../node_modules/sshpk/lib/ed-compat.js | 96 + .../fsevents/node_modules/sshpk/lib/errors.js | 71 + .../node_modules/sshpk/lib/fingerprint.js | 140 + .../node_modules/sshpk/lib/formats/auto.js | 73 + .../node_modules/sshpk/lib/formats/pem.js | 186 + .../node_modules/sshpk/lib/formats/pkcs1.js | 320 + .../node_modules/sshpk/lib/formats/pkcs8.js | 510 ++ .../node_modules/sshpk/lib/formats/rfc4253.js | 146 + .../sshpk/lib/formats/ssh-private.js | 138 + .../node_modules/sshpk/lib/formats/ssh.js | 114 + .../fsevents/node_modules/sshpk/lib/index.js | 26 + .../fsevents/node_modules/sshpk/lib/key.js | 269 + .../node_modules/sshpk/lib/private-key.js | 231 + .../node_modules/sshpk/lib/signature.js | 237 + .../node_modules/sshpk/lib/ssh-buffer.js | 124 + .../fsevents/node_modules/sshpk/lib/utils.js | 246 + .../node_modules/sshpk/man/man1/sshpk-conv.1 | 135 + .../node_modules/sshpk/man/man1/sshpk-sign.1 | 81 + .../sshpk/man/man1/sshpk-verify.1 | 68 + .../sshpk/node_modules/assert-plus/AUTHORS | 6 + .../sshpk/node_modules/assert-plus/CHANGES.md | 14 + .../sshpk/node_modules/assert-plus/README.md | 162 + .../sshpk/node_modules/assert-plus/assert.js | 211 + .../node_modules/assert-plus/package.json | 107 + .../fsevents/node_modules/sshpk/package.json | 125 + .../node_modules/string-width/index.js | 32 + .../node_modules/string-width/license | 21 + .../node_modules/string-width/package.json | 111 + .../node_modules/string-width/readme.md | 41 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 20 + .../node_modules/string_decoder/README.md | 7 + .../node_modules/string_decoder/index.js | 221 + .../node_modules/string_decoder/package.json | 80 + .../node_modules/stringstream/.npmignore | 15 + .../node_modules/stringstream/.travis.yml | 4 + .../node_modules/stringstream/LICENSE.txt | 22 + .../node_modules/stringstream/README.md | 38 + .../node_modules/stringstream/example.js | 27 + .../node_modules/stringstream/package.json | 77 + .../node_modules/stringstream/stringstream.js | 102 + .../fsevents/node_modules/strip-ansi/index.js | 6 + .../fsevents/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 117 + .../node_modules/strip-ansi/readme.md | 33 + .../node_modules/strip-json-comments/cli.js | 41 + .../node_modules/strip-json-comments/license | 21 + .../strip-json-comments/package.json | 104 + .../strip-json-comments/readme.md | 80 + .../strip-json-comments.js | 73 + .../node_modules/supports-color/index.js | 50 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 105 + .../node_modules/supports-color/readme.md | 36 + .../fsevents/node_modules/tar-pack/.npmignore | 14 + .../node_modules/tar-pack/.travis.yml | 7 + .../fsevents/node_modules/tar-pack/LICENSE | 23 + .../fsevents/node_modules/tar-pack/README.md | 81 + .../fsevents/node_modules/tar-pack/index.js | 240 + .../node_modules/tar-pack/package.json | 92 + .../tar-pack/test/fixtures/packed-file.txt | 1 + .../tar-pack/test/fixtures/packed.tar | Bin 0 -> 3584 bytes .../tar-pack/test/fixtures/packed.tar.gz | Bin 0 -> 152 bytes .../tar-pack/test/fixtures/to-pack/bar.txt | 1 + .../tar-pack/test/fixtures/to-pack/foo.txt | 1 + .../node_modules/tar-pack/test/index.js | 67 + .../fsevents/node_modules/tar/.npmignore | 5 + .../fsevents/node_modules/tar/.travis.yml | 4 + .../fsevents/node_modules/tar/LICENSE | 12 + .../fsevents/node_modules/tar/README.md | 50 + .../node_modules/tar/examples/extracter.js | 19 + .../node_modules/tar/examples/packer.js | 24 + .../node_modules/tar/examples/reader.js | 36 + .../node_modules/tar/lib/buffer-entry.js | 30 + .../node_modules/tar/lib/entry-writer.js | 169 + .../fsevents/node_modules/tar/lib/entry.js | 220 + .../tar/lib/extended-header-writer.js | 191 + .../node_modules/tar/lib/extended-header.js | 140 + .../fsevents/node_modules/tar/lib/extract.js | 94 + .../tar/lib/global-header-writer.js | 14 + .../fsevents/node_modules/tar/lib/header.js | 385 + .../fsevents/node_modules/tar/lib/pack.js | 236 + .../fsevents/node_modules/tar/lib/parse.js | 275 + .../fsevents/node_modules/tar/package.json | 95 + .../fsevents/node_modules/tar/tar.js | 173 + .../tar/test/00-setup-fixtures.js | 53 + .../tar/test/cb-never-called-1.0.1.tgz | Bin 0 -> 4096 bytes .../tar/test/dir-normalization.js | 177 + .../tar/test/dir-normalization.tar | Bin 0 -> 4608 bytes .../node_modules/tar/test/error-on-broken.js | 33 + .../node_modules/tar/test/extract-move.js | 132 + .../fsevents/node_modules/tar/test/extract.js | 367 + .../node_modules/tar/test/fixtures.tgz | Bin 0 -> 19352 bytes .../fsevents/node_modules/tar/test/header.js | 183 + .../tar/test/pack-no-proprietary.js | 886 +++ .../fsevents/node_modules/tar/test/pack.js | 952 +++ .../node_modules/tar/test/parse-discard.js | 29 + .../fsevents/node_modules/tar/test/parse.js | 359 + .../node_modules/tar/test/zz-cleanup.js | 20 + .../node_modules/tough-cookie/LICENSE | 27 + .../node_modules/tough-cookie/README.md | 492 ++ .../node_modules/tough-cookie/lib/cookie.js | 1342 ++++ .../node_modules/tough-cookie/lib/memstore.js | 170 + .../tough-cookie/lib/pathMatch.js | 61 + .../tough-cookie/lib/permuteDomain.js | 56 + .../tough-cookie/lib/pubsuffix.js | 98 + .../node_modules/tough-cookie/lib/store.js | 71 + .../node_modules/tough-cookie/package.json | 120 + .../node_modules/tunnel-agent/LICENSE | 55 + .../node_modules/tunnel-agent/README.md | 4 + .../node_modules/tunnel-agent/index.js | 243 + .../node_modules/tunnel-agent/package.json | 92 + .../node_modules/tweetnacl/.npmignore | 4 + .../node_modules/tweetnacl/CHANGELOG.md | 128 + .../fsevents/node_modules/tweetnacl/README.md | 463 ++ .../node_modules/tweetnacl/nacl-fast.js | 2418 ++++++ .../node_modules/tweetnacl/nacl-fast.min.js | 2 + .../fsevents/node_modules/tweetnacl/nacl.js | 1205 +++ .../node_modules/tweetnacl/nacl.min.js | 1 + .../node_modules/tweetnacl/package.json | 120 + .../fsevents/node_modules/uid-number/LICENSE | 15 + .../node_modules/uid-number/README.md | 17 + .../node_modules/uid-number/get-uid-gid.js | 24 + .../node_modules/uid-number/package.json | 74 + .../node_modules/uid-number/uid-number.js | 59 + .../node_modules/util-deprecate/History.md | 16 + .../node_modules/util-deprecate/LICENSE | 24 + .../node_modules/util-deprecate/README.md | 53 + .../node_modules/util-deprecate/browser.js | 67 + .../node_modules/util-deprecate/node.js | 6 + .../node_modules/util-deprecate/package.json | 82 + .../fsevents/node_modules/verror/.gitmodules | 0 .../fsevents/node_modules/verror/.npmignore | 1 + .../fsevents/node_modules/verror/LICENSE | 19 + .../fsevents/node_modules/verror/Makefile | 35 + .../node_modules/verror/Makefile.targ | 285 + .../fsevents/node_modules/verror/README.md | 120 + .../verror/examples/levels-verror.js | 36 + .../verror/examples/levels-werror.js | 34 + .../node_modules/verror/examples/varargs.js | 6 + .../node_modules/verror/examples/verror.js | 13 + .../node_modules/verror/examples/werror.js | 14 + .../node_modules/verror/jsl.node.conf | 139 + .../node_modules/verror/lib/verror.js | 157 + .../fsevents/node_modules/verror/package.json | 70 + .../node_modules/verror/tests/tst.inherit.js | 100 + .../node_modules/verror/tests/tst.verror.js | 156 + .../node_modules/verror/tests/tst.werror.js | 179 + .../node_modules/wide-align/.npmignore | 5 + .../fsevents/node_modules/wide-align/LICENSE | 14 + .../node_modules/wide-align/README.md | 47 + .../fsevents/node_modules/wide-align/align.js | 65 + .../node_modules/wide-align/package.json | 85 + .../node_modules/wide-align/test/align.js | 37 + .../fsevents/node_modules/wrappy/LICENSE | 15 + .../fsevents/node_modules/wrappy/README.md | 36 + .../fsevents/node_modules/wrappy/package.json | 89 + .../fsevents/node_modules/wrappy/wrappy.js | 33 + .../fsevents/node_modules/xtend/.jshintrc | 30 + .../fsevents/node_modules/xtend/.npmignore | 1 + .../fsevents/node_modules/xtend/LICENCE | 19 + .../fsevents/node_modules/xtend/Makefile | 4 + .../fsevents/node_modules/xtend/README.md | 32 + .../fsevents/node_modules/xtend/immutable.js | 19 + .../fsevents/node_modules/xtend/mutable.js | 17 + .../fsevents/node_modules/xtend/package.json | 109 + .../fsevents/node_modules/xtend/test.js | 83 + .../node_modules/fsevents/nodefsevents.cc | 196 - .../node/node_modules/fsevents/package.json | 121 +- .../node/node_modules/fsevents/src/async.cc | 43 + .../node_modules/fsevents/src/constants.cc | 110 + .../node/node_modules/fsevents/src/locking.cc | 27 + .../node/node_modules/fsevents/src/methods.cc | 42 + .../node/node_modules/fsevents/src/storage.cc | 27 + .../node/node_modules/fsevents/src/thread.cc | 72 + .../node_modules/fsevents_win/binding.gyp | 8 - .../build/Release/fswatch_win.node | Bin 120832 -> 0 bytes .../fsevents_win/fsevents_win.cpp | 448 -- .../node_modules/fsevents_win/fsevents_win.h | 105 - .../node_modules/fsevents_win/fsevents_win.js | 59 - .../node/node_modules/glob-base/LICENSE | 21 + .../node/node_modules/glob-base/README.md | 158 + .../node/node_modules/glob-base/index.js | 51 + .../node/node_modules/glob-base/package.json | 108 + .../node/node_modules/glob-parent/.npmignore | 4 + .../node/node_modules/glob-parent/.travis.yml | 8 + .../node/node_modules/glob-parent/LICENSE | 15 + .../node/node_modules/glob-parent/README.md | 43 + .../node/node_modules/glob-parent/index.js | 10 + .../node_modules/glob-parent/package.json | 86 + .../node/node_modules/glob-parent/test.js | 28 + .../node/node_modules/graceful-fs/LICENSE | 15 + .../node/node_modules/graceful-fs/README.md | 133 + .../node/node_modules/graceful-fs/fs.js | 21 + .../node_modules/graceful-fs/graceful-fs.js | 253 + .../graceful-fs/legacy-streams.js | 118 + .../node_modules/graceful-fs/package.json | 103 + .../node_modules/graceful-fs/polyfills.js | 275 + .../node/node_modules/inherits/LICENSE | 16 + .../node/node_modules/inherits/README.md | 42 + .../node/node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../node/node_modules/inherits/package.json | 78 + .../node/node_modules/inherits/test.js | 25 + .../node/node_modules/is-binary-path/index.js | 12 + .../node/node_modules/is-binary-path/license | 21 + .../node_modules/is-binary-path/package.json | 102 + .../node_modules/is-binary-path/readme.md | 34 + .../node/node_modules/is-buffer/.travis.yml | 7 + .../node/node_modules/is-buffer/.zuul.yml | 16 + .../node/node_modules/is-buffer/LICENSE | 21 + .../node/node_modules/is-buffer/README.md | 49 + .../node/node_modules/is-buffer/index.js | 17 + .../node/node_modules/is-buffer/package.json | 116 + .../node/node_modules/is-buffer/test/basic.js | 20 + .../node/node_modules/is-dotfile/LICENSE | 21 + .../node/node_modules/is-dotfile/README.md | 74 + .../node/node_modules/is-dotfile/index.js | 15 + .../node/node_modules/is-dotfile/package.json | 108 + .../node_modules/is-equal-shallow/LICENSE | 21 + .../node_modules/is-equal-shallow/README.md | 90 + .../node_modules/is-equal-shallow/index.js | 27 + .../is-equal-shallow/package.json | 112 + .../node/node_modules/is-extendable/LICENSE | 21 + .../node/node_modules/is-extendable/README.md | 72 + .../node/node_modules/is-extendable/index.js | 13 + .../node_modules/is-extendable/package.json | 106 + .../node/node_modules/is-extglob/LICENSE | 21 + .../node/node_modules/is-extglob/README.md | 75 + .../node/node_modules/is-extglob/index.js | 11 + .../node/node_modules/is-extglob/package.json | 102 + .../node/node_modules/is-glob/LICENSE | 21 + .../node/node_modules/is-glob/README.md | 105 + .../node/node_modules/is-glob/index.js | 14 + .../node/node_modules/is-glob/package.json | 119 + .../node/node_modules/is-number/LICENSE | 21 + .../node/node_modules/is-number/README.md | 103 + .../node/node_modules/is-number/index.js | 19 + .../node/node_modules/is-number/package.json | 118 + .../node_modules/is-posix-bracket/LICENSE | 21 + .../node_modules/is-posix-bracket/README.md | 88 + .../node_modules/is-posix-bracket/index.js | 10 + .../is-posix-bracket/package.json | 123 + .../node/node_modules/is-primitive/LICENSE | 21 + .../node/node_modules/is-primitive/README.md | 57 + .../node/node_modules/is-primitive/index.js | 13 + .../node_modules/is-primitive/package.json | 96 + .../node/node_modules/isarray/.npmignore | 1 + .../node/node_modules/isarray/.travis.yml | 4 + .../node/node_modules/isarray/Makefile | 6 + .../node/node_modules/isarray/README.md | 60 + .../node/node_modules/isarray/component.json | 19 + .../node/node_modules/isarray/index.js | 5 + .../node/node_modules/isarray/package.json | 97 + .../node/node_modules/isarray/test.js | 20 + .../node/node_modules/isobject/LICENSE | 21 + .../node/node_modules/isobject/README.md | 112 + .../node/node_modules/isobject/index.js | 14 + .../node/node_modules/isobject/package.json | 129 + .../node/node_modules/kind-of/LICENSE | 21 + .../node/node_modules/kind-of/README.md | 247 + .../node/node_modules/kind-of/index.js | 113 + .../node/node_modules/kind-of/package.json | 148 + .../node/node_modules/micromatch/LICENSE | 21 + .../node/node_modules/micromatch/README.md | 689 ++ .../node/node_modules/micromatch/index.js | 431 ++ .../node/node_modules/micromatch/lib/chars.js | 67 + .../node_modules/micromatch/lib/expand.js | 304 + .../node/node_modules/micromatch/lib/glob.js | 193 + .../node/node_modules/micromatch/lib/utils.js | 149 + .../node/node_modules/micromatch/package.json | 180 + .../node/node_modules/minimatch/LICENSE | 15 + .../node/node_modules/minimatch/README.md | 209 + .../node/node_modules/minimatch/minimatch.js | 924 +++ .../node/node_modules/minimatch/package.json | 89 + .../node/node_modules/nan/CHANGELOG.md | 430 ++ .../appshell/node/node_modules/nan/LICENSE.md | 13 + .../appshell/node/node_modules/nan/README.md | 403 + .../node/node_modules/nan/doc/asyncworker.md | 103 + .../node/node_modules/nan/doc/buffers.md | 54 + .../node/node_modules/nan/doc/callback.md | 56 + .../node/node_modules/nan/doc/converters.md | 41 + .../node/node_modules/nan/doc/errors.md | 226 + .../node/node_modules/nan/doc/maybe_types.md | 512 ++ .../node/node_modules/nan/doc/methods.md | 659 ++ .../appshell/node/node_modules/nan/doc/new.md | 147 + .../node/node_modules/nan/doc/node_misc.md | 63 + .../node_modules/nan/doc/object_wrappers.md | 263 + .../node/node_modules/nan/doc/persistent.md | 295 + .../node/node_modules/nan/doc/scopes.md | 73 + .../node/node_modules/nan/doc/script.md | 38 + .../node/node_modules/nan/doc/string_bytes.md | 62 + .../node/node_modules/nan/doc/v8_internals.md | 199 + .../node/node_modules/nan/doc/v8_misc.md | 85 + .../node/node_modules/nan/include_dirs.js | 1 + .../appshell/node/node_modules/nan/nan.h | 2274 ++++++ .../node/node_modules/nan/nan_callbacks.h | 88 + .../node_modules/nan/nan_callbacks_12_inl.h | 512 ++ .../nan/nan_callbacks_pre_12_inl.h | 506 ++ .../node/node_modules/nan/nan_converters.h | 64 + .../node_modules/nan/nan_converters_43_inl.h | 42 + .../nan/nan_converters_pre_43_inl.h | 42 + .../nan/nan_implementation_12_inl.h | 409 + .../nan/nan_implementation_pre_12_inl.h | 264 + .../node/node_modules/nan/nan_maybe_43_inl.h | 245 + .../node_modules/nan/nan_maybe_pre_43_inl.h | 303 + .../appshell/node/node_modules/nan/nan_new.h | 340 + .../node/node_modules/nan/nan_object_wrap.h | 155 + .../node_modules/nan/nan_persistent_12_inl.h | 129 + .../nan/nan_persistent_pre_12_inl.h | 242 + .../node/node_modules/nan/nan_string_bytes.h | 305 + .../nan/nan_typedarray_contents.h | 87 + .../appshell/node/node_modules/nan/nan_weak.h | 432 ++ .../node/node_modules/nan/package.json | 122 + .../node/node_modules/nan/tools/1to2.js | 412 + .../node/node_modules/nan/tools/README.md | 14 + .../node/node_modules/nan/tools/package.json | 19 + .../node/node_modules/normalize-path/LICENSE | 21 + .../node_modules/normalize-path/README.md | 75 + .../node/node_modules/normalize-path/index.js | 17 + .../node_modules/normalize-path/package.json | 118 + .../node/node_modules/object.omit/LICENSE | 21 + .../node/node_modules/object.omit/README.md | 104 + .../node/node_modules/object.omit/index.js | 40 + .../node_modules/object.omit/package.json | 105 + .../node/node_modules/parse-glob/LICENSE | 21 + .../node/node_modules/parse-glob/README.md | 115 + .../node/node_modules/parse-glob/index.js | 156 + .../node/node_modules/parse-glob/package.json | 116 + .../node_modules/path-is-absolute/index.js | 20 + .../node_modules/path-is-absolute/license | 21 + .../path-is-absolute/package.json | 97 + .../node_modules/path-is-absolute/readme.md | 51 + .../node/node_modules/preserve/.gitattributes | 14 + .../node/node_modules/preserve/.jshintrc | 24 + .../node/node_modules/preserve/.npmignore | 53 + .../node/node_modules/preserve/.travis.yml | 3 + .../node/node_modules/preserve/.verb.md | 59 + .../node/node_modules/preserve/LICENSE | 24 + .../node/node_modules/preserve/README.md | 90 + .../node/node_modules/preserve/index.js | 54 + .../node/node_modules/preserve/package.json | 96 + .../node/node_modules/preserve/test.js | 48 + .../process-nextick-args/.travis.yml | 12 + .../process-nextick-args/index.js | 43 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 75 + .../process-nextick-args/readme.md | 18 + .../node_modules/process-nextick-args/test.js | 24 + .../node/node_modules/randomatic/LICENSE | 21 + .../node/node_modules/randomatic/README.md | 132 + .../node/node_modules/randomatic/index.js | 83 + .../node/node_modules/randomatic/package.json | 108 + .../node_modules/readable-stream/.npmignore | 8 + .../node_modules/readable-stream/.travis.yml | 54 + .../node/node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 36 + .../readable-stream/doc/stream.md | 1772 +++++ .../doc/wg-meetings/2015-01-30.md | 60 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 75 + .../lib/_stream_passthrough.js | 26 + .../readable-stream/lib/_stream_readable.js | 893 +++ .../readable-stream/lib/_stream_transform.js | 180 + .../readable-stream/lib/_stream_writable.js | 526 ++ .../node_modules/readable-stream/package.json | 117 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 16 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node/node_modules/readdirp/.npmignore | 15 + .../node/node_modules/readdirp/.travis.yml | 6 + .../node/node_modules/readdirp/LICENSE | 20 + .../node/node_modules/readdirp/README.md | 233 + .../node_modules/readdirp/examples/Readme.md | 37 + .../readdirp/examples/callback-api.js | 10 + .../node_modules/readdirp/examples/grep.js | 71 + .../readdirp/examples/package.json | 9 + .../readdirp/examples/stream-api-pipe.js | 19 + .../readdirp/examples/stream-api.js | 15 + .../node/node_modules/readdirp/package.json | 106 + .../node/node_modules/readdirp/readdirp.js | 300 + .../node/node_modules/readdirp/stream-api.js | 99 + .../test/bed/root_dir1/root_dir1_file1.ext1 | 0 .../test/bed/root_dir1/root_dir1_file2.ext2 | 0 .../test/bed/root_dir1/root_dir1_file3.ext3 | 0 .../root1_dir1_subdir1_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file2.ext2 | 0 .../readdirp/test/bed/root_file1.ext1 | 0 .../readdirp/test/bed/root_file2.ext2 | 0 .../readdirp/test/bed/root_file3.ext3 | 0 .../readdirp/test/readdirp-stream.js | 338 + .../node_modules/readdirp/test/readdirp.js | 289 + .../node/node_modules/regex-cache/LICENSE | 21 + .../node/node_modules/regex-cache/README.md | 160 + .../node/node_modules/regex-cache/index.js | 69 + .../node_modules/regex-cache/package.json | 123 + .../node/node_modules/repeat-element/LICENSE | 21 + .../node_modules/repeat-element/README.md | 71 + .../node/node_modules/repeat-element/index.js | 18 + .../node_modules/repeat-element/package.json | 94 + .../node/node_modules/repeat-string/LICENSE | 21 + .../node/node_modules/repeat-string/README.md | 118 + .../node/node_modules/repeat-string/index.js | 68 + .../node_modules/repeat-string/package.json | 129 + .../node_modules/set-immediate-shim/index.js | 7 + .../set-immediate-shim/package.json | 89 + .../node_modules/set-immediate-shim/readme.md | 31 + .../node_modules/string_decoder/.npmignore | 2 + .../node/node_modules/string_decoder/LICENSE | 20 + .../node_modules/string_decoder/README.md | 7 + .../node/node_modules/string_decoder/index.js | 221 + .../node_modules/string_decoder/package.json | 79 + .../node_modules/util-deprecate/History.md | 16 + .../node/node_modules/util-deprecate/LICENSE | 24 + .../node_modules/util-deprecate/README.md | 53 + .../node_modules/util-deprecate/browser.js | 67 + .../node/node_modules/util-deprecate/node.js | 6 + .../node_modules/util-deprecate/package.json | 81 + .../impls/appshell/node/package.json | 6 + src/nls/root/strings.js | 3 +- 1427 files changed, 169035 insertions(+), 1110 deletions(-) create mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE create mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE create mode 100755 src/filesystem/impls/appshell/node/node_modules/array-unique/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/array-unique/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/array-unique/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/bower.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/component.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/LICENSE.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/binary-extensions.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/brace-expansion/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/brace-expansion/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/brace-expansion/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/license.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/lib/fsevents-handler.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/lib/nodefs-handler.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/README.markdown create mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/example/map.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/test/map.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/float.patch create mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/lib/util.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/filename-regex/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/filename-regex/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/filename-regex/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/fill-range/LICENSE create mode 100755 src/filesystem/impls/appshell/node/node_modules/fill-range/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fill-range/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fill-range/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/.target.mk delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/Release/.deps/Makefile.d delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/Release/.deps/Release/fswatch.node.d delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/Release/.deps/Release/obj.target/fswatch/nodefsevents.o.d delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/build/Release/fswatch.node delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/Release/obj.target/fswatch/nodefsevents.o create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/action_after_build.target.mk delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/config.gypi rename src/filesystem/impls/appshell/node/node_modules/fsevents/build/{fswatch.target.mk => fse.target.mk} (68%) create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/fsevents.cc create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/lib/binding/Release/node-v11-darwin-x64/fse.node create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/har-validator create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/mkdirp create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/node-pre-gyp create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/nopt create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/rc create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/rimraf create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/semver create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/sshpk-conv create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/sshpk-sign create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/sshpk-verify create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/strip-json-comments create mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/uuid create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/abbrev.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/CHANGES.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/lib/test-event.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/tracker.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/trackergroup.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/trackerstream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker-base.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker-group.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker-stream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/errors.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/types.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/tst/ber/reader.test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/tst/ber/writer.test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/AUTHORS create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/CHANGES.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/assert.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.min.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/lib/async.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/.tern-port create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/aws4.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/lru.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/LICENSE.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/.jshintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/LICENSE.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/bl.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/.zuul.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/doc/stream.markdown create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/duplex.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/passthrough.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/readable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/transform.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/writable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/test/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/LICENCE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/block-stream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/.npmignore create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/CONTRIBUTING.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/LICENSE create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/images/boom.png create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/test/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/brace-expansion/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/brace-expansion/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/brace-expansion/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/license.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/License create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/Readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/lib/combined_stream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/History.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/Readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/README.markdown create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/example/map.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/test/map.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/float.patch create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/lib/util.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/.npmignore create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/.travis.yml create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/test/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/etc/dashdash.bash_completion.in create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/lib/dashdash.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/AUTHORS create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/CHANGES.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/assert.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/.jshintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/History.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/Readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/bower.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/browser.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/component.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/debug.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/node.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/lib/deep-extend.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/License create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/Readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/lib/delayed_stream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/History.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/License create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/Readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/test/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/lib/LICENSE-jsbn create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/lib/ec.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/lib/sec.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.eslintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.jscs.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/component.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/.gitmodules create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/Makefile.deps create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/Makefile.targ create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/examples/simple.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/jsl.node.conf create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/lib/extsprintf.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.dockerignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.editorconfig create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.eslintignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.eslintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/License create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/lib/browser.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/lib/form_data.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/lib/populate.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/wercker.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/old.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/ignore.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/filter-pipe.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/pipe.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/symlink-write.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/fstream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/abstract.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/collect.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/dir-reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/dir-writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/file-reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/file-writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/get-type.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/link-reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/link-writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/proxy-reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/proxy-writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/socket-reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/base-theme.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/error.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/has-color.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/plumbing.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/process.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/progress-bar.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/render-template.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/set-immediate.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/set-interval.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/spin.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/template-item.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/theme-set.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/themes.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/wide-truncate.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/example.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/AUTHORS create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/CHANGES.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/assert.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/changelog.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/common.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/glob.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/sync.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/fs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/graceful-fs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/legacy-streams.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/polyfills.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/bin/har-validator create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/async.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/error.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/runner.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/cache.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/cacheEntry.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/content.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/cookie.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/creator.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/entry.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/har.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/log.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/page.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/pageTimings.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/postData.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/record.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/request.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/response.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/timings.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-color/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-color/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-color/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/.npmignore create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/.travis.yml create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/LICENSE create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/bower.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/component.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/dist/client.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/example/usage.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/images/hawk.png create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/images/logo.png create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/browser.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/client.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/crypto.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/index.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/server.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/browser.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/client.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/crypto.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/index.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/readme.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/server.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/uri.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/CONTRIBUTING.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/images/hoek.png create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/lib/escape.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/escaper.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/index.js rename src/filesystem/impls/appshell/node/node_modules/fsevents/{build/Release/linker.lock => node_modules/hoek/test/modules/ignore.txt} (100%) create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/modules/test1.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/modules/test2.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/modules/test3.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/.dir-locals.el create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/CHANGES.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/http_signing.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/parser.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/signer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/verify.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/inflight.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/inherits.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/inherits_browser.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/ini.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/example.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/formats.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/require.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/fixtures/cosmic.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/default.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/format.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/items.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/not.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndObject.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/required.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/type.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/misc.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/is-property.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/LICENSE.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/component.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/.jshintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/LICENSE.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/isstream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/AUTHORS.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/almond.0 create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/almond.1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/jsdoc.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/core.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/curve255.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/dh.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/eddsa.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.html create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar.gz create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/buffer-entry.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry-writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/cb-never-called-1.0.1.tgz create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.tar create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/fixtures.tgz create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/memstore.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/pathMatch.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/permuteDomain.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/pubsuffix.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.gitmodules create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/nodefsevents.cc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc create mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents_win/binding.gyp delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents_win/build/Release/fswatch_win.node delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.cpp delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/Makefile create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/component.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/README.md create mode 100755 src/filesystem/impls/appshell/node/node_modules/micromatch/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/package.json create mode 100755 src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license create mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/test.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js create mode 100755 src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/randomatic/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/randomatic/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/randomatic/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file1.ext1 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file2.ext2 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file3.ext3 create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore create mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json create mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE create mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md create mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js create mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json create mode 100644 src/filesystem/impls/appshell/node/package.json diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 272223b63eb..cceb94a4cbe 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -25,45 +25,10 @@ "use strict"; -var fspath = require("path"), - fs = require("fs"), - os = require("os"), - fsevents; - -/* - * NOTE: The fsevents package is a temporary solution for file-watching on darwin. - * Node's native fs.watch call would be preferable, but currently has a hard limit - * of 451 watched directories and fails silently after that! In the next stable - * version of Node (0.12), fs.watch on darwin will support a new "recursive" option - * that will allow us to only request a single watched path per directory structure. - * When that is stable, we should switch back to fs.watch for all platforms, and - * we should use the recursive option where available. As of January 2014, the - * current experimental Node branch (0.11) only supports the recursive option for - * darwin. - * - * In the meantime, the fsevents package makes direct use of the Mac OS fsevents - * API to provide file watching capabilities. Its behavior is also recursive - * (like fs.watch with the recursive option), but the events it emits are not - * exactly the same as those emitted by Node watchers. Consequently, we require, - * for now, dual implementations of the FileWatcher domain. - * - * ALSO NOTE: the fsevents package as installed by NPM is not suitable for - * distribution with Brackets! The problem is that the native code embedded in - * the fsevents module is compiled by default for x86-64, but the Brackets-node - * process is compiled for x86-32. Consequently, the fsevents module must be - * compiled manually, which is why it is checked into Brackets source control - * and not managed by NPM. Changing compilation from 64- to 32-bit just requires - * changing a couple of definitions in the .gyp file used to build fsevents. - */ -if (process.platform === "darwin") { - fsevents = require("fsevents"); -} else if (process.platform === "win32") { - var version = os.release(); - // XP will use node's built in file watcher module. - if (version && version.length > 0 && version[0] !== "5") { - fsevents = require("fsevents_win/fsevents_win"); - } -} +var fspath = require("path"); +var fs = require("fs"); +var os = require("os"); +var chokidar = require('chokidar'); var _domainManager, _watcherMap = {}; @@ -78,11 +43,7 @@ function _unwatchPath(path) { if (watcher) { try { - if (fsevents) { - watcher.stop(); - } else { - watcher.close(); - } + watcher.close(); } catch (err) { console.warn("Failed to unwatch file " + path + ": " + (err && err.message)); } finally { @@ -113,32 +74,41 @@ function watchPath(path) { } try { - var watcher; - - if (fsevents) { - watcher = fsevents(path); - watcher.on("change", function (filename, info) { - var parent = filename && (fspath.dirname(filename) + "/"), - name = filename && fspath.basename(filename), - type; - - switch (info.event) { - case "modified": // triggered by file content changes - case "unknown": // triggered by metatdata-only changes - type = "change"; - break; - default: - type = "rename"; - } - - _domainManager.emitEvent("fileWatcher", "change", [parent, type, name]); - }); - } else { - watcher = fs.watch(path, {persistent: false}, function (event, filename) { - // File/directory changes are emitted as "change" events on the fileWatcher domain. - _domainManager.emitEvent("fileWatcher", "change", [path, event, filename]); - }); - } + var watcher = chokidar.watch(path, { + persistent: true, + ignoreInitial: true, + ignorePermissionErrors: true, + followSymlinks: true + // ignored: "?" // TODO: maybe unwatch file/folder filtered in the current search + }); + + watcher.on("all", function (event, filename, stats) { + var filename_ = filename.replace(/\\/g, "/"); + var parent = filename_ && (fspath.dirname(filename_) + "/"); + var name = filename_ && fspath.basename(filename_); + var type; + + switch (event) { + case "change": + case "ready": + type = "change"; + break; + case "add": + case "addDir": + case "unlink": + case "unlinkDir": + type = "rename"; + break; + case "raw": + case "error": + return; + default: + console.error("Unknown watching event for file " + path + ": " + event); + return; + } + + _domainManager.emitEvent("fileWatcher", "change", [parent, type, name]); + }); _watcherMap[path] = watcher; diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE new file mode 100644 index 00000000000..bc424705fb9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2014 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/README.md b/src/filesystem/impls/appshell/node/node_modules/anymatch/README.md new file mode 100644 index 00000000000..0a632921348 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/anymatch/README.md @@ -0,0 +1,91 @@ +anymatch [![Build Status](https://travis-ci.org/es128/anymatch.svg?branch=master)](https://travis-ci.org/es128/anymatch) [![Coverage Status](https://img.shields.io/coveralls/es128/anymatch.svg?branch=master)](https://coveralls.io/r/es128/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) +[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) + +Usage +----- +```sh +npm install anymatch --save +``` + +#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. +* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a +subset out of the array of provided matchers to test against. Can be useful +with bound matcher functions (see below). When used with `returnIndex = true` +preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. +includes array members up to, but not including endIndex). + +```js +var anymatch = require('anymatch'); + +var matchers = [ + 'path/to/file.js', + 'path/anyjs/**/*.js', + /foo.js$/, + function (string) { + return string.indexOf('bar') !== -1 && string.length > 10 + } +]; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', true); // 2 +anymatch(matchers, 'path/anyjs/foo.js', true); // 1 + +// skip matchers +anymatch(matchers, 'path/to/file.js', false, 1); // false +anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 +anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 +``` + +#### anymatch (matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array.prototype.filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 +matcher('path/anyjs/baz.js', true, 2); // -1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/es128/anymatch/releases) + +NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. The glob matching behavior should be functionally +equivalent to the commonly used [minimatch](https://github.com/isaacs/minimatch) +library (aside from some fixed bugs and greater performance), so a major +version bump wasn't merited. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/es128/anymatch/master/LICENSE) diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/index.js b/src/filesystem/impls/appshell/node/node_modules/anymatch/index.js new file mode 100644 index 00000000000..fd70ba07ead --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/anymatch/index.js @@ -0,0 +1,64 @@ +'use strict'; + +var arrify = require('arrify'); +var micromatch = require('micromatch'); +var path = require('path'); + +var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { + criteria = arrify(criteria); + value = arrify(value); + if (arguments.length === 1) { + return anymatch.bind(null, criteria.map(function(criterion) { + return typeof criterion === 'string' && criterion[0] !== '!' ? + micromatch.matcher(criterion) : criterion; + })); + } + startIndex = startIndex || 0; + var string = value[0]; + var altString; + var matched = false; + var matchIndex = -1; + function testCriteria (criterion, index) { + var result; + switch (toString.call(criterion)) { + case '[object String]': + result = string === criterion || altString && altString === criterion; + result = result || micromatch.isMatch(string, criterion); + break; + case '[object RegExp]': + result = criterion.test(string) || altString && criterion.test(altString); + break; + case '[object Function]': + result = criterion.apply(null, value); + break; + default: + result = false; + } + if (result) { + matchIndex = index + startIndex; + } + return result; + } + var crit = criteria; + var negGlobs = crit.reduce(function(arr, criterion, index) { + if (typeof criterion === 'string' && criterion[0] === '!') { + if (crit === criteria) { + // make a copy before modifying + crit = crit.slice(); + } + crit[index] = null; + arr.push(criterion.substr(1)); + } + return arr; + }, []); + if (!negGlobs.length || !micromatch.any(string, negGlobs)) { + if (path.sep === '\\' && typeof string === 'string') { + altString = string.split('\\').join('/'); + altString = altString === string ? null : altString; + } + matched = crit.slice(startIndex, endIndex).some(testCriteria); + } + return returnIndex === true ? matchIndex : matched; +}; + +module.exports = anymatch; diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/package.json b/src/filesystem/impls/appshell/node/node_modules/anymatch/package.json new file mode 100644 index 00000000000..70697cbb086 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/anymatch/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "anymatch@^1.3.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] + ], + "_from": "anymatch@>=1.3.0 <2.0.0", + "_id": "anymatch@1.3.0", + "_inCache": true, + "_installable": true, + "_location": "/anymatch", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + "_npmVersion": "2.7.3", + "_phantomChildren": {}, + "_requested": { + "name": "anymatch", + "raw": "anymatch@^1.3.0", + "rawSpec": "^1.3.0", + "scope": null, + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", + "_shasum": "a3e52fa39168c825ff57b0248126ce5a8ff95507", + "_shrinkwrap": null, + "_spec": "anymatch@^1.3.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "author": { + "name": "Elan Shanker", + "url": "http://github.com/es128" + }, + "bugs": { + "url": "https://github.com/es128/anymatch/issues" + }, + "dependencies": { + "arrify": "^1.0.0", + "micromatch": "^2.1.5" + }, + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.13", + "mocha": "^2.2.4" + }, + "directories": {}, + "dist": { + "shasum": "a3e52fa39168c825ff57b0248126ce5a8ff95507", + "tarball": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "253d2ad42f644ed18557f561312a7f8426daca84", + "homepage": "https://github.com/es128/anymatch", + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "license": "ISC", + "maintainers": [ + { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + } + ], + "name": "anymatch", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/es128/anymatch.git" + }, + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "version": "1.3.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE b/src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE new file mode 100755 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md b/src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md new file mode 100644 index 00000000000..7705c6cd528 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md @@ -0,0 +1,74 @@ +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base) + +> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i arr-diff --save +``` +Install with [bower](http://bower.io/) + +```sh +$ bower install arr-diff --save +``` + +## API + +### [diff](index.js#L33) + +Return the difference between the first array and additional arrays. + +**Params** + +* `a` **{Array}** +* `b` **{Array}** +* `returns` **{Array}** + +**Example** + +```js +var diff = require('arr-diff'); + +var a = ['a', 'b', 'c', 'd']; +var b = ['b', 'c']; + +console.log(diff(a, b)) +//=> ['a', 'd'] +``` + +## Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) +* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter) +* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._ diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js b/src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js new file mode 100644 index 00000000000..bc7200d8e89 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js @@ -0,0 +1,58 @@ +/*! + * arr-diff + * + * Copyright (c) 2014 Jon Schlinkert, contributors. + * Licensed under the MIT License + */ + +'use strict'; + +var flatten = require('arr-flatten'); +var slice = [].slice; + +/** + * Return the difference between the first array and + * additional arrays. + * + * ```js + * var diff = require('{%= name %}'); + * + * var a = ['a', 'b', 'c', 'd']; + * var b = ['b', 'c']; + * + * console.log(diff(a, b)) + * //=> ['a', 'd'] + * ``` + * + * @param {Array} `a` + * @param {Array} `b` + * @return {Array} + * @api public + */ + +function diff(arr, arrays) { + var argsLen = arguments.length; + var len = arr.length, i = -1; + var res = [], arrays; + + if (argsLen === 1) { + return arr; + } + + if (argsLen > 2) { + arrays = flatten(slice.call(arguments, 1)); + } + + while (++i < len) { + if (!~arrays.indexOf(arr[i])) { + res.push(arr[i]); + } + } + return res; +} + +/** + * Expose `diff` + */ + +module.exports = diff; diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json b/src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json new file mode 100644 index 00000000000..9ca375261b3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "arr-diff@^2.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "arr-diff@>=2.0.0 <3.0.0", + "_id": "arr-diff@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/arr-diff", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "arr-diff", + "raw": "arr-diff@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "_shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", + "_shrinkwrap": null, + "_spec": "arr-diff@^2.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "dependencies": { + "arr-flatten": "^1.0.1" + }, + "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", + "devDependencies": { + "array-differ": "^1.0.0", + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.1.1", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", + "tarball": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "b89f54eb88ca51afd0e0ea6be9a4a63e5ccecf27", + "homepage": "https://github.com/jonschlinkert/arr-diff", + "keywords": [ + "arr", + "array", + "diff", + "differ", + "difference" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + }, + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "paul@paulmillr.com", + "name": "paulmillr" + } + ], + "name": "arr-diff", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-diff.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "arr-flatten", + "array-filter", + "array-intersection" + ] + } + }, + "version": "2.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE new file mode 100755 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md new file mode 100755 index 00000000000..bd696e660b5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md @@ -0,0 +1,73 @@ +# arr-flatten [![NPM version](https://badge.fury.io/js/arr-flatten.svg)](http://badge.fury.io/js/arr-flatten) [![Build Status](https://travis-ci.org/jonschlinkert/arr-flatten.svg)](https://travis-ci.org/jonschlinkert/arr-flatten) + +> Recursively flatten an array or arrays. This is the fastest implementation of array flatten. + +Why another flatten utility? I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. + +## Run benchmarks + +```bash +npm run benchmarks +``` + +Benchmark results comparing this library to [array-flatten]: + +```bash +#1: large.js + arr-flatten.js x 487,030 ops/sec ±0.67% (92 runs sampled) + array-flatten.js x 347,020 ops/sec ±0.57% (98 runs sampled) + +#2: medium.js + arr-flatten.js x 1,914,516 ops/sec ±0.76% (94 runs sampled) + array-flatten.js x 1,391,661 ops/sec ±0.63% (96 runs sampled) + +#3: small.js + arr-flatten.js x 5,158,980 ops/sec ±0.85% (94 runs sampled) + array-flatten.js x 3,683,173 ops/sec ±0.79% (97 runs sampled) +``` + +## Run tests + +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## Install with [npm](npmjs.org) + +```bash +npm i arr-flatten --save +``` +### Install with [bower](https://github.com/bower/bower) + +```bash +bower install arr-flatten --save +``` + + +## Usage + +```js +var flatten = require('arr-flatten'); + +flatten(['a', ['b', ['c']], 'd', ['e']]); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014-2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 11, 2015._ + +[array-flatten]: https://github.com/blakeembrey/array-flatten \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js new file mode 100755 index 00000000000..f74e48c2978 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js @@ -0,0 +1,27 @@ +/*! + * arr-flatten + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function flatten(arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var len = arr.length; + var i = -1; + + while (len--) { + var cur = arr[++i]; + if (Array.isArray(cur)) { + flat(cur, res); + } else { + res.push(cur); + } + } + return res; +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json new file mode 100644 index 00000000000..29ab89ee9d2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "arr-flatten@^1.0.1", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/arr-diff" + ] + ], + "_from": "arr-flatten@>=1.0.1 <2.0.0", + "_id": "arr-flatten@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/arr-flatten", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "arr-flatten", + "raw": "arr-flatten@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/arr-diff" + ], + "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz", + "_shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b", + "_shrinkwrap": null, + "_spec": "arr-flatten@^1.0.1", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/arr-diff", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-flatten/issues" + }, + "dependencies": {}, + "description": "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.", + "devDependencies": { + "array-flatten": "^1.0.2", + "array-slice": "^0.2.2", + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "glob": "^4.3.5", + "kind-of": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b", + "tarball": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7b3706eaa0093d8f5ba65af8ed590b6fcb3fe7cf", + "homepage": "https://github.com/jonschlinkert/arr-flatten", + "keywords": [ + "arr", + "array", + "elements", + "flat", + "flatten", + "nested", + "recurse", + "recursive", + "recursively" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/arr-flatten/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "arr-flatten", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/arr-flatten.git" + }, + "scripts": { + "benchmarks": "node benchmark", + "test": "mocha" + }, + "version": "1.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE b/src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE new file mode 100755 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/README.md b/src/filesystem/impls/appshell/node/node_modules/array-unique/README.md new file mode 100755 index 00000000000..2e287743ae9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/array-unique/README.md @@ -0,0 +1,51 @@ +# array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique) + +> Return an array free of duplicate values. Fastest ES5 implementation. + +## Install with [npm](npmjs.org) + +```bash +npm i array-unique --save +``` + +## Usage + +```js +var unique = require('array-unique'); + +unique(['a', 'b', 'c', 'c']); +//=> ['a', 'b', 'c'] +``` + +## Related +* [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. +* [arr-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons. +* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. +* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements. +* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map. +* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection. + +## Run tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-unique/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/index.js b/src/filesystem/impls/appshell/node/node_modules/array-unique/index.js new file mode 100755 index 00000000000..7fa75af90a2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/array-unique/index.js @@ -0,0 +1,28 @@ +/*! + * array-unique + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function unique(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var len = arr.length; + var i = -1; + + while (i++ < len) { + var j = i + 1; + + for (; j < arr.length; ++j) { + if (arr[i] === arr[j]) { + arr.splice(j--, 1); + } + } + } + return arr; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/package.json b/src/filesystem/impls/appshell/node/node_modules/array-unique/package.json new file mode 100644 index 00000000000..85537835437 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/array-unique/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "array-unique@^0.2.1", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "array-unique@>=0.2.1 <0.3.0", + "_id": "array-unique@0.2.1", + "_inCache": true, + "_installable": true, + "_location": "/array-unique", + "_nodeVersion": "1.6.2", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.7.1", + "_phantomChildren": {}, + "_requested": { + "name": "array-unique", + "raw": "array-unique@^0.2.1", + "rawSpec": "^0.2.1", + "scope": null, + "spec": ">=0.2.1 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "_shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", + "_shrinkwrap": null, + "_spec": "array-unique@^0.2.1", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "dependencies": {}, + "description": "Return an array free of duplicate values. Fastest ES5 implementation.", + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", + "tarball": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "36fde8e586fb7cf880b8b3aa6515df889e64ed85", + "homepage": "https://github.com/jonschlinkert/array-unique", + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/array-unique/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "array-unique", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/array-unique.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.2.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/index.js b/src/filesystem/impls/appshell/node/node_modules/arrify/index.js new file mode 100644 index 00000000000..2a2fdeeb1dc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arrify/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function (val) { + if (val === null || val === undefined) { + return []; + } + + return Array.isArray(val) ? val : [val]; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/license b/src/filesystem/impls/appshell/node/node_modules/arrify/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arrify/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/package.json b/src/filesystem/impls/appshell/node/node_modules/arrify/package.json new file mode 100644 index 00000000000..cdba4785acb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arrify/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "arrify@^1.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch" + ] + ], + "_from": "arrify@>=1.0.0 <2.0.0", + "_id": "arrify@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/arrify", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "3.5.2", + "_phantomChildren": {}, + "_requested": { + "name": "arrify", + "raw": "arrify@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/anymatch" + ], + "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "_shasum": "898508da2226f380df904728456849c1501a4b0d", + "_shrinkwrap": null, + "_spec": "arrify@^1.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/arrify/issues" + }, + "dependencies": {}, + "description": "Convert a value to an array", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "898508da2226f380df904728456849c1501a4b0d", + "tarball": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "087edee1a58d5adaac6cae5a107886121ef43783", + "homepage": "https://github.com/sindresorhus/arrify#readme", + "keywords": [ + "array", + "arr", + "arrify", + "arrayify", + "convert", + "value" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "arrify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/arrify.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/readme.md b/src/filesystem/impls/appshell/node/node_modules/arrify/readme.md new file mode 100644 index 00000000000..183d07576f1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/arrify/readme.md @@ -0,0 +1,36 @@ +# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) + +> Convert a value to an array + + +## Install + +``` +$ npm install --save arrify +``` + + +## Usage + +```js +const arrify = require('arrify'); + +arrify('unicorn'); +//=> ['unicorn'] + +arrify(['unicorn']); +//=> ['unicorn'] + +arrify(null); +//=> [] + +arrify(undefined); +//=> [] +``` + +*Supplying `null` or `undefined` results in an empty array.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore b/src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore new file mode 100644 index 00000000000..b2971ef95be --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore @@ -0,0 +1,25 @@ +# Numerous always-ignore extensions +*.diff +*.err +*.orig +*.log +*~ + +# OS or Editor folders +.DS_Store +.cache +Icon? + +# Folders to ignore +.hg +.svn + +# Node.js package manager +/node_modules +/npm-debug.log + +# Other stuff +*.pyc +/tmp + +# Project stuff diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md new file mode 100644 index 00000000000..bee25486054 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md @@ -0,0 +1,23 @@ +# async-each 1.0.0 (26 November 2015) +* Bumped version to 1.0.0 (no functional changes) + +# async-each 0.1.6 (5 November 2014) +* Add license to package.json + +# async-each 0.1.5 (22 October 2014) +* Clean up package.json to fix npm warning about `repo` + +# async-each 0.1.4 (12 November 2013) +* Fixed AMD definition. + +# async-each 0.1.3 (25 July 2013) +* Fixed double wrapping of errors. + +# async-each 0.1.2 (7 July 2013) +* Fixed behaviour on empty arrays. + +# async-each 0.1.1 (14 June 2013) +* Wrapped function in closure, enabled strict mode. + +# async-each 0.1.0 (14 June 2013) +* Initial release. diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/README.md b/src/filesystem/impls/appshell/node/node_modules/async-each/README.md new file mode 100644 index 00000000000..c27fcf4f37f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/async-each/README.md @@ -0,0 +1,64 @@ +# async-each + +No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach function for JavaScript. + +We don't need junky 30K async libs. Really. + +For browsers and node.js. + +## Installation +* Just include async-each before your scripts. +* `npm install async-each` if you’re using node.js. +* `component install paulmillr/async-each` if you’re using [component(1)](https://github.com/component/component). +* `bower install async-each` if you’re using [Twitter Bower](http://bower.io). + +## Usage + +* `each(array, iterator, callback);` — `Array`, `Function`, `(optional) Function` +* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments. +* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`. + +Node.js: + +```javascript +var each = require('async-each'); +each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) { + if (error) console.error(error); + console.log('Contents for a, b and c:', contents); +}); +``` + +Browser: + +```javascript +// component(1) +var each = require('async-each'); +each(list, fn, callback); + +// Default: +window.asyncEach(list, fn, callback); +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2013 Paul Miller [paulmillr.com](http://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/bower.json b/src/filesystem/impls/appshell/node/node_modules/async-each/bower.json new file mode 100644 index 00000000000..cdaca940e4a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/async-each/bower.json @@ -0,0 +1,22 @@ +{ + "name": "async-each", + "repo": "paulmillr/async-each", + "description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.", + "version": "1.0.0", + "keywords": [ + "async", "forEach", "each", "map", + "asynchronous", + "iteration", "iterate", + "loop", "parallel", + "concurrent", "array", + "flow", "control flow" + ], + "main": "index.js", + "dependencies": {}, + "development": {}, + "ignore": [ + "**/.*", + "node_modules", + "bower_components" + ] +} diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/component.json b/src/filesystem/impls/appshell/node/node_modules/async-each/component.json new file mode 100644 index 00000000000..40fc3565a4a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/async-each/component.json @@ -0,0 +1,18 @@ +{ + "name": "async-each", + "repo": "paulmillr/async-each", + "description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.", + "version": "1.0.0", + "keywords": [ + "async", "forEach", "each", "map", + "asynchronous", + "iteration", "iterate", + "loop", "parallel", + "concurrent", "array", + "flow", "control flow" + ], + "main": "index.js", + "scripts": ["index.js"], + "dependencies": {}, + "development": {} +} diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/index.js b/src/filesystem/impls/appshell/node/node_modules/async-each/index.js new file mode 100644 index 00000000000..1c51c958884 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/async-each/index.js @@ -0,0 +1,38 @@ +// async-each MIT license (by Paul Miller from http://paulmillr.com). +(function(globals) { + 'use strict'; + var each = function(items, next, callback) { + if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument'); + if (typeof next !== 'function') throw new TypeError('each() expects function as second argument'); + if (typeof callback !== 'function') callback = Function.prototype; // no-op + + if (items.length === 0) return callback(undefined, items); + + var transformed = new Array(items.length); + var count = 0; + var returned = false; + + items.forEach(function(item, index) { + next(item, function(error, transformedItem) { + if (returned) return; + if (error) { + returned = true; + return callback(error); + } + transformed[index] = transformedItem; + count += 1; + if (count === items.length) return callback(undefined, transformed); + }); + }); + }; + + if (typeof define !== 'undefined' && define.amd) { + define([], function() { + return each; + }); // RequireJS + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = each; // CommonJS + } else { + globals.asyncEach = each; // + +``` + +## Documentation + +Some functions are also available in the following forms: +* `Series` - the same as `` but runs only a single async operation at a time +* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time + +### Collections + +* [`each`](#each), `eachSeries`, `eachLimit` +* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit` +* [`map`](#map), `mapSeries`, `mapLimit` +* [`filter`](#filter), `filterSeries`, `filterLimit` +* [`reject`](#reject), `rejectSeries`, `rejectLimit` +* [`reduce`](#reduce), [`reduceRight`](#reduceRight) +* [`detect`](#detect), `detectSeries`, `detectLimit` +* [`sortBy`](#sortBy) +* [`some`](#some), `someLimit` +* [`every`](#every), `everyLimit` +* [`concat`](#concat), `concatSeries` + +### Control Flow + +* [`series`](#seriestasks-callback) +* [`parallel`](#parallel), `parallelLimit` +* [`whilst`](#whilst), [`doWhilst`](#doWhilst) +* [`until`](#until), [`doUntil`](#doUntil) +* [`during`](#during), [`doDuring`](#doDuring) +* [`forever`](#forever) +* [`waterfall`](#waterfall) +* [`compose`](#compose) +* [`seq`](#seq) +* [`applyEach`](#applyEach), `applyEachSeries` +* [`queue`](#queue), [`priorityQueue`](#priorityQueue) +* [`cargo`](#cargo) +* [`auto`](#auto) +* [`retry`](#retry) +* [`iterator`](#iterator) +* [`times`](#times), `timesSeries`, `timesLimit` + +### Utils + +* [`apply`](#apply) +* [`nextTick`](#nextTick) +* [`memoize`](#memoize) +* [`unmemoize`](#unmemoize) +* [`ensureAsync`](#ensureAsync) +* [`constant`](#constant) +* [`asyncify`](#asyncify) +* [`wrapSync`](#wrapSync) +* [`log`](#log) +* [`dir`](#dir) +* [`noConflict`](#noConflict) + +## Collections + + + +### each(arr, iterator, [callback]) + +Applies the function `iterator` to each item in `arr`, in parallel. +The `iterator` is called with an item from the list, and a callback for when it +has finished. If the `iterator` passes an error to its `callback`, the main +`callback` (for the `each` function) is immediately called with the error. + +Note, that since this function applies `iterator` to each item in parallel, +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err)` which must be called once it has + completed. If no error has occurred, the `callback` should be run without + arguments or with an explicit `null` argument. The array index is not passed + to the iterator. If you need the index, use [`forEachOf`](#forEachOf). +* `callback(err)` - *Optional* A callback which is called when all `iterator` functions + have finished, or an error occurs. + +__Examples__ + + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +```js +// assuming openFiles is an array of file names + +async.each(openFiles, function(file, callback) { + + // Perform operation on file here. + console.log('Processing file ' + file); + + if( file.length > 32 ) { + console.log('This file name is too long'); + callback('File name too long'); + } else { + // Do work to process file here + console.log('File processed'); + callback(); + } +}, function(err){ + // if any of the file processing produced an error, err would equal that error + if( err ) { + // One of the iterations produced an error. + // All processing will now stop. + console.log('A file failed to process'); + } else { + console.log('All files have been processed successfully'); + } +}); +``` + +__Related__ + +* eachSeries(arr, iterator, [callback]) +* eachLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + + + +### forEachOf(obj, iterator, [callback]) + +Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator. + +__Arguments__ + +* `obj` - An object or array to iterate over. +* `iterator(item, key, callback)` - A function to apply to each item in `obj`. +The `key` is the item's key, or index in the case of an array. The iterator is +passed a `callback(err)` which must be called once it has completed. If no +error has occurred, the callback should be run without arguments or with an +explicit `null` argument. +* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs. + +__Example__ + +```js +var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; +var configs = {}; + +async.forEachOf(obj, function (value, key, callback) { + fs.readFile(__dirname + value, "utf8", function (err, data) { + if (err) return callback(err); + try { + configs[key] = JSON.parse(data); + } catch (e) { + return callback(e); + } + callback(); + }) +}, function (err) { + if (err) console.error(err.message); + // configs is now a map of JSON data + doSomethingWith(configs); +}) +``` + +__Related__ + +* forEachOfSeries(obj, iterator, [callback]) +* forEachOfLimit(obj, limit, iterator, [callback]) + +--------------------------------------- + + +### map(arr, iterator, [callback]) + +Produces a new array of values by mapping each value in `arr` through +the `iterator` function. The `iterator` is called with an item from `arr` and a +callback for when it has finished processing. Each of these callback takes 2 arguments: +an `error`, and the transformed item from `arr`. If `iterator` passes an error to its +callback, the main `callback` (for the `map` function) is immediately called with the error. + +Note, that since this function applies the `iterator` to each item in parallel, +there is no guarantee that the `iterator` functions will complete in order. +However, the results array will be in the same order as the original `arr`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, transformed)` which must be called once + it has completed with an error (which can be `null`) and a transformed item. +* `callback(err, results)` - *Optional* A callback which is called when all `iterator` + functions have finished, or an error occurs. Results is an array of the + transformed items from the `arr`. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +__Related__ +* mapSeries(arr, iterator, [callback]) +* mapLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + + +### filter(arr, iterator, [callback]) + +__Alias:__ `select` + +Returns a new array of all the values in `arr` which pass an async truth test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The `iterator` is passed a `callback(truthValue)`, which must be called with a + boolean argument once it has completed. +* `callback(results)` - *Optional* A callback which is called after all the `iterator` + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +__Related__ + +* filterSeries(arr, iterator, [callback]) +* filterLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### reject(arr, iterator, [callback]) + +The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. + +__Related__ + +* rejectSeries(arr, iterator, [callback]) +* rejectLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### reduce(arr, memo, iterator, [callback]) + +__Aliases:__ `inject`, `foldl` + +Reduces `arr` into a single value using an async `iterator` to return +each successive step. `memo` is the initial state of the reduction. +This function only operates in series. + +For performance reasons, it may make sense to split a call to this function into +a parallel map, and then use the normal `Array.prototype.reduce` on the results. +This function is for situations where each step in the reduction needs to be async; +if you can get the data before reducing it, then it's probably a good idea to do so. + +__Arguments__ + +* `arr` - An array to iterate over. +* `memo` - The initial state of the reduction. +* `iterator(memo, item, callback)` - A function applied to each item in the + array to produce the next step in the reduction. The `iterator` is passed a + `callback(err, reduction)` which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main `callback` is + immediately called with the error. +* `callback(err, result)` - *Optional* A callback which is called after all the `iterator` + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, [callback]) + +__Alias:__ `foldr` + +Same as [`reduce`](#reduce), only operates on `arr` in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, [callback]) + +Returns the first value in `arr` that passes an async truth test. The +`iterator` is applied in parallel, meaning the first iterator to return `true` will +fire the detect `callback` with that result. That means the result might not be +the first item in the original `arr` (in terms of order) that passes the test. + +If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The iterator is passed a `callback(truthValue)` which must be called with a + boolean argument once it has completed. **Note: this callback does not take an error as its first argument.** +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `true`, or after all the `iterator` functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value `undefined` if none passed. **Note: this callback does not take an error as its first argument.** + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +__Related__ + +* detectSeries(arr, iterator, [callback]) +* detectLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### sortBy(arr, iterator, [callback]) + +Sorts a list by the results of running each `arr` value through an async `iterator`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, sortValue)` which must be called once it + has completed with an error (which can be `null`) and a value to use as the sort + criteria. +* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is the items from + the original `arr` sorted by the values returned by the `iterator` calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +__Sort Order__ + +By modifying the callback parameter the sorting order can be influenced: + +```js +//ascending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x); +}, function(err,result){ + //result callback +} ); + +//descending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x*-1); //<- x*-1 instead of x, turns the order around +}, function(err,result){ + //result callback +} ); +``` + +--------------------------------------- + + +### some(arr, iterator, [callback]) + +__Alias:__ `any` + +Returns `true` if at least one element in the `arr` satisfies an async test. +_The callback for each iterator call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. Once any iterator +call returns `true`, the main `callback` is immediately called. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a `callback(truthValue)`` which must be + called with a boolean argument once it has completed. +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `true`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. + + **Note: the callbacks do not take an error as their first argument.** +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +__Related__ + +* someLimit(arr, limit, iterator, callback) + +--------------------------------------- + + +### every(arr, iterator, [callback]) + +__Alias:__ `all` + +Returns `true` if every element in `arr` satisfies an async test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a `callback(truthValue)` which must be + called with a boolean argument once it has completed. +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `false`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. + + **Note: the callbacks do not take an error as their first argument.** + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +__Related__ + +* everyLimit(arr, limit, iterator, callback) + +--------------------------------------- + + +### concat(arr, iterator, [callback]) + +Applies `iterator` to each item in `arr`, concatenating the results. Returns the +concatenated list. The `iterator`s are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of `arr` passed to the `iterator` function. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, results)` which must be called once it + has completed with an error (which can be `null`) and an array of results. +* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is an array containing + the concatenated results of the `iterator` function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +__Related__ + +* concatSeries(arr, iterator, [callback]) + + +## Control Flow + + +### series(tasks, [callback]) + +Run the functions in the `tasks` array in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run, and `callback` is immediately called with the value of the error. +Otherwise, `callback` receives an array of results when `tasks` have completed. + +It is also possible to use an object instead of an array. Each property will be +run as a function, and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`series`](#series). + +**Note** that while many implementations preserve the order of object properties, the +[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) +explicitly states that + +> The mechanics and order of enumerating the properties is not specified. + +So if you rely on the order in which your series of functions are executed, and want +this to work on all platforms, consider using an array. + +__Arguments__ + +* `tasks` - An array or object containing functions to run, each function is passed + a `callback(err, result)` it must call on completion with an error `err` (which can + be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the `task` callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run the `tasks` array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main `callback` is immediately called with the value of the error. +Once the `tasks` have completed, the results are passed to the final `callback` as an +array. + +**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`parallel`](#parallel). + + +__Arguments__ + +* `tasks` - An array or object containing functions to run. Each function is passed + a `callback(err, result)` which it must call on completion with an error `err` + (which can be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed successfully. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +__Related__ + +* parallelLimit(tasks, limit, [callback]) + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, +or an error occurs. + +__Arguments__ + +* `test()` - synchronous truth test to perform before each execution of `fn`. +* `fn(callback)` - A function which is called each time `test` passes. The function is + passed a `callback(err)`, which must be called once it has completed with an + optional `err` argument. +* `callback(err, [results])` - A callback which is called after the test + function has failed and repeated execution of `fn` has stopped. `callback` + will be passed an error and any arguments passed to the final `fn`'s callback. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(function () { + callback(null, count); + }, 1000); + }, + function (err, n) { + // 5 seconds have passed, n = 5 + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post-check version of [`whilst`](#whilst). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, +or an error occurs. `callback` will be passed an error and any arguments passed +to the final `fn`'s callback. + +The inverse of [`whilst`](#whilst). + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### during(test, fn, callback) + +Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error. + +__Example__ + +```js +var count = 0; + +async.during( + function (callback) { + return callback(null, count < 5); + }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doDuring(fn, test, callback) + +The post-check version of [`during`](#during). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function. + +--------------------------------------- + + +### forever(fn, [errback]) + +Calls the asynchronous function `fn` with a callback parameter that allows it to +call itself again, in series, indefinitely. + +If an error is passed to the callback then `errback` is called with the +error, and execution stops, otherwise it will never be called. + +```js +async.forever( + function(next) { + // next is suitable for passing to things that need a callback(err [, whatever]); + // it will result in this function being called again. + }, + function(err) { + // if next is called with a value in its first parameter, it will appear + // in here as 'err', and execution will stop. + } +); +``` + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs the `tasks` array of functions in series, each passing their results to the next in +the array. However, if any of the `tasks` pass an error to their own callback, the +next function is not executed, and the main `callback` is immediately called with +the error. + +__Arguments__ + +* `tasks` - An array of functions to run, each function is passed a + `callback(err, result1, result2, ...)` it must call on completion. The first + argument is an error (which can be `null`) and any further arguments will be + passed as arguments in order to the next task. +* `callback(err, [results])` - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback) { + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); + }, + function(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` +Or, with named functions: + +```js +async.waterfall([ + myFirstFunction, + mySecondFunction, + myLastFunction, +], function (err, result) { + // result now equals 'done' +}); +function myFirstFunction(callback) { + callback(null, 'one', 'two'); +} +function mySecondFunction(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); +} +function myLastFunction(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); +} +``` + +Or, if you need to pass any argument to the first function: + +```js +async.waterfall([ + async.apply(myFirstFunction, 'zero'), + mySecondFunction, + myLastFunction, +], function (err, result) { + // result now equals 'done' +}); +function myFirstFunction(arg1, callback) { + // arg1 now equals 'zero' + callback(null, 'one', 'two'); +} +function mySecondFunction(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); +} +function myLastFunction(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); +} +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions `f()`, `g()`, and `h()` would produce the result of +`f(g(h()))`, only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* `functions...` - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### seq(fn1, fn2...) + +Version of the compose function that is more natural to read. +Each function consumes the return value of the previous function. +It is the equivalent of [`compose`](#compose) with the arguments reversed. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* `functions...` - the asynchronous functions to compose + + +__Example__ + +```js +// Requires lodash (or underscore), express3 and dresende's orm2. +// Part of an app, that fetches cats of the logged user. +// This example uses `seq` function to avoid overnesting and error +// handling clutter. +app.get('/cats', function(request, response) { + var User = request.models.User; + async.seq( + _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) + function(user, fn) { + user.getCats(fn); // 'getCats' has signature (callback(err, data)) + } + )(req.session.user_id, function (err, cats) { + if (err) { + console.error(err); + response.json({ status: 'error', message: err.message }); + } else { + response.json({ status: 'ok', message: 'Cats found', data: cats }); + } + }); +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling +`callback` after all functions have completed. If you only provide the first +argument, then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* `fns` - the asynchronous functions to all call with the same arguments +* `args...` - any number of separate arguments to pass to the function +* `callback` - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +__Related__ + +* applyEachSeries(tasks, args..., [callback]) + +--------------------------------------- + + +### queue(worker, [concurrency]) + +Creates a `queue` object with the specified `concurrency`. Tasks added to the +`queue` are processed in parallel (up to the `concurrency` limit). If all +`worker`s are in progress, the task is queued until one becomes available. +Once a `worker` completes a `task`, that `task`'s callback is called. + +__Arguments__ + +* `worker(task, callback)` - An asynchronous function for processing a queued + task, which must call its `callback(err)` argument when finished, with an + optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`. +* `concurrency` - An `integer` for determining how many `worker` functions should be + run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown. + +__Queue objects__ + +The `queue` object returned by this function has the following properties and +methods: + +* `length()` - a function returning the number of items waiting to be processed. +* `started` - a function returning whether or not any items have been pushed and processed by the queue +* `running()` - a function returning the number of items currently being processed. +* `workersList()` - a function returning the array of items currently being processed. +* `idle()` - a function returning false if there are items waiting or being processed, or true if not. +* `concurrency` - an integer for determining how many `worker` functions should be + run in parallel. This property can be changed after a `queue` is created to + alter the concurrency on-the-fly. +* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once + the `worker` has finished processing the task. Instead of a single task, a `tasks` array + can be submitted. The respective callback is used for every task in the list. +* `unshift(task, [callback])` - add a new task to the front of the `queue`. +* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, + and further tasks will be queued. +* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. +* `paused` - a boolean for determining whether the queue is in a paused state +* `pause()` - a function that pauses the processing of tasks until `resume()` is called. +* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. +* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing item'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + + +--------------------------------------- + + +### priorityQueue(worker, concurrency) + +The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: + +* `push(task, priority, [callback])` - `priority` should be a number. If an array of + `tasks` is given, all tasks will be assigned the same priority. +* The `unshift` method was removed. + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a `cargo` object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the `payload` limit). If the +`worker` is in progress, the task is queued until it becomes available. Once +the `worker` has completed some tasks, each callback of those tasks is called. +Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work. + +While [queue](#queue) passes only one task to one of a group of workers +at a time, cargo passes an array of tasks to a single worker, repeating +when the worker is finished. + +__Arguments__ + +* `worker(tasks, callback)` - An asynchronous function for processing an array of + queued tasks, which must call its `callback(err)` argument when finished, with + an optional `err` argument. +* `payload` - An optional `integer` for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The `cargo` object returned by this function has the following properties and +methods: + +* `length()` - A function returning the number of items waiting to be processed. +* `payload` - An `integer` for determining how many tasks should be + process per round. This property can be changed after a `cargo` is created to + alter the payload on-the-fly. +* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called + once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` + can be submitted. The respective callback is used for every task in the list. +* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. +* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. +* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue) + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [concurrency], [callback]) + +Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied. + +If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far. + +Note, all functions are called with a `results` object as a second argument, +so it is unsafe to pass functions in the `tasks` object which cannot handle the +extra argument. + +For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') +}, callback); +``` + +will have the effect of calling `readFile` with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to `readFile` in a function which does not forward the +`results` object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* `tasks` - An object. Each of its properties is either a function or an array of + requirements, with the function itself the last item in the array. The object's key + of a property serves as the name of the task defined by that property, + i.e. can be used when specifying requirements for other tasks. + The function receives two arguments: (1) a `callback(err, result)` which must be + called when finished, passing an `error` (which can be `null`) and the result of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions. +* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible. +* `callback(err, results)` - An optional callback which is called when all the + tasks have been completed. It receives the `err` argument if any `tasks` + pass an error to their callback. Results are always returned; however, if + an error occurs, no further `tasks` will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + make_folder: function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + }, + write_file: ['get_data', 'make_folder', function(callback, results){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, 'filename'); + }], + email_link: ['write_file', function(callback, results){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + callback(null, {'file':results.write_file, 'email':'user@example.com'}); + }] +}, function(err, results) { + console.log('err = ', err); + console.log('results = ', results); +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + } +], +function(err, results){ + async.series([ + function(callback){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + results.push('filename'); + callback(null); + }, + function(callback){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + callback(null, {'file':results.pop(), 'email':'user@example.com'}); + } + ]); +}); +``` + +For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding +new tasks much easier (and the code more readable). + + +--------------------------------------- + + +### retry([opts = {times: 5, interval: 0}| 5], task, [callback]) + +Attempts to get a successful response from `task` no more than `times` times before +returning an error. If the task is successful, the `callback` will be passed the result +of the successful task. If all attempts fail, the callback will be passed the error and +result (if any) of the final attempt. + +__Arguments__ + +* `opts` - Can be either an object with `times` and `interval` or a number. + * `times` - The number of attempts to make before giving up. The default is `5`. + * `interval` - The time to wait between retries, in milliseconds. The default is `0`. + * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. +* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` + which must be called when finished, passing `err` (which can be `null`) and the `result` of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions (if nested inside another control flow). +* `callback(err, results)` - An optional callback which is called when the + task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. + +The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below: + +```js +// try calling apiMethod 3 times +async.retry(3, apiMethod, function(err, result) { + // do something with the result +}); +``` + +```js +// try calling apiMethod 3 times, waiting 200 ms between each retry +async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { + // do something with the result +}); +``` + +```js +// try calling apiMethod the default 5 times no delay between each retry +async.retry(apiMethod, function(err, result) { + // do something with the result +}); +``` + +It can also be embedded within other control flow functions to retry individual methods +that are not as reliable, like this: + +```js +async.auto({ + users: api.getUsers.bind(api), + payments: async.retry(3, api.getPayments.bind(api)) +}, function(err, results) { + // do something with the results +}); +``` + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the `tasks` array, +returning a continuation to call the next one after that. It's also possible to +“peek” at the next iterator with `iterator.next()`. + +This function is used internally by the `async` module, but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* `tasks` - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied. + +Useful as a shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback), setImmediate(callback) + +Calls `callback` on a later loop around the event loop. In Node.js this just +calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` +if available, otherwise `setTimeout(callback, 0)`, which means other higher priority +events may precede the execution of `callback`. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* `callback` - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, iterator, [callback]) + +Calls the `iterator` function `n` times, and accumulates results in the same manner +you would use with [`map`](#map). + +__Arguments__ + +* `n` - The number of times to run the function. +* `iterator` - The function to call `n` times. +* `callback` - see [`map`](#map) + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + +__Related__ + +* timesSeries(n, iterator, [callback]) +* timesLimit(n, limit, iterator, [callback]) + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an `async` function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* `fn` - The function to proxy and cache results from. +* `hasher` - An optional function for generating a custom hash for storing + results. It has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized +form. Handy for testing. + +__Arguments__ + +* `fn` - the memoized function + +--------------------------------------- + + +### ensureAsync(fn) + +Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained. + +__Arguments__ + +* `fn` - an async function, one that expects a node-style callback as its last argument + +Returns a wrapped function with the exact same call signature as the function passed in. + +__Example__ + +```js +function sometimesAsync(arg, callback) { + if (cache[arg]) { + return callback(null, cache[arg]); // this would be synchronous!! + } else { + doSomeIO(arg, callback); // this IO would be asynchronous + } +} + +// this has a risk of stack overflows if many results are cached in a row +async.mapSeries(args, sometimesAsync, done); + +// this will defer sometimesAsync's callback if necessary, +// preventing stack overflows +async.mapSeries(args, async.ensureAsync(sometimesAsync), done); + +``` + +--------------------------------------- + + +### constant(values...) + +Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`. + +__Example__ + +```js +async.waterfall([ + async.constant(42), + function (value, next) { + // value === 42 + }, + //... +], callback); + +async.waterfall([ + async.constant(filename, "utf8"), + fs.readFile, + function (fileData, next) { + //... + } + //... +], callback); + +async.auto({ + hostname: async.constant("https://server.net/"), + port: findFreePort, + launchServer: ["hostname", "port", function (cb, options) { + startServer(options, cb); + }], + //... +}, callback); + +``` + +--------------------------------------- + + + +### asyncify(func) + +__Alias:__ `wrapSync` + +Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback. + +__Example__ + +```js +async.waterfall([ + async.apply(fs.readFile, filename, "utf8"), + async.asyncify(JSON.parse), + function (data, next) { + // data is the result of parsing the text. + // If there was a parsing error, it would have been caught. + } +], callback) +``` + +If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example: + +```js +async.waterfall([ + async.apply(fs.readFile, filename, "utf8"), + async.asyncify(function (contents) { + return db.model.create(contents); + }), + function (model, next) { + // `model` is the instantiated model object. + // If there was an error, this function would be skipped. + } +], callback) +``` + +This also means you can asyncify ES2016 `async` functions. + +```js +var q = async.queue(async.asyncify(async function (file) { + var intermediateStep = await processFile(file); + return await somePromise(intermediateStep) +})); + +q.push(files); +``` + +--------------------------------------- + + +### log(function, arguments) + +Logs the result of an `async` function to the `console`. Only works in Node.js or +in browsers that support `console.log` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.log` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an `async` function to the `console` using `console.dir` to +display the properties of the resulting object. Only works in Node.js or +in browsers that support `console.dir` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.dir` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of `async` back to its original value, returning a reference to the +`async` object. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js new file mode 100644 index 00000000000..31e7620fb6f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js @@ -0,0 +1,1265 @@ +/*! + * async + * https://github.com/caolan/async + * + * Copyright 2010-2014 Caolan McMahon + * Released under the MIT license + */ +(function () { + + var async = {}; + function noop() {} + function identity(v) { + return v; + } + function toBool(v) { + return !!v; + } + function notId(v) { + return !v; + } + + // global on the server, window in the browser + var previous_async; + + // Establish the root object, `window` (`self`) in the browser, `global` + // on the server, or `this` in some virtual machines. We use `self` + // instead of `window` for `WebWorker` support. + var root = typeof self === 'object' && self.self === self && self || + typeof global === 'object' && global.global === global && global || + this; + + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + return function() { + if (fn === null) throw new Error("Callback was already called."); + fn.apply(this, arguments); + fn = null; + }; + } + + function _once(fn) { + return function() { + if (fn === null) return; + fn.apply(this, arguments); + fn = null; + }; + } + + //// cross-browser compatiblity functions //// + + var _toString = Object.prototype.toString; + + var _isArray = Array.isArray || function (obj) { + return _toString.call(obj) === '[object Array]'; + }; + + // Ported from underscore.js isObject + var _isObject = function(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + }; + + function _isArrayLike(arr) { + return _isArray(arr) || ( + // has a positive integer length property + typeof arr.length === "number" && + arr.length >= 0 && + arr.length % 1 === 0 + ); + } + + function _arrayEach(arr, iterator) { + var index = -1, + length = arr.length; + + while (++index < length) { + iterator(arr[index], index, arr); + } + } + + function _map(arr, iterator) { + var index = -1, + length = arr.length, + result = Array(length); + + while (++index < length) { + result[index] = iterator(arr[index], index, arr); + } + return result; + } + + function _range(count) { + return _map(Array(count), function (v, i) { return i; }); + } + + function _reduce(arr, iterator, memo) { + _arrayEach(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + } + + function _forEachOf(object, iterator) { + _arrayEach(_keys(object), function (key) { + iterator(object[key], key); + }); + } + + function _indexOf(arr, item) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === item) return i; + } + return -1; + } + + var _keys = Object.keys || function (obj) { + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + function _keyIterator(coll) { + var i = -1; + var len; + var keys; + if (_isArrayLike(coll)) { + len = coll.length; + return function next() { + i++; + return i < len ? i : null; + }; + } else { + keys = _keys(coll); + len = keys.length; + return function next() { + i++; + return i < len ? keys[i] : null; + }; + } + } + + // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) + // This accumulates the arguments passed into an array, after a given index. + // From underscore.js (https://github.com/jashkenas/underscore/pull/2140). + function _restParam(func, startIndex) { + startIndex = startIndex == null ? func.length - 1 : +startIndex; + return function() { + var length = Math.max(arguments.length - startIndex, 0); + var rest = Array(length); + for (var index = 0; index < length; index++) { + rest[index] = arguments[index + startIndex]; + } + switch (startIndex) { + case 0: return func.call(this, rest); + case 1: return func.call(this, arguments[0], rest); + } + // Currently unused but handle cases outside of the switch statement: + // var args = Array(startIndex + 1); + // for (index = 0; index < startIndex; index++) { + // args[index] = arguments[index]; + // } + // args[startIndex] = rest; + // return func.apply(this, args); + }; + } + + function _withoutIndex(iterator) { + return function (value, index, callback) { + return iterator(value, callback); + }; + } + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + + // capture the global reference to guard against fakeTimer mocks + var _setImmediate = typeof setImmediate === 'function' && setImmediate; + + var _delay = _setImmediate ? function(fn) { + // not a direct alias for IE10 compatibility + _setImmediate(fn); + } : function(fn) { + setTimeout(fn, 0); + }; + + if (typeof process === 'object' && typeof process.nextTick === 'function') { + async.nextTick = process.nextTick; + } else { + async.nextTick = _delay; + } + async.setImmediate = _setImmediate ? _delay : async.nextTick; + + + async.forEach = + async.each = function (arr, iterator, callback) { + return async.eachOf(arr, _withoutIndex(iterator), callback); + }; + + async.forEachSeries = + async.eachSeries = function (arr, iterator, callback) { + return async.eachOfSeries(arr, _withoutIndex(iterator), callback); + }; + + + async.forEachLimit = + async.eachLimit = function (arr, limit, iterator, callback) { + return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback); + }; + + async.forEachOf = + async.eachOf = function (object, iterator, callback) { + callback = _once(callback || noop); + object = object || []; + + var iter = _keyIterator(object); + var key, completed = 0; + + while ((key = iter()) != null) { + completed += 1; + iterator(object[key], key, only_once(done)); + } + + if (completed === 0) callback(null); + + function done(err) { + completed--; + if (err) { + callback(err); + } + // Check key is null in case iterator isn't exhausted + // and done resolved synchronously. + else if (key === null && completed <= 0) { + callback(null); + } + } + }; + + async.forEachOfSeries = + async.eachOfSeries = function (obj, iterator, callback) { + callback = _once(callback || noop); + obj = obj || []; + var nextKey = _keyIterator(obj); + var key = nextKey(); + function iterate() { + var sync = true; + if (key === null) { + return callback(null); + } + iterator(obj[key], key, only_once(function (err) { + if (err) { + callback(err); + } + else { + key = nextKey(); + if (key === null) { + return callback(null); + } else { + if (sync) { + async.setImmediate(iterate); + } else { + iterate(); + } + } + } + })); + sync = false; + } + iterate(); + }; + + + + async.forEachOfLimit = + async.eachOfLimit = function (obj, limit, iterator, callback) { + _eachOfLimit(limit)(obj, iterator, callback); + }; + + function _eachOfLimit(limit) { + + return function (obj, iterator, callback) { + callback = _once(callback || noop); + obj = obj || []; + var nextKey = _keyIterator(obj); + if (limit <= 0) { + return callback(null); + } + var done = false; + var running = 0; + var errored = false; + + (function replenish () { + if (done && running <= 0) { + return callback(null); + } + + while (running < limit && !errored) { + var key = nextKey(); + if (key === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iterator(obj[key], key, only_once(function (err) { + running -= 1; + if (err) { + callback(err); + errored = true; + } + else { + replenish(); + } + })); + } + })(); + }; + } + + + function doParallel(fn) { + return function (obj, iterator, callback) { + return fn(async.eachOf, obj, iterator, callback); + }; + } + function doParallelLimit(fn) { + return function (obj, limit, iterator, callback) { + return fn(_eachOfLimit(limit), obj, iterator, callback); + }; + } + function doSeries(fn) { + return function (obj, iterator, callback) { + return fn(async.eachOfSeries, obj, iterator, callback); + }; + } + + function _asyncMap(eachfn, arr, iterator, callback) { + callback = _once(callback || noop); + arr = arr || []; + var results = _isArrayLike(arr) ? [] : {}; + eachfn(arr, function (value, index, callback) { + iterator(value, function (err, v) { + results[index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = doParallelLimit(_asyncMap); + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.inject = + async.foldl = + async.reduce = function (arr, memo, iterator, callback) { + async.eachOfSeries(arr, function (x, i, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + + async.foldr = + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, identity).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + + async.transform = function (arr, memo, iterator, callback) { + if (arguments.length === 3) { + callback = iterator; + iterator = memo; + memo = _isArray(arr) ? [] : {}; + } + + async.eachOf(arr, function(v, k, cb) { + iterator(memo, v, k, cb); + }, function(err) { + callback(err, memo); + }); + }; + + function _filter(eachfn, arr, iterator, callback) { + var results = []; + eachfn(arr, function (x, index, callback) { + iterator(x, function (v) { + if (v) { + results.push({index: index, value: x}); + } + callback(); + }); + }, function () { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + } + + async.select = + async.filter = doParallel(_filter); + + async.selectLimit = + async.filterLimit = doParallelLimit(_filter); + + async.selectSeries = + async.filterSeries = doSeries(_filter); + + function _reject(eachfn, arr, iterator, callback) { + _filter(eachfn, arr, function(value, cb) { + iterator(value, function(v) { + cb(!v); + }); + }, callback); + } + async.reject = doParallel(_reject); + async.rejectLimit = doParallelLimit(_reject); + async.rejectSeries = doSeries(_reject); + + function _createTester(eachfn, check, getResult) { + return function(arr, limit, iterator, cb) { + function done() { + if (cb) cb(getResult(false, void 0)); + } + function iteratee(x, _, callback) { + if (!cb) return callback(); + iterator(x, function (v) { + if (cb && check(v)) { + cb(getResult(true, x)); + cb = iterator = false; + } + callback(); + }); + } + if (arguments.length > 3) { + eachfn(arr, limit, iteratee, done); + } else { + cb = iterator; + iterator = limit; + eachfn(arr, iteratee, done); + } + }; + } + + async.any = + async.some = _createTester(async.eachOf, toBool, identity); + + async.someLimit = _createTester(async.eachOfLimit, toBool, identity); + + async.all = + async.every = _createTester(async.eachOf, notId, notId); + + async.everyLimit = _createTester(async.eachOfLimit, notId, notId); + + function _findGetResult(v, x) { + return x; + } + async.detect = _createTester(async.eachOf, identity, _findGetResult); + async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult); + async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult); + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + callback(null, _map(results.sort(comparator), function (x) { + return x.value; + })); + } + + }); + + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } + }; + + async.auto = function (tasks, concurrency, callback) { + if (typeof arguments[1] === 'function') { + // concurrency is optional, shift the args. + callback = concurrency; + concurrency = null; + } + callback = _once(callback || noop); + var keys = _keys(tasks); + var remainingTasks = keys.length; + if (!remainingTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = remainingTasks; + } + + var results = {}; + var runningTasks = 0; + + var hasError = false; + + var listeners = []; + function addListener(fn) { + listeners.unshift(fn); + } + function removeListener(fn) { + var idx = _indexOf(listeners, fn); + if (idx >= 0) listeners.splice(idx, 1); + } + function taskComplete() { + remainingTasks--; + _arrayEach(listeners.slice(0), function (fn) { + fn(); + }); + } + + addListener(function () { + if (!remainingTasks) { + callback(null, results); + } + }); + + _arrayEach(keys, function (k) { + if (hasError) return; + var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; + var taskCallback = _restParam(function(err, args) { + runningTasks--; + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _forEachOf(results, function(val, rkey) { + safeResults[rkey] = val; + }); + safeResults[k] = args; + hasError = true; + + callback(err, safeResults); + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }); + var requires = task.slice(0, task.length - 1); + // prevent dead-locks + var len = requires.length; + var dep; + while (len--) { + if (!(dep = tasks[requires[len]])) { + throw new Error('Has nonexistent dependency in ' + requires.join(', ')); + } + if (_isArray(dep) && _indexOf(dep, k) >= 0) { + throw new Error('Has cyclic dependencies'); + } + } + function ready() { + return runningTasks < concurrency && _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + } + if (ready()) { + runningTasks++; + task[task.length - 1](taskCallback, results); + } + else { + addListener(listener); + } + function listener() { + if (ready()) { + runningTasks++; + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + } + }); + }; + + + + async.retry = function(times, task, callback) { + var DEFAULT_TIMES = 5; + var DEFAULT_INTERVAL = 0; + + var attempts = []; + + var opts = { + times: DEFAULT_TIMES, + interval: DEFAULT_INTERVAL + }; + + function parseTimes(acc, t){ + if(typeof t === 'number'){ + acc.times = parseInt(t, 10) || DEFAULT_TIMES; + } else if(typeof t === 'object'){ + acc.times = parseInt(t.times, 10) || DEFAULT_TIMES; + acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL; + } else { + throw new Error('Unsupported argument type for \'times\': ' + typeof t); + } + } + + var length = arguments.length; + if (length < 1 || length > 3) { + throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)'); + } else if (length <= 2 && typeof times === 'function') { + callback = task; + task = times; + } + if (typeof times !== 'function') { + parseTimes(opts, times); + } + opts.callback = callback; + opts.task = task; + + function wrappedTask(wrappedCallback, wrappedResults) { + function retryAttempt(task, finalAttempt) { + return function(seriesCallback) { + task(function(err, result){ + seriesCallback(!err || finalAttempt, {err: err, result: result}); + }, wrappedResults); + }; + } + + function retryInterval(interval){ + return function(seriesCallback){ + setTimeout(function(){ + seriesCallback(null); + }, interval); + }; + } + + while (opts.times) { + + var finalAttempt = !(opts.times-=1); + attempts.push(retryAttempt(opts.task, finalAttempt)); + if(!finalAttempt && opts.interval > 0){ + attempts.push(retryInterval(opts.interval)); + } + } + + async.series(attempts, function(done, data){ + data = data[data.length - 1]; + (wrappedCallback || opts.callback)(data.err, data.result); + }); + } + + // If a callback is passed, run this as a controll flow + return opts.callback ? wrappedTask() : wrappedTask; + }; + + async.waterfall = function (tasks, callback) { + callback = _once(callback || noop); + if (!_isArray(tasks)) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + function wrapIterator(iterator) { + return _restParam(function (err, args) { + if (err) { + callback.apply(null, [err].concat(args)); + } + else { + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + ensureAsync(iterator).apply(null, args); + } + }); + } + wrapIterator(async.iterator(tasks))(); + }; + + function _parallel(eachfn, tasks, callback) { + callback = callback || noop; + var results = _isArrayLike(tasks) ? [] : {}; + + eachfn(tasks, function (task, key, callback) { + task(_restParam(function (err, args) { + if (args.length <= 1) { + args = args[0]; + } + results[key] = args; + callback(err); + })); + }, function (err) { + callback(err, results); + }); + } + + async.parallel = function (tasks, callback) { + _parallel(async.eachOf, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel(_eachOfLimit(limit), tasks, callback); + }; + + async.series = function(tasks, callback) { + _parallel(async.eachOfSeries, tasks, callback); + }; + + async.iterator = function (tasks) { + function makeCallback(index) { + function fn() { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + } + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + } + return makeCallback(0); + }; + + async.apply = _restParam(function (fn, args) { + return _restParam(function (callArgs) { + return fn.apply( + null, args.concat(callArgs) + ); + }); + }); + + function _concat(eachfn, arr, fn, callback) { + var result = []; + eachfn(arr, function (x, index, cb) { + fn(x, function (err, y) { + result = result.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, result); + }); + } + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + callback = callback || noop; + if (test()) { + var next = _restParam(function(err, args) { + if (err) { + callback(err); + } else if (test.apply(this, args)) { + iterator(next); + } else { + callback.apply(null, [null].concat(args)); + } + }); + iterator(next); + } else { + callback(null); + } + }; + + async.doWhilst = function (iterator, test, callback) { + var calls = 0; + return async.whilst(function() { + return ++calls <= 1 || test.apply(this, arguments); + }, iterator, callback); + }; + + async.until = function (test, iterator, callback) { + return async.whilst(function() { + return !test.apply(this, arguments); + }, iterator, callback); + }; + + async.doUntil = function (iterator, test, callback) { + return async.doWhilst(iterator, function() { + return !test.apply(this, arguments); + }, callback); + }; + + async.during = function (test, iterator, callback) { + callback = callback || noop; + + var next = _restParam(function(err, args) { + if (err) { + callback(err); + } else { + args.push(check); + test.apply(this, args); + } + }); + + var check = function(err, truth) { + if (err) { + callback(err); + } else if (truth) { + iterator(next); + } else { + callback(null); + } + }; + + test(check); + }; + + async.doDuring = function (iterator, test, callback) { + var calls = 0; + async.during(function(next) { + if (calls++ < 1) { + next(null, true); + } else { + test.apply(this, arguments); + } + }, iterator, callback); + }; + + function _queue(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } + else if(concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + function _insert(q, data, pos, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0 && q.idle()) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + q.drain(); + }); + } + _arrayEach(data, function(task) { + var item = { + data: task, + callback: callback || noop + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.tasks.length === q.concurrency) { + q.saturated(); + } + }); + async.setImmediate(q.process); + } + function _next(q, tasks) { + return function(){ + workers -= 1; + + var removed = false; + var args = arguments; + _arrayEach(tasks, function (task) { + _arrayEach(workersList, function (worker, index) { + if (worker === task && !removed) { + workersList.splice(index, 1); + removed = true; + } + }); + + task.callback.apply(task, args); + }); + if (q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + } + + var workers = 0; + var workersList = []; + var q = { + tasks: [], + concurrency: concurrency, + payload: payload, + saturated: noop, + empty: noop, + drain: noop, + started: false, + paused: false, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + kill: function () { + q.drain = noop; + q.tasks = []; + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + while(!q.paused && workers < q.concurrency && q.tasks.length){ + + var tasks = q.payload ? + q.tasks.splice(0, q.payload) : + q.tasks.splice(0, q.tasks.length); + + var data = _map(tasks, function (task) { + return task.data; + }); + + if (q.tasks.length === 0) { + q.empty(); + } + workers += 1; + workersList.push(tasks[0]); + var cb = only_once(_next(q, tasks)); + worker(data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + }, + workersList: function () { + return workersList; + }, + idle: function() { + return q.tasks.length + workers === 0; + }, + pause: function () { + q.paused = true; + }, + resume: function () { + if (q.paused === false) { return; } + q.paused = false; + var resumeCount = Math.min(q.concurrency, q.tasks.length); + // Need to call q.process once per concurrent + // worker to preserve full concurrency after pause + for (var w = 1; w <= resumeCount; w++) { + async.setImmediate(q.process); + } + } + }; + return q; + } + + async.queue = function (worker, concurrency) { + var q = _queue(function (items, cb) { + worker(items[0], cb); + }, concurrency, 1); + + return q; + }; + + async.priorityQueue = function (worker, concurrency) { + + function _compareTasks(a, b){ + return a.priority - b.priority; + } + + function _binarySearch(sequence, item, compare) { + var beg = -1, + end = sequence.length - 1; + while (beg < end) { + var mid = beg + ((end - beg + 1) >>> 1); + if (compare(item, sequence[mid]) >= 0) { + beg = mid; + } else { + end = mid - 1; + } + } + return beg; + } + + function _insert(q, data, priority, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + q.drain(); + }); + } + _arrayEach(data, function(task) { + var item = { + data: task, + priority: priority, + callback: typeof callback === 'function' ? callback : noop + }; + + q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); + + if (q.tasks.length === q.concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + // Start with a normal queue + var q = async.queue(worker, concurrency); + + // Override push to accept second parameter representing priority + q.push = function (data, priority, callback) { + _insert(q, data, priority, callback); + }; + + // Remove unshift function + delete q.unshift; + + return q; + }; + + async.cargo = function (worker, payload) { + return _queue(worker, 1, payload); + }; + + function _console_fn(name) { + return _restParam(function (fn, args) { + fn.apply(null, args.concat([_restParam(function (err, args) { + if (typeof console === 'object') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _arrayEach(args, function (x) { + console[name](x); + }); + } + } + })])); + }); + } + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + var has = Object.prototype.hasOwnProperty; + hasher = hasher || identity; + var memoized = _restParam(function memoized(args) { + var callback = args.pop(); + var key = hasher.apply(null, args); + if (has.call(memo, key)) { + async.setImmediate(function () { + callback.apply(null, memo[key]); + }); + } + else if (has.call(queues, key)) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([_restParam(function (args) { + memo[key] = args; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, args); + } + })])); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + function _times(mapper) { + return function (count, iterator, callback) { + mapper(_range(count), iterator, callback); + }; + } + + async.times = _times(async.map); + async.timesSeries = _times(async.mapSeries); + async.timesLimit = function (count, limit, iterator, callback) { + return async.mapLimit(_range(count), limit, iterator, callback); + }; + + async.seq = function (/* functions... */) { + var fns = arguments; + return _restParam(function (args) { + var that = this; + + var callback = args[args.length - 1]; + if (typeof callback == 'function') { + args.pop(); + } else { + callback = noop; + } + + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([_restParam(function (err, nextargs) { + cb(err, nextargs); + })])); + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }); + }; + + async.compose = function (/* functions... */) { + return async.seq.apply(null, Array.prototype.reverse.call(arguments)); + }; + + + function _applyEach(eachfn) { + return _restParam(function(fns, args) { + var go = _restParam(function(args) { + var that = this; + var callback = args.pop(); + return eachfn(fns, function (fn, _, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }); + if (args.length) { + return go.apply(this, args); + } + else { + return go; + } + }); + } + + async.applyEach = _applyEach(async.eachOf); + async.applyEachSeries = _applyEach(async.eachOfSeries); + + + async.forever = function (fn, callback) { + var done = only_once(callback || noop); + var task = ensureAsync(fn); + function next(err) { + if (err) { + return done(err); + } + task(next); + } + next(); + }; + + function ensureAsync(fn) { + return _restParam(function (args) { + var callback = args.pop(); + args.push(function () { + var innerArgs = arguments; + if (sync) { + async.setImmediate(function () { + callback.apply(null, innerArgs); + }); + } else { + callback.apply(null, innerArgs); + } + }); + var sync = true; + fn.apply(this, args); + sync = false; + }); + } + + async.ensureAsync = ensureAsync; + + async.constant = _restParam(function(values) { + var args = [null].concat(values); + return function (callback) { + return callback.apply(this, args); + }; + }); + + async.wrapSync = + async.asyncify = function asyncify(func) { + return _restParam(function (args) { + var callback = args.pop(); + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + // if result is Promise object + if (_isObject(result) && typeof result.then === "function") { + result.then(function(value) { + callback(null, value); + })["catch"](function(err) { + callback(err.message ? err : new Error(err)); + }); + } else { + callback(null, result); + } + }); + }; + + // Node.js + if (typeof module === 'object' && module.exports) { + module.exports = async; + } + // AMD / RequireJS + else if (typeof define === 'function' && define.amd) { + define([], function () { + return async; + }); + } + // included directly via '); + expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e'); + done(); + }); + + it('encodes \' characters', function (done) { + + var encoded = Hoek.escapeJavaScript('something(\'param\')'); + expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29'); + done(); + }); + + it('encodes large unicode characters with the correct padding', function (done) { + + var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000)); + expect(encoded).to.equal('\\u0500\\u1000'); + done(); + }); + + it('doesn\'t throw an exception when passed null', function (done) { + + var encoded = Hoek.escapeJavaScript(null); + expect(encoded).to.equal(''); + done(); + }); +}); + +describe('escapeHtml()', function () { + + it('encodes / characters', function (done) { + + var encoded = Hoek.escapeHtml(''); + expect(encoded).to.equal('<script>alert(1)</script>'); + done(); + }); + + it('encodes < and > as named characters', function (done) { + + var encoded = Hoek.escapeHtml(' + + \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js new file mode 100644 index 00000000000..664c1b455bd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js @@ -0,0 +1,3 @@ +var BigInteger = require('./'); +var a = new BigInteger('91823918239182398123'); +console.log(a.bitLength()); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js new file mode 100644 index 00000000000..e32fe13d860 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js @@ -0,0 +1,1358 @@ +(function(){ + + // Copyright (c) 2005 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Basic JavaScript BN library - subset useful for RSA encryption. + + // Bits per digit + var dbits; + + // JavaScript engine analysis + var canary = 0xdeadbeefcafe; + var j_lm = ((canary&0xffffff)==0xefcafe); + + // (public) Constructor + function BigInteger(a,b,c) { + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); + } + + // return new, unset BigInteger + function nbi() { return new BigInteger(null); } + + // am: Compute w_j += (x*this_i), propagate carries, + // c is initial carry, returns final carry. + // c < 3*dvalue, x < 2*dvalue, this_i < dvalue + // We need to select the fastest one that works in this environment. + + // am1: use a single mult and divide to get the high bits, + // max digit bits should be 26 because + // max internal value = 2*dvalue^2-2*dvalue (< 2^53) + function am1(i,x,w,j,c,n) { + while(--n >= 0) { + var v = x*this[i++]+w[j]+c; + c = Math.floor(v/0x4000000); + w[j++] = v&0x3ffffff; + } + return c; + } + // am2 avoids a big mult-and-extract completely. + // Max digit bits should be <= 30 because we do bitwise ops + // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) + function am2(i,x,w,j,c,n) { + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this[i]&0x7fff; + var h = this[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w[j++] = l&0x3fffffff; + } + return c; + } + // Alternately, set max digit bits to 28 since some + // browsers slow down when dealing with 32-bit numbers. + function am3(i,x,w,j,c,n) { + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this[i]&0x3fff; + var h = this[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w[j++] = l&0xfffffff; + } + return c; + } + var inBrowser = typeof navigator !== "undefined"; + if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { + BigInteger.prototype.am = am2; + dbits = 30; + } + else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { + BigInteger.prototype.am = am1; + dbits = 26; + } + else { // Mozilla/Netscape seems to prefer am3 + BigInteger.prototype.am = am3; + dbits = 28; + } + + BigInteger.prototype.DB = dbits; + BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; + r.t = this.t; + r.s = this.s; + } + + // (protected) set from integer value x, -DV <= x < DV + function bnpFromInt(x) { + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this[0] = x; + else if(x < -1) this[0] = x+this.DV; + else this.t = 0; + } + + // return bigint initialized to value + function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + + // (protected) set from string and radix + function bnpFromString(s,b) { + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this[this.t++] = x; + else if(sh+k > this.DB) { + this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + } + else + this[this.t-1] |= x<= this.DB) sh -= this.DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; + } + + // (public) return string representation in given radix + function bnToString(b) { + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this[i]&((1<>(p+=this.DB-k); + } + else { + d = (this[i]>>(p-=k))&km; + if(p <= 0) { p += this.DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; + } + + // (public) -this + function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + + // (public) |this| + function bnAbs() { return (this.s<0)?this.negate():this; } + + // (public) return + if this > a, - if this < a, 0 if equal + function bnCompareTo(a) { + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return (this.s<0)?-r:r; + while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; + return 0; + } + + // returns bit length of the integer x + function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; + } + + // (public) return the number of bits in "this" + function bnBitLength() { + if(this.t <= 0) return 0; + return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); + } + + // (protected) r = this << n*DB + function bnpDLShiftTo(n,r) { + var i; + for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; + for(i = n-1; i >= 0; --i) r[i] = 0; + r.t = this.t+n; + r.s = this.s; + } + + // (protected) r = this >> n*DB + function bnpDRShiftTo(n,r) { + for(var i = n; i < this.t; ++i) r[i-n] = this[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; + } + + // (protected) r = this << n + function bnpLShiftTo(n,r) { + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<= 0; --i) { + r[i+ds+1] = (this[i]>>cbs)|c; + c = (this[i]&bm)<= 0; --i) r[i] = 0; + r[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); + } + + // (protected) r = this >> n + function bnpRShiftTo(n,r) { + r.s = this.s; + var ds = Math.floor(n/this.DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r[i-ds-1] |= (this[i]&bm)<>bs; + } + if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c -= a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r[i++] = this.DV+c; + else if(c > 0) r[i++] = c; + r.t = i; + r.clamp(); + } + + // (protected) r = this * a, r != this,a (HAC 14.12) + // "this" should be the larger one if appropriate. + function bnpMultiplyTo(a,r) { + var x = this.abs(), y = a.abs(); + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); + } + + // (protected) r = this^2, r != this (HAC 14.16) + function bnpSquareTo(r) { + var x = this.abs(); + var i = r.t = 2*x.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x[i],r,2*i,0,1); + if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { + r[i+x.t] -= x.DV; + r[i+x.t+1] = 1; + } + } + if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); + r.s = 0; + r.clamp(); + } + + // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) + // r != q, this != m. q or r may be null. + function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + var y0 = y[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y[ys-2]>>this.F2:0); + var d1 = this.FV/yt, d2 = (1<= 0) { + r[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); + if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); + } + + // (public) this mod a + function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; + } + + // Modular reduction using "classic" algorithm + function Classic(m) { this.m = m; } + function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; + } + function cRevert(x) { return x; } + function cReduce(x) { x.divRemTo(this.m,null,x); } + function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + Classic.prototype.convert = cConvert; + Classic.prototype.revert = cRevert; + Classic.prototype.reduce = cReduce; + Classic.prototype.mulTo = cMulTo; + Classic.prototype.sqrTo = cSqrTo; + + // (protected) return "-1/this % 2^DB"; useful for Mont. reduction + // justification: + // xy == 1 (mod m) + // xy = 1+km + // xy(2-xy) = (1+km)(1-km) + // x[y(2-xy)] = 1-k^2m^2 + // x[y(2-xy)] == 1 (mod m^2) + // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 + // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. + // JS multiply "overflows" differently from C/C++, so care is needed here. + function bnpInvDigit() { + if(this.t < 1) return 0; + var x = this[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?this.DV-y:-y; + } + + // Montgomery reduction + function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(m.DB-15))-1; + this.mt2 = 2*m.t; + } + + // xR mod m + function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; + } + + // x/R mod m + function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; + } + + // x = x/R mod m (HAC 14.32) + function montReduce(x) { + while(x.t <= this.mt2) // pad x so am has enough room later + x[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x[i]*mp mod DV + var j = x[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = "x^2/R mod m"; x != r + function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = "xy/R mod m"; x,y != r + function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Montgomery.prototype.convert = montConvert; + Montgomery.prototype.revert = montRevert; + Montgomery.prototype.reduce = montReduce; + Montgomery.prototype.mulTo = montMulTo; + Montgomery.prototype.sqrTo = montSqrTo; + + // (protected) true iff this is even + function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } + + // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) + function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); + } + + // (public) this^e % m, 0 <= e < 2^32 + function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); + } + + // protected + BigInteger.prototype.copyTo = bnpCopyTo; + BigInteger.prototype.fromInt = bnpFromInt; + BigInteger.prototype.fromString = bnpFromString; + BigInteger.prototype.clamp = bnpClamp; + BigInteger.prototype.dlShiftTo = bnpDLShiftTo; + BigInteger.prototype.drShiftTo = bnpDRShiftTo; + BigInteger.prototype.lShiftTo = bnpLShiftTo; + BigInteger.prototype.rShiftTo = bnpRShiftTo; + BigInteger.prototype.subTo = bnpSubTo; + BigInteger.prototype.multiplyTo = bnpMultiplyTo; + BigInteger.prototype.squareTo = bnpSquareTo; + BigInteger.prototype.divRemTo = bnpDivRemTo; + BigInteger.prototype.invDigit = bnpInvDigit; + BigInteger.prototype.isEven = bnpIsEven; + BigInteger.prototype.exp = bnpExp; + + // public + BigInteger.prototype.toString = bnToString; + BigInteger.prototype.negate = bnNegate; + BigInteger.prototype.abs = bnAbs; + BigInteger.prototype.compareTo = bnCompareTo; + BigInteger.prototype.bitLength = bnBitLength; + BigInteger.prototype.mod = bnMod; + BigInteger.prototype.modPowInt = bnModPowInt; + + // "constants" + BigInteger.ZERO = nbv(0); + BigInteger.ONE = nbv(1); + + // Copyright (c) 2005-2009 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Extended JavaScript BN functions, required for RSA private ops. + + // Version 1.1: new BigInteger("0", 10) returns "proper" zero + // Version 1.2: square() API, isProbablePrime fix + + // (public) + function bnClone() { var r = nbi(); this.copyTo(r); return r; } + + // (public) return value as integer + function bnIntValue() { + if(this.s < 0) { + if(this.t == 1) return this[0]-this.DV; + else if(this.t == 0) return -1; + } + else if(this.t == 1) return this[0]; + else if(this.t == 0) return 0; + // assumes 16 < DB < 32 + return ((this[1]&((1<<(32-this.DB))-1))<>24; } + + // (public) return value as short (assumes DB>=16) + function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } + + // (protected) return x s.t. r^x < DV + function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } + + // (public) 0 if this == 0, 1 if this > 0 + function bnSigNum() { + if(this.s < 0) return -1; + else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; + else return 1; + } + + // (protected) convert to radix string + function bnpToRadix(b) { + if(b == null) b = 10; + if(this.signum() == 0 || b < 2 || b > 36) return "0"; + var cs = this.chunkSize(b); + var a = Math.pow(b,cs); + var d = nbv(a), y = nbi(), z = nbi(), r = ""; + this.divRemTo(d,y,z); + while(y.signum() > 0) { + r = (a+z.intValue()).toString(b).substr(1) + r; + y.divRemTo(d,y,z); + } + return z.intValue().toString(b) + r; + } + + // (protected) convert from radix string + function bnpFromRadix(s,b) { + this.fromInt(0); + if(b == null) b = 10; + var cs = this.chunkSize(b); + var d = Math.pow(b,cs), mi = false, j = 0, w = 0; + for(var i = 0; i < s.length; ++i) { + var x = intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b*w+x; + if(++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w,0); + j = 0; + w = 0; + } + } + if(j > 0) { + this.dMultiply(Math.pow(b,j)); + this.dAddOffset(w,0); + } + if(mi) BigInteger.ZERO.subTo(this,this); + } + + // (protected) alternate constructor + function bnpFromNumber(a,b,c) { + if("number" == typeof b) { + // new BigInteger(int,int,RNG) + if(a < 2) this.fromInt(1); + else { + this.fromNumber(a,c); + if(!this.testBit(a-1)) // force MSB set + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + if(this.isEven()) this.dAddOffset(1,0); // force odd + while(!this.isProbablePrime(b)) { + this.dAddOffset(2,0); + if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); + } + } + } + else { + // new BigInteger(int,RNG) + var x = new Array(), t = a&7; + x.length = (a>>3)+1; + b.nextBytes(x); + if(t > 0) x[0] &= ((1< 0) { + if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) + r[k++] = d|(this.s<<(this.DB-p)); + while(i >= 0) { + if(p < 8) { + d = (this[i]&((1<>(p+=this.DB-8); + } + else { + d = (this[i]>>(p-=8))&0xff; + if(p <= 0) { p += this.DB; --i; } + } + if((d&0x80) != 0) d |= -256; + if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; + if(k > 0 || d != this.s) r[k++] = d; + } + } + return r; + } + + function bnEquals(a) { return(this.compareTo(a)==0); } + function bnMin(a) { return(this.compareTo(a)<0)?this:a; } + function bnMax(a) { return(this.compareTo(a)>0)?this:a; } + + // (protected) r = this op a (bitwise) + function bnpBitwiseTo(a,op,r) { + var i, f, m = Math.min(a.t,this.t); + for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); + if(a.t < this.t) { + f = a.s&this.DM; + for(i = m; i < this.t; ++i) r[i] = op(this[i],f); + r.t = this.t; + } + else { + f = this.s&this.DM; + for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); + r.t = a.t; + } + r.s = op(this.s,a.s); + r.clamp(); + } + + // (public) this & a + function op_and(x,y) { return x&y; } + function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } + + // (public) this | a + function op_or(x,y) { return x|y; } + function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } + + // (public) this ^ a + function op_xor(x,y) { return x^y; } + function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } + + // (public) this & ~a + function op_andnot(x,y) { return x&~y; } + function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } + + // (public) ~this + function bnNot() { + var r = nbi(); + for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; + r.t = this.t; + r.s = ~this.s; + return r; + } + + // (public) this << n + function bnShiftLeft(n) { + var r = nbi(); + if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); + return r; + } + + // (public) this >> n + function bnShiftRight(n) { + var r = nbi(); + if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); + return r; + } + + // return index of lowest 1-bit in x, x < 2^31 + function lbit(x) { + if(x == 0) return -1; + var r = 0; + if((x&0xffff) == 0) { x >>= 16; r += 16; } + if((x&0xff) == 0) { x >>= 8; r += 8; } + if((x&0xf) == 0) { x >>= 4; r += 4; } + if((x&3) == 0) { x >>= 2; r += 2; } + if((x&1) == 0) ++r; + return r; + } + + // (public) returns index of lowest 1-bit (or -1 if none) + function bnGetLowestSetBit() { + for(var i = 0; i < this.t; ++i) + if(this[i] != 0) return i*this.DB+lbit(this[i]); + if(this.s < 0) return this.t*this.DB; + return -1; + } + + // return number of 1 bits in x + function cbit(x) { + var r = 0; + while(x != 0) { x &= x-1; ++r; } + return r; + } + + // (public) return number of set bits + function bnBitCount() { + var r = 0, x = this.s&this.DM; + for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); + return r; + } + + // (public) true iff nth bit is set + function bnTestBit(n) { + var j = Math.floor(n/this.DB); + if(j >= this.t) return(this.s!=0); + return((this[j]&(1<<(n%this.DB)))!=0); + } + + // (protected) this op (1<>= this.DB; + } + if(a.t < this.t) { + c += a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c += a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += a.s; + } + r.s = (c<0)?-1:0; + if(c > 0) r[i++] = c; + else if(c < -1) r[i++] = this.DV+c; + r.t = i; + r.clamp(); + } + + // (public) this + a + function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } + + // (public) this - a + function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } + + // (public) this * a + function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + + // (public) this^2 + function bnSquare() { var r = nbi(); this.squareTo(r); return r; } + + // (public) this / a + function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + + // (public) this % a + function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + + // (public) [this/a,this%a] + function bnDivideAndRemainder(a) { + var q = nbi(), r = nbi(); + this.divRemTo(a,q,r); + return new Array(q,r); + } + + // (protected) this *= n, this >= 0, 1 < n < DV + function bnpDMultiply(n) { + this[this.t] = this.am(0,n-1,this,0,0,this.t); + ++this.t; + this.clamp(); + } + + // (protected) this += n << w words, this >= 0 + function bnpDAddOffset(n,w) { + if(n == 0) return; + while(this.t <= w) this[this.t++] = 0; + this[w] += n; + while(this[w] >= this.DV) { + this[w] -= this.DV; + if(++w >= this.t) this[this.t++] = 0; + ++this[w]; + } + } + + // A "null" reducer + function NullExp() {} + function nNop(x) { return x; } + function nMulTo(x,y,r) { x.multiplyTo(y,r); } + function nSqrTo(x,r) { x.squareTo(r); } + + NullExp.prototype.convert = nNop; + NullExp.prototype.revert = nNop; + NullExp.prototype.mulTo = nMulTo; + NullExp.prototype.sqrTo = nSqrTo; + + // (public) this^e + function bnPow(e) { return this.exp(e,new NullExp()); } + + // (protected) r = lower n words of "this * a", a.t <= n + // "this" should be the larger one if appropriate. + function bnpMultiplyLowerTo(a,n,r) { + var i = Math.min(this.t+a.t,n); + r.s = 0; // assumes a,this >= 0 + r.t = i; + while(i > 0) r[--i] = 0; + var j; + for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); + for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); + r.clamp(); + } + + // (protected) r = "this * a" without lower n words, n > 0 + // "this" should be the larger one if appropriate. + function bnpMultiplyUpperTo(a,n,r) { + --n; + var i = r.t = this.t+a.t-n; + r.s = 0; // assumes a,this >= 0 + while(--i >= 0) r[i] = 0; + for(i = Math.max(n-this.t,0); i < a.t; ++i) + r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); + r.clamp(); + r.drShiftTo(1,r); + } + + // Barrett modular reduction + function Barrett(m) { + // setup Barrett + this.r2 = nbi(); + this.q3 = nbi(); + BigInteger.ONE.dlShiftTo(2*m.t,this.r2); + this.mu = this.r2.divide(m); + this.m = m; + } + + function barrettConvert(x) { + if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); + else if(x.compareTo(this.m) < 0) return x; + else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } + } + + function barrettRevert(x) { return x; } + + // x = x mod m (HAC 14.42) + function barrettReduce(x) { + x.drShiftTo(this.m.t-1,this.r2); + if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } + this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); + this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); + while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); + x.subTo(this.r2,x); + while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = x^2 mod m; x != r + function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = x*y mod m; x,y != r + function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Barrett.prototype.convert = barrettConvert; + Barrett.prototype.revert = barrettRevert; + Barrett.prototype.reduce = barrettReduce; + Barrett.prototype.mulTo = barrettMulTo; + Barrett.prototype.sqrTo = barrettSqrTo; + + // (public) this^e % m (HAC 14.85) + function bnModPow(e,m) { + var i = e.bitLength(), k, r = nbv(1), z; + if(i <= 0) return r; + else if(i < 18) k = 1; + else if(i < 48) k = 3; + else if(i < 144) k = 4; + else if(i < 768) k = 5; + else k = 6; + if(i < 8) + z = new Classic(m); + else if(m.isEven()) + z = new Barrett(m); + else + z = new Montgomery(m); + + // precomputation + var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { + var g2 = nbi(); + z.sqrTo(g[1],g2); + while(n <= km) { + g[n] = nbi(); + z.mulTo(g2,g[n-2],g[n]); + n += 2; + } + } + + var j = e.t-1, w, is1 = true, r2 = nbi(), t; + i = nbits(e[j])-1; + while(j >= 0) { + if(i >= k1) w = (e[j]>>(i-k1))&km; + else { + w = (e[j]&((1<<(i+1))-1))<<(k1-i); + if(j > 0) w |= e[j-1]>>(this.DB+i-k1); + } + + n = k; + while((w&1) == 0) { w >>= 1; --n; } + if((i -= n) < 0) { i += this.DB; --j; } + if(is1) { // ret == 1, don't bother squaring or multiplying it + g[w].copyTo(r); + is1 = false; + } + else { + while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } + if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } + z.mulTo(r2,g[w],r); + } + + while(j >= 0 && (e[j]&(1< 0) { + x.rShiftTo(g,x); + y.rShiftTo(g,y); + } + while(x.signum() > 0) { + if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); + if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); + if(x.compareTo(y) >= 0) { + x.subTo(y,x); + x.rShiftTo(1,x); + } + else { + y.subTo(x,y); + y.rShiftTo(1,y); + } + } + if(g > 0) y.lShiftTo(g,y); + return y; + } + + // (protected) this % n, n < 2^26 + function bnpModInt(n) { + if(n <= 0) return 0; + var d = this.DV%n, r = (this.s<0)?n-1:0; + if(this.t > 0) + if(d == 0) r = this[0]%n; + else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; + return r; + } + + // (public) 1/this % m (HAC 14.61) + function bnModInverse(m) { + var ac = m.isEven(); + if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; + var u = m.clone(), v = this.clone(); + var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); + while(u.signum() != 0) { + while(u.isEven()) { + u.rShiftTo(1,u); + if(ac) { + if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } + a.rShiftTo(1,a); + } + else if(!b.isEven()) b.subTo(m,b); + b.rShiftTo(1,b); + } + while(v.isEven()) { + v.rShiftTo(1,v); + if(ac) { + if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } + c.rShiftTo(1,c); + } + else if(!d.isEven()) d.subTo(m,d); + d.rShiftTo(1,d); + } + if(u.compareTo(v) >= 0) { + u.subTo(v,u); + if(ac) a.subTo(c,a); + b.subTo(d,b); + } + else { + v.subTo(u,v); + if(ac) c.subTo(a,c); + d.subTo(b,d); + } + } + if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; + if(d.compareTo(m) >= 0) return d.subtract(m); + if(d.signum() < 0) d.addTo(m,d); else return d; + if(d.signum() < 0) return d.add(m); else return d; + } + + var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; + var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + + // (public) test primality with certainty >= 1-.5^t + function bnIsProbablePrime(t) { + var i, x = this.abs(); + if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { + for(i = 0; i < lowprimes.length; ++i) + if(x[0] == lowprimes[i]) return true; + return false; + } + if(x.isEven()) return false; + i = 1; + while(i < lowprimes.length) { + var m = lowprimes[i], j = i+1; + while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while(i < j) if(m%lowprimes[i++] == 0) return false; + } + return x.millerRabin(t); + } + + // (protected) true if probably prime (HAC 4.24, Miller-Rabin) + function bnpMillerRabin(t) { + var n1 = this.subtract(BigInteger.ONE); + var k = n1.getLowestSetBit(); + if(k <= 0) return false; + var r = n1.shiftRight(k); + t = (t+1)>>1; + if(t > lowprimes.length) t = lowprimes.length; + var a = nbi(); + for(var i = 0; i < t; ++i) { + //Pick bases at random, instead of starting at 2 + a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); + var y = a.modPow(r,this); + if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while(j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2,this); + if(y.compareTo(BigInteger.ONE) == 0) return false; + } + if(y.compareTo(n1) != 0) return false; + } + } + return true; + } + + // protected + BigInteger.prototype.chunkSize = bnpChunkSize; + BigInteger.prototype.toRadix = bnpToRadix; + BigInteger.prototype.fromRadix = bnpFromRadix; + BigInteger.prototype.fromNumber = bnpFromNumber; + BigInteger.prototype.bitwiseTo = bnpBitwiseTo; + BigInteger.prototype.changeBit = bnpChangeBit; + BigInteger.prototype.addTo = bnpAddTo; + BigInteger.prototype.dMultiply = bnpDMultiply; + BigInteger.prototype.dAddOffset = bnpDAddOffset; + BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; + BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; + BigInteger.prototype.modInt = bnpModInt; + BigInteger.prototype.millerRabin = bnpMillerRabin; + + // public + BigInteger.prototype.clone = bnClone; + BigInteger.prototype.intValue = bnIntValue; + BigInteger.prototype.byteValue = bnByteValue; + BigInteger.prototype.shortValue = bnShortValue; + BigInteger.prototype.signum = bnSigNum; + BigInteger.prototype.toByteArray = bnToByteArray; + BigInteger.prototype.equals = bnEquals; + BigInteger.prototype.min = bnMin; + BigInteger.prototype.max = bnMax; + BigInteger.prototype.and = bnAnd; + BigInteger.prototype.or = bnOr; + BigInteger.prototype.xor = bnXor; + BigInteger.prototype.andNot = bnAndNot; + BigInteger.prototype.not = bnNot; + BigInteger.prototype.shiftLeft = bnShiftLeft; + BigInteger.prototype.shiftRight = bnShiftRight; + BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; + BigInteger.prototype.bitCount = bnBitCount; + BigInteger.prototype.testBit = bnTestBit; + BigInteger.prototype.setBit = bnSetBit; + BigInteger.prototype.clearBit = bnClearBit; + BigInteger.prototype.flipBit = bnFlipBit; + BigInteger.prototype.add = bnAdd; + BigInteger.prototype.subtract = bnSubtract; + BigInteger.prototype.multiply = bnMultiply; + BigInteger.prototype.divide = bnDivide; + BigInteger.prototype.remainder = bnRemainder; + BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; + BigInteger.prototype.modPow = bnModPow; + BigInteger.prototype.modInverse = bnModInverse; + BigInteger.prototype.pow = bnPow; + BigInteger.prototype.gcd = bnGCD; + BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + + // JSBN-specific extension + BigInteger.prototype.square = bnSquare; + + // Expose the Barrett function + BigInteger.prototype.Barrett = Barrett + + // BigInteger interfaces not implemented in jsbn: + + // BigInteger(int signum, byte[] magnitude) + // double doubleValue() + // float floatValue() + // int hashCode() + // long longValue() + // static BigInteger valueOf(long val) + + // Random number generator - requires a PRNG backend, e.g. prng4.js + + // For best results, put code like + // + // in your main HTML document. + + var rng_state; + var rng_pool; + var rng_pptr; + + // Mix in a 32-bit integer into the pool + function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= (x >> 8) & 255; + rng_pool[rng_pptr++] ^= (x >> 16) & 255; + rng_pool[rng_pptr++] ^= (x >> 24) & 255; + if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; + } + + // Mix in the current time (w/milliseconds) into the pool + function rng_seed_time() { + rng_seed_int(new Date().getTime()); + } + + // Initialize the pool with junk if needed. + if(rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + if(typeof window !== "undefined" && window.crypto) { + if (window.crypto.getRandomValues) { + // Use webcrypto if available + var ua = new Uint8Array(32); + window.crypto.getRandomValues(ua); + for(t = 0; t < 32; ++t) + rng_pool[rng_pptr++] = ua[t]; + } + else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { + // Extract entropy (256 bits) from NS4 RNG if available + var z = window.crypto.random(32); + for(t = 0; t < z.length; ++t) + rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; + } + } + while(rng_pptr < rng_psize) { // extract some randomness from Math.random() + t = Math.floor(65536 * Math.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + //rng_seed_int(window.screenX); + //rng_seed_int(window.screenY); + } + + function rng_get_byte() { + if(rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + //rng_pool = null; + } + // TODO: allow reseeding after first request + return rng_state.next(); + } + + function rng_get_bytes(ba) { + var i; + for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); + } + + function SecureRandom() {} + + SecureRandom.prototype.nextBytes = rng_get_bytes; + + // prng4.js - uses Arcfour as a PRNG + + function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); + } + + // Initialize arcfour context from key, an array of ints, each from [0..255] + function ARC4init(key) { + var i, j, t; + for(i = 0; i < 256; ++i) + this.S[i] = i; + j = 0; + for(i = 0; i < 256; ++i) { + j = (j + this.S[i] + key[i % key.length]) & 255; + t = this.S[i]; + this.S[i] = this.S[j]; + this.S[j] = t; + } + this.i = 0; + this.j = 0; + } + + function ARC4next() { + var t; + this.i = (this.i + 1) & 255; + this.j = (this.j + this.S[this.i]) & 255; + t = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t; + return this.S[(t + this.S[this.i]) & 255]; + } + + Arcfour.prototype.init = ARC4init; + Arcfour.prototype.next = ARC4next; + + // Plug in your RNG constructor here + function prng_newstate() { + return new Arcfour(); + } + + // Pool size must be a multiple of 4 and greater than 32. + // An array of bytes the size of the pool will be passed to init() + var rng_psize = 256; + + if (typeof exports !== 'undefined') { + exports = module.exports = { + BigInteger: BigInteger, + SecureRandom: SecureRandom, + }; + } else { + this.BigInteger = BigInteger; + this.SecureRandom = SecureRandom; + } + +}).call(this); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json new file mode 100644 index 00000000000..8466b518794 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "jsbn@~0.1.0", + "/Users/eshanker/Code/fsevents/node_modules/sshpk" + ] + ], + "_from": "jsbn@>=0.1.0 <0.2.0", + "_id": "jsbn@0.1.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/jsbn", + "_nodeVersion": "0.12.2", + "_npmUser": { + "email": "andyperlitch@gmail.com", + "name": "andyperlitch" + }, + "_npmVersion": "2.7.4", + "_phantomChildren": {}, + "_requested": { + "name": "jsbn", + "raw": "jsbn@~0.1.0", + "rawSpec": "~0.1.0", + "scope": null, + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/ecc-jsbn", + "/fsevents/jodid25519", + "/fsevents/sshpk" + ], + "_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", + "_shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd", + "_shrinkwrap": null, + "_spec": "jsbn@~0.1.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/sshpk", + "author": { + "name": "Tom Wu" + }, + "bugs": { + "url": "https://github.com/andyperlitch/jsbn/issues" + }, + "dependencies": {}, + "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd", + "tarball": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz" + }, + "gitHead": "148a967b112806e63ddeeed78ee7938eef74c84a", + "homepage": "https://github.com/andyperlitch/jsbn", + "keywords": [ + "big", + "biginteger", + "bignumber", + "integer" + ], + "license": "BSD", + "main": "index.js", + "maintainers": [ + { + "email": "andyperlitch@gmail.com", + "name": "andyperlitch" + } + ], + "name": "jsbn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/andyperlitch/jsbn.git" + }, + "scripts": { + "test": "mocha test.js" + }, + "version": "0.1.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md new file mode 100644 index 00000000000..4de0124476e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md @@ -0,0 +1,5 @@ +JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator). + +Code is licensed under the AFL or BSD license as part of the Persevere +project which is administered under the Dojo foundation, +and all contributions require a Dojo CLA. \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema new file mode 100644 index 00000000000..de80b918b67 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema @@ -0,0 +1,68 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-00/links#"}, + "optional" : true + }, + + "fragmentResolution" : { + "type" : "string", + "optional" : true, + "default" : "dot-delimited" + }, + + "root" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pathStart" : { + "type" : "string", + "optional" : true, + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "optional" : true, + "format" : "media-type" + }, + + "alternate" : { + "type" : "array", + "items" : {"$ref" : "#"}, + "optional" : true + } + }, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited", + "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref new file mode 100644 index 00000000000..3a872a71c97 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/json-ref#", + + "items" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links new file mode 100644 index 00000000000..8a5e7807250 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links @@ -0,0 +1,33 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string" + }, + + "rel" : { + "type" : "string" + }, + + "method" : { + "type" : "string", + "default" : "GET", + "optional" : true + }, + + "enctype" : { + "type" : "string", + "requires" : "method", + "optional" : true + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, + "optional" : true + } + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema new file mode 100644 index 00000000000..9aa2fbc57a4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema @@ -0,0 +1,155 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "optional" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "optional" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "optional" : true, + "default" : {} + }, + + "requires" : { + "type" : ["string", {"$ref" : "#"}], + "optional" : true + }, + + "minimum" : { + "type" : "number", + "optional" : true + }, + + "maximum" : { + "type" : "number", + "optional" : true + }, + + "minimumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "minimum", + "default" : true + }, + + "maximumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "maximum", + "default" : true + }, + + "minItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "pattern" : { + "type" : "string", + "optional" : true, + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer", + "optional" : true + }, + + "enum" : { + "type" : "array", + "optional" : true, + "minItems" : 1 + }, + + "title" : { + "type" : "string", + "optional" : true + }, + + "description" : { + "type" : "string", + "optional" : true + }, + + "format" : { + "type" : "string", + "optional" : true + }, + + "contentEncoding" : { + "type" : "string", + "optional" : true + }, + + "default" : { + "type" : "any", + "optional" : true + }, + + "maxDecimal" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : {"type" : "string"}, + "optional" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + } + }, + + "optional" : true, + "default" : {} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema new file mode 100644 index 00000000000..3f6c6cc2c01 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema @@ -0,0 +1,68 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-01/links#"}, + "optional" : true + }, + + "fragmentResolution" : { + "type" : "string", + "optional" : true, + "default" : "dot-delimited" + }, + + "root" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pathStart" : { + "type" : "string", + "optional" : true, + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "optional" : true, + "format" : "media-type" + }, + + "alternate" : { + "type" : "array", + "items" : {"$ref" : "#"}, + "optional" : true + } + }, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited", + "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref new file mode 100644 index 00000000000..4d26174ef17 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/json-ref#", + + "items" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links new file mode 100644 index 00000000000..52430a5d94a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links @@ -0,0 +1,33 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string" + }, + + "rel" : { + "type" : "string" + }, + + "method" : { + "type" : "string", + "default" : "GET", + "optional" : true + }, + + "enctype" : { + "type" : "string", + "requires" : "method", + "optional" : true + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, + "optional" : true + } + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema new file mode 100644 index 00000000000..7a208e680e6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema @@ -0,0 +1,155 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "optional" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "optional" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "optional" : true, + "default" : {} + }, + + "requires" : { + "type" : ["string", {"$ref" : "#"}], + "optional" : true + }, + + "minimum" : { + "type" : "number", + "optional" : true + }, + + "maximum" : { + "type" : "number", + "optional" : true + }, + + "minimumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "minimum", + "default" : true + }, + + "maximumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "maximum", + "default" : true + }, + + "minItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "pattern" : { + "type" : "string", + "optional" : true, + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer", + "optional" : true + }, + + "enum" : { + "type" : "array", + "optional" : true, + "minItems" : 1 + }, + + "title" : { + "type" : "string", + "optional" : true + }, + + "description" : { + "type" : "string", + "optional" : true + }, + + "format" : { + "type" : "string", + "optional" : true + }, + + "contentEncoding" : { + "type" : "string", + "optional" : true + }, + + "default" : { + "type" : "any", + "optional" : true + }, + + "maxDecimal" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : {"type" : "string"}, + "optional" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + } + }, + + "optional" : true, + "default" : {} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema new file mode 100644 index 00000000000..4ec1b756913 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema @@ -0,0 +1,68 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-02/links#"}, + "optional" : true + }, + + "fragmentResolution" : { + "type" : "string", + "optional" : true, + "default" : "slash-delimited" + }, + + "root" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pathStart" : { + "type" : "string", + "optional" : true, + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "optional" : true, + "format" : "media-type" + }, + + "alternate" : { + "type" : "array", + "items" : {"$ref" : "#"}, + "optional" : true + } + }, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "slash-delimited", + "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref new file mode 100644 index 00000000000..6526c394556 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/json-ref#", + + "items" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links new file mode 100644 index 00000000000..1b176178a2c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links @@ -0,0 +1,35 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string" + }, + + "rel" : { + "type" : "string" + }, + + "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, + + "method" : { + "type" : "string", + "default" : "GET", + "optional" : true + }, + + "enctype" : { + "type" : "string", + "requires" : "method", + "optional" : true + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, + "optional" : true + } + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema new file mode 100644 index 00000000000..61b8de15483 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema @@ -0,0 +1,166 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "optional" : true, + "uniqueItems" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "optional" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "optional" : true, + "default" : {} + }, + + "requires" : { + "type" : ["string", {"$ref" : "#"}], + "optional" : true + }, + + "minimum" : { + "type" : "number", + "optional" : true + }, + + "maximum" : { + "type" : "number", + "optional" : true + }, + + "minimumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "minimum", + "default" : true + }, + + "maximumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "maximum", + "default" : true + }, + + "minItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "uniqueItems" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pattern" : { + "type" : "string", + "optional" : true, + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer", + "optional" : true + }, + + "enum" : { + "type" : "array", + "optional" : true, + "minItems" : 1, + "uniqueItems" : true + }, + + "title" : { + "type" : "string", + "optional" : true + }, + + "description" : { + "type" : "string", + "optional" : true + }, + + "format" : { + "type" : "string", + "optional" : true + }, + + "contentEncoding" : { + "type" : "string", + "optional" : true + }, + + "default" : { + "type" : "any", + "optional" : true + }, + + "divisibleBy" : { + "type" : "number", + "minimum" : 0, + "minimumCanEqual" : false, + "optional" : true, + "default" : 1 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : {"type" : "string"}, + "optional" : true, + "uniqueItems" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + } + }, + + "optional" : true, + "default" : {} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address new file mode 100644 index 00000000000..074d34e82b2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address @@ -0,0 +1,20 @@ +{ + "description" : "An Address following the convention of http://microformats.org/wiki/hcard", + "type" : "object", + "properties" : { + "post-office-box" : { "type" : "string" }, + "extended-address" : { "type" : "string" }, + "street-address" : { "type":"string" }, + "locality" : { "type" : "string", "required" : true }, + "region" : { "type" : "string", "required" : true }, + "postal-code" : { "type" : "string" }, + "country-name" : { "type" : "string", "required" : true } + }, + "dependencies" : { + "post-office-box" : "street-address", + "extended-address" : "street-address", + "street-address" : "region", + "locality" : "region", + "region" : "country-name" + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar new file mode 100644 index 00000000000..463cfb314b6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar @@ -0,0 +1,53 @@ +{ + "description" : "A representation of an event", + "type" : "object", + "properties" : { + "dtstart" : { + "format" : "date-time", + "type" : "string", + "description" : "Event starting time", + "required":true + }, + "summary" : { + "type":"string", + "required":true + }, + "location" : { + "type" : "string" + }, + "url" : { + "type" : "string", + "format" : "url" + }, + "dtend" : { + "format" : "date-time", + "type" : "string", + "description" : "Event ending time" + }, + "duration" : { + "format" : "date", + "type" : "string", + "description" : "Event duration" + }, + "rdate" : { + "format" : "date-time", + "type" : "string", + "description" : "Recurrence date" + }, + "rrule" : { + "type" : "string", + "description" : "Recurrence rule" + }, + "category" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "geo" : { "$ref" : "http://json-schema.org/draft-03/geo" } + } +} + + + + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card new file mode 100644 index 00000000000..89287a40d3f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card @@ -0,0 +1,105 @@ +{ + "description":"A representation of a person, company, organization, or place", + "type":"object", + "properties":{ + "fn":{ + "description":"Formatted Name", + "type":"string" + }, + "familyName":{ + "type":"string", + "required":true + }, + "givenName":{ + "type":"string", + "required":true + }, + "additionalName":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "honorificPrefix":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "honorificSuffix":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "nickname":{ + "type":"string" + }, + "url":{ + "type":"string", + "format":"url" + }, + "email":{ + "type":"object", + "properties":{ + "type":{ + "type":"string" + }, + "value":{ + "type":"string", + "format":"email" + } + } + }, + "tel":{ + "type":"object", + "properties":{ + "type":{ + "type":"string" + }, + "value":{ + "type":"string", + "format":"phone" + } + } + }, + "adr":{"$ref" : "http://json-schema.org/address"}, + "geo":{"$ref" : "http://json-schema.org/geo"}, + "tz":{ + "type":"string" + }, + "photo":{ + "format":"image", + "type":"string" + }, + "logo":{ + "format":"image", + "type":"string" + }, + "sound":{ + "format":"attachment", + "type":"string" + }, + "bday":{ + "type":"string", + "format":"date" + }, + "title":{ + "type":"string" + }, + "role":{ + "type":"string" + }, + "org":{ + "type":"object", + "properties":{ + "organizationName":{ + "type":"string" + }, + "organizationUnit":{ + "type":"string" + } + } + } + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo new file mode 100644 index 00000000000..73ac7e538f2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo @@ -0,0 +1,8 @@ +{ + "description" : "A geographical coordinate", + "type" : "object", + "properties" : { + "latitude" : { "type" : "number" }, + "longitude" : { "type" : "number" } + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces new file mode 100644 index 00000000000..288a19856b7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces @@ -0,0 +1,23 @@ +{ + "extends":"http://json-schema.org/hyper-schema", + "description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax", + "properties":{ + "methods":{ + "type":"object", + "description":"This defines the set of methods available to the class instances", + "additionalProperties":{ + "type":"object", + "description":"The definition of the method", + "properties":{ + "parameters":{ + "type":"array", + "description":"The set of parameters that should be passed to the method when it is called", + "items":{"$ref":"#"}, + "required": true + }, + "returns":{"$ref":"#"} + } + } + } + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema new file mode 100644 index 00000000000..623055c3599 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema @@ -0,0 +1,60 @@ +{ + "$schema" : "http://json-schema.org/draft-03/hyper-schema#", + "extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"}, + "id" : "http://json-schema.org/draft-03/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-03/links#"} + }, + + "fragmentResolution" : { + "type" : "string", + "default" : "slash-delimited" + }, + + "root" : { + "type" : "boolean", + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "default" : false + }, + + "contentEncoding" : { + "type" : "string" + }, + + "pathStart" : { + "type" : "string", + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "format" : "media-type" + } + }, + + "links" : [ + { + "href" : "{id}", + "rel" : "self" + }, + + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + } + ], + + "fragmentResolution" : "slash-delimited" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref new file mode 100644 index 00000000000..7e491a8e882 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-03/hyper-schema#", + "id" : "http://json-schema.org/draft-03/json-ref#", + + "additionalItems" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{id}", + "rel" : "self" + }, + + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links new file mode 100644 index 00000000000..6b0a85a6295 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links @@ -0,0 +1,35 @@ +{ + "$schema" : "http://json-schema.org/draft-03/hyper-schema#", + "id" : "http://json-schema.org/draft-03/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string", + "required" : true, + "format" : "link-description-object-template" + }, + + "rel" : { + "type" : "string", + "required" : true + }, + + "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, + + "method" : { + "type" : "string", + "default" : "GET" + }, + + "enctype" : { + "type" : "string", + "requires" : "method" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} + } + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema new file mode 100644 index 00000000000..55ae47d808c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema @@ -0,0 +1,174 @@ +{ + "$schema" : "http://json-schema.org/draft-03/schema#", + "id" : "http://json-schema.org/draft-03/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "uniqueItems" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "patternProperties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalItems" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "required" : { + "type" : "boolean", + "default" : false + }, + + "dependencies" : { + "type" : "object", + "additionalProperties" : { + "type" : ["string", "array", {"$ref" : "#"}], + "items" : { + "type" : "string" + } + }, + "default" : {} + }, + + "minimum" : { + "type" : "number" + }, + + "maximum" : { + "type" : "number" + }, + + "exclusiveMinimum" : { + "type" : "boolean", + "default" : false + }, + + "exclusiveMaximum" : { + "type" : "boolean", + "default" : false + }, + + "minItems" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "minimum" : 0 + }, + + "uniqueItems" : { + "type" : "boolean", + "default" : false + }, + + "pattern" : { + "type" : "string", + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer" + }, + + "enum" : { + "type" : "array", + "minItems" : 1, + "uniqueItems" : true + }, + + "default" : { + "type" : "any" + }, + + "title" : { + "type" : "string" + }, + + "description" : { + "type" : "string" + }, + + "format" : { + "type" : "string" + }, + + "divisibleBy" : { + "type" : "number", + "minimum" : 0, + "exclusiveMinimum" : true, + "default" : 1 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "uniqueItems" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "id" : { + "type" : "string", + "format" : "uri" + }, + + "$ref" : { + "type" : "string", + "format" : "uri" + }, + + "$schema" : { + "type" : "string", + "format" : "uri" + } + }, + + "dependencies" : { + "exclusiveMinimum" : "minimum", + "exclusiveMaximum" : "maximum" + }, + + "default" : {} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema new file mode 100644 index 00000000000..f96d1ac6a58 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema @@ -0,0 +1,60 @@ +{ + "$schema" : "http://json-schema.org/draft-04/hyper-schema#", + "extends" : {"$ref" : "http://json-schema.org/draft-04/schema#"}, + "id" : "http://json-schema.org/draft-04/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-04/links#"} + }, + + "fragmentResolution" : { + "type" : "string", + "default" : "json-pointer" + }, + + "root" : { + "type" : "boolean", + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "default" : false + }, + + "contentEncoding" : { + "type" : "string" + }, + + "pathStart" : { + "type" : "string", + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "format" : "media-type" + } + }, + + "links" : [ + { + "href" : "{id}", + "rel" : "self" + }, + + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + } + ], + + "fragmentResolution" : "json-pointer" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links new file mode 100644 index 00000000000..de272cc4513 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links @@ -0,0 +1,41 @@ +{ + "$schema" : "http://json-schema.org/draft-04/hyper-schema#", + "id" : "http://json-schema.org/draft-04/links#", + "type" : "object", + + "properties" : { + "rel" : { + "type" : "string" + }, + + "href" : { + "type" : "string" + }, + + "template" : { + "type" : "string" + }, + + "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, + + "method" : { + "type" : "string", + "default" : "GET" + }, + + "enctype" : { + "type" : "string" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} + } + }, + + "required" : ["rel", "href"], + + "dependencies" : { + "enctype" : "method" + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema new file mode 100644 index 00000000000..598951e57d2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema @@ -0,0 +1,189 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema#", + "id" : "http://json-schema.org/draft-04/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : [ + { + "id" : "#simple-type", + "type" : "string", + "enum" : ["object", "array", "string", "number", "boolean", "null", "any"] + }, + "array" + ], + "items" : { + "type" : [ + {"$ref" : "#simple-type"}, + {"$ref" : "#"} + ] + }, + "uniqueItems" : true, + "default" : "any" + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "uniqueItems" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "enum" : { + "type" : "array", + "minItems" : 1, + "uniqueItems" : true + }, + + "minimum" : { + "type" : "number" + }, + + "maximum" : { + "type" : "number" + }, + + "exclusiveMinimum" : { + "type" : "boolean", + "default" : false + }, + + "exclusiveMaximum" : { + "type" : "boolean", + "default" : false + }, + + "divisibleBy" : { + "type" : "number", + "minimum" : 0, + "exclusiveMinimum" : true, + "default" : 1 + }, + + "minLength" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer" + }, + + "pattern" : { + "type" : "string" + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalItems" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "minItems" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "minimum" : 0 + }, + + "uniqueItems" : { + "type" : "boolean", + "default" : false + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "patternProperties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "minProperties" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxProperties" : { + "type" : "integer", + "minimum" : 0 + }, + + "required" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + + "dependencies" : { + "type" : "object", + "additionalProperties" : { + "type" : ["string", "array", {"$ref" : "#"}], + "items" : { + "type" : "string" + } + }, + "default" : {} + }, + + "id" : { + "type" : "string" + }, + + "$ref" : { + "type" : "string" + }, + + "$schema" : { + "type" : "string" + }, + + "title" : { + "type" : "string" + }, + + "description" : { + "type" : "string" + }, + + "default" : { + "type" : "any" + } + }, + + "dependencies" : { + "exclusiveMinimum" : "minimum", + "exclusiveMaximum" : "maximum" + }, + + "default" : {} +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml new file mode 100644 index 00000000000..c28f40dcd6e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml @@ -0,0 +1,1120 @@ + + + + + + + + + + + + + + + +]> + + + + + + + + + A JSON Media Type for Describing the Structure and Meaning of JSON Documents + + + SitePen (USA) +
+ + 530 Lytton Avenue + Palo Alto, CA 94301 + USA + + +1 650 968 8787 + kris@sitepen.com +
+
+ + +
+ + + Calgary, AB + Canada + + gary.court@gmail.com +
+
+ + + Internet Engineering Task Force + JSON + Schema + JavaScript + Object + Notation + Hyper Schema + Hypermedia + + + + JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", + a JSON based format for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + + +
+ + +
+ + JSON (JavaScript Object Notation) Schema is a JSON media type for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + +
+ +
+ + + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be + interpreted as described in RFC 2119. + +
+ + + +
+ + JSON Schema defines the media type "application/schema+json" for + describing the structure of other + JSON documents. JSON Schema is JSON-based and includes facilities + for describing the structure of JSON documents in terms of + allowable values, descriptions, and interpreting relations with other resources. + + + JSON Schema format is organized into several separate definitions. The first + definition is the core schema specification. This definition is primary + concerned with describing a JSON structure and specifying valid elements + in the structure. The second definition is the Hyper Schema specification + which is intended define elements in a structure that can be interpreted as + hyperlinks. + Hyper Schema builds on JSON Schema to describe the hyperlink structure of + other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate + JSON documents based on their schemas. + + + Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on + property values, as well as define the meaning of the property values + for the purpose of describing a resource and determining hyperlinks + within the representation. + +
+ An example JSON Schema that describes products might look like: + + + + + This schema defines the properties of the instance JSON documents, + the required properties (id, name, and price), as well as an optional + property (tags). This also defines the link relations of the instance + JSON documents. + +
+ +
+ + For this specification, schema will be used to denote a JSON Schema + definition, and an instance refers to a JSON value that the schema + will be describing and validating. + +
+ +
+ + The JSON Schema media type does not attempt to dictate the structure of JSON + representations that contain data, but rather provides a separate format + for flexibly communicating how a JSON representation should be + interpreted and validated, such that user agents can properly understand + acceptable structures and extrapolate hyperlink information + with the JSON document. It is acknowledged that JSON documents come + in a variety of structures, and JSON is unique in that the structure + of stored data structures often prescribes a non-ambiguous definite + JSON representation. Attempting to force a specific structure is generally + not viable, and therefore JSON Schema allows for a great flexibility + in the structure of the JSON data that it describes. + + + This specification is protocol agnostic. + The underlying protocol (such as HTTP) should sufficiently define the + semantics of the client-server interface, the retrieval of resource + representations linked to by JSON representations, and modification of + those resources. The goal of this + format is to sufficiently describe JSON structures such that one can + utilize existing information available in existing JSON + representations from a large variety of services that leverage a representational state transfer + architecture using existing protocols. + +
+
+ +
+ + JSON Schema instances are correlated to their schema by the "describedby" + relation, where the schema is defined to be the target of the relation. + Instance representations may be of the "application/json" media type or + any other subtype. Consequently, dictating how an instance + representation should specify the relation to the schema is beyond the normative scope + of this document (since this document specifically defines the JSON + Schema media type, and no other), but it is recommended that instances + specify their schema so that user agents can interpret the instance + representation and messages may retain the self-descriptive + characteristic, avoiding the need for out-of-band information about + instance data. Two approaches are recommended for declaring the + relation to the schema that describes the meaning of a JSON instance's (or collection + of instances) structure. A MIME type parameter named + "profile" or a relation of "describedby" (which could be defined by a Link header) may be used: + +
+ + + +
+ + or if the content is being transferred by a protocol (such as HTTP) that + provides headers, a Link header can be used: + +
+ +; rel="describedby" +]]> + +
+ + Instances MAY specify multiple schemas, to indicate all the schemas that + are applicable to the data, and the data SHOULD be valid by all the schemas. + The instance data MAY have multiple schemas + that it is defined by (the instance data SHOULD be valid for those schemas). + Or if the document is a collection of instances, the collection MAY contain + instances from different schemas. When collections contain heterogeneous + instances, the "pathStart" attribute MAY be specified in the + schema to disambiguate which schema should be applied for each item in the + collection. However, ultimately, the mechanism for referencing a schema is up to the + media type of the instance documents (if they choose to specify that schemas + can be referenced). +
+ +
+ + JSON Schemas can themselves be described using JSON Schemas. + A self-describing JSON Schema for the core JSON Schema can + be found at http://json-schema.org/schema for the latest version or + http://json-schema.org/draft-03/schema for the draft-03 version. The hyper schema + self-description can be found at http://json-schema.org/hyper-schema + or http://json-schema.org/draft-03/hyper-schema. All schemas + used within a protocol with media type definitions + SHOULD include a MIME parameter that refers to the self-descriptive + hyper schema or another schema that extends this hyper schema: + +
+ + + +
+
+
+
+ +
+ + A JSON Schema is a JSON Object that defines various attributes + (including usage and valid values) of a JSON value. JSON + Schema has recursive capabilities; there are a number of elements + in the structure that allow for nested JSON Schemas. + + +
+ An example JSON Schema definition could look like: + + + +
+ + + A JSON Schema object may have any of the following properties, called schema + attributes (all attributes are optional): + + +
+ + This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. + This attribute can take one of two forms: + + + + A string indicating a primitive or simple type. The following are acceptable string values: + + + Value MUST be a string. + Value MUST be a number, floating point numbers are allowed. + Value MUST be an integer, no floating point numbers are allowed. This is a subset of the number type. + Value MUST be a boolean. + Value MUST be an object. + Value MUST be an array. + Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own). + Value MAY be of any type including null. + + + If the property is not defined or is not in this list, then any type of value is acceptable. + Other type values MAY be used for custom purposes, but minimal validators of the specification + implementation can allow any instance value on unknown type values. + + + + An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema. + The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array. + + + + +
+ For example, a schema that defines if an instance can be a string or a number would be: + + +
+
+ +
+ This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order. +
+ +
+ This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. +
+ +
+ This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties. +
+ +
+ This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array. + When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. + When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute using the same rules as "additionalProperties" for objects. +
+ +
+ This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items. +
+ +
+ This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional. +
+ +
+ This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). + + The dependency value can take one of two forms: + + + + If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. + If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. + + + If the dependency value is a schema, then the instance object MUST be valid against the schema. + + + +
+ +
+ This attribute defines the minimum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute defines the maximum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. +
+ +
+ This attribute defines the minimum number of values in an array when the array is the instance value. +
+ +
+ This attribute defines the maximum number of values in an array when the array is the instance value. +
+ +
+ This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). + + Two instance are consider equal if they are both of the same type and: + + + are null; or + are booleans/numbers/strings and have the same value; or + are arrays, contains the same number of items, and each item in the array is equal to the corresponding item in the other array; or + are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. + + +
+ +
+ When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 +
+ +
+ When the instance value is a string, this defines the minimum length of the string. +
+ +
+ When the instance value is a string, this defines the maximum length of the string. +
+ +
+ This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". +
+ +
+ This attribute defines the default value of the instance when the instance is undefined. +
+ +
+ This attribute is a string that provides a short description of the instance property. +
+ +
+ This attribute is a string that provides a full description of the of purpose the instance property. +
+ +
+ This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format. + + + The following formats are predefined: + + + This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp. + This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part. + This SHOULD be a time in the format of hh:mm:ss. It is recommended that you use the "date-time" format instead of "time" unless you need to transfer only the time part. + This SHOULD be the difference, measured in milliseconds, between the specified time and midnight, 00:00 of January 1, 1970 UTC. The value SHOULD be a number (integer or float). + A regular expression, following the regular expression specification from ECMA 262/Perl 5. + This is a CSS color (like "#FF0000" or "red"), based on CSS 2.1. + This is a CSS style definition (like "color: red; background-color:#FFF"), based on CSS 2.1. + This SHOULD be a phone number (format MAY follow E.123). + This value SHOULD be a URI. + This SHOULD be an email address. + This SHOULD be an ip version 4 address. + This SHOULD be an ip version 6 address. + This SHOULD be a host-name. + + + + Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format. +
+ +
+ This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. +
+ +
+ This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. +
+ +
+ The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. + + Conceptually, the behavior of extends can be seen as validating an + instance against all constraints in the extending schema as well as + the extended schema(s). More optimized implementations that merge + schemas are possible, but are not required. Some examples of using "extends": + +
+ + + +
+ +
+ + + +
+
+
+ +
+ + This attribute defines the current URI of this schema (this attribute is + effectively a "self" link). This URI MAY be relative or absolute. If + the URI is relative it is resolved against the current URI of the parent + schema it is contained in. If this schema is not contained in any + parent schema, the current URI of the parent schema is held to be the + URI under which this schema was addressed. If id is missing, the current URI of a schema is + defined to be that of the parent schema. The current URI of the schema + is also used to construct relative references such as for $ref. + +
+ +
+ + This attribute defines a URI of a schema that contains the full representation of this schema. + When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. + This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. + +
+ +
+ + This attribute defines a URI of a JSON Schema that is the schema of the current schema. + When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. + + + + A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. + Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. + +
+
+ +
+ + The following attributes are specified in addition to those + attributes that already provided by the core schema with the specific + purpose of informing user agents of relations between resources based + on JSON data. Just as with JSON + schema attributes, all the attributes in hyper schemas are optional. + Therefore, an empty object is a valid (non-informative) schema, and + essentially describes plain JSON (no constraints on the structures). + Addition of attributes provides additive information for user agents. + + +
+ + The value of the links property MUST be an array, where each item + in the array is a link description object which describes the link + relations of the instances. + + +
+ + A link description object is used to describe link relations. In + the context of a schema, it defines the link relations of the + instances of the schema, and can be parameterized by the instance + values. The link description format can be used on its own in + regular (non-schema documents), and use of this format can + be declared by referencing the normative link description + schema as the the schema for the data structure that uses the + links. The URI of the normative link description schema is: + http://json-schema.org/links (latest version) or + http://json-schema.org/draft-03/links (draft-03 version). + + +
+ + The value of the "href" link description property + indicates the target URI of the related resource. The value + of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 + and MAY be a relative URI. The base URI to be used for relative resolution + SHOULD be the URI used to retrieve the instance object (not the schema) + when used within a schema. Also, when links are used within a schema, the URI + SHOULD be parametrized by the property values of the instance + object, if property values exist for the corresponding variables + in the template (otherwise they MAY be provided from alternate sources, like user input). + + + + Instance property values SHOULD be substituted into the URIs where + matching braces ('{', '}') are found surrounding zero or more characters, + creating an expanded URI. Instance property value substitutions are resolved + by using the text between the braces to denote the property name + from the instance to get the value to substitute. + +
+ For example, if an href value is defined: + + + + Then it would be resolved by replace the value of the "id" property value from the instance object. +
+ +
+ If the value of the "id" property was "45", the expanded URI would be: + + + +
+ + If matching braces are found with the string "@" (no quotes) between the braces, then the + actual instance value SHOULD be used to replace the braces, rather than a property value. + This should only be used in situations where the instance is a scalar (string, + boolean, or number), and not for objects or arrays. +
+
+ +
+ + The value of the "rel" property indicates the name of the + relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. + + + + Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: + + + + If the relation value is "self", when this property is encountered in + the instance object, the object represents a resource and the instance object is + treated as a full representation of the target resource identified by + the specified URI. + + + + This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. + + + + This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. + + + + This relation indicates that the target of the link + SHOULD be treated as the root or the body of the representation for the + purposes of user agent interaction or fragment resolution. All other + properties of the instance objects can be regarded as meta-data + descriptions for the data. + + + + + + The following relations are applicable for schemas (the schema as the "from" resource in the relation): + + + This indicates the target resource that represents collection of instances of a schema. + This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). + + + + +
+ For example, if a schema is defined: + + + +
+ +
+ And if a collection of instance resource's JSON representation was retrieved: + + + +
+ + This would indicate that for the first item in the collection, its own + (self) URI would resolve to "/Resource/thing" and the first item's "up" + relation SHOULD be resolved to the resource at "/Resource/parent". + The "children" collection would be located at "/Resource/?upId=thing". +
+
+ +
+ This property value is a schema that defines the expected structure of the JSON representation of the target of the link. +
+ +
+ + The following properties also apply to link definition objects, and + provide functionality analogous to HTML forms, in providing a + means for submitting extra (often user supplied) information to send to a server. + + +
+ + This attribute defines which method can be used to access the target resource. + In an HTTP environment, this would be "GET" or "POST" (other HTTP methods + such as "PUT" and "DELETE" have semantics that are clearly implied by + accessed resources, and do not need to be defined here). + This defaults to "GET". + +
+ +
+ + If present, this property indicates a query media type format that the server + supports for querying or posting to the collection of instances at the target + resource. The query can be + suffixed to the target URI to query the collection with + property-based constraints on the resources that SHOULD be returned from + the server or used to post data to the resource (depending on the method). + +
+ For example, with the following schema: + + + + This indicates that the client can query the server for instances that have a specific name. +
+ +
+ For example: + + + +
+ + If no enctype or method is specified, only the single URI specified by + the href property is defined. If the method is POST, "application/json" is + the default media type. +
+
+ +
+ + This attribute contains a schema which defines the acceptable structure of the submitted + request (for a GET request, this schema would define the properties for the query string + and for a POST request, this would define the body). + +
+
+
+
+ +
+ + This property indicates the fragment resolution protocol to use for + resolving fragment identifiers in URIs within the instance + representations. This applies to the instance object URIs and all + children of the instance object's URIs. The default fragment resolution + protocol is "slash-delimited", which is defined below. Other fragment + resolution protocols MAY be used, but are not defined in this document. + + + + The fragment identifier is based on RFC 2396, Sec 5, and defines the + mechanism for resolving references to entities within a document. + + +
+ + With the slash-delimited fragment resolution protocol, the fragment + identifier is interpreted as a series of property reference tokens that start with and + are delimited by the "/" character (\x2F). Each property reference token + is a series of unreserved or escaped URI characters. Each property + reference token SHOULD be interpreted, starting from the beginning of + the fragment identifier, as a path reference in the target JSON + structure. The final target value of the fragment can be determined by + starting with the root of the JSON structure from the representation of + the resource identified by the pre-fragment URI. If the target is a JSON + object, then the new target is the value of the property with the name + identified by the next property reference token in the fragment. If the + target is a JSON array, then the target is determined by finding the + item in array the array with the index defined by the next property + reference token (which MUST be a number). The target is successively + updated for each property reference token, until the entire fragment has + been traversed. + + + + Property names SHOULD be URI-encoded. In particular, any "/" in a + property name MUST be encoded to avoid being interpreted as a property + delimiter. + + + +
+ For example, for the following JSON representation: + + + +
+ +
+ The following fragment identifiers would be resolved: + + + +
+
+
+ +
+ + The dot-delimited fragment resolution protocol is the same as + slash-delimited fragment resolution protocol except that the "." character + (\x2E) is used as the delimiter between property names (instead of "/") and + the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment + identifiers for referencing the value of the foo propery. + +
+
+ +
+ This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. +
+ +
+ If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. +
+ +
+ + This attribute is a URI that defines what the instance's URI MUST start with in order to validate. + The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, + and is relative to the instance's URI. + + + + When multiple schemas have been referenced for an instance, the user agent + can determine if this schema is applicable for a particular instance by + determining if the URI of the instance begins with the the value of the "pathStart" + attribute. If the URI of the instance does not start with this URI, + or if another schema specifies a starting URI that is longer and also matches the + instance, this schema SHOULD NOT be applied to the instance. Any schema + that does not have a pathStart attribute SHOULD be considered applicable + to all the instances for which it is referenced. + +
+ +
+ This attribute defines the media type of the instance representations that this schema is defining. +
+
+ +
+ + This specification is a sub-type of the JSON format, and + consequently the security considerations are generally the same as RFC 4627. + However, an additional issue is that when link relation of "self" + is used to denote a full representation of an object, the user agent + SHOULD NOT consider the representation to be the authoritative representation + of the resource denoted by the target URI if the target URI is not + equivalent to or a sub-path of the the URI used to request the resource + representation which contains the target URI with the "self" link. + +
+ For example, if a hyper schema was defined: + + + +
+ +
+ And a resource was requested from somesite.com: + + + +
+ +
+ With a response of: + + + +
+
+
+ +
+ The proposed MIME media type for JSON Schema is "application/schema+json". + Type name: application + Subtype name: schema+json + Required parameters: profile + + The value of the profile parameter SHOULD be a URI (relative or absolute) that + refers to the schema used to define the structure of this structure (the + meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema, + but it is allowable to use other schemas that extend the hyper schema's meta- + schema. + + Optional parameters: pretty + The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. + +
+ + This registry is maintained by IANA per RFC 4287 and this specification adds + four values: "full", "create", "instances", "root". New + assignments are subject to IESG Approval, as outlined in RFC 5226. + Requests should be made by email to IANA, which will then forward the + request to the IESG, requesting approval. + +
+
+
+ + + + + &rfc2045; + &rfc2119; + &rfc2396; + &rfc3339; + &rfc3986; + &rfc4287; + + + &rfc2616; + &rfc4627; + &rfc5226; + &iddiscovery; + &uritemplate; + &linkheader; + &html401; + &css21; + + +
+ + + + + Added example and verbiage to "extends" attribute. + Defined slash-delimited to use a leading slash. + Made "root" a relation instead of an attribute. + Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). + Added more explanation of nullability. + Removed "alternate" attribute. + Upper cased many normative usages of must, may, and should. + Replaced the link submission "properties" attribute to "schema" attribute. + Replaced "optional" attribute with "required" attribute. + Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. + Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. + Replaced "requires" attribute with "dependencies" attribute. + Moved "contentEncoding" attribute to hyper schema. + Added "additionalItems" attribute. + Added "id" attribute. + Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. + Added "patternProperties" attribute. + Schema URIs are now namespace versioned. + Added "$ref" and "$schema" attributes. + + + + + + Replaced "maxDecimal" attribute with "divisibleBy" attribute. + Added slash-delimited fragment resolution protocol and made it the default. + Added language about using links outside of schemas by referencing its normative URI. + Added "uniqueItems" attribute. + Added "targetSchema" attribute to link description object. + + + + + + Fixed category and updates from template. + + + + + + Initial draft. + + + + +
+ +
+ + + Should we give a preference to MIME headers over Link headers (or only use one)? + Should "root" be a MIME parameter? + Should "format" be renamed to "mediaType" or "contentType" to reflect the usage MIME media types that are allowed? + How should dates be handled? + + +
+
+
diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml new file mode 100644 index 00000000000..f9c1ea5a0c0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml @@ -0,0 +1,1072 @@ + + + + + + + + + + + + + + +]> + + + + + + + + + A JSON Media Type for Describing the Structure and Meaning of JSON Documents + + + SitePen (USA) +
+ + 530 Lytton Avenue + Palo Alto, CA 94301 + USA + + +1 650 968 8787 + kris@sitepen.com +
+
+ + +
+ + + Calgary, AB + Canada + + gary.court@gmail.com +
+
+ + + Internet Engineering Task Force + JSON + Schema + JavaScript + Object + Notation + Hyper Schema + Hypermedia + + + + JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", + a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + + +
+ + +
+ + JSON (JavaScript Object Notation) Schema is a JSON media type for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + +
+ +
+ + + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be + interpreted as described in RFC 2119. + + + + The terms "JSON", "JSON text", "JSON value", "member", "element", "object", + "array", "number", "string", "boolean", "true", "false", and "null" in this + document are to be interpreted as defined in RFC 4627. + + + + This specification also uses the following defined terms: + + + A JSON Schema object. + Equivalent to "JSON value" as defined in RFC 4627. + Equivalent to "member" as defined in RFC 4627. + Equivalent to "element" as defined in RFC 4627. + A property of a JSON Schema object. + + +
+ +
+ + JSON Schema defines the media type "application/schema+json" for + describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities + for describing the structure of JSON in terms of + allowable values, descriptions, and interpreting relations with other resources. + + + This document is organized into several separate definitions. The first + definition is the core schema specification. This definition is primary + concerned with describing a JSON structure and specifying valid elements + in the structure. The second definition is the Hyper Schema specification + which is intended to define elements in a structure that can be interpreted as + hyperlinks. + Hyper Schema builds on JSON Schema to describe the hyperlink structure of + JSON values. This allows user agents to be able to successfully navigate + documents containing JSON based on their schemas. + + + Cumulatively JSON Schema acts as meta-JSON that can be used to define the + required type and constraints on JSON values, as well as define the meaning + of the JSON values for the purpose of describing a resource and determining + hyperlinks within the representation. + +
+ An example JSON Schema that describes products might look like: + + + + + This schema defines the properties of the instance, + the required properties (id, name, and price), as well as an optional + property (tags). This also defines the link relations of the instance. + +
+ +
+ + The JSON Schema media type does not attempt to dictate the structure of JSON + values that contain data, but rather provides a separate format + for flexibly communicating how a JSON value should be + interpreted and validated, such that user agents can properly understand + acceptable structures and extrapolate hyperlink information + from the JSON. It is acknowledged that JSON values come + in a variety of structures, and JSON is unique in that the structure + of stored data structures often prescribes a non-ambiguous definite + JSON representation. Attempting to force a specific structure is generally + not viable, and therefore JSON Schema allows for a great flexibility + in the structure of the JSON data that it describes. + + + This specification is protocol agnostic. + The underlying protocol (such as HTTP) should sufficiently define the + semantics of the client-server interface, the retrieval of resource + representations linked to by JSON representations, and modification of + those resources. The goal of this + format is to sufficiently describe JSON structures such that one can + utilize existing information available in existing JSON + representations from a large variety of services that leverage a representational state transfer + architecture using existing protocols. + +
+
+ +
+ + JSON values are correlated to their schema by the "describedby" + relation, where the schema is the target of the relation. + JSON values MUST be of the "application/json" media type or + any other subtype. Consequently, dictating how a JSON value should + specify the relation to the schema is beyond the normative scope + of this document since this document specifically defines the JSON + Schema media type, and no other. It is RECOMMNENDED that JSON values + specify their schema so that user agents can interpret the instance + and retain the self-descriptive characteristics. This avoides the need for out-of-band information about + instance data. Two approaches are recommended for declaring the + relation to the schema that describes the meaning of a JSON instance's (or collection + of instances) structure. A MIME type parameter named + "profile" or a relation of "describedby" (which could be specified by a Link header) may be used: + +
+ + + +
+ + or if the content is being transferred by a protocol (such as HTTP) that + provides headers, a Link header can be used: + +
+ +; rel="describedby" +]]> + +
+ + Instances MAY specify multiple schemas, to indicate all the schemas that + are applicable to the data, and the data SHOULD be valid by all the schemas. + The instance data MAY have multiple schemas + that it is described by (the instance data SHOULD be valid for those schemas). + Or if the document is a collection of instances, the collection MAY contain + instances from different schemas. The mechanism for referencing a schema is + determined by the media type of the instance (if it provides a method for + referencing schemas). +
+ +
+ + JSON Schemas can themselves be described using JSON Schemas. + A self-describing JSON Schema for the core JSON Schema can + be found at http://json-schema.org/schema for the latest version or + http://json-schema.org/draft-04/schema for the draft-04 version. The hyper schema + self-description can be found at http://json-schema.org/hyper-schema + or http://json-schema.org/draft-04/hyper-schema. All schemas + used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive + hyper schema or another schema that extends this hyper schema: + +
+ + + +
+
+
+
+ +
+ + A JSON Schema is a JSON object that defines various attributes + (including usage and valid values) of a JSON value. JSON + Schema has recursive capabilities; there are a number of elements + in the structure that allow for nested JSON Schemas. + + +
+ An example JSON Schema could look like: + + + +
+ + + A JSON Schema object MAY have any of the following optional properties: + + + + + +
+ + This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. + This attribute can take one of two forms: + + + + A string indicating a primitive or simple type. The string MUST be one of the following values: + + + Instance MUST be an object. + Instance MUST be an array. + Instance MUST be a string. + Instance MUST be a number, including floating point numbers. + Instance MUST be the JSON literal "true" or "false". + Instance MUST be the JSON literal "null". Note that without this type, null values are not allowed. + Instance MAY be of any type, including null. + + + + + An array of one or more simple or schema types. + The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array. + + + + If this attribute is not specified, then all value types are accepted. + + +
+ For example, a schema that defines if an instance can be a string or a number would be: + + +
+
+ +
+ + This attribute is an object with properties that specify the schemas for the properties of the instance object. + In this attribute's object, each property value MUST be a schema. + When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute. + Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success. + +
+ +
+ + This attribute is an object that defines the schema for a set of property names of an object instance. + The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. + If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. + +
+ +
+ This attribute specifies how any instance property that is not explicitly defined by either the "properties" or "patternProperties" attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean. + If a schema is provided, then all additional properties MUST be valid according to the schema. + If false is provided, then no additional properties are allowed. + The default value is an empty schema, which allows any value for additional properties. +
+ +
+ This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas. + When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. + When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute the same way as "additionalProperties" for objects is. +
+ +
+ This attribute specifies how any item in the array instance that is not explicitly defined by "items" (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean. + If a schema is provided: + + If the "items" attribute is unspecified, then all items in the array instance must be valid against this schema. + If the "items" attribute is a schema, then this attribute is ignored. + If the "items" attribute is an array (during tuple typing), then any additional items MUST be valid against this schema. + + + If false is provided, then any additional items in the array are not allowed. + The default value is an empty schema, which allows any value for additional items. +
+ +
+ This attribute is an array of strings that defines all the property names that must exist on the object instance. +
+ +
+ This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). + + The dependency value can take one of two forms: + + + + If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. + If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. + + + If the dependency value is a schema, then the instance object MUST be valid against the schema. + + + +
+ +
+ This attribute defines the minimum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute defines the maximum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. +
+ +
+ This attribute defines the minimum number of values in an array when the array is the instance value. +
+ +
+ This attribute defines the maximum number of values in an array when the array is the instance value. +
+ +
+ This attribute defines the minimum number of properties required on an object instance. +
+ +
+ This attribute defines the maximum number of properties the object instance can have. +
+ +
+ This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). + + Two instance are consider equal if they are both of the same type and: + + + are null; or + are booleans/numbers/strings and have the same value; or + are arrays, contains the same number of items, and each item in the array is equal to the item at the corresponding index in the other array; or + are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. + + +
+ +
+ When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 +
+ +
+ When the instance value is a string, this defines the minimum length of the string. +
+ +
+ When the instance value is a string, this defines the maximum length of the string. +
+ +
+ This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". +
+ +
+ This attribute defines the default value of the instance when the instance is undefined. +
+ +
+ This attribute is a string that provides a short description of the instance property. +
+ +
+ This attribute is a string that provides a full description of the of purpose the instance property. +
+ +
+ This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. +
+ +
+ This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. +
+ +
+ The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. + + Conceptually, the behavior of extends can be seen as validating an + instance against all constraints in the extending schema as well as + the extended schema(s). More optimized implementations that merge + schemas are possible, but are not required. Some examples of using "extends": + +
+ + + +
+ +
+ + + +
+
+
+ +
+ + This attribute defines the current URI of this schema (this attribute is + effectively a "self" link). This URI MAY be relative or absolute. If + the URI is relative it is resolved against the current URI of the parent + schema it is contained in. If this schema is not contained in any + parent schema, the current URI of the parent schema is held to be the + URI under which this schema was addressed. If id is missing, the current URI of a schema is + defined to be that of the parent schema. The current URI of the schema + is also used to construct relative references such as for $ref. + +
+ +
+ + This attribute defines a URI of a schema that contains the full representation of this schema. + When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. + This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. + +
+ +
+ + This attribute defines a URI of a JSON Schema that is the schema of the current schema. + When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. + + + + A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. + Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. + +
+
+ +
+ + The following attributes are specified in addition to those + attributes that already provided by the core schema with the specific + purpose of informing user agents of relations between resources based + on JSON data. Just as with JSON + schema attributes, all the attributes in hyper schemas are optional. + Therefore, an empty object is a valid (non-informative) schema, and + essentially describes plain JSON (no constraints on the structures). + Addition of attributes provides additive information for user agents. + + +
+ + The value of the links property MUST be an array, where each item + in the array is a link description object which describes the link + relations of the instances. + + + + +
+ + A link description object is used to describe link relations. In + the context of a schema, it defines the link relations of the + instances of the schema, and can be parameterized by the instance + values. The link description format can be used without JSON Schema, + and use of this format can + be declared by referencing the normative link description + schema as the the schema for the data structure that uses the + links. The URI of the normative link description schema is: + http://json-schema.org/links (latest version) or + http://json-schema.org/draft-04/links (draft-04 version). + + +
+ + The value of the "href" link description property + indicates the target URI of the related resource. The value + of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 + and MAY be a relative URI. The base URI to be used for relative resolution + SHOULD be the URI used to retrieve the instance object (not the schema) + when used within a schema. Also, when links are used within a schema, the URI + SHOULD be parametrized by the property values of the instance + object, if property values exist for the corresponding variables + in the template (otherwise they MAY be provided from alternate sources, like user input). + + + + Instance property values SHOULD be substituted into the URIs where + matching braces ('{', '}') are found surrounding zero or more characters, + creating an expanded URI. Instance property value substitutions are resolved + by using the text between the braces to denote the property name + from the instance to get the value to substitute. + +
+ For example, if an href value is defined: + + + + Then it would be resolved by replace the value of the "id" property value from the instance object. +
+ +
+ If the value of the "id" property was "45", the expanded URI would be: + + + +
+ + If matching braces are found with the string "@" (no quotes) between the braces, then the + actual instance value SHOULD be used to replace the braces, rather than a property value. + This should only be used in situations where the instance is a scalar (string, + boolean, or number), and not for objects or arrays. +
+
+ +
+ + The value of the "rel" property indicates the name of the + relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. + + + + Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: + + + + If the relation value is "self", when this property is encountered in + the instance object, the object represents a resource and the instance object is + treated as a full representation of the target resource identified by + the specified URI. + + + + This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. + + + + This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. + + + + This relation indicates that the target of the link + SHOULD be treated as the root or the body of the representation for the + purposes of user agent interaction or fragment resolution. All other + properties of the instance objects can be regarded as meta-data + descriptions for the data. + + + + + + The following relations are applicable for schemas (the schema as the "from" resource in the relation): + + + This indicates the target resource that represents collection of instances of a schema. + This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). + + + + +
+ For example, if a schema is defined: + + + +
+ +
+ And if a collection of instance resource's JSON representation was retrieved: + + + +
+ + This would indicate that for the first item in the collection, its own + (self) URI would resolve to "/Resource/thing" and the first item's "up" + relation SHOULD be resolved to the resource at "/Resource/parent". + The "children" collection would be located at "/Resource/?upId=thing". +
+
+ +
+ This property value is a string that defines the templating language used in the "href" attribute. If no templating language is defined, then the default Link Description Object templating langauge is used. +
+ +
+ This property value is a schema that defines the expected structure of the JSON representation of the target of the link. +
+ +
+ + The following properties also apply to link definition objects, and + provide functionality analogous to HTML forms, in providing a + means for submitting extra (often user supplied) information to send to a server. + + +
+ + This attribute defines which method can be used to access the target resource. + In an HTTP environment, this would be "GET" or "POST" (other HTTP methods + such as "PUT" and "DELETE" have semantics that are clearly implied by + accessed resources, and do not need to be defined here). + This defaults to "GET". + +
+ +
+ + If present, this property indicates a query media type format that the server + supports for querying or posting to the collection of instances at the target + resource. The query can be + suffixed to the target URI to query the collection with + property-based constraints on the resources that SHOULD be returned from + the server or used to post data to the resource (depending on the method). + +
+ For example, with the following schema: + + + + This indicates that the client can query the server for instances that have a specific name. +
+ +
+ For example: + + + +
+ + If no enctype or method is specified, only the single URI specified by + the href property is defined. If the method is POST, "application/json" is + the default media type. +
+
+ +
+ + This attribute contains a schema which defines the acceptable structure of the submitted + request (for a GET request, this schema would define the properties for the query string + and for a POST request, this would define the body). + +
+
+
+
+ +
+ + This property indicates the fragment resolution protocol to use for + resolving fragment identifiers in URIs within the instance + representations. This applies to the instance object URIs and all + children of the instance object's URIs. The default fragment resolution + protocol is "json-pointer", which is defined below. Other fragment + resolution protocols MAY be used, but are not defined in this document. + + + + The fragment identifier is based on RFC 3986, Sec 5, and defines the + mechanism for resolving references to entities within a document. + + +
+ The "json-pointer" fragment resolution protocol uses a JSON Pointer to resolve fragment identifiers in URIs within instance representations. +
+
+ + + +
+ This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. +
+ +
+ If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. +
+ +
+ + This attribute is a URI that defines what the instance's URI MUST start with in order to validate. + The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, + and is relative to the instance's URI. + + + + When multiple schemas have been referenced for an instance, the user agent + can determine if this schema is applicable for a particular instance by + determining if the URI of the instance begins with the the value of the "pathStart" + attribute. If the URI of the instance does not start with this URI, + or if another schema specifies a starting URI that is longer and also matches the + instance, this schema SHOULD NOT be applied to the instance. Any schema + that does not have a pathStart attribute SHOULD be considered applicable + to all the instances for which it is referenced. + +
+ +
+ This attribute defines the media type of the instance representations that this schema is defining. +
+
+ +
+ + This specification is a sub-type of the JSON format, and + consequently the security considerations are generally the same as RFC 4627. + However, an additional issue is that when link relation of "self" + is used to denote a full representation of an object, the user agent + SHOULD NOT consider the representation to be the authoritative representation + of the resource denoted by the target URI if the target URI is not + equivalent to or a sub-path of the the URI used to request the resource + representation which contains the target URI with the "self" link. + +
+ For example, if a hyper schema was defined: + + + +
+ +
+ And a resource was requested from somesite.com: + + + +
+ +
+ With a response of: + + + +
+
+
+ +
+ The proposed MIME media type for JSON Schema is "application/schema+json". + Type name: application + Subtype name: schema+json + Required parameters: profile + + The value of the profile parameter SHOULD be a URI (relative or absolute) that + refers to the schema used to define the structure of this structure (the + meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema, + but it is allowable to use other schemas that extend the hyper schema's meta- + schema. + + Optional parameters: pretty + The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. + +
+ + This registry is maintained by IANA per RFC 4287 and this specification adds + four values: "full", "create", "instances", "root". New + assignments are subject to IESG Approval, as outlined in RFC 5226. + Requests should be made by email to IANA, which will then forward the + request to the IESG, requesting approval. + +
+
+
+ + + + + &rfc2045; + &rfc2119; + &rfc3339; + &rfc3986; + &rfc4287; + + + JSON Pointer + + ForgeRock US, Inc. + + + SitePen (USA) + + + + + + + &rfc2616; + &rfc4627; + &rfc5226; + &iddiscovery; + &uritemplate; + &linkheader; + &html401; + &css21; + + +
+ + + + + Changed "required" attribute to an array of strings. + Removed "format" attribute. + Added "minProperties" and "maxProperties" attributes. + Replaced "slash-delimited" fragment resolution with "json-pointer". + Added "template" LDO attribute. + Removed irrelevant "Open Issues" section. + Merged Conventions and Terminology sections. + Defined terms used in specification. + Removed "integer" type in favor of {"type":"number", "divisibleBy":1}. + Restricted "type" to only the core JSON types. + Improved wording of many sections. + + + + + + Added example and verbiage to "extends" attribute. + Defined slash-delimited to use a leading slash. + Made "root" a relation instead of an attribute. + Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). + Added more explanation of nullability. + Removed "alternate" attribute. + Upper cased many normative usages of must, may, and should. + Replaced the link submission "properties" attribute to "schema" attribute. + Replaced "optional" attribute with "required" attribute. + Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. + Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. + Replaced "requires" attribute with "dependencies" attribute. + Moved "contentEncoding" attribute to hyper schema. + Added "additionalItems" attribute. + Added "id" attribute. + Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. + Added "patternProperties" attribute. + Schema URIs are now namespace versioned. + Added "$ref" and "$schema" attributes. + + + + + + Replaced "maxDecimal" attribute with "divisibleBy" attribute. + Added slash-delimited fragment resolution protocol and made it the default. + Added language about using links outside of schemas by referencing its normative URI. + Added "uniqueItems" attribute. + Added "targetSchema" attribute to link description object. + + + + + + Fixed category and updates from template. + + + + + + Initial draft. + + + + +
+
+
diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js new file mode 100644 index 00000000000..5b1bbbfdd61 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js @@ -0,0 +1,52 @@ +/** + * JSON Schema link handler + * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) + * Licensed under the MIT (MIT-LICENSE.txt) license. + */ +({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}). +define([], function(){ +var exports = {}; +exports.cacheLinks = true; +exports.getLink = function(relation, instance, schema){ + // gets the URI of the link for the given relation based on the instance and schema + // for example: + // getLink( + // "brother", + // {"brother_id":33}, + // {links:[{rel:"brother", href:"Brother/{brother_id}"}]}) -> + // "Brother/33" + var links = schema.__linkTemplates; + if(!links){ + links = {}; + var schemaLinks = schema.links; + if(schemaLinks && schemaLinks instanceof Array){ + schemaLinks.forEach(function(link){ + /* // TODO: allow for multiple same-name relations + if(links[link.rel]){ + if(!(links[link.rel] instanceof Array)){ + links[link.rel] = [links[link.rel]]; + } + }*/ + links[link.rel] = link.href; + }); + } + if(exports.cacheLinks){ + schema.__linkTemplates = links; + } + } + var linkTemplate = links[relation]; + return linkTemplate && exports.substitute(linkTemplate, instance); +}; + +exports.substitute = function(linkTemplate, instance){ + return linkTemplate.replace(/\{([^\}]*)\}/g, function(t, property){ + var value = instance[decodeURIComponent(property)]; + if(value instanceof Array){ + // the value is an array, it should produce a URI like /Table/(4,5,8) and store.get() should handle that as an array of values + return '(' + value.join(',') + ')'; + } + return value; + }); +}; +return exports; +}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js new file mode 100644 index 00000000000..97cbbf6fa34 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js @@ -0,0 +1,260 @@ +/** + * JSONSchema Validator - Validates JavaScript objects using JSON Schemas + * (http://www.json.com/json-schema-proposal/) + * + * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) + * Licensed under the MIT (MIT-LICENSE.txt) license. +To use the validator call the validate function with an instance object and an optional schema object. +If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), +that schema will be used to validate and the schema parameter is not necessary (if both exist, +both validations will occur). +The validate method will return an array of validation errors. If there are no errors, then an +empty list will be returned. A validation error will have two properties: +"property" which indicates which property had the error +"message" which indicates what the error was + */ +({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}). +define([], function(){ +var exports = validate; +// setup primitive classes to be JSON Schema types +exports.Integer = {type:"integer"}; +var primitiveConstructors = { + String: String, + Boolean: Boolean, + Number: Number, + Object: Object, + Array: Array, + Date: Date +} +exports.validate = validate; +function validate(/*Any*/instance,/*Object*/schema) { + // Summary: + // To use the validator call JSONSchema.validate with an instance object and an optional schema object. + // If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), + // that schema will be used to validate and the schema parameter is not necessary (if both exist, + // both validations will occur). + // The validate method will return an object with two properties: + // valid: A boolean indicating if the instance is valid by the schema + // errors: An array of validation errors. If there are no errors, then an + // empty list will be returned. A validation error will have two properties: + // property: which indicates which property had the error + // message: which indicates what the error was + // + return validate(instance, schema, {changing: false});//, coerce: false, existingOnly: false}); + }; +exports.checkPropertyChange = function(/*Any*/value,/*Object*/schema, /*String*/property) { + // Summary: + // The checkPropertyChange method will check to see if an value can legally be in property with the given schema + // This is slightly different than the validate method in that it will fail if the schema is readonly and it will + // not check for self-validation, it is assumed that the passed in value is already internally valid. + // The checkPropertyChange method will return the same object type as validate, see JSONSchema.validate for + // information. + // + return validate(value, schema, {changing: property || "property"}); + }; +var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*Object*/options) { + + if (!options) options = {}; + var _changing = options.changing; + + function getType(schema){ + return schema.type || (primitiveConstructors[schema.name] == schema && schema.name.toLowerCase()); + } + var errors = []; + // validate a value against a property definition + function checkProp(value, schema, path,i){ + + var l; + path += path ? typeof i == 'number' ? '[' + i + ']' : typeof i == 'undefined' ? '' : '.' + i : i; + function addError(message){ + errors.push({property:path,message:message}); + } + + if((typeof schema != 'object' || schema instanceof Array) && (path || typeof schema != 'function') && !(schema && getType(schema))){ + if(typeof schema == 'function'){ + if(!(value instanceof schema)){ + addError("is not an instance of the class/constructor " + schema.name); + } + }else if(schema){ + addError("Invalid schema/property definition " + schema); + } + return null; + } + if(_changing && schema.readonly){ + addError("is a readonly field, it can not be changed"); + } + if(schema['extends']){ // if it extends another schema, it must pass that schema as well + checkProp(value,schema['extends'],path,i); + } + // validate a value against a type definition + function checkType(type,value){ + if(type){ + if(typeof type == 'string' && type != 'any' && + (type == 'null' ? value !== null : typeof value != type) && + !(value instanceof Array && type == 'array') && + !(value instanceof Date && type == 'date') && + !(type == 'integer' && value%1===0)){ + return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}]; + } + if(type instanceof Array){ + var unionErrors=[]; + for(var j = 0; j < type.length; j++){ // a union type + if(!(unionErrors=checkType(type[j],value)).length){ + break; + } + } + if(unionErrors.length){ + return unionErrors; + } + }else if(typeof type == 'object'){ + var priorErrors = errors; + errors = []; + checkProp(value,type,path); + var theseErrors = errors; + errors = priorErrors; + return theseErrors; + } + } + return []; + } + if(value === undefined){ + if(schema.required){ + addError("is missing and it is required"); + } + }else{ + errors = errors.concat(checkType(getType(schema),value)); + if(schema.disallow && !checkType(schema.disallow,value).length){ + addError(" disallowed value was matched"); + } + if(value !== null){ + if(value instanceof Array){ + if(schema.items){ + var itemsIsArray = schema.items instanceof Array; + var propDef = schema.items; + for (i = 0, l = value.length; i < l; i += 1) { + if (itemsIsArray) + propDef = schema.items[i]; + if (options.coerce) + value[i] = options.coerce(value[i], propDef); + errors.concat(checkProp(value[i],propDef,path,i)); + } + } + if(schema.minItems && value.length < schema.minItems){ + addError("There must be a minimum of " + schema.minItems + " in the array"); + } + if(schema.maxItems && value.length > schema.maxItems){ + addError("There must be a maximum of " + schema.maxItems + " in the array"); + } + }else if(schema.properties || schema.additionalProperties){ + errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties)); + } + if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){ + addError("does not match the regex pattern " + schema.pattern); + } + if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){ + addError("may only be " + schema.maxLength + " characters long"); + } + if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){ + addError("must be at least " + schema.minLength + " characters long"); + } + if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum && + schema.minimum > value){ + addError("must have a minimum value of " + schema.minimum); + } + if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum && + schema.maximum < value){ + addError("must have a maximum value of " + schema.maximum); + } + if(schema['enum']){ + var enumer = schema['enum']; + l = enumer.length; + var found; + for(var j = 0; j < l; j++){ + if(enumer[j]===value){ + found=1; + break; + } + } + if(!found){ + addError("does not have a value in the enumeration " + enumer.join(", ")); + } + } + if(typeof schema.maxDecimal == 'number' && + (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){ + addError("may only have " + schema.maxDecimal + " digits of decimal places"); + } + } + } + return null; + } + // validate an object against a schema + function checkObj(instance,objTypeDef,path,additionalProp){ + + if(typeof objTypeDef =='object'){ + if(typeof instance != 'object' || instance instanceof Array){ + errors.push({property:path,message:"an object is required"}); + } + + for(var i in objTypeDef){ + if(objTypeDef.hasOwnProperty(i)){ + var value = instance[i]; + // skip _not_ specified properties + if (value === undefined && options.existingOnly) continue; + var propDef = objTypeDef[i]; + // set default + if(value === undefined && propDef["default"]){ + value = instance[i] = propDef["default"]; + } + if(options.coerce && i in instance){ + value = instance[i] = options.coerce(value, propDef); + } + checkProp(value,propDef,path,i); + } + } + } + for(i in instance){ + if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){ + if (options.filter) { + delete instance[i]; + continue; + } else { + errors.push({property:path,message:(typeof value) + "The property " + i + + " is not defined in the schema and the schema does not allow additional properties"}); + } + } + var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires; + if(requires && !(requires in instance)){ + errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"}); + } + value = instance[i]; + if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){ + if(options.coerce){ + value = instance[i] = options.coerce(value, additionalProp); + } + checkProp(value,additionalProp,path,i); + } + if(!_changing && value && value.$schema){ + errors = errors.concat(checkProp(value,value.$schema,path,i)); + } + } + return errors; + } + if(schema){ + checkProp(instance,schema,'',_changing || ''); + } + if(!_changing && instance && instance.$schema){ + checkProp(instance,instance.$schema,'',''); + } + return {valid:!errors.length,errors:errors}; +}; +exports.mustBeValid = function(result){ + // summary: + // This checks to ensure that the result is valid and will throw an appropriate error message if it is not + // result: the result returned from checkPropertyChange or validate + if(!result.valid){ + throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n")); + } +} + +return exports; +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json new file mode 100644 index 00000000000..d91ec378f04 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "json-schema@0.2.2", + "/Users/eshanker/Code/fsevents/node_modules/jsprim" + ] + ], + "_from": "json-schema@0.2.2", + "_id": "json-schema@0.2.2", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/json-schema", + "_npmUser": { + "email": "kriszyp@gmail.com", + "name": "kriszyp" + }, + "_npmVersion": "1.1.59", + "_phantomChildren": {}, + "_requested": { + "name": "json-schema", + "raw": "json-schema@0.2.2", + "rawSpec": "0.2.2", + "scope": null, + "spec": "0.2.2", + "type": "version" + }, + "_requiredBy": [ + "/fsevents/jsprim" + ], + "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz", + "_shasum": "50354f19f603917c695f70b85afa77c3b0f23506", + "_shrinkwrap": null, + "_spec": "json-schema@0.2.2", + "_where": "/Users/eshanker/Code/fsevents/node_modules/jsprim", + "author": { + "name": "Kris Zyp" + }, + "bugs": { + "url": "https://github.com/kriszyp/json-schema/issues" + }, + "dependencies": {}, + "description": "JSON Schema validation and specifications", + "devDependencies": { + "vows": "*" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "50354f19f603917c695f70b85afa77c3b0f23506", + "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz" + }, + "homepage": "https://github.com/kriszyp/json-schema#readme", + "keywords": [ + "json", + "schema" + ], + "licenses": [ + { + "type": "AFLv2.1", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43" + }, + { + "type": "BSD", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13" + } + ], + "main": "./lib/validate.js", + "maintainers": [ + { + "email": "kriszyp@gmail.com", + "name": "kriszyp" + } + ], + "name": "json-schema", + "optionalDependencies": {}, + "readme": "JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator).\r\n\r\nCode is licensed under the AFL or BSD license as part of the Persevere \r\nproject which is administered under the Dojo foundation,\r\nand all contributions require a Dojo CLA.", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kriszyp/json-schema.git" + }, + "scripts": { + "test": "echo TESTS DISABLED vows --spec test/*.js" + }, + "version": "0.2.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js new file mode 100644 index 00000000000..40eeda5d9fb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js @@ -0,0 +1,95 @@ +var assert = require('assert'); +var vows = require('vows'); +var path = require('path'); +var fs = require('fs'); + +var validate = require('../lib/validate').validate; + + +var revision = 'draft-03'; +var schemaRoot = path.join(__dirname, '..', revision); +var schemaNames = ['schema', 'hyper-schema', 'links', 'json-ref' ]; +var schemas = {}; + +schemaNames.forEach(function(name) { + var file = path.join(schemaRoot, name); + schemas[name] = loadSchema(file); +}); + +schemaNames.forEach(function(name) { + var s, n = name+'-nsd', f = path.join(schemaRoot, name); + schemas[n] = loadSchema(f); + s = schemas[n]; + delete s['$schema']; +}); + +function loadSchema(path) { + var data = fs.readFileSync(path, 'utf-8'); + var schema = JSON.parse(data); + return schema; +} + +function resultIsValid() { + return function(result) { + assert.isObject(result); + //assert.isBoolean(result.valid); + assert.equal(typeof(result.valid), 'boolean'); + assert.isArray(result.errors); + for (var i = 0; i < result.errors.length; i++) { + assert.notEqual(result.errors[i], null, 'errors['+i+'] is null'); + } + } +} + +function assertValidates(doc, schema) { + var context = {}; + + context[': validate('+doc+', '+schema+')'] = { + topic: validate(schemas[doc], schemas[schema]), + 'returns valid result': resultIsValid(), + 'with valid=true': function(result) { assert.equal(result.valid, true); }, + 'and no errors': function(result) { + // XXX work-around for bug in vows: [null] chokes it + if (result.errors[0] == null) assert.fail('(errors contains null)'); + assert.length(result.errors, 0); + } + }; + + return context; +} + +function assertSelfValidates(doc) { + var context = {}; + + context[': validate('+doc+')'] = { + topic: validate(schemas[doc]), + 'returns valid result': resultIsValid(), + 'with valid=true': function(result) { assert.equal(result.valid, true); }, + 'and no errors': function(result) { assert.length(result.errors, 0); } + }; + + return context; +} + +var suite = vows.describe('JSON Schema').addBatch({ + 'Core-NSD self-validates': assertSelfValidates('schema-nsd'), + 'Core-NSD/Core-NSD': assertValidates('schema-nsd', 'schema-nsd'), + 'Core-NSD/Core': assertValidates('schema-nsd', 'schema'), + + 'Core self-validates': assertSelfValidates('schema'), + 'Core/Core': assertValidates('schema', 'schema'), + + 'Hyper-NSD self-validates': assertSelfValidates('hyper-schema-nsd'), + 'Hyper self-validates': assertSelfValidates('hyper-schema'), + 'Hyper/Hyper': assertValidates('hyper-schema', 'hyper-schema'), + 'Hyper/Core': assertValidates('hyper-schema', 'schema'), + + 'Links-NSD self-validates': assertSelfValidates('links-nsd'), + 'Links self-validates': assertSelfValidates('links'), + 'Links/Hyper': assertValidates('links', 'hyper-schema'), + 'Links/Core': assertValidates('links', 'schema'), + + 'Json-Ref self-validates': assertSelfValidates('json-ref'), + 'Json-Ref/Hyper': assertValidates('json-ref', 'hyper-schema'), + 'Json-Ref/Core': assertValidates('json-ref', 'schema') +}).export(module); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore new file mode 100644 index 00000000000..17d6b3677f0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore @@ -0,0 +1 @@ +/*.tgz diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md new file mode 100644 index 00000000000..42bcb60af47 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md @@ -0,0 +1,14 @@ +## Unreleased +- Fixes stringify to only take ancestors into account when checking + circularity. + It previously assumed every visited object was circular which led to [false + positives][issue9]. + Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. +- Fixes calling the `replacer` function in the proper context (`thisArg`). +- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). +- Speeds serializing by a factor of + Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching + only the ancestors for a circular references speeds up things considerably. + +[must]: https://github.com/moll/js-must +[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile new file mode 100644 index 00000000000..36088c723a3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile @@ -0,0 +1,35 @@ +NODE_OPTS = +TEST_OPTS = + +love: + @echo "Feel like makin' love." + +test: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) + +spec: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) + +autotest: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) + +autospec: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) + +pack: + @file=$$(npm pack); echo "$$file"; tar tf "$$file" + +publish: + npm publish + +tag: + git tag "v$$(node -e 'console.log(require("./package").version)')" + +clean: + rm -f *.tgz + npm prune --production + +.PHONY: love +.PHONY: test spec autotest autospec +.PHONY: pack publish tag +.PHONY: clean diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md new file mode 100644 index 00000000000..a11f302a330 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md @@ -0,0 +1,52 @@ +# json-stringify-safe + +Like JSON.stringify, but doesn't throw on circular references. + +## Usage + +Takes the same arguments as `JSON.stringify`. + +```javascript +var stringify = require('json-stringify-safe'); +var circularObj = {}; +circularObj.circularRef = circularObj; +circularObj.list = [ circularObj, circularObj ]; +console.log(stringify(circularObj, null, 2)); +``` + +Output: + +```json +{ + "circularRef": "[Circular]", + "list": [ + "[Circular]", + "[Circular]" + ] +} +``` + +## Details + +``` +stringify(obj, serializer, indent, decycler) +``` + +The first three arguments are the same as to JSON.stringify. The last +is an argument that's only used when the object has been seen already. + +The default `decycler` function returns the string `'[Circular]'`. +If, for example, you pass in `function(k,v){}` (return nothing) then it +will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, +then cyclical objects will always be represented as `{"foo":"bar"}` in +the result. + +``` +stringify.getSerialize(serializer, decycler) +``` + +Returns a serializer that can be used elsewhere. This is the actual +function that's passed to JSON.stringify. + +**Note** that the function returned from `getSerialize` is stateful for now, so +do **not** use it more than once. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json new file mode 100644 index 00000000000..2c219c0ccbb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "json-stringify-safe@~5.0.1", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "json-stringify-safe@>=5.0.1 <5.1.0", + "_id": "json-stringify-safe@5.0.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/json-stringify-safe", + "_nodeVersion": "2.0.1", + "_npmUser": { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "json-stringify-safe", + "raw": "json-stringify-safe@~5.0.1", + "rawSpec": "~5.0.1", + "scope": null, + "spec": ">=5.0.1 <5.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", + "_shrinkwrap": null, + "_spec": "json-stringify-safe@~5.0.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/json-stringify-safe/issues" + }, + "contributors": [ + { + "email": "andri@dot.ee", + "name": "Andri Möll", + "url": "http://themoll.com" + } + ], + "dependencies": {}, + "description": "Like JSON.stringify, but doesn't blow up on circular refs.", + "devDependencies": { + "mocha": ">= 2.1.0 < 3", + "must": ">= 0.12 < 0.13", + "sinon": ">= 1.12.2 < 2" + }, + "directories": {}, + "dist": { + "shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", + "tarball": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + }, + "gitHead": "3890dceab3ad14f8701e38ca74f38276abc76de5", + "homepage": "https://github.com/isaacs/json-stringify-safe", + "keywords": [ + "circular", + "json", + "safe", + "stringify" + ], + "license": "ISC", + "main": "stringify.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + }, + { + "email": "andri@dot.ee", + "name": "moll" + } + ], + "name": "json-stringify-safe", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/json-stringify-safe.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "5.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js new file mode 100644 index 00000000000..124a452181a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js @@ -0,0 +1,27 @@ +exports = module.exports = stringify +exports.getSerialize = serializer + +function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) +} + +function serializer(replacer, cycleReplacer) { + var stack = [], keys = [] + + if (cycleReplacer == null) cycleReplacer = function(key, value) { + if (stack[0] === value) return "[Circular ~]" + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" + } + + return function(key, value) { + if (stack.length > 0) { + var thisPos = stack.indexOf(this) + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) + if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) + } + else stack.push(value) + + return replacer == null ? value : replacer.call(this, key, value) + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts new file mode 100644 index 00000000000..2544e5861e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts @@ -0,0 +1,2 @@ +--recursive +--require must diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js new file mode 100644 index 00000000000..5b325831768 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js @@ -0,0 +1,246 @@ +var Sinon = require("sinon") +var stringify = require("..") +function jsonify(obj) { return JSON.stringify(obj, null, 2) } + +describe("Stringify", function() { + it("must stringify circular objects", function() { + var obj = {name: "Alice"} + obj.self = obj + var json = stringify(obj, null, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + }) + + it("must stringify circular objects with intermediaries", function() { + var obj = {name: "Alice"} + obj.identity = {self: obj} + var json = stringify(obj, null, 2) + json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}})) + }) + + it("must stringify circular objects deeper", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + obj.child.self = obj.child + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + child: {name: "Bob", self: "[Circular ~.child]"} + })) + }) + + it("must stringify circular objects deeper with intermediaries", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + obj.child.identity = {self: obj.child} + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + child: {name: "Bob", identity: {self: "[Circular ~.child]"}} + })) + }) + + it("must stringify circular objects in an array", function() { + var obj = {name: "Alice"} + obj.self = [obj, obj] + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", self: ["[Circular ~]", "[Circular ~]"] + })) + }) + + it("must stringify circular objects deeper in an array", function() { + var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]} + obj.children[0].self = obj.children[0] + obj.children[1].self = obj.children[1] + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + children: [ + {name: "Bob", self: "[Circular ~.children.0]"}, + {name: "Eve", self: "[Circular ~.children.1]"} + ] + })) + }) + + it("must stringify circular arrays", function() { + var obj = [] + obj.push(obj) + obj.push(obj) + var json = stringify(obj, null, 2) + json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"])) + }) + + it("must stringify circular arrays with intermediaries", function() { + var obj = [] + obj.push({name: "Alice", self: obj}) + obj.push({name: "Bob", self: obj}) + + stringify(obj, null, 2).must.eql(jsonify([ + {name: "Alice", self: "[Circular ~]"}, + {name: "Bob", self: "[Circular ~]"} + ])) + }) + + it("must stringify repeated objects in objects", function() { + var obj = {} + var alice = {name: "Alice"} + obj.alice1 = alice + obj.alice2 = alice + + stringify(obj, null, 2).must.eql(jsonify({ + alice1: {name: "Alice"}, + alice2: {name: "Alice"} + })) + }) + + it("must stringify repeated objects in arrays", function() { + var alice = {name: "Alice"} + var obj = [alice, alice] + var json = stringify(obj, null, 2) + json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}])) + }) + + it("must call given decycler and use its output", function() { + var obj = {} + obj.a = obj + obj.b = obj + + var decycle = Sinon.spy(function() { return decycle.callCount }) + var json = stringify(obj, null, 2, decycle) + json.must.eql(jsonify({a: 1, b: 2}, null, 2)) + + decycle.callCount.must.equal(2) + decycle.thisValues[0].must.equal(obj) + decycle.args[0][0].must.equal("a") + decycle.args[0][1].must.equal(obj) + decycle.thisValues[1].must.equal(obj) + decycle.args[1][0].must.equal("b") + decycle.args[1][1].must.equal(obj) + }) + + it("must call replacer and use its output", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + + var replacer = Sinon.spy(bangString) + var json = stringify(obj, replacer, 2) + json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}})) + + replacer.callCount.must.equal(4) + replacer.args[0][0].must.equal("") + replacer.args[0][1].must.equal(obj) + replacer.thisValues[1].must.equal(obj) + replacer.args[1][0].must.equal("name") + replacer.args[1][1].must.equal("Alice") + replacer.thisValues[2].must.equal(obj) + replacer.args[2][0].must.equal("child") + replacer.args[2][1].must.equal(obj.child) + replacer.thisValues[3].must.equal(obj.child) + replacer.args[3][0].must.equal("name") + replacer.args[3][1].must.equal("Bob") + }) + + it("must call replacer after describing circular references", function() { + var obj = {name: "Alice"} + obj.self = obj + + var replacer = Sinon.spy(bangString) + var json = stringify(obj, replacer, 2) + json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"})) + + replacer.callCount.must.equal(3) + replacer.args[0][0].must.equal("") + replacer.args[0][1].must.equal(obj) + replacer.thisValues[1].must.equal(obj) + replacer.args[1][0].must.equal("name") + replacer.args[1][1].must.equal("Alice") + replacer.thisValues[2].must.equal(obj) + replacer.args[2][0].must.equal("self") + replacer.args[2][1].must.equal("[Circular ~]") + }) + + it("must call given decycler and use its output for nested objects", + function() { + var obj = {} + obj.a = obj + obj.b = {self: obj} + + var decycle = Sinon.spy(function() { return decycle.callCount }) + var json = stringify(obj, null, 2, decycle) + json.must.eql(jsonify({a: 1, b: {self: 2}})) + + decycle.callCount.must.equal(2) + decycle.args[0][0].must.equal("a") + decycle.args[0][1].must.equal(obj) + decycle.args[1][0].must.equal("self") + decycle.args[1][1].must.equal(obj) + }) + + it("must use decycler's output when it returned null", function() { + var obj = {a: "b"} + obj.self = obj + obj.selves = [obj, obj] + + function decycle() { return null } + stringify(obj, null, 2, decycle).must.eql(jsonify({ + a: "b", + self: null, + selves: [null, null] + })) + }) + + it("must use decycler's output when it returned undefined", function() { + var obj = {a: "b"} + obj.self = obj + obj.selves = [obj, obj] + + function decycle() {} + stringify(obj, null, 2, decycle).must.eql(jsonify({ + a: "b", + selves: [null, null] + })) + }) + + it("must throw given a decycler that returns a cycle", function() { + var obj = {} + obj.self = obj + var err + function identity(key, value) { return value } + try { stringify(obj, null, 2, identity) } catch (ex) { err = ex } + err.must.be.an.instanceof(TypeError) + }) + + describe(".getSerialize", function() { + it("must stringify circular objects", function() { + var obj = {a: "b"} + obj.circularRef = obj + obj.list = [obj, obj] + + var json = JSON.stringify(obj, stringify.getSerialize(), 2) + json.must.eql(jsonify({ + "a": "b", + "circularRef": "[Circular ~]", + "list": ["[Circular ~]", "[Circular ~]"] + })) + }) + + // This is the behavior as of Mar 3, 2015. + // The serializer function keeps state inside the returned function and + // so far I'm not sure how to not do that. JSON.stringify's replacer is not + // called _after_ serialization. + xit("must return a function that could be called twice", function() { + var obj = {name: "Alice"} + obj.self = obj + + var json + var serializer = stringify.getSerialize() + + json = JSON.stringify(obj, serializer, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + + json = JSON.stringify(obj, serializer, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + }) + }) +}) + +function bangString(key, value) { + return typeof value == "string" ? value + "!" : value +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml new file mode 100644 index 00000000000..9338bf14703 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml @@ -0,0 +1,10 @@ +language: "node_js" +node_js: + - 0.6 + - 0.8 + - 0.10 + - 0.11 + - 0.12 + - iojs-v1.0 + - iojs-v2.0 + - iojs diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md new file mode 100644 index 00000000000..e096dfa5d62 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md @@ -0,0 +1,32 @@ +# JSON Pointer for nodejs + +This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08). + +## Usage + + var jsonpointer = require("jsonpointer"); + var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; + var one = jsonpointer.get(obj, "/foo"); + var two = jsonpointer.get(obj, "/bar/baz"); + var three = jsonpointer.get(obj, "/qux/0"); + var four = jsonpointer.get(obj, "/qux/1"); + var five = jsonpointer.get(obj, "/qux/2"); + var notfound = jsonpointer.get(obj, "/quo"); // returns null + + jsonpointer.set(obj, "/foo", 6); // obj.foo = 6; + +## Testing + + $ node test.js + All tests pass. + $ + +[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](https://travis-ci.org/janl/node-jsonpointer) + +## Author + +(c) 2011 Jan Lehnardt + +## License + +MIT License. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js new file mode 100644 index 00000000000..006f85ef3a5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js @@ -0,0 +1,76 @@ +var untilde = function(str) { + return str.replace(/~./g, function(m) { + switch (m) { + case "~0": + return "~"; + case "~1": + return "/"; + } + throw new Error("Invalid tilde escape: " + m); + }); +} + +var traverse = function(obj, pointer, value) { + // assert(isArray(pointer)) + var part = untilde(pointer.shift()); + if(!obj.hasOwnProperty(part)) { + return null; + } + if(pointer.length !== 0) { // keep traversin! + return traverse(obj[part], pointer, value); + } + // we're done + if(typeof value === "undefined") { + // just reading + return obj[part]; + } + // set new value, return old value + var old_value = obj[part]; + if(value === null) { + delete obj[part]; + } else { + obj[part] = value; + } + return old_value; +} + +var validate_input = function(obj, pointer) { + if(typeof obj !== "object") { + throw new Error("Invalid input object."); + } + + if(pointer === "") { + return []; + } + + if(!pointer) { + throw new Error("Invalid JSON pointer."); + } + + pointer = pointer.split("/"); + var first = pointer.shift(); + if (first !== "") { + throw new Error("Invalid JSON pointer."); + } + + return pointer; +} + +var get = function(obj, pointer) { + pointer = validate_input(obj, pointer); + if (pointer.length === 0) { + return obj; + } + return traverse(obj, pointer); +} + +var set = function(obj, pointer, value) { + pointer = validate_input(obj, pointer); + if (pointer.length === 0) { + throw new Error("Invalid JSON pointer for set.") + } + return traverse(obj, pointer, value); +} + +exports.get = get +exports.set = set diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json new file mode 100644 index 00000000000..ab09a08392f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + "jsonpointer@2.0.0", + "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid" + ] + ], + "_from": "jsonpointer@2.0.0", + "_id": "jsonpointer@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/jsonpointer", + "_nodeVersion": "0.10.36", + "_npmUser": { + "email": "marc.brookman@gmail.com", + "name": "marcbachmann" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "jsonpointer", + "raw": "jsonpointer@2.0.0", + "rawSpec": "2.0.0", + "scope": null, + "spec": "2.0.0", + "type": "version" + }, + "_requiredBy": [ + "/fsevents/is-my-json-valid" + ], + "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", + "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", + "_shrinkwrap": null, + "_spec": "jsonpointer@2.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid", + "author": { + "email": "jan@apache.org", + "name": "Jan Lehnardt" + }, + "bugs": { + "url": "http://github.com/janl/node-jsonpointer/issues" + }, + "contributors": [ + { + "email": "joe-github@cursive.net", + "name": "Joe Hildebrand" + } + ], + "dependencies": {}, + "description": "Simple JSON Addressing.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", + "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" + }, + "engines": { + "node": ">=0.6.0" + }, + "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8", + "homepage": "https://github.com/janl/node-jsonpointer#readme", + "license": "MIT", + "main": "./jsonpointer", + "maintainers": [ + { + "email": "jan@apache.org", + "name": "jan" + }, + { + "email": "marc.brookman@gmail.com", + "name": "marcbachmann" + } + ], + "name": "jsonpointer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/janl/node-jsonpointer.git" + }, + "scripts": { + "test": "node test.js" + }, + "tags": [ + "simple", + "util", + "util", + "utility" + ], + "version": "2.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js new file mode 100644 index 00000000000..1c67d7f7efc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js @@ -0,0 +1,98 @@ +var assert = require("assert"); +var jsonpointer = require("./jsonpointer"); + +var obj = { + a: 1, + b: { + c: 2 + }, + d: { + e: [{a:3}, {b:4}, {c:5}] + } +}; + +assert.equal(jsonpointer.get(obj, "/a"), 1); +assert.equal(jsonpointer.get(obj, "/b/c"), 2); +assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 3); +assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 4); +assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 5); + +// set returns old value +assert.equal(jsonpointer.set(obj, "/a", 2), 1); +assert.equal(jsonpointer.set(obj, "/b/c", 3), 2); +assert.equal(jsonpointer.set(obj, "/d/e/0/a", 4), 3); +assert.equal(jsonpointer.set(obj, "/d/e/1/b", 5), 4); +assert.equal(jsonpointer.set(obj, "/d/e/2/c", 6), 5); + +assert.equal(jsonpointer.get(obj, "/a"), 2); +assert.equal(jsonpointer.get(obj, "/b/c"), 3); +assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 4); +assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 5); +assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 6); + +assert.equal(jsonpointer.get(obj, ""), obj); +assert.throws(function(){ jsonpointer.get(obj, "a"); }, validateError); +assert.throws(function(){ jsonpointer.get(obj, "a/"); }, validateError); + +function validateError(err) { + if ( (err instanceof Error) && /Invalid JSON pointer/.test(err.message) ) { + return true; + } +} + +var complexKeys = { + "a/b": { + c: 1 + }, + d: { + "e/f": 2 + }, + "~1": 3, + "01": 4 +} + +assert.equal(jsonpointer.get(complexKeys, "/a~1b/c"), 1); +assert.equal(jsonpointer.get(complexKeys, "/d/e~1f"), 2); +assert.equal(jsonpointer.get(complexKeys, "/~01"), 3); +assert.equal(jsonpointer.get(complexKeys, "/01"), 4); +assert.equal(jsonpointer.get(complexKeys, "/a/b/c"), null); +assert.equal(jsonpointer.get(complexKeys, "/~1"), null); + +// draft-ietf-appsawg-json-pointer-08 has special array rules +var ary = [ "zero", "one", "two" ]; +assert.equal(jsonpointer.get(ary, "/01"), null); + +//assert.equal(jsonpointer.set(ary, "/-", "three"), null); +//assert.equal(ary[3], "three"); + +// Examples from the draft: +var example = { + "foo": ["bar", "baz"], + "": 0, + "a/b": 1, + "c%d": 2, + "e^f": 3, + "g|h": 4, + "i\\j": 5, + "k\"l": 6, + " ": 7, + "m~n": 8 +}; + +assert.equal(jsonpointer.get(example, ""), example); +var ans = jsonpointer.get(example, "/foo"); +assert.equal(ans.length, 2); +assert.equal(ans[0], "bar"); +assert.equal(ans[1], "baz"); +assert.equal(jsonpointer.get(example, "/foo/0"), "bar"); +assert.equal(jsonpointer.get(example, "/"), 0); +assert.equal(jsonpointer.get(example, "/a~1b"), 1); +assert.equal(jsonpointer.get(example, "/c%d"), 2); +assert.equal(jsonpointer.get(example, "/e^f"), 3); +assert.equal(jsonpointer.get(example, "/g|h"), 4); +assert.equal(jsonpointer.get(example, "/i\\j"), 5); +assert.equal(jsonpointer.get(example, "/k\"l"), 6); +assert.equal(jsonpointer.get(example, "/ "), 7); +assert.equal(jsonpointer.get(example, "/m~0n"), 8); + +console.log("All tests pass."); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md new file mode 100644 index 00000000000..ab3a66417a6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md @@ -0,0 +1,35 @@ +# Changelog + +## not yet released + +None yet. + +## v1.3.0 (2016-06-22) + +* #14 add safer version of hasOwnProperty() +* #15 forEachKey() should ignore inherited properties + +## v1.2.2 (2015-10-15) + +* #11 NPM package shouldn't include any code that does `require('JSV')` +* #12 jsl.node.conf missing definition for "module" + +## v1.2.1 (2015-10-14) + +* #8 odd date parsing behaviour + +## v1.2.0 (2015-10-13) + +* #9 want function for returning RFC1123 dates + +## v1.1.0 (2015-09-02) + +* #6 a new suite of hrtime manipulation routines: `hrtimeAdd()`, + `hrtimeAccum()`, `hrtimeNanosec()`, `hrtimeMicrosec()` and + `hrtimeMillisec()`. + +## v1.0.0 (2015-09-01) + +First tracked release. Includes everything in previous releases, plus: + +* #4 want function for merging objects diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE new file mode 100644 index 00000000000..cbc0bb3ba3b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md new file mode 100644 index 00000000000..7303642e016 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md @@ -0,0 +1,237 @@ +# jsprim: utilities for primitive JavaScript types + +This module provides miscellaneous facilities for working with strings, +numbers, dates, and objects and arrays of these basic types. + + +### deepCopy(obj) + +Creates a deep copy of a primitive type, object, or array of primitive types. + + +### deepEqual(obj1, obj2) + +Returns whether two objects are equal. + + +### isEmpty(obj) + +Returns true if the given object has no properties and false otherwise. This +is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)). + +### hasKey(obj, key) + +Returns true if the given object has an enumerable, non-inherited property +called `key`. [For information on enumerability and ownership of properties, see +the MDN +documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) + +### forEachKey(obj, callback) + +Like Array.forEach, but iterates enumerable, owned properties of an object +rather than elements of an array. Equivalent to: + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + callback(key, obj[key]); + } + } + + +### flattenObject(obj, depth) + +Flattens an object up to a given level of nesting, returning an array of arrays +of length "depth + 1", where the first "depth" elements correspond to flattened +columns and the last element contains the remaining object . For example: + + flattenObject({ + 'I': { + 'A': { + 'i': { + 'datum1': [ 1, 2 ], + 'datum2': [ 3, 4 ] + }, + 'ii': { + 'datum1': [ 3, 4 ] + } + }, + 'B': { + 'i': { + 'datum1': [ 5, 6 ] + }, + 'ii': { + 'datum1': [ 7, 8 ], + 'datum2': [ 3, 4 ], + }, + 'iii': { + } + } + }, + 'II': { + 'A': { + 'i': { + 'datum1': [ 1, 2 ], + 'datum2': [ 3, 4 ] + } + } + } + }, 3) + +becomes: + + [ + [ 'I', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ], + [ 'I', 'A', 'ii', { 'datum1': [ 3, 4 ] } ], + [ 'I', 'B', 'i', { 'datum1': [ 5, 6 ] } ], + [ 'I', 'B', 'ii', { 'datum1': [ 7, 8 ], 'datum2': [ 3, 4 ] } ], + [ 'I', 'B', 'iii', {} ], + [ 'II', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ] + ] + +This function is strict: "depth" must be a non-negative integer and "obj" must +be a non-null object with at least "depth" levels of nesting under all keys. + + +### flattenIter(obj, depth, func) + +This is similar to `flattenObject` except that instead of returning an array, +this function invokes `func(entry)` for each `entry` in the array that +`flattenObject` would return. `flattenIter(obj, depth, func)` is logically +equivalent to `flattenObject(obj, depth).forEach(func)`. Importantly, this +version never constructs the full array. Its memory usage is O(depth) rather +than O(n) (where `n` is the number of flattened elements). + +There's another difference between `flattenObject` and `flattenIter` that's +related to the special case where `depth === 0`. In this case, `flattenObject` +omits the array wrapping `obj` (which is regrettable). + + +### pluck(obj, key) + +Fetch nested property "key" from object "obj", traversing objects as needed. +For example, `pluck(obj, "foo.bar.baz")` is roughly equivalent to +`obj.foo.bar.baz`, except that: + +1. If traversal fails, the resulting value is undefined, and no error is + thrown. For example, `pluck({}, "foo.bar")` is just undefined. +2. If "obj" has property "key" directly (without traversing), the + corresponding property is returned. For example, + `pluck({ 'foo.bar': 1 }, 'foo.bar')` is 1, not undefined. This is also + true recursively, so `pluck({ 'a': { 'foo.bar': 1 } }, 'a.foo.bar')` is + also 1, not undefined. + + +### randElt(array) + +Returns an element from "array" selected uniformly at random. If "array" is +empty, throws an Error. + + +### startsWith(str, prefix) + +Returns true if the given string starts with the given prefix and false +otherwise. + + +### endsWith(str, suffix) + +Returns true if the given string ends with the given suffix and false +otherwise. + + +### iso8601(date) + +Converts a Date object to an ISO8601 date string of the form +"YYYY-MM-DDTHH:MM:SS.sssZ". This format is not customizable. + + +### parseDateTime(str) + +Parses a date expressed as a string, as either a number of milliseconds since +the epoch or any string format that Date accepts, giving preference to the +former where these two sets overlap (e.g., strings containing small numbers). + + +### hrtimeDiff(timeA, timeB) + +Given two hrtime readings (as from Node's `process.hrtime()`), where timeA is +later than timeB, compute the difference and return that as an hrtime. It is +illegal to invoke this for a pair of times where timeB is newer than timeA. + +### hrtimeAdd(timeA, timeB) + +Add two hrtime intervals (as from Node's `process.hrtime()`), returning a new +hrtime interval array. This function does not modify either input argument. + + +### hrtimeAccum(timeA, timeB) + +Add two hrtime intervals (as from Node's `process.hrtime()`), storing the +result in `timeA`. This function overwrites (and returns) the first argument +passed in. + + +### hrtimeNanosec(timeA), hrtimeMicrosec(timeA), hrtimeMillisec(timeA) + +This suite of functions converts a hrtime interval (as from Node's +`process.hrtime()`) into a scalar number of nanoseconds, microseconds or +milliseconds. Results are truncated, as with `Math.floor()`. + + +### validateJsonObject(schema, object) + +Uses JSON validation (via JSV) to validate the given object against the given +schema. On success, returns null. On failure, *returns* (does not throw) a +useful Error object. + + +### extraProperties(object, allowed) + +Check an object for unexpected properties. Accepts the object to check, and an +array of allowed property name strings. If extra properties are detected, an +array of extra property names is returned. If no properties other than those +in the allowed list are present on the object, the returned array will be of +zero length. + +### mergeObjects(provided, overrides, defaults) + +Merge properties from objects "provided", "overrides", and "defaults". The +intended use case is for functions that accept named arguments in an "args" +object, but want to provide some default values and override other values. In +that case, "provided" is what the caller specified, "overrides" are what the +function wants to override, and "defaults" contains default values. + +The function starts with the values in "defaults", overrides them with the +values in "provided", and then overrides those with the values in "overrides". +For convenience, any of these objects may be falsey, in which case they will be +ignored. The input objects are never modified, but properties in the returned +object are not deep-copied. + +For example: + + mergeObjects(undefined, { 'objectMode': true }, { 'highWaterMark': 0 }) + +returns: + + { 'objectMode': true, 'highWaterMark': 0 } + +For another example: + + mergeObjects( + { 'highWaterMark': 16, 'objectMode': 7 }, /* from caller */ + { 'objectMode': true }, /* overrides */ + { 'highWaterMark': 0 }); /* default */ + +returns: + + { 'objectMode': true, 'highWaterMark': 16 } + + +# Contributing + +Code should be "make check" clean. This target assumes that +[jsl](http://github.com/davepacheco/javascriptlint) and +[jsstyle](http://github.com/davepacheco/jsstyle) are on your path. + +New tests should generally accompany new functions and bug fixes. The tests +should pass cleanly (run tests/basic.js). diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js new file mode 100644 index 00000000000..26c3ba1c076 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js @@ -0,0 +1,488 @@ +/* + * lib/jsprim.js: utilities for primitive JavaScript types + */ + +var mod_assert = require('assert'); +var mod_util = require('util'); + +var mod_extsprintf = require('extsprintf'); +var mod_verror = require('verror'); +var mod_jsonschema = require('json-schema'); + +/* + * Public interface + */ +exports.deepCopy = deepCopy; +exports.deepEqual = deepEqual; +exports.isEmpty = isEmpty; +exports.hasKey = hasKey; +exports.forEachKey = forEachKey; +exports.pluck = pluck; +exports.flattenObject = flattenObject; +exports.flattenIter = flattenIter; +exports.validateJsonObject = validateJsonObjectJS; +exports.validateJsonObjectJS = validateJsonObjectJS; +exports.randElt = randElt; +exports.extraProperties = extraProperties; +exports.mergeObjects = mergeObjects; + +exports.startsWith = startsWith; +exports.endsWith = endsWith; + +exports.iso8601 = iso8601; +exports.rfc1123 = rfc1123; +exports.parseDateTime = parseDateTime; + +exports.hrtimediff = hrtimeDiff; +exports.hrtimeDiff = hrtimeDiff; +exports.hrtimeAccum = hrtimeAccum; +exports.hrtimeAdd = hrtimeAdd; +exports.hrtimeNanosec = hrtimeNanosec; +exports.hrtimeMicrosec = hrtimeMicrosec; +exports.hrtimeMillisec = hrtimeMillisec; + + +/* + * Deep copy an acyclic *basic* Javascript object. This only handles basic + * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects + * containing these. This does *not* handle instances of other classes. + */ +function deepCopy(obj) +{ + var ret, key; + var marker = '__deepCopy'; + + if (obj && obj[marker]) + throw (new Error('attempted deep copy of cyclic object')); + + if (obj && obj.constructor == Object) { + ret = {}; + obj[marker] = true; + + for (key in obj) { + if (key == marker) + continue; + + ret[key] = deepCopy(obj[key]); + } + + delete (obj[marker]); + return (ret); + } + + if (obj && obj.constructor == Array) { + ret = []; + obj[marker] = true; + + for (key = 0; key < obj.length; key++) + ret.push(deepCopy(obj[key])); + + delete (obj[marker]); + return (ret); + } + + /* + * It must be a primitive type -- just return it. + */ + return (obj); +} + +function deepEqual(obj1, obj2) +{ + if (typeof (obj1) != typeof (obj2)) + return (false); + + if (obj1 === null || obj2 === null || typeof (obj1) != 'object') + return (obj1 === obj2); + + if (obj1.constructor != obj2.constructor) + return (false); + + var k; + for (k in obj1) { + if (!obj2.hasOwnProperty(k)) + return (false); + + if (!deepEqual(obj1[k], obj2[k])) + return (false); + } + + for (k in obj2) { + if (!obj1.hasOwnProperty(k)) + return (false); + } + + return (true); +} + +function isEmpty(obj) +{ + var key; + for (key in obj) + return (false); + return (true); +} + +function hasKey(obj, key) +{ + mod_assert.equal(typeof (key), 'string'); + return (Object.prototype.hasOwnProperty.call(obj, key)); +} + +function forEachKey(obj, callback) +{ + for (var key in obj) { + if (hasKey(obj, key)) { + callback(key, obj[key]); + } + } +} + +function pluck(obj, key) +{ + mod_assert.equal(typeof (key), 'string'); + return (pluckv(obj, key)); +} + +function pluckv(obj, key) +{ + if (obj === null || typeof (obj) !== 'object') + return (undefined); + + if (obj.hasOwnProperty(key)) + return (obj[key]); + + var i = key.indexOf('.'); + if (i == -1) + return (undefined); + + var key1 = key.substr(0, i); + if (!obj.hasOwnProperty(key1)) + return (undefined); + + return (pluckv(obj[key1], key.substr(i + 1))); +} + +/* + * Invoke callback(row) for each entry in the array that would be returned by + * flattenObject(data, depth). This is just like flattenObject(data, + * depth).forEach(callback), except that the intermediate array is never + * created. + */ +function flattenIter(data, depth, callback) +{ + doFlattenIter(data, depth, [], callback); +} + +function doFlattenIter(data, depth, accum, callback) +{ + var each; + var key; + + if (depth === 0) { + each = accum.slice(0); + each.push(data); + callback(each); + return; + } + + mod_assert.ok(data !== null); + mod_assert.equal(typeof (data), 'object'); + mod_assert.equal(typeof (depth), 'number'); + mod_assert.ok(depth >= 0); + + for (key in data) { + each = accum.slice(0); + each.push(key); + doFlattenIter(data[key], depth - 1, each, callback); + } +} + +function flattenObject(data, depth) +{ + if (depth === 0) + return ([ data ]); + + mod_assert.ok(data !== null); + mod_assert.equal(typeof (data), 'object'); + mod_assert.equal(typeof (depth), 'number'); + mod_assert.ok(depth >= 0); + + var rv = []; + var key; + + for (key in data) { + flattenObject(data[key], depth - 1).forEach(function (p) { + rv.push([ key ].concat(p)); + }); + } + + return (rv); +} + +function startsWith(str, prefix) +{ + return (str.substr(0, prefix.length) == prefix); +} + +function endsWith(str, suffix) +{ + return (str.substr( + str.length - suffix.length, suffix.length) == suffix); +} + +function iso8601(d) +{ + if (typeof (d) == 'number') + d = new Date(d); + mod_assert.ok(d.constructor === Date); + return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ', + d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(), + d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), + d.getUTCMilliseconds())); +} + +var RFC1123_MONTHS = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +var RFC1123_DAYS = [ + 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + +function rfc1123(date) { + return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT', + RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(), + RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(), + date.getUTCHours(), date.getUTCMinutes(), + date.getUTCSeconds())); +} + +/* + * Parses a date expressed as a string, as either a number of milliseconds since + * the epoch or any string format that Date accepts, giving preference to the + * former where these two sets overlap (e.g., small numbers). + */ +function parseDateTime(str) +{ + /* + * This is irritatingly implicit, but significantly more concise than + * alternatives. The "+str" will convert a string containing only a + * number directly to a Number, or NaN for other strings. Thus, if the + * conversion succeeds, we use it (this is the milliseconds-since-epoch + * case). Otherwise, we pass the string directly to the Date + * constructor to parse. + */ + var numeric = +str; + if (!isNaN(numeric)) { + return (new Date(numeric)); + } else { + return (new Date(str)); + } +} + +function validateJsonObjectJS(schema, input) +{ + var report = mod_jsonschema.validate(input, schema); + + if (report.errors.length === 0) + return (null); + + /* Currently, we only do anything useful with the first error. */ + var error = report.errors[0]; + + /* The failed property is given by a URI with an irrelevant prefix. */ + var propname = error['property']; + var reason = error['message'].toLowerCase(); + var i, j; + + /* + * There's at least one case where the property error message is + * confusing at best. We work around this here. + */ + if ((i = reason.indexOf('the property ')) != -1 && + (j = reason.indexOf(' is not defined in the schema and the ' + + 'schema does not allow additional properties')) != -1) { + i += 'the property '.length; + if (propname === '') + propname = reason.substr(i, j - i); + else + propname = propname + '.' + reason.substr(i, j - i); + + reason = 'unsupported property'; + } + + var rv = new mod_verror.VError('property "%s": %s', propname, reason); + rv.jsv_details = error; + return (rv); +} + +function randElt(arr) +{ + mod_assert.ok(Array.isArray(arr) && arr.length > 0, + 'randElt argument must be a non-empty array'); + + return (arr[Math.floor(Math.random() * arr.length)]); +} + +function assertHrtime(a) +{ + mod_assert.ok(a[0] >= 0 && a[1] >= 0, + 'negative numbers not allowed in hrtimes'); + mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow'); +} + +/* + * Compute the time elapsed between hrtime readings A and B, where A is later + * than B. hrtime readings come from Node's process.hrtime(). There is no + * defined way to represent negative deltas, so it's illegal to diff B from A + * where the time denoted by B is later than the time denoted by A. If this + * becomes valuable, we can define a representation and extend the + * implementation to support it. + */ +function hrtimeDiff(a, b) +{ + assertHrtime(a); + assertHrtime(b); + mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]), + 'negative differences not allowed'); + + var rv = [ a[0] - b[0], 0 ]; + + if (a[1] >= b[1]) { + rv[1] = a[1] - b[1]; + } else { + rv[0]--; + rv[1] = 1e9 - (b[1] - a[1]); + } + + return (rv); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of nanoseconds. + */ +function hrtimeNanosec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e9 + a[1])); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of microseconds. + */ +function hrtimeMicrosec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e6 + a[1] / 1e3)); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of milliseconds. + */ +function hrtimeMillisec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e3 + a[1] / 1e6)); +} + +/* + * Add two hrtime readings A and B, overwriting A with the result of the + * addition. This function is useful for accumulating several hrtime intervals + * into a counter. Returns A. + */ +function hrtimeAccum(a, b) +{ + assertHrtime(a); + assertHrtime(b); + + /* + * Accumulate the nanosecond component. + */ + a[1] += b[1]; + if (a[1] >= 1e9) { + /* + * The nanosecond component overflowed, so carry to the seconds + * field. + */ + a[0]++; + a[1] -= 1e9; + } + + /* + * Accumulate the seconds component. + */ + a[0] += b[0]; + + return (a); +} + +/* + * Add two hrtime readings A and B, returning the result as a new hrtime array. + * Does not modify either input argument. + */ +function hrtimeAdd(a, b) +{ + assertHrtime(a); + + var rv = [ a[0], a[1] ]; + + return (hrtimeAccum(rv, b)); +} + + +/* + * Check an object for unexpected properties. Accepts the object to check, and + * an array of allowed property names (strings). Returns an array of key names + * that were found on the object, but did not appear in the list of allowed + * properties. If no properties were found, the returned array will be of + * zero length. + */ +function extraProperties(obj, allowed) +{ + mod_assert.ok(typeof (obj) === 'object' && obj !== null, + 'obj argument must be a non-null object'); + mod_assert.ok(Array.isArray(allowed), + 'allowed argument must be an array of strings'); + for (var i = 0; i < allowed.length; i++) { + mod_assert.ok(typeof (allowed[i]) === 'string', + 'allowed argument must be an array of strings'); + } + + return (Object.keys(obj).filter(function (key) { + return (allowed.indexOf(key) === -1); + })); +} + +/* + * Given three sets of properties "provided" (may be undefined), "overrides" + * (required), and "defaults" (may be undefined), construct an object containing + * the union of these sets with "overrides" overriding "provided", and + * "provided" overriding "defaults". None of the input objects are modified. + */ +function mergeObjects(provided, overrides, defaults) +{ + var rv, k; + + rv = {}; + if (defaults) { + for (k in defaults) + rv[k] = defaults[k]; + } + + if (provided) { + for (k in provided) + rv[k] = provided[k]; + } + + if (overrides) { + for (k in overrides) + rv[k] = overrides[k]; + } + + return (rv); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json new file mode 100644 index 00000000000..c3ea628d8be --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "jsprim@^1.2.2", + "/Users/eshanker/Code/fsevents/node_modules/http-signature" + ] + ], + "_from": "jsprim@>=1.2.2 <2.0.0", + "_id": "jsprim@1.3.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/jsprim", + "_nodeVersion": "0.12.7", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/jsprim-1.3.0.tgz_1466708163640_0.5282344303559512" + }, + "_npmUser": { + "email": "dap@cs.brown.edu", + "name": "dap" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "jsprim", + "raw": "jsprim@^1.2.2", + "rawSpec": "^1.2.2", + "scope": null, + "spec": ">=1.2.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/http-signature" + ], + "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz", + "_shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650", + "_shrinkwrap": null, + "_spec": "jsprim@^1.2.2", + "_where": "/Users/eshanker/Code/fsevents/node_modules/http-signature", + "bugs": { + "url": "https://github.com/davepacheco/node-jsprim/issues" + }, + "dependencies": { + "extsprintf": "1.0.2", + "json-schema": "0.2.2", + "verror": "1.3.6" + }, + "description": "utilities for primitive JavaScript types", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650", + "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz" + }, + "engines": [ + "node >=0.6.0" + ], + "gitHead": "694edcb22e2291c21f6c2a23907bf02e1edbfdf4", + "homepage": "https://github.com/davepacheco/node-jsprim#readme", + "license": "MIT", + "main": "./lib/jsprim.js", + "maintainers": [ + { + "email": "dap@cs.brown.edu", + "name": "dap" + } + ], + "name": "jsprim", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/davepacheco/node-jsprim.git" + }, + "scripts": {}, + "version": "1.3.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md new file mode 100644 index 00000000000..d6705ac86d1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md @@ -0,0 +1,341 @@ +1.23.0 / 2016-05-01 +=================== + + * Add `application/efi` + * Add `application/vnd.3gpp.sms+xml` + * Add `application/vnd.3lightssoftware.imagescal` + * Add `application/vnd.coreos.ignition+json` + * Add `application/vnd.desmume.movie` + * Add `application/vnd.onepager` + * Add `application/vnd.vel+json` + * Add `text/prs.prop.logic` + * Add `video/encaprtp` + * Add `video/h265` + * Add `video/iso.segment` + * Add `video/raptorfec` + * Add `video/rtploopback` + * Add `video/vnd.radgamettools.bink` + * Add `video/vnd.radgamettools.smacker` + * Add `video/vp8` + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `application/ppsp-tracker+json` + * Add `application/problem+json` + * Add `application/problem+xml` + * Add `application/vnd.hdt` + * Add `application/vnd.ms-printschematicket+xml` + * Add `model/vnd.rosette.annotated-data-model` + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add `application/emergencycalldata.comment+xml` + * Add `application/emergencycalldata.deviceinfo+xml` + * Add `application/emergencycalldata.providerinfo+xml` + * Add `application/emergencycalldata.serviceinfo+xml` + * Add `application/emergencycalldata.subscriberinfo+xml` + * Add `application/vnd.filmit.zfc` + * Add `application/vnd.google-apps.document` + * Add `application/vnd.google-apps.presentation` + * Add `application/vnd.google-apps.spreadsheet` + * Add `application/vnd.mapbox-vector-tile` + * Add `application/vnd.ms-printdevicecapabilities+xml` + * Add `application/vnd.ms-windows.devicepairing` + * Add `application/vnd.ms-windows.nwprinting.oob` + * Add `application/vnd.tml` + * Add `audio/evs` + +1.20.0 / 2015-11-10 +=================== + + * Add `application/cdni` + * Add `application/csvm+json` + * Add `application/rfc+xml` + * Add `application/vnd.3gpp.access-transfer-events+xml` + * Add `application/vnd.3gpp.srvcc-ext+xml` + * Add `application/vnd.ms-windows.wsd.oob` + * Add `application/vnd.oxli.countgraph` + * Add `application/vnd.pagerduty+json` + * Add `text/x-suse-ymp` + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.3gpp-prose-pc3ch+xml` + * Add `application/vnd.3gpp.srvcc-info+xml` + * Add `application/vnd.apple.pkpass` + * Add `application/vnd.drive+json` + +1.18.0 / 2015-09-03 +=================== + + * Add `application/pkcs12` + * Add `application/vnd.3gpp-prose+xml` + * Add `application/vnd.3gpp.mid-call+xml` + * Add `application/vnd.3gpp.state-and-event-info+xml` + * Add `application/vnd.anki` + * Add `application/vnd.firemonkeys.cloudcell` + * Add `application/vnd.openblox.game+xml` + * Add `application/vnd.openblox.game-binary` + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE new file mode 100644 index 00000000000..a7ae8ee9b8a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md new file mode 100644 index 00000000000..7662440bb9f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md @@ -0,0 +1,82 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a database of all mime types. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [RawGit](https://rawgit.com/). It is recommended to replace +`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the +JSON format may change in the future. + +``` +https://cdn.rawgit.com/jshttp/mime-db/master/db.json +``` + +## Usage + +```js +var db = require('mime-db'); + +// grab data on .js files +var data = db['application/javascript']; +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom.json` or +`src/custom-suffix.json`. + +To update the build, run `npm run build`. + +## Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg +[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg +[npm-url]: https://npmjs.org/package/mime-db +[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg +[travis-url]: https://travis-ci.org/jshttp/mime-db +[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://img.shields.io/node/v/mime-db.svg +[node-url]: http://nodejs.org/download/ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json new file mode 100644 index 00000000000..0a5a8a7bba5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json @@ -0,0 +1,6627 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana" + }, + "application/3gpp-ims+xml": { + "source": "iana" + }, + "application/a2l": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana" + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "extensions": ["atomsvc"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana" + }, + "application/bacnet-xdd+zip": { + "source": "iana" + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana" + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana" + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/cbor": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana" + }, + "application/ccxml+xml": { + "source": "iana", + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana" + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana" + }, + "application/cellml+xml": { + "source": "iana" + }, + "application/cfw": { + "source": "iana" + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana" + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana" + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana" + }, + "application/cstadata+xml": { + "source": "iana" + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "extensions": ["mpd"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana" + }, + "application/dicom": { + "source": "iana" + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "extensions": ["dbk"] + }, + "application/dskpp+xml": { + "source": "iana" + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/emergencycalldata.comment+xml": { + "source": "iana" + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana" + }, + "application/emma+xml": { + "source": "iana", + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana" + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana" + }, + "application/epub+zip": { + "source": "iana", + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana" + }, + "application/fits": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false, + "extensions": ["woff"] + }, + "application/font-woff2": { + "compressible": false, + "extensions": ["woff2"] + }, + "application/framework-attributes+xml": { + "source": "iana" + }, + "application/gml+xml": { + "source": "apache", + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana" + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana" + }, + "application/ibe-pkg-reply+xml": { + "source": "iana" + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana" + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana" + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js"] + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana" + }, + "application/kpml-response+xml": { + "source": "iana" + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana" + }, + "application/lost+xml": { + "source": "iana", + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana" + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "extensions": ["mads"] + }, + "application/manifest+json": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana" + }, + "application/mathml-presentation+xml": { + "source": "iana" + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana" + }, + "application/mbms-deregister+xml": { + "source": "iana" + }, + "application/mbms-envelope+xml": { + "source": "iana" + }, + "application/mbms-msk+xml": { + "source": "iana" + }, + "application/mbms-msk-response+xml": { + "source": "iana" + }, + "application/mbms-protection-description+xml": { + "source": "iana" + }, + "application/mbms-reception-report+xml": { + "source": "iana" + }, + "application/mbms-register+xml": { + "source": "iana" + }, + "application/mbms-register-response+xml": { + "source": "iana" + }, + "application/mbms-schedule+xml": { + "source": "iana" + }, + "application/mbms-user-service-description+xml": { + "source": "iana" + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana" + }, + "application/media_control+xml": { + "source": "iana" + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mods+xml": { + "source": "iana", + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana" + }, + "application/mrb-publish+xml": { + "source": "iana" + }, + "application/msc-ivr+xml": { + "source": "iana" + }, + "application/msc-mixer+xml": { + "source": "iana" + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana" + }, + "application/news-groupinfo": { + "source": "iana" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana" + }, + "application/nss": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p2p-overlay+xml": { + "source": "iana" + }, + "application/parityfec": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana" + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana" + }, + "application/pidf-diff+xml": { + "source": "iana" + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana" + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana" + }, + "application/provenance+xml": { + "source": "iana" + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.hpub+zip": { + "source": "iana" + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana" + }, + "application/pskc+xml": { + "source": "iana", + "extensions": ["pskcxml"] + }, + "application/qsig": { + "source": "iana" + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf"] + }, + "application/reginfo+xml": { + "source": "iana", + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana" + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana" + }, + "application/rls-services+xml": { + "source": "iana", + "extensions": ["rs"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana" + }, + "application/samlmetadata+xml": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana" + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/sep+xml": { + "source": "iana" + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana" + }, + "application/simple-filter+xml": { + "source": "iana" + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "extensions": ["srx"] + }, + "application/spirits-event+xml": { + "source": "iana" + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "extensions": ["ssml"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "extensions": ["tei","teicorpus"] + }, + "application/thraud+xml": { + "source": "iana", + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/ttml+xml": { + "source": "iana" + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana" + }, + "application/urc-ressheet+xml": { + "source": "iana" + }, + "application/urc-targetdesc+xml": { + "source": "iana" + }, + "application/urc-uisocketdesc+xml": { + "source": "iana" + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana" + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana" + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana" + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana" + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana" + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana" + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana" + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana" + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "extensions": ["mpkg"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avistar+xml": { + "source": "iana" + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana" + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "extensions": ["cdxml"] + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana" + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "extensions": ["wbs"] + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana" + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana" + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume-movie": { + "source": "iana" + }, + "application/vnd.desmume.movie": { + "source": "apache" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana" + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana" + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana" + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana" + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana" + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana" + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana" + }, + "application/vnd.etsi.cug+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana" + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana" + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana" + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana" + }, + "application/vnd.etsi.sci+xml": { + "source": "iana" + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana" + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana" + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana" + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana" + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana" + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana" + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana" + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana" + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana" + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las.las+xml": { + "source": "iana", + "extensions": ["lasxml"] + }, + "application/vnd.liberty-request+xml": { + "source": "iana" + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "extensions": ["lbe"] + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana" + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana" + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana" + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana" + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache" + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana" + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana" + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana" + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana" + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana" + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana" + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana" + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana" + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana" + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana" + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana" + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana" + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana" + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana" + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana" + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana" + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana" + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana" + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana" + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana" + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana" + }, + "application/vnd.omads-email+xml": { + "source": "iana" + }, + "application/vnd.omads-file+xml": { + "source": "iana" + }, + "application/vnd.omads-folder+xml": { + "source": "iana" + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana" + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "apache", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "apache", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "apache", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana" + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana" + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos+xml": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "apache" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana" + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana" + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana" + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana" + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana" + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana" + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana" + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana" + }, + "application/vnd.wv.ssp+xml": { + "source": "iana" + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana" + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "extensions": ["vxml"] + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/watcherinfo+xml": { + "source": "iana" + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-otf": { + "source": "apache", + "compressible": true, + "extensions": ["otf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-ttf": { + "source": "apache", + "compressible": true, + "extensions": ["ttf","ttc"] + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "apache", + "extensions": ["der","crt","pem"] + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana" + }, + "application/xaml+xml": { + "source": "apache", + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana" + }, + "application/xcap-caps+xml": { + "source": "iana" + }, + "application/xcap-diff+xml": { + "source": "iana", + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana" + }, + "application/xcap-error+xml": { + "source": "iana" + }, + "application/xcap-ns+xml": { + "source": "iana" + }, + "application/xcon-conference-info+xml": { + "source": "iana" + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana" + }, + "application/xenc+xml": { + "source": "iana", + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache" + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana" + }, + "application/xmpp+xml": { + "source": "iana" + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "extensions": ["xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yin+xml": { + "source": "iana", + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana" + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana" + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/opentype": { + "compressible": true, + "extensions": ["otf"] + }, + "image/bmp": { + "source": "apache", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/fits": { + "source": "iana" + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jp2": { + "source": "iana" + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jpm": { + "source": "iana" + }, + "image/jpx": { + "source": "iana" + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana" + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana" + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tiff","tif"] + }, + "image/tiff-fx": { + "source": "iana" + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana" + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana" + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana" + }, + "image/vnd.valve.source.texture": { + "source": "iana" + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana" + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana" + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana" + }, + "message/global-delivery-status": { + "source": "iana" + }, + "message/global-disposition-notification": { + "source": "iana" + }, + "message/global-headers": { + "source": "iana" + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana" + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana" + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana" + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana" + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana" + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana" + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana" + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana" + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana", + "compressible": false + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/css": { + "source": "iana", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/hjson": { + "extensions": ["hjson"] + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana" + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["markdown","md","mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "apache" + }, + "video/3gpp": { + "source": "apache", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "apache" + }, + "video/3gpp2": { + "source": "apache", + "extensions": ["3g2"] + }, + "video/bmpeg": { + "source": "apache" + }, + "video/bt656": { + "source": "apache" + }, + "video/celb": { + "source": "apache" + }, + "video/dv": { + "source": "apache" + }, + "video/encaprtp": { + "source": "apache" + }, + "video/h261": { + "source": "apache", + "extensions": ["h261"] + }, + "video/h263": { + "source": "apache", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "apache" + }, + "video/h263-2000": { + "source": "apache" + }, + "video/h264": { + "source": "apache", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "apache" + }, + "video/h264-svc": { + "source": "apache" + }, + "video/h265": { + "source": "apache" + }, + "video/iso.segment": { + "source": "apache" + }, + "video/jpeg": { + "source": "apache", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "apache" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/mj2": { + "source": "apache", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "apache" + }, + "video/mp2p": { + "source": "apache" + }, + "video/mp2t": { + "source": "apache", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "apache", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "apache" + }, + "video/mpeg": { + "source": "apache", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "apache" + }, + "video/mpv": { + "source": "apache" + }, + "video/nv": { + "source": "apache" + }, + "video/ogg": { + "source": "apache", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "apache" + }, + "video/pointer": { + "source": "apache" + }, + "video/quicktime": { + "source": "apache", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "apache" + }, + "video/raw": { + "source": "apache" + }, + "video/rtp-enc-aescm128": { + "source": "apache" + }, + "video/rtploopback": { + "source": "apache" + }, + "video/rtx": { + "source": "apache" + }, + "video/smpte292m": { + "source": "apache" + }, + "video/ulpfec": { + "source": "apache" + }, + "video/vc1": { + "source": "apache" + }, + "video/vnd.cctv": { + "source": "apache" + }, + "video/vnd.dece.hd": { + "source": "apache", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "apache", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "apache" + }, + "video/vnd.dece.pd": { + "source": "apache", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "apache", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "apache", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "apache" + }, + "video/vnd.directv.mpeg-tts": { + "source": "apache" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "apache" + }, + "video/vnd.dvb.file": { + "source": "apache", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "apache", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "apache" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "apache" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "apache" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "apache" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "apache" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "apache" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "apache" + }, + "video/vnd.motorola.video": { + "source": "apache" + }, + "video/vnd.motorola.videop": { + "source": "apache" + }, + "video/vnd.mpegurl": { + "source": "apache", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "apache", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "apache" + }, + "video/vnd.nokia.videovoip": { + "source": "apache" + }, + "video/vnd.objectvideo": { + "source": "apache" + }, + "video/vnd.radgamettools.bink": { + "source": "apache" + }, + "video/vnd.radgamettools.smacker": { + "source": "apache" + }, + "video/vnd.sealed.mpeg1": { + "source": "apache" + }, + "video/vnd.sealed.mpeg4": { + "source": "apache" + }, + "video/vnd.sealed.swf": { + "source": "apache" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "apache" + }, + "video/vnd.uvvu.mp4": { + "source": "apache", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "apache", + "extensions": ["viv"] + }, + "video/vp8": { + "source": "apache" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js new file mode 100644 index 00000000000..551031f690b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js @@ -0,0 +1,11 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json new file mode 100644 index 00000000000..1aa037918b9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + "mime-db@~1.23.0", + "/Users/eshanker/Code/fsevents/node_modules/mime-types" + ] + ], + "_from": "mime-db@>=1.23.0 <1.24.0", + "_id": "mime-db@1.23.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/mime-db", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/mime-db-1.23.0.tgz_1462163798086_0.43938886746764183" + }, + "_npmUser": { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "name": "mime-db", + "raw": "mime-db@~1.23.0", + "rawSpec": "~1.23.0", + "scope": null, + "spec": ">=1.23.0 <1.24.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/mime-types" + ], + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz", + "_shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659", + "_shrinkwrap": null, + "_spec": "mime-db@~1.23.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/mime-types", + "bugs": { + "url": "https://github.com/jshttp/mime-db/issues" + }, + "contributors": [ + { + "email": "doug@somethingdoug.com", + "name": "Douglas Christopher Wilson" + }, + { + "email": "me@jongleberry.com", + "name": "Jonathan Ong", + "url": "http://jongleberry.com" + }, + { + "email": "robert@broofa.com", + "name": "Robert Kieffer", + "url": "http://github.com/broofa" + } + ], + "dependencies": {}, + "description": "Media Type Database", + "devDependencies": { + "bluebird": "3.3.5", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "1.1.0", + "gnode": "0.1.2", + "istanbul": "0.4.3", + "mocha": "1.21.5", + "raw-body": "2.1.6", + "stream-to-array": "2.3.0" + }, + "directories": {}, + "dist": { + "shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659", + "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "gitHead": "ba0d99fd05b3bfdc2ebcd78f858c25cb7db6af41", + "homepage": "https://github.com/jshttp/mime-db#readme", + "keywords": [ + "charset", + "charsets", + "database", + "db", + "mime", + "type", + "types" + ], + "license": "MIT", + "maintainers": [ + { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + }, + { + "email": "jonathanrichardong@gmail.com", + "name": "jongleberry" + } + ], + "name": "mime-db", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-db.git" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "update": "npm run fetch && npm run build" + }, + "version": "1.23.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md new file mode 100644 index 00000000000..63bd4ea0b40 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md @@ -0,0 +1,197 @@ +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Add additional compressible + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE new file mode 100644 index 00000000000..06166077be4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md new file mode 100644 index 00000000000..e77d615d3e6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md @@ -0,0 +1,103 @@ +# mime-types + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [node-mime](https://github.com/broofa/node-mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`, + so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db) +- No `.define()` functionality + +Otherwise, the API is compatible. + +## Install + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://github.com/jshttp/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/x-markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/x-markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/mime-types.svg +[npm-url]: https://npmjs.org/package/mime-types +[node-version-image]: https://img.shields.io/node/v/mime-types.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg +[travis-url]: https://travis-ci.org/jshttp/mime-types +[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types +[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg +[downloads-url]: https://npmjs.org/package/mime-types diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js new file mode 100644 index 00000000000..f7008b246d1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/ +var textTypeRegExp = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset(type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = extractTypeRegExp.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && textTypeRegExp.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType(str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension(type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = extractTypeRegExp.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup(path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps(extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType(type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' + && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json new file mode 100644 index 00000000000..36be737307c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + "mime-types@~2.1.7", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "mime-types@>=2.1.7 <2.2.0", + "_id": "mime-types@2.1.11", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/mime-types", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/mime-types-2.1.11.tgz_1462165365027_0.7217204745393246" + }, + "_npmUser": { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "name": "mime-types", + "raw": "mime-types@~2.1.7", + "rawSpec": "~2.1.7", + "scope": null, + "spec": ">=2.1.7 <2.2.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/form-data", + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz", + "_shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c", + "_shrinkwrap": null, + "_spec": "mime-types@~2.1.7", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "bugs": { + "url": "https://github.com/jshttp/mime-types/issues" + }, + "contributors": [ + { + "email": "doug@somethingdoug.com", + "name": "Douglas Christopher Wilson" + }, + { + "email": "fishrock123@rocketmail.com", + "name": "Jeremiah Senkpiel", + "url": "https://searchbeam.jit.su" + }, + { + "email": "me@jongleberry.com", + "name": "Jonathan Ong", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-db": "~1.23.0" + }, + "description": "The ultimate javascript content-type utility.", + "devDependencies": { + "istanbul": "0.4.3", + "mocha": "1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c", + "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "gitHead": "298ffcf490a5d6e60edea7bf7a69036df04846b1", + "homepage": "https://github.com/jshttp/mime-types#readme", + "keywords": [ + "mime", + "types" + ], + "license": "MIT", + "maintainers": [ + { + "email": "doug@somethingdoug.com", + "name": "dougwilson" + }, + { + "email": "fishrock123@rocketmail.com", + "name": "fishrock123" + }, + { + "email": "jonathanrichardong@gmail.com", + "name": "jongleberry" + } + ], + "name": "mime-types", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-types.git" + }, + "scripts": { + "test": "mocha --reporter spec test/test.js", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" + }, + "version": "2.1.11" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md new file mode 100644 index 00000000000..ad72b8133ea --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md @@ -0,0 +1,209 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js new file mode 100644 index 00000000000..830a27246cd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js @@ -0,0 +1,924 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json new file mode 100644 index 00000000000..adbcd931595 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "minimatch@^3.0.2", + "/Users/eshanker/Code/fsevents/node_modules/glob" + ] + ], + "_from": "minimatch@>=3.0.2 <4.0.0", + "_id": "minimatch@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/minimatch", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "name": "minimatch", + "raw": "minimatch@^3.0.2", + "rawSpec": "^3.0.2", + "scope": null, + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/fstream-ignore", + "/fsevents/glob" + ], + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz", + "_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", + "_shrinkwrap": null, + "_spec": "minimatch@^3.0.2", + "_where": "/Users/eshanker/Code/fsevents/node_modules/glob", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "description": "a glob matcher in javascript", + "devDependencies": { + "standard": "^3.7.2", + "tap": "^5.6.0" + }, + "directories": {}, + "dist": { + "shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", + "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "minimatch.js" + ], + "gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0", + "homepage": "https://github.com/isaacs/minimatch#readme", + "license": "ISC", + "main": "minimatch.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "name": "minimatch", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" + }, + "version": "3.0.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml new file mode 100644 index 00000000000..cc4dba29d95 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE new file mode 100644 index 00000000000..ee27ba4b441 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js new file mode 100644 index 00000000000..abff3e8ee8f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js new file mode 100644 index 00000000000..584f551a6da --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js @@ -0,0 +1,187 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + }); + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function setArg (key, val) { + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + } + else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + notFlags.forEach(function(key) { + argv._.push(key); + }); + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +function longest (xs) { + return Math.max.apply(null, xs.map(function (x) { return x.length })); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json new file mode 100644 index 00000000000..b6fcf420893 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "minimist@0.0.8", + "/Users/eshanker/Code/fsevents/node_modules/mkdirp" + ] + ], + "_from": "minimist@0.0.8", + "_id": "minimist@0.0.8", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/minimist", + "_npmUser": { + "email": "mail@substack.net", + "name": "substack" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "name": "minimist", + "raw": "minimist@0.0.8", + "rawSpec": "0.0.8", + "scope": null, + "spec": "0.0.8", + "type": "version" + }, + "_requiredBy": [ + "/fsevents/mkdirp" + ], + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "_shrinkwrap": null, + "_spec": "minimist@0.0.8", + "_where": "/Users/eshanker/Code/fsevents/node_modules/mkdirp", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "dependencies": {}, + "description": "parse argument options", + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.4" + }, + "directories": {}, + "dist": { + "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "tarball": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "optimist", + "parser" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "mail@substack.net", + "name": "substack" + } + ], + "name": "minimist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "browsers": [ + "chrome/10", + "chrome/latest", + "ff/5", + "firefox/latest", + "ie/6..latest", + "opera/12", + "safari/5.1", + "safari/latest" + ], + "files": "test/*.js" + }, + "version": "0.0.8" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown new file mode 100644 index 00000000000..c25635323e1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown @@ -0,0 +1,73 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) + +[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.dir(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js new file mode 100644 index 00000000000..8b034b99a9e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js @@ -0,0 +1,24 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js new file mode 100644 index 00000000000..f0041ee40cd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js new file mode 100644 index 00000000000..ef0ae349bf3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js new file mode 100644 index 00000000000..5d3a1e09d3b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js new file mode 100644 index 00000000000..8a906466966 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js @@ -0,0 +1,318 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js new file mode 100644 index 00000000000..21851b036ee --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: ['123'] }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js new file mode 100644 index 00000000000..d513a1c2529 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js new file mode 100644 index 00000000000..8a52a58cecf --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml new file mode 100644 index 00000000000..74c57bf15e2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE new file mode 100644 index 00000000000..432d1aeb01d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js new file mode 100755 index 00000000000..d95de15ae97 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt new file mode 100644 index 00000000000..f952aa2c7a9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt @@ -0,0 +1,12 @@ +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js new file mode 100644 index 00000000000..e6924212e6a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js @@ -0,0 +1,6 @@ +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js new file mode 100644 index 00000000000..6ce241b58c1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js @@ -0,0 +1,98 @@ +var path = require('path'); +var fs = require('fs'); +var _0777 = parseInt('0777', 8); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + p = path.resolve(p); + + xfs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), opts, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, opts, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + p = path.resolve(p); + + try { + xfs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json new file mode 100644 index 00000000000..57cd3af808e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "mkdirp@~0.5.0", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "mkdirp@>=0.5.0 <0.6.0", + "_id": "mkdirp@0.5.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/mkdirp", + "_nodeVersion": "2.0.0", + "_npmUser": { + "email": "substack@gmail.com", + "name": "substack" + }, + "_npmVersion": "2.9.0", + "_phantomChildren": {}, + "_requested": { + "name": "mkdirp", + "raw": "mkdirp@~0.5.0", + "rawSpec": "~0.5.0", + "scope": null, + "spec": ">=0.5.0 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/fstream", + "/fsevents/node-pre-gyp" + ], + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "_shrinkwrap": null, + "_spec": "mkdirp@~0.5.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "bugs": { + "url": "https://github.com/substack/node-mkdirp/issues" + }, + "dependencies": { + "minimist": "0.0.8" + }, + "description": "Recursively mkdir, like `mkdir -p`", + "devDependencies": { + "mock-fs": "2 >=2.7.0", + "tap": "1" + }, + "directories": {}, + "dist": { + "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "tarball": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", + "homepage": "https://github.com/substack/node-mkdirp#readme", + "keywords": [ + "directory", + "mkdir" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "mail@substack.net", + "name": "substack" + } + ], + "name": "mkdirp", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/substack/node-mkdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.5.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown new file mode 100644 index 00000000000..3cc13153851 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown @@ -0,0 +1,100 @@ +# mkdirp + +Like `mkdir -p`, but in node.js! + +[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) + +# example + +## pow.js + +```js +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); +``` + +Output + +``` +pow! +``` + +And now /tmp/foo/bar/baz exists, huzzah! + +# methods + +```js +var mkdirp = require('mkdirp'); +``` + +## mkdirp(dir, opts, cb) + +Create a new directory and any necessary subdirectories at `dir` with octal +permission string `opts.mode`. If `opts` is a non-object, it will be treated as +the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +`cb(err, made)` fires with the error or the first directory `made` +that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and +`opts.fs.stat(path, cb)`. + +## mkdirp.sync(dir, opts) + +Synchronously create a new directory and any necessary subdirectories at `dir` +with octal permission string `opts.mode`. If `opts` is a non-object, it will be +treated as the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +Returns the first directory that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and +`opts.fs.statSync(path)`. + +# usage + +This package also ships with a `mkdirp` command. + +``` +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install mkdirp +``` + +to get the library, or + +``` +npm install -g mkdirp +``` + +to get the command. + +# license + +MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js new file mode 100644 index 00000000000..6a404b932f9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js @@ -0,0 +1,41 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); +var _0744 = parseInt('0744', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +test('chmod-pre', function (t) { + var mode = _0744 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); + t.end(); + }); + }); +}); + +test('chmod', function (t) { + var mode = _0755 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.end(); + }); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js new file mode 100644 index 00000000000..2433b9ad548 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js @@ -0,0 +1,38 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +// a file in the way +var itw = ps.slice(0, 3).join('/'); + + +test('clobber-pre', function (t) { + console.error("about to write to "+itw) + fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); + + fs.stat(itw, function (er, stat) { + t.ifError(er) + t.ok(stat && stat.isFile(), 'should be file') + t.end() + }) +}) + +test('clobber', function (t) { + t.plan(2); + mkdirp(file, _0755, function (err) { + t.ok(err); + t.equal(err.code, 'ENOTDIR'); + t.end(); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js new file mode 100644 index 00000000000..eaa8921c7f1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('woo', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js new file mode 100644 index 00000000000..97186b62e0b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js @@ -0,0 +1,29 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs', function (t) { + t.plan(5); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { + t.ifError(err); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js new file mode 100644 index 00000000000..6c370aa6e93 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js @@ -0,0 +1,27 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs sync', function (t) { + t.plan(4); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp.sync(file, { fs: xfs, mode: _0755 }); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js new file mode 100644 index 00000000000..fbce44b82ba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('async perm', function (t) { + t.plan(5); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); + +test('async root perm', function (t) { + mkdirp('/tmp', _0755, function (err) { + if (err) t.fail(err); + t.end(); + }); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js new file mode 100644 index 00000000000..398229fe54a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js @@ -0,0 +1,36 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync perm', function (t) { + t.plan(4); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; + + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); + +test('sync root perm', function (t) { + t.plan(3); + + var file = '/tmp'; + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js new file mode 100644 index 00000000000..b0b9e183c90 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js @@ -0,0 +1,37 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('race', function (t) { + t.plan(10); + var ps = [ '', 'tmp' ]; + + for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); + } + var file = ps.join('/'); + + var res = 2; + mk(file); + + mk(file); + + function mk (file, cb) { + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); + } +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js new file mode 100644 index 00000000000..4ddb34276a7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('rel', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var cwd = process.cwd(); + process.chdir('/tmp'); + + var file = [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + process.chdir(cwd); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js new file mode 100644 index 00000000000..bce68e5613e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js @@ -0,0 +1,25 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, '/tmp/' + x); + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, null); + }); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js new file mode 100644 index 00000000000..7c222d3558d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js @@ -0,0 +1,24 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(2); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + // Note that this will throw on failure, which will fail the test. + var made = mkdirp.sync(file); + t.equal(made, '/tmp/' + x); + + // making the same file again should have no effect. + made = mkdirp.sync(file); + t.equal(made, null); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js new file mode 100644 index 00000000000..9e7d079d9fc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js @@ -0,0 +1,19 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +test('root', function (t) { + // '/' on unix, 'c:/' on windows. + var file = path.resolve('/'); + + mkdirp(file, _0755, function (err) { + if (err) throw err + fs.stat(file, function (er, stat) { + if (er) throw er + t.ok(stat.isDirectory(), 'target is a directory'); + t.end(); + }) + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js new file mode 100644 index 00000000000..8c8dc938c8b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file, _0755); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js new file mode 100644 index 00000000000..2033c63a414 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('implicit mode from umask', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0777 & (~process.umask())); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js new file mode 100644 index 00000000000..11a76147496 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('umask sync modes', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore new file mode 100644 index 00000000000..d1aa0ce42e1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore @@ -0,0 +1,5 @@ +node_modules +test +History.md +Makefile +component.json diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md new file mode 100644 index 00000000000..32fdfc17623 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md @@ -0,0 +1,66 @@ + +0.7.1 / 2015-04-20 +================== + + * prevent extraordinary long inputs (@evilpacket) + * Fixed broken readme link + +0.7.0 / 2014-11-24 +================== + + * add time abbreviations, updated tests and readme for the new units + * fix example in the readme. + * add LICENSE file + +0.6.2 / 2013-12-05 +================== + + * Adding repository section to package.json to suppress warning from NPM. + +0.6.1 / 2013-05-10 +================== + + * fix singularization [visionmedia] + +0.6.0 / 2013-03-15 +================== + + * fix minutes + +0.5.1 / 2013-02-24 +================== + + * add component namespace + +0.5.0 / 2012-11-09 +================== + + * add short formatting as default and .long option + * add .license property to component.json + * add version to component.json + +0.4.0 / 2012-10-22 +================== + + * add rounding to fix crazy decimals + +0.3.0 / 2012-09-07 +================== + + * fix `ms()` [visionmedia] + +0.2.0 / 2012-09-03 +================== + + * add component.json [visionmedia] + * add days support [visionmedia] + * add hours support [visionmedia] + * add minutes support [visionmedia] + * add seconds support [visionmedia] + * add ms string support [visionmedia] + * refactor tests to facilitate ms(number) [visionmedia] + +0.1.0 / 2012-03-07 +================== + + * Initial release diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE new file mode 100644 index 00000000000..6c07561b62d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2014 Guillermo Rauch + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md new file mode 100644 index 00000000000..9b4fd03581b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md @@ -0,0 +1,35 @@ +# ms.js: miliseconds conversion utility + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('100') // 100 +``` + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download). +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as +a number (e.g: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of +equivalent ms is returned. + +## License + +MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js new file mode 100644 index 00000000000..4f927716967 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js @@ -0,0 +1,125 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} options + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options){ + options = options || {}; + if ('string' == typeof val) return parse(val); + return options.long + ? long(val) + : short(val); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = '' + str; + if (str.length > 10000) return; + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); + if (!match) return; + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function short(ms) { + if (ms >= d) return Math.round(ms / d) + 'd'; + if (ms >= h) return Math.round(ms / h) + 'h'; + if (ms >= m) return Math.round(ms / m) + 'm'; + if (ms >= s) return Math.round(ms / s) + 's'; + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function long(ms) { + return plural(ms, d, 'day') + || plural(ms, h, 'hour') + || plural(ms, m, 'minute') + || plural(ms, s, 'second') + || ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) return; + if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json new file mode 100644 index 00000000000..5598151a933 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "ms@0.7.1", + "/Users/eshanker/Code/fsevents/node_modules/debug" + ] + ], + "_from": "ms@0.7.1", + "_id": "ms@0.7.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/ms", + "_nodeVersion": "0.12.2", + "_npmUser": { + "email": "rauchg@gmail.com", + "name": "rauchg" + }, + "_npmVersion": "2.7.5", + "_phantomChildren": {}, + "_requested": { + "name": "ms", + "raw": "ms@0.7.1", + "rawSpec": "0.7.1", + "scope": null, + "spec": "0.7.1", + "type": "version" + }, + "_requiredBy": [ + "/fsevents/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098", + "_shrinkwrap": null, + "_spec": "ms@0.7.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/debug", + "bugs": { + "url": "https://github.com/guille/ms.js/issues" + }, + "component": { + "scripts": { + "ms/index.js": "index.js" + } + }, + "dependencies": {}, + "description": "Tiny ms conversion utility", + "devDependencies": { + "expect.js": "*", + "mocha": "*", + "serve": "*" + }, + "directories": {}, + "dist": { + "shasum": "9cd13c03adbff25b65effde7ce864ee952017098", + "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + }, + "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909", + "homepage": "https://github.com/guille/ms.js", + "main": "./index", + "maintainers": [ + { + "email": "rauchg@gmail.com", + "name": "rauchg" + } + ], + "name": "ms", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/guille/ms.js.git" + }, + "scripts": {}, + "version": "0.7.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md new file mode 100644 index 00000000000..17e467c10b1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md @@ -0,0 +1,323 @@ +# node-pre-gyp changelog + +## 0.6.29 + + - Add known node versions for v0.10.45, v0.12.14, v4.4.4, v5.11.1, and v6.1.0 + +## 0.6.28 + + - Now more verbose when remote binaries are not available. This is needed since npm is increasingly more quiet by default + and users need to know why builds are falling back to source compiles that might then error out. + +## 0.6.27 + + - Add known node version for node v6 + - Stopped bundling dependencies + - Documented method for module authors to avoid bundling node-pre-gyp + - See https://github.com/mapbox/node-pre-gyp/tree/master#configuring for details + +## 0.6.26 + + - Skip validation for nw runtime (https://github.com/mapbox/node-pre-gyp/pull/181) via @fleg + +## 0.6.25 + + - Improved support for auto-detection of electron runtime in `node-pre-gyp.find()` + - Pull request from @enlight - https://github.com/mapbox/node-pre-gyp/pull/187 + - Add known node version for 4.4.1 and 5.9.1 + +## 0.6.24 + + - Add known node version for 5.8.0, 5.9.0, and 4.4.0. + +## 0.6.23 + + - Add known node version for 0.10.43, 0.12.11, 4.3.2, and 5.7.1. + +## 0.6.22 + + - Add known node version for 4.3.1, and 5.7.0. + +## 0.6.21 + + - Add known node version for 0.10.42, 0.12.10, 4.3.0, and 5.6.0. + +## 0.6.20 + + - Add known node version for 4.2.5, 4.2.6, 5.4.0, 5.4.1,and 5.5.0. + +## 0.6.19 + + - Add known node version for 4.2.4 + +## 0.6.18 + + - Add new known node versions for 0.10.x, 0.12.x, 4.x, and 5.x + +## 0.6.17 + + - Re-tagged to fix packaging problem of `Error: Cannot find module 'isarray'` + +## 0.6.16 + + - Added known version in crosswalk for 5.1.0. + +## 0.6.15 + + - Upgraded tar-pack (https://github.com/mapbox/node-pre-gyp/issues/182) + - Support custom binary hosting mirror (https://github.com/mapbox/node-pre-gyp/pull/170) + - Added known version in crosswalk for 4.2.2. + +## 0.6.14 + + - Added node 5.x version + +## 0.6.13 + + - Added more known node 4.x versions + +## 0.6.12 + + - Added support for [Electron](http://electron.atom.io/). Just pass the `--runtime=electron` flag when building/installing. Thanks @zcbenz + +## 0.6.11 + + - Added known node and io.js versions including more 3.x and 4.x versions + +## 0.6.10 + + - Added known node and io.js versions including 3.x and 4.x versions + - Upgraded `tar` dep + +## 0.6.9 + + - Upgraded `rc` dep + - Updated known io.js version: v2.4.0 + +## 0.6.8 + + - Upgraded `semver` and `rimraf` deps + - Updated known node and io.js versions + +## 0.6.7 + + - Fixed `node_abi` versions for io.js 1.1.x -> 1.8.x (should be 43, but was stored as 42) (refs https://github.com/iojs/build/issues/94) + +## 0.6.6 + + - Updated with known io.js 2.0.0 version + +## 0.6.5 + + - Now respecting `npm_config_node_gyp` (https://github.com/npm/npm/pull/4887) + - Updated to semver@4.3.2 + - Updated known node v0.12.x versions and io.js 1.x versions. + +## 0.6.4 + + - Improved support for `io.js` (@fengmk2) + - Test coverage improvements (@mikemorris) + - Fixed support for `--dist-url` that regressed in 0.6.3 + +## 0.6.3 + + - Added support for passing raw options to node-gyp using `--` separator. Flags passed after + the `--` to `node-pre-gyp configure` will be passed directly to gyp while flags passed + after the `--` will be passed directly to make/visual studio. + - Added `node-pre-gyp configure` command to be able to call `node-gyp configure` directly + - Fix issue with require validation not working on windows 7 (@edgarsilva) + +## 0.6.2 + + - Support for io.js >= v1.0.2 + - Deferred require of `request` and `tar` to help speed up command line usage of `node-pre-gyp`. + +## 0.6.1 + + - Fixed bundled `tar` version + +## 0.6.0 + + - BREAKING: node odd releases like v0.11.x now use `major.minor.patch` for `{node_abi}` instead of `NODE_MODULE_VERSION` (#124) + - Added support for `toolset` option in versioning. By default is an empty string but `--toolset` can be passed to publish or install to select alternative binaries that target a custom toolset like C++11. For example to target Visual Studio 2014 modules like node-sqlite3 use `--toolset=v140`. + - Added support for `--no-rollback` option to request that a failed binary test does not remove the binary module leaves it in place. + - Added support for `--update-binary` option to request an existing binary be re-installed and the check for a valid local module be skipped. + - Added support for passing build options from `npm` through `node-pre-gyp` to `node-gyp`: `--nodedir`, `--disturl`, `--python`, and `--msvs_version` + +## 0.5.31 + + - Added support for deducing node_abi for node.js runtime from previous release if the series is even + - Added support for --target=0.10.33 + +## 0.5.30 + + - Repackaged with latest bundled deps + +## 0.5.29 + + - Added support for semver `build`. + - Fixed support for downloading from urls that include `+`. + +## 0.5.28 + + - Now reporting unix style paths only in reveal command + +## 0.5.27 + + - Fixed support for auto-detecting s3 bucket name when it contains `.` - @taavo + - Fixed support for installing when path contains a `'` - @halfdan + - Ported tests to mocha + +## 0.5.26 + + - Fix node-webkit support when `--target` option is not provided + +## 0.5.25 + + - Fix bundling of deps + +## 0.5.24 + + - Updated ABI crosswalk to incldue node v0.10.30 and v0.10.31 + +## 0.5.23 + + - Added `reveal` command. Pass no options to get all versioning data as json. Pass a second arg to grab a single versioned property value + - Added support for `--silent` (shortcut for `--loglevel=silent`) + +## 0.5.22 + + - Fixed node-webkit versioning name (NOTE: node-webkit support still experimental) + +## 0.5.21 + + - New package to fix `shasum check failed` error with v0.5.20 + +## 0.5.20 + + - Now versioning node-webkit binaries based on major.minor.patch - assuming no compatible ABI across versions (#90) + +## 0.5.19 + + - Updated to know about more node-webkit releases + +## 0.5.18 + + - Updated to know about more node-webkit releases + +## 0.5.17 + + - Updated to know about node v0.10.29 release + +## 0.5.16 + + - Now supporting all aws-sdk configuration parameters (http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) (#86) + +## 0.5.15 + + - Fixed installation of windows packages sub directories on unix systems (#84) + +## 0.5.14 + + - Finished support for cross building using `--target_platform` option (#82) + - Now skipping binary validation on install if target arch/platform do not match the host. + - Removed multi-arch validing for OS X since it required a FAT node.js binary + +## 0.5.13 + + - Fix problem in 0.5.12 whereby the wrong versions of mkdirp and semver where bundled. + +## 0.5.12 + + - Improved support for node-webkit (@Mithgol) + +## 0.5.11 + + - Updated target versions listing + +## 0.5.10 + + - Fixed handling of `-debug` flag passed directory to node-pre-gyp (#72) + - Added optional second arg to `node_pre_gyp.find` to customize the default versioning options used to locate the runtime binary + - Failed install due to `testbinary` check failure no longer leaves behind binary (#70) + +## 0.5.9 + + - Fixed regression in `testbinary` command causing installs to fail on windows with 0.5.7 (#60) + +## 0.5.8 + + - Started bundling deps + +## 0.5.7 + + - Fixed the `testbinary` check, which is used to determine whether to re-download or source compile, to work even in complex dependency situations (#63) + - Exposed the internal `testbinary` command in node-pre-gyp command line tool + - Fixed minor bug so that `fallback_to_build` option is always respected + +## 0.5.6 + + - Added support for versioning on the `name` value in `package.json` (#57). + - Moved to using streams for reading tarball when publishing (#52) + +## 0.5.5 + + - Improved binary validation that also now works with node-webkit (@Mithgol) + - Upgraded test apps to work with node v0.11.x + - Improved test coverage + +## 0.5.4 + + - No longer depends on external install of node-gyp for compiling builds. + +## 0.5.3 + + - Reverted fix for debian/nodejs since it broke windows (#45) + +## 0.5.2 + + - Support for debian systems where the node binary is named `nodejs` (#45) + - Added `bin/node-pre-gyp.cmd` to be able to run command on windows locally (npm creates an .npm automatically when globally installed) + - Updated abi-crosswalk with node v0.10.26 entry. + +## 0.5.1 + + - Various minor bug fixes, several improving windows support for publishing. + +## 0.5.0 + + - Changed property names in `binary` object: now required are `module_name`, `module_path`, and `host`. + - Now `module_path` supports versioning, which allows developers to opt-in to using a versioned install path (#18). + - Added `remote_path` which also supports versioning. + - Changed `remote_uri` to `host`. + +## 0.4.2 + + - Added support for `--target` flag to request cross-compile against a specific node/node-webkit version. + - Added preliminary support for node-webkit + - Fixed support for `--target_arch` option being respected in all cases. + +## 0.4.1 + + - Fixed exception when only stderr is available in binary test (@bendi / #31) + +## 0.4.0 + + - Enforce only `https:` based remote publishing access. + - Added `node-pre-gyp info` command to display listing of published binaries + - Added support for changing the directory node-pre-gyp should build in with the `-C/--directory` option. + - Added support for S3 prefixes. + +## 0.3.1 + + - Added `unpublish` command. + - Fixed module path construction in tests. + - Added ability to disable falling back to build behavior via `npm install --fallback-to-build=false` which overrides setting in a depedencies package.json `install` target. + +## 0.3.0 + + - Support for packaging all files in `module_path` directory - see `app4` for example + - Added `testpackage` command. + - Changed `clean` command to only delete `.node` not entire `build` directory since node-gyp will handle that. + - `.node` modules must be in a folder of there own since tar-pack will remove everything when it unpacks. + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE new file mode 100644 index 00000000000..8f5fce91b08 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE @@ -0,0 +1,27 @@ +Copyright (c), Mapbox + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of node-pre-gyp nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml new file mode 100644 index 00000000000..bdfaaafb331 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml @@ -0,0 +1,30 @@ +environment: + matrix: + - nodejs_version: 0.10.36 + - nodejs_version: 4 + - nodejs_version: 5 + +platform: + - x64 + - x86 + +shallow_clone: true + +install: + - ps: Install-Product node $env:nodejs_version $env:Platform + - node --version + - npm --version + - SET PATH=%APPDATA%\npm;%PATH% + - npm update -g npm + - npm --version + - node -e "console.log(process.arch);" + - SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% + - if "%PLATFORM%" == "x64" set PATH=C:\Python27-x64;%PATH% + - if "%PLATFORM%" == "x86" SET PATH=C:\python27;%PATH% + - npm install + - npm test + - .\scripts\test.bat + +build: off +test: off +deploy: off diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp new file mode 100755 index 00000000000..4f0e1d0b681 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp @@ -0,0 +1,131 @@ +#!/usr/bin/env node + +"use strict"; + +/** + * Set the title. + */ + +process.title = 'node-pre-gyp'; + +/** + * Module dependencies. + */ + +var node_pre_gyp = require('../'); +var log = require('npmlog'); + +/** + * Process and execute the selected commands. + */ + +var prog = new node_pre_gyp.Run(); +var completed = false; +prog.parseArgv(process.argv); + +if (prog.todo.length === 0) { + if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) { + console.log('v%s', prog.version); + } else { + console.log('%s', prog.usage()); + } + return process.exit(0); +} + +// if --no-color is passed +if (prog.opts && prog.opts.hasOwnProperty('color') && !prog.opts.color) { + log.disableColor(); +} + +log.info('it worked if it ends with', 'ok'); +log.verbose('cli', process.argv); +log.info('using', process.title + '@%s', prog.version); +log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch); + + +/** + * Change dir if -C/--directory was passed. + */ + +var dir = prog.opts.directory; +if (dir) { + var fs = require('fs'); + try { + var stat = fs.statSync(dir); + if (stat.isDirectory()) { + log.info('chdir', dir); + process.chdir(dir); + } else { + log.warn('chdir', dir + ' is not a directory'); + } + } catch (e) { + if (e.code === 'ENOENT') { + log.warn('chdir', dir + ' is not a directory'); + } else { + log.warn('chdir', 'error during chdir() "%s"', e.message); + } + } +} + +function run () { + var command = prog.todo.shift(); + if (!command) { + // done! + completed = true; + log.info('ok'); + return; + } + + prog.commands[command.name](command.args, function (err) { + if (err) { + log.error(command.name + ' error'); + log.error('stack', err.stack); + errorMessage(); + log.error('not ok'); + console.log(err.message); + return process.exit(1); + } + var args_array = [].slice.call(arguments, 1); + if (args_array.length) { + console.log.apply(console, args_array); + } + // now run the next command in the queue + process.nextTick(run); + }); +} + +process.on('exit', function (code) { + if (!completed && !code) { + log.error('Completion callback never invoked!'); + issueMessage(); + process.exit(6); + } +}); + +process.on('uncaughtException', function (err) { + log.error('UNCAUGHT EXCEPTION'); + log.error('stack', err.stack); + issueMessage(); + process.exit(7); +}); + +function errorMessage () { + // copied from npm's lib/util/error-handler.js + var os = require('os'); + log.error('System', os.type() + ' ' + os.release()); + log.error('command', process.argv.map(JSON.stringify).join(' ')); + log.error('cwd', process.cwd()); + log.error('node -v', process.version); + log.error(process.title+' -v', 'v' + prog.package.version); +} + +function issueMessage () { + errorMessage(); + log.error('', [ 'This is a bug in `'+process.title+'`.', + 'Try to update '+process.title+' and file an issue if it does not help:', + ' ', + ].join('\n')); +} + +// start running the given commands! +run(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd new file mode 100644 index 00000000000..46e14b54172 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd @@ -0,0 +1,2 @@ +@echo off +node "%~dp0\node-pre-gyp" %* diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js new file mode 100644 index 00000000000..1074fa3b5a7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js @@ -0,0 +1,43 @@ +"use strict"; + +module.exports = exports = build; + +exports.usage = 'Attempts to compile the module by dispatching to node-gyp or nw-gyp'; + +var compile = require('./util/compile.js'); +var handle_gyp_opts = require('./util/handle_gyp_opts.js'); +var configure = require('./configure.js'); + +function do_build(gyp,argv,callback) { + handle_gyp_opts(gyp,argv,function(err,result) { + var final_args = ['build'].concat(result.gyp).concat(result.pre); + if (result.unparsed.length > 0) { + final_args = final_args. + concat(['--']). + concat(result.unparsed); + } + compile.run_gyp(final_args,result.opts,function(err) { + return callback(err); + }); + }); +} + +function build(gyp, argv, callback) { + + // Form up commands to pass to node-gyp: + // We map `node-pre-gyp build` to `node-gyp configure build` so that we do not + // trigger a clean and therefore do not pay the penalty of a full recompile + if (argv.length && (argv.indexOf('rebuild') > -1)) { + // here we map `node-pre-gyp rebuild` to `node-gyp rebuild` which internally means + // "clean + configure + build" and triggers a full recompile + compile.run_gyp(['clean'],{},function(err) { + if (err) return callback(err); + configure(gyp,argv,function(err) { + if (err) return callback(err); + return do_build(gyp,argv,callback); + }); + }); + } else { + return do_build(gyp,argv,callback); + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js new file mode 100644 index 00000000000..a1289f68a19 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js @@ -0,0 +1,23 @@ +"use strict"; + +module.exports = exports = clean; + +exports.usage = 'Removes the entire folder containing the compiled .node module'; + +var fs = require('fs'); +var rm = require('rimraf'); +var exists = require('fs').exists || require('path').exists; +var versioning = require('./util/versioning.js'); + +function clean (gyp, argv, callback) { + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + var to_delete = opts.module_path; + exists(to_delete, function(found) { + if (found) { + if (!gyp.opts.silent_clean) console.log('['+package_json.name+'] Removing "%s"', to_delete); + return rm(to_delete, callback); + } + return callback(); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js new file mode 100644 index 00000000000..1ea56642b66 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js @@ -0,0 +1,48 @@ +"use strict"; + +module.exports = exports = configure; + +exports.usage = 'Attempts to configure node-gyp or nw-gyp build'; + +var compile = require('./util/compile.js'); +var handle_gyp_opts = require('./util/handle_gyp_opts.js'); + +function configure(gyp, argv, callback) { + handle_gyp_opts(gyp,argv,function(err,result) { + var final_args = result.gyp.concat(result.pre); + // pull select node-gyp configure options out of the npm environ + var known_gyp_args = ['dist-url','python','nodedir','msvs_version']; + known_gyp_args.forEach(function(key) { + var val = gyp.opts[key] || gyp.opts[key.replace('-','_')]; + if (val) { + final_args.push('--'+key+'='+val); + } + }); + // --ensure=false tell node-gyp to re-install node development headers + // but it is only respected by node-gyp install, so we have to call install + // as a separate step if the user passes it + if (gyp.opts.ensure === false) { + var install_args = final_args.concat(['install','--ensure=false']); + compile.run_gyp(install_args,result.opts,function(err) { + if (err) return callback(err); + if (result.unparsed.length > 0) { + final_args = final_args. + concat(['--']). + concat(result.unparsed); + } + compile.run_gyp(['configure'].concat(final_args),result.opts,function(err) { + return callback(err); + }); + }); + } else { + if (result.unparsed.length > 0) { + final_args = final_args. + concat(['--']). + concat(result.unparsed); + } + compile.run_gyp(['configure'].concat(final_args),result.opts,function(err) { + return callback(err); + }); + } + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js new file mode 100644 index 00000000000..aff9bf8327e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js @@ -0,0 +1,40 @@ +"use strict"; + +module.exports = exports = unpublish; + +exports.usage = 'Lists all published binaries (requires aws-sdk)'; + +var fs = require('fs'); +var log = require('npmlog'); +var versioning = require('./util/versioning.js'); +var s3_setup = require('./util/s3_setup.js'); +var config = require('rc')("node_pre_gyp",{acl:"public-read"}); + +function unpublish(gyp, argv, callback) { + var AWS = require("aws-sdk"); + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + s3_setup.detect(opts.hosted_path,config); + AWS.config.update(config); + var s3 = new AWS.S3(); + var s3_opts = { Bucket: config.bucket, + Prefix: config.prefix + }; + s3.listObjects(s3_opts, function(err, meta){ + if (err && err.code == 'NotFound') { + return callback(new Error('['+package_json.name+'] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/'+config.prefix)); + } else if(err) { + return callback(err); + } else { + log.verbose(JSON.stringify(meta,null,1)); + if (meta && meta.Contents) { + meta.Contents.forEach(function(obj) { + console.log(obj.Key); + }); + } else { + console.error('['+package_json.name+'] No objects found at https://' + s3_opts.Bucket + '.s3.amazonaws.com/'+config.prefix ); + } + return callback(); + } + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js new file mode 100644 index 00000000000..ce2d56ffc6a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js @@ -0,0 +1,215 @@ +"use strict"; + +module.exports = exports = install; + +exports.usage = 'Attempts to install pre-built binary for module'; + +var fs = require('fs'); +var path = require('path'); +var zlib = require('zlib'); +var log = require('npmlog'); +var existsAsync = fs.exists || path.exists; +var versioning = require('./util/versioning.js'); +var testbinary = require('./testbinary.js'); +var clean = require('./clean.js'); + +function download(uri,opts,callback) { + log.http('GET', uri); + + var req = null; + var requestOpts = { + uri: uri.replace('+','%2B'), + headers: { + 'User-Agent': 'node-pre-gyp (node ' + process.version + ')' + } + }; + + var proxyUrl = opts.proxy || + process.env.http_proxy || + process.env.HTTP_PROXY || + process.env.npm_config_proxy; + if (proxyUrl) { + if (/^https?:\/\//i.test(proxyUrl)) { + log.verbose('download', 'using proxy url: "%s"', proxyUrl); + requestOpts.proxy = proxyUrl; + } else { + log.warn('download', 'ignoring invalid "proxy" config setting: "%s"', proxyUrl); + } + } + try { + req = require('request')(requestOpts); + } catch (e) { + return callback(e); + } + if (req) { + req.on('response', function (res) { + log.http(res.statusCode, uri); + }); + } + return callback(null,req); +} + +function place_binary(from,to,opts,callback) { + download(from,opts,function(err,req) { + if (err) return callback(err); + if (!req) return callback(new Error("empty req")); + var badDownload = false; + var extractCount = 0; + var gunzip = zlib.createGunzip(); + var extracter = require('tar').Extract({ path: to, strip: 1}); + + function afterTarball(err) { + if (err) return callback(err); + if (badDownload) return callback(new Error("bad download")); + if (extractCount === 0) { + return callback(new Error('There was a fatal problem while downloading/extracting the tarball')); + } + log.info('tarball', 'done parsing tarball'); + callback(); + } + + function filter_func(entry) { + // ensure directories are +x + // https://github.com/mapnik/node-mapnik/issues/262 + entry.props.mode |= (entry.props.mode >>> 2) & parseInt('0111',8); + log.info('install','unpacking ' + entry.path); + extractCount++; + } + + gunzip.on('error', callback); + extracter.on('entry', filter_func); + extracter.on('error', callback); + extracter.on('end', afterTarball); + + req.on('error', function(err) { + badDownload = true; + return callback(err); + }); + + req.on('close', function () { + if (extractCount === 0) { + return callback(new Error('Connection closed while downloading tarball file')); + } + }); + + req.on('response', function(res) { + if (res.statusCode !== 200) { + badDownload = true; + if (res.statusCode == 404) { + return callback(new Error('Pre-built binary not available for your system, looked for ' + from)); + } else { + return callback(new Error(res.statusCode + ' status code downloading tarball ' + from)); + } + } + // start unzipping and untaring + req.pipe(gunzip).pipe(extracter); + }); + }); +} + +function do_build(gyp,argv,callback) { + gyp.todo.push( { name: 'build', args: ['rebuild'] } ); + process.nextTick(callback); +} + +function print_fallback_error(err,opts,package_json) { + var fallback_message = ' (falling back to source compile with node-gyp)'; + var full_message = "Pre-built binaries not found for " + package_json.name + "@" + package_json.version; + full_message += " and " + opts.runtime + "@" + (opts.target || process.versions.node) + " (" + opts.node_abi + " ABI)"; + full_message += fallback_message; + log.error("Tried to download: " + opts.hosted_tarball); + log.error(full_message); + log.http(err.message); +} + +function install(gyp, argv, callback) { + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var source_build = gyp.opts['build-from-source'] || gyp.opts.build_from_source; + var update_binary = gyp.opts['update-binary'] || gyp.opts.update_binary; + var should_do_source_build = source_build === package_json.name || (source_build === true || source_build === 'true'); + var no_rollback = gyp.opts.hasOwnProperty('rollback') && gyp.opts.rollback === false; + if (should_do_source_build) { + log.info('build','requesting source compile'); + return do_build(gyp,argv,callback); + } else { + var fallback_to_build = gyp.opts['fallback-to-build'] || gyp.opts.fallback_to_build; + var should_do_fallback_build = fallback_to_build === package_json.name || (fallback_to_build === true || fallback_to_build === 'true'); + // but allow override from npm + if (process.env.npm_config_argv) { + var cooked = JSON.parse(process.env.npm_config_argv).cooked; + var match = cooked.indexOf("--fallback-to-build"); + if (match > -1 && cooked.length > match && cooked[match+1] == "false") { + should_do_fallback_build = false; + log.info('install','Build fallback disabled via npm flag: --fallback-to-build=false'); + } + } + var opts; + try { + opts = versioning.evaluate(package_json, gyp.opts); + } catch (err) { + return callback(err); + } + var from = opts.hosted_tarball; + var to = opts.module_path; + var binary_module = path.join(to,opts.module_name + '.node'); + if (existsAsync(binary_module,function(found) { + if (found && !update_binary) { + testbinary(gyp, argv, function(err) { + if (err) { + console.error('['+package_json.name+'] ' + err.message); + log.error("Testing local pre-built binary failed, attempting to re-download"); + place_binary(from,to,opts,function(err) { + if (err) { + if (should_do_fallback_build) { + print_fallback_error(err,opts,package_json); + return do_build(gyp,argv,callback); + } else { + return callback(err); + } + } else { + console.log('['+package_json.name+'] Success: "' + binary_module + '" is reinstalled via remote'); + return callback(); + } + }); + } else { + console.log('['+package_json.name+'] Success: "' + binary_module + '" already installed'); + console.log('Pass --update-binary to reinstall or --build-from-source to recompile'); + return callback(); + } + }); + } else { + if (!update_binary) log.info('check','checked for "' + binary_module + '" (not found)'); + place_binary(from,to,opts,function(err) { + if (err && should_do_fallback_build) { + print_fallback_error(err,opts,package_json); + return do_build(gyp,argv,callback); + } else if (err) { + return callback(err); + } else { + testbinary(gyp, argv, function(err) { + if (err) { + if (no_rollback) { + return callback(err); + } + gyp.opts.silent_clean = true; + clean(gyp, argv, function(error) { + if (error) console.log(error); + if (should_do_fallback_build) { + console.error('['+package_json.name+'] ' + err.message); + log.error("Testing pre-built binary failed, attempting to source compile"); + return do_build(gyp,argv,callback); + } else { + return callback(err); + } + }); + } else { + console.log('['+package_json.name+'] Success: "' + binary_module + '" is installed via remote'); + return callback(); + } + }); + } + }); + } + })); + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js new file mode 100644 index 00000000000..f0fff781c2e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js @@ -0,0 +1,192 @@ +"use strict"; + +/** + * Module exports. + */ + +module.exports = exports; + +/** + * Module dependencies. + */ + +var path = require('path'); +var nopt = require('nopt'); +var log = require('npmlog'); +var EE = require('events').EventEmitter; +var inherits = require('util').inherits; +var commands = [ + 'clean', + 'install', + 'reinstall', + 'build', + 'rebuild', + 'package', + 'testpackage', + 'publish', + 'unpublish', + 'info', + 'testbinary', + 'reveal', + 'configure' + ]; +var aliases = {}; + +// differentiate node-pre-gyp's logs from npm's +log.heading = 'node-pre-gyp'; + +exports.find = require('./pre-binding').find; + +function Run() { + var self = this; + + this.commands = {}; + + commands.forEach(function (command) { + self.commands[command] = function (argv, callback) { + log.verbose('command', command, argv); + return require('./' + command)(self, argv, callback); + }; + }); +} +inherits(Run, EE); +exports.Run = Run; +var proto = Run.prototype; + +/** + * Export the contents of the package.json. + */ + +proto.package = require('../package'); + +/** + * nopt configuration definitions + */ + +proto.configDefs = { + help: Boolean, // everywhere + arch: String, // 'configure' + debug: Boolean, // 'build' + directory: String, // bin + proxy: String, // 'install' + loglevel: String, // everywhere +}; + +/** + * nopt shorthands + */ + +proto.shorthands = { + release: '--no-debug', + C: '--directory', + debug: '--debug', + j: '--jobs', + silent: '--loglevel=silent', + silly: '--loglevel=silly', + verbose: '--loglevel=verbose', +}; + +/** + * expose the command aliases for the bin file to use. + */ + +proto.aliases = aliases; + +/** + * Parses the given argv array and sets the 'opts', + * 'argv' and 'command' properties. + */ + +proto.parseArgv = function parseOpts (argv) { + this.opts = nopt(this.configDefs, this.shorthands, argv); + this.argv = this.opts.argv.remain.slice(); + var commands = this.todo = []; + + // create a copy of the argv array with aliases mapped + argv = this.argv.map(function (arg) { + // is this an alias? + if (arg in this.aliases) { + arg = this.aliases[arg]; + } + return arg; + }, this); + + // process the mapped args into "command" objects ("name" and "args" props) + argv.slice().forEach(function (arg) { + if (arg in this.commands) { + var args = argv.splice(0, argv.indexOf(arg)); + argv.shift(); + if (commands.length > 0) { + commands[commands.length - 1].args = args; + } + commands.push({ name: arg, args: [] }); + } + }, this); + if (commands.length > 0) { + commands[commands.length - 1].args = argv.splice(0); + } + + // support for inheriting config env variables from npm + var npm_config_prefix = 'npm_config_'; + Object.keys(process.env).forEach(function (name) { + if (name.indexOf(npm_config_prefix) !== 0) return; + var val = process.env[name]; + if (name === npm_config_prefix + 'loglevel') { + log.level = val; + } else { + // add the user-defined options to the config + name = name.substring(npm_config_prefix.length); + // avoid npm argv clobber already present args + // which avoids problem of 'npm test' calling + // script that runs unique npm install commands + if (name === 'argv') { + if (this.opts.argv && + this.opts.argv.remain && + this.opts.argv.remain.length) { + // do nothing + } else { + this.opts[name] = val; + } + } else { + this.opts[name] = val; + } + } + }, this); + + if (this.opts.loglevel) { + log.level = this.opts.loglevel; + } + log.resume(); +}; + +/** + * Returns the usage instructions for node-pre-gyp. + */ + +proto.usage = function usage () { + var str = [ + '', + ' Usage: node-pre-gyp [options]', + '', + ' where is one of:', + commands.map(function (c) { + return ' - ' + c + ' - ' + require('./' + c).usage; + }).join('\n'), + '', + 'node-pre-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'), + 'node@' + process.versions.node + ].join('\n'); + return str; +}; + +/** + * Version number getter. + */ + +Object.defineProperty(proto, 'version', { + get: function () { + return this.package.version; + }, + enumerable: true +}); + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js new file mode 100644 index 00000000000..3a35f653151 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js @@ -0,0 +1,46 @@ +"use strict"; + +module.exports = exports = _package; + +exports.usage = 'Packs binary (and enclosing directory) into locally staged tarball'; + +var fs = require('fs'); +var path = require('path'); +var log = require('npmlog'); +var versioning = require('./util/versioning.js'); +var write = require('fs').createWriteStream; +var existsAsync = fs.exists || path.exists; +var mkdirp = require('mkdirp'); + +function _package(gyp, argv, callback) { + var pack = require('tar-pack').pack; + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + var from = opts.module_path; + var binary_module = path.join(from,opts.module_name + '.node'); + existsAsync(binary_module,function(found) { + if (!found) { + return callback(new Error("Cannot package because " + binary_module + " missing: run `node-pre-gyp rebuild` first")); + } + var tarball = opts.staged_tarball; + var filter_func = function(entry) { + // ensure directories are +x + // https://github.com/mapnik/node-mapnik/issues/262 + log.info('package','packing ' + entry.path); + return true; + }; + mkdirp(path.dirname(tarball),function(err) { + if (err) throw err; + pack(from, { filter: filter_func }) + .pipe(write(tarball)) + .on('error', function(err) { + if (err) console.error('['+package_json.name+'] ' + err.message); + return callback(err); + }) + .on('close', function() { + log.info('package','Binary staged at "' + tarball + '"'); + return callback(); + }); + }); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js new file mode 100644 index 00000000000..326a486c9ae --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js @@ -0,0 +1,25 @@ +"use strict"; + +var versioning = require('../lib/util/versioning.js'); +var existsSync = require('fs').existsSync || require('path').existsSync; +var path = require('path'); + +module.exports = exports; + +exports.usage = 'Finds the require path for the node-pre-gyp installed module'; + +exports.validate = function(package_json) { + versioning.validate_config(package_json); +}; + +exports.find = function(package_json_path,opts) { + if (!existsSync(package_json_path)) { + throw new Error("package.json does not exist at " + package_json_path); + } + var package_json = require(package_json_path); + versioning.validate_config(package_json); + opts = opts || {}; + if (!opts.module_root) opts.module_root = path.dirname(package_json_path); + var meta = versioning.evaluate(package_json,opts); + return meta.module; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js new file mode 100644 index 00000000000..d666b01317d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js @@ -0,0 +1,77 @@ +"use strict"; + +module.exports = exports = publish; + +exports.usage = 'Publishes pre-built binary (requires aws-sdk)'; + +var fs = require('fs'); +var path = require('path'); +var log = require('npmlog'); +var versioning = require('./util/versioning.js'); +var s3_setup = require('./util/s3_setup.js'); +var existsAsync = fs.exists || path.exists; +var url = require('url'); +var config = require('rc')("node_pre_gyp",{acl:"public-read"}); + +function publish(gyp, argv, callback) { + var AWS = require("aws-sdk"); + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + var tarball = opts.staged_tarball; + existsAsync(tarball,function(found) { + if (!found) { + return callback(new Error("Cannot publish because " + tarball + " missing: run `node-pre-gyp package` first")); + } + log.info('publish', 'Detecting s3 credentials'); + s3_setup.detect(opts.hosted_path,config); + var key_name = url.resolve(config.prefix,opts.package_name); + log.info('publish', 'Authenticating with s3'); + AWS.config.update(config); + var s3 = new AWS.S3(); + var s3_opts = { Bucket: config.bucket, + Key: key_name + }; + var remote_package = 'https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key; + log.info('publish', 'Checking for existing binary at ' + remote_package); + s3.headObject(s3_opts, function(err, meta){ + if (meta) log.info('publish', JSON.stringify(meta)); + if (err && err.code == 'NotFound') { + // we are safe to publish because + // the object does not already exist + log.info('publish', 'Preparing to put object'); + var s3_put = new AWS.S3(); + var s3_put_opts = { ACL: config.acl, + Body: fs.createReadStream(tarball), + Bucket: config.bucket, + Key: key_name + }; + log.info('publish', 'Putting object'); + try { + s3_put.putObject(s3_put_opts, function(err, resp){ + log.info('publish', 'returned from putting object'); + if(err) { + log.info('publish', 's3 putObject error: "' + err + '"'); + return callback(err); + } + if (resp) log.info('publish', 's3 putObject response: "' + JSON.stringify(resp) + '"'); + log.info('publish', 'successfully put object'); + console.log('['+package_json.name+'] published to ' + remote_package); + return callback(); + }); + } catch (err) { + log.info('publish', 's3 putObject error: "' + err + '"'); + return callback(err); + } + } else if (err) { + log.info('publish', 's3 headObject error: "' + err + '"'); + return callback(err); + } else { + log.error('publish','Cannot publish over existing version'); + log.error('publish',"Update the 'version' field in package.json and try again"); + log.error('publish','If the previous version was published in error see:'); + log.error('publish','\t node-pre-gyp unpublish'); + return callback(new Error('Failed publishing to ' + remote_package)); + } + }); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js new file mode 100644 index 00000000000..48a7b74b470 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = exports = rebuild; + +exports.usage = 'Runs "clean" and "build" at once'; + +function rebuild (gyp, argv, callback) { + gyp.todo.unshift( + { name: 'clean', args: [] }, + { name: 'build', args: ['rebuild'] } + ); + process.nextTick(callback); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js new file mode 100644 index 00000000000..ed65d54e03c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = exports = rebuild; + +exports.usage = 'Runs "clean" and "install" at once'; + +function rebuild (gyp, argv, callback) { + gyp.todo.unshift( + { name: 'clean', args: [] }, + { name: 'install', args: [] } + ); + process.nextTick(callback); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js new file mode 100644 index 00000000000..e6d00eb34b7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js @@ -0,0 +1,31 @@ +"use strict"; + +module.exports = exports = reveal; + +exports.usage = 'Reveals data on the versioned binary'; + +var fs = require('fs'); +var versioning = require('./util/versioning.js'); + +function unix_paths(key, val) { + return val && val.replace ? val.replace(/\\/g, '/') : val; +} + +function reveal(gyp, argv, callback) { + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + var hit = false; + // if a second arg is passed look to see + // if it is a known option + //console.log(JSON.stringify(gyp.opts,null,1)) + var remain = gyp.opts.argv.remain.pop(); + if (remain && opts.hasOwnProperty(remain)) { + console.log(opts[remain].replace(/\\/g, '/')); + hit = true; + } + // otherwise return all options as json + if (!hit) { + console.log(JSON.stringify(opts,unix_paths,2)); + } + return callback(); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js new file mode 100644 index 00000000000..fbdfca4d2d7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js @@ -0,0 +1,73 @@ +"use strict"; + +module.exports = exports = testbinary; + +exports.usage = 'Tests that the binary.node can be required'; + +var fs = require('fs'); +var path = require('path'); +var log = require('npmlog'); +var cp = require('child_process'); +var versioning = require('./util/versioning.js'); +var path = require('path'); + +function testbinary(gyp, argv, callback) { + var args = []; + var options = {}; + var shell_cmd = process.execPath; + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + // ensure on windows that / are used for require path + var binary_module = opts.module.replace(/\\/g, '/'); + var nw = (opts.runtime && opts.runtime === 'node-webkit'); + if ((process.arch != opts.target_arch) || + (process.platform != opts.target_platform)) { + var msg = "skipping validation since host platform/arch ("; + msg += process.platform+'/'+process.arch+")"; + msg += " does not match target ("; + msg += opts.target_platform+'/'+opts.target_arch+")"; + log.info('validate', msg); + return callback(); + } + if (nw) { + options.timeout = 5000; + if (process.platform === 'darwin') { + shell_cmd = 'node-webkit'; + } else if (process.platform === 'win32') { + shell_cmd = 'nw.exe'; + } else { + shell_cmd = 'nw'; + } + var modulePath = path.resolve(binary_module); + var appDir = path.join(__dirname, 'util', 'nw-pre-gyp'); + args.push(appDir); + args.push(modulePath); + log.info("validate","Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'"); + cp.execFile(shell_cmd, args, options, function(err, stdout, stderr) { + // check for normal timeout for node-webkit + if (err) { + if (err.killed === true && err.signal && err.signal.indexOf('SIG') > -1) { + return callback(); + } + var stderrLog = stderr.toString(); + log.info('stderr', stderrLog); + if( /^\s*Xlib:\s*extension\s*"RANDR"\s*missing\s*on\s*display\s*":\d+\.\d+"\.\s*$/.test(stderrLog) ){ + log.info('RANDR', 'stderr contains only RANDR error, ignored'); + return callback(); + } + return callback(err); + } + return callback(); + }); + return; + } + args.push('--eval'); + args.push("'require(\\'" + binary_module.replace(/\'/g, '\\\'') +"\\')'"); + log.info("validate","Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'"); + cp.execFile(shell_cmd, args, options, function(err, stdout, stderr) { + if (err) { + return callback(err, { stdout:stdout, stderr:stderr}); + } + return callback(); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js new file mode 100644 index 00000000000..1d4cc607f98 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js @@ -0,0 +1,49 @@ +"use strict"; + +module.exports = exports = testpackage; + +exports.usage = 'Tests that the staged package is valid'; + +var fs = require('fs'); +var path = require('path'); +var log = require('npmlog'); +var existsAsync = fs.exists || path.exists; +var versioning = require('./util/versioning.js'); +var testbinary = require('./testbinary.js'); +var read = require('fs').createReadStream; +var zlib = require('zlib'); + +function testpackage(gyp, argv, callback) { + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + var tarball = opts.staged_tarball; + existsAsync(tarball, function(found) { + if (!found) { + return callback(new Error("Cannot test package because " + tarball + " missing: run `node-pre-gyp package` first")); + } + var to = opts.module_path; + var gunzip = zlib.createGunzip(); + var extracter = require('tar').Extract({ path: to, strip: 1 }); + function filter_func(entry) { + // ensure directories are +x + // https://github.com/mapnik/node-mapnik/issues/262 + entry.props.mode |= (entry.props.mode >>> 2) & parseInt('0111',8); + log.info('install','unpacking ' + entry.path); + } + gunzip.on('error', callback); + extracter.on('error', callback); + extracter.on('entry', filter_func); + extracter.on('end', function(err) { + if (err) return callback(err); + testbinary(gyp,argv,function(err) { + if (err) { + return callback(err); + } else { + console.log('['+package_json.name+'] Package appears valid'); + return callback(); + } + }); + }); + read(tarball).pipe(gunzip).pipe(extracter); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js new file mode 100644 index 00000000000..43f8e66d297 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = exports = unpublish; + +exports.usage = 'Unpublishes pre-built binary (requires aws-sdk)'; + +var fs = require('fs'); +var log = require('npmlog'); +var versioning = require('./util/versioning.js'); +var s3_setup = require('./util/s3_setup.js'); +var url = require('url'); +var config = require('rc')("node_pre_gyp",{acl:"public-read"}); + +function unpublish(gyp, argv, callback) { + var AWS = require("aws-sdk"); + var package_json = JSON.parse(fs.readFileSync('./package.json')); + var opts = versioning.evaluate(package_json, gyp.opts); + s3_setup.detect(opts.hosted_path,config); + AWS.config.update(config); + var key_name = url.resolve(config.prefix,opts.package_name); + var s3 = new AWS.S3(); + var s3_opts = { Bucket: config.bucket, + Key: key_name + }; + s3.headObject(s3_opts, function(err, meta) { + if (err && err.code == 'NotFound') { + console.log('['+package_json.name+'] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key); + return callback(); + } else if(err) { + return callback(err); + } else { + log.info('unpublish', JSON.stringify(meta)); + s3.deleteObject(s3_opts, function(err, resp) { + if (err) return callback(err); + log.info(JSON.stringify(resp)); + console.log('['+package_json.name+'] Success: removed https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key); + return callback(); + }); + } + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json new file mode 100644 index 00000000000..e1f84e543af --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json @@ -0,0 +1,1274 @@ +{ + "0.1.14": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.15": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.16": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.17": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.18": { + "node_abi": null, + "v8": "1.3" + }, + "0.1.19": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.20": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.21": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.22": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.23": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.24": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.25": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.26": { + "node_abi": null, + "v8": "2.0" + }, + "0.1.27": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.28": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.29": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.30": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.31": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.32": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.33": { + "node_abi": null, + "v8": "2.1" + }, + "0.1.90": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.91": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.92": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.93": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.94": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.95": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.96": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.97": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.98": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.99": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.100": { + "node_abi": null, + "v8": "2.2" + }, + "0.1.101": { + "node_abi": null, + "v8": "2.3" + }, + "0.1.102": { + "node_abi": null, + "v8": "2.3" + }, + "0.1.103": { + "node_abi": null, + "v8": "2.3" + }, + "0.1.104": { + "node_abi": null, + "v8": "2.3" + }, + "0.2.0": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.1": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.2": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.3": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.4": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.5": { + "node_abi": 1, + "v8": "2.3" + }, + "0.2.6": { + "node_abi": 1, + "v8": "2.3" + }, + "0.3.0": { + "node_abi": 1, + "v8": "2.5" + }, + "0.3.1": { + "node_abi": 1, + "v8": "2.5" + }, + "0.3.2": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.3": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.4": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.5": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.6": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.7": { + "node_abi": 1, + "v8": "3.0" + }, + "0.3.8": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.0": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.1": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.2": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.3": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.4": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.5": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.6": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.7": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.8": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.9": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.10": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.11": { + "node_abi": 1, + "v8": "3.1" + }, + "0.4.12": { + "node_abi": 1, + "v8": "3.1" + }, + "0.5.0": { + "node_abi": 1, + "v8": "3.1" + }, + "0.5.1": { + "node_abi": 1, + "v8": "3.4" + }, + "0.5.2": { + "node_abi": 1, + "v8": "3.4" + }, + "0.5.3": { + "node_abi": 1, + "v8": "3.4" + }, + "0.5.4": { + "node_abi": 1, + "v8": "3.5" + }, + "0.5.5": { + "node_abi": 1, + "v8": "3.5" + }, + "0.5.6": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.7": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.8": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.9": { + "node_abi": 1, + "v8": "3.6" + }, + "0.5.10": { + "node_abi": 1, + "v8": "3.7" + }, + "0.6.0": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.1": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.2": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.3": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.4": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.5": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.6": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.7": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.8": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.9": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.10": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.11": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.12": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.13": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.14": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.15": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.16": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.17": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.18": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.19": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.20": { + "node_abi": 1, + "v8": "3.6" + }, + "0.6.21": { + "node_abi": 1, + "v8": "3.6" + }, + "0.7.0": { + "node_abi": 1, + "v8": "3.8" + }, + "0.7.1": { + "node_abi": 1, + "v8": "3.8" + }, + "0.7.2": { + "node_abi": 1, + "v8": "3.8" + }, + "0.7.3": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.4": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.5": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.6": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.7": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.8": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.9": { + "node_abi": 1, + "v8": "3.11" + }, + "0.7.10": { + "node_abi": 1, + "v8": "3.9" + }, + "0.7.11": { + "node_abi": 1, + "v8": "3.11" + }, + "0.7.12": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.0": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.1": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.2": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.3": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.4": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.5": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.6": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.7": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.8": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.9": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.10": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.11": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.12": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.13": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.14": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.15": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.16": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.17": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.18": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.19": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.20": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.21": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.22": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.23": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.24": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.25": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.26": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.27": { + "node_abi": 1, + "v8": "3.11" + }, + "0.8.28": { + "node_abi": 1, + "v8": "3.11" + }, + "0.9.0": { + "node_abi": 1, + "v8": "3.11" + }, + "0.9.1": { + "node_abi": 10, + "v8": "3.11" + }, + "0.9.2": { + "node_abi": 10, + "v8": "3.11" + }, + "0.9.3": { + "node_abi": 10, + "v8": "3.13" + }, + "0.9.4": { + "node_abi": 10, + "v8": "3.13" + }, + "0.9.5": { + "node_abi": 10, + "v8": "3.13" + }, + "0.9.6": { + "node_abi": 10, + "v8": "3.15" + }, + "0.9.7": { + "node_abi": 10, + "v8": "3.15" + }, + "0.9.8": { + "node_abi": 10, + "v8": "3.15" + }, + "0.9.9": { + "node_abi": 11, + "v8": "3.15" + }, + "0.9.10": { + "node_abi": 11, + "v8": "3.15" + }, + "0.9.11": { + "node_abi": 11, + "v8": "3.14" + }, + "0.9.12": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.0": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.1": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.2": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.3": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.4": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.5": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.6": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.7": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.8": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.9": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.10": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.11": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.12": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.13": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.14": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.15": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.16": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.17": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.18": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.19": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.20": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.21": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.22": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.23": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.24": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.25": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.26": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.27": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.28": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.29": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.30": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.31": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.32": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.33": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.34": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.35": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.36": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.37": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.38": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.39": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.40": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.41": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.42": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.43": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.44": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.45": { + "node_abi": 11, + "v8": "3.14" + }, + "0.10.46": { + "node_abi": 11, + "v8": "3.14" + }, + "0.11.0": { + "node_abi": 12, + "v8": "3.17" + }, + "0.11.1": { + "node_abi": 12, + "v8": "3.18" + }, + "0.11.2": { + "node_abi": 12, + "v8": "3.19" + }, + "0.11.3": { + "node_abi": 12, + "v8": "3.19" + }, + "0.11.4": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.5": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.6": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.7": { + "node_abi": 12, + "v8": "3.20" + }, + "0.11.8": { + "node_abi": 13, + "v8": "3.21" + }, + "0.11.9": { + "node_abi": 13, + "v8": "3.22" + }, + "0.11.10": { + "node_abi": 13, + "v8": "3.22" + }, + "0.11.11": { + "node_abi": 14, + "v8": "3.22" + }, + "0.11.12": { + "node_abi": 14, + "v8": "3.22" + }, + "0.11.13": { + "node_abi": 14, + "v8": "3.25" + }, + "0.11.14": { + "node_abi": 14, + "v8": "3.26" + }, + "0.11.15": { + "node_abi": 14, + "v8": "3.28" + }, + "0.11.16": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.0": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.1": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.2": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.3": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.4": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.5": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.6": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.7": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.8": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.9": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.10": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.11": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.12": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.13": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.14": { + "node_abi": 14, + "v8": "3.28" + }, + "0.12.15": { + "node_abi": 14, + "v8": "3.28" + }, + "1.0.0": { + "node_abi": 42, + "v8": "3.31" + }, + "1.0.1": { + "node_abi": 42, + "v8": "3.31" + }, + "1.0.2": { + "node_abi": 42, + "v8": "3.31" + }, + "1.0.3": { + "node_abi": 42, + "v8": "4.1" + }, + "1.0.4": { + "node_abi": 42, + "v8": "4.1" + }, + "1.1.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.2.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.3.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.4.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.4.2": { + "node_abi": 43, + "v8": "4.1" + }, + "1.4.3": { + "node_abi": 43, + "v8": "4.1" + }, + "1.5.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.5.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.0": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.2": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.3": { + "node_abi": 43, + "v8": "4.1" + }, + "1.6.4": { + "node_abi": 43, + "v8": "4.1" + }, + "1.7.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.1": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.2": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.3": { + "node_abi": 43, + "v8": "4.1" + }, + "1.8.4": { + "node_abi": 43, + "v8": "4.1" + }, + "2.0.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.0.1": { + "node_abi": 44, + "v8": "4.2" + }, + "2.0.2": { + "node_abi": 44, + "v8": "4.2" + }, + "2.1.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.2.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.2.1": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.1": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.2": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.3": { + "node_abi": 44, + "v8": "4.2" + }, + "2.3.4": { + "node_abi": 44, + "v8": "4.2" + }, + "2.4.0": { + "node_abi": 44, + "v8": "4.2" + }, + "2.5.0": { + "node_abi": 44, + "v8": "4.2" + }, + "3.0.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.1.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.2.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.3.0": { + "node_abi": 45, + "v8": "4.4" + }, + "3.3.1": { + "node_abi": 45, + "v8": "4.4" + }, + "4.0.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.1.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.1.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.1.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.3": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.4": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.5": { + "node_abi": 46, + "v8": "4.5" + }, + "4.2.6": { + "node_abi": 46, + "v8": "4.5" + }, + "4.3.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.3.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.3.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.0": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.1": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.2": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.3": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.4": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.5": { + "node_abi": 46, + "v8": "4.5" + }, + "4.4.6": { + "node_abi": 46, + "v8": "4.5" + }, + "5.0.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.1.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.1.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.2.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.3.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.4.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.4.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.5.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.6.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.7.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.7.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.8.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.9.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.9.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.10.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.10.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.11.0": { + "node_abi": 47, + "v8": "4.6" + }, + "5.11.1": { + "node_abi": 47, + "v8": "4.6" + }, + "5.12.0": { + "node_abi": 47, + "v8": "4.6" + }, + "6.0.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.1.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.2.0": { + "node_abi": 48, + "v8": "5.0" + }, + "6.2.1": { + "node_abi": 48, + "v8": "5.0" + }, + "6.2.2": { + "node_abi": 48, + "v8": "5.0" + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js new file mode 100644 index 00000000000..0dc460cbf46 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js @@ -0,0 +1,87 @@ +"use strict"; + +module.exports = exports; + +var fs = require('fs'); +var path = require('path'); +var win = process.platform == 'win32'; +var existsSync = fs.existsSync || path.existsSync; +var cp = require('child_process'); + +// try to build up the complete path to node-gyp +/* priority: + - node-gyp on ENV:npm_config_node_gyp (https://github.com/npm/npm/pull/4887) + - node-gyp on NODE_PATH + - node-gyp inside npm on NODE_PATH (ignore on iojs) + - node-gyp inside npm beside node exe +*/ +function which_node_gyp() { + var node_gyp_bin; + if (process.env.npm_config_node_gyp) { + try { + node_gyp_bin = process.env.npm_config_node_gyp; + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } + } catch (err) { } + } + try { + var node_gyp_main = require.resolve('node-gyp'); + node_gyp_bin = path.join(path.dirname( + path.dirname(node_gyp_main)), + 'bin/node-gyp.js'); + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } + } catch (err) { } + if (process.execPath.indexOf('iojs') === -1) { + try { + var npm_main = require.resolve('npm'); + node_gyp_bin = path.join(path.dirname( + path.dirname(npm_main)), + 'node_modules/node-gyp/bin/node-gyp.js'); + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } + } catch (err) { } + } + var npm_base = path.join(path.dirname( + path.dirname(process.execPath)), + 'lib/node_modules/npm/'); + node_gyp_bin = path.join(npm_base, 'node_modules/node-gyp/bin/node-gyp.js'); + if (existsSync(node_gyp_bin)) { + return node_gyp_bin; + } +} + +module.exports.run_gyp = function(args,opts,callback) { + var shell_cmd = ''; + var cmd_args = []; + if (opts.runtime && opts.runtime == 'node-webkit') { + shell_cmd = 'nw-gyp'; + if (win) shell_cmd += '.cmd'; + } else { + var node_gyp_path = which_node_gyp(); + if (node_gyp_path) { + shell_cmd = process.execPath; + cmd_args.push(node_gyp_path); + } else { + shell_cmd = 'node-gyp'; + if (win) shell_cmd += '.cmd'; + } + } + var final_args = cmd_args.concat(args); + var cmd = cp.spawn(shell_cmd, final_args, {cwd: undefined, env: process.env, stdio: [ 0, 1, 2]}); + cmd.on('error', function (err) { + if (err) { + return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + err + ")")); + } + callback(null,opts); + }); + cmd.on('close', function (code) { + if (code && code !== 0) { + return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + code + ")")); + } + callback(null,opts); + }); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js new file mode 100644 index 00000000000..39fe1a28e09 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js @@ -0,0 +1,94 @@ +"use strict"; + +module.exports = exports = handle_gyp_opts; + +var fs = require('fs'); +var versioning = require('./versioning.js'); + +/* + +Here we gather node-pre-gyp generated options (from versioning) and pass them along to node-gyp. + +We massage the args and options slightly to account for differences in what commands mean between +node-pre-gyp and node-gyp (e.g. see the difference between "build" and "rebuild" below) + +Keep in mind: the values inside `argv` and `gyp.opts` below are different depending on whether +node-pre-gyp is called directory, or if it is called in a `run-script` phase of npm. + +We also try to preserve any command line options that might have been passed to npm or node-pre-gyp. +But this is fairly difficult without passing way to much through. For example `gyp.opts` contains all +the process.env and npm pushes a lot of variables into process.env which node-pre-gyp inherits. So we have +to be very selective about what we pass through. + +For example: + +`npm install --build-from-source` will give: + +argv == [ 'rebuild' ] +gyp.opts.argv == { remain: [ 'install' ], + cooked: [ 'install', '--fallback-to-build' ], + original: [ 'install', '--fallback-to-build' ] } + +`./bin/node-pre-gyp build` will give: + +argv == [] +gyp.opts.argv == { remain: [ 'build' ], + cooked: [ 'build' ], + original: [ '-C', 'test/app1', 'build' ] } + +*/ + +// select set of node-pre-gyp versioning info +// to share with node-gyp +var share_with_node_gyp = [ + 'module', + 'module_name', + 'module_path', +]; + +function handle_gyp_opts(gyp, argv, callback) { + + // Collect node-pre-gyp specific variables to pass to node-gyp + var node_pre_gyp_options = []; + // generate custom node-pre-gyp versioning info + var opts = versioning.evaluate(JSON.parse(fs.readFileSync('./package.json')), gyp.opts); + share_with_node_gyp.forEach(function(key) { + var val = opts[key]; + if (val) { + node_pre_gyp_options.push('--' + key + '=' + val); + } else { + return callback(new Error("Option " + key + " required but not found by node-pre-gyp")); + } + }); + + // Collect options that follow the special -- which disables nopt parsing + var unparsed_options = []; + var double_hyphen_found = false; + gyp.opts.argv.original.forEach(function(opt) { + if (double_hyphen_found) { + unparsed_options.push(opt); + } + if (opt == '--') { + double_hyphen_found = true; + } + }); + + // We try respect and pass through remaining command + // line options (like --foo=bar) to node-gyp + var cooked = gyp.opts.argv.cooked; + var node_gyp_options = []; + cooked.forEach(function(value) { + if (value.length > 2 && value.slice(0,2) == '--') { + var key = value.slice(2); + var val = cooked[cooked.indexOf(value)+1]; + if (val && val.indexOf('--') === -1) { // handle '--foo=bar' or ['--foo','bar'] + node_gyp_options.push('--' + key + '=' + val); + } else { // pass through --foo + node_gyp_options.push(value); + } + } + }); + + var result = {'opts':opts,'gyp':node_gyp_options,'pre':node_pre_gyp_options,'unparsed':unparsed_options}; + return callback(null,result); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html new file mode 100644 index 00000000000..244466c4c50 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html @@ -0,0 +1,26 @@ + + + + +Node-webkit-based module test + + + +

Node-webkit-based module test

+ + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json new file mode 100644 index 00000000000..71d03f8226c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json @@ -0,0 +1,9 @@ +{ +"main": "index.html", +"name": "nw-pre-gyp-module-test", +"description": "Node-webkit-based module test.", +"version": "0.0.1", +"window": { + "show": false +} +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js new file mode 100644 index 00000000000..5bc42e96cbf --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js @@ -0,0 +1,27 @@ +"use strict"; + +module.exports = exports; + +var url = require('url'); + +var URI_REGEX="^(.*)\.(s3(?:-.*)?)\.amazonaws\.com$"; + +module.exports.detect = function(to,config) { + var uri = url.parse(to); + var hostname_matches = uri.hostname.match(URI_REGEX); + config.prefix = (!uri.pathname || uri.pathname == '/') ? '' : uri.pathname.replace('/',''); + if(!hostname_matches) { + return; + } + if (!config.bucket) { + config.bucket = hostname_matches[1]; + } + if (!config.region) { + var s3_domain = hostname_matches[2]; + if (s3_domain.slice(0,3) == 's3-' && + s3_domain.length >= 3) { + // it appears the region is explicit in the url + config.region = s3_domain.replace('s3-',''); + } + } +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js new file mode 100644 index 00000000000..8ebbe3a361d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js @@ -0,0 +1,308 @@ +"use strict"; + +module.exports = exports; + +var path = require('path'); +var semver = require('semver'); +var url = require('url'); + +var abi_crosswalk; + +// This is used for unit testing to provide a fake +// ABI crosswalk that emulates one that is not updated +// for the current version +if (process.env.NODE_PRE_GYP_ABI_CROSSWALK) { + abi_crosswalk = require(process.env.NODE_PRE_GYP_ABI_CROSSWALK); +} else { + abi_crosswalk = require('./abi_crosswalk.json'); +} + +function get_electron_abi(runtime, target_version) { + if (!runtime) { + throw new Error("get_electron_abi requires valid runtime arg"); + } + if (typeof target_version === 'undefined') { + // erroneous CLI call + throw new Error("Empty target version is not supported if electron is the target."); + } + // Electron guarantees that patch version update won't break native modules. + var sem_ver = semver.parse(target_version); + return runtime + '-v' + sem_ver.major + '.' + sem_ver.minor; +} +module.exports.get_electron_abi = get_electron_abi; + +function get_node_webkit_abi(runtime, target_version) { + if (!runtime) { + throw new Error("get_node_webkit_abi requires valid runtime arg"); + } + if (typeof target_version === 'undefined') { + // erroneous CLI call + throw new Error("Empty target version is not supported if node-webkit is the target."); + } + return runtime + '-v' + target_version; +} +module.exports.get_node_webkit_abi = get_node_webkit_abi; + +function get_node_abi(runtime, versions) { + if (!runtime) { + throw new Error("get_node_abi requires valid runtime arg"); + } + if (!versions) { + throw new Error("get_node_abi requires valid process.versions object"); + } + var sem_ver = semver.parse(versions.node); + if (sem_ver.major === 0 && sem_ver.minor % 2) { // odd series + // https://github.com/mapbox/node-pre-gyp/issues/124 + return runtime+'-v'+versions.node; + } else { + // process.versions.modules added in >= v0.10.4 and v0.11.7 + // https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e + return versions.modules ? runtime+'-v' + (+versions.modules) : + 'v8-' + versions.v8.split('.').slice(0,2).join('.'); + } +} +module.exports.get_node_abi = get_node_abi; + +function get_runtime_abi(runtime, target_version) { + if (!runtime) { + throw new Error("get_runtime_abi requires valid runtime arg"); + } + if (runtime === 'node-webkit') { + return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']); + } else if (runtime === 'electron') { + return get_electron_abi(runtime, target_version || process.versions.electron); + } else { + if (runtime != 'node') { + throw new Error("Unknown Runtime: '" + runtime + "'"); + } + if (!target_version) { + return get_node_abi(runtime,process.versions); + } else { + var cross_obj; + // abi_crosswalk generated with ./scripts/abi_crosswalk.js + if (abi_crosswalk[target_version]) { + cross_obj = abi_crosswalk[target_version]; + } else { + var target_parts = target_version.split('.').map(function(i) { return +i; }); + if (target_parts.length != 3) { // parse failed + throw new Error("Unknown target version: " + target_version); + } + /* + The below code tries to infer the last known ABI compatible version + that we have recorded in the abi_crosswalk.json when an exact match + is not possible. The reasons for this to exist are complicated: + + - We support passing --target to be able to allow developers to package binaries for versions of node + that are not the same one as they are running. This might also be used in combination with the + --target_arch or --target_platform flags to also package binaries for alternative platforms + - When --target is passed we can't therefore determine the ABI (process.versions.modules) from the node + version that is running in memory + - So, therefore node-pre-gyp keeps an "ABI crosswalk" (lib/util/abi_crosswalk.json) to be able to look + this info up for all versions + - But we cannot easily predict what the future ABI will be for released versions + - And node-pre-gyp needs to be a `bundledDependency` in apps that depend on it in order to work correctly + by being fully available at install time. + - So, the speed of node releases and the bundled nature of node-pre-gyp mean that a new node-pre-gyp release + need to happen for every node.js/io.js/node-webkit/nw.js/atom-shell/etc release that might come online if + you want the `--target` flag to keep working for the latest version + - Which is impractical ^^ + - Hence the below code guesses about future ABI to make the need to update node-pre-gyp less demanding. + + In practice then you can have a dependency of your app like `node-sqlite3` that bundles a `node-pre-gyp` that + only knows about node v0.10.33 in the `abi_crosswalk.json` but target node v0.10.34 (which is assumed to be + ABI compatible with v0.10.33). + + TODO: use semver module instead of custom version parsing + */ + var major = target_parts[0]; + var minor = target_parts[1]; + var patch = target_parts[2]; + // io.js: yeah if node.js ever releases 1.x this will break + // but that is unlikely to happen: https://github.com/iojs/io.js/pull/253#issuecomment-69432616 + if (major === 1) { + // look for last release that is the same major version + // e.g. we assume io.js 1.x is ABI compatible with >= 1.0.0 + while (true) { + if (minor > 0) --minor; + if (patch > 0) --patch; + var new_iojs_target = '' + major + '.' + minor + '.' + patch; + if (abi_crosswalk[new_iojs_target]) { + cross_obj = abi_crosswalk[new_iojs_target]; + console.log('Warning: node-pre-gyp could not find exact match for ' + target_version); + console.log('Warning: but node-pre-gyp successfully choose ' + new_iojs_target + ' as ABI compatible target'); + break; + } + if (minor === 0 && patch === 0) { + break; + } + } + } else if (major === 0) { // node.js + if (target_parts[1] % 2 === 0) { // for stable/even node.js series + // look for the last release that is the same minor release + // e.g. we assume node 0.10.x is ABI compatible with >= 0.10.0 + while (--patch > 0) { + var new_node_target = '' + major + '.' + minor + '.' + patch; + if (abi_crosswalk[new_node_target]) { + cross_obj = abi_crosswalk[new_node_target]; + console.log('Warning: node-pre-gyp could not find exact match for ' + target_version); + console.log('Warning: but node-pre-gyp successfully choose ' + new_node_target + ' as ABI compatible target'); + break; + } + } + } + } + } + if (!cross_obj) { + throw new Error("Unsupported target version: " + target_version); + } + // emulate process.versions + var versions_obj = { + node: target_version, + v8: cross_obj.v8+'.0', + // abi_crosswalk uses 1 for node versions lacking process.versions.modules + // process.versions.modules added in >= v0.10.4 and v0.11.7 + modules: cross_obj.node_abi > 1 ? cross_obj.node_abi : undefined + }; + return get_node_abi(runtime, versions_obj); + } + } +} +module.exports.get_runtime_abi = get_runtime_abi; + +var required_parameters = [ + 'module_name', + 'module_path', + 'host' +]; + +function validate_config(package_json) { + var msg = package_json.name + ' package.json is not node-pre-gyp ready:\n'; + var missing = []; + if (!package_json.main) { + missing.push('main'); + } + if (!package_json.version) { + missing.push('version'); + } + if (!package_json.name) { + missing.push('name'); + } + if (!package_json.binary) { + missing.push('binary'); + } + var o = package_json.binary; + required_parameters.forEach(function(p) { + if (missing.indexOf('binary') > -1) { + missing.pop('binary'); + } + if (!o || o[p] === undefined) { + missing.push('binary.' + p); + } + }); + if (missing.length >= 1) { + throw new Error(msg+"package.json must declare these properties: \n" + missing.join('\n')); + } + if (o) { + // enforce https over http + var protocol = url.parse(o.host).protocol; + if (protocol === 'http:') { + throw new Error("'host' protocol ("+protocol+") is invalid - only 'https:' is accepted"); + } + } +} + +module.exports.validate_config = validate_config; + +function eval_template(template,opts) { + Object.keys(opts).forEach(function(key) { + var pattern = '{'+key+'}'; + while (template.indexOf(pattern) > -1) { + template = template.replace(pattern,opts[key]); + } + }); + return template; +} + +// url.resolve needs single trailing slash +// to behave correctly, otherwise a double slash +// may end up in the url which breaks requests +// and a lacking slash may not lead to proper joining +function fix_slashes(pathname) { + if (pathname.slice(-1) != '/') { + return pathname + '/'; + } + return pathname; +} + +// remove double slashes +// note: path.normalize will not work because +// it will convert forward to back slashes +function drop_double_slashes(pathname) { + return pathname.replace(/\/\//g,'/'); +} + +function get_process_runtime(versions) { + var runtime = 'node'; + if (versions['node-webkit']) { + runtime = 'node-webkit'; + } else if (versions.electron) { + runtime = 'electron'; + } + return runtime; +} + +module.exports.get_process_runtime = get_process_runtime; + +var default_package_name = '{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz'; +var default_remote_path = ''; + +module.exports.evaluate = function(package_json,options) { + options = options || {}; + validate_config(package_json); + var v = package_json.version; + var module_version = semver.parse(v); + var runtime = options.runtime || get_process_runtime(process.versions); + var opts = { + name: package_json.name, + configuration: Boolean(options.debug) ? 'Debug' : 'Release', + debug: options.debug, + module_name: package_json.binary.module_name, + version: module_version.version, + prerelease: module_version.prerelease.length ? module_version.prerelease.join('.') : '', + build: module_version.build.length ? module_version.build.join('.') : '', + major: module_version.major, + minor: module_version.minor, + patch: module_version.patch, + runtime: runtime, + node_abi: get_runtime_abi(runtime,options.target), + target: options.target || '', + platform: options.target_platform || process.platform, + target_platform: options.target_platform || process.platform, + arch: options.target_arch || process.arch, + target_arch: options.target_arch || process.arch, + module_main: package_json.main, + toolset : options.toolset || '' // address https://github.com/mapbox/node-pre-gyp/issues/119 + }; + // support host mirror with npm config `--{module_name}_binary_host_mirror` + // e.g.: https://github.com/node-inspector/v8-profiler/blob/master/package.json#L25 + // > npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/ + var host = process.env['npm_config_' + opts.module_name + '_binary_host_mirror'] || package_json.binary.host; + opts.host = fix_slashes(eval_template(host,opts)); + opts.module_path = eval_template(package_json.binary.module_path,opts); + // now we resolve the module_path to ensure it is absolute so that binding.gyp variables work predictably + if (options.module_root) { + // resolve relative to known module root: works for pre-binding require + opts.module_path = path.join(options.module_root,opts.module_path); + } else { + // resolve relative to current working directory: works for node-pre-gyp commands + opts.module_path = path.resolve(opts.module_path); + } + opts.module = path.join(opts.module_path,opts.module_name + '.node'); + opts.remote_path = package_json.binary.remote_path ? drop_double_slashes(fix_slashes(eval_template(package_json.binary.remote_path,opts))) : default_remote_path; + var package_name = package_json.binary.package_name ? package_json.binary.package_name : default_package_name; + opts.package_name = eval_template(package_name,opts); + opts.staged_tarball = path.join('build/stage',opts.remote_path,opts.package_name); + opts.hosted_path = url.resolve(opts.host,opts.remote_path); + opts.hosted_tarball = url.resolve(opts.hosted_path,opts.package_name); + return opts; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json new file mode 100644 index 00000000000..6fa08e3e14b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + "node-pre-gyp@^0.6.29", + "/Users/eshanker/Code/fsevents" + ] + ], + "_from": "node-pre-gyp@>=0.6.29 <0.7.0", + "_id": "node-pre-gyp@0.6.29", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/node-pre-gyp", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/node-pre-gyp-0.6.29.tgz_1467142616046_0.945712324930355" + }, + "_npmUser": { + "email": "dane@mapbox.com", + "name": "springmeyer" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "name": "node-pre-gyp", + "raw": "node-pre-gyp@^0.6.29", + "rawSpec": "^0.6.29", + "scope": null, + "spec": ">=0.6.29 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents" + ], + "_resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.29.tgz", + "_shasum": "b0bd13635baf7d1be7ae233c16fbcf3309acd37c", + "_shrinkwrap": null, + "_spec": "node-pre-gyp@^0.6.29", + "_where": "/Users/eshanker/Code/fsevents", + "author": { + "email": "dane@mapbox.com", + "name": "Dane Springmeyer" + }, + "bin": { + "node-pre-gyp": "./bin/node-pre-gyp" + }, + "bugs": { + "url": "https://github.com/mapbox/node-pre-gyp/issues" + }, + "dependencies": { + "mkdirp": "~0.5.0", + "nopt": "~3.0.1", + "npmlog": "~3.1.2", + "rc": "~1.1.0", + "request": "2.x", + "rimraf": "~2.5.0", + "semver": "~5.2.0", + "tar": "~2.2.0", + "tar-pack": "~3.1.0" + }, + "description": "Node.js native addon binary install tool", + "devDependencies": { + "aws-sdk": "2.x", + "jshint": "2.x", + "mocha": "2.x", + "retire": "1.x" + }, + "directories": {}, + "dist": { + "shasum": "b0bd13635baf7d1be7ae233c16fbcf3309acd37c", + "tarball": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.29.tgz" + }, + "gitHead": "3733536bf8947ee9dd18c8d46b0f964f0e41db8e", + "homepage": "https://github.com/mapbox/node-pre-gyp#readme", + "jshintConfig": { + "globalstrict": true, + "mocha": true, + "noarg": true, + "node": true, + "undef": true, + "unused": true + }, + "keywords": [ + "addon", + "binary", + "bindings", + "c", + "c++", + "module", + "native" + ], + "license": "BSD-3-Clause", + "main": "./lib/node-pre-gyp.js", + "maintainers": [ + { + "email": "dane@dbsgeo.com", + "name": "springmeyer" + }, + { + "email": "wb@bergwerk-gis.at", + "name": "bergwerkgis" + }, + { + "email": "michael.patrick.morris@gmail.com", + "name": "mikemorris" + }, + { + "email": "kkaefer@gmail.com", + "name": "kkaefer" + }, + { + "email": "young@developmentseed.org", + "name": "yhahn" + } + ], + "name": "node-pre-gyp", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/mapbox/node-pre-gyp.git" + }, + "scripts": { + "prepublish": "retire -n && npm ls && jshint test/build.test.js test/s3_setup.test.js test/versioning.test.js", + "test": "jshint lib lib/util scripts bin/node-pre-gyp && mocha -R spec --timeout 500000", + "update-crosswalk": "node scripts/abi_crosswalk.js" + }, + "version": "0.6.29" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore new file mode 100644 index 00000000000..8886139386e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +.nyc_output +coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md new file mode 100644 index 00000000000..652609b37e0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2012 Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md new file mode 100644 index 00000000000..5cd85550877 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md @@ -0,0 +1,254 @@ +# node-uuid + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Generate RFC4122 version 1 or version 4 UUIDs +* Runs in node.js and all browsers. +* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). +* Cryptographically strong random # generation + * `crypto.randomBytes(n)` in node.js + * `window.crypto.getRandomValues(ta)` in [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues#Browser_Compatibility) +* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) +* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) +* Comes with a Command Line Interface for generating uuids on the command line + +## Getting Started + +Install it in your browser: + +```html + +``` + +Or in node.js: + +``` +npm install node-uuid +``` + +```javascript +var uuid = require('node-uuid'); +``` + +Then create some ids ... + +```javascript +// Generate a v1 (time-based) id +uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' + +// Generate a v4 (random) id +uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' +``` + +## API + +### uuid.v1([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Notes: + +1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v1({ + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}); // -> "710b962e-041c-11e1-9234-0123456789ab" +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +var arr = new Array(32); // -> [] +uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] +uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] + +// Optionally use uuid.unparse() to get stringify the ids +uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' +uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' +``` + +### uuid.v4([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v4({ + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}); +// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" +``` + +Example: Generate two IDs in a single buffer + +```javascript +var buffer = new Array(32); // (or 'new Buffer' in node.js) +uuid.v4(null, buffer, 0); +uuid.v4(null, buffer, 16); +``` + +### uuid.parse(id[, buffer[, offset]]) +### uuid.unparse(buffer[, offset]) + +Parse and unparse UUIDs + + * `id` - (String) UUID(-like) string + * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used + * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 + +Example parsing and unparsing a UUID string + +```javascript +var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> +var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' +``` + +### uuid.noConflict() + +(Browsers only) Set `uuid` property back to it's previous value. + +Returns the node-uuid object. + +Example: + +```javascript +var myUuid = uuid.noConflict(); +myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' +``` + +## Deprecated APIs + +Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. + +### uuid([format [, buffer [, offset]]]) + +uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). + +### uuid.BufferClass + +The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. + +## Command Line Interface + +To use the executable, it's probably best to install this library globally. + +`npm install -g node-uuid` + +Usage: + +``` +USAGE: uuid [version] [options] + + +options: + +--help Display this message and exit +``` + +`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied. + +### Examples + +``` +> uuid +3a91f950-dec8-4688-ba14-5b7bbfc7a563 +``` + +``` +> uuid v1 +9d0b43e0-7696-11e3-964b-250efa37a98e +``` + +``` +> uuid v4 +6790ac7c-24ac-4f98-8464-42f6d98a53ae +``` + +## Testing + +In node.js + +``` +npm test +``` + +In Browser + +``` +open test/test.html +``` + +### Benchmarking + +Requires node.js + +``` +npm install uuid uuid-js +node benchmark/benchmark.js +``` + +For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) + +For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). + +## Release notes + +### 1.4.6 + +* Properly detect node crypto and whatwg crypto +* Workaround phantomjs/browserify bug +* Explicit check for `window` rather implicit this-global +* Issue warning if Math.random() is being used +* "use strict"; +* A few jshint / stylistic updates (=== and such) + +### 1.4.0 + +* Improved module context detection +* Removed public RNG functions + +### 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + +### 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md new file mode 100644 index 00000000000..aaeb2ea0132 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md @@ -0,0 +1,53 @@ +# node-uuid Benchmarks + +### Results + +To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark + +### Run them yourself + +node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. + +To prepare and run the benchmark issue; + +``` +npm install uuid uuid-js +node benchmark/benchmark.js +``` + +You'll see an output like this one: + +``` +# v4 +nodeuuid.v4(): 854700 uuids/second +nodeuuid.v4('binary'): 788643 uuids/second +nodeuuid.v4('binary', buffer): 1336898 uuids/second +uuid(): 479386 uuids/second +uuid('binary'): 582072 uuids/second +uuidjs.create(4): 312304 uuids/second + +# v1 +nodeuuid.v1(): 938086 uuids/second +nodeuuid.v1('binary'): 683060 uuids/second +nodeuuid.v1('binary', buffer): 1644736 uuids/second +uuidjs.create(1): 190621 uuids/second +``` + +* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. +* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. + +If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: + +``` +for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; +``` + +If you're interested in how performance varies between different node versions, you can issue the above command multiple times. + +You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: + +``` +(cd benchmark/ && ./bench.sh) +``` + +This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu new file mode 100644 index 00000000000..a342fbbe04e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu @@ -0,0 +1,174 @@ +#!/opt/local/bin/gnuplot -persist +# +# +# G N U P L O T +# Version 4.4 patchlevel 3 +# last modified March 2011 +# System: Darwin 10.8.0 +# +# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 +# Thomas Williams, Colin Kelley and many others +# +# gnuplot home: http://www.gnuplot.info +# faq, bugs, etc: type "help seeking-assistance" +# immediate help: type "help" +# plot window: hit 'h' +set terminal postscript eps noenhanced defaultplex \ + leveldefault color colortext \ + solid linewidth 1.2 butt noclip \ + palfuncparam 2000,0.003 \ + "Helvetica" 14 +set output 'bench.eps' +unset clip points +set clip one +unset clip two +set bar 1.000000 front +set border 31 front linetype -1 linewidth 1.000 +set xdata +set ydata +set zdata +set x2data +set y2data +set timefmt x "%d/%m/%y,%H:%M" +set timefmt y "%d/%m/%y,%H:%M" +set timefmt z "%d/%m/%y,%H:%M" +set timefmt x2 "%d/%m/%y,%H:%M" +set timefmt y2 "%d/%m/%y,%H:%M" +set timefmt cb "%d/%m/%y,%H:%M" +set boxwidth +set style fill empty border +set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 +set style circle radius graph 0.02, first 0, 0 +set dummy x,y +set format x "% g" +set format y "% g" +set format x2 "% g" +set format y2 "% g" +set format z "% g" +set format cb "% g" +set angles radians +unset grid +set key title "" +set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox +set key noinvert samplen 4 spacing 1 width 0 height 0 +set key maxcolumns 2 maxrows 0 +unset label +unset arrow +set style increment default +unset style line +set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 +unset style arrow +set style histogram clustered gap 2 title offset character 0, 0, 0 +unset logscale +set offsets graph 0.05, 0.15, 0, 0 +set pointsize 1.5 +set pointintervalbox 1 +set encoding default +unset polar +unset parametric +unset decimalsign +set view 60, 30, 1, 1 +set samples 100, 100 +set isosamples 10, 10 +set surface +unset contour +set clabel '%8.3g' +set mapping cartesian +set datafile separator whitespace +unset hidden3d +set cntrparam order 4 +set cntrparam linear +set cntrparam levels auto 5 +set cntrparam points 5 +set size ratio 0 1,1 +set origin 0,0 +set style data points +set style function lines +set xzeroaxis linetype -2 linewidth 1.000 +set yzeroaxis linetype -2 linewidth 1.000 +set zzeroaxis linetype -2 linewidth 1.000 +set x2zeroaxis linetype -2 linewidth 1.000 +set y2zeroaxis linetype -2 linewidth 1.000 +set ticslevel 0.5 +set mxtics default +set mytics default +set mztics default +set mx2tics default +set my2tics default +set mcbtics default +set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set xtics norangelimit +set xtics () +set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set ytics autofreq norangelimit +set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 +set ztics autofreq norangelimit +set nox2tics +set noy2tics +set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set cbtics autofreq norangelimit +set title "" +set title offset character 0, 0, 0 font "" norotate +set timestamp bottom +set timestamp "" +set timestamp offset character 0, 0, 0 font "" norotate +set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale rfixmin +set autoscale rfixmax +set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set autoscale tfixmin +set autoscale tfixmax +set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale ufixmin +set autoscale ufixmax +set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale vfixmin +set autoscale vfixmax +set xlabel "" +set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set x2label "" +set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate +set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) +set autoscale xfixmin +set autoscale xfixmax +set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) +set autoscale x2fixmin +set autoscale x2fixmax +set ylabel "" +set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set y2label "" +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) +set autoscale yfixmin +set autoscale yfixmax +set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) +set autoscale y2fixmin +set autoscale y2fixmax +set zlabel "" +set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale zfixmin +set autoscale zfixmax +set cblabel "" +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale cbfixmin +set autoscale cbfixmax +set zero 1e-08 +set lmargin -1 +set bmargin -1 +set rmargin -1 +set tmargin -1 +set pm3d explicit at s +set pm3d scansautomatic +set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean +set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB +set palette rgbformulae 7, 5, 15 +set colorbox default +set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault +set loadpath +set fontpath +set fit noerrorvariables +GNUTERM = "aqua" +plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 +# EOF diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh new file mode 100755 index 00000000000..d870a0cb098 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# for a given node version run: +# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; + +PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') +FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) +INDICES=(2 3 2 3 2 2 2 2 2) +VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) +TMPJOIN="tmp_join" +OUTPUT="bench_results.txt" + +for I in ${!FILES[*]}; do + F=${FILES[$I]} + P=${PATTERNS[$I]} + INDEX=${INDICES[$I]} + echo "version $F" > $F + for V in $VERSIONS; do + (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F + done + if [ $I == 0 ]; then + cat $F > $TMPJOIN + else + join $TMPJOIN $F > $OUTPUT + cp $OUTPUT $TMPJOIN + fi + rm $F +done + +rm $TMPJOIN + +gnuplot bench.gnu +convert -density 200 -resize 800x560 -flatten bench.eps bench.png +rm bench.eps diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c new file mode 100644 index 00000000000..dbfc75f6d71 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c @@ -0,0 +1,34 @@ +/* +Test performance of native C UUID generation + +To Compile: cc -luuid benchmark-native.c -o benchmark-native +*/ + +#include +#include +#include +#include + +int main() { + uuid_t myid; + char buf[36+1]; + int i; + struct timeval t; + double start, finish; + + gettimeofday(&t, NULL); + start = t.tv_sec + t.tv_usec/1e6; + + int n = 2e5; + for (i = 0; i < n; i++) { + uuid_generate(myid); + uuid_unparse(myid, buf); + } + + gettimeofday(&t, NULL); + finish = t.tv_sec + t.tv_usec/1e6; + double dur = finish - start; + + printf("%d uuids/sec", (int)(n/dur)); + return 0; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js new file mode 100644 index 00000000000..40e6efbe762 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js @@ -0,0 +1,84 @@ +try { + var nodeuuid = require('../uuid'); +} catch (e) { + console.error('node-uuid require failed - skipping tests'); +} + +try { + var uuid = require('uuid'); +} catch (e) { + console.error('uuid require failed - skipping tests'); +} + +try { + var uuidjs = require('uuid-js'); +} catch (e) { + console.error('uuid-js require failed - skipping tests'); +} + +var N = 5e5; + +function rate(msg, t) { + console.log(msg + ': ' + + (N / (Date.now() - t) * 1e3 | 0) + + ' uuids/second'); +} + +console.log('# v4'); + +// node-uuid - string form +if (nodeuuid) { + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); + rate('nodeuuid.v4() - using node.js crypto RNG', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); + rate('nodeuuid.v4() - using Math.random() RNG', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); + rate('nodeuuid.v4(\'binary\')', t); + + var buffer = new nodeuuid.BufferClass(16); + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); + rate('nodeuuid.v4(\'binary\', buffer)', t); +} + +// libuuid - string form +if (uuid) { + for (var i = 0, t = Date.now(); i < N; i++) uuid(); + rate('uuid()', t); + + for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); + rate('uuid(\'binary\')', t); +} + +// uuid-js - string form +if (uuidjs) { + for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); + rate('uuidjs.create(4)', t); +} + +// 140byte.es +for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); +rate('140byte.es_v4', t); + +console.log(''); +console.log('# v1'); + +// node-uuid - v1 string form +if (nodeuuid) { + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); + rate('nodeuuid.v1()', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); + rate('nodeuuid.v1(\'binary\')', t); + + var buffer = new nodeuuid.BufferClass(16); + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); + rate('nodeuuid.v1(\'binary\', buffer)', t); +} + +// uuid-js - v1 string form +if (uuidjs) { + for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); + rate('uuidjs.create(1)', t); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid new file mode 100755 index 00000000000..f732e9918e0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid @@ -0,0 +1,26 @@ +#!/usr/bin/env node + +var path = require('path'); +var uuid = require(path.join(__dirname, '..')); + +var arg = process.argv[2]; + +if ('--help' === arg) { + console.log('\n USAGE: uuid [version] [options]\n\n'); + console.log(' options:\n'); + console.log(' --help Display this message and exit\n'); + process.exit(0); +} + +if (null == arg) { + console.log(uuid()); + process.exit(0); +} + +if ('v1' !== arg && 'v4' !== arg) { + console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); + process.exit(1); +} + +console.log(uuid[arg]()); +process.exit(0); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json new file mode 100644 index 00000000000..c0925e1906b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json @@ -0,0 +1,23 @@ +{ + "name": "node-uuid", + "version": "1.4.7", + "homepage": "https://github.com/broofa/node-uuid", + "authors": [ + "Robert Kieffer " + ], + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "main": "uuid.js", + "keywords": [ + "uuid", + "gid", + "rfc4122" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json new file mode 100644 index 00000000000..3ff463366e7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json @@ -0,0 +1,25 @@ +{ + "name": "node-uuid", + "repo": "broofa/node-uuid", + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "version": "1.4.7", + "author": "Robert Kieffer ", + "contributors": [ + { + "name": "Christoph Tavan ", + "github": "https://github.com/ctavan" + } + ], + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "dependencies": {}, + "development": {}, + "main": "uuid.js", + "scripts": [ + "uuid.js" + ], + "license": "MIT" +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json new file mode 100644 index 00000000000..1c5bdb8ad1c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "node-uuid@~1.4.7", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "node-uuid@>=1.4.7 <1.5.0", + "_id": "node-uuid@1.4.7", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/node-uuid", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "coolaj86@gmail.com", + "name": "coolaj86" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "node-uuid", + "raw": "node-uuid@~1.4.7", + "rawSpec": "~1.4.7", + "scope": null, + "spec": ">=1.4.7 <1.5.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", + "_shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", + "_shrinkwrap": null, + "_spec": "node-uuid@~1.4.7", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "author": { + "email": "robert@broofa.com", + "name": "Robert Kieffer" + }, + "bin": { + "uuid": "./bin/uuid" + }, + "bugs": { + "url": "https://github.com/broofa/node-uuid/issues" + }, + "contributors": [ + { + "email": "coolaj86@gmail.com", + "name": "AJ ONeal" + }, + { + "email": "dev@tavan.de", + "name": "Christoph Tavan" + } + ], + "dependencies": {}, + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "devDependencies": { + "nyc": "^2.2.0" + }, + "directories": {}, + "dist": { + "shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", + "tarball": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz" + }, + "gitHead": "309512573ec1c60143c257157479a20f7f1f51cd", + "homepage": "https://github.com/broofa/node-uuid", + "installable": true, + "keywords": [ + "guid", + "rfc4122", + "uuid" + ], + "lib": ".", + "licenses": [ + { + "type": "MIT", + "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" + } + ], + "main": "./uuid.js", + "maintainers": [ + { + "email": "robert@broofa.com", + "name": "broofa" + }, + { + "email": "coolaj86@gmail.com", + "name": "coolaj86" + } + ], + "name": "node-uuid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/broofa/node-uuid.git" + }, + "scripts": { + "coverage": "nyc npm test && nyc report", + "test": "node test/test.js" + }, + "url": "http://github.com/broofa/node-uuid", + "version": "1.4.7" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js new file mode 100644 index 00000000000..05af82215fd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js @@ -0,0 +1,63 @@ +var assert = require('assert'), + nodeuuid = require('../uuid'), + uuidjs = require('uuid-js'), + libuuid = require('uuid').generate, + util = require('util'), + exec = require('child_process').exec, + os = require('os'); + +// On Mac Os X / macports there's only the ossp-uuid package that provides uuid +// On Linux there's uuid-runtime which provides uuidgen +var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; + +function compare(ids) { + console.log(ids); + for (var i = 0; i < ids.length; i++) { + var id = ids[i].split('-'); + id = [id[2], id[1], id[0]].join(''); + ids[i] = id; + } + var sorted = ([].concat(ids)).sort(); + + if (sorted.toString() !== ids.toString()) { + console.log('Warning: sorted !== ids'); + } else { + console.log('everything in order!'); + } +} + +// Test time order of v1 uuids +var ids = []; +while (ids.length < 10e3) ids.push(nodeuuid.v1()); + +var max = 10; +console.log('node-uuid:'); +ids = []; +for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); +compare(ids); + +console.log(''); +console.log('uuidjs:'); +ids = []; +for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); +compare(ids); + +console.log(''); +console.log('libuuid:'); +ids = []; +var count = 0; +var last = function() { + compare(ids); +} +var cb = function(err, stdout, stderr) { + ids.push(stdout.substring(0, stdout.length-1)); + count++; + if (count < max) { + return next(); + } + last(); +}; +var next = function() { + exec(uuidCmd, cb); +}; +next(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html new file mode 100644 index 00000000000..d80326ec5a8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js new file mode 100644 index 00000000000..5f1113d8572 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js @@ -0,0 +1,231 @@ +if (!this.uuid) { + // node.js + uuid = require('../uuid'); + if (!/_rb/.test(uuid._rng.toString())) { + throw new Error("should use crypto for node.js"); + } +} + +// +// x-platform log/assert shims +// + +function _log(msg, type) { + type = type || 'log'; + + if (typeof(document) != 'undefined') { + document.write('
' + msg.replace(/\n/g, '
') + '
'); + } + if (typeof(console) != 'undefined') { + var color = { + log: '\033[39m', + warn: '\033[33m', + error: '\033[31m' + }; + console[type](color[type] + msg + color.log); + } +} + +function log(msg) {_log(msg, 'log');} +function warn(msg) {_log(msg, 'warn');} +function error(msg) {_log(msg, 'error');} + +function assert(res, msg) { + if (!res) { + error('FAIL: ' + msg); + } else { + log('Pass: ' + msg); + } +} + +// +// Unit tests +// + +// Verify ordering of v1 ids created with explicit times +var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 + +function compare(name, ids) { + ids = ids.map(function(id) { + return id.split('-').reverse().join('-'); + }).sort(); + var sorted = ([].concat(ids)).sort(); + + assert(sorted.toString() == ids.toString(), name + ' have expected order'); +} + +// Verify ordering of v1 ids created using default behavior +compare('uuids with current time', [ + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1() +]); + +// Verify ordering of v1 ids created with explicit times +compare('uuids with time option', [ + uuid.v1({msecs: TIME - 10*3600*1000}), + uuid.v1({msecs: TIME - 1}), + uuid.v1({msecs: TIME}), + uuid.v1({msecs: TIME + 1}), + uuid.v1({msecs: TIME + 28*24*3600*1000}) +]); + +assert( + uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), + 'IDs created at same msec are different' +); + +// Verify throw if too many ids created +var thrown = false; +try { + uuid.v1({msecs: TIME, nsecs: 10000}); +} catch (e) { + thrown = true; +} +assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); + +// Verify clock regression bumps clockseq +var uidt = uuid.v1({msecs: TIME}); +var uidtb = uuid.v1({msecs: TIME - 1}); +assert( + parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, + 'Clock regression by msec increments the clockseq' +); + +// Verify clock regression bumps clockseq +var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); +var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); +assert( + parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, + 'Clock regression by nsec increments the clockseq' +); + +// Verify explicit options produce expected id +var id = uuid.v1({ + msecs: 1321651533573, + nsecs: 5432, + clockseq: 0x385c, + node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] +}); +assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); + +// Verify adjacent ids across a msec boundary are 1 time unit apart +var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); +var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); + +var before = u0.split('-')[0], after = u1.split('-')[0]; +var dt = parseInt(after, 16) - parseInt(before, 16); +assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); + +// +// Test parse/unparse +// + +id = '00112233445566778899aabbccddeeff'; +assert(uuid.unparse(uuid.parse(id.substr(0,10))) == + '00112233-4400-0000-0000-000000000000', 'Short parse'); +assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == + '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); + +// +// Perf tests +// + +var generators = { + v1: uuid.v1, + v4: uuid.v4 +}; + +var UUID_FORMAT = { + v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, + v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i +}; + +var N = 1e4; + +// Get %'age an actual value differs from the ideal value +function divergence(actual, ideal) { + return Math.round(100*100*(actual - ideal)/ideal)/100; +} + +function rate(msg, t) { + log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); +} + +for (var version in generators) { + var counts = {}, max = 0; + var generator = generators[version]; + var format = UUID_FORMAT[version]; + + log('\nSanity check ' + N + ' ' + version + ' uuids'); + for (var i = 0, ok = 0; i < N; i++) { + id = generator(); + if (!format.test(id)) { + throw Error(id + ' is not a valid UUID string'); + } + + if (id != uuid.unparse(uuid.parse(id))) { + assert(fail, id + ' is not a valid id'); + } + + // Count digits for our randomness check + if (version == 'v4') { + var digits = id.replace(/-/g, '').split(''); + for (var j = digits.length-1; j >= 0; j--) { + var c = digits[j]; + max = Math.max(max, counts[c] = (counts[c] || 0) + 1); + } + } + } + + // Check randomness for v4 UUIDs + if (version == 'v4') { + // Limit that we get worried about randomness. (Purely empirical choice, this!) + var limit = 2*100*Math.sqrt(1/N); + + log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); + + for (var i = 0; i < 16; i++) { + var c = i.toString(16); + var bar = '', n = counts[c], p = Math.round(n/max*100|0); + + // 1-3,5-8, and D-F: 1:16 odds over 30 digits + var ideal = N*30/16; + if (i == 4) { + // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1 + 30/16); + } else if (i >= 8 && i <= 11) { + // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1/4 + 30/16); + } else { + // Otherwise: 1:16 odds on 30 digits + ideal = N*30/16; + } + var d = divergence(n, ideal); + + // Draw bar using UTF squares (just for grins) + var s = n/max*50 | 0; + while (s--) bar += '='; + + assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); + } + } +} + +// Perf tests +for (var version in generators) { + log('\nPerformance testing ' + version + ' UUIDs'); + var generator = generators[version]; + var buf = new uuid.BufferClass(16); + + for (var i = 0, t = Date.now(); i < N; i++) generator(); + rate('uuid.' + version + '()', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); + rate('uuid.' + version + '(\'binary\')', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); + rate('uuid.' + version + '(\'binary\', buffer)', t); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js new file mode 100644 index 00000000000..89c5b8fb613 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js @@ -0,0 +1,272 @@ +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +/*global window, require, define */ +(function(_window) { + 'use strict'; + + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + var _rng, _mathRNG, _nodeRNG, _whatwgRNG, _previousRoot; + + function setupBrowser() { + // Allow for MSIE11 msCrypto + var _crypto = _window.crypto || _window.msCrypto; + + if (!_rng && _crypto && _crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // + // Moderately fast, high quality + try { + var _rnds8 = new Uint8Array(16); + _whatwgRNG = _rng = function whatwgRNG() { + _crypto.getRandomValues(_rnds8); + return _rnds8; + }; + _rng(); + } catch(e) {} + } + + if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _mathRNG = _rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { r = Math.random() * 0x100000000; } + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + if ('undefined' !== typeof console && console.warn) { + console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"); + } + } + } + + function setupNode() { + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html + // + // Moderately fast, high quality + if ('function' === typeof require) { + try { + var _rb = require('crypto').randomBytes; + _nodeRNG = _rng = _rb && function() {return _rb(16);}; + _rng(); + } catch(e) {} + } + } + + if (_window) { + setupBrowser(); + } else { + setupNode(); + } + + // Buffer class to use + var BufferClass = ('function' === typeof Buffer) ? Buffer : Array; + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + // **`parse()` - Parse a UUID into it's component bytes** + function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; + } + + // **`unparse()` - Convert UUID byte array (ala parse()) into a string** + function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _lastMSecs = 0, _lastNSecs = 0; + + // See https://github.com/broofa/node-uuid for API details + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = (options.clockseq != null) ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = (options.msecs != null) ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = (options.nsecs != null) ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq == null) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // **`v4()` - Generate random UUID** + + // See https://github.com/broofa/node-uuid for API details + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) === 'string') { + buf = (options === 'binary') ? new BufferClass(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // Export public API + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + uuid.parse = parse; + uuid.unparse = unparse; + uuid.BufferClass = BufferClass; + uuid._rng = _rng; + uuid._mathRNG = _mathRNG; + uuid._nodeRNG = _nodeRNG; + uuid._whatwgRNG = _whatwgRNG; + + if (('undefined' !== typeof module) && module.exports) { + // Publish as node.js module + module.exports = uuid; + } else if (typeof define === 'function' && define.amd) { + // Publish as AMD module + define(function() {return uuid;}); + + + } else { + // Publish as global (in browsers) + _previousRoot = _window.uuid; + + // **`noConflict()` - (browser only) to reset global 'uuid' var** + uuid.noConflict = function() { + _window.uuid = _previousRoot; + return uuid; + }; + + _window.uuid = uuid; + } +})('undefined' !== typeof window ? window : null); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore new file mode 100644 index 00000000000..3c3629e647f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml new file mode 100644 index 00000000000..99f2bbf5068 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md new file mode 100644 index 00000000000..f21a4b31c5d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md @@ -0,0 +1,211 @@ +If you want to write an option parser, and have it be good, there are +two ways to do it. The Right Way, and the Wrong Way. + +The Wrong Way is to sit down and write an option parser. We've all done +that. + +The Right Way is to write some complex configurable program with so many +options that you hit the limit of your frustration just trying to +manage them all, and defer it with duct-tape solutions until you see +exactly to the core of the problem, and finally snap and write an +awesome option parser. + +If you want to write an option parser, don't write an option parser. +Write a package manager, or a source control system, or a service +restarter, or an operating system. You probably won't end up with a +good one of those, but if you don't give up, and you are relentless and +diligent enough in your procrastination, you may just end up with a very +nice option parser. + +## USAGE + + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) + +This would give you support for any of the following: + +```bash +$ node my-program.js --foo "blerp" --no-flag +{ "foo" : "blerp", "flag" : false } + +$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag +{ bar: 7, foo: "Mr. Hand", flag: true } + +$ node my-program.js --foo "blerp" -f -----p +{ foo: "blerp", flag: true, pick: true } + +$ node my-program.js -fp --foofoo +{ foo: "Mr. Foo", flag: true, pick: true } + +$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. +{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } + +$ node my-program.js --blatzk -fp # unknown opts are ok. +{ blatzk: true, flag: true, pick: true } + +$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +{ blatzk: 1000, flag: true, pick: true } + +$ node my-program.js --no-blatzk -fp # unless they start with "no-" +{ blatzk: false, flag: true, pick: true } + +$ node my-program.js --baz b/a/z # known paths are resolved. +{ baz: "/Users/isaacs/b/a/z" } + +# if Array is one of the types, then it can take many +# values, and will always be an array. The other types provided +# specify what types are allowed in the list. + +$ node my-program.js --many1 5 --many1 null --many1 foo +{ many1: ["5", "null", "foo"] } + +$ node my-program.js --many2 foo --many2 bar +{ many2: ["/path/to/foo", "path/to/bar"] } +``` + +Read the tests at the bottom of `lib/nopt.js` for more examples of +what this puppy can do. + +## Types + +The following types are supported, and defined on `nopt.typeDefs` + +* String: A normal string. No parsing is done. +* path: A file system path. Gets resolved against cwd if not absolute. +* url: A url. If it doesn't parse, it isn't accepted. +* Number: Must be numeric. +* Date: Must parse as a date. If it does, and `Date` is one of the options, + then it will return a Date object, not a string. +* Boolean: Must be either `true` or `false`. If an option is a boolean, + then it does not need a value, and its presence will imply `true` as + the value. To negate boolean flags, do `--no-whatever` or `--whatever + false` +* NaN: Means that the option is strictly not allowed. Any value will + fail. +* Stream: An object matching the "Stream" class in node. Valuable + for use when validating programmatically. (npm uses this to let you + supply any WriteStream on the `outfd` and `logfd` config options.) +* Array: If `Array` is specified as one of the types, then the value + will be parsed as a list of options. This means that multiple values + can be specified, and that the value will always be an array. + +If a type is an array of values not on this list, then those are +considered valid values. For instance, in the example above, the +`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, +and any other value will be rejected. + +When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be +interpreted as their JavaScript equivalents. + +You can also mix types and values, or multiple types, in a list. For +instance `{ blah: [Number, null] }` would allow a value to be set to +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. + +To define a new type, add it to `nopt.typeDefs`. Each item in that +hash is an object with a `type` member and a `validate` method. The +`type` member is an object that matches what goes in the type list. The +`validate` method is a function that gets called with `validate(data, +key, val)`. Validate methods should assign `data[key]` to the valid +value of `val` if it can be handled properly, or return boolean +`false` if it cannot. + +You can also call `nopt.clean(data, types, typeDefs)` to clean up a +config object and remove its invalid properties. + +## Error Handling + +By default, nopt outputs a warning to standard error when invalid values for +known options are found. You can change this behavior by assigning a method +to `nopt.invalidHandler`. This method will be called with +the offending `nopt.invalidHandler(key, val, types)`. + +If no `nopt.invalidHandler` is assigned, then it will console.error +its whining. If it is assigned to boolean `false` then the warning is +suppressed. + +## Abbreviations + +Yes, they are supported. If you define options like this: + +```javascript +{ "foolhardyelephants" : Boolean +, "pileofmonkeys" : Boolean } +``` + +Then this will work: + +```bash +node program.js --foolhar --pil +node program.js --no-f --pileofmon +# etc. +``` + +## Shorthands + +Shorthands are a hash of shorter option names to a snippet of args that +they expand to. + +If multiple one-character shorthands are all combined, and the +combination does not unambiguously match any other option or shorthand, +then they will be broken up into their constituent parts. For example: + +```json +{ "s" : ["--loglevel", "silent"] +, "g" : "--global" +, "f" : "--force" +, "p" : "--parseable" +, "l" : "--long" +} +``` + +```bash +npm ls -sgflp +# just like doing this: +npm ls --loglevel silent --global --force --long --parseable +``` + +## The Rest of the args + +The config object returned by nopt is given a special member called +`argv`, which is an object with the following fields: + +* `remain`: The remaining args after all the parsing has occurred. +* `original`: The args as they originally appeared. +* `cooked`: The args after flags and shorthands are expanded. + +## Slicing + +Node programs are called with more or less the exact argv as it appears +in C land, after the v8 and node-specific options have been plucked off. +As such, `argv[0]` is always `node` and `argv[1]` is always the +JavaScript program being run. + +That's usually not very useful to you. So they're sliced off by +default. If you want them, then you can pass in `0` as the last +argument, or any other number that you'd like to slice off the start of +the list. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js new file mode 100755 index 00000000000..3232d4c570f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js @@ -0,0 +1,54 @@ +#!/usr/bin/env node +var nopt = require("../lib/nopt") + , path = require("path") + , types = { num: Number + , bool: Boolean + , help: Boolean + , list: Array + , "num-list": [Number, Array] + , "str-list": [String, Array] + , "bool-list": [Boolean, Array] + , str: String + , clear: Boolean + , config: Boolean + , length: Number + , file: path + } + , shorthands = { s: [ "--str", "astring" ] + , b: [ "--bool" ] + , nb: [ "--no-bool" ] + , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] + , "?": ["--help"] + , h: ["--help"] + , H: ["--help"] + , n: [ "--num", "125" ] + , c: ["--config"] + , l: ["--length"] + , f: ["--file"] + } + , parsed = nopt( types + , shorthands + , process.argv + , 2 ) + +console.log("parsed", parsed) + +if (parsed.help) { + console.log("") + console.log("nopt cli tester") + console.log("") + console.log("types") + console.log(Object.keys(types).map(function M (t) { + var type = types[t] + if (Array.isArray(type)) { + return [t, type.map(function (type) { return type.name })] + } + return [t, type && type.name] + }).reduce(function (s, i) { + s[i[0]] = i[1] + return s + }, {})) + console.log("") + console.log("shorthands") + console.log(shorthands) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js new file mode 100755 index 00000000000..142447e18e7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +//process.env.DEBUG_NOPT = 1 + +// my-program.js +var nopt = require("../lib/nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag", "true"] + , "g" : ["--flag"] + , "s" : "--flag" + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + +console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js new file mode 100644 index 00000000000..97707e78424 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js @@ -0,0 +1,415 @@ +// info about each config option. + +var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG + ? function () { console.error.apply(console, arguments) } + : function () {} + +var url = require("url") + , path = require("path") + , Stream = require("stream").Stream + , abbrev = require("abbrev") + +module.exports = exports = nopt +exports.clean = clean + +exports.typeDefs = + { String : { type: String, validate: validateString } + , Boolean : { type: Boolean, validate: validateBoolean } + , url : { type: url, validate: validateUrl } + , Number : { type: Number, validate: validateNumber } + , path : { type: path, validate: validatePath } + , Stream : { type: Stream, validate: validateStream } + , Date : { type: Date, validate: validateDate } + } + +function nopt (types, shorthands, args, slice) { + args = args || process.argv + types = types || {} + shorthands = shorthands || {} + if (typeof slice !== "number") slice = 2 + + debug(types, shorthands, args, slice) + + args = args.slice(slice) + var data = {} + , key + , remain = [] + , cooked = args + , original = args.slice(0) + + parse(args, data, remain, types, shorthands) + // now data is full + clean(data, types, exports.typeDefs) + data.argv = {remain:remain,cooked:cooked,original:original} + Object.defineProperty(data.argv, 'toString', { value: function () { + return this.original.map(JSON.stringify).join(" ") + }, enumerable: false }) + return data +} + +function clean (data, types, typeDefs) { + typeDefs = typeDefs || exports.typeDefs + var remove = {} + , typeDefault = [false, true, null, String, Array] + + Object.keys(data).forEach(function (k) { + if (k === "argv") return + var val = data[k] + , isArray = Array.isArray(val) + , type = types[k] + if (!isArray) val = [val] + if (!type) type = typeDefault + if (type === Array) type = typeDefault.concat(Array) + if (!Array.isArray(type)) type = [type] + + debug("val=%j", val) + debug("types=", type) + val = val.map(function (val) { + // if it's an unknown value, then parse false/true/null/numbers/dates + if (typeof val === "string") { + debug("string %j", val) + val = val.trim() + if ((val === "null" && ~type.indexOf(null)) + || (val === "true" && + (~type.indexOf(true) || ~type.indexOf(Boolean))) + || (val === "false" && + (~type.indexOf(false) || ~type.indexOf(Boolean)))) { + val = JSON.parse(val) + debug("jsonable %j", val) + } else if (~type.indexOf(Number) && !isNaN(val)) { + debug("convert to number", val) + val = +val + } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { + debug("convert to date", val) + val = new Date(val) + } + } + + if (!types.hasOwnProperty(k)) { + return val + } + + // allow `--no-blah` to set 'blah' to null if null is allowed + if (val === false && ~type.indexOf(null) && + !(~type.indexOf(false) || ~type.indexOf(Boolean))) { + val = null + } + + var d = {} + d[k] = val + debug("prevalidated val", d, val, types[k]) + if (!validate(d, k, val, types[k], typeDefs)) { + if (exports.invalidHandler) { + exports.invalidHandler(k, val, types[k], data) + } else if (exports.invalidHandler !== false) { + debug("invalid: "+k+"="+val, types[k]) + } + return remove + } + debug("validated val", d, val, types[k]) + return d[k] + }).filter(function (val) { return val !== remove }) + + if (!val.length) delete data[k] + else if (isArray) { + debug(isArray, data[k], val) + data[k] = val + } else data[k] = val[0] + + debug("k=%s val=%j", k, val, data[k]) + }) +} + +function validateString (data, k, val) { + data[k] = String(val) +} + +function validatePath (data, k, val) { + if (val === true) return false + if (val === null) return true + + val = String(val) + var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// + if (val.match(homePattern) && process.env.HOME) { + val = path.resolve(process.env.HOME, val.substr(2)) + } + data[k] = path.resolve(String(val)) + return true +} + +function validateNumber (data, k, val) { + debug("validate Number %j %j %j", k, val, isNaN(val)) + if (isNaN(val)) return false + data[k] = +val +} + +function validateDate (data, k, val) { + debug("validate Date %j %j %j", k, val, Date.parse(val)) + var s = Date.parse(val) + if (isNaN(s)) return false + data[k] = new Date(val) +} + +function validateBoolean (data, k, val) { + if (val instanceof Boolean) val = val.valueOf() + else if (typeof val === "string") { + if (!isNaN(val)) val = !!(+val) + else if (val === "null" || val === "false") val = false + else val = true + } else val = !!val + data[k] = val +} + +function validateUrl (data, k, val) { + val = url.parse(String(val)) + if (!val.host) return false + data[k] = val.href +} + +function validateStream (data, k, val) { + if (!(val instanceof Stream)) return false + data[k] = val +} + +function validate (data, k, val, type, typeDefs) { + // arrays are lists of types. + if (Array.isArray(type)) { + for (var i = 0, l = type.length; i < l; i ++) { + if (type[i] === Array) continue + if (validate(data, k, val, type[i], typeDefs)) return true + } + delete data[k] + return false + } + + // an array of anything? + if (type === Array) return true + + // NaN is poisonous. Means that something is not allowed. + if (type !== type) { + debug("Poison NaN", k, val, type) + delete data[k] + return false + } + + // explicit list of values + if (val === type) { + debug("Explicitly allowed %j", val) + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + return true + } + + // now go through the list of typeDefs, validate against each one. + var ok = false + , types = Object.keys(typeDefs) + for (var i = 0, l = types.length; i < l; i ++) { + debug("test type %j %j %j", k, val, types[i]) + var t = typeDefs[types[i]] + if (t && + ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { + var d = {} + ok = false !== t.validate(d, k, val) + val = d[k] + if (ok) { + // if (isArray) (data[k] = data[k] || []).push(val) + // else data[k] = val + data[k] = val + break + } + } + } + debug("OK? %j (%j %j %j)", ok, k, val, types[i]) + + if (!ok) delete data[k] + return ok +} + +function parse (args, data, remain, types, shorthands) { + debug("parse", args, data, remain) + + var key = null + , abbrevs = abbrev(Object.keys(types)) + , shortAbbr = abbrev(Object.keys(shorthands)) + + for (var i = 0; i < args.length; i ++) { + var arg = args[i] + debug("arg", arg) + + if (arg.match(/^-{2,}$/)) { + // done with keys. + // the rest are args. + remain.push.apply(remain, args.slice(i + 1)) + args[i] = "--" + break + } + var hadEq = false + if (arg.charAt(0) === "-" && arg.length > 1) { + if (arg.indexOf("=") !== -1) { + hadEq = true + var v = arg.split("=") + arg = v.shift() + v = v.join("=") + args.splice.apply(args, [i, 1].concat([arg, v])) + } + + // see if it's a shorthand + // if so, splice and back up to re-parse it. + var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) + debug("arg=%j shRes=%j", arg, shRes) + if (shRes) { + debug(arg, shRes) + args.splice.apply(args, [i, 1].concat(shRes)) + if (arg !== shRes[0]) { + i -- + continue + } + } + arg = arg.replace(/^-+/, "") + var no = null + while (arg.toLowerCase().indexOf("no-") === 0) { + no = !no + arg = arg.substr(3) + } + + if (abbrevs[arg]) arg = abbrevs[arg] + + var isArray = types[arg] === Array || + Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 + + // allow unknown things to be arrays if specified multiple times. + if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { + if (!Array.isArray(data[arg])) + data[arg] = [data[arg]] + isArray = true + } + + var val + , la = args[i + 1] + + var isBool = typeof no === 'boolean' || + types[arg] === Boolean || + Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || + (typeof types[arg] === 'undefined' && !hadEq) || + (la === "false" && + (types[arg] === null || + Array.isArray(types[arg]) && ~types[arg].indexOf(null))) + + if (isBool) { + // just set and move along + val = !no + // however, also support --bool true or --bool false + if (la === "true" || la === "false") { + val = JSON.parse(la) + la = null + if (no) val = !val + i ++ + } + + // also support "foo":[Boolean, "bar"] and "--foo bar" + if (Array.isArray(types[arg]) && la) { + if (~types[arg].indexOf(la)) { + // an explicit type + val = la + i ++ + } else if ( la === "null" && ~types[arg].indexOf(null) ) { + // null allowed + val = null + i ++ + } else if ( !la.match(/^-{2,}[^-]/) && + !isNaN(la) && + ~types[arg].indexOf(Number) ) { + // number + val = +la + i ++ + } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { + // string + val = la + i ++ + } + } + + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + continue + } + + if (types[arg] === String && la === undefined) + la = "" + + if (la && la.match(/^-{2,}$/)) { + la = undefined + i -- + } + + val = la === undefined ? true : la + if (isArray) (data[arg] = data[arg] || []).push(val) + else data[arg] = val + + i ++ + continue + } + remain.push(arg) + } +} + +function resolveShort (arg, shorthands, shortAbbr, abbrevs) { + // handle single-char shorthands glommed together, like + // npm ls -glp, but only if there is one dash, and only if + // all of the chars are single-char shorthands, and it's + // not a match to some other abbrev. + arg = arg.replace(/^-+/, '') + + // if it's an exact known option, then don't go any further + if (abbrevs[arg] === arg) + return null + + // if it's an exact known shortopt, same deal + if (shorthands[arg]) { + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] + } + + // first check to see if this arg is a set of single-char shorthands + var singles = shorthands.___singles + if (!singles) { + singles = Object.keys(shorthands).filter(function (s) { + return s.length === 1 + }).reduce(function (l,r) { + l[r] = true + return l + }, {}) + shorthands.___singles = singles + debug('shorthand singles', singles) + } + + var chrs = arg.split("").filter(function (c) { + return singles[c] + }) + + if (chrs.join("") === arg) return chrs.map(function (c) { + return shorthands[c] + }).reduce(function (l, r) { + return l.concat(r) + }, []) + + + // if it's an arg abbrev, and not a literal shorthand, then prefer the arg + if (abbrevs[arg] && !shorthands[arg]) + return null + + // if it's an abbr for a shorthand, then use that + if (shortAbbr[arg]) + arg = shortAbbr[arg] + + // make it an array, if it's a list of words + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/) + + return shorthands[arg] +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json new file mode 100644 index 00000000000..af77afe14ec --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "nopt@~3.0.1", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "nopt@>=3.0.1 <3.1.0", + "_id": "nopt@3.0.6", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/nopt", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + "_npmVersion": "2.14.10", + "_phantomChildren": {}, + "_requested": { + "name": "nopt", + "raw": "nopt@~3.0.1", + "rawSpec": "~3.0.1", + "scope": null, + "spec": ">=3.0.1 <3.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/node-pre-gyp" + ], + "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "_shrinkwrap": null, + "_spec": "nopt@~3.0.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bin": { + "nopt": "./bin/nopt.js" + }, + "bugs": { + "url": "https://github.com/npm/nopt/issues" + }, + "dependencies": { + "abbrev": "1" + }, + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": {}, + "dist": { + "shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "tarball": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" + }, + "gitHead": "10a750c9bb99c1950160353459e733ac2aa18cb6", + "homepage": "https://github.com/npm/nopt#readme", + "license": "ISC", + "main": "lib/nopt.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + }, + { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" + } + ], + "name": "nopt", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/nopt.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "3.0.6" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js new file mode 100644 index 00000000000..d399de92099 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js @@ -0,0 +1,273 @@ +var nopt = require("../") + , test = require('tap').test + + +test("passing a string results in a string", function (t) { + var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) + t.same(parsed.key, "myvalue") + t.end() +}) + +// https://github.com/npm/nopt/issues/31 +test("Empty String results in empty string, not true", function (t) { + var parsed = nopt({ empty: String }, {}, ["--empty"], 0) + t.same(parsed.empty, "") + t.end() +}) + +test("~ path is resolved to $HOME", function (t) { + var path = require("path") + if (!process.env.HOME) process.env.HOME = "/tmp" + var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) + t.same(parsed.key, path.resolve(process.env.HOME, "val")) + t.end() +}) + +// https://github.com/npm/nopt/issues/24 +test("Unknown options are not parsed as numbers", function (t) { + var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0) + t.equal(parsed['leave-as-is'], '1.20') + t.equal(parsed['parse-me'], 1.2) + t.end() +}); + +// https://github.com/npm/nopt/issues/48 +test("Check types based on name of type", function (t) { + var parsed = nopt({"parse-me": {name: "Number"}}, null, ['--parse-me=1.20'], 0) + t.equal(parsed['parse-me'], 1.2) + t.end() +}) + + +test("Missing types are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("Types passed without a name are not parsed", function (t) { + var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0) + //should only contain argv + t.equal(Object.keys(parsed).length, 1) + t.end() +}) + +test("other tests", function (t) { + + var util = require("util") + , Stream = require("stream") + , path = require("path") + , url = require("url") + + , shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + } + + , types = + { aoa: Array + , nullstream: [null, Stream] + , date: Date + , str: String + , browser : String + , cache : path + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : path + , force : Boolean + , global : Boolean + , globalconfig : path + , group : [String, Number] + , gzipbin : String + , logfd : [Number, Stream] + , loglevel : ["silent","win","error","warn","info","verbose","silly"] + , long : Boolean + , "node-version" : [false, String] + , npaturl : url + , npat : Boolean + , "onload-script" : [false, String] + , outfd : [Number, Stream] + , parseable : Boolean + , pre: Boolean + , prefix: path + , proxy : url + , "rebuild-bundle" : Boolean + , registry : url + , searchopts : String + , searchexclude: [null, String] + , shell : path + , t: [Array, String] + , tag : String + , tar : String + , tmp : path + , "unsafe-perm" : Boolean + , usage : Boolean + , user : String + , username : String + , userconfig : path + , version : Boolean + , viewer: path + , _exit : Boolean + , path: path + } + + ; [["-v", {version:true}, []] + ,["---v", {version:true}, []] + ,["ls -s --no-reg connect -d", + {loglevel:"info",registry:null},["ls","connect"]] + ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] + ,["ls --registry blargle", {}, ["ls"]] + ,["--no-registry", {registry:null}, []] + ,["--no-color true", {color:false}, []] + ,["--no-color false", {color:true}, []] + ,["--no-color", {color:false}, []] + ,["--color false", {color:false}, []] + ,["--color --logfd 7", {logfd:7,color:true}, []] + ,["--color=true", {color:true}, []] + ,["--logfd=10", {logfd:10}, []] + ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] + ,["--tmp=tmp -tar=gtar", + {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] + ,["--logfd x", {}, []] + ,["a -true -- -no-false", {true:true},["a","-no-false"]] + ,["a -no-false", {false:false},["a"]] + ,["a -no-no-true", {true:true}, ["a"]] + ,["a -no-no-no-false", {false:false}, ["a"]] + ,["---NO-no-No-no-no-no-nO-no-no"+ + "-No-no-no-no-no-no-no-no-no"+ + "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ + "-no-body-can-do-the-boogaloo-like-I-do" + ,{"body-can-do-the-boogaloo-like-I-do":false}, []] + ,["we are -no-strangers-to-love "+ + "--you-know=the-rules --and=so-do-i "+ + "---im-thinking-of=a-full-commitment "+ + "--no-you-would-get-this-from-any-other-guy "+ + "--no-gonna-give-you-up "+ + "-no-gonna-let-you-down=true "+ + "--no-no-gonna-run-around false "+ + "--desert-you=false "+ + "--make-you-cry false "+ + "--no-tell-a-lie "+ + "--no-no-and-hurt-you false" + ,{"strangers-to-love":false + ,"you-know":"the-rules" + ,"and":"so-do-i" + ,"you-would-get-this-from-any-other-guy":false + ,"gonna-give-you-up":false + ,"gonna-let-you-down":false + ,"gonna-run-around":false + ,"desert-you":false + ,"make-you-cry":false + ,"tell-a-lie":false + ,"and-hurt-you":false + },["we", "are"]] + ,["-t one -t two -t three" + ,{t: ["one", "two", "three"]} + ,[]] + ,["-t one -t null -t three four five null" + ,{t: ["one", "null", "three"]} + ,["four", "five", "null"]] + ,["-t foo" + ,{t:["foo"]} + ,[]] + ,["--no-t" + ,{t:["false"]} + ,[]] + ,["-no-no-t" + ,{t:["true"]} + ,[]] + ,["-aoa one -aoa null -aoa 100" + ,{aoa:["one", null, '100']} + ,[]] + ,["-str 100" + ,{str:"100"} + ,[]] + ,["--color always" + ,{color:"always"} + ,[]] + ,["--no-nullstream" + ,{nullstream:null} + ,[]] + ,["--nullstream false" + ,{nullstream:null} + ,[]] + ,["--notadate=2011-01-25" + ,{notadate: "2011-01-25"} + ,[]] + ,["--date 2011-01-25" + ,{date: new Date("2011-01-25")} + ,[]] + ,["-cl 1" + ,{config: true, length: 1} + ,[] + ,{config: Boolean, length: Number, clear: Boolean} + ,{c: "--config", l: "--length"}] + ,["--acount bla" + ,{"acount":true} + ,["bla"] + ,{account: Boolean, credentials: Boolean, options: String} + ,{a:"--account", c:"--credentials",o:"--options"}] + ,["--clear" + ,{clear:true} + ,[] + ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} + ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] + ,["--file -" + ,{"file":"-"} + ,[] + ,{file:String} + ,{}] + ,["--file -" + ,{"file":true} + ,["-"] + ,{file:Boolean} + ,{}] + ,["--path" + ,{"path":null} + ,[]] + ,["--path ." + ,{"path":process.cwd()} + ,[]] + ].forEach(function (test) { + var argv = test[0].split(/\s+/) + , opts = test[1] + , rem = test[2] + , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) + , parsed = actual.argv + delete actual.argv + for (var i in opts) { + var e = JSON.stringify(opts[i]) + , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) + if (e && typeof e === "object") { + t.deepEqual(e, a) + } else { + t.equal(e, a) + } + } + t.deepEqual(rem, parsed.remain) + }) + t.end() +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md new file mode 100644 index 00000000000..f549a1f3de8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md @@ -0,0 +1,36 @@ +### v3.1.2 + +* Update to `gauge@1.6.0` adding support for default values for template + items. + +### v3.1.1 + +* Update to `gauge@1.5.3` to fix to `1.x` compatibility when it comes to + when a progress bar is enabled. In `1.x` if you didn't have a TTY the + progress bar was never shown. In `2.x` it merely defaults to disabled, + but you can enable it explicitly if you still want progress updates. + +### v3.1.0 + +* Update to `gauge@2.5.2`: + * Updates the `signal-exit` dependency which fixes an incompatibility with + the node profiler. + * Uses externalizes its ansi code generation in `console-control-strings` +* Make the default progress bar include the last line printed, colored as it + would be when printing to a tty. + +### v3.0.0 + +* Switch to `gauge@2.0.0`, for better performance, better look. +* Set stderr/stdout blocking if they're tty's, so that we can hide a + progress bar going to stderr and then safely print to stdout. Without + this the two can end up overlapping producing confusing and sometimes + corrupted output. + +### v2.0.0 + +* Make the `error` event non-fatal so that folks can use it as a prefix. + +### v1.0.0 + +* Add progress bar with `gauge@1.1.0` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md new file mode 100644 index 00000000000..dba35501614 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md @@ -0,0 +1,210 @@ +# npmlog + +The logger util that npm uses. + +This logger is very basic. It does the logging for npm. It supports +custom levels and colored output. + +By default, logs are written to stderr. If you want to send log messages +to outputs other than streams, then you can change the `log.stream` +member, or you can just listen to the events that it emits, and do +whatever you want with them. + +# Basic Usage + +``` +var log = require('npmlog') + +// additional stuff ---------------------------+ +// message ----------+ | +// prefix ----+ | | +// level -+ | | | +// v v v v + log.info('fyi', 'I have a kitty cat: %j', myKittyCat) +``` + +## log.level + +* {String} + +The level to display logs at. Any logs at or above this level will be +displayed. The special level `silent` will prevent anything from being +displayed ever. + +## log.record + +* {Array} + +An array of all the log messages that have been entered. + +## log.maxRecordSize + +* {Number} + +The maximum number of records to keep. If log.record gets bigger than +10% over this value, then it is sliced down to 90% of this value. + +The reason for the 10% window is so that it doesn't have to resize a +large array on every log entry. + +## log.prefixStyle + +* {Object} + +A style object that specifies how prefixes are styled. (See below) + +## log.headingStyle + +* {Object} + +A style object that specifies how the heading is styled. (See below) + +## log.heading + +* {String} Default: "" + +If set, a heading that is printed at the start of every line. + +## log.stream + +* {Stream} Default: `process.stderr` + +The stream where output is written. + +## log.enableColor() + +Force colors to be used on all messages, regardless of the output +stream. + +## log.disableColor() + +Disable colors on all messages. + +## log.enableProgress() + +Enable the display of log activity spinner and progress bar + +## log.disableProgress() + +Disable the display of a progress bar + +## log.enableUnicode() + +Force the unicode theme to be used for the progress bar. + +## log.disableUnicode() + +Disable the use of unicode in the progress bar. + +## log.setGaugeTemplate(template) + +Set a template for outputting the progress bar. See the [gauge documentation] for details. + +[gauge documentation]: https://npmjs.com/package/gauge + +## log.setGaugeThemeset(themes) + +Select a themeset to pick themes from for the progress bar. See the [gauge documentation] for details. + +## log.pause() + +Stop emitting messages to the stream, but do not drop them. + +## log.resume() + +Emit all buffered messages that were written while paused. + +## log.log(level, prefix, message, ...) + +* `level` {String} The level to emit the message at +* `prefix` {String} A string prefix. Set to "" to skip. +* `message...` Arguments to `util.format` + +Emit a log message at the specified level. + +## log\[level](prefix, message, ...) + +For example, + +* log.silly(prefix, message, ...) +* log.verbose(prefix, message, ...) +* log.info(prefix, message, ...) +* log.http(prefix, message, ...) +* log.warn(prefix, message, ...) +* log.error(prefix, message, ...) + +Like `log.log(level, prefix, message, ...)`. In this way, each level is +given a shorthand, so you can do `log.info(prefix, message)`. + +## log.addLevel(level, n, style, disp) + +* `level` {String} Level indicator +* `n` {Number} The numeric level +* `style` {Object} Object with fg, bg, inverse, etc. +* `disp` {String} Optional replacement for `level` in the output. + +Sets up a new level with a shorthand function and so forth. + +Note that if the number is `Infinity`, then setting the level to that +will cause all log messages to be suppressed. If the number is +`-Infinity`, then the only way to show it is to enable all log messages. + +## log.newItem(name, todo, weight) + +* `name` {String} Optional; progress item name. +* `todo` {Number} Optional; total amount of work to be done. Default 0. +* `weight` {Number} Optional; the weight of this item relative to others. Default 1. + +This adds a new `are-we-there-yet` item tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `Tracker` object. + +## log.newStream(name, todo, weight) + +This adds a new `are-we-there-yet` stream tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerStream` object. + +## log.newGroup(name, weight) + +This adds a new `are-we-there-yet` tracker group to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerGroup` object. + +# Events + +Events are all emitted with the message object. + +* `log` Emitted for all messages +* `log.` Emitted for all messages with the `` level. +* `` Messages with prefixes also emit their prefix as an event. + +# Style Objects + +Style objects can have the following fields: + +* `fg` {String} Color for the foreground text +* `bg` {String} Color for the background +* `bold`, `inverse`, `underline` {Boolean} Set the associated property +* `bell` {Boolean} Make a noise (This is pretty annoying, probably.) + +# Message Objects + +Every log event is emitted with a message object, and the `log.record` +list contains all of them that have been created. They have the +following fields: + +* `id` {Number} +* `level` {String} +* `prefix` {String} +* `message` {String} Result of `util.format()` +* `messageRaw` {Array} Arguments to `util.format()` + +# Blocking TTYs + +We use [`set-blocking`](https://npmjs.com/package/set-blocking) to set +stderr and stdout blocking if they are tty's and have the setBlocking call. +This is a work around for an issue in early versions of Node.js 6.x, which +made stderr and stdout non-blocking on OSX. (They are always blocking +Windows and were never blocking on Linux.) `npmlog` needs them to be blocking +so that it can allow output to stdout and stderr to be interlaced. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js new file mode 100644 index 00000000000..e5b70f1f80b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js @@ -0,0 +1,298 @@ +'use strict' +var Progress = require('are-we-there-yet') +var Gauge = require('gauge') +var EE = require('events').EventEmitter +var log = exports = module.exports = new EE() +var util = require('util') + +var setBlocking = require('set-blocking') +var consoleControl = require('console-control-strings') + +setBlocking(true) +var stream = process.stderr +Object.defineProperty(log, 'stream', { + set: function (newStream) { + stream = newStream + if (this.gauge) this.gauge.setWriteTo(stream, stream) + }, + get: function () { + return stream + } +}) + +// by default, decide based on tty-ness. +var colorEnabled +log.useColor = function () { + return colorEnabled != null ? colorEnabled : stream.isTTY +} + +log.enableColor = function () { + colorEnabled = true + this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) +} +log.disableColor = function () { + colorEnabled = false + this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) +} + +// default level +log.level = 'info' + +log.gauge = new Gauge(stream, { + theme: {hasColor: log.useColor()}, + template: [ + {type: 'progressbar', length: 20}, + {type: 'activityIndicator', kerning: 1, length: 1}, + {type: 'section', default: ''}, + ':', + {type: 'logline', kerning: 1, default: ''} + ] +}) + +log.tracker = new Progress.TrackerGroup() + +// no progress bars unless asked +log.progressEnabled = false + +var unicodeEnabled + +log.enableUnicode = function () { + unicodeEnabled = true + this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) +} + +log.disableUnicode = function () { + unicodeEnabled = false + this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) +} + +log.setGaugeThemeset = function (themes) { + this.gauge.setThemeset(themes) +} + +log.setGaugeTemplate = function (template) { + this.gauge.setTemplate(template) +} + +log.enableProgress = function () { + if (this.progressEnabled) return + this.progressEnabled = true + if (this._pause) return + this.tracker.on('change', this.showProgress) + this.gauge.enable() + this.showProgress() +} + +log.disableProgress = function () { + if (!this.progressEnabled) return + this.clearProgress() + this.progressEnabled = false + this.tracker.removeListener('change', this.showProgress) + this.gauge.disable() +} + +var trackerConstructors = ['newGroup', 'newItem', 'newStream'] + +var mixinLog = function (tracker) { + // mixin the public methods from log into the tracker + // (except: conflicts and one's we handle specially) + Object.keys(log).forEach(function (P) { + if (P[0] === '_') return + if (trackerConstructors.filter(function (C) { return C === P }).length) return + if (tracker[P]) return + if (typeof log[P] !== 'function') return + var func = log[P] + tracker[P] = function () { + return func.apply(log, arguments) + } + }) + // if the new tracker is a group, make sure any subtrackers get + // mixed in too + if (tracker instanceof Progress.TrackerGroup) { + trackerConstructors.forEach(function (C) { + var func = tracker[C] + tracker[C] = function () { return mixinLog(func.apply(tracker, arguments)) } + }) + } + return tracker +} + +// Add tracker constructors to the top level log object +trackerConstructors.forEach(function (C) { + log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } +}) + +log.clearProgress = function (cb) { + if (!this.progressEnabled) return cb && process.nextTick(cb) + this.gauge.hide(cb) +} + +log.showProgress = function (name, completed) { + if (!this.progressEnabled) return + var values = {} + if (name) values.section = name + var last = log.record[log.record.length - 1] + if (last) { + values.subsection = last.prefix + var disp = log.disp[last.level] || last.level + var logline = this._format(disp, log.style[last.level]) + if (last.prefix) logline += ' ' + this._format(last.prefix, this.prefixStyle) + logline += ' ' + last.message.split(/\r?\n/)[0] + values.logline = logline + } + values.completed = completed || this.tracker.completed() + this.gauge.show(values) +}.bind(log) // bind for use in tracker's on-change listener + +// temporarily stop emitting, but don't drop +log.pause = function () { + this._paused = true +} + +log.resume = function () { + if (!this._paused) return + this._paused = false + + var b = this._buffer + this._buffer = [] + b.forEach(function (m) { + this.emitLog(m) + }, this) + if (this.progressEnabled) this.enableProgress() +} + +log._buffer = [] + +var id = 0 +log.record = [] +log.maxRecordSize = 10000 +log.log = function (lvl, prefix, message) { + var l = this.levels[lvl] + if (l === undefined) { + return this.emit('error', new Error(util.format( + 'Undefined log level: %j', lvl))) + } + + var a = new Array(arguments.length - 2) + var stack = null + for (var i = 2; i < arguments.length; i++) { + var arg = a[i - 2] = arguments[i] + + // resolve stack traces to a plain string. + if (typeof arg === 'object' && arg && + (arg instanceof Error) && arg.stack) { + arg.stack = stack = arg.stack + '' + } + } + if (stack) a.unshift(stack + '\n') + message = util.format.apply(util, a) + + var m = { id: id++, + level: lvl, + prefix: String(prefix || ''), + message: message, + messageRaw: a } + + this.emit('log', m) + this.emit('log.' + lvl, m) + if (m.prefix) this.emit(m.prefix, m) + + this.record.push(m) + var mrs = this.maxRecordSize + var n = this.record.length - mrs + if (n > mrs / 10) { + var newSize = Math.floor(mrs * 0.9) + this.record = this.record.slice(-1 * newSize) + } + + this.emitLog(m) +}.bind(log) + +log.emitLog = function (m) { + if (this._paused) { + this._buffer.push(m) + return + } + if (this.progressEnabled) this.gauge.pulse(m.prefix) + var l = this.levels[m.level] + if (l === undefined) return + if (l < this.levels[this.level]) return + if (l > 0 && !isFinite(l)) return + + var disp = log.disp[m.level] || m.level + this.clearProgress() + m.message.split(/\r?\n/).forEach(function (line) { + if (this.heading) { + this.write(this.heading, this.headingStyle) + this.write(' ') + } + this.write(disp, log.style[m.level]) + var p = m.prefix || '' + if (p) this.write(' ') + this.write(p, this.prefixStyle) + this.write(' ' + line + '\n') + }, this) + this.showProgress() +} + +log._format = function (msg, style) { + if (!stream) return + + var output = '' + if (this.useColor()) { + style = style || {} + var settings = [] + if (style.fg) settings.push(style.fg) + if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1)) + if (style.bold) settings.push('bold') + if (style.underline) settings.push('underline') + if (style.inverse) settings.push('inverse') + if (settings.length) output += consoleControl.color(settings) + if (style.beep) output += consoleControl.beep() + } + output += msg + if (this.useColor()) { + output += consoleControl.color('reset') + } + return output +} + +log.write = function (msg, style) { + if (!stream) return + + stream.write(this._format(msg, style)) +} + +log.addLevel = function (lvl, n, style, disp) { + if (!disp) disp = lvl + this.levels[lvl] = n + this.style[lvl] = style + if (!this[lvl]) { + this[lvl] = function () { + var a = new Array(arguments.length + 1) + a[0] = lvl + for (var i = 0; i < arguments.length; i++) { + a[i + 1] = arguments[i] + } + return this.log.apply(this, a) + }.bind(this) + } + this.disp[lvl] = disp +} + +log.prefixStyle = { fg: 'magenta' } +log.headingStyle = { fg: 'white', bg: 'black' } + +log.style = {} +log.levels = {} +log.disp = {} +log.addLevel('silly', -Infinity, { inverse: true }, 'sill') +log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb') +log.addLevel('info', 2000, { fg: 'green' }) +log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) +log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') +log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') +log.addLevel('silent', Infinity) + +// allow 'error' prefix +log.on('error', function () {}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json new file mode 100644 index 00000000000..636adef6aae --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "npmlog@~3.1.2", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "npmlog@>=3.1.2 <3.2.0", + "_id": "npmlog@3.1.2", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/npmlog", + "_nodeVersion": "4.4.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/npmlog-3.1.2.tgz_1466073052641_0.36111341998912394" + }, + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.9.6", + "_phantomChildren": {}, + "_requested": { + "name": "npmlog", + "raw": "npmlog@~3.1.2", + "rawSpec": "~3.1.2", + "scope": null, + "spec": ">=3.1.2 <3.2.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/node-pre-gyp" + ], + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz", + "_shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", + "_shrinkwrap": null, + "_spec": "npmlog@~3.1.2", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/npmlog/issues" + }, + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.6.0", + "set-blocking": "~2.0.0" + }, + "description": "logger for npm", + "devDependencies": { + "standard": "~7.1.2", + "tap": "~5.7.0" + }, + "directories": {}, + "dist": { + "shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", + "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz" + }, + "files": [ + "log.js" + ], + "gitHead": "444e237743fa1339cb91bea2d3f16f710be56984", + "homepage": "https://github.com/npm/npmlog#readme", + "license": "ISC", + "main": "log.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + }, + { + "email": "i@izs.me", + "name": "isaacs" + }, + { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" + } + ], + "name": "npmlog", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/npmlog.git" + }, + "scripts": { + "test": "standard && tap test/*.js" + }, + "version": "3.1.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js new file mode 100644 index 00000000000..79be4b9cb8c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = Number.isNaN || function (x) { + return x !== x; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json new file mode 100644 index 00000000000..5015921bc67 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "number-is-nan@^1.0.0", + "/Users/eshanker/Code/fsevents/node_modules/code-point-at" + ] + ], + "_from": "number-is-nan@>=1.0.0 <2.0.0", + "_id": "number-is-nan@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/number-is-nan", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "number-is-nan", + "raw": "number-is-nan@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/code-point-at", + "/fsevents/is-fullwidth-code-point" + ], + "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", + "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "_shrinkwrap": null, + "_spec": "number-is-nan@^1.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/code-point-at", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/number-is-nan/issues" + }, + "dependencies": {}, + "description": "ES6 Number.isNaN() ponyfill", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "tarball": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3", + "homepage": "https://github.com/sindresorhus/number-is-nan#readme", + "keywords": [ + "ecmascript", + "es2015", + "es6", + "harmony", + "is", + "nan", + "not", + "number", + "polyfill", + "ponyfill", + "shim" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "number-is-nan", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/number-is-nan.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md new file mode 100644 index 00000000000..93d851a14f1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md @@ -0,0 +1,30 @@ +# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) + +> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save number-is-nan +``` + + +## Usage + +```js +var numberIsNan = require('number-is-nan'); + +numberIsNan(NaN); +//=> true + +numberIsNan('unicorn'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE new file mode 100644 index 00000000000..a4a9aee0c2f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md new file mode 100644 index 00000000000..34c4a85d2dd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md @@ -0,0 +1,4 @@ +oauth-sign +========== + +OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js new file mode 100644 index 00000000000..dadcba9709f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js @@ -0,0 +1,136 @@ +var crypto = require('crypto') + , qs = require('querystring') + ; + +function sha1 (key, body) { + return crypto.createHmac('sha1', key).update(body).digest('base64') +} + +function rsa (key, body) { + return crypto.createSign("RSA-SHA1").update(body).sign(key, 'base64'); +} + +function rfc3986 (str) { + return encodeURIComponent(str) + .replace(/!/g,'%21') + .replace(/\*/g,'%2A') + .replace(/\(/g,'%28') + .replace(/\)/g,'%29') + .replace(/'/g,'%27') + ; +} + +// Maps object to bi-dimensional array +// Converts { foo: 'A', bar: [ 'b', 'B' ]} to +// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ] +function map (obj) { + var key, val, arr = [] + for (key in obj) { + val = obj[key] + if (Array.isArray(val)) + for (var i = 0; i < val.length; i++) + arr.push([key, val[i]]) + else if (typeof val === "object") + for (var prop in val) + arr.push([key + '[' + prop + ']', val[prop]]); + else + arr.push([key, val]) + } + return arr +} + +// Compare function for sort +function compare (a, b) { + return a > b ? 1 : a < b ? -1 : 0 +} + +function generateBase (httpMethod, base_uri, params) { + // adapted from https://dev.twitter.com/docs/auth/oauth and + // https://dev.twitter.com/docs/auth/creating-signature + + // Parameter normalization + // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2 + var normalized = map(params) + // 1. First, the name and value of each parameter are encoded + .map(function (p) { + return [ rfc3986(p[0]), rfc3986(p[1] || '') ] + }) + // 2. The parameters are sorted by name, using ascending byte value + // ordering. If two or more parameters share the same name, they + // are sorted by their value. + .sort(function (a, b) { + return compare(a[0], b[0]) || compare(a[1], b[1]) + }) + // 3. The name of each parameter is concatenated to its corresponding + // value using an "=" character (ASCII code 61) as a separator, even + // if the value is empty. + .map(function (p) { return p.join('=') }) + // 4. The sorted name/value pairs are concatenated together into a + // single string by using an "&" character (ASCII code 38) as + // separator. + .join('&') + + var base = [ + rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'), + rfc3986(base_uri), + rfc3986(normalized) + ].join('&') + + return base +} + +function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return sha1(key, base) +} + +function rsasign (httpMethod, base_uri, params, private_key, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = private_key || '' + + return rsa(key, base) +} + +function plaintext (consumer_secret, token_secret) { + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return key +} + +function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { + var method + var skipArgs = 1 + + switch (signMethod) { + case 'RSA-SHA1': + method = rsasign + break + case 'HMAC-SHA1': + method = hmacsign + break + case 'PLAINTEXT': + method = plaintext + skipArgs = 4 + break + default: + throw new Error("Signature method not supported: " + signMethod) + } + + return method.apply(null, [].slice.call(arguments, skipArgs)) +} + +exports.hmacsign = hmacsign +exports.rsasign = rsasign +exports.plaintext = plaintext +exports.sign = sign +exports.rfc3986 = rfc3986 +exports.generateBase = generateBase + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json new file mode 100644 index 00000000000..69bd42ccd70 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "oauth-sign@~0.8.1", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "oauth-sign@>=0.8.1 <0.9.0", + "_id": "oauth-sign@0.8.2", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/oauth-sign", + "_nodeVersion": "5.9.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/oauth-sign-0.8.2.tgz_1462396399020_0.8175400267355144" + }, + "_npmUser": { + "email": "simeonvelichkov@gmail.com", + "name": "simov" + }, + "_npmVersion": "2.15.3", + "_phantomChildren": {}, + "_requested": { + "name": "oauth-sign", + "raw": "oauth-sign@~0.8.1", + "rawSpec": "~0.8.1", + "scope": null, + "spec": ">=0.8.1 <0.9.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "_shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", + "_shrinkwrap": null, + "_spec": "oauth-sign@~0.8.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "author": { + "email": "mikeal.rogers@gmail.com", + "name": "Mikeal Rogers", + "url": "http://www.futurealoof.com" + }, + "bugs": { + "url": "https://github.com/mikeal/oauth-sign/issues" + }, + "dependencies": {}, + "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", + "tarball": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "index.js" + ], + "gitHead": "0b034206316132f57e26970152c2fb18e71bddd5", + "homepage": "https://github.com/mikeal/oauth-sign#readme", + "license": "Apache-2.0", + "main": "index.js", + "maintainers": [ + { + "email": "mikeal.rogers@gmail.com", + "name": "mikeal" + }, + { + "email": "jnylen@gmail.com", + "name": "nylen" + }, + { + "email": "simeonvelichkov@gmail.com", + "name": "simov" + } + ], + "name": "oauth-sign", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "url": "git+https://github.com/mikeal/oauth-sign.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "0.8.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js new file mode 100644 index 00000000000..508504840dc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js @@ -0,0 +1,83 @@ +'use strict'; +/* eslint-disable no-unused-vars */ +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (e) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (Object.getOwnPropertySymbols) { + symbols = Object.getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json new file mode 100644 index 00000000000..dfbf5d6532e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "object-assign@^4.1.0", + "/Users/eshanker/Code/fsevents/node_modules/gauge" + ] + ], + "_from": "object-assign@>=4.1.0 <5.0.0", + "_id": "object-assign@4.1.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/object-assign", + "_nodeVersion": "4.1.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/object-assign-4.1.0.tgz_1462212593641_0.3332549517508596" + }, + "_npmUser": { + "email": "ben@benalpert.com", + "name": "spicyj" + }, + "_npmVersion": "2.14.19", + "_phantomChildren": {}, + "_requested": { + "name": "object-assign", + "raw": "object-assign@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/gauge" + ], + "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "_shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", + "_shrinkwrap": null, + "_spec": "object-assign@^4.1.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/object-assign/issues" + }, + "dependencies": {}, + "description": "ES2015 Object.assign() ponyfill", + "devDependencies": { + "lodash": "^4.8.2", + "matcha": "^0.7.0", + "mocha": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", + "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "72fe21c86911758f3342fdf41c2a57860d5829bc", + "homepage": "https://github.com/sindresorhus/object-assign#readme", + "keywords": [ + "assign", + "browser", + "ecmascript", + "es2015", + "extend", + "harmony", + "object", + "polyfill", + "ponyfill", + "prollyfill", + "properties", + "shim" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + { + "email": "ben@benalpert.com", + "name": "spicyj" + } + ], + "name": "object-assign", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/object-assign.git" + }, + "scripts": { + "bench": "matcha bench.js", + "test": "xo && mocha" + }, + "version": "4.1.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md new file mode 100644 index 00000000000..13c097734cf --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md @@ -0,0 +1,56 @@ +# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) + +> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save object-assign +``` + + +## Usage + +```js +const objectAssign = require('object-assign'); + +objectAssign({foo: 0}, {bar: 1}); +//=> {foo: 0, bar: 1} + +// multiple sources +objectAssign({foo: 0}, {bar: 1}, {baz: 2}); +//=> {foo: 0, bar: 1, baz: 2} + +// overwrites equal keys +objectAssign({foo: 0}, {foo: 1}, {foo: 2}); +//=> {foo: 2} + +// ignores null and undefined sources +objectAssign({foo: 0}, null, {bar: 1}, undefined); +//=> {foo: 0, bar: 1} +``` + + +## API + +### objectAssign(target, source, [source, ...]) + +Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. + + +## Resources + +- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) + + +## Related + +- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md new file mode 100644 index 00000000000..a2981ea0705 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md @@ -0,0 +1,51 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js new file mode 100644 index 00000000000..2e1e721bfec --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js @@ -0,0 +1,21 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json new file mode 100644 index 00000000000..e2d53dd50db --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "once@^1.3.0", + "/Users/eshanker/Code/fsevents/node_modules/glob" + ] + ], + "_from": "once@>=1.3.0 <2.0.0", + "_id": "once@1.3.3", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/once", + "_nodeVersion": "4.0.0", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "name": "once", + "raw": "once@^1.3.0", + "rawSpec": "^1.3.0", + "scope": null, + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/glob", + "/fsevents/inflight", + "/fsevents/tar-pack" + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", + "_shrinkwrap": null, + "_spec": "once@^1.3.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/glob", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "dependencies": { + "wrappy": "1" + }, + "description": "Run a function exactly one time", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", + "tarball": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" + }, + "files": [ + "once.js" + ], + "gitHead": "2ad558657e17fafd24803217ba854762842e4178", + "homepage": "https://github.com/isaacs/once#readme", + "keywords": [ + "function", + "once", + "one", + "single" + ], + "license": "ISC", + "main": "once.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "name": "once", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.3.3" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js new file mode 100644 index 00000000000..19f103f908a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +}; + +function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; + + // UNC paths are always absolute + return !!result[2] || isUnc; +}; + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json new file mode 100644 index 00000000000..e34cf644e37 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "path-is-absolute@^1.0.0", + "/Users/eshanker/Code/fsevents/node_modules/glob" + ] + ], + "_from": "path-is-absolute@>=1.0.0 <2.0.0", + "_id": "path-is-absolute@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/path-is-absolute", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "path-is-absolute", + "raw": "path-is-absolute@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/glob" + ], + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "_shrinkwrap": null, + "_spec": "path-is-absolute@^1.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/glob", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "dependencies": {}, + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", + "homepage": "https://github.com/sindresorhus/path-is-absolute", + "keywords": [ + "absolute", + "built-in", + "check", + "core", + "detect", + "dir", + "file", + "is", + "is-absolute", + "isabsolute", + "path", + "paths", + "polyfill", + "ponyfill", + "shim", + "util", + "utils" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "path-is-absolute", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md new file mode 100644 index 00000000000..cdf94f4309a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md @@ -0,0 +1,51 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +var pathIsAbsolute = require('path-is-absolute'); + +// Linux +pathIsAbsolute('/home/foo'); +//=> true + +// Windows +pathIsAbsolute('C:/Users/'); +//=> true + +// Any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +The Posix specific version. + +### pathIsAbsolute.win32(path) + +The Windows specific version. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js new file mode 100644 index 00000000000..777377a1f77 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = typeof Promise === 'function' ? Promise : require('pinkie'); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license new file mode 100644 index 00000000000..1aeb74fd25e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json new file mode 100644 index 00000000000..0a9499f494d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "pinkie-promise@^2.0.0", + "/Users/eshanker/Code/fsevents/node_modules/har-validator" + ] + ], + "_from": "pinkie-promise@>=2.0.0 <3.0.0", + "_id": "pinkie-promise@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/pinkie-promise", + "_nodeVersion": "4.4.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/pinkie-promise-2.0.1.tgz_1460309839126_0.3422858319245279" + }, + "_npmUser": { + "email": "floatdrop@gmail.com", + "name": "floatdrop" + }, + "_npmVersion": "2.14.20", + "_phantomChildren": {}, + "_requested": { + "name": "pinkie-promise", + "raw": "pinkie-promise@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/har-validator" + ], + "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "_shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", + "_shrinkwrap": null, + "_spec": "pinkie-promise@^2.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/har-validator", + "author": { + "email": "floatdrop@gmail.com", + "name": "Vsevolod Strukchinsky", + "url": "github.com/floatdrop" + }, + "bugs": { + "url": "https://github.com/floatdrop/pinkie-promise/issues" + }, + "dependencies": { + "pinkie": "^2.0.0" + }, + "description": "ES2015 Promise ponyfill", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", + "tarball": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "4a936c09c34ad591a25db93f1216d242de0d6184", + "homepage": "https://github.com/floatdrop/pinkie-promise", + "keywords": [ + "es2015", + "es6", + "polyfill", + "ponyfill", + "promise", + "promises" + ], + "license": "MIT", + "maintainers": [ + { + "email": "floatdrop@gmail.com", + "name": "floatdrop" + } + ], + "name": "pinkie-promise", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/floatdrop/pinkie-promise.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md new file mode 100644 index 00000000000..78477f4297d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md @@ -0,0 +1,28 @@ +# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) + +> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill + +Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. + +## Install + +``` +$ npm install --save pinkie-promise +``` + +## Usage + +```js +var Promise = require('pinkie-promise'); + +new Promise(function (resolve) { resolve('unicorns'); }); +//=> Promise { 'unicorns' } +``` + +## Related + +- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js new file mode 100644 index 00000000000..14ce1bfe3d4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js @@ -0,0 +1,292 @@ +'use strict'; + +var PENDING = 'pending'; +var SETTLED = 'settled'; +var FULFILLED = 'fulfilled'; +var REJECTED = 'rejected'; +var NOOP = function () {}; +var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function'; + +var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; +var asyncQueue = []; +var asyncTimer; + +function asyncFlush() { + // run promise callbacks + for (var i = 0; i < asyncQueue.length; i++) { + asyncQueue[i][0](asyncQueue[i][1]); + } + + // reset async asyncQueue + asyncQueue = []; + asyncTimer = false; +} + +function asyncCall(callback, arg) { + asyncQueue.push([callback, arg]); + + if (!asyncTimer) { + asyncTimer = true; + asyncSetTimer(asyncFlush, 0); + } +} + +function invokeResolver(resolver, promise) { + function resolvePromise(value) { + resolve(promise, value); + } + + function rejectPromise(reason) { + reject(promise, reason); + } + + try { + resolver(resolvePromise, rejectPromise); + } catch (e) { + rejectPromise(e); + } +} + +function invokeCallback(subscriber) { + var owner = subscriber.owner; + var settled = owner._state; + var value = owner._data; + var callback = subscriber[settled]; + var promise = subscriber.then; + + if (typeof callback === 'function') { + settled = FULFILLED; + try { + value = callback(value); + } catch (e) { + reject(promise, e); + } + } + + if (!handleThenable(promise, value)) { + if (settled === FULFILLED) { + resolve(promise, value); + } + + if (settled === REJECTED) { + reject(promise, value); + } + } +} + +function handleThenable(promise, value) { + var resolved; + + try { + if (promise === value) { + throw new TypeError('A promises callback cannot return that same promise.'); + } + + if (value && (typeof value === 'function' || typeof value === 'object')) { + // then should be retrieved only once + var then = value.then; + + if (typeof then === 'function') { + then.call(value, function (val) { + if (!resolved) { + resolved = true; + + if (value === val) { + fulfill(promise, val); + } else { + resolve(promise, val); + } + } + }, function (reason) { + if (!resolved) { + resolved = true; + + reject(promise, reason); + } + }); + + return true; + } + } + } catch (e) { + if (!resolved) { + reject(promise, e); + } + + return true; + } + + return false; +} + +function resolve(promise, value) { + if (promise === value || !handleThenable(promise, value)) { + fulfill(promise, value); + } +} + +function fulfill(promise, value) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = value; + + asyncCall(publishFulfillment, promise); + } +} + +function reject(promise, reason) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = reason; + + asyncCall(publishRejection, promise); + } +} + +function publish(promise) { + promise._then = promise._then.forEach(invokeCallback); +} + +function publishFulfillment(promise) { + promise._state = FULFILLED; + publish(promise); +} + +function publishRejection(promise) { + promise._state = REJECTED; + publish(promise); + if (!promise._handled && isNode) { + global.process.emit('unhandledRejection', promise._data, promise); + } +} + +function notifyRejectionHandled(promise) { + global.process.emit('rejectionHandled', promise); +} + +/** + * @class + */ +function Promise(resolver) { + if (typeof resolver !== 'function') { + throw new TypeError('Promise resolver ' + resolver + ' is not a function'); + } + + if (this instanceof Promise === false) { + throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); + } + + this._then = []; + + invokeResolver(resolver, this); +} + +Promise.prototype = { + constructor: Promise, + + _state: PENDING, + _then: null, + _data: undefined, + _handled: false, + + then: function (onFulfillment, onRejection) { + var subscriber = { + owner: this, + then: new this.constructor(NOOP), + fulfilled: onFulfillment, + rejected: onRejection + }; + + if ((onRejection || onFulfillment) && !this._handled) { + this._handled = true; + if (this._state === REJECTED && isNode) { + asyncCall(notifyRejectionHandled, this); + } + } + + if (this._state === FULFILLED || this._state === REJECTED) { + // already resolved, call callback async + asyncCall(invokeCallback, subscriber); + } else { + // subscribe + this._then.push(subscriber); + } + + return subscriber.then; + }, + + catch: function (onRejection) { + return this.then(null, onRejection); + } +}; + +Promise.all = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.all().'); + } + + return new Promise(function (resolve, reject) { + var results = []; + var remaining = 0; + + function resolver(index) { + remaining++; + return function (value) { + results[index] = value; + if (!--remaining) { + resolve(results); + } + }; + } + + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolver(i), reject); + } else { + results[i] = promise; + } + } + + if (!remaining) { + resolve(results); + } + }); +}; + +Promise.race = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.race().'); + } + + return new Promise(function (resolve, reject) { + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolve, reject); + } else { + resolve(promise); + } + } + }); +}; + +Promise.resolve = function (value) { + if (value && typeof value === 'object' && value.constructor === Promise) { + return value; + } + + return new Promise(function (resolve) { + resolve(value); + }); +}; + +Promise.reject = function (reason) { + return new Promise(function (resolve, reject) { + reject(reason); + }); +}; + +module.exports = Promise; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license new file mode 100644 index 00000000000..1aeb74fd25e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json new file mode 100644 index 00000000000..85defc6671e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "pinkie@^2.0.0", + "/Users/eshanker/Code/fsevents/node_modules/pinkie-promise" + ] + ], + "_from": "pinkie@>=2.0.0 <3.0.0", + "_id": "pinkie@2.0.4", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/pinkie", + "_nodeVersion": "4.2.4", + "_npmUser": { + "email": "floatdrop@gmail.com", + "name": "floatdrop" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "name": "pinkie", + "raw": "pinkie@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/pinkie-promise" + ], + "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "_shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", + "_shrinkwrap": null, + "_spec": "pinkie@^2.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/pinkie-promise", + "author": { + "email": "floatdrop@gmail.com", + "name": "Vsevolod Strukchinsky", + "url": "github.com/floatdrop" + }, + "bugs": { + "url": "https://github.com/floatdrop/pinkie/issues" + }, + "dependencies": {}, + "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", + "devDependencies": { + "core-assert": "^0.1.1", + "coveralls": "^2.11.4", + "mocha": "*", + "nyc": "^3.2.2", + "promises-aplus-tests": "*", + "xo": "^0.10.1" + }, + "directories": {}, + "dist": { + "shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", + "tarball": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "8d4a92447a5c62bff9f89756caeb4c9c8770579b", + "homepage": "https://github.com/floatdrop/pinkie", + "keywords": [ + "es2015", + "es6", + "promise", + "promises" + ], + "license": "MIT", + "maintainers": [ + { + "email": "floatdrop@gmail.com", + "name": "floatdrop" + } + ], + "name": "pinkie", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/floatdrop/pinkie.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc mocha" + }, + "version": "2.0.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md new file mode 100644 index 00000000000..1565f958896 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md @@ -0,0 +1,83 @@ +

+
+ pinkie +
+
+

+ +> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation + +[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master) + +There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality. + +This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though). + + +## Install + +``` +$ npm install --save pinkie +``` + + +## Usage + +```js +var fs = require('fs'); +var Promise = require('pinkie'); + +new Promise(function (resolve, reject) { + fs.readFile('foo.json', 'utf8', function (err, data) { + if (err) { + reject(err); + return; + } + + resolve(data); + }); +}); +//=> Promise +``` + + +### API + +`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot: + +#### new Promise(executor) + +Returns new instance of `Promise`. + +##### executor + +*Required* +Type: `function` + +Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it. + +#### pinkie.all(promises) + +Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved. + +#### pinkie.race(promises) + +Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise. + +#### pinkie.reject(reason) + +Returns a Promise object that is rejected with the given `reason`. + +#### pinkie.resolve(value) + +Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`. + + +## Related + +- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module + + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml new file mode 100644 index 00000000000..36201b10017 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.11" + - "0.12" + - "1.7.1" + - 1 + - 2 + - 3 + - 4 + - 5 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js new file mode 100644 index 00000000000..a4f40f845fa --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js @@ -0,0 +1,43 @@ +'use strict'; + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = nextTick; +} else { + module.exports = process.nextTick; +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md new file mode 100644 index 00000000000..c67e3532b54 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Calvin Metcalf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.** diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json new file mode 100644 index 00000000000..cdffb2e885a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json @@ -0,0 +1,76 @@ +{ + "_args": [ + [ + "process-nextick-args@~1.0.6", + "/Users/eshanker/Code/fsevents/node_modules/readable-stream" + ] + ], + "_from": "process-nextick-args@>=1.0.6 <1.1.0", + "_id": "process-nextick-args@1.0.7", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/process-nextick-args", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" + }, + "_npmUser": { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + }, + "_npmVersion": "3.8.6", + "_phantomChildren": {}, + "_requested": { + "name": "process-nextick-args", + "raw": "process-nextick-args@~1.0.6", + "rawSpec": "~1.0.6", + "scope": null, + "spec": ">=1.0.6 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/bl/readable-stream", + "/fsevents/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", + "_shrinkwrap": null, + "_spec": "process-nextick-args@~1.0.6", + "_where": "/Users/eshanker/Code/fsevents/node_modules/readable-stream", + "author": "", + "bugs": { + "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" + }, + "dependencies": {}, + "description": "process.nextTick but always with args", + "devDependencies": { + "tap": "~0.2.6" + }, + "directories": {}, + "dist": { + "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", + "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + } + ], + "name": "process-nextick-args", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.7" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md new file mode 100644 index 00000000000..78e7cfaeb7a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md @@ -0,0 +1,18 @@ +process-nextick-args +===== + +[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) + +```bash +npm install --save process-nextick-args +``` + +Always be able to pass arguments to process.nextTick, no matter the platform + +```js +var nextTick = require('process-nextick-args'); + +nextTick(function (a, b, c) { + console.log(a, b, c); +}, 'step', 3, 'profit'); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js new file mode 100644 index 00000000000..ef15721584a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js @@ -0,0 +1,24 @@ +var test = require("tap").test; +var nextTick = require('./'); + +test('should work', function (t) { + t.plan(5); + nextTick(function (a) { + t.ok(a); + nextTick(function (thing) { + t.equals(thing, 7); + }, 7); + }, true); + nextTick(function (a, b, c) { + t.equals(a, 'step'); + t.equals(b, 3); + t.equals(c, 'profit'); + }, 'step', 3, 'profit'); +}); + +test('correct number of arguments', function (t) { + t.plan(1); + nextTick(function () { + t.equals(2, arguments.length, 'correct number'); + }, 1, 2); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore new file mode 100644 index 00000000000..1521c8b7652 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore @@ -0,0 +1 @@ +dist diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc new file mode 100644 index 00000000000..1faac273ff6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 22], + "consistent-return": [1], + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "indent": [2, 4], + "max-params": [2, 9], + "max-statements": [2, 36], + "no-extra-parens": [1], + "no-continue": [1], + "no-magic-numbers": 0, + "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": 1 + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json new file mode 100644 index 00000000000..3d099c4b119 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json @@ -0,0 +1,176 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md new file mode 100644 index 00000000000..e318a054a90 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md @@ -0,0 +1,120 @@ +## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) +- [New] pass Buffers to the encoder/decoder directly (#161) +- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) +- [Fix] fix compacting of nested sparse arrays (#150) + +## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) +- [New] allowDots option for `stringify` (#151) +- [Fix] "sort" option should work at a depth of 3 or more (#151) +- [Fix] Restore `dist` directory; will be removed in v7 (#148) + +## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) +- Revert ES6 requirement and restore support for node down to v0.8. + +## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) +- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json + +## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) +- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 + +## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) +- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string + +## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) +- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional +- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify + +## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) +- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false +- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm + +## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) +- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional + +## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) +- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" + +## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) +- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties +- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost +- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing +- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object +- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option +- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. +- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 +- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 +- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign +- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute + +## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) +- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function + +## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) +- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option + +## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) +- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 +- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader + +## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) +- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object + +## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) +- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". + +## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) +- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 + +## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) +- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? +- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 +- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 + +## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) +- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number + +## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) +- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array +- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x + +## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) +- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value +- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty +- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? + +## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) +- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 +- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects + +## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) +- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present +- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays +- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge +- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? + +## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) +- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter + +## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) +- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? +- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit +- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 + +## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) +- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values + +## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) +- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters +- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block + +## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) +- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument +- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed + +## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) +- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted +- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null +- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README + +## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) +- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md new file mode 100644 index 00000000000..892836159ba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md @@ -0,0 +1 @@ +Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE new file mode 100644 index 00000000000..d4569487a09 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2014 Nathan LaFreniere and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js new file mode 100644 index 00000000000..4cc6f30673e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js @@ -0,0 +1,487 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;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 require=="function"&&require;for(var o=0;o= 0 && + (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = parseObject(chain, val, options); + } else { + obj[cleanRoot] = parseObject(chain, val, options); + } + } + + return obj; +}; + +var parseKeys = function parseKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var parent = /^([^\[\]]*)/; + var child = /(\[[^\[\]]*\])/g; + + // Get the parent + + var segment = parent.exec(key); + + // Stash the parent if it exists + + var keys = []; + if (segment[1]) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(segment[1]); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { + if (!options.allowPrototypes) { + continue; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options); +}; + +module.exports = function (str, opts) { + var options = opts || {}; + + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = Utils.merge(obj, newObj, options); + } + + return Utils.compact(obj); +}; + +},{"./utils":4}],3:[function(require,module,exports){ +'use strict'; + +var Utils = require('./utils'); + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var defaults = { + delimiter: '&', + strictNullHandling: false, + skipNulls: false, + encode: true, + encoder: Utils.encode +}; + +var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = obj.toISOString(); + } else if (obj === null) { + if (strictNullHandling) { + return encoder ? encoder(prefix) : prefix; + } + + obj = ''; + } + + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { + if (encoder) { + return [encoder(prefix) + '=' + encoder(obj)]; + } + return [prefix + '=' + String(obj)]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + if (Array.isArray(obj)) { + values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } else { + values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + } + + return values; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = opts || {}; + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var objKeys; + var filter; + + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + objKeys = filter = options.filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (sort) { + objKeys.sort(sort); + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + + return keys.join(delimiter); +}; + +},{"./utils":4}],4:[function(require,module,exports){ +'use strict'; + +var hexTable = (function () { + var array = new Array(256); + for (var i = 0; i < 256; ++i) { + array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); + } + + return array; +}()); + +exports.arrayToObject = function (source, options) { + var obj = options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +exports.merge = function (target, source, options) { + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + target[source] = true; + } else { + return [target, source]; + } + + return target; + } + + if (typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (Object.prototype.hasOwnProperty.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +exports.decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; + +exports.encode = function (str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = typeof str === 'string' ? str : String(str); + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D || // - + c === 0x2E || // . + c === 0x5F || // _ + c === 0x7E || // ~ + (c >= 0x30 && c <= 0x39) || // 0-9 + (c >= 0x41 && c <= 0x5A) || // a-z + (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +exports.compact = function (obj, references) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + + var refs = references || []; + var lookup = refs.indexOf(obj); + if (lookup !== -1) { + return refs[lookup]; + } + + refs.push(obj); + + if (Array.isArray(obj)) { + var compacted = []; + + for (var i = 0; i < obj.length; ++i) { + if (obj[i] && typeof obj[i] === 'object') { + compacted.push(exports.compact(obj[i], refs)); + } else if (typeof obj[i] !== 'undefined') { + compacted.push(obj[i]); + } + } + + return compacted; + } + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + obj[key] = exports.compact(obj[key], refs); + } + + return obj; +}; + +exports.isRegExp = function (obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +exports.isBuffer = function (obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js new file mode 100755 index 00000000000..190195902a0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js @@ -0,0 +1,9 @@ +'use strict'; + +var Stringify = require('./stringify'); +var Parse = require('./parse'); + +module.exports = { + stringify: Stringify, + parse: Parse +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js new file mode 100755 index 00000000000..bf70fd8de87 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js @@ -0,0 +1,167 @@ +'use strict'; + +var Utils = require('./utils'); + +var defaults = { + delimiter: '&', + depth: 5, + arrayLimit: 20, + parameterLimit: 1000, + strictNullHandling: false, + plainObjects: false, + allowPrototypes: false, + allowDots: false, + decoder: Utils.decode +}; + +var parseValues = function parseValues(str, options) { + var obj = {}; + var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit); + + for (var i = 0; i < parts.length; ++i) { + var part = parts[i]; + var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1; + + if (pos === -1) { + obj[options.decoder(part)] = ''; + + if (options.strictNullHandling) { + obj[options.decoder(part)] = null; + } + } else { + var key = options.decoder(part.slice(0, pos)); + var val = options.decoder(part.slice(pos + 1)); + + if (Object.prototype.hasOwnProperty.call(obj, key)) { + obj[key] = [].concat(obj[key]).concat(val); + } else { + obj[key] = val; + } + } + } + + return obj; +}; + +var parseObject = function parseObject(chain, val, options) { + if (!chain.length) { + return val; + } + + var root = chain.shift(); + + var obj; + if (root === '[]') { + obj = []; + obj = obj.concat(parseObject(chain, val, options)); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root; + var index = parseInt(cleanRoot, 10); + if ( + !isNaN(index) && + root !== cleanRoot && + String(index) === cleanRoot && + index >= 0 && + (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = parseObject(chain, val, options); + } else { + obj[cleanRoot] = parseObject(chain, val, options); + } + } + + return obj; +}; + +var parseKeys = function parseKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var parent = /^([^\[\]]*)/; + var child = /(\[[^\[\]]*\])/g; + + // Get the parent + + var segment = parent.exec(key); + + // Stash the parent if it exists + + var keys = []; + if (segment[1]) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(segment[1]); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { + if (!options.allowPrototypes) { + continue; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options); +}; + +module.exports = function (str, opts) { + var options = opts || {}; + + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = Utils.merge(obj, newObj, options); + } + + return Utils.compact(obj); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js new file mode 100755 index 00000000000..6e1c9a263cd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js @@ -0,0 +1,137 @@ +'use strict'; + +var Utils = require('./utils'); + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var defaults = { + delimiter: '&', + strictNullHandling: false, + skipNulls: false, + encode: true, + encoder: Utils.encode +}; + +var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = obj.toISOString(); + } else if (obj === null) { + if (strictNullHandling) { + return encoder ? encoder(prefix) : prefix; + } + + obj = ''; + } + + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { + if (encoder) { + return [encoder(prefix) + '=' + encoder(obj)]; + } + return [prefix + '=' + String(obj)]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + if (Array.isArray(obj)) { + values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } else { + values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + } + + return values; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = opts || {}; + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var objKeys; + var filter; + + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + objKeys = filter = options.filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (sort) { + objKeys.sort(sort); + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); + } + + return keys.join(delimiter); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js new file mode 100755 index 00000000000..2c5c8ee5033 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js @@ -0,0 +1,164 @@ +'use strict'; + +var hexTable = (function () { + var array = new Array(256); + for (var i = 0; i < 256; ++i) { + array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); + } + + return array; +}()); + +exports.arrayToObject = function (source, options) { + var obj = options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +exports.merge = function (target, source, options) { + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + target[source] = true; + } else { + return [target, source]; + } + + return target; + } + + if (typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (Object.prototype.hasOwnProperty.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +exports.decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; + +exports.encode = function (str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = typeof str === 'string' ? str : String(str); + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D || // - + c === 0x2E || // . + c === 0x5F || // _ + c === 0x7E || // ~ + (c >= 0x30 && c <= 0x39) || // 0-9 + (c >= 0x41 && c <= 0x5A) || // a-z + (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +exports.compact = function (obj, references) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + + var refs = references || []; + var lookup = refs.indexOf(obj); + if (lookup !== -1) { + return refs[lookup]; + } + + refs.push(obj); + + if (Array.isArray(obj)) { + var compacted = []; + + for (var i = 0; i < obj.length; ++i) { + if (obj[i] && typeof obj[i] === 'object') { + compacted.push(exports.compact(obj[i], refs)); + } else if (typeof obj[i] !== 'undefined') { + compacted.push(obj[i]); + } + } + + return compacted; + } + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + obj[key] = exports.compact(obj[key], refs); + } + + return obj; +}; + +exports.isRegExp = function (obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +exports.isBuffer = function (obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json new file mode 100644 index 00000000000..b65e7e1d2fb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "qs@~6.2.0", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "qs@>=6.2.0 <6.3.0", + "_id": "qs@6.2.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/qs", + "_nodeVersion": "6.1.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/qs-6.2.0.tgz_1462749349998_0.03372702235355973" + }, + "_npmUser": { + "email": "ljharb@gmail.com", + "name": "ljharb" + }, + "_npmVersion": "3.8.6", + "_phantomChildren": {}, + "_requested": { + "name": "qs", + "raw": "qs@~6.2.0", + "rawSpec": "~6.2.0", + "scope": null, + "spec": ">=6.2.0 <6.3.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz", + "_shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b", + "_shrinkwrap": null, + "_spec": "qs@~6.2.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "bugs": { + "url": "https://github.com/ljharb/qs/issues" + }, + "contributors": [ + { + "email": "ljharb@gmail.com", + "name": "Jordan Harband", + "url": "http://ljharb.codes" + } + ], + "dependencies": {}, + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "devDependencies": { + "@ljharb/eslint-config": "^4.0.0", + "browserify": "^13.0.1", + "covert": "^1.1.0", + "eslint": "^2.9.0", + "evalmd": "^0.0.17", + "iconv-lite": "^0.4.13", + "mkdirp": "^0.5.1", + "parallelshell": "^2.0.0", + "tape": "^4.5.1" + }, + "directories": {}, + "dist": { + "shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b", + "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "d67d315b606c6bb809fedcbeebbbdb7f863852aa", + "homepage": "https://github.com/ljharb/qs", + "keywords": [ + "qs", + "querystring" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "maintainers": [ + { + "email": "eran@hammer.io", + "name": "hueniverse" + }, + { + "email": "ljharb@gmail.com", + "name": "ljharb" + }, + { + "email": "quitlahok@gmail.com", + "name": "nlf" + } + ], + "name": "qs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/qs.git" + }, + "scripts": { + "coverage": "covert test", + "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", + "lint": "eslint lib/*.js text/*.js", + "prepublish": "npm run dist", + "pretest": "parallelshell 'npm run --silent readme' 'npm run --silent lint'", + "readme": "evalmd README.md", + "test": "npm run --silent coverage", + "tests-only": "node test" + }, + "version": "6.2.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js new file mode 100644 index 00000000000..b6a7d9526a9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js @@ -0,0 +1,5 @@ +require('./parse'); + +require('./stringify'); + +require('./utils'); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js new file mode 100755 index 00000000000..1b79daf534c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js @@ -0,0 +1,423 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var iconv = require('iconv-lite'); + +test('parse()', function (t) { + t.test('parses a simple string', function (st) { + st.deepEqual(qs.parse('0=foo'), { '0': 'foo' }); + st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); + st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); + st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); + st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); + st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); + st.deepEqual(qs.parse('foo'), { foo: '' }); + st.deepEqual(qs.parse('foo='), { foo: '' }); + st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); + st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); + st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); + st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); + st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); + st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); + st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); + st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { + cht: 'p3', + chd: 't:60,40', + chs: '250x100', + chl: 'Hello|World' + }); + st.end(); + }); + + t.test('allows enabling dot notation', function (st) { + st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); + st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); + t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); + t.deepEqual( + qs.parse('a[b][c][d][e][f][g][h]=i'), + { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, + 'defaults to a depth of 5' + ); + + t.test('only parses one level when depth = 1', function (st) { + st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); + st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); + st.end(); + }); + + t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); + + t.test('parses an explicit array', function (st) { + st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); + st.end(); + }); + + t.test('parses a mix of simple and explicit arrays', function (st) { + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('parses a nested array', function (st) { + st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); + st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); + st.end(); + }); + + t.test('allows to specify array indices', function (st) { + st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); + st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); + st.end(); + }); + + t.test('limits specific array indices to 20', function (st) { + st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); + + t.test('supports encoded = signs', function (st) { + st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); + st.end(); + }); + + t.test('is ok with url encoded strings', function (st) { + st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); + st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); + st.end(); + }); + + t.test('allows brackets in the value', function (st) { + st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); + st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); + st.end(); + }); + + t.test('allows empty values', function (st) { + st.deepEqual(qs.parse(''), {}); + st.deepEqual(qs.parse(null), {}); + st.deepEqual(qs.parse(undefined), {}); + st.end(); + }); + + t.test('transforms arrays to objects', function (st) { + st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); + st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c'), { a: { '0': 'b', t: 'u', c: true } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y'), { a: { '0': 'b', '1': 'c', x: 'y' } }); + st.end(); + }); + + t.test('transforms arrays to objects (dot notation)', function (st) { + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); + st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); + st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); + st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.end(); + }); + + t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects'); + + t.test('correctly prunes undefined values when converting an array to an object', function (st) { + st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } }); + st.end(); + }); + + t.test('supports malformed uri characters', function (st) { + st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); + st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); + st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); + st.end(); + }); + + t.test('doesn\'t produce empty keys', function (st) { + st.deepEqual(qs.parse('_r=1&'), { '_r': '1' }); + st.end(); + }); + + t.test('cannot access Object prototype', function (st) { + qs.parse('constructor[prototype][bad]=bad'); + qs.parse('bad[constructor][prototype][bad]=bad'); + st.equal(typeof Object.prototype.bad, 'undefined'); + st.end(); + }); + + t.test('parses arrays of objects', function (st) { + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); + st.end(); + }); + + t.test('allows for empty strings in arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true }), { a: ['b', null, 'c', ''] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true }), { a: ['b', '', 'c', null] }); + st.deepEqual(qs.parse('a[]=&a[]=b&a[]=c'), { a: ['', 'b', 'c'] }); + st.end(); + }); + + t.test('compacts sparse arrays', function (st) { + st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] }); + st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] }); + st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] }); + st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] }); + st.end(); + }); + + t.test('parses semi-parsed strings', function (st) { + st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); + st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); + st.end(); + }); + + t.test('parses buffers correctly', function (st) { + var b = new Buffer('test'); + st.deepEqual(qs.parse({ a: b }), { a: b }); + st.end(); + }); + + t.test('continues parsing when no parent is found', function (st) { + st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' }); + st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' }); + st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); + st.end(); + }); + + t.test('does not error when parsing a very long array', function (st) { + var str = 'a[]=a'; + while (Buffer.byteLength(str) < 128 * 1024) { + str = str + '&' + str; + } + + st.doesNotThrow(function () { qs.parse(str); }); + + st.end(); + }); + + t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) { + Object.prototype.crash = ''; + Array.prototype.crash = ''; + st.doesNotThrow(qs.parse.bind(null, 'a=b')); + st.deepEqual(qs.parse('a=b'), { a: 'b' }); + st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + delete Object.prototype.crash; + delete Array.prototype.crash; + st.end(); + }); + + t.test('parses a string with an alternative string delimiter', function (st) { + st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('parses a string with an alternative RegExp delimiter', function (st) { + st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not use non-splittable objects as delimiters', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding parameter limit', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); + st.end(); + }); + + t.test('allows setting the parameter limit to Infinity', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding array limit', function (st) { + st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } }); + st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } }); + st.end(); + }); + + t.test('allows disabling array parsing', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } }); + st.end(); + }); + + t.test('parses an object', function (st) { + var input = { + 'user[name]': { 'pop[bob]': 3 }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object in dot notation', function (st) { + var input = { + 'user.name': { 'pop[bob]': 3 }, + 'user.email.': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input, { allowDots: true }); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object and not child values', function (st) { + var input = { + 'user[name]': { 'pop[bob]': { 'test': 3 } }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': { 'test': 3 } }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('does not blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.parse('a=b&c=d'); + global.Buffer = tempBuffer; + st.deepEqual(result, { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not crash when parsing circular references', function (st) { + var a = {}; + a.b = a; + + var parsed; + + st.doesNotThrow(function () { + parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + st.equal('bar' in parsed.foo, true); + st.equal('baz' in parsed.foo, true); + st.equal(parsed.foo.bar, 'baz'); + st.deepEqual(parsed.foo.baz, a); + st.end(); + }); + + t.test('parses plain objects correctly', function (st) { + var a = Object.create(null); + a.b = 'c'; + + st.deepEqual(qs.parse(a), { b: 'c' }); + var result = qs.parse({ a: a }); + st.equal('a' in result, true, 'result has "a" property'); + st.deepEqual(result.a, a); + st.end(); + }); + + t.test('parses dates correctly', function (st) { + var now = new Date(); + st.deepEqual(qs.parse({ a: now }), { a: now }); + st.end(); + }); + + t.test('parses regular expressions correctly', function (st) { + var re = /^test$/; + st.deepEqual(qs.parse({ a: re }), { a: re }); + st.end(); + }); + + t.test('can allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }, { prototype: false }); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }, { prototype: false }); + st.end(); + }); + + t.test('can return plain objects', function (st) { + var expected = Object.create(null); + expected.a = Object.create(null); + expected.a.b = 'c'; + expected.a.hasOwnProperty = 'd'; + st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); + st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); + var expectedArray = Object.create(null); + expectedArray.a = Object.create(null); + expectedArray.a['0'] = 'b'; + expectedArray.a.c = 'd'; + st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); + st.end(); + }); + + t.test('can parse with custom encoding', function (st) { + st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { + decoder: function (str) { + var reg = /\%([0-9A-F]{2})/ig; + var result = []; + var parts; + var last = 0; + while (parts = reg.exec(str)) { + result.push(parseInt(parts[1], 16)); + last = parts.index + parts[0].length; + } + return iconv.decode(new Buffer(result), 'shift_jis').toString(); + } + }), { 県: '大阪府' }); + st.end(); + }); + + t.test('throws error with wrong decoder', function (st) { + st.throws(function () { + qs.parse({}, { + decoder: 'string' + }); + }, new TypeError('Decoder has to be a function.')); + st.end(); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js new file mode 100755 index 00000000000..699397e3346 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js @@ -0,0 +1,305 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var iconv = require('iconv-lite'); + +test('stringify()', function (t) { + t.test('stringifies a querystring object', function (st) { + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: 1 }), 'a=1'); + st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); + st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); + st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); + st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); + st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); + st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); + st.end(); + }); + + t.test('stringifies a nested object', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies a nested object with dots notation', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); + st.end(); + }); + + t.test('stringifies an array value', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d'); + st.end(); + }); + + t.test('omits nulls when asked', function (st) { + st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); + st.end(); + }); + + + t.test('omits nested nulls when asked', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('omits array indices when asked', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); + st.end(); + }); + + t.test('stringifies a nested array value', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); + st.end(); + }); + + t.test('stringifies a nested array value with dots notation', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { allowDots: true, encode: false }), 'a.b[0]=c&a.b[1]=d'); + st.end(); + }); + + t.test('stringifies an object inside an array', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c'); + st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1'); + st.end(); + }); + + t.test('stringifies an array with mixed objects and primitives', function (st) { + st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3'); + st.end(); + }); + + t.test('stringifies an object inside an array with dots notation', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c'); + st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1'); + st.end(); + }); + + t.test('does not omit object keys when indices = false', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when indices=true', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); + st.end(); + }); + + t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); + st.end(); + }); + + t.test('stringifies a complicated object', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies an empty value', function (st) { + st.equal(qs.stringify({ a: '' }), 'a='); + st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); + + st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); + st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); + + st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); + + st.end(); + }); + + t.test('stringifies an empty object', function (st) { + var obj = Object.create(null); + obj.a = 'b'; + st.equal(qs.stringify(obj), 'a=b'); + st.end(); + }); + + t.test('returns an empty string for invalid input', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(''), ''); + st.end(); + }); + + t.test('stringifies an object with an empty object as a child', function (st) { + var obj = { + a: Object.create(null) + }; + + obj.a.b = 'c'; + st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('drops keys with a value of undefined', function (st) { + st.equal(qs.stringify({ a: undefined }), ''); + + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); + st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); + st.end(); + }); + + t.test('url encodes values', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.end(); + }); + + t.test('stringifies a date', function (st) { + var now = new Date(); + var str = 'a=' + encodeURIComponent(now.toISOString()); + st.equal(qs.stringify({ a: now }), str); + st.end(); + }); + + t.test('stringifies the weird object from qs', function (st) { + st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); + st.end(); + }); + + t.test('skips properties that are part of the object prototype', function (st) { + Object.prototype.crash = 'test'; + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + delete Object.prototype.crash; + st.end(); + }); + + t.test('stringifies boolean values', function (st) { + st.equal(qs.stringify({ a: true }), 'a=true'); + st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); + st.equal(qs.stringify({ b: false }), 'b=false'); + st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); + st.end(); + }); + + t.test('stringifies buffer values', function (st) { + st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test'); + st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test'); + st.end(); + }); + + t.test('stringifies an object using an alternative delimiter', function (st) { + st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); + st.end(); + }); + + t.test('doesn\'t blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.stringify({ a: 'b', c: 'd' }); + global.Buffer = tempBuffer; + st.equal(result, 'a=b&c=d'); + st.end(); + }); + + t.test('selects properties when filter=array', function (st) { + st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); + st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); + st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3'); + st.end(); + }); + + t.test('supports custom representations when filter=function', function (st) { + var calls = 0; + var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; + var filterFunc = function (prefix, value) { + calls++; + if (calls === 1) { + st.equal(prefix, '', 'prefix is empty'); + st.equal(value, obj); + } else if (prefix === 'c') { + return; + } else if (value instanceof Date) { + st.equal(prefix, 'e[f]'); + return value.getTime(); + } + return value; + }; + + st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); + st.equal(calls, 5); + st.end(); + }); + + t.test('can disable uri encoding', function (st) { + st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); + st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); + st.end(); + }); + + t.test('can sort the keys', function (st) { + var sort = function (a, b) { return a.localeCompare(b); }; + st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); + st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); + st.end(); + }); + + t.test('can sort the keys at depth 3 or more too', function (st) { + var sort = function (a, b) { return a.localeCompare(b); }; + st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: sort, encode: false }), 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb'); + st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b'); + st.end(); + }); + + t.test('can stringify with custom encoding', function (st) { + st.equal(qs.stringify({ 県: '大阪府', '': ''}, { + encoder: function (str) { + if (str.length === 0) { + return ''; + } + var buf = iconv.encode(str, 'shiftjis'); + var result = []; + for (var i=0; i < buf.length; ++i) { + result.push(buf.readUInt8(i).toString(16)); + } + return '%' + result.join('%'); + } + }), '%8c%a7=%91%e5%8d%e3%95%7b&='); + st.end(); + }); + + t.test('throws error with wrong encoder', function (st) { + st.throws(function () { + qs.stringify({}, { + encoder: 'string' + }); + }, new TypeError('Encoder has to be a function.')); + st.end(); + }); + + t.test('can use custom encoder for a buffer object', { + skip: typeof Buffer === 'undefined' + }, function (st) { + st.equal(qs.stringify({ a: new Buffer([1]) }, { + encoder: function (buffer) { + if (typeof buffer === 'string') { + return buffer; + } + return String.fromCharCode(buffer.readUInt8(0) + 97); + } + }), 'a=b'); + st.end(); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js new file mode 100755 index 00000000000..4a8d8246c99 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js @@ -0,0 +1,9 @@ +'use strict'; + +var test = require('tape'); +var utils = require('../lib/utils'); + +test('merge()', function (t) { + t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore new file mode 100644 index 00000000000..13abef4f588 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 new file mode 100644 index 00000000000..6366c04716f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD new file mode 100644 index 00000000000..96bb796aa5f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD @@ -0,0 +1,26 @@ +Copyright (c) 2013, Dominic Tarr +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT new file mode 100644 index 00000000000..6eafbd734a6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md new file mode 100644 index 00000000000..65a5f0687cc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md @@ -0,0 +1,149 @@ +# rc + +The non-configurable configuration loader for lazy people. + +## Usage + +The only option is to pass rc the name of your app, and your default configuration. + +```javascript +var conf = require('rc')(appname, { + //defaults go here. + port: 2468, + + //defaults which are objects will be merged, not replaced + views: { + engine: 'jade' + } +}); +``` + +`rc` will return your configuration options merged with the defaults you specify. +If you pass in a predefined defaults object, it will be mutated: + +```javascript +var conf = {}; +require('rc')(appname, conf); +``` + +If `rc` finds any config files for your app, the returned config object will have +a `configs` array containing their paths: + +```javascript +var appCfg = require('rc')(appname, conf); +appCfg.configs[0] // /etc/appnamerc +appCfg.configs[1] // /home/dominictarr/.config/appname +appCfg.config // same as appCfg.configs[appCfg.configs.length - 1] +``` + +## Standards + +Given your application name (`appname`), rc will look in all the obvious places for configuration. + + * command line arguments (parsed by minimist) + * environment variables prefixed with `${appname}_` + * or use "\_\_" to indicate nested properties
_(e.g. `appname_foo__bar__baz` => `foo.bar.baz`)_ + * if you passed an option `--config file` then from that file + * a local `.${appname}rc` or the first found looking in `./ ../ ../../ ../../../` etc. + * `$HOME/.${appname}rc` + * `$HOME/.${appname}/config` + * `$HOME/.config/${appname}` + * `$HOME/.config/${appname}/config` + * `/etc/${appname}rc` + * `/etc/${appname}/config` + * the defaults object you passed in. + +All configuration sources that were found will be flattened into one object, +so that sources **earlier** in this list override later ones. + + +## Configuration File Formats + +Configuration files (e.g. `.appnamerc`) may be in either [json](http://json.org/example) or [ini](http://en.wikipedia.org/wiki/INI_file) format. The example configurations below are equivalent: + + +#### Formatted as `ini` + +``` +; You can include comments in `ini` format if you want. + +dependsOn=0.10.0 + + +; `rc` has built-in support for ini sections, see? + +[commands] + www = ./commands/www + console = ./commands/repl + + +; You can even do nested sections + +[generators.options] + engine = ejs + +[generators.modules] + new = generate-new + engine = generate-backend + +``` + +#### Formatted as `json` + +```javascript +{ + // You can even comment your JSON, if you want + "dependsOn": "0.10.0", + "commands": { + "www": "./commands/www", + "console": "./commands/repl" + }, + "generators": { + "options": { + "engine": "ejs" + }, + "modules": { + "new": "generate-new", + "backend": "generate-backend" + } + } +} +``` + +Comments are stripped from JSON config via [strip-json-comments](https://github.com/sindresorhus/strip-json-comments). + +> Since ini, and env variables do not have a standard for types, your application needs be prepared for strings. + + + +## Advanced Usage + +#### Pass in your own `argv` + +You may pass in your own `argv` as the third argument to `rc`. This is in case you want to [use your own command-line opts parser](https://github.com/dominictarr/rc/pull/12). + +```javascript +require('rc')(appname, defaults, customArgvParser); +``` + +## Pass in your own parser + +If you have a special need to use a non-standard parser, +you can do so by passing in the parser as the 4th argument. +(leave the 3rd as null to get the default args parser) + +```javascript +require('rc')(appname, defaults, null, parser); +``` + +This may also be used to force a more strict format, +such as strict, valid JSON only. + +## Note on Performance + +`rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler) + + +## License + +Multi-licensed under the two-clause BSD License, MIT License, or Apache License, version 2.0 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js new file mode 100644 index 00000000000..8c230c5cd2d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js @@ -0,0 +1,7 @@ + +// when this is loaded into the browser, +// just use the defaults... + +module.exports = function (name, defaults) { + return defaults +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js new file mode 100755 index 00000000000..6f8f1139d7f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js @@ -0,0 +1,60 @@ +#! /usr/bin/env node +var cc = require('./lib/utils') +var join = require('path').join +var deepExtend = require('deep-extend') +var etc = '/etc' +var win = process.platform === "win32" +var home = win + ? process.env.USERPROFILE + : process.env.HOME + +module.exports = function (name, defaults, argv, parse) { + if('string' !== typeof name) + throw new Error('rc(name): name *must* be string') + if(!argv) + argv = require('minimist')(process.argv.slice(2)) + defaults = ( + 'string' === typeof defaults + ? cc.json(defaults) : defaults + ) || {} + + parse = parse || cc.parse + + var env = cc.env(name + '_') + + var configs = [defaults] + var configFiles = [] + function addConfigFile (file) { + if (configFiles.indexOf(file) >= 0) return + var fileConfig = cc.file(file) + if (fileConfig) { + configs.push(parse(fileConfig)) + configFiles.push(file) + } + } + + // which files do we look at? + if (!win) + [join(etc, name, 'config'), + join(etc, name + 'rc')].forEach(addConfigFile) + if (home) + [join(home, '.config', name, 'config'), + join(home, '.config', name), + join(home, '.' + name, 'config'), + join(home, '.' + name + 'rc')].forEach(addConfigFile) + addConfigFile(cc.find('.'+name+'rc')) + if (env.config) addConfigFile(env.config) + if (argv.config) addConfigFile(argv.config) + + return deepExtend.apply(null, configs.concat([ + env, + argv, + configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined, + ])) +} + +if(!module.parent) { + console.log( + JSON.stringify(module.exports(process.argv[2]), false, 2) + ) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js new file mode 100644 index 00000000000..ae6dec0ba70 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js @@ -0,0 +1,103 @@ +'use strict'; +var fs = require('fs') +var ini = require('ini') +var path = require('path') +var stripJsonComments = require('strip-json-comments') + +var parse = exports.parse = function (content) { + + //if it ends in .json or starts with { then it must be json. + //must be done this way, because ini accepts everything. + //can't just try and parse it and let it throw if it's not ini. + //everything is ini. even json with a syntax error. + + if(/^\s*{/.test(content)) + return JSON.parse(stripJsonComments(content)) + return ini.parse(content) + +} + +var file = exports.file = function () { + var args = [].slice.call(arguments).filter(function (arg) { return arg != null }) + + //path.join breaks if it's a not a string, so just skip this. + for(var i in args) + if('string' !== typeof args[i]) + return + + var file = path.join.apply(null, args) + var content + try { + return fs.readFileSync(file,'utf-8') + } catch (err) { + return + } +} + +var json = exports.json = function () { + var content = file.apply(null, arguments) + return content ? parse(content) : null +} + +var env = exports.env = function (prefix, env) { + env = env || process.env + var obj = {} + var l = prefix.length + for(var k in env) { + if((k.indexOf(prefix)) === 0) { + + var keypath = k.substring(l).split('__') + + // Trim empty strings from keypath array + var _emptyStringIndex + while ((_emptyStringIndex=keypath.indexOf('')) > -1) { + keypath.splice(_emptyStringIndex, 1) + } + + var cursor = obj + keypath.forEach(function _buildSubObj(_subkey,i){ + + // (check for _subkey first so we ignore empty strings) + // (check for cursor to avoid assignment to primitive objects) + if (!_subkey || typeof cursor !== 'object') + return + + // If this is the last key, just stuff the value in there + // Assigns actual value from env variable to final key + // (unless it's just an empty string- in that case use the last valid key) + if (i === keypath.length-1) + cursor[_subkey] = env[k] + + + // Build sub-object if nothing already exists at the keypath + if (cursor[_subkey] === undefined) + cursor[_subkey] = {} + + // Increment cursor used to track the object at the current depth + cursor = cursor[_subkey] + + }) + + } + + } + + return obj +} + +var find = exports.find = function () { + var rel = path.join.apply(null, [].slice.call(arguments)) + + function find(start, rel) { + var file = path.join(start, rel) + try { + fs.statSync(file) + return file + } catch (err) { + if(path.dirname(start) !== start) // root + return find(path.dirname(start), rel) + } + } + return find(process.cwd(), rel) +} + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml new file mode 100644 index 00000000000..74c57bf15e2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE new file mode 100644 index 00000000000..ee27ba4b441 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js new file mode 100644 index 00000000000..abff3e8ee8f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js new file mode 100644 index 00000000000..6a0559d5813 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js @@ -0,0 +1,236 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next, arg) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2), arg); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } + else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json new file mode 100644 index 00000000000..8bfa6581655 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "minimist@^1.2.0", + "/Users/eshanker/Code/fsevents/node_modules/rc" + ] + ], + "_from": "minimist@>=1.2.0 <2.0.0", + "_id": "minimist@1.2.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/rc/minimist", + "_nodeVersion": "2.4.0", + "_npmUser": { + "email": "substack@gmail.com", + "name": "substack" + }, + "_npmVersion": "3.2.2", + "_phantomChildren": {}, + "_requested": { + "name": "minimist", + "raw": "minimist@^1.2.0", + "rawSpec": "^1.2.0", + "scope": null, + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/rc" + ], + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "_shasum": "a35008b20f41383eec1fb914f4cd5df79a264284", + "_shrinkwrap": null, + "_spec": "minimist@^1.2.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/rc", + "author": { + "email": "mail@substack.net", + "name": "James Halliday", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "dependencies": {}, + "description": "parse argument options", + "devDependencies": { + "covert": "^1.0.0", + "tap": "~0.4.0", + "tape": "^3.5.0" + }, + "directories": {}, + "dist": { + "shasum": "a35008b20f41383eec1fb914f4cd5df79a264284", + "tarball": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + }, + "gitHead": "dc624482fcfec5bc669c68cdb861f00573ed4e64", + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "optimist", + "parser" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "mail@substack.net", + "name": "substack" + } + ], + "name": "minimist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "scripts": { + "coverage": "covert test/*.js", + "test": "tap test/*.js" + }, + "testling": { + "browsers": [ + "chrome/10", + "chrome/latest", + "ff/5", + "firefox/latest", + "ie/6..latest", + "opera/12", + "safari/5.1", + "safari/latest" + ], + "files": "test/*.js" + }, + "version": "1.2.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown new file mode 100644 index 00000000000..30a74cf8c15 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown @@ -0,0 +1,91 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) + +[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.dir(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option +* `opts['--']` - when true, populate `argv._` with everything before the `--` +and `argv['--']` with everything after the `--`. Here's an example: +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. + +``` +> require('./')('one two three -- four five --six'.split(' '), { '--': true }) +{ _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } +``` + +Note that with `opts['--']` set, parsing for arguments still stops after the +`--`. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js new file mode 100644 index 00000000000..ac835483d9a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js @@ -0,0 +1,32 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean true (default all --args to boolean)', function (t) { + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); + +test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: 55, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js new file mode 100644 index 00000000000..14b0717cefd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js @@ -0,0 +1,166 @@ +var parse = require('../'); +var test = require('tape'); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias array with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var alt = [ '--harp', 'derp' ]; + var opts = { + alias: { 'h': ['herp', 'harp'] }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var altPropertyArgv = parse(alt, opts); + var expected = { + harp: true, + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.same(altPropertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); + +test('boolean --boool=true', function (t) { + var parsed = parse(['--boool=true'], { + default: { + boool: false + }, + boolean: ['boool'] + }); + + t.same(parsed.boool, true); + t.end(); +}); + +test('boolean --boool=false', function (t) { + var parsed = parse(['--boool=false'], { + default: { + boool: true + }, + boolean: ['boool'] + }); + + t.same(parsed.boool, false); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js new file mode 100644 index 00000000000..5a4fa5be418 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js @@ -0,0 +1,31 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); + +test('move arguments after the -- into their own `--` array', function(t) { + t.plan(1); + t.deepEqual( + parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), + { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js new file mode 100644 index 00000000000..780a311270f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js @@ -0,0 +1,35 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); + +test('boolean default to null', function (t) { + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, null); + var argv = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, true); + t.end(); + +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js new file mode 100644 index 00000000000..d8b3e856ec7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js @@ -0,0 +1,22 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); + +test('dotted default with no alias', function (t) { + var argv = parse('', {default: {'a.b': 11}}); + t.equal(argv.a.b, 11); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js new file mode 100644 index 00000000000..f813b305057 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-b=123' ]); + t.deepEqual(argv, { b: 123, _: [] }); +}); + +test('multi short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-a=whatever', '-b=robots' ]); + t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js new file mode 100644 index 00000000000..5d3a1e09d3b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js new file mode 100644 index 00000000000..2cc77f4d62f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js @@ -0,0 +1,36 @@ +var parse = require('../'); +var test = require('tape'); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('already a number', function (t) { + var argv = parse([ '-x', 1234, 789 ]); + t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js new file mode 100644 index 00000000000..7b4a2a17c0d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js @@ -0,0 +1,197 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('string and alias', function(t) { + var x = parse([ '--str', '000123' ], { + string: 's', + alias: { s: 'str' } + }); + + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); + + var y = parse([ '-s', '000123' ], { + string: 'str', + alias: { str: 's' } + }); + + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + t.end(); +}); + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js new file mode 100644 index 00000000000..ab620dc5e4d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: [123] }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js new file mode 100644 index 00000000000..d513a1c2529 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js new file mode 100644 index 00000000000..bdf9fbcb0b5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js @@ -0,0 +1,15 @@ +var parse = require('../'); +var test = require('tape'); + +test('stops parsing on the first non-option when stopEarly is set', function (t) { + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true + }); + + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'] + }); + + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js new file mode 100644 index 00000000000..462a36bdd7e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js @@ -0,0 +1,102 @@ +var parse = require('../'); +var test = require('tape'); + +test('boolean and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'true', '--derp', 'true' ]; + var regular = [ '--herp', 'true', '-d', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('flag boolean true any double hyphen argument is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [] + }); + t.end(); +}); + +test('string and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; + var regular = [ '--herp', 'hello', '-d', 'moon' ]; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, ['--derp', '-d']); + t.end(); +}); + +test('default and alias is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello' ]; + var regular = [ '--herp', 'hello' ]; + var opts = { + default: { 'h': 'bar' }, + alias: { 'h': 'herp' }, + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage +}); + +test('value following -- is not unknown', function (t) { + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '--bad', '--', 'good', 'arg' ]; + var opts = { + '--': true, + unknown: unknownFn + }; + var argv = parse(aliased, opts); + + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + '_': [] + }) + t.end(); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js new file mode 100644 index 00000000000..8a52a58cecf --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json new file mode 100644 index 00000000000..9ce00b0d56d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json @@ -0,0 +1,88 @@ +{ + "_args": [ + [ + "rc@~1.1.0", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "rc@>=1.1.0 <1.2.0", + "_id": "rc@1.1.6", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/rc", + "_nodeVersion": "4.2.3", + "_npmUser": { + "email": "dominic.tarr@gmail.com", + "name": "dominictarr" + }, + "_npmVersion": "3.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "rc", + "raw": "rc@~1.1.0", + "rawSpec": "~1.1.0", + "scope": null, + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/node-pre-gyp" + ], + "_resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", + "_shasum": "43651b76b6ae53b5c802f1151fa3fc3b059969c9", + "_shrinkwrap": null, + "_spec": "rc@~1.1.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "author": { + "email": "dominic.tarr@gmail.com", + "name": "Dominic Tarr", + "url": "dominictarr.com" + }, + "bin": { + "rc": "./index.js" + }, + "browserify": "browser.js", + "bugs": { + "url": "https://github.com/dominictarr/rc/issues" + }, + "dependencies": { + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~1.0.4" + }, + "description": "hardwired configuration loader", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "43651b76b6ae53b5c802f1151fa3fc3b059969c9", + "tarball": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz" + }, + "gitHead": "132062de0e61881a025cc4784d9a2798409c2bf1", + "homepage": "https://github.com/dominictarr/rc#readme", + "keywords": [ + "config", + "defaults", + "rc", + "unix" + ], + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "main": "index.js", + "maintainers": [ + { + "email": "dominic.tarr@gmail.com", + "name": "dominictarr" + } + ], + "name": "rc", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/rc.git" + }, + "scripts": { + "test": "set -e; node test/test.js; node test/ini.js; node test/nested-env-vars.js" + }, + "version": "1.1.6" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js new file mode 100644 index 00000000000..e6857f8b382 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js @@ -0,0 +1,16 @@ +var cc =require('../lib/utils') +var INI = require('ini') +var assert = require('assert') + +function test(obj) { + + var _json, _ini + var json = cc.parse (_json = JSON.stringify(obj)) + var ini = cc.parse (_ini = INI.stringify(obj)) + console.log(_ini, _json) + assert.deepEqual(json, ini) +} + + +test({hello: true}) + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js new file mode 100644 index 00000000000..f576fb153b9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js @@ -0,0 +1,40 @@ + +var n = 'rc'+Math.random() +var assert = require('assert') + + +// Basic usage +process.env[n+'_someOpt__a'] = 42 +process.env[n+'_someOpt__x__'] = 99 +process.env[n+'_someOpt__a__b'] = 186 +process.env[n+'_someOpt__a__b__c'] = 243 +process.env[n+'_someOpt__x__y'] = 1862 +process.env[n+'_someOpt__z'] = 186577 + +// Should ignore empty strings from orphaned '__' +process.env[n+'_someOpt__z__x__'] = 18629 +process.env[n+'_someOpt__w__w__'] = 18629 + +// Leading '__' should ignore everything up to 'z' +process.env[n+'___z__i__'] = 9999 + +var config = require('../')(n, { + option: true +}) + +console.log('\n\n------ nested-env-vars ------\n',config) + +assert.equal(config.option, true) +assert.equal(config.someOpt.a, 42) +assert.equal(config.someOpt.x, 99) +// Should not override `a` once it's been set +assert.equal(config.someOpt.a/*.b*/, 42) +// Should not override `x` once it's been set +assert.equal(config.someOpt.x/*.y*/, 99) +assert.equal(config.someOpt.z, 186577) +// Should not override `z` once it's been set +assert.equal(config.someOpt.z/*.x*/, 186577) +assert.equal(config.someOpt.w.w, 18629) +assert.equal(config.z.i, 9999) + + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js new file mode 100644 index 00000000000..4f6335189b6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js @@ -0,0 +1,59 @@ + +var n = 'rc'+Math.random() +var assert = require('assert') + +process.env[n+'_envOption'] = 42 + +var config = require('../')(n, { + option: true +}) + +console.log(config) + +assert.equal(config.option, true) +assert.equal(config.envOption, 42) + +var customArgv = require('../')(n, { + option: true +}, { // nopt-like argv + option: false, + envOption: 24, + argv: { + remain: [], + cooked: ['--no-option', '--envOption', '24'], + original: ['--no-option', '--envOption=24'] + } +}) + +console.log(customArgv) + +assert.equal(customArgv.option, false) +assert.equal(customArgv.envOption, 24) + +var fs = require('fs') +var path = require('path') +var jsonrc = path.resolve('.' + n + 'rc'); + +fs.writeFileSync(jsonrc, [ + '{', + '// json overrides default', + '"option": false,', + '/* env overrides json */', + '"envOption": 24', + '}' +].join('\n')); + +var commentedJSON = require('../')(n, { + option: true +}) + +fs.unlinkSync(jsonrc); + +console.log(commentedJSON) + +assert.equal(commentedJSON.option, false) +assert.equal(commentedJSON.envOption, 42) + +assert.equal(commentedJSON.config, jsonrc) +assert.equal(commentedJSON.configs.length, 1) +assert.equal(commentedJSON.configs[0], jsonrc) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000000..265ff739e07 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore @@ -0,0 +1,8 @@ +build/ +test/ +examples/ +fs.js +zlib.js +.zuul.yml +.nyc_output +coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml new file mode 100644 index 00000000000..ae0156a9bbb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml @@ -0,0 +1,54 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - npm install -g npm +notifications: + email: false +matrix: + fast_finish: true + allow_failures: + - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" + - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" + include: + - node_js: '0.8' + env: TASK=test + - node_js: '0.10' + env: TASK=test + - node_js: '0.11' + env: TASK=test + - node_js: '0.12' + env: TASK=test + - node_js: 1 + env: TASK=test + - node_js: 2 + env: TASK=test + - node_js: 3 + env: TASK=test + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 5 + env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest +script: "npm run $TASK" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000000..e3d4e695a4c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md new file mode 100644 index 00000000000..2233732a9ba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md @@ -0,0 +1,36 @@ +# readable-stream + +***Node-core v6.1.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core, including [documentation](doc/stream.md). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams WG Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md new file mode 100644 index 00000000000..c907ca0e7b7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md @@ -0,0 +1,1772 @@ +# Stream + + Stability: 2 - Stable + +A stream is an abstract interface implemented by various objects in +Node.js. For example a [request to an HTTP server][http-incoming-message] is a +stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All +streams are instances of [`EventEmitter`][]. + +You can load the Stream base classes by doing `require('stream')`. +There are base classes provided for [Readable][] streams, [Writable][] +streams, [Duplex][] streams, and [Transform][] streams. + +This document is split up into 3 sections: + +1. The first section explains the parts of the API that you need to be + aware of to use streams in your programs. +2. The second section explains the parts of the API that you need to + use if you implement your own custom streams yourself. The API is designed to + make this easy for you to do. +3. The third section goes into more depth about how streams work, + including some of the internal mechanisms and functions that you + should probably not modify unless you definitely know what you are + doing. + + +## API for Stream Consumers + + + +Streams can be either [Readable][], [Writable][], or both ([Duplex][]). + +All streams are EventEmitters, but they also have other custom methods +and properties depending on whether they are Readable, Writable, or +Duplex. + +If a stream is both Readable and Writable, then it implements all of +the methods and events. So, a [Duplex][] or [Transform][] stream is +fully described by this API, though their implementation may be +somewhat different. + +It is not necessary to implement Stream interfaces in order to consume +streams in your programs. If you **are** implementing streaming +interfaces in your own program, please also refer to +[API for Stream Implementors][]. + +Almost all Node.js programs, no matter how simple, use Streams in some +way. Here is an example of using Streams in an Node.js program: + +```js +const http = require('http'); + +var server = http.createServer( (req, res) => { + // req is an http.IncomingMessage, which is a Readable Stream + // res is an http.ServerResponse, which is a Writable Stream + + var body = ''; + // we want to get the data as utf8 strings + // If you don't set an encoding, then you'll get Buffer objects + req.setEncoding('utf8'); + + // Readable streams emit 'data' events once a listener is added + req.on('data', (chunk) => { + body += chunk; + }); + + // the end event tells you that you have entire body + req.on('end', () => { + try { + var data = JSON.parse(body); + } catch (er) { + // uh oh! bad json! + res.statusCode = 400; + return res.end(`error: ${er.message}`); + } + + // write back something interesting to the user: + res.write(typeof data); + res.end(); + }); +}); + +server.listen(1337); + +// $ curl localhost:1337 -d '{}' +// object +// $ curl localhost:1337 -d '"foo"' +// string +// $ curl localhost:1337 -d 'not json' +// error: Unexpected token o +``` + +### Class: stream.Duplex + +Duplex streams are streams that implement both the [Readable][] and +[Writable][] interfaces. + +Examples of Duplex streams include: + +* [TCP sockets][] +* [zlib streams][zlib] +* [crypto streams][crypto] + +### Class: stream.Readable + + + +The Readable stream interface is the abstraction for a *source* of +data that you are reading from. In other words, data comes *out* of a +Readable stream. + +A Readable stream will not start emitting data until you indicate that +you are ready to receive it. + +Readable streams have two "modes": a **flowing mode** and a **paused +mode**. When in flowing mode, data is read from the underlying system +and provided to your program as fast as possible. In paused mode, you +must explicitly call [`stream.read()`][stream-read] to get chunks of data out. +Streams start out in paused mode. + +**Note**: If no data event handlers are attached, and there are no +[`stream.pipe()`][] destinations, and the stream is switched into flowing +mode, then data will be lost. + +You can switch to flowing mode by doing any of the following: + +* Adding a [`'data'`][] event handler to listen for data. +* Calling the [`stream.resume()`][stream-resume] method to explicitly open the + flow. +* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. + +You can switch back to paused mode by doing either of the following: + +* If there are no pipe destinations, by calling the + [`stream.pause()`][stream-pause] method. +* If there are pipe destinations, by removing any [`'data'`][] event + handlers, and removing all pipe destinations by calling the + [`stream.unpipe()`][] method. + +Note that, for backwards compatibility reasons, removing [`'data'`][] +event handlers will **not** automatically pause the stream. Also, if +there are piped destinations, then calling [`stream.pause()`][stream-pause] will +not guarantee that the stream will *remain* paused once those +destinations drain and ask for more data. + +Examples of readable streams include: + +* [HTTP responses, on the client][http-incoming-message] +* [HTTP requests, on the server][http-incoming-message] +* [fs read streams][] +* [zlib streams][zlib] +* [crypto streams][crypto] +* [TCP sockets][] +* [child process stdout and stderr][] +* [`process.stdin`][] + +#### Event: 'close' + +Emitted when the stream and any of its underlying resources (a file +descriptor, for example) have been closed. The event indicates that +no more events will be emitted, and no further computation will occur. + +Not all streams will emit the `'close'` event as the `'close'` event is +optional. + +#### Event: 'data' + +* `chunk` {Buffer|String} The chunk of data. + +Attaching a `'data'` event listener to a stream that has not been +explicitly paused will switch the stream into flowing mode. Data will +then be passed as soon as it is available. + +If you just want to get all the data out of the stream as fast as +possible, this is the best way to do so. + +```js +var readable = getReadableStreamSomehow(); +readable.on('data', (chunk) => { + console.log('got %d bytes of data', chunk.length); +}); +``` + +#### Event: 'end' + +This event fires when there will be no more data to read. + +Note that the `'end'` event **will not fire** unless the data is +completely consumed. This can be done by switching into flowing mode, +or by calling [`stream.read()`][stream-read] repeatedly until you get to the +end. + +```js +var readable = getReadableStreamSomehow(); +readable.on('data', (chunk) => { + console.log('got %d bytes of data', chunk.length); +}); +readable.on('end', () => { + console.log('there will be no more data.'); +}); +``` + +#### Event: 'error' + +* {Error} + +Emitted if there was an error receiving data. + +#### Event: 'readable' + +When a chunk of data can be read from the stream, it will emit a +`'readable'` event. + +In some cases, listening for a `'readable'` event will cause some data +to be read into the internal buffer from the underlying system, if it +hadn't already. + +```javascript +var readable = getReadableStreamSomehow(); +readable.on('readable', () => { + // there is some data to read now +}); +``` + +Once the internal buffer is drained, a `'readable'` event will fire +again when more data is available. + +The `'readable'` event is not emitted in the "flowing" mode with the +sole exception of the last one, on end-of-stream. + +The `'readable'` event indicates that the stream has new information: +either new data is available or the end of the stream has been reached. +In the former case, [`stream.read()`][stream-read] will return that data. In the +latter case, [`stream.read()`][stream-read] will return null. For instance, in +the following example, `foo.txt` is an empty file: + +```js +const fs = require('fs'); +var rr = fs.createReadStream('foo.txt'); +rr.on('readable', () => { + console.log('readable:', rr.read()); +}); +rr.on('end', () => { + console.log('end'); +}); +``` + +The output of running this script is: + +``` +$ node test.js +readable: null +end +``` + +#### readable.isPaused() + +* Return: {Boolean} + +This method returns whether or not the `readable` has been **explicitly** +paused by client code (using [`stream.pause()`][stream-pause] without a +corresponding [`stream.resume()`][stream-resume]). + +```js +var readable = new stream.Readable + +readable.isPaused() // === false +readable.pause() +readable.isPaused() // === true +readable.resume() +readable.isPaused() // === false +``` + +#### readable.pause() + +* Return: `this` + +This method will cause a stream in flowing mode to stop emitting +[`'data'`][] events, switching out of flowing mode. Any data that becomes +available will remain in the internal buffer. + +```js +var readable = getReadableStreamSomehow(); +readable.on('data', (chunk) => { + console.log('got %d bytes of data', chunk.length); + readable.pause(); + console.log('there will be no more data for 1 second'); + setTimeout(() => { + console.log('now data will start flowing again'); + readable.resume(); + }, 1000); +}); +``` + +#### readable.pipe(destination[, options]) + +* `destination` {stream.Writable} The destination for writing data +* `options` {Object} Pipe options + * `end` {Boolean} End the writer when the reader ends. Default = `true` + +This method pulls all the data out of a readable stream, and writes it +to the supplied destination, automatically managing the flow so that +the destination is not overwhelmed by a fast readable stream. + +Multiple destinations can be piped to safely. + +```js +var readable = getReadableStreamSomehow(); +var writable = fs.createWriteStream('file.txt'); +// All the data from readable goes into 'file.txt' +readable.pipe(writable); +``` + +This function returns the destination stream, so you can set up pipe +chains like so: + +```js +var r = fs.createReadStream('file.txt'); +var z = zlib.createGzip(); +var w = fs.createWriteStream('file.txt.gz'); +r.pipe(z).pipe(w); +``` + +For example, emulating the Unix `cat` command: + +```js +process.stdin.pipe(process.stdout); +``` + +By default [`stream.end()`][stream-end] is called on the destination when the +source stream emits [`'end'`][], so that `destination` is no longer writable. +Pass `{ end: false }` as `options` to keep the destination stream open. + +This keeps `writer` open so that "Goodbye" can be written at the +end. + +```js +reader.pipe(writer, { end: false }); +reader.on('end', () => { + writer.end('Goodbye\n'); +}); +``` + +Note that [`process.stderr`][] and [`process.stdout`][] are never closed until +the process exits, regardless of the specified options. + +#### readable.read([size]) + +* `size` {Number} Optional argument to specify how much data to read. +* Return {String|Buffer|Null} + +The `read()` method pulls some data out of the internal buffer and +returns it. If there is no data available, then it will return +`null`. + +If you pass in a `size` argument, then it will return that many +bytes. If `size` bytes are not available, then it will return `null`, +unless we've ended, in which case it will return the data remaining +in the buffer. + +If you do not specify a `size` argument, then it will return all the +data in the internal buffer. + +This method should only be called in paused mode. In flowing mode, +this method is called automatically until the internal buffer is +drained. + +```js +var readable = getReadableStreamSomehow(); +readable.on('readable', () => { + var chunk; + while (null !== (chunk = readable.read())) { + console.log('got %d bytes of data', chunk.length); + } +}); +``` + +If this method returns a data chunk, then it will also trigger the +emission of a [`'data'`][] event. + +Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] +event has been triggered will return `null`. No runtime error will be raised. + +#### readable.resume() + +* Return: `this` + +This method will cause the readable stream to resume emitting [`'data'`][] +events. + +This method will switch the stream into flowing mode. If you do *not* +want to consume the data from a stream, but you *do* want to get to +its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open +the flow of data. + +```js +var readable = getReadableStreamSomehow(); +readable.resume(); +readable.on('end', () => { + console.log('got to the end, but did not read anything'); +}); +``` + +#### readable.setEncoding(encoding) + +* `encoding` {String} The encoding to use. +* Return: `this` + +Call this function to cause the stream to return strings of the specified +encoding instead of Buffer objects. For example, if you do +`readable.setEncoding('utf8')`, then the output data will be interpreted as +UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, +then the data will be encoded in hexadecimal string format. + +This properly handles multi-byte characters that would otherwise be +potentially mangled if you simply pulled the Buffers directly and +called [`buf.toString(encoding)`][] on them. If you want to read the data +as strings, always use this method. + +Also you can disable any encoding at all with `readable.setEncoding(null)`. +This approach is very useful if you deal with binary data or with large +multi-byte strings spread out over multiple chunks. + +```js +var readable = getReadableStreamSomehow(); +readable.setEncoding('utf8'); +readable.on('data', (chunk) => { + assert.equal(typeof chunk, 'string'); + console.log('got %d characters of string data', chunk.length); +}); +``` + +#### readable.unpipe([destination]) + +* `destination` {stream.Writable} Optional specific stream to unpipe + +This method will remove the hooks set up for a previous [`stream.pipe()`][] +call. + +If the destination is not specified, then all pipes are removed. + +If the destination is specified, but no pipe is set up for it, then +this is a no-op. + +```js +var readable = getReadableStreamSomehow(); +var writable = fs.createWriteStream('file.txt'); +// All the data from readable goes into 'file.txt', +// but only for the first second +readable.pipe(writable); +setTimeout(() => { + console.log('stop writing to file.txt'); + readable.unpipe(writable); + console.log('manually close the file stream'); + writable.end(); +}, 1000); +``` + +#### readable.unshift(chunk) + +* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue + +This is useful in certain cases where a stream is being consumed by a +parser, which needs to "un-consume" some data that it has +optimistically pulled out of the source, so that the stream can be +passed on to some other party. + +Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event +has been triggered; a runtime error will be raised. + +If you find that you must often call `stream.unshift(chunk)` in your +programs, consider implementing a [Transform][] stream instead. (See [API +for Stream Implementors][].) + +```js +// Pull off a header delimited by \n\n +// use unshift() if we get too much +// Call the callback with (error, header, stream) +const StringDecoder = require('string_decoder').StringDecoder; +function parseHeader(stream, callback) { + stream.on('error', callback); + stream.on('readable', onReadable); + var decoder = new StringDecoder('utf8'); + var header = ''; + function onReadable() { + var chunk; + while (null !== (chunk = stream.read())) { + var str = decoder.write(chunk); + if (str.match(/\n\n/)) { + // found the header boundary + var split = str.split(/\n\n/); + header += split.shift(); + var remaining = split.join('\n\n'); + var buf = Buffer.from(remaining, 'utf8'); + if (buf.length) + stream.unshift(buf); + stream.removeListener('error', callback); + stream.removeListener('readable', onReadable); + // now the body of the message can be read from the stream. + callback(null, header, stream); + } else { + // still reading the header. + header += str; + } + } + } +} +``` + +Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` +will not end the reading process by resetting the internal reading state of the +stream. This can cause unexpected results if `unshift()` is called during a +read (i.e. from within a [`stream._read()`][stream-_read] implementation on a +custom stream). Following the call to `unshift()` with an immediate +[`stream.push('')`][stream-push] will reset the reading state appropriately, +however it is best to simply avoid calling `unshift()` while in the process of +performing a read. + +#### readable.wrap(stream) + +* `stream` {Stream} An "old style" readable stream + +Versions of Node.js prior to v0.10 had streams that did not implement the +entire Streams API as it is today. (See [Compatibility][] for +more information.) + +If you are using an older Node.js library that emits [`'data'`][] events and +has a [`stream.pause()`][stream-pause] method that is advisory only, then you +can use the `wrap()` method to create a [Readable][] stream that uses the old +stream as its data source. + +You will very rarely ever need to call this function, but it exists +as a convenience for interacting with old Node.js programs and libraries. + +For example: + +```js +const OldReader = require('./old-api-module.js').OldReader; +const Readable = require('stream').Readable; +const oreader = new OldReader; +const myReader = new Readable().wrap(oreader); + +myReader.on('readable', () => { + myReader.read(); // etc. +}); +``` + +### Class: stream.Transform + +Transform streams are [Duplex][] streams where the output is in some way +computed from the input. They implement both the [Readable][] and +[Writable][] interfaces. + +Examples of Transform streams include: + +* [zlib streams][zlib] +* [crypto streams][crypto] + +### Class: stream.Writable + + + +The Writable stream interface is an abstraction for a *destination* +that you are writing data *to*. + +Examples of writable streams include: + +* [HTTP requests, on the client][] +* [HTTP responses, on the server][] +* [fs write streams][] +* [zlib streams][zlib] +* [crypto streams][crypto] +* [TCP sockets][] +* [child process stdin][] +* [`process.stdout`][], [`process.stderr`][] + +#### Event: 'close' + +Emitted when the stream and any of its underlying resources (a file descriptor, +for example) have been closed. The event indicates that no more events will be +emitted, and no further computation will occur. + +Not all streams will emit the `'close'` event as the `'close'` event is +optional. + +#### Event: 'drain' + +If a [`stream.write(chunk)`][stream-write] call returns `false`, then the +`'drain'` event will indicate when it is appropriate to begin writing more data +to the stream. + +```js +// Write the data to the supplied writable stream one million times. +// Be attentive to back-pressure. +function writeOneMillionTimes(writer, data, encoding, callback) { + var i = 1000000; + write(); + function write() { + var ok = true; + do { + i -= 1; + if (i === 0) { + // last time! + writer.write(data, encoding, callback); + } else { + // see if we should continue, or wait + // don't pass the callback, because we're not done yet. + ok = writer.write(data, encoding); + } + } while (i > 0 && ok); + if (i > 0) { + // had to stop early! + // write some more once it drains + writer.once('drain', write); + } + } +} +``` + +#### Event: 'error' + +* {Error} + +Emitted if there was an error when writing or piping data. + +#### Event: 'finish' + +When the [`stream.end()`][stream-end] method has been called, and all data has +been flushed to the underlying system, this event is emitted. + +```javascript +var writer = getWritableStreamSomehow(); +for (var i = 0; i < 100; i ++) { + writer.write('hello, #${i}!\n'); +} +writer.end('this is the end\n'); +writer.on('finish', () => { + console.error('all writes are now complete.'); +}); +``` + +#### Event: 'pipe' + +* `src` {stream.Readable} source stream that is piping to this writable + +This is emitted whenever the [`stream.pipe()`][] method is called on a readable +stream, adding this writable to its set of destinations. + +```js +var writer = getWritableStreamSomehow(); +var reader = getReadableStreamSomehow(); +writer.on('pipe', (src) => { + console.error('something is piping into the writer'); + assert.equal(src, reader); +}); +reader.pipe(writer); +``` + +#### Event: 'unpipe' + +* `src` {[Readable][] Stream} The source stream that + [unpiped][`stream.unpipe()`] this writable + +This is emitted whenever the [`stream.unpipe()`][] method is called on a +readable stream, removing this writable from its set of destinations. + +```js +var writer = getWritableStreamSomehow(); +var reader = getReadableStreamSomehow(); +writer.on('unpipe', (src) => { + console.error('something has stopped piping into the writer'); + assert.equal(src, reader); +}); +reader.pipe(writer); +reader.unpipe(writer); +``` + +#### writable.cork() + +Forces buffering of all writes. + +Buffered data will be flushed either at [`stream.uncork()`][] or at +[`stream.end()`][stream-end] call. + +#### writable.end([chunk][, encoding][, callback]) + +* `chunk` {String|Buffer} Optional data to write +* `encoding` {String} The encoding, if `chunk` is a String +* `callback` {Function} Optional callback for when the stream is finished + +Call this method when no more data will be written to the stream. If supplied, +the callback is attached as a listener on the [`'finish'`][] event. + +Calling [`stream.write()`][stream-write] after calling +[`stream.end()`][stream-end] will raise an error. + +```js +// write 'hello, ' and then end with 'world!' +var file = fs.createWriteStream('example.txt'); +file.write('hello, '); +file.end('world!'); +// writing more now is not allowed! +``` + +#### writable.setDefaultEncoding(encoding) + +* `encoding` {String} The new default encoding +* Return: `this` + +Sets the default encoding for a writable stream. + +#### writable.uncork() + +Flush all data, buffered since [`stream.cork()`][] call. + +#### writable.write(chunk[, encoding][, callback]) + +* `chunk` {String|Buffer} The data to write +* `encoding` {String} The encoding, if `chunk` is a String +* `callback` {Function} Callback for when this chunk of data is flushed +* Returns: {Boolean} `true` if the data was handled completely. + +This method writes some data to the underlying system, and calls the +supplied callback once the data has been fully handled. If an error +occurs, the callback may or may not be called with the error as its +first argument. To detect write errors, listen for the `'error'` event. + +The return value indicates if you should continue writing right now. +If the data had to be buffered internally, then it will return +`false`. Otherwise, it will return `true`. + +This return value is strictly advisory. You MAY continue to write, +even if it returns `false`. However, writes will be buffered in +memory, so it is best not to do this excessively. Instead, wait for +the [`'drain'`][] event before writing more data. + + +## API for Stream Implementors + + + +To implement any sort of stream, the pattern is the same: + +1. Extend the appropriate parent class in your own subclass. (The + [`util.inherits()`][] method is particularly helpful for this.) +2. Call the appropriate parent class constructor in your constructor, + to be sure that the internal mechanisms are set up properly. +3. Implement one or more specific methods, as detailed below. + +The class to extend and the method(s) to implement depend on the sort +of stream class you are writing: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Use-case

+
+

Class

+
+

Method(s) to implement

+
+

Reading only

+
+

[Readable](#stream_class_stream_readable_1)

+
+

[_read][stream-_read]

+
+

Writing only

+
+

[Writable](#stream_class_stream_writable_1)

+
+

[_write][stream-_write], [_writev][stream-_writev]

+
+

Reading and writing

+
+

[Duplex](#stream_class_stream_duplex_1)

+
+

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

+
+

Operate on written data, then read the result

+
+

[Transform](#stream_class_stream_transform_1)

+
+

[_transform][stream-_transform], [_flush][stream-_flush]

+
+ +In your implementation code, it is very important to never call the methods +described in [API for Stream Consumers][]. Otherwise, you can potentially cause +adverse side effects in programs that consume your streaming interfaces. + +### Class: stream.Duplex + + + +A "duplex" stream is one that is both Readable and Writable, such as a TCP +socket connection. + +Note that `stream.Duplex` is an abstract class designed to be extended +with an underlying implementation of the [`stream._read(size)`][stream-_read] +and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you +would with a Readable or Writable stream class. + +Since JavaScript doesn't have multiple prototypal inheritance, this class +prototypally inherits from Readable, and then parasitically from Writable. It is +thus up to the user to implement both the low-level +[`stream._read(n)`][stream-_read] method as well as the low-level +[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension +duplex classes. + +#### new stream.Duplex(options) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then + the stream will automatically end the readable side when the + writable side ends and vice versa. + * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` + for readable side of the stream. Has no effect if `objectMode` + is `true`. + * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` + for writable side of the stream. Has no effect if `objectMode` + is `true`. + +In classes that extend the Duplex class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### Class: stream.PassThrough + +This is a trivial implementation of a [Transform][] stream that simply +passes the input bytes across to the output. Its purpose is mainly +for examples and testing, but there are occasionally use cases where +it can come in handy as a building block for novel sorts of streams. + +### Class: stream.Readable + + + +`stream.Readable` is an abstract class designed to be extended with an +underlying implementation of the [`stream._read(size)`][stream-_read] method. + +Please see [API for Stream Consumers][] for how to consume +streams in your programs. What follows is an explanation of how to +implement Readable streams in your programs. + +#### new stream.Readable([options]) + +* `options` {Object} + * `highWaterMark` {Number} The maximum number of bytes to store in + the internal buffer before ceasing to read from the underlying + resource. Default = `16384` (16kb), or `16` for `objectMode` streams + * `encoding` {String} If specified, then buffers will be decoded to + strings using the specified encoding. Default = `null` + * `objectMode` {Boolean} Whether this stream should behave + as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns + a single value instead of a Buffer of size n. Default = `false` + * `read` {Function} Implementation for the [`stream._read()`][stream-_read] + method. + +In classes that extend the Readable class, make sure to call the +Readable constructor so that the buffering settings can be properly +initialized. + +#### readable.\_read(size) + +* `size` {Number} Number of bytes to read asynchronously + +Note: **Implement this method, but do NOT call it directly.** + +This method is prefixed with an underscore because it is internal to the +class that defines it and should only be called by the internal Readable +class methods. All Readable stream implementations must provide a \_read +method to fetch data from the underlying resource. + +When `_read()` is called, if data is available from the resource, the `_read()` +implementation should start pushing that data into the read queue by calling +[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from +the resource and pushing data until push returns `false`, at which point it +should stop reading from the resource. Only when `_read()` is called again after +it has stopped should it start reading more data from the resource and pushing +that data onto the queue. + +Note: once the `_read()` method is called, it will not be called again until +the [`stream.push()`][stream-push] method is called. + +The `size` argument is advisory. Implementations where a "read" is a +single call that returns data can use this to know how much data to +fetch. Implementations where that is not relevant, such as TCP or +TLS, may ignore this argument, and simply provide data whenever it +becomes available. There is no need, for example to "wait" until +`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. + +#### readable.push(chunk[, encoding]) + + +* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue +* `encoding` {String} Encoding of String chunks. Must be a valid + Buffer encoding, such as `'utf8'` or `'ascii'` +* return {Boolean} Whether or not more pushes should be performed + +Note: **This method should be called by Readable implementors, NOT +by consumers of Readable streams.** + +If a value other than null is passed, The `push()` method adds a chunk of data +into the queue for subsequent stream processors to consume. If `null` is +passed, it signals the end of the stream (EOF), after which no more data +can be written. + +The data added with `push()` can be pulled out by calling the +[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. + +This API is designed to be as flexible as possible. For example, +you may be wrapping a lower-level source which has some sort of +pause/resume mechanism, and a data callback. In those cases, you +could wrap the low-level source object by doing something like this: + +```js +// source is an object with readStop() and readStart() methods, +// and an `ondata` member that gets called when it has data, and +// an `onend` member that gets called when the data is over. + +util.inherits(SourceWrapper, Readable); + +function SourceWrapper(options) { + Readable.call(this, options); + + this._source = getLowlevelSourceObject(); + + // Every time there's data, we push it into the internal buffer. + this._source.ondata = (chunk) => { + // if push() returns false, then we need to stop reading from source + if (!this.push(chunk)) + this._source.readStop(); + }; + + // When the source ends, we push the EOF-signaling `null` chunk + this._source.onend = () => { + this.push(null); + }; +} + +// _read will be called when the stream wants to pull more data in +// the advisory size argument is ignored in this case. +SourceWrapper.prototype._read = function(size) { + this._source.readStart(); +}; +``` + +#### Example: A Counting Stream + + + +This is a basic example of a Readable stream. It emits the numerals +from 1 to 1,000,000 in ascending order, and then ends. + +```js +const Readable = require('stream').Readable; +const util = require('util'); +util.inherits(Counter, Readable); + +function Counter(opt) { + Readable.call(this, opt); + this._max = 1000000; + this._index = 1; +} + +Counter.prototype._read = function() { + var i = this._index++; + if (i > this._max) + this.push(null); + else { + var str = '' + i; + var buf = Buffer.from(str, 'ascii'); + this.push(buf); + } +}; +``` + +#### Example: SimpleProtocol v1 (Sub-optimal) + +This is similar to the `parseHeader` function described +[here](#stream_readable_unshift_chunk), but implemented as a custom stream. +Also, note that this implementation does not convert the incoming data to a +string. + +However, this would be better implemented as a [Transform][] stream. See +[SimpleProtocol v2][] for a better implementation. + +```js +// A parser for a simple data protocol. +// The "header" is a JSON object, followed by 2 \n characters, and +// then a message body. +// +// NOTE: This can be done more simply as a Transform stream! +// Using Readable directly for this is sub-optimal. See the +// alternative example below under the Transform section. + +const Readable = require('stream').Readable; +const util = require('util'); + +util.inherits(SimpleProtocol, Readable); + +function SimpleProtocol(source, options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(source, options); + + Readable.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + + // source is a readable stream, such as a socket or file + this._source = source; + + source.on('end', () => { + this.push(null); + }); + + // give it a kick whenever the source is readable + // read(0) will not consume any bytes + source.on('readable', () => { + this.read(0); + }); + + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype._read = function(n) { + if (!this._inBody) { + var chunk = this._source.read(); + + // if the source doesn't have data, we don't have data yet. + if (chunk === null) + return this.push(''); + + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + this.push(''); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // now, because we got some extra data, unshift the rest + // back into the read queue so that our consumer will see it. + var b = chunk.slice(split); + this.unshift(b); + // calling unshift by itself does not reset the reading state + // of the stream; since we're inside _read, doing an additional + // push('') will reset the state appropriately. + this.push(''); + + // and let them know that we are done parsing the header. + this.emit('header', this.header); + } + } else { + // from there on, just provide the data to our consumer. + // careful not to push(null), since that would indicate EOF. + var chunk = this._source.read(); + if (chunk) this.push(chunk); + } +}; + +// Usage: +// var parser = new SimpleProtocol(source); +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + +### Class: stream.Transform + +A "transform" stream is a duplex stream where the output is causally +connected in some way to the input, such as a [zlib][] stream or a +[crypto][] stream. + +There is no requirement that the output be the same size as the input, +the same number of chunks, or arrive at the same time. For example, a +Hash stream will only ever have a single chunk of output which is +provided when the input is ended. A zlib stream will produce output +that is either much smaller or much larger than its input. + +Rather than implement the [`stream._read()`][stream-_read] and +[`stream._write()`][stream-_write] methods, Transform classes must implement the +[`stream._transform()`][stream-_transform] method, and may optionally +also implement the [`stream._flush()`][stream-_flush] method. (See below.) + +#### new stream.Transform([options]) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `transform` {Function} Implementation for the + [`stream._transform()`][stream-_transform] method. + * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] + method. + +In classes that extend the Transform class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +#### Events: 'finish' and 'end' + +The [`'finish'`][] and [`'end'`][] events are from the parent Writable +and Readable classes respectively. The `'finish'` event is fired after +[`stream.end()`][stream-end] is called and all chunks have been processed by +[`stream._transform()`][stream-_transform], `'end'` is fired after all data has +been output which is after the callback in [`stream._flush()`][stream-_flush] +has been called. + +#### transform.\_flush(callback) + +* `callback` {Function} Call this function (optionally with an error + argument) when you are done flushing any remaining data. + +Note: **This function MUST NOT be called directly.** It MAY be implemented +by child classes, and if so, will be called by the internal Transform +class methods only. + +In some cases, your transform operation may need to emit a bit more +data at the end of the stream. For example, a `Zlib` compression +stream will store up some internal state so that it can optimally +compress the output. At the end, however, it needs to do the best it +can with what is left, so that the data will be complete. + +In those cases, you can implement a `_flush()` method, which will be +called at the very end, after all the written data is consumed, but +before emitting [`'end'`][] to signal the end of the readable side. Just +like with [`stream._transform()`][stream-_transform], call +`transform.push(chunk)` zero or more times, as appropriate, and call `callback` +when the flush operation is complete. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +#### transform.\_transform(chunk, encoding, callback) + +* `chunk` {Buffer|String} The chunk to be transformed. Will **always** + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. If chunk is a buffer, then this is the special + value - 'buffer', ignore it in this case. +* `callback` {Function} Call this function (optionally with an error + argument and data) when you are done processing the supplied chunk. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Transform +class methods only. + +All Transform stream implementations must provide a `_transform()` +method to accept input and produce output. + +`_transform()` should do whatever has to be done in this specific +Transform class, to handle the bytes being written, and pass them off +to the readable portion of the interface. Do asynchronous I/O, +process things, and so on. + +Call `transform.push(outputChunk)` 0 or more times to generate output +from this input chunk, depending on how much data you want to output +as a result of this chunk. + +Call the callback function only when the current chunk is completely +consumed. Note that there may or may not be output as a result of any +particular input chunk. If you supply a second argument to the callback +it will be passed to the push method. In other words the following are +equivalent: + +```js +transform.prototype._transform = function (data, encoding, callback) { + this.push(data); + callback(); +}; + +transform.prototype._transform = function (data, encoding, callback) { + callback(null, data); +}; +``` + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +#### Example: `SimpleProtocol` parser v2 + +The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple +protocol parser can be implemented simply by using the higher level +[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol +v1` examples. + +In this example, rather than providing the input as an argument, it +would be piped into the parser, which is a more idiomatic Node.js stream +approach. + +```javascript +const util = require('util'); +const Transform = require('stream').Transform; +util.inherits(SimpleProtocol, Transform); + +function SimpleProtocol(options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Transform.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype._transform = function(chunk, encoding, done) { + if (!this._inBody) { + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // and let them know that we are done parsing the header. + this.emit('header', this.header); + + // now, because we got some extra data, emit this first. + this.push(chunk.slice(split)); + } + } else { + // from there on, just provide the data to our consumer as-is. + this.push(chunk); + } + done(); +}; + +// Usage: +// var parser = new SimpleProtocol(); +// source.pipe(parser) +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + +### Class: stream.Writable + + + +`stream.Writable` is an abstract class designed to be extended with an +underlying implementation of the +[`stream._write(chunk, encoding, callback)`][stream-_write] method. + +Please see [API for Stream Consumers][] for how to consume +writable streams in your programs. What follows is an explanation of +how to implement Writable streams in your programs. + +#### new stream.Writable([options]) + +* `options` {Object} + * `highWaterMark` {Number} Buffer level when + [`stream.write()`][stream-write] starts returning `false`. Default = `16384` + (16kb), or `16` for `objectMode` streams. + * `decodeStrings` {Boolean} Whether or not to decode strings into + Buffers before passing them to [`stream._write()`][stream-_write]. + Default = `true` + * `objectMode` {Boolean} Whether or not the + [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can + write arbitrary data instead of only `Buffer` / `String` data. + Default = `false` + * `write` {Function} Implementation for the + [`stream._write()`][stream-_write] method. + * `writev` {Function} Implementation for the + [`stream._writev()`][stream-_writev] method. + +In classes that extend the Writable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +#### writable.\_write(chunk, encoding, callback) + +* `chunk` {Buffer|String} The chunk to be written. Will **always** + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. If chunk is a buffer, then this is the special + value - 'buffer', ignore it in this case. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +All Writable stream implementations must provide a +[`stream._write()`][stream-_write] method to send data to the underlying +resource. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Writable +class methods only. + +Call the callback using the standard `callback(error)` pattern to +signal that the write completed successfully or with an error. + +If the `decodeStrings` flag is set in the constructor options, then +`chunk` may be a string rather than a Buffer, and `encoding` will +indicate the sort of string that it is. This is to support +implementations that have an optimized handling for certain string +data encodings. If you do not explicitly set the `decodeStrings` +option to `false`, then you can safely ignore the `encoding` argument, +and assume that `chunk` will always be a Buffer. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +#### writable.\_writev(chunks, callback) + +* `chunks` {Array} The chunks to be written. Each chunk has following + format: `{ chunk: ..., encoding: ... }`. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunks. + +Note: **This function MUST NOT be called directly.** It may be +implemented by child classes, and called by the internal Writable +class methods only. + +This function is completely optional to implement. In most cases it is +unnecessary. If implemented, it will be called with all the chunks +that are buffered in the write queue. + + +## Simplified Constructor API + + + +In simple cases there is now the added benefit of being able to construct a +stream without inheritance. + +This can be done by passing the appropriate methods as constructor options: + +Examples: + +### Duplex + +```js +var duplex = new stream.Duplex({ + read: function(n) { + // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); + }, + write: function(chunk, encoding, next) { + // sets this._write under the hood + + // An optional error can be passed as the first argument + next() + } +}); + +// or + +var duplex = new stream.Duplex({ + read: function(n) { + // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); + }, + writev: function(chunks, next) { + // sets this._writev under the hood + + // An optional error can be passed as the first argument + next() + } +}); +``` + +### Readable + +```js +var readable = new stream.Readable({ + read: function(n) { + // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); + } +}); +``` + +### Transform + +```js +var transform = new stream.Transform({ + transform: function(chunk, encoding, next) { + // sets this._transform under the hood + + // generate output as many times as needed + // this.push(chunk); + + // call when the current chunk is consumed + next(); + }, + flush: function(done) { + // sets this._flush under the hood + + // generate output as many times as needed + // this.push(chunk); + + done(); + } +}); +``` + +### Writable + +```js +var writable = new stream.Writable({ + write: function(chunk, encoding, next) { + // sets this._write under the hood + + // An optional error can be passed as the first argument + next() + } +}); + +// or + +var writable = new stream.Writable({ + writev: function(chunks, next) { + // sets this._writev under the hood + + // An optional error can be passed as the first argument + next() + } +}); +``` + +## Streams: Under the Hood + + + +### Buffering + + + +Both Writable and Readable streams will buffer data on an internal +object which can be retrieved from `_writableState.getBuffer()` or +`_readableState.buffer`, respectively. + +The amount of data that will potentially be buffered depends on the +`highWaterMark` option which is passed into the constructor. + +Buffering in Readable streams happens when the implementation calls +[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not +call [`stream.read()`][stream-read], then the data will sit in the internal +queue until it is consumed. + +Buffering in Writable streams happens when the user calls +[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. + +The purpose of streams, especially with the [`stream.pipe()`][] method, is to +limit the buffering of data to acceptable levels, so that sources and +destinations of varying speed will not overwhelm the available memory. + +### Compatibility with Older Node.js Versions + + + +In versions of Node.js prior to v0.10, the Readable stream interface was +simpler, but also less powerful and less useful. + +* Rather than waiting for you to call the [`stream.read()`][stream-read] method, + [`'data'`][] events would start emitting immediately. If you needed to do + some I/O to decide how to handle data, then you had to store the chunks + in some kind of buffer so that they would not be lost. +* The [`stream.pause()`][stream-pause] method was advisory, rather than + guaranteed. This meant that you still had to be prepared to receive + [`'data'`][] events even when the stream was in a paused state. + +In Node.js v0.10, the [Readable][] class was added. +For backwards compatibility with older Node.js programs, Readable streams +switch into "flowing mode" when a [`'data'`][] event handler is added, or +when the [`stream.resume()`][stream-resume] method is called. The effect is +that, even if you are not using the new [`stream.read()`][stream-read] method +and [`'readable'`][] event, you no longer have to worry about losing +[`'data'`][] chunks. + +Most programs will continue to function normally. However, this +introduces an edge case in the following conditions: + +* No [`'data'`][] event handler is added. +* The [`stream.resume()`][stream-resume] method is never called. +* The stream is not piped to any writable destination. + +For example, consider the following code: + +```js +// WARNING! BROKEN! +net.createServer((socket) => { + + // we add an 'end' method, but never consume the data + socket.on('end', () => { + // It will never get here. + socket.end('I got your message (but didnt read it)\n'); + }); + +}).listen(1337); +``` + +In versions of Node.js prior to v0.10, the incoming message data would be +simply discarded. However, in Node.js v0.10 and beyond, +the socket will remain paused forever. + +The workaround in this situation is to call the +[`stream.resume()`][stream-resume] method to start the flow of data: + +```js +// Workaround +net.createServer((socket) => { + + socket.on('end', () => { + socket.end('I got your message (but didnt read it)\n'); + }); + + // start the flow of data, discarding it. + socket.resume(); + +}).listen(1337); +``` + +In addition to new Readable streams switching into flowing mode, +pre-v0.10 style streams can be wrapped in a Readable class using the +[`stream.wrap()`][] method. + + +### Object Mode + + + +Normally, Streams operate on Strings and Buffers exclusively. + +Streams that are in **object mode** can emit generic JavaScript values +other than Buffers and Strings. + +A Readable stream in object mode will always return a single item from +a call to [`stream.read(size)`][stream-read], regardless of what the size +argument is. + +A Writable stream in object mode will always ignore the `encoding` +argument to [`stream.write(data, encoding)`][stream-write]. + +The special value `null` still retains its special value for object +mode streams. That is, for object mode readable streams, `null` as a +return value from [`stream.read()`][stream-read] indicates that there is no more +data, and [`stream.push(null)`][stream-push] will signal the end of stream data +(`EOF`). + +No streams in Node.js core are object mode streams. This pattern is only +used by userland streaming libraries. + +You should set `objectMode` in your stream child class constructor on +the options object. Setting `objectMode` mid-stream is not safe. + +For Duplex streams `objectMode` can be set exclusively for readable or +writable side with `readableObjectMode` and `writableObjectMode` +respectively. These options can be used to implement parsers and +serializers with Transform streams. + +```js +const util = require('util'); +const StringDecoder = require('string_decoder').StringDecoder; +const Transform = require('stream').Transform; +util.inherits(JSONParseStream, Transform); + +// Gets \n-delimited JSON string data, and emits the parsed objects +function JSONParseStream() { + if (!(this instanceof JSONParseStream)) + return new JSONParseStream(); + + Transform.call(this, { readableObjectMode : true }); + + this._buffer = ''; + this._decoder = new StringDecoder('utf8'); +} + +JSONParseStream.prototype._transform = function(chunk, encoding, cb) { + this._buffer += this._decoder.write(chunk); + // split on newlines + var lines = this._buffer.split(/\r?\n/); + // keep the last partial line buffered + this._buffer = lines.pop(); + for (var l = 0; l < lines.length; l++) { + var line = lines[l]; + try { + var obj = JSON.parse(line); + } catch (er) { + this.emit('error', er); + return; + } + // push the parsed object out to the readable consumer + this.push(obj); + } + cb(); +}; + +JSONParseStream.prototype._flush = function(cb) { + // Just handle any leftover + var rem = this._buffer.trim(); + if (rem) { + try { + var obj = JSON.parse(rem); + } catch (er) { + this.emit('error', er); + return; + } + // push the parsed object out to the readable consumer + this.push(obj); + } + cb(); +}; +``` + +### `stream.read(0)` + +There are some cases where you want to trigger a refresh of the +underlying readable stream mechanisms, without actually consuming any +data. In that case, you can call `stream.read(0)`, which will always +return null. + +If the internal read buffer is below the `highWaterMark`, and the +stream is not currently reading, then calling `stream.read(0)` will trigger +a low-level [`stream._read()`][stream-_read] call. + +There is almost never a need to do this. However, you will see some +cases in Node.js's internals where this is done, particularly in the +Readable stream class internals. + +### `stream.push('')` + +Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an +interesting side effect. Because it *is* a call to +[`stream.push()`][stream-push], it will end the `reading` process. However, it +does *not* add any data to the readable buffer, so there's nothing for +a user to consume. + +Very rarely, there are cases where you have no data to provide now, +but the consumer of your stream (or, perhaps, another bit of your own +code) will know when to check again, by calling [`stream.read(0)`][stream-read]. +In those cases, you *may* call `stream.push('')`. + +So far, the only use case for this functionality is in the +[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you +find that you have to use `stream.push('')`, please consider another +approach, because it almost certainly indicates that something is +horribly wrong. + +[`'data'`]: #stream_event_data +[`'drain'`]: #stream_event_drain +[`'end'`]: #stream_event_end +[`'finish'`]: #stream_event_finish +[`'readable'`]: #stream_event_readable +[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.1.0/api/buffer.html#buffer_buf_tostring_encoding_start_end +[`EventEmitter`]: https://nodejs.org/docs/v6.1.0/api/events.html#events_class_eventemitter +[`process.stderr`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stderr +[`process.stdin`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdin +[`process.stdout`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdout +[`stream.cork()`]: #stream_writable_cork +[`stream.pipe()`]: #stream_readable_pipe_destination_options +[`stream.uncork()`]: #stream_writable_uncork +[`stream.unpipe()`]: #stream_readable_unpipe_destination +[`stream.wrap()`]: #stream_readable_wrap_stream +[`tls.CryptoStream`]: https://nodejs.org/docs/v6.1.0/api/tls.html#tls_class_cryptostream +[`util.inherits()`]: https://nodejs.org/docs/v6.1.0/api/util.html#util_util_inherits_constructor_superconstructor +[API for Stream Consumers]: #stream_api_for_stream_consumers +[API for Stream Implementors]: #stream_api_for_stream_implementors +[child process stdin]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdin +[child process stdout and stderr]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdout +[Compatibility]: #stream_compatibility_with_older_node_js_versions +[crypto]: crypto.html +[Duplex]: #stream_class_stream_duplex +[fs read streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_readstream +[fs write streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_writestream +[HTTP requests, on the client]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_clientrequest +[HTTP responses, on the server]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_serverresponse +[http-incoming-message]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_incomingmessage +[Object mode]: #stream_object_mode +[Readable]: #stream_class_stream_readable +[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 +[stream-_flush]: #stream_transform_flush_callback +[stream-_read]: #stream_readable_read_size_1 +[stream-_transform]: #stream_transform_transform_chunk_encoding_callback +[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 +[stream-_writev]: #stream_writable_writev_chunks_callback +[stream-end]: #stream_writable_end_chunk_encoding_callback +[stream-pause]: #stream_readable_pause +[stream-push]: #stream_readable_push_chunk_encoding +[stream-read]: #stream_readable_read_size +[stream-resume]: #stream_readable_resume +[stream-write]: #stream_writable_write_chunk_encoding_callback +[TCP sockets]: https://nodejs.org/docs/v6.1.0/api/net.html#net_class_net_socket +[Transform]: #stream_class_stream_transform +[Writable]: #stream_class_stream_writable +[zlib]: zlib.html diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 00000000000..83275f192e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000000..ca807af8762 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000000..736693b8400 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,75 @@ +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +var keys = objectKeys(Writable.prototype); +for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + processNextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000000..d06f71f1868 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,26 @@ +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000000..79914fa684c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,893 @@ +'use strict'; + +module.exports = Readable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var isArray = require('isarray'); +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream; +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var StringDecoder; + +util.inherits(Readable, Stream); + +var hasPrependListener = typeof EE.prototype.prependListener === 'function'; + +function prependListener(emitter, event, fn) { + if (hasPrependListener) return emitter.prependListener(event, fn); + + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. This is here + // only because this code needs to continue to work with older versions + // of Node.js that do not include the prependListener() method. The goal + // is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +var Duplex; +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +var Duplex; +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options && typeof options.read === 'function') this._read = options.read; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + + if (!state.objectMode && typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = bufferShim.from(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var _e = new Error('stream.unshift() after end event'); + stream.emit('error', _e); + } else { + var skipAdd; + if (state.decoder && !addToFront && !encoding) { + chunk = state.decoder.write(chunk); + skipAdd = !state.objectMode && chunk.length === 0; + } + + if (!addToFront) state.reading = false; + + // Don't add to the buffer if we've decoded to an empty string chunk and + // we're not in object mode + if (!skipAdd) { + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) return 0; + + if (state.objectMode) return n === 0 ? 0 : 1; + + if (n === null || isNaN(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; + } + + if (n <= 0) return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else { + return state.length; + } + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + var state = this._readableState; + var nOrig = n; + + if (typeof n !== 'number' || n > 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } + + if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (doRead && !state.reading) n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended && state.length === 0) endReadable(this); + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + processNextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + if (false === ret) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var _i = 0; _i < len; _i++) { + dests[_i].emit('unpipe', this); + }return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + // If listening to data, and it has not explicitly been paused, + // then call resume to start the flow of data on the next tick. + if (ev === 'data' && false !== this._readableState.flowing) { + this.resume(); + } + + if (ev === 'readable' && !this._readableState.endEmitted) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + processNextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + processNextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + if (state.flowing) { + do { + var chunk = stream.read(); + } while (null !== chunk && state.flowing); + } +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function (ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) return null; + + if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var _buf = list[0]; + var cpy = Math.min(n - c, _buf.length); + + if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy); + + if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + processNextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000000..dbc996ede62 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,180 @@ +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function TransformState(stream) { + this.afterTransform = function (er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; + this.writeencoding = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) stream.push(data); + + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + this.once('prefinish', function () { + if (typeof this._flush === 'function') this._flush(function (er) { + done(stream, er); + });else done(stream); + }); +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('Not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +function done(stream, er) { + if (er) return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) throw new Error('Calling transform done when ws.length != 0'); + + if (ts.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000000..ed5efcbd203 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,526 @@ +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +module.exports = Writable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream; +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +util.inherits(Writable, Stream); + +function nop() {} + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +var Duplex; +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function writableStateGetBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }); + } catch (_) {} +})(); + +var Duplex; +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + processNextTick(cb, er); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + // Always throw error if a null is written + // if we are not in object mode then throw + // if it is not a buffer, string, or undefined. + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + processNextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = bufferShim.from(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + + if (Buffer.isBuffer(chunk)) encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) processNextTick(cb, er);else cb(er); + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + while (entry) { + buffer[count] = entry; + entry = entry.next; + count += 1; + } + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequestCount = 0; + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else { + prefinish(stream, state); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) processNextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + + this.finish = function (err) { + var entry = _this.entry; + _this.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = _this; + } else { + state.corkedRequestsFree = _this; + } + }; +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json new file mode 100644 index 00000000000..14818e30377 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + "readable-stream@^2.0.0 || ^1.1.13", + "/Users/eshanker/Code/fsevents/node_modules/are-we-there-yet" + ] + ], + "_from": "readable-stream@>=2.0.0 <3.0.0||>=1.1.13 <2.0.0", + "_id": "readable-stream@2.1.4", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/readable-stream", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/readable-stream-2.1.4.tgz_1463679605032_0.6917394688352942" + }, + "_npmUser": { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + }, + "_npmVersion": "3.8.6", + "_phantomChildren": {}, + "_requested": { + "name": "readable-stream", + "raw": "readable-stream@^2.0.0 || ^1.1.13", + "rawSpec": "^2.0.0 || ^1.1.13", + "scope": null, + "spec": ">=2.0.0 <3.0.0||>=1.1.13 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/are-we-there-yet", + "/fsevents/tar-pack" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz", + "_shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", + "_shrinkwrap": null, + "_spec": "readable-stream@^2.0.0 || ^1.1.13", + "_where": "/Users/eshanker/Code/fsevents/node_modules/are-we-there-yet", + "browser": { + "util": false + }, + "bugs": { + "url": "https://github.com/nodejs/readable-stream/issues" + }, + "dependencies": { + "buffer-shims": "^1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, + "description": "Streams3, a user-land copy of the stream library from Node.js", + "devDependencies": { + "assert": "~1.4.0", + "nyc": "^6.4.0", + "tap": "~0.7.1", + "tape": "~4.5.1", + "zuul": "~3.9.0", + "zuul-ngrok": "^4.0.0" + }, + "directories": {}, + "dist": { + "shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" + }, + "gitHead": "7752832fba237929388dea6c96911a0a6379abfc", + "homepage": "https://github.com/nodejs/readable-stream#readme", + "keywords": [ + "pipe", + "readable", + "stream" + ], + "license": "MIT", + "main": "readable.js", + "maintainers": [ + { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + }, + { + "email": "rod@vagg.org", + "name": "rvagg" + }, + { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + } + ], + "name": "readable-stream", + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream.git" + }, + "scripts": { + "browser": "npm run write-zuul && zuul -- test/browser.js", + "cover": "nyc npm test", + "local": "zuul --local -- test/browser.js", + "report": "nyc report --reporter=lcov", + "test": "tap test/parallel/*.js test/ours/*.js", + "write-zuul": "printf \"ui: tape\ntunnel: ngrok\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + }, + "version": "2.1.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000000..27e8d8a5516 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js new file mode 100644 index 00000000000..be2688a071d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js @@ -0,0 +1,16 @@ +var Stream = (function (){ + try { + return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify + } catch(_){} +}()); +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = Stream || exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); + +if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js new file mode 100644 index 00000000000..5d482f0780e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js new file mode 100644 index 00000000000..e1e9efdf3c1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc new file mode 100644 index 00000000000..5a59481586a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc @@ -0,0 +1,45 @@ +{ + "env": { + "node": true + }, + "rules": { + // 2-space indentation + "indent": [2, 2, {"SwitchCase": 1}], + // Disallow semi-colons, unless needed to disambiguate statement + "semi": [2, "never"], + // Require strings to use single quotes + "quotes": [2, "single"], + // Require curly braces for all control statements + "curly": 2, + // Disallow using variables and functions before they've been defined + "no-use-before-define": 2, + // Allow any case for variable naming + "camelcase": 0, + // Disallow unused variables, except as function arguments + "no-unused-vars": [2, {"args":"none"}], + // Allow leading underscores for method names + // REASON: we use underscores to denote private methods + "no-underscore-dangle": 0, + // Allow multi spaces around operators since they are + // used for alignment. This is not consistent in the + // code. + "no-multi-spaces": 0, + // Style rule is: most objects use { beforeColon: false, afterColon: true }, unless aligning which uses: + // + // { + // beforeColon : true, + // afterColon : true + // } + // + // eslint can't handle this, so the check is disabled. + "key-spacing": 0, + // Allow shadowing vars in outer scope (needs discussion) + "no-shadow": 0, + // Use if () { } + // ^ space + "keyword-spacing": [2, {"after": true}], + // Use if () { } + // ^ space + "space-before-blocks": [2, "always"] + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore new file mode 100644 index 00000000000..67fe11cc0a7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore @@ -0,0 +1,6 @@ +coverage +tests +node_modules +examples +release.sh +disabled.appveyor.yml diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml new file mode 100644 index 00000000000..6f2d753b615 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml @@ -0,0 +1,21 @@ + +language: node_js + +node_js: + - node + - 4 + - 0.12 + - 0.10 + +after_script: + - npm run test-cov + - codecov + - cat ./coverage/lcov.info | coveralls + +webhooks: + urls: https://webhooks.gitter.im/e/237280ed4796c19cc626 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: false # default: false + +sudo: false diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md new file mode 100644 index 00000000000..c7d684fa50e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md @@ -0,0 +1,631 @@ +## Change Log + +### v2.73.0 (2016/07/09) +- [#2240](https://github.com/request/request/pull/2240) Remove connectionErrorHandler to fix #1903 (@zarenner) +- [#2251](https://github.com/request/request/pull/2251) tape@4.6.0 breaks build 🚨 (@greenkeeperio-bot) +- [#2225](https://github.com/request/request/pull/2225) Update docs (@ArtskydJ) +- [#2203](https://github.com/request/request/pull/2203) Update browserify to version 13.0.1 🚀 (@greenkeeperio-bot) +- [#2275](https://github.com/request/request/pull/2275) Update karma to version 1.1.1 🚀 (@greenkeeperio-bot) +- [#2204](https://github.com/request/request/pull/2204) Add codecov.yml and disable PR comments (@simov) +- [#2212](https://github.com/request/request/pull/2212) Fix link to http.IncomingMessage documentation (@nazieb) +- [#2208](https://github.com/request/request/pull/2208) Update to form-data RC4 and pass null values to it (@simov) +- [#2207](https://github.com/request/request/pull/2207) Move aws4 require statement to the top (@simov) +- [#2199](https://github.com/request/request/pull/2199) Update karma-coverage to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#2206](https://github.com/request/request/pull/2206) Update qs to version 6.2.0 🚀 (@greenkeeperio-bot) +- [#2205](https://github.com/request/request/pull/2205) Use server-destory to close hanging sockets in tests (@simov) +- [#2200](https://github.com/request/request/pull/2200) Update karma-cli to version 1.0.0 🚀 (@greenkeeperio-bot) + +### v2.72.0 (2016/04/17) +- [#2176](https://github.com/request/request/pull/2176) Do not try to pipe Gzip responses with no body (@simov) +- [#2175](https://github.com/request/request/pull/2175) Add 'delete' alias for the 'del' API method (@simov, @MuhanZou) +- [#2172](https://github.com/request/request/pull/2172) Add support for deflate content encoding (@czardoz) +- [#2169](https://github.com/request/request/pull/2169) Add callback option (@simov) +- [#2165](https://github.com/request/request/pull/2165) Check for self.req existence inside the write method (@simov) +- [#2167](https://github.com/request/request/pull/2167) Fix TravisCI badge reference master branch (@a0viedo) + +### v2.71.0 (2016/04/12) +- [#2164](https://github.com/request/request/pull/2164) Catch errors from the underlying http module (@simov) + +### v2.70.0 (2016/04/05) +- [#2147](https://github.com/request/request/pull/2147) Update eslint to version 2.5.3 🚀 (@simov, @greenkeeperio-bot) +- [#2009](https://github.com/request/request/pull/2009) Support JSON stringify replacer argument. (@elyobo) +- [#2142](https://github.com/request/request/pull/2142) Update eslint to version 2.5.1 🚀 (@greenkeeperio-bot) +- [#2128](https://github.com/request/request/pull/2128) Update browserify-istanbul to version 2.0.0 🚀 (@greenkeeperio-bot) +- [#2115](https://github.com/request/request/pull/2115) Update eslint to version 2.3.0 🚀 (@simov, @greenkeeperio-bot) +- [#2089](https://github.com/request/request/pull/2089) Fix badges (@simov) +- [#2092](https://github.com/request/request/pull/2092) Update browserify-istanbul to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#2079](https://github.com/request/request/pull/2079) Accept read stream as body option (@simov) +- [#2070](https://github.com/request/request/pull/2070) Update bl to version 1.1.2 🚀 (@greenkeeperio-bot) +- [#2063](https://github.com/request/request/pull/2063) Up bluebird and oauth-sign (@simov) +- [#2058](https://github.com/request/request/pull/2058) Karma fixes for latest versions (@eiriksm) +- [#2057](https://github.com/request/request/pull/2057) Update contributing guidelines (@simov) +- [#2054](https://github.com/request/request/pull/2054) Update qs to version 6.1.0 🚀 (@greenkeeperio-bot) + +### v2.69.0 (2016/01/27) +- [#2041](https://github.com/request/request/pull/2041) restore aws4 as regular dependency (@rmg) + +### v2.68.0 (2016/01/27) +- [#2036](https://github.com/request/request/pull/2036) Add AWS Signature Version 4 (@simov, @mirkods) +- [#2022](https://github.com/request/request/pull/2022) Convert numeric multipart bodies to string (@simov, @feross) +- [#2024](https://github.com/request/request/pull/2024) Update har-validator dependency for nsp advisory #76 (@TylerDixon) +- [#2016](https://github.com/request/request/pull/2016) Update qs to version 6.0.2 🚀 (@greenkeeperio-bot) +- [#2007](https://github.com/request/request/pull/2007) Use the `extend` module instead of util._extend (@simov) +- [#2003](https://github.com/request/request/pull/2003) Update browserify to version 13.0.0 🚀 (@greenkeeperio-bot) +- [#1989](https://github.com/request/request/pull/1989) Update buffer-equal to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#1956](https://github.com/request/request/pull/1956) Check form-data content-length value before setting up the header (@jongyoonlee) +- [#1958](https://github.com/request/request/pull/1958) Use IncomingMessage.destroy method (@simov) +- [#1952](https://github.com/request/request/pull/1952) Adds example for Tor proxy (@prometheansacrifice) +- [#1943](https://github.com/request/request/pull/1943) Update eslint to version 1.10.3 🚀 (@simov, @greenkeeperio-bot) +- [#1924](https://github.com/request/request/pull/1924) Update eslint to version 1.10.1 🚀 (@greenkeeperio-bot) +- [#1915](https://github.com/request/request/pull/1915) Remove content-length and transfer-encoding headers from defaultProxyHeaderWhiteList (@yaxia) + +### v2.67.0 (2015/11/19) +- [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot) + +### v2.66.0 (2015/11/18) +- [#1906](https://github.com/request/request/pull/1906) Update README URLs based on HTTP redirects (@ReadmeCritic) +- [#1905](https://github.com/request/request/pull/1905) Convert typed arrays into regular buffers (@simov) +- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot) +- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms) +- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot) +- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @vladimirich, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @Bloutiouf) +- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov) +- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot) +- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot) +- [#1866](https://github.com/request/request/pull/1866) Add missing quotes on x-token property in README (@miguelmota) +- [#1874](https://github.com/request/request/pull/1874) Fix typo in README.md (@gswalden) +- [#1860](https://github.com/request/request/pull/1860) Improve referer header tests and docs (@simov) +- [#1861](https://github.com/request/request/pull/1861) Remove redundant call to Stream constructor (@watson) +- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov) +- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot) +- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov) +- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@Bloutiouf) +- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu) +- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot) +- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot) + +### v2.65.0 (2015/10/11) +- [#1833](https://github.com/request/request/pull/1833) Update aws-sign2 to version 0.6.0 🚀 (@greenkeeperio-bot) +- [#1811](https://github.com/request/request/pull/1811) Enable loose cookie parsing in tough-cookie (@Sebmaster) +- [#1830](https://github.com/request/request/pull/1830) Bring back tilde ranges for all dependencies (@simov) +- [#1821](https://github.com/request/request/pull/1821) Implement support for RFC 2617 MD5-sess algorithm. (@BigDSK) +- [#1828](https://github.com/request/request/pull/1828) Updated qs dependency to 5.2.0 (@acroca) +- [#1818](https://github.com/request/request/pull/1818) Extract `readResponseBody` method out of `onRequestResponse` (@pvoisin) +- [#1819](https://github.com/request/request/pull/1819) Run stringify once (@mgenereu) +- [#1814](https://github.com/request/request/pull/1814) Updated har-validator to version 2.0.2 (@greenkeeperio-bot) +- [#1807](https://github.com/request/request/pull/1807) Updated tough-cookie to version 2.1.0 (@greenkeeperio-bot) +- [#1800](https://github.com/request/request/pull/1800) Add caret ranges for devDependencies, except eslint (@simov) +- [#1799](https://github.com/request/request/pull/1799) Updated karma-browserify to version 4.4.0 (@greenkeeperio-bot) +- [#1797](https://github.com/request/request/pull/1797) Updated tape to version 4.2.0 (@greenkeeperio-bot) +- [#1788](https://github.com/request/request/pull/1788) Pinned all dependencies (@greenkeeperio-bot) + +### v2.64.0 (2015/09/25) +- [#1787](https://github.com/request/request/pull/1787) npm ignore examples, release.sh and disabled.appveyor.yml (@thisconnect) +- [#1775](https://github.com/request/request/pull/1775) Fix typo in README.md (@djchie) +- [#1776](https://github.com/request/request/pull/1776) Changed word 'conjuction' to read 'conjunction' in README.md (@ryanwholey) +- [#1785](https://github.com/request/request/pull/1785) Revert: Set default application/json content-type when using json option #1772 (@simov) + +### v2.63.0 (2015/09/21) +- [#1772](https://github.com/request/request/pull/1772) Set default application/json content-type when using json option (@jzaefferer) + +### v2.62.0 (2015/09/15) +- [#1768](https://github.com/request/request/pull/1768) Add node 4.0 to the list of build targets (@simov) +- [#1767](https://github.com/request/request/pull/1767) Query strings now cooperate with unix sockets (@JoshWillik) +- [#1750](https://github.com/request/request/pull/1750) Revert doc about installation of tough-cookie added in #884 (@LoicMahieu) +- [#1746](https://github.com/request/request/pull/1746) Missed comma in Readme (@vladimirich) +- [#1743](https://github.com/request/request/pull/1743) Fix options not being initialized in defaults method (@simov) + +### v2.61.0 (2015/08/19) +- [#1721](https://github.com/request/request/pull/1721) Minor fix in README.md (@arbaaz) +- [#1733](https://github.com/request/request/pull/1733) Avoid useless Buffer transformation (@michelsalib) +- [#1726](https://github.com/request/request/pull/1726) Update README.md (@paulomcnally) +- [#1715](https://github.com/request/request/pull/1715) Fix forever option in node > 0.10 #1709 (@calibr) +- [#1716](https://github.com/request/request/pull/1716) Do not create Buffer from Object in setContentLength(iojs v3.0 issue) (@calibr) +- [#1711](https://github.com/request/request/pull/1711) Add ability to detect connect timeouts (@kevinburke) +- [#1712](https://github.com/request/request/pull/1712) Set certificate expiration to August 2, 2018 (@kevinburke) +- [#1700](https://github.com/request/request/pull/1700) debug() when JSON.parse() on a response body fails (@phillipj) + +### v2.60.0 (2015/07/21) +- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews) + +### v2.59.0 (2015/07/20) +- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options. Forever option defaults to using http(s).Agent in node 0.12+ (@simov) +- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman) +- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme) +- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov) +- [#1651](https://github.com/request/request/pull/1651) Preserve HEAD method when using followAllRedirects (@simov) +- [#1652](https://github.com/request/request/pull/1652) Update `encoding` option documentation in README.md (@daniel347x) +- [#1650](https://github.com/request/request/pull/1650) Allow content-type overriding when using the `form` option (@simov) +- [#1646](https://github.com/request/request/pull/1646) Clarify the nature of setting `ca` in `agentOptions` (@jeffcharles) + +### v2.58.0 (2015/06/16) +- [#1638](https://github.com/request/request/pull/1638) Use the `extend` module to deep extend in the defaults method (@simov) +- [#1631](https://github.com/request/request/pull/1631) Move tunnel logic into separate module (@simov) +- [#1634](https://github.com/request/request/pull/1634) Fix OAuth query transport_method (@simov) +- [#1603](https://github.com/request/request/pull/1603) Add codecov (@simov) + +### v2.57.0 (2015/05/31) +- [#1615](https://github.com/request/request/pull/1615) Replace '.client' with '.socket' as the former was deprecated in 2.2.0. (@ChALkeR) + +### v2.56.0 (2015/05/28) +- [#1610](https://github.com/request/request/pull/1610) Bump module dependencies (@simov) +- [#1600](https://github.com/request/request/pull/1600) Extract the querystring logic into separate module (@simov) +- [#1607](https://github.com/request/request/pull/1607) Re-generate certificates (@simov) +- [#1599](https://github.com/request/request/pull/1599) Move getProxyFromURI logic below the check for Invaild URI (#1595) (@simov) +- [#1598](https://github.com/request/request/pull/1598) Fix the way http verbs are defined in order to please intellisense IDEs (@simov, @flannelJesus) +- [#1591](https://github.com/request/request/pull/1591) A few minor fixes: (@simov) +- [#1584](https://github.com/request/request/pull/1584) Refactor test-default tests (according to comments in #1430) (@simov) +- [#1585](https://github.com/request/request/pull/1585) Fixing documentation regarding TLS options (#1583) (@mainakae) +- [#1574](https://github.com/request/request/pull/1574) Refresh the oauth_nonce on redirect (#1573) (@simov) +- [#1570](https://github.com/request/request/pull/1570) Discovered tests that weren't properly running (@seanstrom) +- [#1569](https://github.com/request/request/pull/1569) Fix pause before response arrives (@kevinoid) +- [#1558](https://github.com/request/request/pull/1558) Emit error instead of throw (@simov) +- [#1568](https://github.com/request/request/pull/1568) Fix stall when piping gzipped response (@kevinoid) +- [#1560](https://github.com/request/request/pull/1560) Update combined-stream (@apechimp) +- [#1543](https://github.com/request/request/pull/1543) Initial support for oauth_body_hash on json payloads (@simov, @aesopwolf) +- [#1541](https://github.com/request/request/pull/1541) Fix coveralls (@simov) +- [#1540](https://github.com/request/request/pull/1540) Fix recursive defaults for convenience methods (@simov) +- [#1536](https://github.com/request/request/pull/1536) More eslint style rules (@froatsnook) +- [#1533](https://github.com/request/request/pull/1533) Adding dependency status bar to README.md (@YasharF) +- [#1539](https://github.com/request/request/pull/1539) ensure the latest version of har-validator is included (@ahmadnassri) +- [#1516](https://github.com/request/request/pull/1516) forever+pool test (@devTristan) + +### v2.55.0 (2015/04/05) +- [#1520](https://github.com/request/request/pull/1520) Refactor defaults (@simov) +- [#1525](https://github.com/request/request/pull/1525) Delete request headers with undefined value. (@froatsnook) +- [#1521](https://github.com/request/request/pull/1521) Add promise tests (@simov) +- [#1518](https://github.com/request/request/pull/1518) Fix defaults (@simov) +- [#1515](https://github.com/request/request/pull/1515) Allow static invoking of convenience methods (@simov) +- [#1505](https://github.com/request/request/pull/1505) Fix multipart boundary extraction regexp (@simov) +- [#1510](https://github.com/request/request/pull/1510) Fix basic auth form data (@simov) + +### v2.54.0 (2015/03/24) +- [#1501](https://github.com/request/request/pull/1501) HTTP Archive 1.2 support (@ahmadnassri) +- [#1486](https://github.com/request/request/pull/1486) Add a test for the forever agent (@akshayp) +- [#1500](https://github.com/request/request/pull/1500) Adding handling for no auth method and null bearer (@philberg) +- [#1498](https://github.com/request/request/pull/1498) Add table of contents in readme (@simov) +- [#1477](https://github.com/request/request/pull/1477) Add support for qs options via qsOptions key (@simov) +- [#1496](https://github.com/request/request/pull/1496) Parameters encoded to base 64 should be decoded as UTF-8, not ASCII. (@albanm) +- [#1494](https://github.com/request/request/pull/1494) Update eslint (@froatsnook) +- [#1474](https://github.com/request/request/pull/1474) Require Colon in Basic Auth (@erykwalder) +- [#1481](https://github.com/request/request/pull/1481) Fix baseUrl and redirections. (@burningtree) +- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook) +- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em) +- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB) +- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nicolasmccurdy, @demohi, @simov, @0x4139) +- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139) +- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy, @demohi) +- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal) +- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimon) +- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen) +- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky) +- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack) +- [#1423](https://github.com/request/request/pull/1423) Allow fully qualified multipart content-type header (@simov) +- [#1430](https://github.com/request/request/pull/1430) Fix recursive requester (@tikotzky) +- [#1429](https://github.com/request/request/pull/1429) Throw error when making HEAD request with a body (@tikotzky) +- [#1419](https://github.com/request/request/pull/1419) Add note that the project is broken in 0.12.x (@nylen) +- [#1413](https://github.com/request/request/pull/1413) Fix basic auth (@simov) +- [#1397](https://github.com/request/request/pull/1397) Improve pipe-from-file tests (@nylen) + +### v2.53.0 (2015/02/02) +- [#1396](https://github.com/request/request/pull/1396) Do not rfc3986 escape JSON bodies (@nylen, @simov) +- [#1392](https://github.com/request/request/pull/1392) Improve `timeout` option description (@watson) + +### v2.52.0 (2015/02/02) +- [#1383](https://github.com/request/request/pull/1383) Add missing HTTPS options that were not being passed to tunnel (@brichard19) (@nylen) +- [#1388](https://github.com/request/request/pull/1388) Upgrade mime-types package version (@roderickhsiao) +- [#1389](https://github.com/request/request/pull/1389) Revise Setup Tunnel Function (@seanstrom) +- [#1374](https://github.com/request/request/pull/1374) Allow explicitly disabling tunneling for proxied https destinations (@nylen) +- [#1376](https://github.com/request/request/pull/1376) Use karma-browserify for tests. Add browser test coverage reporter. (@eiriksm) +- [#1366](https://github.com/request/request/pull/1366) Refactor OAuth into separate module (@simov) +- [#1373](https://github.com/request/request/pull/1373) Rewrite tunnel test to be pure Node.js (@nylen) +- [#1371](https://github.com/request/request/pull/1371) Upgrade test reporter (@nylen) +- [#1360](https://github.com/request/request/pull/1360) Refactor basic, bearer, digest auth logic into separate class (@simov) +- [#1354](https://github.com/request/request/pull/1354) Remove circular dependency from debugging code (@nylen) +- [#1351](https://github.com/request/request/pull/1351) Move digest auth into private prototype method (@simov) +- [#1352](https://github.com/request/request/pull/1352) Update hawk dependency to ~2.3.0 (@mridgway) +- [#1353](https://github.com/request/request/pull/1353) Correct travis-ci badge (@dogancelik) +- [#1349](https://github.com/request/request/pull/1349) Make sure we return on errored browser requests. (@eiriksm) +- [#1346](https://github.com/request/request/pull/1346) getProxyFromURI Extraction Refactor (@seanstrom) +- [#1337](https://github.com/request/request/pull/1337) Standardize test ports on 6767 (@nylen) +- [#1341](https://github.com/request/request/pull/1341) Emit FormData error events as Request error events (@nylen, @rwky) +- [#1343](https://github.com/request/request/pull/1343) Clean up readme badges, and add Travis and Coveralls badges (@nylen) +- [#1345](https://github.com/request/request/pull/1345) Update README.md (@Aaron-Hartwig) +- [#1338](https://github.com/request/request/pull/1338) Always wait for server.close() callback in tests (@nylen) +- [#1342](https://github.com/request/request/pull/1342) Add mock https server and redo start of browser tests for this purpose. (@eiriksm) +- [#1339](https://github.com/request/request/pull/1339) Improve auth docs (@nylen) +- [#1335](https://github.com/request/request/pull/1335) Add support for OAuth plaintext signature method (@simov) +- [#1332](https://github.com/request/request/pull/1332) Add clean script to remove test-browser.js after the tests run (@seanstrom) +- [#1327](https://github.com/request/request/pull/1327) Fix errors generating coverage reports. (@nylen) +- [#1330](https://github.com/request/request/pull/1330) Return empty buffer upon empty response body and encoding is set to null (@seanstrom) +- [#1326](https://github.com/request/request/pull/1326) Use faster container-based infrastructure on Travis (@nylen) +- [#1315](https://github.com/request/request/pull/1315) Implement rfc3986 option (@simov, @nylen, @apoco, @DullReferenceException, @mmalecki, @oliamb, @cliffcrosland, @LewisJEllis, @eiriksm, @poislagarde) +- [#1314](https://github.com/request/request/pull/1314) Detect urlencoded form data header via regex (@simov) +- [#1317](https://github.com/request/request/pull/1317) Improve OAuth1.0 server side flow example (@simov) + +### v2.51.0 (2014/12/10) +- [#1310](https://github.com/request/request/pull/1310) Revert changes introduced in https://github.com/request/request/pull/1282 (@simov) + +### v2.50.0 (2014/12/09) +- [#1308](https://github.com/request/request/pull/1308) Add browser test to keep track of browserify compability. (@eiriksm) +- [#1299](https://github.com/request/request/pull/1299) Add optional support for jsonReviver (@poislagarde) +- [#1277](https://github.com/request/request/pull/1277) Add Coveralls configuration (@simov) +- [#1307](https://github.com/request/request/pull/1307) Upgrade form-data, add back browserify compability. Fixes #455. (@eiriksm) +- [#1305](https://github.com/request/request/pull/1305) Fix typo in README.md (@LewisJEllis) +- [#1288](https://github.com/request/request/pull/1288) Update README.md to explain custom file use case (@cliffcrosland) + +### v2.49.0 (2014/11/28) +- [#1295](https://github.com/request/request/pull/1295) fix(proxy): no-proxy false positive (@oliamb) +- [#1292](https://github.com/request/request/pull/1292) Upgrade `caseless` to 0.8.1 (@mmalecki) +- [#1276](https://github.com/request/request/pull/1276) Set transfer encoding for multipart/related to chunked by default (@simov) +- [#1275](https://github.com/request/request/pull/1275) Fix multipart content-type headers detection (@simov) +- [#1269](https://github.com/request/request/pull/1269) adds streams example for review (@tbuchok) +- [#1238](https://github.com/request/request/pull/1238) Add examples README.md (@simov) + +### v2.48.0 (2014/11/12) +- [#1263](https://github.com/request/request/pull/1263) Fixed a syntax error / typo in README.md (@xna2) +- [#1253](https://github.com/request/request/pull/1253) Add multipart chunked flag (@simov, @nylen) +- [#1251](https://github.com/request/request/pull/1251) Clarify that defaults() does not modify global defaults (@nylen) +- [#1250](https://github.com/request/request/pull/1250) Improve documentation for pool and maxSockets options (@nylen) +- [#1237](https://github.com/request/request/pull/1237) Documenting error handling when using streams (@vmattos) +- [#1244](https://github.com/request/request/pull/1244) Finalize changelog command (@nylen) +- [#1241](https://github.com/request/request/pull/1241) Fix typo (@alexanderGugel) +- [#1223](https://github.com/request/request/pull/1223) Show latest version number instead of "upcoming" in changelog (@nylen) +- [#1236](https://github.com/request/request/pull/1236) Document how to use custom CA in README (#1229) (@hypesystem) +- [#1228](https://github.com/request/request/pull/1228) Support for oauth with RSA-SHA1 signing (@nylen) +- [#1216](https://github.com/request/request/pull/1216) Made json and multipart options coexist (@nylen, @simov) +- [#1225](https://github.com/request/request/pull/1225) Allow header white/exclusive lists in any case. (@RReverser) + +### v2.47.0 (2014/10/26) +- [#1222](https://github.com/request/request/pull/1222) Move from mikeal/request to request/request (@nylen) +- [#1220](https://github.com/request/request/pull/1220) update qs dependency to 2.3.1 (@FredKSchott) +- [#1212](https://github.com/request/request/pull/1212) Improve tests/test-timeout.js (@nylen) +- [#1219](https://github.com/request/request/pull/1219) remove old globalAgent workaround for node 0.4 (@request) +- [#1214](https://github.com/request/request/pull/1214) Remove cruft left over from optional dependencies (@nylen) +- [#1215](https://github.com/request/request/pull/1215) Add proxyHeaderExclusiveList option for proxy-only headers. (@RReverser) +- [#1211](https://github.com/request/request/pull/1211) Allow 'Host' header instead of 'host' and remember case across redirects (@nylen) +- [#1208](https://github.com/request/request/pull/1208) Improve release script (@nylen) +- [#1213](https://github.com/request/request/pull/1213) Support for custom cookie store (@nylen, @mitsuru) +- [#1197](https://github.com/request/request/pull/1197) Clean up some code around setting the agent (@FredKSchott) +- [#1209](https://github.com/request/request/pull/1209) Improve multipart form append test (@simov) +- [#1207](https://github.com/request/request/pull/1207) Update changelog (@nylen) +- [#1185](https://github.com/request/request/pull/1185) Stream multipart/related bodies (@simov) + +### v2.46.0 (2014/10/23) +- [#1198](https://github.com/request/request/pull/1198) doc for TLS/SSL protocol options (@shawnzhu) +- [#1200](https://github.com/request/request/pull/1200) Add a Gitter chat badge to README.md (@gitter-badger) +- [#1196](https://github.com/request/request/pull/1196) Upgrade taper test reporter to v0.3.0 (@nylen) +- [#1199](https://github.com/request/request/pull/1199) Fix lint error: undeclared var i (@nylen) +- [#1191](https://github.com/request/request/pull/1191) Move self.proxy decision logic out of init and into a helper (@FredKSchott) +- [#1190](https://github.com/request/request/pull/1190) Move _buildRequest() logic back into init (@FredKSchott) +- [#1186](https://github.com/request/request/pull/1186) Support Smarter Unix URL Scheme (@FredKSchott) +- [#1178](https://github.com/request/request/pull/1178) update form documentation for new usage (@FredKSchott) +- [#1180](https://github.com/request/request/pull/1180) Enable no-mixed-requires linting rule (@nylen) +- [#1184](https://github.com/request/request/pull/1184) Don't forward authorization header across redirects to different hosts (@nylen) +- [#1183](https://github.com/request/request/pull/1183) Correct README about pre and postamble CRLF using multipart and not mult... (@netpoetica) +- [#1179](https://github.com/request/request/pull/1179) Lint tests directory (@nylen) +- [#1169](https://github.com/request/request/pull/1169) add metadata for form-data file field (@dotcypress) +- [#1173](https://github.com/request/request/pull/1173) remove optional dependencies (@seanstrom) +- [#1165](https://github.com/request/request/pull/1165) Cleanup event listeners and remove function creation from init (@FredKSchott) +- [#1174](https://github.com/request/request/pull/1174) update the request.cookie docs to have a valid cookie example (@seanstrom) +- [#1168](https://github.com/request/request/pull/1168) create a detach helper and use detach helper in replace of nextTick (@seanstrom) +- [#1171](https://github.com/request/request/pull/1171) in post can send form data and use callback (@MiroRadenovic) +- [#1159](https://github.com/request/request/pull/1159) accept charset for x-www-form-urlencoded content-type (@seanstrom) +- [#1157](https://github.com/request/request/pull/1157) Update README.md: body with json=true (@Rob--W) +- [#1164](https://github.com/request/request/pull/1164) Disable tests/test-timeout.js on Travis (@nylen) +- [#1153](https://github.com/request/request/pull/1153) Document how to run a single test (@nylen) +- [#1144](https://github.com/request/request/pull/1144) adds documentation for the "response" event within the streaming section (@tbuchok) +- [#1162](https://github.com/request/request/pull/1162) Update eslintrc file to no longer allow past errors (@FredKSchott) +- [#1155](https://github.com/request/request/pull/1155) Support/use self everywhere (@seanstrom) +- [#1161](https://github.com/request/request/pull/1161) fix no-use-before-define lint warnings (@emkay) +- [#1156](https://github.com/request/request/pull/1156) adding curly brackets to get rid of lint errors (@emkay) +- [#1151](https://github.com/request/request/pull/1151) Fix localAddress test on OS X (@nylen) +- [#1145](https://github.com/request/request/pull/1145) documentation: fix outdated reference to setCookieSync old name in README (@FredKSchott) +- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott) +- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen) +- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund) +- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@slimelabs) +- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey) +- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott) +- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom) +- [#1129](https://github.com/request/request/pull/1129) linting fix: convert double quote strings to use single quotes (@FredKSchott) +- [#1124](https://github.com/request/request/pull/1124) linting fix: remove unneccesary semi-colons (@FredKSchott) + +### v2.45.0 (2014/10/06) +- [#1128](https://github.com/request/request/pull/1128) Add test for setCookie regression (@nylen) +- [#1127](https://github.com/request/request/pull/1127) added tests around using objects as values in a query string (@bcoe) +- [#1103](https://github.com/request/request/pull/1103) Support/refactor request constructor (@nylen, @seanstrom) +- [#1119](https://github.com/request/request/pull/1119) add basic linting to request library (@FredKSchott) +- [#1121](https://github.com/request/request/pull/1121) Revert "Explicitly use sync versions of cookie functions" (@nylen) +- [#1118](https://github.com/request/request/pull/1118) linting fix: Restructure bad empty if statement (@FredKSchott) +- [#1117](https://github.com/request/request/pull/1117) Fix a bad check for valid URIs (@FredKSchott) +- [#1113](https://github.com/request/request/pull/1113) linting fix: space out operators (@FredKSchott) +- [#1116](https://github.com/request/request/pull/1116) Fix typo in `noProxyHost` definition (@FredKSchott) +- [#1114](https://github.com/request/request/pull/1114) linting fix: Added a `new` operator that was missing when creating and throwing a new error (@FredKSchott) +- [#1096](https://github.com/request/request/pull/1096) No_proxy support (@samcday) +- [#1107](https://github.com/request/request/pull/1107) linting-fix: remove unused variables (@FredKSchott) +- [#1112](https://github.com/request/request/pull/1112) linting fix: Make return values consistent and more straitforward (@FredKSchott) +- [#1111](https://github.com/request/request/pull/1111) linting fix: authPieces was getting redeclared (@FredKSchott) +- [#1105](https://github.com/request/request/pull/1105) Use strict mode in request (@FredKSchott) +- [#1110](https://github.com/request/request/pull/1110) linting fix: replace lazy '==' with more strict '===' (@FredKSchott) +- [#1109](https://github.com/request/request/pull/1109) linting fix: remove function call from if-else conditional statement (@FredKSchott) +- [#1102](https://github.com/request/request/pull/1102) Fix to allow setting a `requester` on recursive calls to `request.defaults` (@tikotzky) +- [#1095](https://github.com/request/request/pull/1095) Tweaking engines in package.json (@pdehaan) +- [#1082](https://github.com/request/request/pull/1082) Forward the socket event from the httpModule request (@seanstrom) +- [#972](https://github.com/request/request/pull/972) Clarify gzip handling in the README (@kevinoid) +- [#1089](https://github.com/request/request/pull/1089) Mention that encoding defaults to utf8, not Buffer (@stuartpb) +- [#1088](https://github.com/request/request/pull/1088) Fix cookie example in README.md and make it more clear (@pipi32167) +- [#1027](https://github.com/request/request/pull/1027) Add support for multipart form data in request options. (@crocket) +- [#1076](https://github.com/request/request/pull/1076) use Request.abort() to abort the request when the request has timed-out (@seanstrom) +- [#1068](https://github.com/request/request/pull/1068) add optional postamble required by .NET multipart requests (@netpoetica) + +### v2.43.0 (2014/09/18) +- [#1057](https://github.com/request/request/pull/1057) Defaults should not overwrite defined options (@davidwood) +- [#1046](https://github.com/request/request/pull/1046) Propagate datastream errors, useful in case gzip fails. (@ZJONSSON, @Janpot) +- [#1063](https://github.com/request/request/pull/1063) copy the input headers object #1060 (@finnp) +- [#1031](https://github.com/request/request/pull/1031) Explicitly use sync versions of cookie functions (@ZJONSSON) +- [#1056](https://github.com/request/request/pull/1056) Fix redirects when passing url.parse(x) as URL to convenience method (@nylen) + +### v2.42.0 (2014/09/04) +- [#1053](https://github.com/request/request/pull/1053) Fix #1051 Parse auth properly when using non-tunneling proxy (@isaacs) + +### v2.41.0 (2014/09/04) +- [#1050](https://github.com/request/request/pull/1050) Pass whitelisted headers to tunneling proxy. Organize all tunneling logic. (@isaacs, @Feldhacker) +- [#1035](https://github.com/request/request/pull/1035) souped up nodei.co badge (@rvagg) +- [#1048](https://github.com/request/request/pull/1048) Aws is now possible over a proxy (@steven-aerts) +- [#1039](https://github.com/request/request/pull/1039) extract out helper functions to a helper file (@seanstrom) +- [#1021](https://github.com/request/request/pull/1021) Support/refactor indexjs (@seanstrom) +- [#1033](https://github.com/request/request/pull/1033) Improve and document debug options (@nylen) +- [#1034](https://github.com/request/request/pull/1034) Fix readme headings (@nylen) +- [#1030](https://github.com/request/request/pull/1030) Allow recursive request.defaults (@tikotzky) +- [#1029](https://github.com/request/request/pull/1029) Fix a couple of typos (@nylen) +- [#675](https://github.com/request/request/pull/675) Checking for SSL fault on connection before reading SSL properties (@VRMink) +- [#989](https://github.com/request/request/pull/989) Added allowRedirect function. Should return true if redirect is allowed or false otherwise (@doronin) +- [#1025](https://github.com/request/request/pull/1025) [fixes #1023] Set self._ended to true once response has ended (@mridgway) +- [#1020](https://github.com/request/request/pull/1020) Add back removed debug metadata (@FredKSchott) +- [#1008](https://github.com/request/request/pull/1008) Moving to module instead of cutomer buffer concatenation. (@mikeal) +- [#770](https://github.com/request/request/pull/770) Added dependency badge for README file; (@timgluz, @mafintosh, @lalitkapoor, @stash, @bobyrizov) +- [#1016](https://github.com/request/request/pull/1016) toJSON no longer results in an infinite loop, returns simple objects (@FredKSchott) +- [#1018](https://github.com/request/request/pull/1018) Remove pre-0.4.4 HTTPS fix (@mmalecki) +- [#1006](https://github.com/request/request/pull/1006) Migrate to caseless, fixes #1001 (@mikeal) +- [#995](https://github.com/request/request/pull/995) Fix parsing array of objects (@sjonnet19) +- [#999](https://github.com/request/request/pull/999) Fix fallback for browserify for optional modules. (@eiriksm) +- [#996](https://github.com/request/request/pull/996) Wrong oauth signature when multiple same param keys exist [updated] (@bengl, @hyjin) + +### v2.40.0 (2014/08/06) +- [#992](https://github.com/request/request/pull/992) Fix security vulnerability. Update qs (@poeticninja) +- [#988](https://github.com/request/request/pull/988) “--” -> “—” (@upisfree) +- [#987](https://github.com/request/request/pull/987) Show optional modules as being loaded by the module that reqeusted them (@iarna) + +### v2.39.0 (2014/07/24) +- [#976](https://github.com/request/request/pull/976) Update README.md (@pvoznenko) + +### v2.38.0 (2014/07/22) +- [#952](https://github.com/request/request/pull/952) Adding support to client certificate with proxy use case (@ofirshaked) +- [#884](https://github.com/request/request/pull/884) Documented tough-cookie installation. (@wbyoung) +- [#935](https://github.com/request/request/pull/935) Correct repository url (@fritx) +- [#963](https://github.com/request/request/pull/963) Update changelog (@nylen) +- [#960](https://github.com/request/request/pull/960) Support gzip with encoding on node pre-v0.9.4 (@kevinoid) +- [#953](https://github.com/request/request/pull/953) Add async Content-Length computation when using form-data (@LoicMahieu) +- [#844](https://github.com/request/request/pull/844) Add support for HTTP[S]_PROXY environment variables. Fixes #595. (@jvmccarthy) +- [#946](https://github.com/request/request/pull/946) defaults: merge headers (@aj0strow) + +### v2.37.0 (2014/07/07) +- [#957](https://github.com/request/request/pull/957) Silence EventEmitter memory leak warning #311 (@watson) +- [#955](https://github.com/request/request/pull/955) check for content-length header before setting it in nextTick (@camilleanne) +- [#951](https://github.com/request/request/pull/951) Add support for gzip content decoding (@kevinoid) +- [#949](https://github.com/request/request/pull/949) Manually enter querystring in form option (@charlespwd) +- [#944](https://github.com/request/request/pull/944) Make request work with browserify (@eiriksm) +- [#943](https://github.com/request/request/pull/943) New mime module (@eiriksm) +- [#927](https://github.com/request/request/pull/927) Bump version of hawk dep. (@samccone) +- [#907](https://github.com/request/request/pull/907) append secureOptions to poolKey (@medovob) + +### v2.35.0 (2014/05/17) +- [#901](https://github.com/request/request/pull/901) Fixes #555 (@pigulla) +- [#897](https://github.com/request/request/pull/897) merge with default options (@vohof) +- [#891](https://github.com/request/request/pull/891) fixes 857 - options object is mutated by calling request (@lalitkapoor) +- [#869](https://github.com/request/request/pull/869) Pipefilter test (@tgohn) +- [#866](https://github.com/request/request/pull/866) Fix typo (@dandv) +- [#861](https://github.com/request/request/pull/861) Add support for RFC 6750 Bearer Tokens (@phedny) +- [#809](https://github.com/request/request/pull/809) upgrade tunnel-proxy to 0.4.0 (@ksato9700) +- [#850](https://github.com/request/request/pull/850) Fix word consistency in readme (@0xNobody) +- [#810](https://github.com/request/request/pull/810) add some exposition to mpu example in README.md (@mikermcneil) +- [#840](https://github.com/request/request/pull/840) improve error reporting for invalid protocols (@FND) +- [#821](https://github.com/request/request/pull/821) added secureOptions back (@nw) +- [#815](https://github.com/request/request/pull/815) Create changelog based on pull requests (@lalitkapoor) + +### v2.34.0 (2014/02/18) +- [#516](https://github.com/request/request/pull/516) UNIX Socket URL Support (@lyuzashi) +- [#801](https://github.com/request/request/pull/801) 794 ignore cookie parsing and domain errors (@lalitkapoor) +- [#802](https://github.com/request/request/pull/802) Added the Apache license to the package.json. (@keskival) +- [#793](https://github.com/request/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul) +- [#785](https://github.com/request/request/pull/785) Provide ability to override content-type when `json` option used (@vvo) +- [#781](https://github.com/request/request/pull/781) simpler isReadStream function (@joaojeronimo) + +### v2.32.0 (2014/01/16) +- [#767](https://github.com/request/request/pull/767) Use tough-cookie CookieJar sync API (@stash) +- [#764](https://github.com/request/request/pull/764) Case-insensitive authentication scheme (@bobyrizov) +- [#763](https://github.com/request/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash) +- [#744](https://github.com/request/request/pull/744) Use Cookie.parse (@lalitkapoor) +- [#757](https://github.com/request/request/pull/757) require aws-sign2 (@mafintosh) + +### v2.31.0 (2014/01/08) +- [#645](https://github.com/request/request/pull/645) update twitter api url to v1.1 (@mick) +- [#746](https://github.com/request/request/pull/746) README: Markdown code highlight (@weakish) +- [#745](https://github.com/request/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay) +- [#742](https://github.com/request/request/pull/742) Add note about JSON output body type (@iansltx) +- [#741](https://github.com/request/request/pull/741) README example is using old cookie jar api (@emkay) +- [#736](https://github.com/request/request/pull/736) Fix callback arguments documentation (@mmalecki) + +### v2.30.0 (2013/12/13) +- [#732](https://github.com/request/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium) +- [#730](https://github.com/request/request/pull/730) better HTTP DIGEST support (@dai-shi) +- [#728](https://github.com/request/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow) + +### v2.29.0 (2013/12/06) +- [#727](https://github.com/request/request/pull/727) fix requester bug (@jchris) + +### v2.28.0 (2013/12/04) +- [#724](https://github.com/request/request/pull/724) README.md: add custom HTTP Headers example. (@tcort) +- [#719](https://github.com/request/request/pull/719) Made a comment gender neutral. (@unsetbit) +- [#715](https://github.com/request/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub) +- [#710](https://github.com/request/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak) +- [#696](https://github.com/request/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin) +- [#694](https://github.com/request/request/pull/694) Typo in README (@VRMink) +- [#690](https://github.com/request/request/pull/690) Handle blank password in basic auth. (@diversario) +- [#682](https://github.com/request/request/pull/682) Optional dependencies (@Turbo87) +- [#683](https://github.com/request/request/pull/683) Travis CI support (@Turbo87) +- [#674](https://github.com/request/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren) +- [#666](https://github.com/request/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong) +- [#656](https://github.com/request/request/pull/656) Test case for #304. (@diversario) +- [#662](https://github.com/request/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar) +- [#659](https://github.com/request/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm) +- [#630](https://github.com/request/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl) + +### v2.27.0 (2013/08/15) +- [#619](https://github.com/request/request/pull/619) decouple things a bit (@joaojeronimo) + +### v2.26.0 (2013/08/07) +- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander) +- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker) + +### v2.24.0 (2013/07/23) +- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath) +- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK) +- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko) + +### v2.23.0 (2013/07/23) +- [#589](https://github.com/request/request/pull/589) Prevent setting headers after they are sent (@geek) +- [#587](https://github.com/request/request/pull/587) Global cookie jar disabled by default (@threepointone) +- [#544](https://github.com/request/request/pull/544) Update http-signature version. (@davidlehn) +- [#581](https://github.com/request/request/pull/581) Fix spelling of "ignoring." (@bigeasy) +- [#568](https://github.com/request/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette) +- [#564](https://github.com/request/request/pull/564) Fix redirections (@criloz) +- [#541](https://github.com/request/request/pull/541) The exported request function doesn't have an auth method (@tschaub) +- [#542](https://github.com/request/request/pull/542) Expose Request class (@regality) +- [#536](https://github.com/request/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando) +- [#532](https://github.com/request/request/pull/532) fix typo (@fredericosilva) +- [#497](https://github.com/request/request/pull/497) Added redirect event (@Cauldrath) +- [#503](https://github.com/request/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi) +- [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway421) +- [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka) +- [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway421) +- [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway421) +- [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun) +- [#510](https://github.com/request/request/pull/510) Add HTTP Signature support. (@davidlehn) +- [#502](https://github.com/request/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen) +- [#508](https://github.com/request/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs) +- [#512](https://github.com/request/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1) +- [#513](https://github.com/request/request/pull/513) add 'localAddress' support (@yyfrankyy) +- [#498](https://github.com/request/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins) +- [#490](https://github.com/request/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas) +- [#479](https://github.com/request/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH) +- [#475](https://github.com/request/request/pull/475) Use `unescape` from `querystring` (@shimaore) +- [#473](https://github.com/request/request/pull/473) V0.10 compat (@isaacs) +- [#471](https://github.com/request/request/pull/471) Using querystring library from visionmedia (@kbackowski) +- [#461](https://github.com/request/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin) +- [#460](https://github.com/request/request/pull/460) hawk 0.10.0 (@hueniverse) +- [#462](https://github.com/request/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya) +- [#456](https://github.com/request/request/pull/456) hawk 0.9.0 (@hueniverse) +- [#429](https://github.com/request/request/pull/429) Copy options before adding callback. (@nrn, @nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) +- [#454](https://github.com/request/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh) +- [#310](https://github.com/request/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann, @isaacs, @mscdex) +- [#413](https://github.com/request/request/pull/413) rename googledoodle.png to .jpg (@nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) +- [#448](https://github.com/request/request/pull/448) Convenience method for PATCH (@mloar) +- [#444](https://github.com/request/request/pull/444) protect against double callbacks on error path (@spollack) +- [#433](https://github.com/request/request/pull/433) Added support for HTTPS cert & key (@mmalecki) +- [#430](https://github.com/request/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf) +- [#415](https://github.com/request/request/pull/415) Fixed a typo. (@jerem) +- [#338](https://github.com/request/request/pull/338) Add more auth options, including digest support (@nylen) +- [#403](https://github.com/request/request/pull/403) Optimize environment lookup to happen once only (@mmalecki) +- [#398](https://github.com/request/request/pull/398) Add more reporting to tests (@mmalecki) +- [#388](https://github.com/request/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23) +- [#381](https://github.com/request/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro) +- [#380](https://github.com/request/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-) +- [#376](https://github.com/request/request/pull/376) Headers lost on redirect (@kapetan) +- [#375](https://github.com/request/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock) +- [#374](https://github.com/request/request/pull/374) Correct Host header for proxy tunnel CONNECT (@youurayy) +- [#370](https://github.com/request/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge) +- [#369](https://github.com/request/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge) +- [#344](https://github.com/request/request/pull/344) Make AWS auth signing find headers correctly (@nlf) +- [#363](https://github.com/request/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall) +- [#362](https://github.com/request/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall) +- [#361](https://github.com/request/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins) +- [#360](https://github.com/request/request/pull/360) Delete self._form along with everything else on redirect (@jgautier) +- [#355](https://github.com/request/request/pull/355) stop sending erroneous headers on redirected requests (@azylman) +- [#332](https://github.com/request/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup) +- [#343](https://github.com/request/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf) +- [#320](https://github.com/request/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris) +- [#322](https://github.com/request/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo) +- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@strk) +- [#318](https://github.com/request/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs) +- [#317](https://github.com/request/request/pull/317) Workaround for #313 (@isaacs) +- [#293](https://github.com/request/request/pull/293) Allow parser errors to bubble up to request (@mscdex) +- [#290](https://github.com/request/request/pull/290) A test for #289 (@isaacs) +- [#280](https://github.com/request/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1) +- [#207](https://github.com/request/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs) +- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas) +- [#272](https://github.com/request/request/pull/272) Boundary begins with CRLF? (@elspoono, @timshadel, @naholyr, @nanodocumet, @TehShrike) +- [#284](https://github.com/request/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry) +- [#241](https://github.com/request/request/pull/241) Composability updates suggested by issue #239 (@polotek) +- [#282](https://github.com/request/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock) +- [#279](https://github.com/request/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin) +- [#273](https://github.com/request/request/pull/273) Pipe back pressure issue (@mafintosh) +- [#268](https://github.com/request/request/pull/268) I'm not OCD seriously (@TehShrike) +- [#263](https://github.com/request/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet) +- [#265](https://github.com/request/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr) +- [#262](https://github.com/request/request/pull/262) JSON test should check for equality (@timshadel) +- [#261](https://github.com/request/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel) +- [#249](https://github.com/request/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges, @polotek, @zephrax, @jeromegn) +- [#255](https://github.com/request/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1) +- [#260](https://github.com/request/request/pull/260) fixed just another leak of 'i' (@sreuter) +- [#246](https://github.com/request/request/pull/246) Fixing the set-cookie header (@jeromegn) +- [#243](https://github.com/request/request/pull/243) Dynamic boundary (@zephrax) +- [#240](https://github.com/request/request/pull/240) don't error when null is passed for options (@polotek) +- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso) +- [#224](https://github.com/request/request/pull/224) Multipart content-type change (@janjongboom) +- [#217](https://github.com/request/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup) +- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@milewise) +- [#199](https://github.com/request/request/pull/199) Tunnel (@isaacs) +- [#198](https://github.com/request/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs) +- [#197](https://github.com/request/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs) +- [#193](https://github.com/request/request/pull/193) Fixes GH-119 (@goatslacker) +- [#188](https://github.com/request/request/pull/188) Add abort support to the returned request (@itay) +- [#176](https://github.com/request/request/pull/176) Querystring option (@csainty) +- [#182](https://github.com/request/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63) +- [#180](https://github.com/request/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63) +- [#179](https://github.com/request/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack) +- [#177](https://github.com/request/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63) +- [#170](https://github.com/request/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes) +- [#168](https://github.com/request/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby) +- [#161](https://github.com/request/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou) +- [#162](https://github.com/request/request/pull/162) Fix issue #159 (@dpetukhov) +- [#90](https://github.com/request/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes) +- [#148](https://github.com/request/request/pull/148) Retry Agent (@thejh) +- [#146](https://github.com/request/request/pull/146) Multipart should respect content-type if previously set (@apeace) +- [#144](https://github.com/request/request/pull/144) added "form" option to readme (@petejkim) +- [#133](https://github.com/request/request/pull/133) Fixed cookies parsing (@afanasy) +- [#135](https://github.com/request/request/pull/135) host vs hostname (@iangreenleaf) +- [#132](https://github.com/request/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson) +- [#112](https://github.com/request/request/pull/112) Support using a custom http-like module (@jhs) +- [#104](https://github.com/request/request/pull/104) Cookie handling contains bugs (@janjongboom) +- [#121](https://github.com/request/request/pull/121) Another patch for cookie handling regression (@jhurliman) +- [#117](https://github.com/request/request/pull/117) Remove the global `i` (@3rd-Eden) +- [#110](https://github.com/request/request/pull/110) Update to Iris Couch URL (@jhs) +- [#86](https://github.com/request/request/pull/86) Can't post binary to multipart requests (@kkaefer) +- [#105](https://github.com/request/request/pull/105) added test for proxy option. (@dominictarr) +- [#102](https://github.com/request/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex) +- [#97](https://github.com/request/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs) +- [#96](https://github.com/request/request/pull/96) Authless parsed url host support (@isaacs) +- [#81](https://github.com/request/request/pull/81) Enhance redirect handling (@danmactough) +- [#78](https://github.com/request/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs) +- [#76](https://github.com/request/request/pull/76) Bug when a request fails and a timeout is set (@Marsup) +- [#70](https://github.com/request/request/pull/70) add test script to package.json (@isaacs, @aheckmann) +- [#73](https://github.com/request/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs) +- [#69](https://github.com/request/request/pull/69) Flatten chunked requests properly (@isaacs) +- [#67](https://github.com/request/request/pull/67) fixed global variable leaks (@aheckmann) +- [#66](https://github.com/request/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod) +- [#53](https://github.com/request/request/pull/53) Parse json: Issue #51 (@benatkin) +- [#45](https://github.com/request/request/pull/45) Added timeout option (@mbrevoort) +- [#35](https://github.com/request/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli) +- [#31](https://github.com/request/request/pull/31) Error on piping a request to a destination (@tobowers) \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md new file mode 100644 index 00000000000..8aa6999acd8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md @@ -0,0 +1,81 @@ + +# Contributing to Request + +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: + +The following is a set of guidelines for contributing to Request and its packages, which are hosted in the [Request Organization](https://github.com/request) on GitHub. +These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request. + + +## Submitting an Issue + +1. Provide a small self **sufficient** code example to **reproduce** the issue. +2. Run your test code using [request-debug](https://github.com/request/request-debug) and copy/paste the results inside the issue. +3. You should **always** use fenced code blocks when submitting code examples or any other formatted output: +
+  ```js
+  put your javascript code here
+  ```
+
+  ```
+  put any other formatted output here,
+  like for example the one returned from using request-debug
+  ```
+  
+ +If the problem cannot be reliably reproduced, the issue will be marked as `Not enough info (see CONTRIBUTING.md)`. + +If the problem is not related to request the issue will be marked as `Help (please use Stackoverflow)`. + + +## Submitting a Pull Request + +1. In almost all of the cases your PR **needs tests**. Make sure you have any. +2. Run `npm test` locally. Fix any errors before pushing to GitHub. +3. After submitting the PR a build will be triggered on TravisCI. Wait for it to ends and make sure all jobs are passing. + + +----------------------------------------- + + +## Becoming a Contributor + +Individuals making significant and valuable contributions are given +commit-access to the project to contribute as they see fit. This project is +more like an open wiki than a standard guarded open source project. + + +## Rules + +There are a few basic ground-rules for contributors: + +1. **No `--force` pushes** or modifying the Git history in any way. +1. **Non-master branches** ought to be used for ongoing work. +1. **Any** change should be added through Pull Request. +1. **External API changes and significant modifications** ought to be subject + to an **internal pull-request** to solicit feedback from other contributors. +1. Internal pull-requests to solicit feedback are *encouraged* for any other + non-trivial contribution but left to the discretion of the contributor. +1. For significant changes wait a full 24 hours before merging so that active + contributors who are distributed throughout the world have a chance to weigh + in. +1. Contributors should attempt to adhere to the prevailing code-style. +1. Run `npm test` locally before submitting your PR, to catch any easy to miss + style & testing issues. To diagnose test failures, there are two ways to + run a single test file: + - `node_modules/.bin/taper tests/test-file.js` - run using the default + [`taper`](https://github.com/nylen/taper) test reporter. + - `node tests/test-file.js` - view the raw + [tap](https://testanything.org/) output. + + +## Releases + +Declaring formal releases remains the prerogative of the project maintainer. + + +## Changes to this arrangement + +This is an experiment and feedback is welcome! This document may also be +subject to pull-requests or changes by contributors where you believe you have +something valuable to add or change. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE new file mode 100644 index 00000000000..a4a9aee0c2f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md new file mode 100644 index 00000000000..81ecac50999 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md @@ -0,0 +1,1097 @@ + +# Request - Simplified HTTP client + +[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/) + +[![Build status](https://img.shields.io/travis/request/request/master.svg?style=flat-square)](https://travis-ci.org/request/request) +[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master) +[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request) +[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request) +[![Known Vulnerabilities](https://snyk.io/test/npm/request/badge.svg?style=flat-square)](https://snyk.io/test/npm/request) +[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge) + + +## Super simple to use + +Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. + +```js +var request = require('request'); +request('http://www.google.com', function (error, response, body) { + if (!error && response.statusCode == 200) { + console.log(body) // Show the HTML for the Google homepage. + } +}) +``` + + +## Table of contents + +- [Streaming](#streaming) +- [Forms](#forms) +- [HTTP Authentication](#http-authentication) +- [Custom HTTP Headers](#custom-http-headers) +- [OAuth Signing](#oauth-signing) +- [Proxies](#proxies) +- [Unix Domain Sockets](#unix-domain-sockets) +- [TLS/SSL Protocol](#tlsssl-protocol) +- [Support for HAR 1.2](#support-for-har-12) +- [**All Available Options**](#requestoptions-callback) + +Request also offers [convenience methods](#convenience-methods) like +`request.defaults` and `request.post`, and there are +lots of [usage examples](#examples) and several +[debugging techniques](#debugging). + + +--- + + +## Streaming + +You can stream any response to a file stream. + +```js +request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) +``` + +You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one). + +```js +fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json')) +``` + +Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. + +```js +request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png')) +``` + +Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage). + +```js +request + .get('http://google.com/img.png') + .on('response', function(response) { + console.log(response.statusCode) // 200 + console.log(response.headers['content-type']) // 'image/png' + }) + .pipe(request.put('http://mysite.com/img.png')) +``` + +To easily handle errors when streaming requests, listen to the `error` event before piping: + +```js +request + .get('http://mysite.com/doodle.png') + .on('error', function(err) { + console.log(err) + }) + .pipe(fs.createWriteStream('doodle.png')) +``` + +Now let’s get fancy. + +```js +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + if (req.method === 'PUT') { + req.pipe(request.put('http://mysite.com/doodle.png')) + } else if (req.method === 'GET' || req.method === 'HEAD') { + request.get('http://mysite.com/doodle.png').pipe(resp) + } + } +}) +``` + +You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: + +```js +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + var x = request('http://mysite.com/doodle.png') + req.pipe(x) + x.pipe(resp) + } +}) +``` + +And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :) + +```js +req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) +``` + +Also, none of this new functionality conflicts with requests previous features, it just expands them. + +```js +var r = request.defaults({'proxy':'http://localproxy.com'}) + +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + r.get('http://google.com/doodle.png').pipe(resp) + } +}) +``` + +You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. + +[back to top](#table-of-contents) + + +--- + + +## Forms + +`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. + + +#### application/x-www-form-urlencoded (URL-Encoded Forms) + +URL-encoded forms are simple. + +```js +request.post('http://service.com/upload', {form:{key:'value'}}) +// or +request.post('http://service.com/upload').form({key:'value'}) +// or +request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ }) +``` + + +#### multipart/form-data (Multipart Form Uploads) + +For `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option. + + +```js +var formData = { + // Pass a simple key-value pair + my_field: 'my_value', + // Pass data via Buffers + my_buffer: new Buffer([1, 2, 3]), + // Pass data via Streams + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), + // Pass multiple values /w an Array + attachments: [ + fs.createReadStream(__dirname + '/attachment1.jpg'), + fs.createReadStream(__dirname + '/attachment2.jpg') + ], + // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS} + // Use case: for some types of streams, you'll need to provide "file"-related information manually. + // See the `form-data` README for more information about options: https://github.com/form-data/form-data + custom_file: { + value: fs.createReadStream('/dev/urandom'), + options: { + filename: 'topsecret.jpg', + contentType: 'image/jpg' + } + } +}; +request.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.) + +```js +// NOTE: Advanced use-case, for normal use see 'formData' usage above +var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...}) +var form = r.form(); +form.append('my_field', 'my_value'); +form.append('my_buffer', new Buffer([1, 2, 3])); +form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'}); +``` +See the [form-data README](https://github.com/form-data/form-data) for more information & examples. + + +#### multipart/related + +Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options. + +```js + request({ + method: 'PUT', + preambleCRLF: true, + postambleCRLF: true, + uri: 'http://service.com/upload', + multipart: [ + { + 'content-type': 'application/json', + body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + }, + { body: 'I am an attachment' }, + { body: fs.createReadStream('image.png') } + ], + // alternatively pass an object containing additional options + multipart: { + chunked: false, + data: [ + { + 'content-type': 'application/json', + body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + }, + { body: 'I am an attachment' } + ] + } + }, + function (error, response, body) { + if (error) { + return console.error('upload failed:', error); + } + console.log('Upload successful! Server responded with:', body); + }) +``` + +[back to top](#table-of-contents) + + +--- + + +## HTTP Authentication + +```js +request.get('http://some.server.com/').auth('username', 'password', false); +// or +request.get('http://some.server.com/', { + 'auth': { + 'user': 'username', + 'pass': 'password', + 'sendImmediately': false + } +}); +// or +request.get('http://some.server.com/').auth(null, null, true, 'bearerToken'); +// or +request.get('http://some.server.com/', { + 'auth': { + 'bearer': 'bearerToken' + } +}); +``` + +If passed as an option, `auth` should be a hash containing values: + +- `user` || `username` +- `pass` || `password` +- `sendImmediately` (optional) +- `bearer` (optional) + +The method form takes parameters +`auth(username, password, sendImmediately, bearer)`. + +`sendImmediately` defaults to `true`, which causes a basic or bearer +authentication header to be sent. If `sendImmediately` is `false`, then +`request` will retry with a proper authentication header after receiving a +`401` response from the server (which must contain a `WWW-Authenticate` header +indicating the required authentication method). + +Note that you can also specify basic authentication using the URL itself, as +detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the +`user:password` before the host with an `@` sign: + +```js +var username = 'username', + password = 'password', + url = 'http://' + username + ':' + password + '@some.server.com'; + +request({url: url}, function (error, response, body) { + // Do more stuff with 'body' here +}); +``` + +Digest authentication is supported, but it only works with `sendImmediately` +set to `false`; otherwise `request` will send basic authentication on the +initial request, which will probably cause the request to fail. + +Bearer authentication is supported, and is activated when the `bearer` value is +available. The value may be either a `String` or a `Function` returning a +`String`. Using a function to supply the bearer token is particularly useful if +used in conjunction with `defaults` to allow a single function to supply the +last known token at the time of sending a request, or to compute one on the fly. + +[back to top](#table-of-contents) + + +--- + + +## Custom HTTP Headers + +HTTP Headers, such as `User-Agent`, can be set in the `options` object. +In the example below, we call the github API to find out the number +of stars and forks for the request repository. This requires a +custom `User-Agent` header as well as https. + +```js +var request = require('request'); + +var options = { + url: 'https://api.github.com/repos/request/request', + headers: { + 'User-Agent': 'request' + } +}; + +function callback(error, response, body) { + if (!error && response.statusCode == 200) { + var info = JSON.parse(body); + console.log(info.stargazers_count + " Stars"); + console.log(info.forks_count + " Forks"); + } +} + +request(options, callback); +``` + +[back to top](#table-of-contents) + + +--- + + +## OAuth Signing + +[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The +default signing algorithm is +[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2): + +```js +// OAuth1.0 - 3-legged server side flow (Twitter example) +// step 1 +var qs = require('querystring') + , oauth = + { callback: 'http://mysite.com/callback/' + , consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + } + , url = 'https://api.twitter.com/oauth/request_token' + ; +request.post({url:url, oauth:oauth}, function (e, r, body) { + // Ideally, you would take the body in the response + // and construct a URL that a user clicks on (like a sign in button). + // The verifier is only available in the response after a user has + // verified with twitter that they are authorizing your app. + + // step 2 + var req_data = qs.parse(body) + var uri = 'https://api.twitter.com/oauth/authenticate' + + '?' + qs.stringify({oauth_token: req_data.oauth_token}) + // redirect the user to the authorize uri + + // step 3 + // after the user is redirected back to your server + var auth_data = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: auth_data.oauth_token + , token_secret: req_data.oauth_token_secret + , verifier: auth_data.oauth_verifier + } + , url = 'https://api.twitter.com/oauth/access_token' + ; + request.post({url:url, oauth:oauth}, function (e, r, body) { + // ready to make signed requests on behalf of the user + var perm_data = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: perm_data.oauth_token + , token_secret: perm_data.oauth_token_secret + } + , url = 'https://api.twitter.com/1.1/users/show.json' + , qs = + { screen_name: perm_data.screen_name + , user_id: perm_data.user_id + } + ; + request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) { + console.log(user) + }) + }) +}) +``` + +For [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make +the following changes to the OAuth options object: +* Pass `signature_method : 'RSA-SHA1'` +* Instead of `consumer_secret`, specify a `private_key` string in + [PEM format](http://how2ssl.com/articles/working_with_pem_files/) + +For [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make +the following changes to the OAuth options object: +* Pass `signature_method : 'PLAINTEXT'` + +To send OAuth parameters via query params or in a post body as described in The +[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param) +section of the oauth1 spec: +* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth + options object. +* `transport_method` defaults to `'header'` + +To use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either +* Manually generate the body hash and pass it as a string `body_hash: '...'` +* Automatically generate the body hash by passing `body_hash: true` + +[back to top](#table-of-contents) + + +--- + + +## Proxies + +If you specify a `proxy` option, then the request (and any subsequent +redirects) will be sent via a connection to the proxy server. + +If your endpoint is an `https` url, and you are using a proxy, then +request will send a `CONNECT` request to the proxy server *first*, and +then use the supplied connection to connect to the endpoint. + +That is, first it will make a request like: + +``` +HTTP/1.1 CONNECT endpoint-server.com:80 +Host: proxy-server.com +User-Agent: whatever user agent you specify +``` + +and then the proxy server make a TCP connection to `endpoint-server` +on port `80`, and return a response that looks like: + +``` +HTTP/1.1 200 OK +``` + +At this point, the connection is left open, and the client is +communicating directly with the `endpoint-server.com` machine. + +See [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel) +for more information. + +By default, when proxying `http` traffic, request will simply make a +standard proxied `http` request. This is done by making the `url` +section of the initial line of the request a fully qualified url to +the endpoint. + +For example, it will make a single request that looks like: + +``` +HTTP/1.1 GET http://endpoint-server.com/some-url +Host: proxy-server.com +Other-Headers: all go here + +request body or whatever +``` + +Because a pure "http over http" tunnel offers no additional security +or other features, it is generally simpler to go with a +straightforward HTTP proxy in this case. However, if you would like +to force a tunneling proxy, you may set the `tunnel` option to `true`. + +You can also make a standard proxied `http` request by explicitly setting +`tunnel : false`, but **note that this will allow the proxy to see the traffic +to/from the destination server**. + +If you are using a tunneling proxy, you may set the +`proxyHeaderWhiteList` to share certain headers with the proxy. + +You can also set the `proxyHeaderExclusiveList` to share certain +headers only with the proxy and not with destination host. + +By default, this set is: + +``` +accept +accept-charset +accept-encoding +accept-language +accept-ranges +cache-control +content-encoding +content-language +content-length +content-location +content-md5 +content-range +content-type +connection +date +expect +max-forwards +pragma +proxy-authorization +referer +te +transfer-encoding +user-agent +via +``` + +Note that, when using a tunneling proxy, the `proxy-authorization` +header and any headers from custom `proxyHeaderExclusiveList` are +*never* sent to the endpoint server, but only to the proxy server. + + +### Controlling proxy behaviour using environment variables + +The following environment variables are respected by `request`: + + * `HTTP_PROXY` / `http_proxy` + * `HTTPS_PROXY` / `https_proxy` + * `NO_PROXY` / `no_proxy` + +When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request. + +`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables. + +Here's some examples of valid `no_proxy` values: + + * `google.com` - don't proxy HTTP/HTTPS requests to Google. + * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google. + * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo! + * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether. + +[back to top](#table-of-contents) + + +--- + + +## UNIX Domain Sockets + +`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme: + +```js +/* Pattern */ 'http://unix:SOCKET:PATH' +/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path') +``` + +Note: The `SOCKET` path is assumed to be absolute to the root of the host file system. + +[back to top](#table-of-contents) + + +--- + + +## TLS/SSL Protocol + +TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be +set directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent). + +```js +var fs = require('fs') + , path = require('path') + , certFile = path.resolve(__dirname, 'ssl/client.crt') + , keyFile = path.resolve(__dirname, 'ssl/client.key') + , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem') + , request = require('request'); + +var options = { + url: 'https://api.some-server.com/', + cert: fs.readFileSync(certFile), + key: fs.readFileSync(keyFile), + passphrase: 'password', + ca: fs.readFileSync(caFile) +}; + +request.get(options); +``` + +### Using `options.agentOptions` + +In the example below, we call an API requires client side SSL certificate +(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol: + +```js +var fs = require('fs') + , path = require('path') + , certFile = path.resolve(__dirname, 'ssl/client.crt') + , keyFile = path.resolve(__dirname, 'ssl/client.key') + , request = require('request'); + +var options = { + url: 'https://api.some-server.com/', + agentOptions: { + cert: fs.readFileSync(certFile), + key: fs.readFileSync(keyFile), + // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format: + // pfx: fs.readFileSync(pfxFilePath), + passphrase: 'password', + securityOptions: 'SSL_OP_NO_SSLv3' + } +}; + +request.get(options); +``` + +It is able to force using SSLv3 only by specifying `secureProtocol`: + +```js +request.get({ + url: 'https://api.some-server.com/', + agentOptions: { + secureProtocol: 'SSLv3_method' + } +}); +``` + +It is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs). +This can be useful, for example, when using self-signed certificates. +To require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`. +The certificate the domain presents must be signed by the root certificate specified: + +```js +request.get({ + url: 'https://api.some-server.com/', + agentOptions: { + ca: fs.readFileSync('ca.cert.pem') + } +}); +``` + +[back to top](#table-of-contents) + + +--- + +## Support for HAR 1.2 + +The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`. + +a validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching. + +```js + var request = require('request') + request({ + // will be ignored + method: 'GET', + uri: 'http://www.google.com', + + // HTTP Archive Request Object + har: { + url: 'http://www.mockbin.com/har', + method: 'POST', + headers: [ + { + name: 'content-type', + value: 'application/x-www-form-urlencoded' + } + ], + postData: { + mimeType: 'application/x-www-form-urlencoded', + params: [ + { + name: 'foo', + value: 'bar' + }, + { + name: 'hello', + value: 'world' + } + ] + } + } + }) + + // a POST request will be sent to http://www.mockbin.com + // with body an application/x-www-form-urlencoded body: + // foo=bar&hello=world +``` + +[back to top](#table-of-contents) + + +--- + +## request(options, callback) + +The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. + +- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` +- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string. +- `method` - http method (default: `"GET"`) +- `headers` - http headers (default: `{}`) + +--- + +- `qs` - object containing querystring values to be appended to the `uri` +- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}` +- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat` +- `useQuerystring` - If true, use `querystring` to stringify and parse + querystrings, otherwise use `qs` (default: `false`). Set this option to + `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the + default `foo[0]=bar&foo[1]=baz`. + +--- + +- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object. +- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above. +- `formData` - Data to pass for a `multipart/form-data` request. See + [Forms](#forms) section above. +- `multipart` - array of objects which contain their own headers and `body` + attributes. Sends a `multipart/related` request. See [Forms](#forms) section + above. + - Alternatively you can pass in an object `{chunked: false, data: []}` where + `chunked` is used to specify whether the request is sent in + [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) + In non-chunked requests, data items with body streams are not allowed. +- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request. +- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request. +- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. +- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body. +- `jsonReplacer` - a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that will be passed to `JSON.stringify()` when stringifying a JSON request body. + +--- + +- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above. +- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. +- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). +- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first. +- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. + +--- + +- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise. +- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) +- `maxRedirects` - the maximum number of redirects to follow (default: `10`) +- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain. + +--- + +- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) +- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below. +- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) + +--- + +- `agent` - `http(s).Agent` instance to use +- `agentClass` - alternatively specify your agent's class name +- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions). +- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+ +- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified. + - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`). + - Note that if you are sending multiple requests in a loop and creating + multiple new `pool` objects, `maxSockets` will not work as intended. To + work around this, either use [`request.defaults`](#requestdefaultsoptions) + with your pool options or create the pool object with the `maxSockets` + property outside of the loop. +- `timeout` - Integer containing the number of milliseconds to wait for a +server to send response headers (and start the response body) before aborting +the request. Note that if the underlying TCP connection cannot be established, +the OS-wide TCP connection timeout will overrule the `timeout` option ([the +default in Linux can be anywhere from 20-120 seconds][linux-timeout]). + +[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout + +--- + +- `localAddress` - Local interface to bind for network connections. +- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) +- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. +- `tunnel` - controls the behavior of + [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling) + as follows: + - `undefined` (default) - `true` if the destination is `https`, `false` otherwise + - `true` - always tunnel to the destination by making a `CONNECT` request to + the proxy + - `false` - request the destination as a `GET` request. +- `proxyHeaderWhiteList` - A whitelist of headers to send to a + tunneling proxy. +- `proxyHeaderExclusiveList` - A whitelist of headers to send + exclusively to a tunneling proxy and not to destination. + +--- + +- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property. +- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)* +- `callback` - alternatively pass the request's callback in the options object + +The callback argument gets 3 arguments: + +1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) +2. An [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object +3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) + +[back to top](#table-of-contents) + + +--- + +## Convenience methods + +There are also shorthand methods for different HTTP METHODs and some other conveniences. + + +### request.defaults(options) + +This method **returns a wrapper** around the normal request API that defaults +to whatever options you pass to it. + +**Note:** `request.defaults()` **does not** modify the global request API; +instead, it **returns a wrapper** that has your default settings applied to it. + +**Note:** You can call `.defaults()` on the wrapper that is returned from +`request.defaults` to add/override defaults that were previously defaulted. + +For example: +```js +//requests using baseRequest() will set the 'x-token' header +var baseRequest = request.defaults({ + headers: {'x-token': 'my-token'} +}) + +//requests using specialRequest() will include the 'x-token' header set in +//baseRequest and will also include the 'special' header +var specialRequest = baseRequest.defaults({ + headers: {special: 'special value'} +}) +``` + +### request.put + +Same as `request()`, but defaults to `method: "PUT"`. + +```js +request.put(url) +``` + +### request.patch + +Same as `request()`, but defaults to `method: "PATCH"`. + +```js +request.patch(url) +``` + +### request.post + +Same as `request()`, but defaults to `method: "POST"`. + +```js +request.post(url) +``` + +### request.head + +Same as `request()`, but defaults to `method: "HEAD"`. + +```js +request.head(url) +``` + +### request.del / request.delete + +Same as `request()`, but defaults to `method: "DELETE"`. + +```js +request.del(url) +request.delete(url) +``` + +### request.get + +Same as `request()` (for uniformity). + +```js +request.get(url) +``` +### request.cookie + +Function that creates a new cookie. + +```js +request.cookie('key1=value1') +``` +### request.jar() + +Function that creates a new cookie jar. + +```js +request.jar() +``` + +[back to top](#table-of-contents) + + +--- + + +## Debugging + +There are at least three ways to debug the operation of `request`: + +1. Launch the node process like `NODE_DEBUG=request node script.js` + (`lib,request,otherlib` works too). + +2. Set `require('request').debug = true` at any time (this does the same thing + as #1). + +3. Use the [request-debug module](https://github.com/request/request-debug) to + view request and response headers and bodies. + +[back to top](#table-of-contents) + + +--- + +## Timeouts + +Most requests to external servers should have a timeout attached, in case the +server is not responding in a timely manner. Without a timeout, your code may +have a socket open/consume resources for minutes or more. + +There are two main types of timeouts: **connection timeouts** and **read +timeouts**. A connect timeout occurs if the timeout is hit while your client is +attempting to establish a connection to a remote machine (corresponding to the +[connect() call][connect] on the socket). A read timeout occurs any time the +server is too slow to send back a part of the response. + +These two situations have widely different implications for what went wrong +with the request, so it's useful to be able to distinguish them. You can detect +timeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you +can detect whether the timeout was a connection timeout by checking if the +`err.connect` property is set to `true`. + +```js +request.get('http://10.255.255.1', {timeout: 1500}, function(err) { + console.log(err.code === 'ETIMEDOUT'); + // Set to `true` if the timeout was a connection timeout, `false` or + // `undefined` otherwise. + console.log(err.connect === true); + process.exit(0); +}); +``` + +[connect]: http://linux.die.net/man/2/connect + +## Examples: + +```js + var request = require('request') + , rand = Math.floor(Math.random()*100000000).toString() + ; + request( + { method: 'PUT' + , uri: 'http://mikeal.iriscouch.com/testjs/' + rand + , multipart: + [ { 'content-type': 'application/json' + , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + } + , { body: 'I am an attachment' } + ] + } + , function (error, response, body) { + if(response.statusCode == 201){ + console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand) + } else { + console.log('error: '+ response.statusCode) + console.log(body) + } + } + ) +``` + +For backwards-compatibility, response compression is not supported by default. +To accept gzip-compressed responses, set the `gzip` option to `true`. Note +that the body data passed through `request` is automatically decompressed +while the response object is unmodified and will contain compressed data if +the server sent a compressed response. + +```js + var request = require('request') + request( + { method: 'GET' + , uri: 'http://www.google.com' + , gzip: true + } + , function (error, response, body) { + // body is the decompressed response body + console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity')) + console.log('the decoded data is: ' + body) + } + ).on('data', function(data) { + // decompressed data as it is received + console.log('decoded chunk: ' + data) + }) + .on('response', function(response) { + // unmodified http.IncomingMessage object + response.on('data', function(data) { + // compressed data as it is received + console.log('received ' + data.length + ' bytes of compressed data') + }) + }) +``` + +Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). + +```js +var request = request.defaults({jar: true}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` + +To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) + +```js +var j = request.jar() +var request = request.defaults({jar:j}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` + +OR + +```js +var j = request.jar(); +var cookie = request.cookie('key1=value1'); +var url = 'http://www.google.com'; +j.setCookie(cookie, url); +request({url: url, jar: j}, function () { + request('http://images.google.com') +}) +``` + +To use a custom cookie store (such as a +[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore) +which supports saving to and restoring from JSON files), pass it as a parameter +to `request.jar()`: + +```js +var FileCookieStore = require('tough-cookie-filestore'); +// NOTE - currently the 'cookies.json' file must already exist! +var j = request.jar(new FileCookieStore('cookies.json')); +request = request.defaults({ jar : j }) +request('http://www.google.com', function() { + request('http://images.google.com') +}) +``` + +The cookie store must be a +[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie) +store and it must support synchronous operations; see the +[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api) +for details. + +To inspect your cookie jar after a request: + +```js +var j = request.jar() +request({url: 'http://www.google.com', jar: j}, function () { + var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..." + var cookies = j.getCookies(url); + // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...] +}) +``` + +[back to top](#table-of-contents) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml new file mode 100644 index 00000000000..acd3f33ceb5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml @@ -0,0 +1,2 @@ + +comment: false diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js new file mode 100755 index 00000000000..911a90dbb5a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js @@ -0,0 +1,157 @@ +// Copyright 2010-2012 Mikeal Rogers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict' + +var extend = require('extend') + , cookies = require('./lib/cookies') + , helpers = require('./lib/helpers') + +var isFunction = helpers.isFunction + , paramsHaveRequestBody = helpers.paramsHaveRequestBody + + +// organize params for patch, post, put, head, del +function initParams(uri, options, callback) { + if (typeof options === 'function') { + callback = options + } + + var params = {} + if (typeof options === 'object') { + extend(params, options, {uri: uri}) + } else if (typeof uri === 'string') { + extend(params, {uri: uri}) + } else { + extend(params, uri) + } + + params.callback = callback || params.callback + return params +} + +function request (uri, options, callback) { + if (typeof uri === 'undefined') { + throw new Error('undefined is not a valid uri or options object.') + } + + var params = initParams(uri, options, callback) + + if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { + throw new Error('HTTP HEAD requests MUST NOT include a request body.') + } + + return new request.Request(params) +} + +function verbFunc (verb) { + var method = verb.toUpperCase() + return function (uri, options, callback) { + var params = initParams(uri, options, callback) + params.method = method + return request(params, params.callback) + } +} + +// define like this to please codeintel/intellisense IDEs +request.get = verbFunc('get') +request.head = verbFunc('head') +request.post = verbFunc('post') +request.put = verbFunc('put') +request.patch = verbFunc('patch') +request.del = verbFunc('delete') +request['delete'] = verbFunc('delete') + +request.jar = function (store) { + return cookies.jar(store) +} + +request.cookie = function (str) { + return cookies.parse(str) +} + +function wrapRequestMethod (method, options, requester, verb) { + + return function (uri, opts, callback) { + var params = initParams(uri, opts, callback) + + var target = {} + extend(true, target, options, params) + + target.pool = params.pool || options.pool + + if (verb) { + target.method = verb.toUpperCase() + } + + if (isFunction(requester)) { + method = requester + } + + return method(target, target.callback) + } +} + +request.defaults = function (options, requester) { + var self = this + + options = options || {} + + if (typeof options === 'function') { + requester = options + options = {} + } + + var defaults = wrapRequestMethod(self, options, requester) + + var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] + verbs.forEach(function(verb) { + defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) + }) + + defaults.cookie = wrapRequestMethod(self.cookie, options, requester) + defaults.jar = self.jar + defaults.defaults = self.defaults + return defaults +} + +request.forever = function (agentOptions, optionsArg) { + var options = {} + if (optionsArg) { + extend(options, optionsArg) + } + if (agentOptions) { + options.agentOptions = agentOptions + } + + options.forever = true + return request.defaults(options) +} + +// Exports + +module.exports = request +request.Request = require('./request') +request.initParams = initParams + +// Backwards compatibility for request.debug +Object.defineProperty(request, 'debug', { + enumerable : true, + get : function() { + return request.Request.debug + }, + set : function(debug) { + request.Request.debug = debug + } +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js new file mode 100644 index 00000000000..1cb695216f6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js @@ -0,0 +1,168 @@ +'use strict' + +var caseless = require('caseless') + , uuid = require('node-uuid') + , helpers = require('./helpers') + +var md5 = helpers.md5 + , toBase64 = helpers.toBase64 + + +function Auth (request) { + // define all public properties here + this.request = request + this.hasAuth = false + this.sentAuth = false + this.bearerToken = null + this.user = null + this.pass = null +} + +Auth.prototype.basic = function (user, pass, sendImmediately) { + var self = this + if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { + self.request.emit('error', new Error('auth() received invalid user or password')) + } + self.user = user + self.pass = pass + self.hasAuth = true + var header = user + ':' + (pass || '') + if (sendImmediately || typeof sendImmediately === 'undefined') { + var authHeader = 'Basic ' + toBase64(header) + self.sentAuth = true + return authHeader + } +} + +Auth.prototype.bearer = function (bearer, sendImmediately) { + var self = this + self.bearerToken = bearer + self.hasAuth = true + if (sendImmediately || typeof sendImmediately === 'undefined') { + if (typeof bearer === 'function') { + bearer = bearer() + } + var authHeader = 'Bearer ' + (bearer || '') + self.sentAuth = true + return authHeader + } +} + +Auth.prototype.digest = function (method, path, authHeader) { + // TODO: More complete implementation of RFC 2617. + // - handle challenge.domain + // - support qop="auth-int" only + // - handle Authentication-Info (not necessarily?) + // - check challenge.stale (not necessarily?) + // - increase nc (not necessarily?) + // For reference: + // http://tools.ietf.org/html/rfc2617#section-3 + // https://github.com/bagder/curl/blob/master/lib/http_digest.c + + var self = this + + var challenge = {} + var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi + for (;;) { + var match = re.exec(authHeader) + if (!match) { + break + } + challenge[match[1]] = match[2] || match[3] + } + + /** + * RFC 2617: handle both MD5 and MD5-sess algorithms. + * + * If the algorithm directive's value is "MD5" or unspecified, then HA1 is + * HA1=MD5(username:realm:password) + * If the algorithm directive's value is "MD5-sess", then HA1 is + * HA1=MD5(MD5(username:realm:password):nonce:cnonce) + */ + var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) { + var ha1 = md5(user + ':' + realm + ':' + pass) + if (algorithm && algorithm.toLowerCase() === 'md5-sess') { + return md5(ha1 + ':' + nonce + ':' + cnonce) + } else { + return ha1 + } + } + + var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' + var nc = qop && '00000001' + var cnonce = qop && uuid().replace(/-/g, '') + var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce) + var ha2 = md5(method + ':' + path) + var digestResponse = qop + ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) + : md5(ha1 + ':' + challenge.nonce + ':' + ha2) + var authValues = { + username: self.user, + realm: challenge.realm, + nonce: challenge.nonce, + uri: path, + qop: qop, + response: digestResponse, + nc: nc, + cnonce: cnonce, + algorithm: challenge.algorithm, + opaque: challenge.opaque + } + + authHeader = [] + for (var k in authValues) { + if (authValues[k]) { + if (k === 'qop' || k === 'nc' || k === 'algorithm') { + authHeader.push(k + '=' + authValues[k]) + } else { + authHeader.push(k + '="' + authValues[k] + '"') + } + } + } + authHeader = 'Digest ' + authHeader.join(', ') + self.sentAuth = true + return authHeader +} + +Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { + var self = this + , request = self.request + + var authHeader + if (bearer === undefined && user === undefined) { + self.request.emit('error', new Error('no auth mechanism defined')) + } else if (bearer !== undefined) { + authHeader = self.bearer(bearer, sendImmediately) + } else { + authHeader = self.basic(user, pass, sendImmediately) + } + if (authHeader) { + request.setHeader('authorization', authHeader) + } +} + +Auth.prototype.onResponse = function (response) { + var self = this + , request = self.request + + if (!self.hasAuth || self.sentAuth) { return null } + + var c = caseless(response.headers) + + var authHeader = c.get('www-authenticate') + var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() + request.debug('reauth', authVerb) + + switch (authVerb) { + case 'basic': + return self.basic(self.user, self.pass, true) + + case 'bearer': + return self.bearer(self.bearerToken, true) + + case 'digest': + return self.digest(request.method, request.path, authHeader) + } +} + +exports.Auth = Auth diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js new file mode 100644 index 00000000000..412c07d63be --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js @@ -0,0 +1,39 @@ +'use strict' + +var tough = require('tough-cookie') + +var Cookie = tough.Cookie + , CookieJar = tough.CookieJar + + +exports.parse = function(str) { + if (str && str.uri) { + str = str.uri + } + if (typeof str !== 'string') { + throw new Error('The cookie function only accepts STRING as param') + } + return Cookie.parse(str, {loose: true}) +} + +// Adapt the sometimes-Async api of tough.CookieJar to our requirements +function RequestJar(store) { + var self = this + self._jar = new CookieJar(store, {looseMode: true}) +} +RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) { + var self = this + return self._jar.setCookieSync(cookieOrStr, uri, options || {}) +} +RequestJar.prototype.getCookieString = function(uri) { + var self = this + return self._jar.getCookieStringSync(uri) +} +RequestJar.prototype.getCookies = function(uri) { + var self = this + return self._jar.getCookiesSync(uri) +} + +exports.jar = function(store) { + return new RequestJar(store) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js new file mode 100644 index 00000000000..c2013a6e125 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js @@ -0,0 +1,79 @@ +'use strict' + +function formatHostname(hostname) { + // canonicalize the hostname, so that 'oogle.com' won't match 'google.com' + return hostname.replace(/^\.*/, '.').toLowerCase() +} + +function parseNoProxyZone(zone) { + zone = zone.trim().toLowerCase() + + var zoneParts = zone.split(':', 2) + , zoneHost = formatHostname(zoneParts[0]) + , zonePort = zoneParts[1] + , hasPort = zone.indexOf(':') > -1 + + return {hostname: zoneHost, port: zonePort, hasPort: hasPort} +} + +function uriInNoProxy(uri, noProxy) { + var port = uri.port || (uri.protocol === 'https:' ? '443' : '80') + , hostname = formatHostname(uri.hostname) + , noProxyList = noProxy.split(',') + + // iterate through the noProxyList until it finds a match. + return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) { + var isMatchedAt = hostname.indexOf(noProxyZone.hostname) + , hostnameMatched = ( + isMatchedAt > -1 && + (isMatchedAt === hostname.length - noProxyZone.hostname.length) + ) + + if (noProxyZone.hasPort) { + return (port === noProxyZone.port) && hostnameMatched + } + + return hostnameMatched + }) +} + +function getProxyFromURI(uri) { + // Decide the proper request proxy to use based on the request URI object and the + // environmental variables (NO_PROXY, HTTP_PROXY, etc.) + // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html) + + var noProxy = process.env.NO_PROXY || process.env.no_proxy || '' + + // if the noProxy is a wildcard then return null + + if (noProxy === '*') { + return null + } + + // if the noProxy is not empty and the uri is found return null + + if (noProxy !== '' && uriInNoProxy(uri, noProxy)) { + return null + } + + // Check for HTTP or HTTPS Proxy in environment Else default to null + + if (uri.protocol === 'http:') { + return process.env.HTTP_PROXY || + process.env.http_proxy || null + } + + if (uri.protocol === 'https:') { + return process.env.HTTPS_PROXY || + process.env.https_proxy || + process.env.HTTP_PROXY || + process.env.http_proxy || null + } + + // if none of that works, return null + // (What uri protocol are you using then?) + + return null +} + +module.exports = getProxyFromURI diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js new file mode 100644 index 00000000000..30595748781 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js @@ -0,0 +1,215 @@ +'use strict' + +var fs = require('fs') +var qs = require('querystring') +var validate = require('har-validator') +var extend = require('extend') + +function Har (request) { + this.request = request +} + +Har.prototype.reducer = function (obj, pair) { + // new property ? + if (obj[pair.name] === undefined) { + obj[pair.name] = pair.value + return obj + } + + // existing? convert to array + var arr = [ + obj[pair.name], + pair.value + ] + + obj[pair.name] = arr + + return obj +} + +Har.prototype.prep = function (data) { + // construct utility properties + data.queryObj = {} + data.headersObj = {} + data.postData.jsonObj = false + data.postData.paramsObj = false + + // construct query objects + if (data.queryString && data.queryString.length) { + data.queryObj = data.queryString.reduce(this.reducer, {}) + } + + // construct headers objects + if (data.headers && data.headers.length) { + // loweCase header keys + data.headersObj = data.headers.reduceRight(function (headers, header) { + headers[header.name] = header.value + return headers + }, {}) + } + + // construct Cookie header + if (data.cookies && data.cookies.length) { + var cookies = data.cookies.map(function (cookie) { + return cookie.name + '=' + cookie.value + }) + + if (cookies.length) { + data.headersObj.cookie = cookies.join('; ') + } + } + + // prep body + function some (arr) { + return arr.some(function (type) { + return data.postData.mimeType.indexOf(type) === 0 + }) + } + + if (some([ + 'multipart/mixed', + 'multipart/related', + 'multipart/form-data', + 'multipart/alternative'])) { + + // reset values + data.postData.mimeType = 'multipart/form-data' + } + + else if (some([ + 'application/x-www-form-urlencoded'])) { + + if (!data.postData.params) { + data.postData.text = '' + } else { + data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) + + // always overwrite + data.postData.text = qs.stringify(data.postData.paramsObj) + } + } + + else if (some([ + 'text/json', + 'text/x-json', + 'application/json', + 'application/x-json'])) { + + data.postData.mimeType = 'application/json' + + if (data.postData.text) { + try { + data.postData.jsonObj = JSON.parse(data.postData.text) + } catch (e) { + this.request.debug(e) + + // force back to text/plain + data.postData.mimeType = 'text/plain' + } + } + } + + return data +} + +Har.prototype.options = function (options) { + // skip if no har property defined + if (!options.har) { + return options + } + + var har = {} + extend(har, options.har) + + // only process the first entry + if (har.log && har.log.entries) { + har = har.log.entries[0] + } + + // add optional properties to make validation successful + har.url = har.url || options.url || options.uri || options.baseUrl || '/' + har.httpVersion = har.httpVersion || 'HTTP/1.1' + har.queryString = har.queryString || [] + har.headers = har.headers || [] + har.cookies = har.cookies || [] + har.postData = har.postData || {} + har.postData.mimeType = har.postData.mimeType || 'application/octet-stream' + + har.bodySize = 0 + har.headersSize = 0 + har.postData.size = 0 + + if (!validate.request(har)) { + return options + } + + // clean up and get some utility properties + var req = this.prep(har) + + // construct new options + if (req.url) { + options.url = req.url + } + + if (req.method) { + options.method = req.method + } + + if (Object.keys(req.queryObj).length) { + options.qs = req.queryObj + } + + if (Object.keys(req.headersObj).length) { + options.headers = req.headersObj + } + + function test (type) { + return req.postData.mimeType.indexOf(type) === 0 + } + if (test('application/x-www-form-urlencoded')) { + options.form = req.postData.paramsObj + } + else if (test('application/json')) { + if (req.postData.jsonObj) { + options.body = req.postData.jsonObj + options.json = true + } + } + else if (test('multipart/form-data')) { + options.formData = {} + + req.postData.params.forEach(function (param) { + var attachment = {} + + if (!param.fileName && !param.fileName && !param.contentType) { + options.formData[param.name] = param.value + return + } + + // attempt to read from disk! + if (param.fileName && !param.value) { + attachment.value = fs.createReadStream(param.fileName) + } else if (param.value) { + attachment.value = param.value + } + + if (param.fileName) { + attachment.options = { + filename: param.fileName, + contentType: param.contentType ? param.contentType : null + } + } + + options.formData[param.name] = attachment + }) + } + else { + if (req.postData.text) { + options.body = req.postData.text + } + } + + return options +} + +exports.Har = Har diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js new file mode 100644 index 00000000000..356ff748e2f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js @@ -0,0 +1,74 @@ +'use strict' + +var jsonSafeStringify = require('json-stringify-safe') + , crypto = require('crypto') + +function deferMethod() { + if (typeof setImmediate === 'undefined') { + return process.nextTick + } + + return setImmediate +} + +function isFunction(value) { + return typeof value === 'function' +} + +function paramsHaveRequestBody(params) { + return ( + params.body || + params.requestBodyStream || + (params.json && typeof params.json !== 'boolean') || + params.multipart + ) +} + +function safeStringify (obj, replacer) { + var ret + try { + ret = JSON.stringify(obj, replacer) + } catch (e) { + ret = jsonSafeStringify(obj, replacer) + } + return ret +} + +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} + +function isReadStream (rs) { + return rs.readable && rs.path && rs.mode +} + +function toBase64 (str) { + return (new Buffer(str || '', 'utf8')).toString('base64') +} + +function copy (obj) { + var o = {} + Object.keys(obj).forEach(function (i) { + o[i] = obj[i] + }) + return o +} + +function version () { + var numbers = process.version.replace('v', '').split('.') + return { + major: parseInt(numbers[0], 10), + minor: parseInt(numbers[1], 10), + patch: parseInt(numbers[2], 10) + } +} + +exports.isFunction = isFunction +exports.paramsHaveRequestBody = paramsHaveRequestBody +exports.safeStringify = safeStringify +exports.md5 = md5 +exports.isReadStream = isReadStream +exports.toBase64 = toBase64 +exports.copy = copy +exports.version = version +exports.defer = deferMethod() diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js new file mode 100644 index 00000000000..c1281726187 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js @@ -0,0 +1,112 @@ +'use strict' + +var uuid = require('node-uuid') + , CombinedStream = require('combined-stream') + , isstream = require('isstream') + + +function Multipart (request) { + this.request = request + this.boundary = uuid() + this.chunked = false + this.body = null +} + +Multipart.prototype.isChunked = function (options) { + var self = this + , chunked = false + , parts = options.data || options + + if (!parts.forEach) { + self.request.emit('error', new Error('Argument error, options.multipart.')) + } + + if (options.chunked !== undefined) { + chunked = options.chunked + } + + if (self.request.getHeader('transfer-encoding') === 'chunked') { + chunked = true + } + + if (!chunked) { + parts.forEach(function (part) { + if (typeof part.body === 'undefined') { + self.request.emit('error', new Error('Body attribute missing in multipart.')) + } + if (isstream(part.body)) { + chunked = true + } + }) + } + + return chunked +} + +Multipart.prototype.setHeaders = function (chunked) { + var self = this + + if (chunked && !self.request.hasHeader('transfer-encoding')) { + self.request.setHeader('transfer-encoding', 'chunked') + } + + var header = self.request.getHeader('content-type') + + if (!header || header.indexOf('multipart') === -1) { + self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) + } else { + if (header.indexOf('boundary') !== -1) { + self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1') + } else { + self.request.setHeader('content-type', header + '; boundary=' + self.boundary) + } + } +} + +Multipart.prototype.build = function (parts, chunked) { + var self = this + var body = chunked ? new CombinedStream() : [] + + function add (part) { + if (typeof part === 'number') { + part = part.toString() + } + return chunked ? body.append(part) : body.push(new Buffer(part)) + } + + if (self.request.preambleCRLF) { + add('\r\n') + } + + parts.forEach(function (part) { + var preamble = '--' + self.boundary + '\r\n' + Object.keys(part).forEach(function (key) { + if (key === 'body') { return } + preamble += key + ': ' + part[key] + '\r\n' + }) + preamble += '\r\n' + add(preamble) + add(part.body) + add('\r\n') + }) + add('--' + self.boundary + '--') + + if (self.request.postambleCRLF) { + add('\r\n') + } + + return body +} + +Multipart.prototype.onRequest = function (options) { + var self = this + + var chunked = self.isChunked(options) + , parts = options.data || options + + self.setHeaders(chunked) + self.chunked = chunked + self.body = self.build(parts, chunked) +} + +exports.Multipart = Multipart diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js new file mode 100644 index 00000000000..c24209b897a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js @@ -0,0 +1,147 @@ +'use strict' + +var url = require('url') + , qs = require('qs') + , caseless = require('caseless') + , uuid = require('node-uuid') + , oauth = require('oauth-sign') + , crypto = require('crypto') + + +function OAuth (request) { + this.request = request + this.params = null +} + +OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) { + var oa = {} + for (var i in _oauth) { + oa['oauth_' + i] = _oauth[i] + } + if (!oa.oauth_version) { + oa.oauth_version = '1.0' + } + if (!oa.oauth_timestamp) { + oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString() + } + if (!oa.oauth_nonce) { + oa.oauth_nonce = uuid().replace(/-/g, '') + } + if (!oa.oauth_signature_method) { + oa.oauth_signature_method = 'HMAC-SHA1' + } + + var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key + delete oa.oauth_consumer_secret + delete oa.oauth_private_key + + var token_secret = oa.oauth_token_secret + delete oa.oauth_token_secret + + var realm = oa.oauth_realm + delete oa.oauth_realm + delete oa.oauth_transport_method + + var baseurl = uri.protocol + '//' + uri.host + uri.pathname + var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&')) + + oa.oauth_signature = oauth.sign( + oa.oauth_signature_method, + method, + baseurl, + params, + consumer_secret_or_private_key, + token_secret) + + if (realm) { + oa.realm = realm + } + + return oa +} + +OAuth.prototype.buildBodyHash = function(_oauth, body) { + if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) { + this.request.emit('error', new Error('oauth: ' + _oauth.signature_method + + ' signature_method not supported with body_hash signing.')) + } + + var shasum = crypto.createHash('sha1') + shasum.update(body || '') + var sha1 = shasum.digest('hex') + + return new Buffer(sha1).toString('base64') +} + +OAuth.prototype.concatParams = function (oa, sep, wrap) { + wrap = wrap || '' + + var params = Object.keys(oa).filter(function (i) { + return i !== 'realm' && i !== 'oauth_signature' + }).sort() + + if (oa.realm) { + params.splice(0, 0, 'realm') + } + params.push('oauth_signature') + + return params.map(function (i) { + return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap + }).join(sep) +} + +OAuth.prototype.onRequest = function (_oauth) { + var self = this + self.params = _oauth + + var uri = self.request.uri || {} + , method = self.request.method || '' + , headers = caseless(self.request.headers) + , body = self.request.body || '' + , qsLib = self.request.qsLib || qs + + var form + , query + , contentType = headers.get('content-type') || '' + , formContentType = 'application/x-www-form-urlencoded' + , transport = _oauth.transport_method || 'header' + + if (contentType.slice(0, formContentType.length) === formContentType) { + contentType = formContentType + form = body + } + if (uri.query) { + query = uri.query + } + if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) { + self.request.emit('error', new Error('oauth: transport_method of body requires POST ' + + 'and content-type ' + formContentType)) + } + + if (!form && typeof _oauth.body_hash === 'boolean') { + _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString()) + } + + var oa = self.buildParams(_oauth, uri, method, query, form, qsLib) + + switch (transport) { + case 'header': + self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"')) + break + + case 'query': + var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&') + self.request.uri = url.parse(href) + self.request.path = self.request.uri.path + break + + case 'body': + self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&') + break + + default: + self.request.emit('error', new Error('oauth: transport_method invalid')) + } +} + +exports.OAuth = OAuth diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js new file mode 100644 index 00000000000..baf5e8021f4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js @@ -0,0 +1,51 @@ +'use strict' + +var qs = require('qs') + , querystring = require('querystring') + + +function Querystring (request) { + this.request = request + this.lib = null + this.useQuerystring = null + this.parseOptions = null + this.stringifyOptions = null +} + +Querystring.prototype.init = function (options) { + if (this.lib) {return} + + this.useQuerystring = options.useQuerystring + this.lib = (this.useQuerystring ? querystring : qs) + + this.parseOptions = options.qsParseOptions || {} + this.stringifyOptions = options.qsStringifyOptions || {} +} + +Querystring.prototype.stringify = function (obj) { + return (this.useQuerystring) + ? this.rfc3986(this.lib.stringify(obj, + this.stringifyOptions.sep || null, + this.stringifyOptions.eq || null, + this.stringifyOptions)) + : this.lib.stringify(obj, this.stringifyOptions) +} + +Querystring.prototype.parse = function (str) { + return (this.useQuerystring) + ? this.lib.parse(str, + this.parseOptions.sep || null, + this.parseOptions.eq || null, + this.parseOptions) + : this.lib.parse(str, this.parseOptions) +} + +Querystring.prototype.rfc3986 = function (str) { + return str.replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +Querystring.prototype.unescape = querystring.unescape + +exports.Querystring = Querystring diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js new file mode 100644 index 00000000000..040dfe0e03d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js @@ -0,0 +1,153 @@ +'use strict' + +var url = require('url') +var isUrl = /^https?:/ + +function Redirect (request) { + this.request = request + this.followRedirect = true + this.followRedirects = true + this.followAllRedirects = false + this.allowRedirect = function () {return true} + this.maxRedirects = 10 + this.redirects = [] + this.redirectsFollowed = 0 + this.removeRefererHeader = false +} + +Redirect.prototype.onRequest = function (options) { + var self = this + + if (options.maxRedirects !== undefined) { + self.maxRedirects = options.maxRedirects + } + if (typeof options.followRedirect === 'function') { + self.allowRedirect = options.followRedirect + } + if (options.followRedirect !== undefined) { + self.followRedirects = !!options.followRedirect + } + if (options.followAllRedirects !== undefined) { + self.followAllRedirects = options.followAllRedirects + } + if (self.followRedirects || self.followAllRedirects) { + self.redirects = self.redirects || [] + } + if (options.removeRefererHeader !== undefined) { + self.removeRefererHeader = options.removeRefererHeader + } +} + +Redirect.prototype.redirectTo = function (response) { + var self = this + , request = self.request + + var redirectTo = null + if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { + var location = response.caseless.get('location') + request.debug('redirect', location) + + if (self.followAllRedirects) { + redirectTo = location + } else if (self.followRedirects) { + switch (request.method) { + case 'PATCH': + case 'PUT': + case 'POST': + case 'DELETE': + // Do not follow redirects + break + default: + redirectTo = location + break + } + } + } else if (response.statusCode === 401) { + var authHeader = request._auth.onResponse(response) + if (authHeader) { + request.setHeader('authorization', authHeader) + redirectTo = request.uri + } + } + return redirectTo +} + +Redirect.prototype.onResponse = function (response) { + var self = this + , request = self.request + + var redirectTo = self.redirectTo(response) + if (!redirectTo || !self.allowRedirect.call(request, response)) { + return false + } + + request.debug('redirect to', redirectTo) + + // ignore any potential response body. it cannot possibly be useful + // to us at this point. + // response.resume should be defined, but check anyway before calling. Workaround for browserify. + if (response.resume) { + response.resume() + } + + if (self.redirectsFollowed >= self.maxRedirects) { + request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href)) + return false + } + self.redirectsFollowed += 1 + + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(request.uri.href, redirectTo) + } + + var uriPrev = request.uri + request.uri = url.parse(redirectTo) + + // handle the case where we change protocol from https to http or vice versa + if (request.uri.protocol !== uriPrev.protocol) { + delete request.agent + } + + self.redirects.push( + { statusCode : response.statusCode + , redirectUri: redirectTo + } + ) + if (self.followAllRedirects && request.method !== 'HEAD' + && response.statusCode !== 401 && response.statusCode !== 307) { + request.method = 'GET' + } + // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 + delete request.src + delete request.req + delete request._started + if (response.statusCode !== 401 && response.statusCode !== 307) { + // Remove parameters from the previous response, unless this is the second request + // for a server that requires digest authentication. + delete request.body + delete request._form + if (request.headers) { + request.removeHeader('host') + request.removeHeader('content-type') + request.removeHeader('content-length') + if (request.uri.hostname !== request.originalHost.split(':')[0]) { + // Remove authorization if changing hostnames (but not if just + // changing ports or protocols). This matches the behavior of curl: + // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710 + request.removeHeader('authorization') + } + } + } + + if (!self.removeRefererHeader) { + request.setHeader('referer', uriPrev.href) + } + + request.emit('redirect') + + request.init() + + return true +} + +exports.Redirect = Redirect diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js new file mode 100644 index 00000000000..bf96a8fec53 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js @@ -0,0 +1,176 @@ +'use strict' + +var url = require('url') + , tunnel = require('tunnel-agent') + +var defaultProxyHeaderWhiteList = [ + 'accept', + 'accept-charset', + 'accept-encoding', + 'accept-language', + 'accept-ranges', + 'cache-control', + 'content-encoding', + 'content-language', + 'content-location', + 'content-md5', + 'content-range', + 'content-type', + 'connection', + 'date', + 'expect', + 'max-forwards', + 'pragma', + 'referer', + 'te', + 'user-agent', + 'via' +] + +var defaultProxyHeaderExclusiveList = [ + 'proxy-authorization' +] + +function constructProxyHost(uriObject) { + var port = uriObject.port + , protocol = uriObject.protocol + , proxyHost = uriObject.hostname + ':' + + if (port) { + proxyHost += port + } else if (protocol === 'https:') { + proxyHost += '443' + } else { + proxyHost += '80' + } + + return proxyHost +} + +function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) { + var whiteList = proxyHeaderWhiteList + .reduce(function (set, header) { + set[header.toLowerCase()] = true + return set + }, {}) + + return Object.keys(headers) + .filter(function (header) { + return whiteList[header.toLowerCase()] + }) + .reduce(function (set, header) { + set[header] = headers[header] + return set + }, {}) +} + +function constructTunnelOptions (request, proxyHeaders) { + var proxy = request.proxy + + var tunnelOptions = { + proxy : { + host : proxy.hostname, + port : +proxy.port, + proxyAuth : proxy.auth, + headers : proxyHeaders + }, + headers : request.headers, + ca : request.ca, + cert : request.cert, + key : request.key, + passphrase : request.passphrase, + pfx : request.pfx, + ciphers : request.ciphers, + rejectUnauthorized : request.rejectUnauthorized, + secureOptions : request.secureOptions, + secureProtocol : request.secureProtocol + } + + return tunnelOptions +} + +function constructTunnelFnName(uri, proxy) { + var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http') + var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http') + return [uriProtocol, proxyProtocol].join('Over') +} + +function getTunnelFn(request) { + var uri = request.uri + var proxy = request.proxy + var tunnelFnName = constructTunnelFnName(uri, proxy) + return tunnel[tunnelFnName] +} + + +function Tunnel (request) { + this.request = request + this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList + this.proxyHeaderExclusiveList = [] + if (typeof request.tunnel !== 'undefined') { + this.tunnelOverride = request.tunnel + } +} + +Tunnel.prototype.isEnabled = function () { + var self = this + , request = self.request + // Tunnel HTTPS by default. Allow the user to override this setting. + + // If self.tunnelOverride is set (the user specified a value), use it. + if (typeof self.tunnelOverride !== 'undefined') { + return self.tunnelOverride + } + + // If the destination is HTTPS, tunnel. + if (request.uri.protocol === 'https:') { + return true + } + + // Otherwise, do not use tunnel. + return false +} + +Tunnel.prototype.setup = function (options) { + var self = this + , request = self.request + + options = options || {} + + if (typeof request.proxy === 'string') { + request.proxy = url.parse(request.proxy) + } + + if (!request.proxy || !request.tunnel) { + return false + } + + // Setup Proxy Header Exclusive List and White List + if (options.proxyHeaderWhiteList) { + self.proxyHeaderWhiteList = options.proxyHeaderWhiteList + } + if (options.proxyHeaderExclusiveList) { + self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList + } + + var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList) + var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList) + + // Setup Proxy Headers and Proxy Headers Host + // Only send the Proxy White Listed Header names + var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList) + proxyHeaders.host = constructProxyHost(request.uri) + + proxyHeaderExclusiveList.forEach(request.removeHeader, request) + + // Set Agent from Tunnel Data + var tunnelFn = getTunnelFn(request) + var tunnelOptions = constructTunnelOptions(request, proxyHeaders) + request.agent = tunnelFn(tunnelOptions) + + return true +} + +Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList +Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList +exports.Tunnel = Tunnel diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json new file mode 100644 index 00000000000..7143dde4939 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json @@ -0,0 +1,144 @@ +{ + "_args": [ + [ + "request@2.x", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "request@>=2.0.0 <3.0.0", + "_id": "request@2.73.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/request", + "_nodeVersion": "6.2.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/request-2.73.0.tgz_1468050202545_0.40326908184215426" + }, + "_npmUser": { + "email": "simeonvelichkov@gmail.com", + "name": "simov" + }, + "_npmVersion": "2.15.6", + "_phantomChildren": {}, + "_requested": { + "name": "request", + "raw": "request@2.x", + "rawSpec": "2.x", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/node-pre-gyp" + ], + "_resolved": "https://registry.npmjs.org/request/-/request-2.73.0.tgz", + "_shasum": "5f78a9fde4370abc8ff6479d7a84a71a14b878a2", + "_shrinkwrap": null, + "_spec": "request@2.x", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "author": { + "email": "mikeal.rogers@gmail.com", + "name": "Mikeal Rogers" + }, + "bugs": { + "url": "http://github.com/request/request/issues" + }, + "dependencies": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "bl": "~1.1.2", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~1.0.0-rc4", + "har-validator": "~2.0.6", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "node-uuid": "~1.4.7", + "oauth-sign": "~0.8.1", + "qs": "~6.2.0", + "stringstream": "~0.0.4", + "tough-cookie": "~2.2.0", + "tunnel-agent": "~0.4.1" + }, + "description": "Simplified HTTP request client.", + "devDependencies": { + "bluebird": "^3.2.1", + "browserify": "^13.0.1", + "browserify-istanbul": "^2.0.0", + "buffer-equal": "^1.0.0", + "codecov": "^1.0.1", + "coveralls": "^2.11.4", + "eslint": "^2.5.3", + "function-bind": "^1.0.2", + "istanbul": "^0.4.0", + "karma": "^1.1.1", + "karma-browserify": "^5.0.1", + "karma-cli": "^1.0.0", + "karma-coverage": "^1.0.0", + "karma-phantomjs-launcher": "^1.0.0", + "karma-tap": "^1.0.3", + "phantomjs-prebuilt": "^2.1.3", + "rimraf": "^2.2.8", + "server-destroy": "^1.0.1", + "tape": "^4.6.0", + "taper": "^0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "5f78a9fde4370abc8ff6479d7a84a71a14b878a2", + "tarball": "https://registry.npmjs.org/request/-/request-2.73.0.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "gitHead": "fa46be421b165c737c93672a8f920245cfb090a2", + "homepage": "https://github.com/request/request#readme", + "license": "Apache-2.0", + "main": "index.js", + "maintainers": [ + { + "email": "mikeal.rogers@gmail.com", + "name": "mikeal" + }, + { + "email": "jnylen@gmail.com", + "name": "nylen" + }, + { + "email": "fkschott@gmail.com", + "name": "fredkschott" + }, + { + "email": "simeonvelichkov@gmail.com", + "name": "simov" + } + ], + "name": "request", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/request/request.git" + }, + "scripts": { + "lint": "eslint lib/ *.js tests/ && echo Lint passed.", + "test": "npm run lint && npm run test-ci && npm run test-browser", + "test-browser": "node tests/browser/start.js", + "test-ci": "taper tests/test-*.js", + "test-cov": "istanbul cover tape tests/test-*.js" + }, + "tags": [ + "http", + "simple", + "util", + "utility" + ], + "version": "2.73.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js new file mode 100644 index 00000000000..8267c125375 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js @@ -0,0 +1,1434 @@ +'use strict' + +var http = require('http') + , https = require('https') + , url = require('url') + , util = require('util') + , stream = require('stream') + , zlib = require('zlib') + , bl = require('bl') + , hawk = require('hawk') + , aws2 = require('aws-sign2') + , aws4 = require('aws4') + , httpSignature = require('http-signature') + , mime = require('mime-types') + , stringstream = require('stringstream') + , caseless = require('caseless') + , ForeverAgent = require('forever-agent') + , FormData = require('form-data') + , extend = require('extend') + , isstream = require('isstream') + , isTypedArray = require('is-typedarray').strict + , helpers = require('./lib/helpers') + , cookies = require('./lib/cookies') + , getProxyFromURI = require('./lib/getProxyFromURI') + , Querystring = require('./lib/querystring').Querystring + , Har = require('./lib/har').Har + , Auth = require('./lib/auth').Auth + , OAuth = require('./lib/oauth').OAuth + , Multipart = require('./lib/multipart').Multipart + , Redirect = require('./lib/redirect').Redirect + , Tunnel = require('./lib/tunnel').Tunnel + +var safeStringify = helpers.safeStringify + , isReadStream = helpers.isReadStream + , toBase64 = helpers.toBase64 + , defer = helpers.defer + , copy = helpers.copy + , version = helpers.version + , globalCookieJar = cookies.jar() + + +var globalPool = {} + +function filterForNonReserved(reserved, options) { + // Filter out properties that are not reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var notReserved = (reserved.indexOf(i) === -1) + if (notReserved) { + object[i] = options[i] + } + } + return object +} + +function filterOutReservedFunctions(reserved, options) { + // Filter out properties that are functions and are reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var isReserved = !(reserved.indexOf(i) === -1) + var isFunction = (typeof options[i] === 'function') + if (!(isReserved && isFunction)) { + object[i] = options[i] + } + } + return object + +} + +// Return a simpler request object to allow serialization +function requestToJSON() { + var self = this + return { + uri: self.uri, + method: self.method, + headers: self.headers + } +} + +// Return a simpler response object to allow serialization +function responseToJSON() { + var self = this + return { + statusCode: self.statusCode, + body: self.body, + headers: self.headers, + request: requestToJSON.call(self.request) + } +} + +function Request (options) { + // if given the method property in options, set property explicitMethod to true + + // extend the Request instance with any non-reserved properties + // remove any reserved functions from the options object + // set Request instance to be readable and writable + // call init + + var self = this + + // start with HAR, then override with additional options + if (options.har) { + self._har = new Har(self) + options = self._har.options(options) + } + + stream.Stream.call(self) + var reserved = Object.keys(Request.prototype) + var nonReserved = filterForNonReserved(reserved, options) + + extend(self, nonReserved) + options = filterOutReservedFunctions(reserved, options) + + self.readable = true + self.writable = true + if (options.method) { + self.explicitMethod = true + } + self._qs = new Querystring(self) + self._auth = new Auth(self) + self._oauth = new OAuth(self) + self._multipart = new Multipart(self) + self._redirect = new Redirect(self) + self._tunnel = new Tunnel(self) + self.init(options) +} + +util.inherits(Request, stream.Stream) + +// Debugging +Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) +function debug() { + if (Request.debug) { + console.error('REQUEST %s', util.format.apply(util, arguments)) + } +} +Request.prototype.debug = debug + +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) { + options = {} + } + self.headers = self.headers ? copy(self.headers) : {} + + // Delete headers with value undefined since they break + // ClientRequest.OutgoingMessage.setHeader in node 0.12 + for (var headerName in self.headers) { + if (typeof self.headers[headerName] === 'undefined') { + delete self.headers[headerName] + } + } + + caseless.httpify(self, self.headers) + + if (!self.method) { + self.method = options.method || 'GET' + } + if (!self.localAddress) { + self.localAddress = options.localAddress + } + + self._qs.init(options) + + debug(options) + if (!self.pool && self.pool !== false) { + self.pool = globalPool + } + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) { + return // Print a warning maybe? + } + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + // People use this property instead all the time, so support it + if (!self.uri && self.url) { + self.uri = self.url + delete self.url + } + + // If there's a baseUrl, then use it as the base URL (i.e. uri must be + // specified as a relative path and is appended to baseUrl). + if (self.baseUrl) { + if (typeof self.baseUrl !== 'string') { + return self.emit('error', new Error('options.baseUrl must be a string')) + } + + if (typeof self.uri !== 'string') { + return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) + } + + if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { + return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) + } + + // Handle all cases to make sure that there's only one slash between + // baseUrl and uri. + var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 + var uriStartsWithSlash = self.uri.indexOf('/') === 0 + + if (baseUrlEndsWithSlash && uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri.slice(1) + } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri + } else if (self.uri === '') { + self.uri = self.baseUrl + } else { + self.uri = self.baseUrl + '/' + self.uri + } + delete self.baseUrl + } + + // A URI is needed by this point, emit error if we haven't been able to get one + if (!self.uri) { + return self.emit('error', new Error('options.uri is a required argument')) + } + + // If a string URI/URL was given, parse it into a URL object + if (typeof self.uri === 'string') { + self.uri = url.parse(self.uri) + } + + // Some URL objects are not from a URL parsed string and need href added + if (!self.uri.href) { + self.uri.href = url.format(self.uri) + } + + // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme + if (self.uri.protocol === 'unix:') { + return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) + } + + // Support Unix Sockets + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (!self.uri.pathname) {self.uri.pathname = '/'} + + if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { + // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' + } + // This error was fatal + self.abort() + return self.emit('error', new Error(message)) + } + + if (!self.hasOwnProperty('proxy')) { + self.proxy = getProxyFromURI(self.uri) + } + + self.tunnel = self._tunnel.isEnabled() + if (self.proxy) { + self._tunnel.setup(options) + } + + self._redirect.onRequest(options) + + self.setHost = false + if (!self.hasHeader('host')) { + var hostHeaderName = self.originalHostHeaderName || 'host' + self.setHeader(hostHeaderName, self.uri.hostname) + if (self.uri.port) { + if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && + !(self.uri.port === 443 && self.uri.protocol === 'https:') ) { + self.setHeader(hostHeaderName, self.getHeader('host') + (':' + self.uri.port) ) + } + } + self.setHost = true + } + + self.jar(self._jar || options.jar) + + if (!self.uri.port) { + if (self.uri.protocol === 'http:') {self.uri.port = 80} + else if (self.uri.protocol === 'https:') {self.uri.port = 443} + } + + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } + + if (options.form) { + self.form(options.form) + } + + if (options.formData) { + var formData = options.formData + var requestForm = self.form() + var appendFormValue = function (key, value) { + if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) { + requestForm.append(key, value.value, value.options) + } else { + requestForm.append(key, value) + } + } + for (var formKey in formData) { + if (formData.hasOwnProperty(formKey)) { + var formValue = formData[formKey] + if (formValue instanceof Array) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]) + } + } else { + appendFormValue(formKey, formValue) + } + } + } + } + + if (options.qs) { + self.qs(options.qs) + } + + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || '') + } + + if (self.path.length === 0) { + self.path = '/' + } + + // Auth must happen last in case signing is dependent on other headers + if (options.aws) { + self.aws(options.aws) + } + + if (options.hawk) { + self.hawk(options.hawk) + } + + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } + + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { + options.auth.user = options.auth.username + } + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { + options.auth.pass = options.auth.password + } + + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately, + options.auth.bearer + ) + } + + if (self.gzip && !self.hasHeader('accept-encoding')) { + self.setHeader('accept-encoding', 'gzip, deflate') + } + + if (self.uri.auth && !self.hasHeader('authorization')) { + var uriAuthPieces = self.uri.auth.split(':').map(function(item) {return self._qs.unescape(item)}) + self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) + } + + if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { + var proxyAuthPieces = self.proxy.auth.split(':').map(function(item) {return self._qs.unescape(item)}) + var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) + self.setHeader('proxy-authorization', authHeader) + } + + if (self.proxy && !self.tunnel) { + self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + } + + if (options.json) { + self.json(options.json) + } + if (options.multipart) { + self.multipart(options.multipart) + } + + if (options.time) { + self.timing = true + self.elapsedTime = self.elapsedTime || 0 + } + + function setContentLength () { + if (isTypedArray(self.body)) { + self.body = new Buffer(self.body) + } + + if (!self.hasHeader('content-length')) { + var length + if (typeof self.body === 'string') { + length = Buffer.byteLength(self.body) + } + else if (Array.isArray(self.body)) { + length = self.body.reduce(function (a, b) {return a + b.length}, 0) + } + else { + length = self.body.length + } + + if (length) { + self.setHeader('content-length', length) + } else { + self.emit('error', new Error('Argument error, options.body.')) + } + } + } + if (self.body && !isstream(self.body)) { + setContentLength() + } + + if (options.oauth) { + self.oauth(options.oauth) + } else if (self._oauth.params && self.hasHeader('authorization')) { + self.oauth(self._oauth.params) + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + , defaultModules = {'http:':http, 'https:':https} + , httpModules = self.httpModules || {} + + self.httpModule = httpModules[protocol] || defaultModules[protocol] + + if (!self.httpModule) { + return self.emit('error', new Error('Invalid protocol: ' + protocol)) + } + + if (options.ca) { + self.ca = options.ca + } + + if (!self.agent) { + if (options.agentOptions) { + self.agentOptions = options.agentOptions + } + + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + var v = version() + // use ForeverAgent in node 0.10- only + if (v.major === 0 && v.minor <= 10) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + self.agentOptions = self.agentOptions || {} + self.agentOptions.keepAlive = true + } + } else { + self.agentClass = self.httpModule.Agent + } + } + + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getNewAgent() + } + + self.on('pipe', function (src) { + if (self.ntick && self._started) { + self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) + } + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', mime.lookup(src.path)) + } + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } + } + } + if (self._json && !self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } + + // self.on('pipe', function () { + // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') + // }) + }) + + defer(function () { + if (self._aborted) { + return + } + + var end = function () { + if (self._form) { + if (!self._auth.hasAuth) { + self._form.pipe(self) + } + else if (self._auth.hasAuth && self._auth.sentAuth) { + self._form.pipe(self) + } + } + if (self._multipart && self._multipart.chunked) { + self._multipart.body.pipe(self) + } + if (self.body) { + if (isstream(self.body)) { + self.body.pipe(self) + } else { + setContentLength() + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } + } else if (self.requestBodyStream) { + console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self._auth.hasAuth && !self._auth.sentAuth) { + self.end() + return + } + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + } + + if (self._form && !self.hasHeader('content-length')) { + // Before ending the request, we had to compute the length of the whole form, asyncly + self.setHeader(self._form.getHeaders(), true) + self._form.getLength(function (err, length) { + if (!err && !isNaN(length)) { + self.setHeader('content-length', length) + } + end() + }) + } else { + end() + } + + self.ntick = true + }) + +} + +Request.prototype.getNewAgent = function () { + var self = this + var Agent = self.agentClass + var options = {} + if (self.agentOptions) { + for (var i in self.agentOptions) { + options[i] = self.agentOptions[i] + } + } + if (self.ca) { + options.ca = self.ca + } + if (self.ciphers) { + options.ciphers = self.ciphers + } + if (self.secureProtocol) { + options.secureProtocol = self.secureProtocol + } + if (self.secureOptions) { + options.secureOptions = self.secureOptions + } + if (typeof self.rejectUnauthorized !== 'undefined') { + options.rejectUnauthorized = self.rejectUnauthorized + } + + if (self.cert && self.key) { + options.key = self.key + options.cert = self.cert + } + + if (self.pfx) { + options.pfx = self.pfx + } + + if (self.passphrase) { + options.passphrase = self.passphrase + } + + var poolKey = '' + + // different types of agents are in different pools + if (Agent !== self.httpModule.Agent) { + poolKey += Agent.name + } + + // ca option is only relevant if proxy or destination are https + var proxy = self.proxy + if (typeof proxy === 'string') { + proxy = url.parse(proxy) + } + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + + if (isHttps) { + if (options.ca) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ca + } + + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) { + poolKey += ':' + } + poolKey += options.rejectUnauthorized + } + + if (options.cert) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + } + + if (options.pfx) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.pfx.toString('ascii') + } + + if (options.ciphers) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureProtocol + } + + if (options.secureOptions) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureOptions + } + } + + if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return self.httpModule.globalAgent + } + + // we're using a stored agent. Make sure it's protocol-specific + poolKey = self.uri.protocol + poolKey + + // generate a new agent for this setting if none yet exists + if (!self.pool[poolKey]) { + self.pool[poolKey] = new Agent(options) + // properly set maxSockets on new agents + if (self.pool.maxSockets) { + self.pool[poolKey].maxSockets = self.pool.maxSockets + } + } + + return self.pool[poolKey] +} + +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this + + if (self._aborted) { + return + } + + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } + + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth + + debug('make request', self.uri.href) + + try { + self.req = self.httpModule.request(reqOptions) + } catch (err) { + self.emit('error', err) + return + } + + if (self.timing) { + self.startTime = new Date().getTime() + } + + if (self.timeout && !self.timeoutTimer) { + var timeout = self.timeout < 0 ? 0 : self.timeout + // Set a timeout in memory - this block will throw if the server takes more + // than `timeout` to write the HTTP status and headers (corresponding to + // the on('response') event on the client). NB: this measures wall-clock + // time, not the time between bytes sent by the server. + self.timeoutTimer = setTimeout(function () { + var connectTimeout = self.req.socket && self.req.socket.readable === false + self.abort() + var e = new Error('ETIMEDOUT') + e.code = 'ETIMEDOUT' + e.connect = connectTimeout + self.emit('error', e) + }, timeout) + + if (self.req.setTimeout) { // only works on node 0.6+ + // Set an additional timeout on the socket, via the `setsockopt` syscall. + // This timeout sets the amount of time to wait *between* bytes sent + // from the server, and may or may not correspond to the wall-clock time + // elapsed from the start of the request. + // + // In particular, it's useful for erroring if the server fails to send + // data halfway through streaming a response. + self.req.setTimeout(timeout, function () { + if (self.req) { + self.req.abort() + var e = new Error('ESOCKETTIMEDOUT') + e.code = 'ESOCKETTIMEDOUT' + e.connect = false + self.emit('error', e) + } + }) + } + } + + self.req.on('response', self.onRequestResponse.bind(self)) + self.req.on('error', self.onRequestError.bind(self)) + self.req.on('drain', function() { + self.emit('drain') + }) + self.req.on('socket', function(socket) { + self.emit('socket', socket) + }) + + self.emit('request', self.req) +} + +Request.prototype.onRequestError = function (error) { + var self = this + if (self._aborted) { + return + } + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' + && self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + self.emit('error', error) +} + +Request.prototype.onRequestResponse = function (response) { + var self = this + debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function() { + if (self.timing) { + self.elapsedTime += (new Date().getTime() - self.startTime) + debug('elapsed time', self.elapsedTime) + response.elapsedTime = self.elapsedTime + } + debug('response end', self.uri.href, response.statusCode, response.headers) + }) + + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return + } + + self.response = response + response.request = self + response.toJSON = responseToJSON + + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && (!response.hasOwnProperty('socket') || + !response.socket.authorized)) { + debug('strict ssl error', self.uri.href) + var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' + self.emit('error', new Error('SSL Error: ' + sslErr)) + return + } + + // Save the original host before any redirect (if it changes, we need to + // remove any authorization headers). Also remember the case of the header + // name because lots of broken servers expect Host instead of host and we + // want the caller to be able to specify this. + self.originalHost = self.getHeader('host') + if (!self.originalHostHeaderName) { + self.originalHostHeaderName = self.hasHeader('host') + } + if (self.setHost) { + self.removeHeader('host') + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + + var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar + var addCookie = function (cookie) { + //set the cookie if it's domain in the href's domain. + try { + targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) + } catch (e) { + self.emit('error', e) + } + } + + response.caseless = caseless(response.headers) + + if (response.caseless.has('set-cookie') && (!self._disableCookies)) { + var headerName = response.caseless.has('set-cookie') + if (Array.isArray(response.headers[headerName])) { + response.headers[headerName].forEach(addCookie) + } else { + addCookie(response.headers[headerName]) + } + } + + if (self._redirect.onResponse(response)) { + return // Ignore the rest of the response + } else { + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) { + self.response.emit('end') + } + }) + + response.on('end', function () { + self._ended = true + }) + + var noBody = function (code) { + return ( + self.method === 'HEAD' + // Informational + || (code >= 100 && code < 200) + // No Content + || code === 204 + // Not Modified + || code === 304 + ) + } + + var responseContent + if (self.gzip && !noBody(response.statusCode)) { + var contentEncoding = response.headers['content-encoding'] || 'identity' + contentEncoding = contentEncoding.trim().toLowerCase() + + if (contentEncoding === 'gzip') { + responseContent = zlib.createGunzip() + response.pipe(responseContent) + } else if (contentEncoding === 'deflate') { + responseContent = zlib.createInflate() + response.pipe(responseContent) + } else { + // Since previous versions didn't check for Content-Encoding header, + // ignore any invalid values to preserve backwards-compatibility + if (contentEncoding !== 'identity') { + debug('ignoring unrecognized Content-Encoding ' + contentEncoding) + } + responseContent = response + } + } else { + responseContent = response + } + + if (self.encoding) { + if (self.dests.length !== 0) { + console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') + } else if (responseContent.setEncoding) { + responseContent.setEncoding(self.encoding) + } else { + // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with + // zlib streams. + // If/When support for 0.9.4 is dropped, this should be unnecessary. + responseContent = responseContent.pipe(stringstream(self.encoding)) + } + } + + if (self._paused) { + responseContent.pause() + } + + self.responseContent = responseContent + + self.emit('response', response) + + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + + responseContent.on('data', function (chunk) { + self._destdata = true + self.emit('data', chunk) + }) + responseContent.on('end', function (chunk) { + self.emit('end', chunk) + }) + responseContent.on('error', function (error) { + self.emit('error', error) + }) + responseContent.on('close', function () {self.emit('close')}) + + if (self.callback) { + self.readResponseBody(response) + } + //if no callback + else { + self.on('end', function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response) + }) + } + } + debug('finish init function', self.uri.href) +} + +Request.prototype.readResponseBody = function (response) { + var self = this + debug('reading response\'s body') + var buffer = bl() + , strings = [] + + self.on('data', function (chunk) { + if (Buffer.isBuffer(chunk)) { + buffer.append(chunk) + } else { + strings.push(chunk) + } + }) + self.on('end', function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffer.destroy() + return + } + + if (buffer.length) { + debug('has body', self.uri.href, buffer.length) + if (self.encoding === null) { + // response.body = buffer + // can't move to this until https://github.com/rvagg/bl/issues/13 + response.body = buffer.slice() + } else { + response.body = buffer.toString(self.encoding) + } + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffer.destroy() + } else if (strings.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { + strings[0] = strings[0].substring(1) + } + response.body = strings.join('') + } + + if (self._json) { + try { + response.body = JSON.parse(response.body, self._jsonReviver) + } catch (e) { + debug('invalid JSON received', self.uri.href) + } + } + debug('emitting complete', self.uri.href) + if (typeof response.body === 'undefined' && !self._json) { + response.body = self.encoding === null ? new Buffer(0) : '' + } + self.emit('complete', response, response.body) + }) +} + +Request.prototype.abort = function () { + var self = this + self._aborted = true + + if (self.req) { + self.req.abort() + } + else if (self.response) { + self.response.destroy() + } + + self.emit('abort') +} + +Request.prototype.pipeDest = function (dest) { + var self = this + var response = self.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (response.caseless.has('content-type')) { + var ctname = response.caseless.has('content-type') + if (dest.setHeader) { + dest.setHeader(ctname, response.headers[ctname]) + } + else { + dest.headers[ctname] = response.headers[ctname] + } + } + + if (response.caseless.has('content-length')) { + var clname = response.caseless.has('content-length') + if (dest.setHeader) { + dest.setHeader(clname, response.headers[clname]) + } else { + dest.headers[clname] = response.headers[clname] + } + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + // If the response content is being decoded, the Content-Encoding header + // of the response doesn't represent the piped content, so don't pass it. + if (!self.gzip || i !== 'content-encoding') { + dest.setHeader(i, response.headers[i]) + } + } + dest.statusCode = response.statusCode + } + if (self.pipefilter) { + self.pipefilter(response, dest) + } +} + +Request.prototype.qs = function (q, clobber) { + var self = this + var base + if (!clobber && self.uri.query) { + base = self._qs.parse(self.uri.query) + } else { + base = {} + } + + for (var i in q) { + base[i] = q[i] + } + + var qs = self._qs.stringify(base) + + if (qs === '') { + return self + } + + self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) + self.url = self.uri + self.path = self.uri.path + + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + return self +} +Request.prototype.form = function (form) { + var self = this + if (form) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.setHeader('content-type', 'application/x-www-form-urlencoded') + } + self.body = (typeof form === 'string') + ? self._qs.rfc3986(form.toString('utf8')) + : self._qs.stringify(form).toString('utf8') + return self + } + // create form-data object + self._form = new FormData() + self._form.on('error', function(err) { + err.message = 'form-data: ' + err.message + self.emit('error', err) + self.abort() + }) + return self._form +} +Request.prototype.multipart = function (multipart) { + var self = this + + self._multipart.onRequest(multipart) + + if (!self._multipart.chunked) { + self.body = self._multipart.body + } + + return self +} +Request.prototype.json = function (val) { + var self = this + + if (!self.hasHeader('accept')) { + self.setHeader('accept', 'application/json') + } + + if (typeof self.jsonReplacer === 'function') { + self._jsonReplacer = self.jsonReplacer + } + + self._json = true + if (typeof val === 'boolean') { + if (self.body !== undefined) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.body = safeStringify(self.body, self._jsonReplacer) + } else { + self.body = self._qs.rfc3986(self.body) + } + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + } else { + self.body = safeStringify(val, self._jsonReplacer) + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + + if (typeof self.jsonReviver === 'function') { + self._jsonReviver = self.jsonReviver + } + + return self +} +Request.prototype.getHeader = function (name, headers) { + var self = this + var result, re, match + if (!headers) { + headers = self.headers + } + Object.keys(headers).forEach(function (key) { + if (key.length !== name.length) { + return + } + re = new RegExp(name, 'i') + match = key.match(re) + if (match) { + result = headers[key] + } + }) + return result +} +Request.prototype.enableUnixSocket = function () { + // Get the socket & request paths from the URL + var unixParts = this.uri.path.split(':') + , host = unixParts[0] + , path = unixParts[1] + // Apply unix properties to request + this.socketPath = host + this.uri.pathname = path + this.uri.path = path + this.uri.host = host + this.uri.hostname = host + this.uri.isUnix = true +} + + +Request.prototype.auth = function (user, pass, sendImmediately, bearer) { + var self = this + + self._auth.onRequest(user, pass, sendImmediately, bearer) + + return self +} +Request.prototype.aws = function (opts, now) { + var self = this + + if (!now) { + self._aws = opts + return self + } + + if (opts.sign_version == 4 || opts.sign_version == '4') { + // use aws4 + var options = { + host: self.uri.host, + path: self.uri.path, + method: self.method, + headers: { + 'content-type': self.getHeader('content-type') || '' + }, + body: self.body + } + var signRes = aws4.sign(options, { + accessKeyId: opts.key, + secretAccessKey: opts.secret + }) + self.setHeader('authorization', signRes.headers.Authorization) + self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) + } + else { + // default: use aws-sign2 + var date = new Date() + self.setHeader('date', date.toUTCString()) + var auth = + { key: opts.key + , secret: opts.secret + , verb: self.method.toUpperCase() + , date: date + , contentType: self.getHeader('content-type') || '' + , md5: self.getHeader('content-md5') || '' + , amazonHeaders: aws2.canonicalizeHeaders(self.headers) + } + var path = self.uri.path + if (opts.bucket && path) { + auth.resource = '/' + opts.bucket + path + } else if (opts.bucket && !path) { + auth.resource = '/' + opts.bucket + } else if (!opts.bucket && path) { + auth.resource = path + } else if (!opts.bucket && !path) { + auth.resource = '/' + } + auth.resource = aws2.canonicalizeResource(auth.resource) + self.setHeader('authorization', aws2.authorization(auth)) + } + + return self +} +Request.prototype.httpSignature = function (opts) { + var self = this + httpSignature.signRequest({ + getHeader: function(header) { + return self.getHeader(header, self.headers) + }, + setHeader: function(header, value) { + self.setHeader(header, value) + }, + method: self.method, + path: self.path + }, opts) + debug('httpSignature authorization', self.getHeader('authorization')) + + return self +} +Request.prototype.hawk = function (opts) { + var self = this + self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field) +} +Request.prototype.oauth = function (_oauth) { + var self = this + + self._oauth.onRequest(_oauth) + + return self +} + +Request.prototype.jar = function (jar) { + var self = this + var cookies + + if (self._redirect.redirectsFollowed === 0) { + self.originalCookieHeader = self.getHeader('cookie') + } + + if (!jar) { + // disable cookies + cookies = false + self._disableCookies = true + } else { + var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar + var urihref = self.uri.href + //fetch cookie in the Specified host + if (targetCookieJar) { + cookies = targetCookieJar.getCookieString(urihref) + } + } + + //if need cookie and cookie is not empty + if (cookies && cookies.length) { + if (self.originalCookieHeader) { + // Don't overwrite existing Cookie header + self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) + } else { + self.setHeader('cookie', cookies) + } + } + self._jar = jar + return self +} + + +// Stream API +Request.prototype.pipe = function (dest, opts) { + var self = this + + if (self.response) { + if (self._destdata) { + self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) + } else if (self._ended) { + self.emit('error', new Error('You cannot pipe after the response has been ended.')) + } else { + stream.Stream.prototype.pipe.call(self, dest, opts) + self.pipeDest(dest) + return dest + } + } else { + self.dests.push(dest) + stream.Stream.prototype.pipe.call(self, dest, opts) + return dest + } +} +Request.prototype.write = function () { + var self = this + if (self._aborted) {return} + + if (!self._started) { + self.start() + } + if (self.req) { + return self.req.write.apply(self.req, arguments) + } +} +Request.prototype.end = function (chunk) { + var self = this + if (self._aborted) {return} + + if (chunk) { + self.write(chunk) + } + if (!self._started) { + self.start() + } + if (self.req) { + self.req.end() + } +} +Request.prototype.pause = function () { + var self = this + if (!self.responseContent) { + self._paused = true + } else { + self.responseContent.pause.apply(self.responseContent, arguments) + } +} +Request.prototype.resume = function () { + var self = this + if (!self.responseContent) { + self._paused = false + } else { + self.responseContent.resume.apply(self.responseContent, arguments) + } +} +Request.prototype.destroy = function () { + var self = this + if (!self._ended) { + self.end() + } else if (self.response) { + self.response.destroy() + } +} + +Request.defaultProxyHeaderWhiteList = + Tunnel.defaultProxyHeaderWhiteList.slice() + +Request.defaultProxyHeaderExclusiveList = + Tunnel.defaultProxyHeaderExclusiveList.slice() + +// Exports + +Request.prototype.toJSON = requestToJSON +module.exports = Request diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md new file mode 100644 index 00000000000..423b8cf854a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md @@ -0,0 +1,101 @@ +[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) + +The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, [opts], callback)` + +The first parameter will be interpreted as a globbing pattern for files. If you +want to disable globbing you can do so with `opts.disableGlob` (defaults to +`false`). This might be handy, for instance, if you have filenames that contain +globbing wildcard characters. + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up, adding 100ms of wait + between each attempt. The default `maxBusyTries` is 3. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. +* `EMFILE` - Since `readdir` requires opening a file descriptor, it's + possible to hit `EMFILE` if too many file descriptors are in use. + In the sync case, there's nothing to be done for this. But in the + async case, rimraf will gradually back off with timeouts up to + `opts.emfileWait` ms, which defaults to 1000. + +## options + +* unlink, chmod, stat, lstat, rmdir, readdir, + unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync + + In order to use a custom file system library, you can override + specific fs functions on the options object. + + If any of these functions are present on the options object, then + the supplied function will be used instead of the default fs + method. + + Sync methods are only relevant for `rimraf.sync()`, of course. + + For example: + + ```javascript + var myCustomFS = require('some-custom-fs') + + rimraf('some-thing', myCustomFS, callback) + ``` + +* maxBusyTries + + If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered + on Windows systems, then rimraf will retry with a linear backoff + wait of 100ms longer on each try. The default maxBusyTries is 3. + + Only relevant for async usage. + +* emfileWait + + If an `EMFILE` error is encountered, then rimraf will retry + repeatedly with a linear backoff of 1ms longer on each try, until + the timeout counter hits this max. The default limit is 1000. + + If you repeatedly encounter `EMFILE` errors, then consider using + [graceful-fs](http://npm.im/graceful-fs) in your program. + + Only relevant for async usage. + +* glob + + Set to `false` to disable [glob](http://npm.im/glob) pattern + matching. + + Set to an object to pass options to the glob module. The default + glob options are `{ nosort: true, silent: true }`. + + Glob version 6 is used in this module. + + Relevant for both sync and async usage. + +* disableGlob + + Set to any non-falsey value to disable globbing entirely. + (Equivalent to setting `glob: false`.) + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf [ ...]` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js new file mode 100755 index 00000000000..1bd5a0d16ac --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js @@ -0,0 +1,40 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}); + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf [ ...]') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + process.exit(help ? 0 : 1) +} else + go(0) + +function go (n) { + if (n >= args.length) + return + rimraf(args[n], function (er) { + if (er) + throw er + go(n+1) + }) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json new file mode 100644 index 00000000000..e2ec086be1d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "rimraf@~2.5.0", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "rimraf@>=2.5.0 <2.6.0", + "_id": "rimraf@2.5.3", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/rimraf", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/rimraf-2.5.3.tgz_1467582915019_0.6380921453237534" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.10.2", + "_phantomChildren": {}, + "_requested": { + "name": "rimraf", + "raw": "rimraf@~2.5.0", + "rawSpec": "~2.5.0", + "scope": null, + "spec": ">=2.5.0 <2.6.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/fstream", + "/fsevents/node-pre-gyp", + "/fsevents/tar-pack" + ], + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz", + "_shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705", + "_shrinkwrap": null, + "_spec": "rimraf@~2.5.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bin": { + "rimraf": "./bin.js" + }, + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, + "dependencies": { + "glob": "^7.0.5" + }, + "description": "A deep deletion module for node (like `rm -rf`)", + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^6.1.1" + }, + "directories": {}, + "dist": { + "shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705", + "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz" + }, + "files": [ + "LICENSE", + "README.md", + "bin.js", + "rimraf.js" + ], + "gitHead": "7263a784e8f08d94dd6caf6ee934fceb525a6f3d", + "homepage": "https://github.com/isaacs/rimraf#readme", + "license": "ISC", + "main": "rimraf.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "name": "rimraf", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "2.5.3" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js new file mode 100644 index 00000000000..db518a9d6cc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js @@ -0,0 +1,343 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var assert = require("assert") +var path = require("path") +var fs = require("fs") +var glob = require("glob") + +var defaultGlobOpts = { + nosort: true, + silent: true +} + +// for EMFILE handling +var timeout = 0 + +var isWindows = (process.platform === "win32") + +function defaults (options) { + var methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(function(m) { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 + options.emfileWait = options.emfileWait || 1000 + if (options.glob === false) { + options.disableGlob = true + } + options.disableGlob = options.disableGlob || false + options.glob = options.glob || defaultGlobOpts +} + +function rimraf (p, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') + + defaults(options) + + var busyTries = 0 + var errState = null + var n = 0 + + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]) + + options.lstat(p, function (er, stat) { + if (!er) + return afterGlob(null, [p]) + + glob(p, options.glob, afterGlob) + }) + + function next (er) { + errState = errState || er + if (--n === 0) + cb(errState) + } + + function afterGlob (er, results) { + if (er) + return cb(er) + + n = results.length + if (n === 0) + return cb() + + results.forEach(function (p) { + rimraf_(p, options, function CB (er) { + if (er) { + if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && + busyTries < options.maxBusyTries) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, options, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function () { + rimraf_(p, options, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + next(er) + }) + }) + } +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, function (er, st) { + if (er && er.code === "ENOENT") + return cb(null) + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb) + + if (st && st.isDirectory()) + return rmdir(p, options, er, cb) + + options.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + if (er.code === "EISDIR") + return rmdir(p, options, er, cb) + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) + assert(er instanceof Error) + + options.chmod(p, 666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, options, er, cb) + else + options.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, options, er) { + assert(p) + assert(options) + if (er) + assert(er instanceof Error) + + try { + options.chmodSync(p, 666) + } catch (er2) { + if (er2.code === "ENOENT") + return + else + throw er + } + + try { + var stats = options.statSync(p) + } catch (er3) { + if (er3.code === "ENOENT") + return + else + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, options, er) + else + options.unlinkSync(p) +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return options.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), options, function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + options.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + var results + + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p] + } else { + try { + options.lstatSync(p) + results = [p] + } catch (er) { + results = glob.sync(p, options.glob) + } + } + + if (!results.length) + return + + for (var i = 0; i < results.length; i++) { + var p = results[i] + + try { + var st = options.lstatSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + + // Windows can EPERM on stat. Life is suffering. + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er) + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) + rmdirSync(p, options, null) + else + options.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + if (er.code !== "EISDIR") + throw er + rmdirSync(p, options, er) + } + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options) + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f), options) + }) + options.rmdirSync(p, options) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md new file mode 100644 index 00000000000..27b044ecd89 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md @@ -0,0 +1,346 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install semver + + semver.valid('1.2.3') // '1.2.3' + semver.valid('a.b.c') // null + semver.clean(' =v1.2.3 ') // '1.2.3' + semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true + semver.gt('1.2.3', '9.8.7') // false + semver.lt('1.2.3', '9.8.7') // true + +As a command-line utility: + + $ semver -h + + SemVer 5.1.0 + + A JavaScript implementation of the http://semver.org/ specification + Copyright Isaac Z. Schlueter + + Usage: semver [options] [ [...]] + Prints valid versions sorted by SemVer precedence + + Options: + -r --range + Print versions that match the specified range. + + -i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + + --preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + + -l --loose + Interpret versions and ranges loosely + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no satisfying versions are found, then exits failure. + + Versions are printed in ascending order, so supplying + multiple versions to the utility will just sort them. + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +> semver.inc('1.2.3', 'prerelease', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `loose` boolean argument that, if +true, will be more forgiving about not-quite-valid semver strings. +The resulting output will always be 100% strict, of course. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver new file mode 100755 index 00000000000..c5f2e857e82 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver @@ -0,0 +1,133 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + , versions = [] + , range = [] + , gt = [] + , lt = [] + , eq = [] + , inc = null + , version = require("../package.json").version + , loose = false + , identifier = undefined + , semver = require("../semver") + , reverse = false + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var i = a.indexOf('=') + if (i !== -1) { + a = a.slice(0, i) + argv.unshift(a.slice(i + 1)) + } + switch (a) { + case "-rv": case "-rev": case "--rev": case "--reverse": + reverse = true + break + case "-l": case "--loose": + loose = true + break + case "-v": case "--version": + versions.push(argv.shift()) + break + case "-i": case "--inc": case "--increment": + switch (argv[0]) { + case "major": case "minor": case "patch": case "prerelease": + case "premajor": case "preminor": case "prepatch": + inc = argv.shift() + break + default: + inc = "patch" + break + } + break + case "--preid": + identifier = argv.shift() + break + case "-r": case "--range": + range.push(argv.shift()) + break + case "-h": case "--help": case "-?": + return help() + default: + versions.push(a) + break + } + } + + versions = versions.filter(function (v) { + return semver.valid(v, loose) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) + return failInc() + + for (var i = 0, l = range.length; i < l ; i ++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], loose) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error("--inc can only be used on a single version with no range") + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? "rcompare" : "compare" + versions.sort(function (a, b) { + return semver[compare](a, b, loose) + }).map(function (v) { + return semver.clean(v, loose) + }).map(function (v) { + return inc ? semver.inc(v, inc, loose, identifier) : v + }).forEach(function (v,i,_) { console.log(v) }) +} + +function help () { + console.log(["SemVer " + version + ,"" + ,"A JavaScript implementation of the http://semver.org/ specification" + ,"Copyright Isaac Z. Schlueter" + ,"" + ,"Usage: semver [options] [ [...]]" + ,"Prints valid versions sorted by SemVer precedence" + ,"" + ,"Options:" + ,"-r --range " + ," Print versions that match the specified range." + ,"" + ,"-i --increment []" + ," Increment a version by the specified level. Level can" + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." + ," Only one version may be specified." + ,"" + ,"--preid " + ," Identifier to be used to prefix premajor, preminor," + ," prepatch or prerelease version increments." + ,"" + ,"-l --loose" + ," Interpret versions and ranges loosely" + ,"" + ,"Program exits successfully if any valid version satisfies" + ,"all supplied ranges, and prints all satisfying versions." + ,"" + ,"If no satisfying versions are found, then exits failure." + ,"" + ,"Versions are printed in ascending order, so supplying" + ,"multiple versions to the utility will just sort them." + ].join("\n")) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json new file mode 100644 index 00000000000..74479e394eb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "semver@~5.2.0", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "semver@>=5.2.0 <5.3.0", + "_id": "semver@5.2.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/semver", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/semver-5.2.0.tgz_1467136841238_0.2250258030835539" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.10.2", + "_phantomChildren": {}, + "_requested": { + "name": "semver", + "raw": "semver@~5.2.0", + "rawSpec": "~5.2.0", + "scope": null, + "spec": ">=5.2.0 <5.3.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/node-pre-gyp" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz", + "_shasum": "281995b80c1448209415ddbc4cf50c269cef55c5", + "_shrinkwrap": null, + "_spec": "semver@~5.2.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "bin": { + "semver": "./bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "dependencies": {}, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^2.0.0" + }, + "directories": {}, + "dist": { + "shasum": "281995b80c1448209415ddbc4cf50c269cef55c5", + "tarball": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "gitHead": "f7fef36765c53ebe237bf415c3ea002f24aa5621", + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "maintainers": [ + { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + } + ], + "name": "semver", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "5.2.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf new file mode 100644 index 00000000000..25ebd5c8325 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js new file mode 100644 index 00000000000..b2d7298c6ef --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js @@ -0,0 +1,1194 @@ +exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num + } + return id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(b); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + + +exports.Range = Range; +function Range(range, loose) { + if ((range instanceof Range) && range.loose === loose) + return range; + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) + M = +M + 1 + else + m = +m + 1 + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return rcompare(a, b, loose); + })[0] || null; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +exports.prerelease = prerelease; +function prerelease(version, loose) { + var parsed = parse(version, loose); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md new file mode 100644 index 00000000000..03bf591923d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md @@ -0,0 +1,26 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [2.0.0](https://github.com/yargs/set-blocking/compare/v1.0.0...v2.0.0) (2016-05-17) + + +### Features + +* add an isTTY check ([#3](https://github.com/yargs/set-blocking/issues/3)) ([66ce277](https://github.com/yargs/set-blocking/commit/66ce277)) + + +### BREAKING CHANGES + +* stdio/stderr will not be set to blocking if isTTY === false + + + + +# 1.0.0 (2016-05-14) + + +### Features + +* implemented shim for stream._handle.setBlocking ([6bde0c0](https://github.com/yargs/set-blocking/commit/6bde0c0)) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt new file mode 100644 index 00000000000..836440bef7c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md new file mode 100644 index 00000000000..e93b4202b59 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md @@ -0,0 +1,31 @@ +# set-blocking + +[![Build Status](https://travis-ci.org/yargs/set-blocking.svg)](https://travis-ci.org/yargs/set-blocking) +[![NPM version](https://img.shields.io/npm/v/set-blocking.svg)](https://www.npmjs.com/package/set-blocking) +[![Coverage Status](https://coveralls.io/repos/yargs/set-blocking/badge.svg?branch=)](https://coveralls.io/r/yargs/set-blocking?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +set blocking `stdio` and `stderr` ensuring that terminal output does not truncate. + +```js +const setBlocking = require('set-blocking') +setBlocking(true) +console.log(someLargeStringToOutput) +``` + +## Historical Context/Word of Warning + +This was created as a shim to address the bug discussed in [node #6456](https://github.com/nodejs/node/issues/6456). This bug crops up on +newer versions of Node.js (`0.12+`), truncating terminal output. + +You should be mindful of the side-effects caused by using `set-blocking`: + +* if your module sets blocking to `true`, it will effect other modules + consuming your library. In [yargs](https://github.com/yargs/yargs/blob/master/yargs.js#L653) we only call + `setBlocking(true)` once we already know we are about to call `process.exit(code)`. +* this patch will not apply to subprocesses spawned with `isTTY = true`, this is + the [default `spawn()` behavior](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). + +## License + +ISC diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js new file mode 100644 index 00000000000..6f78774bb63 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js @@ -0,0 +1,7 @@ +module.exports = function (blocking) { + [process.stdout, process.stderr].forEach(function (stream) { + if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { + stream._handle.setBlocking(blocking) + } + }) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json new file mode 100644 index 00000000000..4d469892445 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "set-blocking@~2.0.0", + "/Users/eshanker/Code/fsevents/node_modules/npmlog" + ] + ], + "_from": "set-blocking@>=2.0.0 <2.1.0", + "_id": "set-blocking@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/set-blocking", + "_nodeVersion": "0.12.7", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/set-blocking-2.0.0.tgz_1463525966987_0.5456729622092098" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "set-blocking", + "raw": "set-blocking@~2.0.0", + "rawSpec": "~2.0.0", + "scope": null, + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/npmlog" + ], + "_resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "_shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", + "_shrinkwrap": null, + "_spec": "set-blocking@~2.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/npmlog", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/yargs/set-blocking/issues" + }, + "dependencies": {}, + "description": "set blocking stdio and stderr ensuring that terminal output does not truncate", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.9", + "mocha": "^2.4.5", + "nyc": "^6.4.4", + "standard": "^7.0.1", + "standard-version": "^2.2.1" + }, + "directories": {}, + "dist": { + "shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", + "tarball": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" + }, + "files": [ + "LICENSE.txt", + "index.js" + ], + "gitHead": "7eec10577b5fff264de477ba3b9d07f404946eff", + "homepage": "https://github.com/yargs/set-blocking#readme", + "keywords": [ + "blocking", + "flush", + "shim", + "stderr", + "stdio", + "terminal" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "ben@npmjs.com", + "name": "bcoe" + } + ], + "name": "set-blocking", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/yargs/set-blocking.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "test": "nyc mocha ./test/*.js", + "version": "standard-version" + }, + "version": "2.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md new file mode 100644 index 00000000000..c12f8340c8d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md @@ -0,0 +1,17 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) + + +### Bug Fixes + +* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) +* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) + + +### BREAKING CHANGES + +* signal-exit no longer wires into SIGPROF diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt new file mode 100644 index 00000000000..c7e27478a3e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md new file mode 100644 index 00000000000..8ebccabecae --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md @@ -0,0 +1,40 @@ +# signal-exit + +[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) +[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) +[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) +[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +When you want to fire an event no matter how a process exits: + +* reaching the end of execution. +* explicitly having `process.exit(code)` called. +* having `process.kill(pid, sig)` called. +* receiving a fatal signal from outside the process + +Use `signal-exit`. + +```js +var onExit = require('signal-exit') + +onExit(function (code, signal) { + console.log('process exited!') +}) +``` + +## API + +`var remove = onExit(function (code, signal) {}, options)` + +The return value of the function is a function that will remove the +handler. + +Note that the function *only* fires for signals if the signal would +cause the proces to exit. That is, there are no other listeners, and +it is a fatal signal. + +## Options + +* `alwaysLast`: Run this handler after any other signal or exit + handlers. This causes `process.emit` to be monkeypatched. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js new file mode 100644 index 00000000000..7dd8d917dc5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js @@ -0,0 +1,148 @@ +// Note: since nyc uses this module to output coverage, any lines +// that are in the direct sync flow of nyc's outputCoverage are +// ignored, since we can never get coverage for them. +var assert = require('assert') +var signals = require('./signals.js') + +var EE = require('events') +/* istanbul ignore if */ +if (typeof EE !== 'function') { + EE = EE.EventEmitter +} + +var emitter +if (process.__signal_exit_emitter__) { + emitter = process.__signal_exit_emitter__ +} else { + emitter = process.__signal_exit_emitter__ = new EE() + emitter.count = 0 + emitter.emitted = {} +} + +module.exports = function (cb, opts) { + assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') + + if (loaded === false) { + load() + } + + var ev = 'exit' + if (opts && opts.alwaysLast) { + ev = 'afterexit' + } + + var remove = function () { + emitter.removeListener(ev, cb) + if (emitter.listeners('exit').length === 0 && + emitter.listeners('afterexit').length === 0) { + unload() + } + } + emitter.on(ev, cb) + + return remove +} + +module.exports.unload = unload +function unload () { + if (!loaded) { + return + } + loaded = false + + signals.forEach(function (sig) { + try { + process.removeListener(sig, sigListeners[sig]) + } catch (er) {} + }) + process.emit = originalProcessEmit + process.reallyExit = originalProcessReallyExit + emitter.count -= 1 +} + +function emit (event, code, signal) { + if (emitter.emitted[event]) { + return + } + emitter.emitted[event] = true + emitter.emit(event, code, signal) +} + +// { : , ... } +var sigListeners = {} +signals.forEach(function (sig) { + sigListeners[sig] = function listener () { + // If there are no other listeners, an exit is coming! + // Simplest way: remove us and then re-send the signal. + // We know that this will kill the process, so we can + // safely emit now. + var listeners = process.listeners(sig) + if (listeners.length === emitter.count) { + unload() + emit('exit', null, sig) + /* istanbul ignore next */ + emit('afterexit', null, sig) + /* istanbul ignore next */ + process.kill(process.pid, sig) + } + } +}) + +module.exports.signals = function () { + return signals +} + +module.exports.load = load + +var loaded = false + +function load () { + if (loaded) { + return + } + loaded = true + + // This is the number of onSignalExit's that are in play. + // It's important so that we can count the correct number of + // listeners on signals, and don't wait for the other one to + // handle it instead of us. + emitter.count += 1 + + signals = signals.filter(function (sig) { + try { + process.on(sig, sigListeners[sig]) + return true + } catch (er) { + return false + } + }) + + process.emit = processEmit + process.reallyExit = processReallyExit +} + +var originalProcessReallyExit = process.reallyExit +function processReallyExit (code) { + process.exitCode = code || 0 + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + /* istanbul ignore next */ + originalProcessReallyExit.call(process, process.exitCode) +} + +var originalProcessEmit = process.emit +function processEmit (ev, arg) { + if (ev === 'exit') { + if (arg !== undefined) { + process.exitCode = arg + } + var ret = originalProcessEmit.apply(this, arguments) + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + return ret + } else { + return originalProcessEmit.apply(this, arguments) + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json new file mode 100644 index 00000000000..54976232442 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + "signal-exit@^3.0.0", + "/Users/eshanker/Code/fsevents/node_modules/gauge" + ] + ], + "_from": "signal-exit@>=3.0.0 <4.0.0", + "_id": "signal-exit@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/signal-exit", + "_nodeVersion": "5.1.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/signal-exit-3.0.0.tgz_1465857346813_0.7961636525578797" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "signal-exit", + "raw": "signal-exit@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/gauge" + ], + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz", + "_shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", + "_shrinkwrap": null, + "_spec": "signal-exit@^3.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/tapjs/signal-exit/issues" + }, + "dependencies": {}, + "description": "when you want to fire an event no matter how a process exits.", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.2", + "nyc": "^6.4.4", + "standard": "^7.1.2", + "standard-version": "^2.3.0", + "tap": "^5.7.2" + }, + "directories": {}, + "dist": { + "shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", + "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz" + }, + "files": [ + "index.js", + "signals.js" + ], + "gitHead": "2bbec4e5d9f9cf1f7529b1c923d1b058e69ccf7f", + "homepage": "https://github.com/tapjs/signal-exit", + "keywords": [ + "exit", + "signal" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + { + "email": "isaacs@npmjs.com", + "name": "isaacs" + } + ], + "name": "signal-exit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/signal-exit.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "tap --timeout=240 ./test/*.js --cov" + }, + "version": "3.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js new file mode 100644 index 00000000000..bc6f97ee606 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js @@ -0,0 +1,52 @@ +// This is not the set of all possible signals. +// +// It IS, however, the set of all signals that trigger +// an exit on either Linux or BSD systems. Linux is a +// superset of the signal names supported on BSD, and +// the unknown signals just fail to register, so we can +// catch that easily enough. +// +// Don't bother with SIGKILL. It's uncatchable, which +// means that we can't fire any callbacks anyway. +// +// If a user does happen to register a handler on a non- +// fatal signal like SIGWINCH or something, and then +// exit, it'll end up firing `process.emit('exit')`, so +// the handler will be fired anyway. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGBUS', + 'SIGFPE', + 'SIGHUP', + 'SIGILL', + 'SIGINT', + 'SIGSEGV', + 'SIGTERM' +] + +if (process.platform !== 'win32') { + module.exports.push( + 'SIGVTALRM', + 'SIGXCPU', + 'SIGXFSZ', + 'SIGUSR2', + 'SIGTRAP', + 'SIGSYS', + 'SIGQUIT', + 'SIGIOT' + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ) +} + +if (process.platform === 'linux') { + module.exports.push( + 'SIGIO', + 'SIGPOLL', + 'SIGPWR', + 'SIGSTKFLT', + 'SIGUNUSED' + ) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore new file mode 100644 index 00000000000..77ba16cb055 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore @@ -0,0 +1,18 @@ +.idea +*.iml +npm-debug.log +dump.rdb +node_modules +results.tap +results.xml +npm-shrinkwrap.json +config.json +.DS_Store +*/.DS_Store +*/*/.DS_Store +._* +*/._* +*/*/._* +coverage.* +lib-cov + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml new file mode 100755 index 00000000000..047f7e3d5e1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml @@ -0,0 +1,5 @@ +language: node_js + +node_js: + - 0.10 + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE new file mode 100755 index 00000000000..b0d877439ea --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012-2014, Eran Hammer and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hueniverse/sntp/graphs/contributors diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile new file mode 100755 index 00000000000..417fd937086 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile @@ -0,0 +1,9 @@ +test: + @node node_modules/lab/bin/lab +test-cov: + @node node_modules/lab/bin/lab -t 100 -m 3000 +test-cov-html: + @node node_modules/lab/bin/lab -r html -o coverage.html + +.PHONY: test test-cov test-cov-html + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md new file mode 100755 index 00000000000..98a6e025dba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md @@ -0,0 +1,68 @@ +# sntp + +An SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time +along with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset +to the local time. + +[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp) + +# Usage + +```javascript +var Sntp = require('sntp'); + +// All options are optional + +var options = { + host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org + port: 123, // Defaults to 123 (NTP) + resolveReference: true, // Default to false (not resolving) + timeout: 1000 // Defaults to zero (no timeout) +}; + +// Request server time + +Sntp.time(options, function (err, time) { + + if (err) { + console.log('Failed: ' + err.message); + process.exit(1); + } + + console.log('Local clock is off by: ' + time.t + ' milliseconds'); + process.exit(0); +}); +``` + +If an application needs to maintain continuous time synchronization, the module provides a stateful method for +querying the current offset only when the last one is too old (defaults to daily). + +```javascript +// Request offset once + +Sntp.offset(function (err, offset) { + + console.log(offset); // New (served fresh) + + // Request offset again + + Sntp.offset(function (err, offset) { + + console.log(offset); // Identical (served from cache) + }); +}); +``` + +To set a background offset refresh, start the interval and use the provided now() method. If for any reason the +client fails to obtain an up-to-date offset, the current system clock is used. + +```javascript +var before = Sntp.now(); // System time without offset + +Sntp.start(function () { + + var now = Sntp.now(); // With offset + Sntp.stop(); +}); +``` + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js new file mode 100755 index 00000000000..0303f6dcfa7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js @@ -0,0 +1,16 @@ +var Sntp = require('../lib'); + +// Request offset once + +Sntp.offset(function (err, offset) { + + console.log(offset); // New (served fresh) + + // Request offset again + + Sntp.offset(function (err, offset) { + + console.log(offset); // Identical (served from cache) + }); +}); + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js new file mode 100755 index 00000000000..bd70d0e6a51 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js @@ -0,0 +1,25 @@ +var Sntp = require('../lib'); + +// All options are optional + +var options = { + host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org + port: 123, // Defaults to 123 (NTP) + resolveReference: true, // Default to false (not resolving) + timeout: 1000 // Defaults to zero (no timeout) +}; + +// Request server time + +Sntp.time(options, function (err, time) { + + if (err) { + console.log('Failed: ' + err.message); + process.exit(1); + } + + console.log(time); + console.log('Local clock is off by: ' + time.t + ' milliseconds'); + process.exit(0); +}); + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js new file mode 100755 index 00000000000..4cc88b35877 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js @@ -0,0 +1 @@ +module.exports = require('./lib'); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js new file mode 100755 index 00000000000..e91718b4ff5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js @@ -0,0 +1,412 @@ +// Load modules + +var Dgram = require('dgram'); +var Dns = require('dns'); +var Hoek = require('hoek'); + + +// Declare internals + +var internals = {}; + + +exports.time = function (options, callback) { + + if (arguments.length !== 2) { + callback = arguments[0]; + options = {}; + } + + var settings = Hoek.clone(options); + settings.host = settings.host || 'pool.ntp.org'; + settings.port = settings.port || 123; + settings.resolveReference = settings.resolveReference || false; + + // Declare variables used by callback + + var timeoutId = 0; + var sent = 0; + + // Ensure callback is only called once + + var finish = function (err, result) { + + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = 0; + } + + socket.removeAllListeners(); + socket.once('error', internals.ignore); + socket.close(); + return callback(err, result); + }; + + finish = Hoek.once(finish); + + // Create UDP socket + + var socket = Dgram.createSocket('udp4'); + + socket.once('error', function (err) { + + return finish(err); + }); + + // Listen to incoming messages + + socket.on('message', function (buffer, rinfo) { + + var received = Date.now(); + + var message = new internals.NtpMessage(buffer); + if (!message.isValid) { + return finish(new Error('Invalid server response'), message); + } + + if (message.originateTimestamp !== sent) { + return finish(new Error('Wrong originate timestamp'), message); + } + + // Timestamp Name ID When Generated + // ------------------------------------------------------------ + // Originate Timestamp T1 time request sent by client + // Receive Timestamp T2 time request received by server + // Transmit Timestamp T3 time reply sent by server + // Destination Timestamp T4 time reply received by client + // + // The roundtrip delay d and system clock offset t are defined as: + // + // d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2 + + var T1 = message.originateTimestamp; + var T2 = message.receiveTimestamp; + var T3 = message.transmitTimestamp; + var T4 = received; + + message.d = (T4 - T1) - (T3 - T2); + message.t = ((T2 - T1) + (T3 - T4)) / 2; + message.receivedLocally = received; + + if (!settings.resolveReference || + message.stratum !== 'secondary') { + + return finish(null, message); + } + + // Resolve reference IP address + + Dns.reverse(message.referenceId, function (err, domains) { + + if (/* $lab:coverage:off$ */ !err /* $lab:coverage:on$ */) { + message.referenceHost = domains[0]; + } + + return finish(null, message); + }); + }); + + // Set timeout + + if (settings.timeout) { + timeoutId = setTimeout(function () { + + timeoutId = 0; + return finish(new Error('Timeout')); + }, settings.timeout); + } + + // Construct NTP message + + var message = new Buffer(48); + for (var i = 0; i < 48; i++) { // Zero message + message[i] = 0; + } + + message[0] = (0 << 6) + (4 << 3) + (3 << 0) // Set version number to 4 and Mode to 3 (client) + sent = Date.now(); + internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate) + + // Send NTP request + + socket.send(message, 0, message.length, settings.port, settings.host, function (err, bytes) { + + if (err || + bytes !== 48) { + + return finish(err || new Error('Could not send entire message')); + } + }); +}; + + +internals.NtpMessage = function (buffer) { + + this.isValid = false; + + // Validate + + if (buffer.length !== 48) { + return; + } + + // Leap indicator + + var li = (buffer[0] >> 6); + switch (li) { + case 0: this.leapIndicator = 'no-warning'; break; + case 1: this.leapIndicator = 'last-minute-61'; break; + case 2: this.leapIndicator = 'last-minute-59'; break; + case 3: this.leapIndicator = 'alarm'; break; + } + + // Version + + var vn = ((buffer[0] & 0x38) >> 3); + this.version = vn; + + // Mode + + var mode = (buffer[0] & 0x7); + switch (mode) { + case 1: this.mode = 'symmetric-active'; break; + case 2: this.mode = 'symmetric-passive'; break; + case 3: this.mode = 'client'; break; + case 4: this.mode = 'server'; break; + case 5: this.mode = 'broadcast'; break; + case 0: + case 6: + case 7: this.mode = 'reserved'; break; + } + + // Stratum + + var stratum = buffer[1]; + if (stratum === 0) { + this.stratum = 'death'; + } + else if (stratum === 1) { + this.stratum = 'primary'; + } + else if (stratum <= 15) { + this.stratum = 'secondary'; + } + else { + this.stratum = 'reserved'; + } + + // Poll interval (msec) + + this.pollInterval = Math.round(Math.pow(2, buffer[2])) * 1000; + + // Precision (msecs) + + this.precision = Math.pow(2, buffer[3]) * 1000; + + // Root delay (msecs) + + var rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7]; + this.rootDelay = 1000 * (rootDelay / 0x10000); + + // Root dispersion (msecs) + + this.rootDispersion = ((buffer[8] << 8) + buffer[9] + ((buffer[10] << 8) + buffer[11]) / Math.pow(2, 16)) * 1000; + + // Reference identifier + + this.referenceId = ''; + switch (this.stratum) { + case 'death': + case 'primary': + this.referenceId = String.fromCharCode(buffer[12]) + String.fromCharCode(buffer[13]) + String.fromCharCode(buffer[14]) + String.fromCharCode(buffer[15]); + break; + case 'secondary': + this.referenceId = '' + buffer[12] + '.' + buffer[13] + '.' + buffer[14] + '.' + buffer[15]; + break; + } + + // Reference timestamp + + this.referenceTimestamp = internals.toMsecs(buffer, 16); + + // Originate timestamp + + this.originateTimestamp = internals.toMsecs(buffer, 24); + + // Receive timestamp + + this.receiveTimestamp = internals.toMsecs(buffer, 32); + + // Transmit timestamp + + this.transmitTimestamp = internals.toMsecs(buffer, 40); + + // Validate + + if (this.version === 4 && + this.stratum !== 'reserved' && + this.mode === 'server' && + this.originateTimestamp && + this.receiveTimestamp && + this.transmitTimestamp) { + + this.isValid = true; + } + + return this; +}; + + +internals.toMsecs = function (buffer, offset) { + + var seconds = 0; + var fraction = 0; + + for (var i = 0; i < 4; ++i) { + seconds = (seconds * 256) + buffer[offset + i]; + } + + for (i = 4; i < 8; ++i) { + fraction = (fraction * 256) + buffer[offset + i]; + } + + return ((seconds - 2208988800 + (fraction / Math.pow(2, 32))) * 1000); +}; + + +internals.fromMsecs = function (ts, buffer, offset) { + + var seconds = Math.floor(ts / 1000) + 2208988800; + var fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32)); + + buffer[offset + 0] = (seconds & 0xFF000000) >> 24; + buffer[offset + 1] = (seconds & 0x00FF0000) >> 16; + buffer[offset + 2] = (seconds & 0x0000FF00) >> 8; + buffer[offset + 3] = (seconds & 0x000000FF); + + buffer[offset + 4] = (fraction & 0xFF000000) >> 24; + buffer[offset + 5] = (fraction & 0x00FF0000) >> 16; + buffer[offset + 6] = (fraction & 0x0000FF00) >> 8; + buffer[offset + 7] = (fraction & 0x000000FF); +}; + + +// Offset singleton + +internals.last = { + offset: 0, + expires: 0, + host: '', + port: 0 +}; + + +exports.offset = function (options, callback) { + + if (arguments.length !== 2) { + callback = arguments[0]; + options = {}; + } + + var now = Date.now(); + var clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily + + if (internals.last.offset && + internals.last.host === options.host && + internals.last.port === options.port && + now < internals.last.expires) { + + process.nextTick(function () { + + callback(null, internals.last.offset); + }); + + return; + } + + exports.time(options, function (err, time) { + + if (err) { + return callback(err, 0); + } + + internals.last = { + offset: Math.round(time.t), + expires: now + clockSyncRefresh, + host: options.host, + port: options.port + }; + + return callback(null, internals.last.offset); + }); +}; + + +// Now singleton + +internals.now = { + intervalId: 0 +}; + + +exports.start = function (options, callback) { + + if (arguments.length !== 2) { + callback = arguments[0]; + options = {}; + } + + if (internals.now.intervalId) { + process.nextTick(function () { + + callback(); + }); + + return; + } + + exports.offset(options, function (err, offset) { + + internals.now.intervalId = setInterval(function () { + + exports.offset(options, function () { }); + }, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily + + return callback(); + }); +}; + + +exports.stop = function () { + + if (!internals.now.intervalId) { + return; + } + + clearInterval(internals.now.intervalId); + internals.now.intervalId = 0; +}; + + +exports.isLive = function () { + + return !!internals.now.intervalId; +}; + + +exports.now = function () { + + var now = Date.now(); + if (!exports.isLive() || + now >= internals.last.expires) { + + return now; + } + + return now + internals.last.offset; +}; + + +internals.ignore = function () { + +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json new file mode 100644 index 00000000000..aef7e0940c8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + "sntp@1.x.x", + "/Users/eshanker/Code/fsevents/node_modules/hawk" + ] + ], + "_from": "sntp@>=1.0.0 <2.0.0", + "_id": "sntp@1.0.9", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/sntp", + "_npmUser": { + "email": "eran@hueniverse.com", + "name": "hueniverse" + }, + "_npmVersion": "1.4.23", + "_phantomChildren": {}, + "_requested": { + "name": "sntp", + "raw": "sntp@1.x.x", + "rawSpec": "1.x.x", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/hawk" + ], + "_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "_shasum": "6541184cc90aeea6c6e7b35e2659082443c66198", + "_shrinkwrap": null, + "_spec": "sntp@1.x.x", + "_where": "/Users/eshanker/Code/fsevents/node_modules/hawk", + "author": { + "email": "eran@hammer.io", + "name": "Eran Hammer", + "url": "http://hueniverse.com" + }, + "bugs": { + "url": "https://github.com/hueniverse/sntp/issues" + }, + "contributors": [], + "dependencies": { + "hoek": "2.x.x" + }, + "description": "SNTP Client", + "devDependencies": { + "lab": "4.x.x" + }, + "directories": {}, + "dist": { + "shasum": "6541184cc90aeea6c6e7b35e2659082443c66198", + "tarball": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "gitHead": "ee2e35284f684609990681734d39010cd356d7da", + "homepage": "https://github.com/hueniverse/sntp", + "keywords": [ + "ntp", + "sntp", + "time" + ], + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE" + } + ], + "main": "index", + "maintainers": [ + { + "email": "eran@hueniverse.com", + "name": "hueniverse" + } + ], + "name": "sntp", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/hueniverse/sntp.git" + }, + "scripts": { + "test": "make test-cov" + }, + "version": "1.0.9" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js new file mode 100755 index 00000000000..f1d1cdabf5b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js @@ -0,0 +1,435 @@ +// Load modules + +var Dns = require('dns'); +var Dgram = require('dgram'); +var Lab = require('lab'); +var Sntp = require('../lib'); + + +// Declare internals + +var internals = {}; + + +// Test shortcuts + +var lab = exports.lab = Lab.script(); +var before = lab.before; +var after = lab.after; +var describe = lab.experiment; +var it = lab.test; +var expect = Lab.expect; + + +describe('SNTP', function () { + + describe('#time', function () { + + it('returns consistent result over multiple tries', function (done) { + + Sntp.time(function (err, time) { + + expect(err).to.not.exist; + expect(time).to.exist; + var t1 = time.t; + + Sntp.time(function (err, time) { + + expect(err).to.not.exist; + expect(time).to.exist; + var t2 = time.t; + expect(Math.abs(t1 - t2)).is.below(200); + done(); + }); + }); + }); + + it('resolves reference IP', function (done) { + + Sntp.time({ host: 'ntp.exnet.com', resolveReference: true }, function (err, time) { + + expect(err).to.not.exist; + expect(time).to.exist; + expect(time.referenceHost).to.exist; + done(); + }); + }); + + it('times out on no response', function (done) { + + Sntp.time({ port: 124, timeout: 100 }, function (err, time) { + + expect(err).to.exist; + expect(time).to.not.exist; + expect(err.message).to.equal('Timeout'); + done(); + }); + }); + + it('errors on error event', { parallel: false }, function (done) { + + var orig = Dgram.createSocket; + Dgram.createSocket = function (type) { + + Dgram.createSocket = orig; + var socket = Dgram.createSocket(type); + setImmediate(function () { socket.emit('error', new Error('Fake')) }); + return socket; + }; + + Sntp.time(function (err, time) { + + expect(err).to.exist; + expect(time).to.not.exist; + expect(err.message).to.equal('Fake'); + done(); + }); + }); + + it('errors on incorrect sent size', { parallel: false }, function (done) { + + var orig = Dgram.Socket.prototype.send; + Dgram.Socket.prototype.send = function (buf, offset, length, port, address, callback) { + + Dgram.Socket.prototype.send = orig; + return callback(null, 40); + }; + + Sntp.time(function (err, time) { + + expect(err).to.exist; + expect(time).to.not.exist; + expect(err.message).to.equal('Could not send entire message'); + done(); + }); + }); + + it('times out on invalid host', function (done) { + + Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) { + + expect(err).to.exist; + expect(time).to.not.exist; + expect(err.message).to.contain('getaddrinfo'); + done(); + }); + }); + + it('fails on bad response buffer size', function (done) { + + var server = Dgram.createSocket('udp4'); + server.on('message', function (message, remote) { + var message = new Buffer(10); + server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { + + server.close(); + }); + }); + + server.bind(49123); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(err.message).to.equal('Invalid server response'); + done(); + }); + }); + + var messup = function (bytes) { + + var server = Dgram.createSocket('udp4'); + server.on('message', function (message, remote) { + + var message = new Buffer([ + 0x24, 0x01, 0x00, 0xe3, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x41, 0x43, 0x54, 0x53, + 0xd4, 0xa8, 0x2d, 0xc7, + 0x1c, 0x5d, 0x49, 0x1b, + 0xd4, 0xa8, 0x2d, 0xe6, + 0x67, 0xef, 0x9d, 0xb2, + 0xd4, 0xa8, 0x2d, 0xe6, + 0x71, 0xed, 0xb5, 0xfb, + 0xd4, 0xa8, 0x2d, 0xe6, + 0x71, 0xee, 0x6c, 0xc5 + ]); + + for (var i = 0, il = bytes.length; i < il; ++i) { + message[bytes[i][0]] = bytes[i][1]; + } + + server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { + + server.close(); + }); + }); + + server.bind(49123); + }; + + it('fails on bad version', function (done) { + + messup([[0, (0 << 6) + (3 << 3) + (4 << 0)]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(time.version).to.equal(3); + expect(err.message).to.equal('Invalid server response'); + done(); + }); + }); + + it('fails on bad originateTimestamp', function (done) { + + messup([[24, 0x83], [25, 0xaa], [26, 0x7e], [27, 0x80], [28, 0], [29, 0], [30, 0], [31, 0]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(err.message).to.equal('Invalid server response'); + done(); + }); + }); + + it('fails on bad receiveTimestamp', function (done) { + + messup([[32, 0x83], [33, 0xaa], [34, 0x7e], [35, 0x80], [36, 0], [37, 0], [38, 0], [39, 0]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(err.message).to.equal('Invalid server response'); + done(); + }); + }); + + it('fails on bad originate timestamp and alarm li', function (done) { + + messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(err.message).to.equal('Wrong originate timestamp'); + expect(time.leapIndicator).to.equal('alarm'); + done(); + }); + }); + + it('returns time with death stratum and last61 li', function (done) { + + messup([[0, (1 << 6) + (4 << 3) + (4 << 0)], [1, 0]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(time.stratum).to.equal('death'); + expect(time.leapIndicator).to.equal('last-minute-61'); + done(); + }); + }); + + it('returns time with reserved stratum and last59 li', function (done) { + + messup([[0, (2 << 6) + (4 << 3) + (4 << 0)], [1, 0x1f]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(time.stratum).to.equal('reserved'); + expect(time.leapIndicator).to.equal('last-minute-59'); + done(); + }); + }); + + it('fails on bad mode (symmetric-active)', function (done) { + + messup([[0, (0 << 6) + (4 << 3) + (1 << 0)]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(time.mode).to.equal('symmetric-active'); + done(); + }); + }); + + it('fails on bad mode (symmetric-passive)', function (done) { + + messup([[0, (0 << 6) + (4 << 3) + (2 << 0)]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(time.mode).to.equal('symmetric-passive'); + done(); + }); + }); + + it('fails on bad mode (client)', function (done) { + + messup([[0, (0 << 6) + (4 << 3) + (3 << 0)]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(time.mode).to.equal('client'); + done(); + }); + }); + + it('fails on bad mode (broadcast)', function (done) { + + messup([[0, (0 << 6) + (4 << 3) + (5 << 0)]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(time.mode).to.equal('broadcast'); + done(); + }); + }); + + it('fails on bad mode (reserved)', function (done) { + + messup([[0, (0 << 6) + (4 << 3) + (6 << 0)]]); + + Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { + + expect(err).to.exist; + expect(time.mode).to.equal('reserved'); + done(); + }); + }); + }); + + describe('#offset', function () { + + it('gets the current offset', function (done) { + + Sntp.offset(function (err, offset) { + + expect(err).to.not.exist; + expect(offset).to.not.equal(0); + done(); + }); + }); + + it('gets the current offset from cache', function (done) { + + Sntp.offset(function (err, offset) { + + expect(err).to.not.exist; + expect(offset).to.not.equal(0); + var offset1 = offset; + Sntp.offset({}, function (err, offset) { + + expect(err).to.not.exist; + expect(offset).to.equal(offset1); + done(); + }); + }); + }); + + it('gets the new offset on different server', function (done) { + + Sntp.offset(function (err, offset) { + + expect(err).to.not.exist; + expect(offset).to.not.equal(0); + var offset1 = offset; + Sntp.offset({ host: 'nist1-sj.ustiming.org' }, function (err, offset) { + + expect(err).to.not.exist; + expect(offset).to.not.equal(offset1); + done(); + }); + }); + }); + + it('gets the new offset on different server', function (done) { + + Sntp.offset(function (err, offset) { + + expect(err).to.not.exist; + expect(offset).to.not.equal(0); + var offset1 = offset; + Sntp.offset({ port: 123 }, function (err, offset) { + + expect(err).to.not.exist; + expect(offset).to.not.equal(offset1); + done(); + }); + }); + }); + + it('fails getting the current offset on invalid server', function (done) { + + Sntp.offset({ host: 'error' }, function (err, offset) { + + expect(err).to.exist; + expect(offset).to.equal(0); + done(); + }); + }); + }); + + describe('#now', function () { + + it('starts auto-sync, gets now, then stops', function (done) { + + Sntp.stop(); + + var before = Sntp.now(); + expect(before).to.equal(Date.now()); + + Sntp.start(function () { + + var now = Sntp.now(); + expect(now).to.not.equal(Date.now()); + Sntp.stop(); + + done(); + }); + }); + + it('starts twice', function (done) { + + Sntp.start(function () { + + Sntp.start(function () { + + var now = Sntp.now(); + expect(now).to.not.equal(Date.now()); + Sntp.stop(); + + done(); + }); + }); + }); + + it('starts auto-sync, gets now, waits, gets again after timeout', function (done) { + + Sntp.stop(); + + var before = Sntp.now(); + expect(before).to.equal(Date.now()); + + Sntp.start({ clockSyncRefresh: 100 }, function () { + + var now = Sntp.now(); + expect(now).to.not.equal(Date.now()); + expect(now).to.equal(Sntp.now()); + + setTimeout(function () { + + expect(Sntp.now()).to.not.equal(now); + Sntp.stop(); + done(); + }, 110); + }); + }); + }); +}); + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore new file mode 100644 index 00000000000..8000b595bb4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore @@ -0,0 +1,9 @@ +.gitmodules +deps +docs +Makefile +node_modules +test +tools +coverage +man/src diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml new file mode 100644 index 00000000000..c3394c258fc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - "5.10" + - "4.4" + - "4.1" + - "0.12" + - "0.10" +before_install: + - "make check" +after_success: + - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio' diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE new file mode 100644 index 00000000000..f6d947d2f61 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md new file mode 100644 index 00000000000..d0fa88dfa29 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md @@ -0,0 +1,455 @@ +sshpk +========= + +Parse, convert, fingerprint and use SSH keys (both public and private) in pure +node -- no `ssh-keygen` or other external dependencies. + +Supports RSA, DSA, ECDSA (nistp-\*) and ED25519 key types, in PEM (PKCS#1, +PKCS#8) and OpenSSH formats. + +This library has been extracted from +[`node-http-signature`](https://github.com/joyent/node-http-signature) +(work by [Mark Cavage](https://github.com/mcavage) and +[Dave Eddy](https://github.com/bahamas10)) and +[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint) +(work by Dave Eddy), with additions (including ECDSA support) by +[Alex Wilson](https://github.com/arekinath). + +Install +------- + +``` +npm install sshpk +``` + +Examples +-------- + +```js +var sshpk = require('sshpk'); + +var fs = require('fs'); + +/* Read in an OpenSSH-format public key */ +var keyPub = fs.readFileSync('id_rsa.pub'); +var key = sshpk.parseKey(keyPub, 'ssh'); + +/* Get metadata about the key */ +console.log('type => %s', key.type); +console.log('size => %d bits', key.size); +console.log('comment => %s', key.comment); + +/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */ +console.log('fingerprint => %s', key.fingerprint().toString()); +console.log('old-style fingerprint => %s', key.fingerprint('md5').toString()); +``` + +Example output: + +``` +type => rsa +size => 2048 bits +comment => foo@foo.com +fingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w +old-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd +``` + +More examples: converting between formats: + +```js +/* Read in a PEM public key */ +var keyPem = fs.readFileSync('id_rsa.pem'); +var key = sshpk.parseKey(keyPem, 'pem'); + +/* Convert to PEM PKCS#8 public key format */ +var pemBuf = key.toBuffer('pkcs8'); + +/* Convert to SSH public key format (and return as a string) */ +var sshKey = key.toString('ssh'); +``` + +Signing and verifying: + +```js +/* Read in an OpenSSH/PEM *private* key */ +var keyPriv = fs.readFileSync('id_ecdsa'); +var key = sshpk.parsePrivateKey(keyPriv, 'pem'); + +var data = 'some data'; + +/* Sign some data with the key */ +var s = key.createSign('sha1'); +s.update(data); +var signature = s.sign(); + +/* Now load the public key (could also use just key.toPublic()) */ +var keyPub = fs.readFileSync('id_ecdsa.pub'); +key = sshpk.parseKey(keyPub, 'ssh'); + +/* Make a crypto.Verifier with this key */ +var v = key.createVerify('sha1'); +v.update(data); +var valid = v.verify(signature); +/* => true! */ +``` + +Matching fingerprints with keys: + +```js +var fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w'); + +var keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...]; + +keys.forEach(function (key) { + if (fp.matches(key)) + console.log('found it!'); +}); +``` + +Usage +----- + +## Public keys + +### `parseKey(data[, format = 'auto'[, options]])` + +Parses a key from a given data format and returns a new `Key` object. + +Parameters + +- `data` -- Either a Buffer or String, containing the key +- `format` -- String name of format to use, valid options are: + - `auto`: choose automatically from all below + - `pem`: supports both PKCS#1 and PKCS#8 + - `ssh`: standard OpenSSH format, + - `pkcs1`, `pkcs8`: variants of `pem` + - `rfc4253`: raw OpenSSH wire format + - `openssh`: new post-OpenSSH 6.5 internal format, produced by + `ssh-keygen -o` +- `options` -- Optional Object, extra options, with keys: + - `filename` -- Optional String, name for the key being parsed + (eg. the filename that was opened). Used to generate + Error messages + - `passphrase` -- Optional String, encryption passphrase used to decrypt an + encrypted PEM file + +### `Key.isKey(obj)` + +Returns `true` if the given object is a valid `Key` object created by a version +of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `Key#type` + +String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. + +### `Key#size` + +Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; +for ECDSA this is the bit size of the curve in use. + +### `Key#comment` + +Optional string, a key comment used by some formats (eg the `ssh` format). + +### `Key#curve` + +Only present if `this.type === 'ecdsa'`, string containing the name of the +named curve used with this key. Possible values include `nistp256`, `nistp384` +and `nistp521`. + +### `Key#toBuffer([format = 'ssh'])` + +Convert the key into a given data format and return the serialized key as +a Buffer. + +Parameters + +- `format` -- String name of format to use, for valid options see `parseKey()` + +### `Key#toString([format = 'ssh])` + +Same as `this.toBuffer(format).toString()`. + +### `Key#fingerprint([algorithm = 'sha256'])` + +Creates a new `Fingerprint` object representing this Key's fingerprint. + +Parameters + +- `algorithm` -- String name of hash algorithm to use, valid options are `md5`, + `sha1`, `sha256`, `sha384`, `sha512` + +### `Key#createVerify([hashAlgorithm])` + +Creates a `crypto.Verifier` specialized to use this Key (and the correct public +key algorithm to match it). The returned Verifier has the same API as a regular +one, except that the `verify()` function takes only the target signature as an +argument. + +Parameters + +- `hashAlgorithm` -- optional String name of hash algorithm to use, any + supported by OpenSSL are valid, usually including + `sha1`, `sha256`. + +`v.verify(signature[, format])` Parameters + +- `signature` -- either a Signature object, or a Buffer or String +- `format` -- optional String, name of format to interpret given String with. + Not valid if `signature` is a Signature or Buffer. + +### `Key#createDiffieHellman()` +### `Key#createDH()` + +Creates a Diffie-Hellman key exchange object initialized with this key and all +necessary parameters. This has the same API as a `crypto.DiffieHellman` +instance, except that functions take `Key` and `PrivateKey` objects as +arguments, and return them where indicated for. + +This is only valid for keys belonging to a cryptosystem that supports DHE +or a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt +to call this function on other keys will yield an `Error`. + +## Private keys + +### `parsePrivateKey(data[, format = 'auto'[, options]])` + +Parses a private key from a given data format and returns a new +`PrivateKey` object. + +Parameters + +- `data` -- Either a Buffer or String, containing the key +- `format` -- String name of format to use, valid options are: + - `auto`: choose automatically from all below + - `pem`: supports both PKCS#1 and PKCS#8 + - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by + `ssh-keygen -o` + - `pkcs1`, `pkcs8`: variants of `pem` + - `rfc4253`: raw OpenSSH wire format +- `options` -- Optional Object, extra options, with keys: + - `filename` -- Optional String, name for the key being parsed + (eg. the filename that was opened). Used to generate + Error messages + - `passphrase` -- Optional String, encryption passphrase used to decrypt an + encrypted PEM file + +### `PrivateKey.isPrivateKey(obj)` + +Returns `true` if the given object is a valid `PrivateKey` object created by a +version of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `PrivateKey#type` + +String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. + +### `PrivateKey#size` + +Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; +for ECDSA this is the bit size of the curve in use. + +### `PrivateKey#curve` + +Only present if `this.type === 'ecdsa'`, string containing the name of the +named curve used with this key. Possible values include `nistp256`, `nistp384` +and `nistp521`. + +### `PrivateKey#toBuffer([format = 'pkcs1'])` + +Convert the key into a given data format and return the serialized key as +a Buffer. + +Parameters + +- `format` -- String name of format to use, valid options are listed under + `parsePrivateKey`. Note that ED25519 keys default to `openssh` + format instead (as they have no `pkcs1` representation). + +### `PrivateKey#toString([format = 'pkcs1'])` + +Same as `this.toBuffer(format).toString()`. + +### `PrivateKey#toPublic()` + +Extract just the public part of this private key, and return it as a `Key` +object. + +### `PrivateKey#fingerprint([algorithm = 'sha256'])` + +Same as `this.toPublic().fingerprint()`. + +### `PrivateKey#createVerify([hashAlgorithm])` + +Same as `this.toPublic().createVerify()`. + +### `PrivateKey#createSign([hashAlgorithm])` + +Creates a `crypto.Sign` specialized to use this PrivateKey (and the correct +key algorithm to match it). The returned Signer has the same API as a regular +one, except that the `sign()` function takes no arguments, and returns a +`Signature` object. + +Parameters + +- `hashAlgorithm` -- optional String name of hash algorithm to use, any + supported by OpenSSL are valid, usually including + `sha1`, `sha256`. + +`v.sign()` Parameters + +- none + +### `PrivateKey#derive(newType)` + +Derives a related key of type `newType` from this key. Currently this is +only supported to change between `ed25519` and `curve25519` keys which are +stored with the same private key (but usually distinct public keys in order +to avoid degenerate keys that lead to a weak Diffie-Hellman exchange). + +Parameters + +- `newType` -- String, type of key to derive, either `ed25519` or `curve25519` + +## Fingerprints + +### `parseFingerprint(fingerprint[, algorithms])` + +Pre-parses a fingerprint, creating a `Fingerprint` object that can be used to +quickly locate a key by using the `Fingerprint#matches` function. + +Parameters + +- `fingerprint` -- String, the fingerprint value, in any supported format +- `algorithms` -- Optional list of strings, names of hash algorithms to limit + support to. If `fingerprint` uses a hash algorithm not on + this list, throws `InvalidAlgorithmError`. + +### `Fingerprint.isFingerprint(obj)` + +Returns `true` if the given object is a valid `Fingerprint` object created by a +version of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `Fingerprint#toString([format])` + +Returns a fingerprint as a string, in the given format. + +Parameters + +- `format` -- Optional String, format to use, valid options are `hex` and + `base64`. If this `Fingerprint` uses the `md5` algorithm, the + default format is `hex`. Otherwise, the default is `base64`. + +### `Fingerprint#matches(key)` + +Verifies whether or not this `Fingerprint` matches a given `Key`. This function +uses double-hashing to avoid leaking timing information. Returns a boolean. + +Parameters + +- `key` -- a `Key` object, the key to match this fingerprint against + +## Signatures + +### `parseSignature(signature, algorithm, format)` + +Parses a signature in a given format, creating a `Signature` object. Useful +for converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and +also returned as output from `PrivateKey#createSign().sign()`. + +A Signature object can also be passed to a verifier produced by +`Key#createVerify()` and it will automatically be converted internally into the +correct format for verification. + +Parameters + +- `signature` -- a Buffer (binary) or String (base64), data of the actual + signature in the given format +- `algorithm` -- a String, name of the algorithm to be used, possible values + are `rsa`, `dsa`, `ecdsa` +- `format` -- a String, either `asn1` or `ssh` + +### `Signature.isSignature(obj)` + +Returns `true` if the given object is a valid `Signature` object created by a +version of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `Signature#toBuffer([format = 'asn1'])` + +Converts a Signature to the given format and returns it as a Buffer. + +Parameters + +- `format` -- a String, either `asn1` or `ssh` + +### `Signature#toString([format = 'asn1'])` + +Same as `this.toBuffer(format).toString('base64')`. + +Errors +------ + +### `InvalidAlgorithmError` + +The specified algorithm is not valid, either because it is not supported, or +because it was not included on a list of allowed algorithms. + +Thrown by `Fingerprint.parse`, `Key#fingerprint`. + +Properties + +- `algorithm` -- the algorithm that could not be validated + +### `FingerprintFormatError` + +The fingerprint string given could not be parsed as a supported fingerprint +format, or the specified fingerprint format is invalid. + +Thrown by `Fingerprint.parse`, `Fingerprint#toString`. + +Properties + +- `fingerprint` -- if caused by a fingerprint, the string value given +- `format` -- if caused by an invalid format specification, the string value given + +### `KeyParseError` + +The key data given could not be parsed as a valid key. + +Properties + +- `keyName` -- `filename` that was given to `Key#parse` +- `format` -- the `format` that was trying to parse the key +- `innerErr` -- the inner Error thrown by the format parser + +### `KeyEncryptedError` + +The key is encrypted with a symmetric key (ie, it is password protected). The +parsing operation would succeed if it was given the `passphrase` option. + +Properties + +- `keyName` -- `filename` that was given to `Key#parse` +- `format` -- the `format` that was trying to parse the key (currently can only + be `"pem"`) + +Friends of sshpk +---------------- + + * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library + for speaking the `ssh-agent` protocol from node.js, which uses `sshpk` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv new file mode 100755 index 00000000000..a1205a45d54 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv @@ -0,0 +1,195 @@ +#!/usr/bin/env node +// -*- mode: js -*- +// vim: set filetype=javascript : +// Copyright 2015 Joyent, Inc. All rights reserved. + +var dashdash = require('dashdash'); +var sshpk = require('../lib/index'); +var fs = require('fs'); +var path = require('path'); +var tty = require('tty'); +var readline = require('readline'); +var getPassword = require('getpass').getPass; + +var options = [ + { + names: ['outformat', 't'], + type: 'string', + help: 'Output format' + }, + { + names: ['informat', 'T'], + type: 'string', + help: 'Input format' + }, + { + names: ['file', 'f'], + type: 'string', + help: 'Input file name (default stdin)' + }, + { + names: ['out', 'o'], + type: 'string', + help: 'Output file name (default stdout)' + }, + { + names: ['private', 'p'], + type: 'bool', + help: 'Produce a private key as output' + }, + { + names: ['derive', 'd'], + type: 'string', + help: 'Output a new key derived from this one, with given algo' + }, + { + names: ['identify', 'i'], + type: 'bool', + help: 'Print key metadata instead of converting' + }, + { + names: ['comment', 'c'], + type: 'string', + help: 'Set key comment, if output format supports' + }, + { + names: ['help', 'h'], + type: 'bool', + help: 'Shows this help text' + } +]; + +if (require.main === module) { + var parser = dashdash.createParser({ + options: options + }); + + try { + var opts = parser.parse(process.argv); + } catch (e) { + console.error('sshpk-conv: error: %s', e.message); + process.exit(1); + } + + if (opts.help || opts._args.length > 1) { + var help = parser.help({}).trimRight(); + console.error('sshpk-conv: converts between SSH key formats\n'); + console.error(help); + console.error('\navailable formats:'); + console.error(' - pem, pkcs1 eg id_rsa'); + console.error(' - ssh eg id_rsa.pub'); + console.error(' - pkcs8 format you want for openssl'); + console.error(' - openssh like output of ssh-keygen -o'); + console.error(' - rfc4253 raw OpenSSH wire format'); + process.exit(1); + } + + /* + * Key derivation can only be done on private keys, so use of the -d + * option necessarily implies -p. + */ + if (opts.derive) + opts.private = true; + + var inFile = process.stdin; + var inFileName = 'stdin'; + + var inFilePath; + if (opts.file) { + inFilePath = opts.file; + } else if (opts._args.length === 1) { + inFilePath = opts._args[0]; + } + + if (inFilePath) + inFileName = path.basename(inFilePath); + + try { + if (inFilePath) { + fs.accessSync(inFilePath, fs.R_OK); + inFile = fs.createReadStream(inFilePath); + } + } catch (e) { + console.error('sshpk-conv: error opening input file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + var outFile = process.stdout; + + try { + if (opts.out && !opts.identify) { + fs.accessSync(path.dirname(opts.out), fs.W_OK); + outFile = fs.createWriteStream(opts.out); + } + } catch (e) { + console.error('sshpk-conv: error opening output file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + var bufs = []; + inFile.on('readable', function () { + var data; + while ((data = inFile.read())) + bufs.push(data); + }); + var parseOpts = {}; + parseOpts.filename = inFileName; + inFile.on('end', function processKey() { + var buf = Buffer.concat(bufs); + var fmt = 'auto'; + if (opts.informat) + fmt = opts.informat; + var f = sshpk.parseKey; + if (opts.private) + f = sshpk.parsePrivateKey; + try { + var key = f(buf, fmt, parseOpts); + } catch (e) { + if (e.name === 'KeyEncryptedError') { + getPassword(function (err, pw) { + parseOpts.passphrase = pw; + processKey(); + }); + return; + } + console.error('sshpk-conv: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + if (opts.derive) + key = key.derive(opts.derive); + + if (opts.comment) + key.comment = opts.comment; + + if (!opts.identify) { + fmt = undefined; + if (opts.outformat) + fmt = opts.outformat; + outFile.write(key.toBuffer(fmt)); + if (fmt === 'ssh' || + (!opts.private && fmt === undefined)) + outFile.write('\n'); + outFile.once('drain', function () { + process.exit(0); + }); + } else { + var kind = 'public'; + if (sshpk.PrivateKey.isPrivateKey(key)) + kind = 'private'; + console.log('%s: a %d bit %s %s key', inFileName, + key.size, key.type.toUpperCase(), kind); + if (key.type === 'ecdsa') + console.log('ECDSA curve: %s', key.curve); + if (key.comment) + console.log('Comment: %s', key.comment); + console.log('Fingerprint:'); + console.log(' ' + key.fingerprint().toString()); + console.log(' ' + key.fingerprint('md5').toString()); + process.exit(0); + } + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign new file mode 100755 index 00000000000..673fc986421 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign @@ -0,0 +1,191 @@ +#!/usr/bin/env node +// -*- mode: js -*- +// vim: set filetype=javascript : +// Copyright 2015 Joyent, Inc. All rights reserved. + +var dashdash = require('dashdash'); +var sshpk = require('../lib/index'); +var fs = require('fs'); +var path = require('path'); +var getPassword = require('getpass').getPass; + +var options = [ + { + names: ['hash', 'H'], + type: 'string', + help: 'Hash algorithm (sha1, sha256, sha384, sha512)' + }, + { + names: ['verbose', 'v'], + type: 'bool', + help: 'Display verbose info about key and hash used' + }, + { + names: ['identity', 'i'], + type: 'string', + help: 'Path to key to use' + }, + { + names: ['file', 'f'], + type: 'string', + help: 'Input filename' + }, + { + names: ['out', 'o'], + type: 'string', + help: 'Output filename' + }, + { + names: ['format', 't'], + type: 'string', + help: 'Signature format (asn1, ssh, raw)' + }, + { + names: ['binary', 'b'], + type: 'bool', + help: 'Output raw binary instead of base64' + }, + { + names: ['help', 'h'], + type: 'bool', + help: 'Shows this help text' + } +]; + +var parseOpts = {}; + +if (require.main === module) { + var parser = dashdash.createParser({ + options: options + }); + + try { + var opts = parser.parse(process.argv); + } catch (e) { + console.error('sshpk-sign: error: %s', e.message); + process.exit(1); + } + + if (opts.help || opts._args.length > 1) { + var help = parser.help({}).trimRight(); + console.error('sshpk-sign: sign data using an SSH key\n'); + console.error(help); + process.exit(1); + } + + if (!opts.identity) { + var help = parser.help({}).trimRight(); + console.error('sshpk-sign: the -i or --identity option ' + + 'is required\n'); + console.error(help); + process.exit(1); + } + + var keyData = fs.readFileSync(opts.identity); + parseOpts.filename = opts.identity; + + run(); +} + +function run() { + var key; + try { + key = sshpk.parsePrivateKey(keyData, 'auto', parseOpts); + } catch (e) { + if (e.name === 'KeyEncryptedError') { + getPassword(function (err, pw) { + parseOpts.passphrase = pw; + run(); + }); + return; + } + console.error('sshpk-sign: error loading private key "' + + opts.identity + '": ' + e.name + ': ' + e.message); + process.exit(1); + } + + var hash = opts.hash || key.defaultHashAlgorithm(); + + var signer; + try { + signer = key.createSign(hash); + } catch (e) { + console.error('sshpk-sign: error creating signer: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + if (opts.verbose) { + console.error('sshpk-sign: using %s-%s with a %d bit key', + key.type, hash, key.size); + } + + var inFile = process.stdin; + var inFileName = 'stdin'; + + var inFilePath; + if (opts.file) { + inFilePath = opts.file; + } else if (opts._args.length === 1) { + inFilePath = opts._args[0]; + } + + if (inFilePath) + inFileName = path.basename(inFilePath); + + try { + if (inFilePath) { + fs.accessSync(inFilePath, fs.R_OK); + inFile = fs.createReadStream(inFilePath); + } + } catch (e) { + console.error('sshpk-sign: error opening input file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + var outFile = process.stdout; + + try { + if (opts.out && !opts.identify) { + fs.accessSync(path.dirname(opts.out), fs.W_OK); + outFile = fs.createWriteStream(opts.out); + } + } catch (e) { + console.error('sshpk-sign: error opening output file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + inFile.pipe(signer); + inFile.on('end', function () { + var sig; + try { + sig = signer.sign(); + } catch (e) { + console.error('sshpk-sign: error signing data: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + var fmt = opts.format || 'asn1'; + var output; + try { + output = sig.toBuffer(fmt); + if (!opts.binary) + output = output.toString('base64'); + } catch (e) { + console.error('sshpk-sign: error converting signature' + + ' to ' + fmt + ' format: ' + e.name + ': ' + + e.message); + process.exit(1); + } + + outFile.write(output); + if (!opts.binary) + outFile.write('\n'); + outFile.once('drain', function () { + process.exit(0); + }); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify new file mode 100755 index 00000000000..a1669f409df --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify @@ -0,0 +1,166 @@ +#!/usr/bin/env node +// -*- mode: js -*- +// vim: set filetype=javascript : +// Copyright 2015 Joyent, Inc. All rights reserved. + +var dashdash = require('dashdash'); +var sshpk = require('../lib/index'); +var fs = require('fs'); +var path = require('path'); + +var options = [ + { + names: ['hash', 'H'], + type: 'string', + help: 'Hash algorithm (sha1, sha256, sha384, sha512)' + }, + { + names: ['verbose', 'v'], + type: 'bool', + help: 'Display verbose info about key and hash used' + }, + { + names: ['identity', 'i'], + type: 'string', + help: 'Path to (public) key to use' + }, + { + names: ['file', 'f'], + type: 'string', + help: 'Input filename' + }, + { + names: ['format', 't'], + type: 'string', + help: 'Signature format (asn1, ssh, raw)' + }, + { + names: ['signature', 's'], + type: 'string', + help: 'base64-encoded signature data' + }, + { + names: ['help', 'h'], + type: 'bool', + help: 'Shows this help text' + } +]; + +if (require.main === module) { + var parser = dashdash.createParser({ + options: options + }); + + try { + var opts = parser.parse(process.argv); + } catch (e) { + console.error('sshpk-verify: error: %s', e.message); + process.exit(3); + } + + if (opts.help || opts._args.length > 1) { + var help = parser.help({}).trimRight(); + console.error('sshpk-verify: sign data using an SSH key\n'); + console.error(help); + process.exit(3); + } + + if (!opts.identity) { + var help = parser.help({}).trimRight(); + console.error('sshpk-verify: the -i or --identity option ' + + 'is required\n'); + console.error(help); + process.exit(3); + } + + if (!opts.signature) { + var help = parser.help({}).trimRight(); + console.error('sshpk-verify: the -s or --signature option ' + + 'is required\n'); + console.error(help); + process.exit(3); + } + + var keyData = fs.readFileSync(opts.identity); + + var key; + try { + key = sshpk.parseKey(keyData); + } catch (e) { + console.error('sshpk-verify: error loading key "' + + opts.identity + '": ' + e.name + ': ' + e.message); + process.exit(2); + } + + var fmt = opts.format || 'asn1'; + var sigData = new Buffer(opts.signature, 'base64'); + + var sig; + try { + sig = sshpk.parseSignature(sigData, key.type, fmt); + } catch (e) { + console.error('sshpk-verify: error parsing signature: ' + + e.name + ': ' + e.message); + process.exit(2); + } + + var hash = opts.hash || key.defaultHashAlgorithm(); + + var verifier; + try { + verifier = key.createVerify(hash); + } catch (e) { + console.error('sshpk-verify: error creating verifier: ' + + e.name + ': ' + e.message); + process.exit(2); + } + + if (opts.verbose) { + console.error('sshpk-verify: using %s-%s with a %d bit key', + key.type, hash, key.size); + } + + var inFile = process.stdin; + var inFileName = 'stdin'; + + var inFilePath; + if (opts.file) { + inFilePath = opts.file; + } else if (opts._args.length === 1) { + inFilePath = opts._args[0]; + } + + if (inFilePath) + inFileName = path.basename(inFilePath); + + try { + if (inFilePath) { + fs.accessSync(inFilePath, fs.R_OK); + inFile = fs.createReadStream(inFilePath); + } + } catch (e) { + console.error('sshpk-verify: error opening input file' + + ': ' + e.name + ': ' + e.message); + process.exit(2); + } + + inFile.pipe(verifier); + inFile.on('end', function () { + var ret; + try { + ret = verifier.verify(sig); + } catch (e) { + console.error('sshpk-verify: error verifying data: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + if (ret) { + console.error('OK'); + process.exit(0); + } + + console.error('NOT OK'); + process.exit(1); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js new file mode 100644 index 00000000000..f30af560e36 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js @@ -0,0 +1,168 @@ +// Copyright 2015 Joyent, Inc. + +var algInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y'], + sizePart: 'p' + }, + 'rsa': { + parts: ['e', 'n'], + sizePart: 'n' + }, + 'ecdsa': { + parts: ['curve', 'Q'], + sizePart: 'Q' + }, + 'ed25519': { + parts: ['R'], + normalize: false, + sizePart: 'R' + } +}; +algInfo['curve25519'] = algInfo['ed25519']; + +var algPrivInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y', 'x'] + }, + 'rsa': { + parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] + }, + 'ecdsa': { + parts: ['curve', 'Q', 'd'] + }, + 'ed25519': { + parts: ['R', 'r'], + normalize: false + } +}; +algPrivInfo['curve25519'] = algPrivInfo['ed25519']; + +var hashAlgs = { + 'md5': true, + 'sha1': true, + 'sha256': true, + 'sha384': true, + 'sha512': true +}; + +/* + * Taken from + * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf + */ +var curves = { + 'nistp256': { + size: 256, + pkcs8oid: '1.2.840.10045.3.1.7', + p: new Buffer(('00' + + 'ffffffff 00000001 00000000 00000000' + + '00000000 ffffffff ffffffff ffffffff'). + replace(/ /g, ''), 'hex'), + a: new Buffer(('00' + + 'FFFFFFFF 00000001 00000000 00000000' + + '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: new Buffer(( + '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + + '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). + replace(/ /g, ''), 'hex'), + s: new Buffer(('00' + + 'c49d3608 86e70493 6a6678e1 139d26b7' + + '819f7e90'). + replace(/ /g, ''), 'hex'), + n: new Buffer(('00' + + 'ffffffff 00000000 ffffffff ffffffff' + + 'bce6faad a7179e84 f3b9cac2 fc632551'). + replace(/ /g, ''), 'hex'), + G: new Buffer(('04' + + '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + + '77037d81 2deb33a0 f4a13945 d898c296' + + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + + '2bce3357 6b315ece cbb64068 37bf51f5'). + replace(/ /g, ''), 'hex') + }, + 'nistp384': { + size: 384, + pkcs8oid: '1.3.132.0.34', + p: new Buffer(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffe' + + 'ffffffff 00000000 00000000 ffffffff'). + replace(/ /g, ''), 'hex'), + a: new Buffer(('00' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + + 'FFFFFFFF 00000000 00000000 FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: new Buffer(( + 'b3312fa7 e23ee7e4 988e056b e3f82d19' + + '181d9c6e fe814112 0314088f 5013875a' + + 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). + replace(/ /g, ''), 'hex'), + s: new Buffer(('00' + + 'a335926a a319a27a 1d00896a 6773a482' + + '7acdac73'). + replace(/ /g, ''), 'hex'), + n: new Buffer(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff c7634d81 f4372ddf' + + '581a0db2 48b0a77a ecec196a ccc52973'). + replace(/ /g, ''), 'hex'), + G: new Buffer(('04' + + 'aa87ca22 be8b0537 8eb1c71e f320ad74' + + '6e1d3b62 8ba79b98 59f741e0 82542a38' + + '5502f25d bf55296c 3a545e38 72760ab7' + + '3617de4a 96262c6f 5d9e98bf 9292dc29' + + 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). + replace(/ /g, ''), 'hex') + }, + 'nistp521': { + size: 521, + pkcs8oid: '1.3.132.0.35', + p: new Buffer(( + '01ffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffff').replace(/ /g, ''), 'hex'), + a: new Buffer(('01FF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: new Buffer(('51' + + '953eb961 8e1c9a1f 929a21a0 b68540ee' + + 'a2da725b 99b315f3 b8b48991 8ef109e1' + + '56193951 ec7e937b 1652c0bd 3bb1bf07' + + '3573df88 3d2c34f1 ef451fd4 6b503f00'). + replace(/ /g, ''), 'hex'), + s: new Buffer(('00' + + 'd09e8800 291cb853 96cc6717 393284aa' + + 'a0da64ba').replace(/ /g, ''), 'hex'), + n: new Buffer(('01ff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffa' + + '51868783 bf2f966b 7fcc0148 f709a5d0' + + '3bb5c9b8 899c47ae bb6fb71e 91386409'). + replace(/ /g, ''), 'hex'), + G: new Buffer(('04' + + '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + + '9c648139 053fb521 f828af60 6b4d3dba' + + 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + + '3348b3c1 856a429b f97e7e31 c2e5bd66' + + '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + + '98f54449 579b4468 17afbd17 273e662c' + + '97ee7299 5ef42640 c550b901 3fad0761' + + '353c7086 a272c240 88be9476 9fd16650'). + replace(/ /g, ''), 'hex') + } +}; + +module.exports = { + info: algInfo, + privInfo: algPrivInfo, + hashAlgs: hashAlgs, + curves: curves +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js new file mode 100644 index 00000000000..8f9548ce576 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js @@ -0,0 +1,311 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = DiffieHellman; + +var assert = require('assert-plus'); +var crypto = require('crypto'); +var algs = require('./algs'); +var utils = require('./utils'); +var ed; + +var Key = require('./key'); +var PrivateKey = require('./private-key'); + +var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); + +var ecdh, ec, jsbn; + +function DiffieHellman(key) { + utils.assertCompatible(key, Key, [1, 4], 'key'); + this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); + this._algo = key.type; + this._curve = key.curve; + this._key = key; + if (key.type === 'dsa') { + if (!CRYPTO_HAVE_ECDH) { + throw (new Error('Due to bugs in the node 0.10 ' + + 'crypto API, node 0.12.x or later is required ' + + 'to use DH')); + } + this._dh = crypto.createDiffieHellman( + key.part.p.data, undefined, + key.part.g.data, undefined); + this._p = key.part.p; + this._g = key.part.g; + if (this._isPriv) + this._dh.setPrivateKey(key.part.x.data); + this._dh.setPublicKey(key.part.y.data); + + } else if (key.type === 'ecdsa') { + if (!CRYPTO_HAVE_ECDH) { + if (ecdh === undefined) + ecdh = require('ecc-jsbn'); + if (ec === undefined) + ec = require('ecc-jsbn/lib/ec'); + if (jsbn === undefined) + jsbn = require('jsbn').BigInteger; + + this._ecParams = new X9ECParameters(this._curve); + + if (this._isPriv) { + this._priv = new ECPrivate( + this._ecParams, key.part.d.data); + } + return; + } + + var curve = { + 'nistp256': 'prime256v1', + 'nistp384': 'secp384r1', + 'nistp521': 'secp521r1' + }[key.curve]; + this._dh = crypto.createECDH(curve); + if (typeof (this._dh) !== 'object' || + typeof (this._dh.setPrivateKey) !== 'function') { + CRYPTO_HAVE_ECDH = false; + DiffieHellman.call(this, key); + return; + } + if (this._isPriv) + this._dh.setPrivateKey(key.part.d.data); + this._dh.setPublicKey(key.part.Q.data); + + } else if (key.type === 'curve25519') { + if (ed === undefined) + ed = require('jodid25519'); + + if (this._isPriv) { + this._priv = key.part.r.data; + if (this._priv[0] === 0x00) + this._priv = this._priv.slice(1); + this._priv = this._priv.slice(0, 32); + } + + } else { + throw (new Error('DH not supported for ' + key.type + ' keys')); + } +} + +DiffieHellman.prototype.getPublicKey = function () { + if (this._isPriv) + return (this._key.toPublic()); + return (this._key); +}; + +DiffieHellman.prototype.getPrivateKey = function () { + if (this._isPriv) + return (this._key); + else + return (undefined); +}; +DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; + +DiffieHellman.prototype._keyCheck = function (pk, isPub) { + assert.object(pk, 'key'); + if (!isPub) + utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); + utils.assertCompatible(pk, Key, [1, 4], 'key'); + + if (pk.type !== this._algo) { + throw (new Error('A ' + pk.type + ' key cannot be used in ' + + this._algo + ' Diffie-Hellman')); + } + + if (pk.curve !== this._curve) { + throw (new Error('A key from the ' + pk.curve + ' curve ' + + 'cannot be used with a ' + this._curve + + ' Diffie-Hellman')); + } + + if (pk.type === 'dsa') { + assert.deepEqual(pk.part.p, this._p, + 'DSA key prime does not match'); + assert.deepEqual(pk.part.g, this._g, + 'DSA key generator does not match'); + } +}; + +DiffieHellman.prototype.setKey = function (pk) { + this._keyCheck(pk); + + if (pk.type === 'dsa') { + this._dh.setPrivateKey(pk.part.x.data); + this._dh.setPublicKey(pk.part.y.data); + + } else if (pk.type === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.setPrivateKey(pk.part.d.data); + this._dh.setPublicKey(pk.part.Q.data); + } else { + this._priv = new ECPrivate( + this._ecParams, pk.part.d.data); + } + + } else if (pk.type === 'curve25519') { + this._priv = pk.part.r.data; + if (this._priv[0] === 0x00) + this._priv = this._priv.slice(1); + this._priv = this._priv.slice(0, 32); + } + this._key = pk; + this._isPriv = true; +}; +DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; + +DiffieHellman.prototype.computeSecret = function (otherpk) { + this._keyCheck(otherpk, true); + if (!this._isPriv) + throw (new Error('DH exchange has not been initialized with ' + + 'a private key yet')); + + var pub; + if (this._algo === 'dsa') { + return (this._dh.computeSecret( + otherpk.part.y.data)); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + return (this._dh.computeSecret( + otherpk.part.Q.data)); + } else { + pub = new ECPublic( + this._ecParams, otherpk.part.Q.data); + return (this._priv.deriveSharedSecret(pub)); + } + + } else if (this._algo === 'curve25519') { + pub = otherpk.part.R.data; + if (pub[0] === 0x00) + pub = pub.slice(1); + + var secret = ed.dh.computeKey( + this._priv.toString('binary'), + pub.toString('binary')); + + return (new Buffer(secret, 'binary')); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; + +DiffieHellman.prototype.generateKey = function () { + var parts = []; + var priv, pub; + if (this._algo === 'dsa') { + this._dh.generateKeys(); + + parts.push({name: 'p', data: this._p.data}); + parts.push({name: 'q', data: this._key.part.q.data}); + parts.push({name: 'g', data: this._g.data}); + parts.push({name: 'y', data: this._dh.getPublicKey()}); + parts.push({name: 'x', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'dsa', + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.generateKeys(); + + parts.push({name: 'curve', + data: new Buffer(this._curve)}); + parts.push({name: 'Q', data: this._dh.getPublicKey()}); + parts.push({name: 'd', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else { + var n = this._ecParams.getN(); + var r = new jsbn(crypto.randomBytes(n.bitLength())); + var n1 = n.subtract(jsbn.ONE); + priv = r.mod(n1).add(jsbn.ONE); + pub = this._ecParams.getG().multiply(priv); + + priv = new Buffer(priv.toByteArray()); + pub = new Buffer(this._ecParams.getCurve(). + encodePointHex(pub), 'hex'); + + this._priv = new ECPrivate(this._ecParams, priv); + + parts.push({name: 'curve', + data: new Buffer(this._curve)}); + parts.push({name: 'Q', data: pub}); + parts.push({name: 'd', data: priv}); + + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + } else if (this._algo === 'curve25519') { + priv = ed.dh.generateKey(); + pub = ed.dh.publicKey(priv); + this._priv = priv = new Buffer(priv, 'binary'); + pub = new Buffer(pub, 'binary'); + + parts.push({name: 'R', data: pub}); + parts.push({name: 'r', data: Buffer.concat([priv, pub])}); + this._key = new PrivateKey({ + type: 'curve25519', + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; +DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; + +/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ + +function X9ECParameters(name) { + var params = algs.curves[name]; + assert.object(params); + + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var n = new jsbn(params.n); + var h = jsbn.ONE; + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + this.curve = curve; + this.g = G; + this.n = n; + this.h = h; +} +X9ECParameters.prototype.getCurve = function () { return (this.curve); }; +X9ECParameters.prototype.getG = function () { return (this.g); }; +X9ECParameters.prototype.getN = function () { return (this.n); }; +X9ECParameters.prototype.getH = function () { return (this.h); }; + +function ECPublic(params, buffer) { + this._params = params; + if (buffer[0] === 0x00) + buffer = buffer.slice(1); + this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); +} + +function ECPrivate(params, buffer) { + this._params = params; + this._priv = new jsbn(utils.mpNormalize(buffer)); +} +ECPrivate.prototype.deriveSharedSecret = function (pubKey) { + assert.ok(pubKey instanceof ECPublic); + var S = pubKey._pub.multiply(this._priv); + return (new Buffer(S.getX().toBigInteger().toByteArray())); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js new file mode 100644 index 00000000000..5365fb14027 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js @@ -0,0 +1,96 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + Verifier: Verifier, + Signer: Signer +}; + +var nacl; +var stream = require('stream'); +var util = require('util'); +var assert = require('assert-plus'); +var Signature = require('./signature'); + +function Verifier(key, hashAlgo) { + if (nacl === undefined) + nacl = require('tweetnacl'); + + if (hashAlgo.toLowerCase() !== 'sha512') + throw (new Error('ED25519 only supports the use of ' + + 'SHA-512 hashes')); + + this.key = key; + this.chunks = []; + + stream.Writable.call(this, {}); +} +util.inherits(Verifier, stream.Writable); + +Verifier.prototype._write = function (chunk, enc, cb) { + this.chunks.push(chunk); + cb(); +}; + +Verifier.prototype.update = function (chunk) { + if (typeof (chunk) === 'string') + chunk = new Buffer(chunk, 'binary'); + this.chunks.push(chunk); +}; + +Verifier.prototype.verify = function (signature, fmt) { + var sig; + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== 'ed25519') + return (false); + sig = signature.toBuffer('raw'); + + } else if (typeof (signature) === 'string') { + sig = new Buffer(signature, 'base64'); + + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + } + + assert.buffer(sig); + return (nacl.sign.detached.verify( + new Uint8Array(Buffer.concat(this.chunks)), + new Uint8Array(sig), + new Uint8Array(this.key.part.R.data))); +}; + +function Signer(key, hashAlgo) { + if (nacl === undefined) + nacl = require('tweetnacl'); + + if (hashAlgo.toLowerCase() !== 'sha512') + throw (new Error('ED25519 only supports the use of ' + + 'SHA-512 hashes')); + + this.key = key; + this.chunks = []; + + stream.Writable.call(this, {}); +} +util.inherits(Signer, stream.Writable); + +Signer.prototype._write = function (chunk, enc, cb) { + this.chunks.push(chunk); + cb(); +}; + +Signer.prototype.update = function (chunk) { + if (typeof (chunk) === 'string') + chunk = new Buffer(chunk, 'binary'); + this.chunks.push(chunk); +}; + +Signer.prototype.sign = function () { + var sig = nacl.sign.detached( + new Uint8Array(Buffer.concat(this.chunks)), + new Uint8Array(this.key.part.r.data)); + var sigBuf = new Buffer(sig); + var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); + sigObj.hashAlgorithm = 'sha512'; + return (sigObj); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js new file mode 100644 index 00000000000..d984f1ac3f6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js @@ -0,0 +1,71 @@ +// Copyright 2015 Joyent, Inc. + +var assert = require('assert-plus'); +var util = require('util'); + +function FingerprintFormatError(fp, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, FingerprintFormatError); + this.name = 'FingerprintFormatError'; + this.fingerprint = fp; + this.format = format; + this.message = 'Fingerprint format is not supported, or is invalid: '; + if (fp !== undefined) + this.message += ' fingerprint = ' + fp; + if (format !== undefined) + this.message += ' format = ' + format; +} +util.inherits(FingerprintFormatError, Error); + +function InvalidAlgorithmError(alg) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, InvalidAlgorithmError); + this.name = 'InvalidAlgorithmError'; + this.algorithm = alg; + this.message = 'Algorithm "' + alg + '" is not supported'; +} +util.inherits(InvalidAlgorithmError, Error); + +function KeyParseError(name, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyParseError); + this.name = 'KeyParseError'; + this.format = format; + this.keyName = name; + this.innerErr = innerErr; + this.message = 'Failed to parse ' + name + ' as a valid ' + format + + ' format key: ' + innerErr.message; +} +util.inherits(KeyParseError, Error); + +function SignatureParseError(type, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, SignatureParseError); + this.name = 'SignatureParseError'; + this.type = type; + this.format = format; + this.innerErr = innerErr; + this.message = 'Failed to parse the given data as a ' + type + + ' signature in ' + format + ' format: ' + innerErr.message; +} +util.inherits(SignatureParseError, Error); + +function KeyEncryptedError(name, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyEncryptedError); + this.name = 'KeyEncryptedError'; + this.format = format; + this.keyName = name; + this.message = 'The ' + format + ' format key ' + name + ' is ' + + 'encrypted (password-protected), and no passphrase was ' + + 'provided in `options`'; +} +util.inherits(KeyEncryptedError, Error); + +module.exports = { + FingerprintFormatError: FingerprintFormatError, + InvalidAlgorithmError: InvalidAlgorithmError, + KeyParseError: KeyParseError, + SignatureParseError: SignatureParseError, + KeyEncryptedError: KeyEncryptedError +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js new file mode 100644 index 00000000000..c607330e7f5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js @@ -0,0 +1,140 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = Fingerprint; + +var assert = require('assert-plus'); +var algs = require('./algs'); +var crypto = require('crypto'); +var errs = require('./errors'); +var Key = require('./key'); +var utils = require('./utils'); + +var FingerprintFormatError = errs.FingerprintFormatError; +var InvalidAlgorithmError = errs.InvalidAlgorithmError; + +function Fingerprint(opts) { + assert.object(opts, 'options'); + assert.buffer(opts.hash, 'options.hash'); + assert.string(opts.algorithm, 'options.algorithm'); + + this.algorithm = opts.algorithm.toLowerCase(); + if (algs.hashAlgs[this.algorithm] !== true) + throw (new InvalidAlgorithmError(this.algorithm)); + + this.hash = opts.hash; +} + +Fingerprint.prototype.toString = function (format) { + if (format === undefined) { + if (this.algorithm === 'md5') + format = 'hex'; + else + format = 'base64'; + } + assert.string(format); + + switch (format) { + case 'hex': + return (addColons(this.hash.toString('hex'))); + case 'base64': + return (sshBase64Format(this.algorithm, + this.hash.toString('base64'))); + default: + throw (new FingerprintFormatError(undefined, format)); + } +}; + +Fingerprint.prototype.matches = function (key) { + assert.object(key, 'key'); + utils.assertCompatible(key, Key, [1, 0], 'key'); + + var theirHash = key.hash(this.algorithm); + var theirHash2 = crypto.createHash(this.algorithm). + update(theirHash).digest('base64'); + + if (this.hash2 === undefined) + this.hash2 = crypto.createHash(this.algorithm). + update(this.hash).digest('base64'); + + return (this.hash2 === theirHash2); +}; + +Fingerprint.parse = function (fp, enAlgs) { + assert.string(fp, 'fingerprint'); + + var alg, hash; + assert.optionalArrayOfString(enAlgs, 'algorithms'); + + var parts = fp.split(':'); + if (parts.length == 2) { + alg = parts[0].toLowerCase(); + /*JSSTYLED*/ + var base64RE = /^[A-Za-z0-9+\/=]+$/; + if (!base64RE.test(parts[1])) + throw (new FingerprintFormatError(fp)); + try { + hash = new Buffer(parts[1], 'base64'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } else if (parts.length > 2) { + alg = 'md5'; + if (parts[0].toLowerCase() === 'md5') + parts = parts.slice(1); + parts = parts.join(''); + /*JSSTYLED*/ + var md5RE = /^[a-fA-F0-9]+$/; + if (!md5RE.test(parts)) + throw (new FingerprintFormatError(fp)); + try { + hash = new Buffer(parts, 'hex'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } + + if (alg === undefined) + throw (new FingerprintFormatError(fp)); + + if (algs.hashAlgs[alg] === undefined) + throw (new InvalidAlgorithmError(alg)); + + if (enAlgs !== undefined) { + enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); + if (enAlgs.indexOf(alg) === -1) + throw (new InvalidAlgorithmError(alg)); + } + + return (new Fingerprint({algorithm: alg, hash: hash})); +}; + +function addColons(s) { + /*JSSTYLED*/ + return (s.replace(/(.{2})(?=.)/g, '$1:')); +} + +function base64Strip(s) { + /*JSSTYLED*/ + return (s.replace(/=*$/, '')); +} + +function sshBase64Format(alg, h) { + return (alg.toUpperCase() + ':' + base64Strip(h)); +} + +Fingerprint.isFingerprint = function (obj, ver) { + return (utils.isCompatible(obj, Fingerprint, ver)); +}; + +/* + * API versions for Fingerprint: + * [1,0] -- initial ver + * [1,1] -- first tagged ver + */ +Fingerprint.prototype._sshpkApiVersion = [1, 1]; + +Fingerprint._oldVersionDetect = function (obj) { + assert.func(obj.toString); + assert.func(obj.matches); + return ([1, 0]); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js new file mode 100644 index 00000000000..973c03245e3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js @@ -0,0 +1,73 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); + +var pem = require('./pem'); +var ssh = require('./ssh'); +var rfc4253 = require('./rfc4253'); + +function read(buf, options) { + if (typeof (buf) === 'string') { + if (buf.trim().match(/^[-]+[ ]*BEGIN/)) + return (pem.read(buf, options)); + if (buf.match(/^\s*ssh-[a-z]/)) + return (ssh.read(buf, options)); + if (buf.match(/^\s*ecdsa-/)) + return (ssh.read(buf, options)); + buf = new Buffer(buf, 'binary'); + } else { + assert.buffer(buf); + if (findPEMHeader(buf)) + return (pem.read(buf, options)); + if (findSSHHeader(buf)) + return (ssh.read(buf, options)); + } + if (buf.readUInt32BE(0) < buf.length) + return (rfc4253.read(buf, options)); + throw (new Error('Failed to auto-detect format of key')); +} + +function findSSHHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) + ++offset; + if (offset + 4 <= buf.length && + buf.slice(offset, offset + 4).toString('ascii') === 'ssh-') + return (true); + if (offset + 6 <= buf.length && + buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-') + return (true); + return (false); +} + +function findPEMHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10)) + ++offset; + if (buf[offset] !== 45) + return (false); + while (offset < buf.length && + (buf[offset] === 45)) + ++offset; + while (offset < buf.length && + (buf[offset] === 32)) + ++offset; + if (offset + 5 > buf.length || + buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN') + return (false); + return (true); +} + +function write(key, options) { + throw (new Error('"auto" format cannot be used for writing')); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js new file mode 100644 index 00000000000..5318b351653 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js @@ -0,0 +1,186 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var crypto = require('crypto'); +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); + +var pkcs1 = require('./pkcs1'); +var pkcs8 = require('./pkcs8'); +var sshpriv = require('./ssh-private'); +var rfc4253 = require('./rfc4253'); + +var errors = require('../errors'); + +/* + * For reading we support both PKCS#1 and PKCS#8. If we find a private key, + * we just take the public component of it and use that. + */ +function read(buf, options, forceType) { + var input = buf; + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var lines = buf.trim().split('\n'); + + var m = lines[0].match(/*JSSTYLED*/ + /[-]+[ ]*BEGIN ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + assert.ok(m, 'invalid PEM header'); + + var m2 = lines[lines.length - 1].match(/*JSSTYLED*/ + /[-]+[ ]*END ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + assert.ok(m2, 'invalid PEM footer'); + + /* Begin and end banners must match key type */ + assert.equal(m[2], m2[2]); + var type = m[2].toLowerCase(); + + var alg; + if (m[1]) { + /* They also must match algorithms, if given */ + assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); + alg = m[1].trim(); + } + + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match(/*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + + var cipher, key, iv; + if (headers['proc-type']) { + var parts = headers['proc-type'].split(','); + if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { + if (typeof (options.passphrase) === 'string') { + options.passphrase = new Buffer( + options.passphrase, 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'PEM')); + } else { + parts = headers['dek-info'].split(','); + assert.ok(parts.length === 2); + cipher = parts[0].toLowerCase(); + iv = new Buffer(parts[1], 'hex'); + key = utils.opensslKeyDeriv(cipher, iv, + options.passphrase, 1).key; + } + } + } + + /* Chop off the first and last lines */ + lines = lines.slice(0, -1).join(''); + buf = new Buffer(lines, 'base64'); + + if (cipher && key && iv) { + var cipherStream = crypto.createDecipheriv(cipher, key, iv); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(buf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + buf = Buffer.concat(chunks); + } + + /* The new OpenSSH internal format abuses PEM headers */ + if (alg && alg.toLowerCase() === 'openssh') + return (sshpriv.readSSHPrivate(type, buf)); + if (alg && alg.toLowerCase() === 'ssh2') + return (rfc4253.readType(type, buf)); + + var der = new asn1.BerReader(buf); + der.originalInput = input; + + /* + * All of the PEM file types start with a sequence tag, so chop it + * off here + */ + der.readSequence(); + + /* PKCS#1 type keys name an algorithm in the banner explicitly */ + if (alg) { + if (forceType) + assert.strictEqual(forceType, 'pkcs1'); + return (pkcs1.readPkcs1(alg, type, der)); + } else { + if (forceType) + assert.strictEqual(forceType, 'pkcs8'); + return (pkcs8.readPkcs8(alg, type, der)); + } +} + +function write(key, options, type) { + assert.object(key); + + var alg = {'ecdsa': 'EC', 'rsa': 'RSA', 'dsa': 'DSA'}[key.type]; + var header; + + var der = new asn1.BerWriter(); + + if (PrivateKey.isPrivateKey(key)) { + if (type && type === 'pkcs8') { + header = 'PRIVATE KEY'; + pkcs8.writePkcs8(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs1'); + header = alg + ' PRIVATE KEY'; + pkcs1.writePkcs1(der, key); + } + + } else if (Key.isKey(key)) { + if (type && type === 'pkcs1') { + header = alg + ' PUBLIC KEY'; + pkcs1.writePkcs1(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs8'); + header = 'PUBLIC KEY'; + pkcs8.writePkcs8(der, key); + } + + } else { + throw (new Error('key is not a Key or PrivateKey')); + } + + var tmp = der.buffer.toString('base64'); + var len = tmp.length + (tmp.length / 64) + + 18 + 16 + header.length*2 + 10; + var buf = new Buffer(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js new file mode 100644 index 00000000000..a5676af6ef8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js @@ -0,0 +1,320 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readPkcs1: readPkcs1, + write: write, + writePkcs1: writePkcs1 +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var algs = require('../algs'); +var utils = require('../utils'); + +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); + +var pkcs8 = require('./pkcs8'); +var readECDSACurve = pkcs8.readECDSACurve; + +function read(buf, options) { + return (pem.read(buf, options, 'pkcs1')); +} + +function write(key, options) { + return (pem.write(key, options, 'pkcs1')); +} + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function readPkcs1(alg, type, der) { + switch (alg) { + case 'RSA': + if (type === 'public') + return (readPkcs1RSAPublic(der)); + else if (type === 'private') + return (readPkcs1RSAPrivate(der)); + throw (new Error('Unknown key type: ' + type)); + case 'DSA': + if (type === 'public') + return (readPkcs1DSAPublic(der)); + else if (type === 'private') + return (readPkcs1DSAPrivate(der)); + throw (new Error('Unknown key type: ' + type)); + case 'EC': + case 'ECDSA': + if (type === 'private') + return (readPkcs1ECDSAPrivate(der)); + else if (type === 'public') + return (readPkcs1ECDSAPublic(der)); + throw (new Error('Unknown key type: ' + type)); + default: + throw (new Error('Unknown key algo: ' + alg)); + } +} + +function readPkcs1RSAPublic(der) { + // modulus and exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'exponent'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'e', data: e }, + { name: 'n', data: n } + ] + }; + + return (new Key(key)); +} + +function readPkcs1RSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version[0], 0); + + // modulus then public exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'public exponent'); + var d = readMPInt(der, 'private exponent'); + var p = readMPInt(der, 'prime1'); + var q = readMPInt(der, 'prime2'); + var dmodp = readMPInt(der, 'exponent1'); + var dmodq = readMPInt(der, 'exponent2'); + var iqmp = readMPInt(der, 'iqmp'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'n', data: n }, + { name: 'e', data: e }, + { name: 'd', data: d }, + { name: 'iqmp', data: iqmp }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'dmodp', data: dmodp }, + { name: 'dmodq', data: dmodq } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1DSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 0); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + var y = readMPInt(der, 'y'); + var x = readMPInt(der, 'x'); + + // now, make the key + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y }, + { name: 'x', data: x } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1DSAPublic(der) { + var y = readMPInt(der, 'y'); + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + var key = { + type: 'dsa', + parts: [ + { name: 'y', data: y }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g } + ] + }; + + return (new Key(key)); +} + +function readPkcs1ECDSAPublic(der) { + der.readSequence(); + + var oid = der.readOID(); + assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey'); + + var curveOid = der.readOID(); + + var curve; + var curves = Object.keys(algs.curves); + for (var j = 0; j < curves.length; ++j) { + var c = curves[j]; + var cd = algs.curves[c]; + if (cd.pkcs8oid === curveOid) { + curve = c; + break; + } + } + assert.string(curve, 'a known ECDSA named curve'); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: new Buffer(curve) }, + { name: 'Q', data: Q } + ] + }; + + return (new Key(key)); +} + +function readPkcs1ECDSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 1); + + // private key + var d = der.readString(asn1.Ber.OctetString, true); + + der.readSequence(0xa0); + var curve = readECDSACurve(der); + assert.string(curve, 'a known elliptic curve'); + + der.readSequence(0xa1); + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: new Buffer(curve) }, + { name: 'Q', data: Q }, + { name: 'd', data: d } + ] + }; + + return (new PrivateKey(key)); +} + +function writePkcs1(der, key) { + der.startSequence(); + + switch (key.type) { + case 'rsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1RSAPrivate(der, key); + else + writePkcs1RSAPublic(der, key); + break; + case 'dsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1DSAPrivate(der, key); + else + writePkcs1DSAPublic(der, key); + break; + case 'ecdsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1ECDSAPrivate(der, key); + else + writePkcs1ECDSAPublic(der, key); + break; + default: + throw (new Error('Unknown key algo: ' + key.type)); + } + + der.endSequence(); +} + +function writePkcs1RSAPublic(der, key) { + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); +} + +function writePkcs1RSAPrivate(der, key) { + var ver = new Buffer(1); + ver[0] = 0; + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); +} + +function writePkcs1DSAPrivate(der, key) { + var ver = new Buffer(1); + ver[0] = 0; + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); +} + +function writePkcs1DSAPublic(der, key) { + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); +} + +function writePkcs1ECDSAPublic(der, key) { + der.startSequence(); + + der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */ + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, 'a known ECDSA named curve'); + der.writeOID(curveOid); + + der.endSequence(); + + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); +} + +function writePkcs1ECDSAPrivate(der, key) { + var ver = new Buffer(1); + ver[0] = 1; + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + + der.startSequence(0xa0); + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, 'a known ECDSA named curve'); + der.writeOID(curveOid); + der.endSequence(); + + der.startSequence(0xa1); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js new file mode 100644 index 00000000000..33fb7cc4759 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js @@ -0,0 +1,510 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readPkcs8: readPkcs8, + write: write, + writePkcs8: writePkcs8, + + readECDSACurve: readECDSACurve, + writeECDSACurve: writeECDSACurve +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); + +function read(buf, options) { + return (pem.read(buf, options, 'pkcs8')); +} + +function write(key, options) { + return (pem.write(key, options, 'pkcs8')); +} + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function readPkcs8(alg, type, der) { + /* Private keys in pkcs#8 format have a weird extra int */ + if (der.peek() === asn1.Ber.Integer) { + assert.strictEqual(type, 'private', + 'unexpected Integer at start of public key'); + der.readString(asn1.Ber.Integer, true); + } + + der.readSequence(); + + var oid = der.readOID(); + switch (oid) { + case '1.2.840.113549.1.1.1': + if (type === 'public') + return (readPkcs8RSAPublic(der)); + else + return (readPkcs8RSAPrivate(der)); + case '1.2.840.10040.4.1': + if (type === 'public') + return (readPkcs8DSAPublic(der)); + else + return (readPkcs8DSAPrivate(der)); + case '1.2.840.10045.2.1': + if (type === 'public') + return (readPkcs8ECDSAPublic(der)); + else + return (readPkcs8ECDSAPrivate(der)); + default: + throw (new Error('Unknown key type OID ' + oid)); + } +} + +function readPkcs8RSAPublic(der) { + // Null -- XXX this probably isn't good practice + der.readByte(); + der.readByte(); + + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + der.readSequence(); + + // modulus + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'exponent'); + + // now, make the key + var key = { + type: 'rsa', + source: der.originalInput, + parts: [ + { name: 'e', data: e }, + { name: 'n', data: n } + ] + }; + + return (new Key(key)); +} + +function readPkcs8RSAPrivate(der) { + der.readByte(); + der.readByte(); + + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var ver = readMPInt(der, 'version'); + assert.equal(ver[0], 0x0, 'unknown RSA private key version'); + + // modulus then public exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'public exponent'); + var d = readMPInt(der, 'private exponent'); + var p = readMPInt(der, 'prime1'); + var q = readMPInt(der, 'prime2'); + var dmodp = readMPInt(der, 'exponent1'); + var dmodq = readMPInt(der, 'exponent2'); + var iqmp = readMPInt(der, 'iqmp'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'n', data: n }, + { name: 'e', data: e }, + { name: 'd', data: d }, + { name: 'iqmp', data: iqmp }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'dmodp', data: dmodp }, + { name: 'dmodq', data: dmodq } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8DSAPublic(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + + var y = readMPInt(der, 'y'); + + // now, make the key + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y } + ] + }; + + return (new Key(key)); +} + +function readPkcs8DSAPrivate(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + der.readSequence(asn1.Ber.OctetString); + var x = readMPInt(der, 'x'); + + /* The pkcs#8 format does not include the public key */ + var y = utils.calculateDSAPublic(g, p, x); + + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y }, + { name: 'x', data: x } + ] + }; + + return (new PrivateKey(key)); +} + +function readECDSACurve(der) { + var curveName, curveNames; + var j, c, cd; + + if (der.peek() === asn1.Ber.OID) { + var oid = der.readOID(); + + curveNames = Object.keys(algs.curves); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + if (cd.pkcs8oid === oid) { + curveName = c; + break; + } + } + + } else { + // ECParameters sequence + der.readSequence(); + var version = der.readString(asn1.Ber.Integer, true); + assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); + + var curve = {}; + + // FieldID sequence + der.readSequence(); + var fieldTypeOid = der.readOID(); + assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', + 'ECDSA key is not from a prime-field'); + var p = curve.p = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + /* + * p always starts with a 1 bit, so count the zeros to get its + * real size. + */ + curve.size = p.length * 8 - utils.countZeros(p); + + // Curve sequence + der.readSequence(); + curve.a = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + curve.b = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + if (der.peek() === asn1.Ber.BitString) + curve.s = der.readString(asn1.Ber.BitString, true); + + // Combined Gx and Gy + curve.G = der.readString(asn1.Ber.OctetString, true); + assert.strictEqual(curve.G[0], 0x4, + 'uncompressed G is required'); + + curve.n = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + curve.h = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + + 'required'); + + curveNames = Object.keys(algs.curves); + var ks = Object.keys(curve); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + var equal = true; + for (var i = 0; i < ks.length; ++i) { + var k = ks[i]; + if (cd[k] === undefined) + continue; + if (typeof (cd[k]) === 'object' && + cd[k].equals !== undefined) { + if (!cd[k].equals(curve[k])) { + equal = false; + break; + } + } else if (Buffer.isBuffer(cd[k])) { + if (cd[k].toString('binary') + !== curve[k].toString('binary')) { + equal = false; + break; + } + } else { + if (cd[k] !== curve[k]) { + equal = false; + break; + } + } + } + if (equal) { + curveName = c; + break; + } + } + } + return (curveName); +} + +function readPkcs8ECDSAPrivate(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var version = readMPInt(der, 'version'); + assert.equal(version[0], 1, 'unknown version of ECDSA key'); + + var d = der.readString(asn1.Ber.OctetString, true); + der.readSequence(0xa1); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: new Buffer(curveName) }, + { name: 'Q', data: Q }, + { name: 'd', data: d } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8ECDSAPublic(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: new Buffer(curveName) }, + { name: 'Q', data: Q } + ] + }; + + return (new Key(key)); +} + +function writePkcs8(der, key) { + der.startSequence(); + + if (PrivateKey.isPrivateKey(key)) { + var sillyInt = new Buffer(1); + sillyInt[0] = 0x0; + der.writeBuffer(sillyInt, asn1.Ber.Integer); + } + + der.startSequence(); + switch (key.type) { + case 'rsa': + der.writeOID('1.2.840.113549.1.1.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8RSAPrivate(key, der); + else + writePkcs8RSAPublic(key, der); + break; + case 'dsa': + der.writeOID('1.2.840.10040.4.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8DSAPrivate(key, der); + else + writePkcs8DSAPublic(key, der); + break; + case 'ecdsa': + der.writeOID('1.2.840.10045.2.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8ECDSAPrivate(key, der); + else + writePkcs8ECDSAPublic(key, der); + break; + default: + throw (new Error('Unsupported key type: ' + key.type)); + } + + der.endSequence(); +} + +function writePkcs8RSAPrivate(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = new Buffer(1); + version[0] = 0; + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); + + der.endSequence(); + der.endSequence(); +} + +function writePkcs8RSAPublic(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + + der.startSequence(); + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); +} + +function writePkcs8DSAPrivate(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writePkcs8DSAPublic(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writeECDSACurve(key, der) { + var curve = algs.curves[key.curve]; + if (curve.pkcs8oid) { + /* This one has a name in pkcs#8, so just write the oid */ + der.writeOID(curve.pkcs8oid); + + } else { + // ECParameters sequence + der.startSequence(); + + var version = new Buffer(1); + version.writeUInt8(1, 0); + der.writeBuffer(version, asn1.Ber.Integer); + + // FieldID sequence + der.startSequence(); + der.writeOID('1.2.840.10045.1.1'); // prime-field + der.writeBuffer(curve.p, asn1.Ber.Integer); + der.endSequence(); + + // Curve sequence + der.startSequence(); + var a = curve.p; + if (a[0] === 0x0) + a = a.slice(1); + der.writeBuffer(a, asn1.Ber.OctetString); + der.writeBuffer(curve.b, asn1.Ber.OctetString); + der.writeBuffer(curve.s, asn1.Ber.BitString); + der.endSequence(); + + der.writeBuffer(curve.G, asn1.Ber.OctetString); + der.writeBuffer(curve.n, asn1.Ber.Integer); + var h = curve.h; + if (!h) { + h = new Buffer(1); + h[0] = 1; + } + der.writeBuffer(h, asn1.Ber.Integer); + + // ECParameters + der.endSequence(); + } +} + +function writePkcs8ECDSAPublic(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); +} + +function writePkcs8ECDSAPrivate(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = new Buffer(1); + version[0] = 1; + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + + der.startSequence(0xa1); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); + + der.endSequence(); + der.endSequence(); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js new file mode 100644 index 00000000000..9d436dd9215 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js @@ -0,0 +1,146 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read.bind(undefined, false, undefined), + readType: read.bind(undefined, false), + write: write, + /* semi-private api, used by sshpk-agent */ + readPartial: read.bind(undefined, true), + + /* shared with ssh format */ + readInternal: read, + keyTypeToAlg: keyTypeToAlg, + algToKeyType: algToKeyType +}; + +var assert = require('assert-plus'); +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var SSHBuffer = require('../ssh-buffer'); + +function algToKeyType(alg) { + assert.string(alg); + if (alg === 'ssh-dss') + return ('dsa'); + else if (alg === 'ssh-rsa') + return ('rsa'); + else if (alg === 'ssh-ed25519') + return ('ed25519'); + else if (alg === 'ssh-curve25519') + return ('curve25519'); + else if (alg.match(/^ecdsa-sha2-/)) + return ('ecdsa'); + else + throw (new Error('Unknown algorithm ' + alg)); +} + +function keyTypeToAlg(key) { + assert.object(key); + if (key.type === 'dsa') + return ('ssh-dss'); + else if (key.type === 'rsa') + return ('ssh-rsa'); + else if (key.type === 'ed25519') + return ('ssh-ed25519'); + else if (key.type === 'curve25519') + return ('ssh-curve25519'); + else if (key.type === 'ecdsa') + return ('ecdsa-sha2-' + key.part.curve.data.toString()); + else + throw (new Error('Unknown key type ' + key.type)); +} + +function read(partial, type, buf, options) { + if (typeof (buf) === 'string') + buf = new Buffer(buf); + assert.buffer(buf, 'buf'); + + var key = {}; + + var parts = key.parts = []; + var sshbuf = new SSHBuffer({buffer: buf}); + + var alg = sshbuf.readString(); + assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); + + key.type = algToKeyType(alg); + + var partCount = algs.info[key.type].parts.length; + if (type && type === 'private') + partCount = algs.privInfo[key.type].parts.length; + + while (!sshbuf.atEnd() && parts.length < partCount) + parts.push(sshbuf.readPart()); + while (!partial && !sshbuf.atEnd()) + parts.push(sshbuf.readPart()); + + assert.ok(parts.length >= 1, + 'key must have at least one part'); + assert.ok(partial || sshbuf.atEnd(), + 'leftover bytes at end of key'); + + var Constructor = Key; + var algInfo = algs.info[key.type]; + if (type === 'private' || algInfo.parts.length !== parts.length) { + algInfo = algs.privInfo[key.type]; + Constructor = PrivateKey; + } + assert.strictEqual(algInfo.parts.length, parts.length); + + if (key.type === 'ecdsa') { + var res = /^ecdsa-sha2-(.+)$/.exec(alg); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + + var normalized = true; + for (var i = 0; i < algInfo.parts.length; ++i) { + parts[i].name = algInfo.parts[i]; + if (parts[i].name !== 'curve' && + algInfo.normalize !== false) { + var p = parts[i]; + var nd = utils.mpNormalize(p.data); + if (nd !== p.data) { + p.data = nd; + normalized = false; + } + } + } + + if (normalized) + key._rfc4253Cache = sshbuf.toBuffer(); + + if (partial && typeof (partial) === 'object') { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + + return (new Constructor(key)); +} + +function write(key, options) { + assert.object(key); + + var alg = keyTypeToAlg(key); + var i; + + var algInfo = algs.info[key.type]; + if (PrivateKey.isPrivateKey(key)) + algInfo = algs.privInfo[key.type]; + var parts = algInfo.parts; + + var buf = new SSHBuffer({}); + + buf.writeString(alg); + + for (i = 0; i < parts.length; ++i) { + var data = key.part[parts[i]].data; + if (algInfo.normalize !== false) + data = utils.mpNormalize(data); + buf.writeBuffer(data); + } + + return (buf.toBuffer()); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js new file mode 100644 index 00000000000..bfbdab527f9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js @@ -0,0 +1,138 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readSSHPrivate: readSSHPrivate, + write: write +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var algs = require('../algs'); +var utils = require('../utils'); +var crypto = require('crypto'); + +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); +var rfc4253 = require('./rfc4253'); +var SSHBuffer = require('../ssh-buffer'); + +function read(buf, options) { + return (pem.read(buf, options)); +} + +var MAGIC = 'openssh-key-v1'; + +function readSSHPrivate(type, buf) { + buf = new SSHBuffer({buffer: buf}); + + var magic = buf.readCString(); + assert.strictEqual(magic, MAGIC, 'bad magic string'); + + var cipher = buf.readString(); + var kdf = buf.readString(); + + /* We only support unencrypted keys. */ + if (cipher !== 'none' || kdf !== 'none') { + throw (new Error('OpenSSH-format key is encrypted ' + + '(password-protected). Please use the SSH agent ' + + 'or decrypt the key.')); + } + + /* Skip over kdfoptions. */ + buf.readString(); + + var nkeys = buf.readInt(); + if (nkeys !== 1) { + throw (new Error('OpenSSH-format key file contains ' + + 'multiple keys: this is unsupported.')); + } + + var pubKey = buf.readBuffer(); + + if (type === 'public') { + assert.ok(buf.atEnd(), 'excess bytes left after key'); + return (rfc4253.read(pubKey)); + } + + var privKeyBlob = buf.readBuffer(); + assert.ok(buf.atEnd(), 'excess bytes left after key'); + + buf = new SSHBuffer({buffer: privKeyBlob}); + + var checkInt1 = buf.readInt(); + var checkInt2 = buf.readInt(); + assert.strictEqual(checkInt1, checkInt2, 'checkints do not match'); + + var ret = {}; + var key = rfc4253.readInternal(ret, 'private', buf.remainder()); + + buf.skip(ret.consumed); + + var comment = buf.readString(); + key.comment = comment; + + return (key); +} + +function write(key, options) { + var pubKey; + if (PrivateKey.isPrivateKey(key)) + pubKey = key.toPublic(); + else + pubKey = key; + + var privBuf; + if (PrivateKey.isPrivateKey(key)) { + privBuf = new SSHBuffer({}); + var checkInt = crypto.randomBytes(4).readUInt32BE(0); + privBuf.writeInt(checkInt); + privBuf.writeInt(checkInt); + privBuf.write(key.toBuffer('rfc4253')); + privBuf.writeString(key.comment || ''); + + var n = 1; + while (privBuf._offset % 8 !== 0) + privBuf.writeChar(n++); + } + + var buf = new SSHBuffer({}); + + buf.writeCString(MAGIC); + buf.writeString('none'); /* cipher */ + buf.writeString('none'); /* kdf */ + buf.writeBuffer(new Buffer(0)); /* kdfoptions */ + + buf.writeInt(1); /* nkeys */ + buf.writeBuffer(pubKey.toBuffer('rfc4253')); + + if (privBuf) + buf.writeBuffer(privBuf.toBuffer()); + + buf = buf.toBuffer(); + + var header; + if (PrivateKey.isPrivateKey(key)) + header = 'OPENSSH PRIVATE KEY'; + else + header = 'OPENSSH PUBLIC KEY'; + + var tmp = buf.toString('base64'); + var len = tmp.length + (tmp.length / 70) + + 18 + 16 + header.length*2 + 10; + buf = new Buffer(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 70; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js new file mode 100644 index 00000000000..655c9eaf3bf --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js @@ -0,0 +1,114 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var rfc4253 = require('./rfc4253'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); + +var sshpriv = require('./ssh-private'); + +/*JSSTYLED*/ +var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/; +/*JSSTYLED*/ +var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/; + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var trimmed = buf.trim().replace(/[\\\r]/g, ''); + var m = trimmed.match(SSHKEY_RE); + if (!m) + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, 'key must match regex'); + + var type = rfc4253.algToKeyType(m[1]); + var kbuf = new Buffer(m[2], 'base64'); + + /* + * This is a bit tricky. If we managed to parse the key and locate the + * key comment with the regex, then do a non-partial read and assert + * that we have consumed all bytes. If we couldn't locate the key + * comment, though, there may be whitespace shenanigans going on that + * have conjoined the comment to the rest of the key. We do a partial + * read in this case to try to make the best out of a sorry situation. + */ + var key; + var ret = {}; + if (m[4]) { + try { + key = rfc4253.read(kbuf); + + } catch (e) { + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, 'key must match regex'); + kbuf = new Buffer(m[2], 'base64'); + key = rfc4253.readInternal(ret, 'public', kbuf); + } + } else { + key = rfc4253.readInternal(ret, 'public', kbuf); + } + + assert.strictEqual(type, key.type); + + if (m[4] && m[4].length > 0) { + key.comment = m[4]; + + } else if (ret.consumed) { + /* + * Now the magic: trying to recover the key comment when it's + * gotten conjoined to the key or otherwise shenanigan'd. + * + * Work out how much base64 we used, then drop all non-base64 + * chars from the beginning up to this point in the the string. + * Then offset in this and try to make up for missing = chars. + */ + var data = m[2] + m[3]; + var realOffset = Math.ceil(ret.consumed / 3) * 4; + data = data.slice(0, realOffset - 2). /*JSSTYLED*/ + replace(/[^a-zA-Z0-9+\/=]/g, '') + + data.slice(realOffset - 2); + + var padding = ret.consumed % 3; + if (padding > 0 && + data.slice(realOffset - 1, realOffset) !== '=') + realOffset--; + while (data.slice(realOffset, realOffset + 1) === '=') + realOffset++; + + /* Finally, grab what we think is the comment & clean it up. */ + var trailer = data.slice(realOffset); + trailer = trailer.replace(/[\r\n]/g, ' '). + replace(/^\s+/, ''); + if (trailer.match(/^[a-zA-Z0-9]/)) + key.comment = trailer; + } + + return (key); +} + +function write(key, options) { + assert.object(key); + if (!Key.isKey(key)) + throw (new Error('Must be a public key')); + + var parts = []; + var alg = rfc4253.keyTypeToAlg(key); + parts.push(alg); + + var buf = rfc4253.write(key); + parts.push(buf.toString('base64')); + + if (key.comment) + parts.push(key.comment); + + return (new Buffer(parts.join(' '))); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js new file mode 100644 index 00000000000..0b40429c95c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js @@ -0,0 +1,26 @@ +// Copyright 2015 Joyent, Inc. + +var Key = require('./key'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var PrivateKey = require('./private-key'); +var errs = require('./errors'); + +module.exports = { + /* top-level classes */ + Key: Key, + parseKey: Key.parse, + Fingerprint: Fingerprint, + parseFingerprint: Fingerprint.parse, + Signature: Signature, + parseSignature: Signature.parse, + PrivateKey: PrivateKey, + parsePrivateKey: PrivateKey.parse, + + /* errors */ + FingerprintFormatError: errs.FingerprintFormatError, + InvalidAlgorithmError: errs.InvalidAlgorithmError, + KeyParseError: errs.KeyParseError, + SignatureParseError: errs.SignatureParseError, + KeyEncryptedError: errs.KeyEncryptedError +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js new file mode 100644 index 00000000000..edc5143426a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js @@ -0,0 +1,269 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = Key; + +var assert = require('assert-plus'); +var algs = require('./algs'); +var crypto = require('crypto'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var DiffieHellman = require('./dhe'); +var errs = require('./errors'); +var utils = require('./utils'); +var PrivateKey = require('./private-key'); +var edCompat; + +try { + edCompat = require('./ed-compat'); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; + +var formats = {}; +formats['auto'] = require('./formats/auto'); +formats['pem'] = require('./formats/pem'); +formats['pkcs1'] = require('./formats/pkcs1'); +formats['pkcs8'] = require('./formats/pkcs8'); +formats['rfc4253'] = require('./formats/rfc4253'); +formats['ssh'] = require('./formats/ssh'); +formats['ssh-private'] = require('./formats/ssh-private'); +formats['openssh'] = formats['ssh-private']; + +function Key(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + assert.optionalString(opts.comment, 'options.comment'); + + var algInfo = algs.info[opts.type]; + if (typeof (algInfo) !== 'object') + throw (new InvalidAlgorithmError(opts.type)); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.parts = opts.parts; + this.part = partLookup; + this.comment = undefined; + this.source = opts.source; + + /* for speeding up hashing/fingerprint operations */ + this._rfc4253Cache = opts._rfc4253Cache; + this._hashCache = {}; + + var sz; + this.curve = undefined; + if (this.type === 'ecdsa') { + var curve = this.part.curve.data.toString(); + this.curve = curve; + sz = algs.curves[curve].size; + } else if (this.type === 'ed25519') { + sz = 256; + this.curve = 'curve25519'; + } else { + var szPart = this.part[algInfo.sizePart]; + sz = szPart.data.length; + sz = sz * 8 - utils.countZeros(szPart.data); + } + this.size = sz; +} + +Key.formats = formats; + +Key.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'ssh'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + if (format === 'rfc4253') { + if (this._rfc4253Cache === undefined) + this._rfc4253Cache = formats['rfc4253'].write(this); + return (this._rfc4253Cache); + } + + return (formats[format].write(this, options)); +}; + +Key.prototype.toString = function (format, options) { + return (this.toBuffer(format, options).toString()); +}; + +Key.prototype.hash = function (algo) { + assert.string(algo, 'algorithm'); + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + if (this._hashCache[algo]) + return (this._hashCache[algo]); + + var hash = crypto.createHash(algo). + update(this.toBuffer('rfc4253')).digest(); + this._hashCache[algo] = hash; + return (hash); +}; + +Key.prototype.fingerprint = function (algo) { + if (algo === undefined) + algo = 'sha256'; + assert.string(algo, 'algorithm'); + var opts = { + hash: this.hash(algo), + algorithm: algo + }; + return (new Fingerprint(opts)); +}; + +Key.prototype.defaultHashAlgorithm = function () { + var hashAlgo = 'sha1'; + if (this.type === 'rsa') + hashAlgo = 'sha256'; + if (this.type === 'dsa' && this.size > 1024) + hashAlgo = 'sha256'; + if (this.type === 'ed25519') + hashAlgo = 'sha512'; + if (this.type === 'ecdsa') { + if (this.size <= 256) + hashAlgo = 'sha256'; + else if (this.size <= 384) + hashAlgo = 'sha384'; + else + hashAlgo = 'sha512'; + } + return (hashAlgo); +}; + +Key.prototype.createVerify = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Verifier(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldVerify = v.verify.bind(v); + var key = this.toBuffer('pkcs8'); + var self = this; + v.verify = function (signature, fmt) { + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== self.type) + return (false); + if (signature.hashAlgorithm && + signature.hashAlgorithm !== hashAlgo) + return (false); + return (oldVerify(key, signature.toBuffer('asn1'))); + + } else if (typeof (signature) === 'string' || + Buffer.isBuffer(signature)) { + return (oldVerify(key, signature, fmt)); + + /* + * Avoid doing this on valid arguments, walking the prototype + * chain can be quite slow. + */ + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + + } else { + throw (new TypeError('signature must be a string, ' + + 'Buffer, or Signature object')); + } + }; + return (v); +}; + +Key.prototype.createDiffieHellman = function () { + if (this.type === 'rsa') + throw (new Error('RSA keys do not support Diffie-Hellman')); + + return (new DiffieHellman(this)); +}; +Key.prototype.createDH = Key.prototype.createDiffieHellman; + +Key.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + if (k instanceof PrivateKey) + k = k.toPublic(); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +Key.isKey = function (obj, ver) { + return (utils.isCompatible(obj, Key, ver)); +}; + +/* + * API versions for Key: + * [1,0] -- initial ver, may take Signature for createVerify or may not + * [1,1] -- added pkcs1, pkcs8 formats + * [1,2] -- added auto, ssh-private, openssh formats + * [1,3] -- added defaultHashAlgorithm + * [1,4] -- added ed support, createDH + * [1,5] -- first explicitly tagged version + */ +Key.prototype._sshpkApiVersion = [1, 5]; + +Key._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + assert.func(obj.fingerprint); + if (obj.createDH) + return ([1, 4]); + if (obj.defaultHashAlgorithm) + return ([1, 3]); + if (obj.formats['auto']) + return ([1, 2]); + if (obj.formats['pkcs1']) + return ([1, 1]); + return ([1, 0]); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js new file mode 100644 index 00000000000..f80d9396628 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js @@ -0,0 +1,231 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = PrivateKey; + +var assert = require('assert-plus'); +var algs = require('./algs'); +var crypto = require('crypto'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var errs = require('./errors'); +var util = require('util'); +var utils = require('./utils'); +var edCompat; +var ed; + +try { + edCompat = require('./ed-compat'); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var Key = require('./key'); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; +var KeyEncryptedError = errs.KeyEncryptedError; + +var formats = {}; +formats['auto'] = require('./formats/auto'); +formats['pem'] = require('./formats/pem'); +formats['pkcs1'] = require('./formats/pkcs1'); +formats['pkcs8'] = require('./formats/pkcs8'); +formats['rfc4253'] = require('./formats/rfc4253'); +formats['ssh-private'] = require('./formats/ssh-private'); +formats['openssh'] = formats['ssh-private']; +formats['ssh'] = formats['ssh-private']; + +function PrivateKey(opts) { + assert.object(opts, 'options'); + Key.call(this, opts); + + this._pubCache = undefined; +} +util.inherits(PrivateKey, Key); + +PrivateKey.formats = formats; + +PrivateKey.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'pkcs1'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +PrivateKey.prototype.hash = function (algo) { + return (this.toPublic().hash(algo)); +}; + +PrivateKey.prototype.toPublic = function () { + if (this._pubCache) + return (this._pubCache); + + var algInfo = algs.info[this.type]; + var pubParts = []; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = algInfo.parts[i]; + pubParts.push(this.part[p]); + } + + this._pubCache = new Key({ + type: this.type, + source: this, + parts: pubParts + }); + if (this.comment) + this._pubCache.comment = this.comment; + return (this._pubCache); +}; + +PrivateKey.prototype.derive = function (newType, newSize) { + assert.string(newType, 'type'); + assert.optionalNumber(newSize, 'size'); + var priv, pub; + + if (this.type === 'ed25519' && newType === 'curve25519') { + if (ed === undefined) + ed = require('jodid25519'); + + priv = this.part.r.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + priv = priv.slice(0, 32); + + pub = ed.dh.publicKey(priv); + priv = utils.mpNormalize(Buffer.concat([priv, pub])); + + return (new PrivateKey({ + type: 'curve25519', + parts: [ + { name: 'R', data: utils.mpNormalize(pub) }, + { name: 'r', data: priv } + ] + })); + } else if (this.type === 'curve25519' && newType === 'ed25519') { + if (ed === undefined) + ed = require('jodid25519'); + + priv = this.part.r.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + priv = priv.slice(0, 32); + + pub = ed.eddsa.publicKey(priv.toString('binary')); + pub = new Buffer(pub, 'binary'); + + priv = utils.mpNormalize(Buffer.concat([priv, pub])); + + return (new PrivateKey({ + type: 'ed25519', + parts: [ + { name: 'R', data: utils.mpNormalize(pub) }, + { name: 'r', data: priv } + ] + })); + } + throw (new Error('Key derivation not supported from ' + this.type + + ' to ' + newType)); +}; + +PrivateKey.prototype.createVerify = function (hashAlgo) { + return (this.toPublic().createVerify(hashAlgo)); +}; + +PrivateKey.prototype.createSign = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Signer(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldSign = v.sign.bind(v); + var key = this.toBuffer('pkcs1'); + var type = this.type; + v.sign = function () { + var sig = oldSign(key); + if (typeof (sig) === 'string') + sig = new Buffer(sig, 'binary'); + sig = Signature.parse(sig, type, 'asn1'); + sig.hashAlgorithm = hashAlgo; + return (sig); + }; + return (v); +}; + +PrivateKey.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + assert.ok(k instanceof PrivateKey, 'key is not a private key'); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +PrivateKey.isPrivateKey = function (obj, ver) { + return (utils.isCompatible(obj, PrivateKey, ver)); +}; + +/* + * API versions for PrivateKey: + * [1,0] -- initial ver + * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats + * [1,2] -- added defaultHashAlgorithm + * [1,3] -- added derive, ed, createDH + * [1,4] -- first tagged version + */ +PrivateKey.prototype._sshpkApiVersion = [1, 4]; + +PrivateKey._oldVersionDetect = function (obj) { + assert.func(obj.toPublic); + assert.func(obj.createSign); + if (obj.derive) + return ([1, 3]); + if (obj.defaultHashAlgorithm) + return ([1, 2]); + if (obj.formats['auto']) + return ([1, 1]); + return ([1, 0]); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js new file mode 100644 index 00000000000..ddf4a8c988c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js @@ -0,0 +1,237 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = Signature; + +var assert = require('assert-plus'); +var algs = require('./algs'); +var crypto = require('crypto'); +var errs = require('./errors'); +var utils = require('./utils'); +var asn1 = require('asn1'); +var SSHBuffer = require('./ssh-buffer'); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var SignatureParseError = errs.SignatureParseError; + +function Signature(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.hashAlgorithm = opts.hashAlgo; + this.parts = opts.parts; + this.part = partLookup; +} + +Signature.prototype.toBuffer = function (format) { + if (format === undefined) + format = 'asn1'; + assert.string(format, 'format'); + + var buf; + + switch (this.type) { + case 'rsa': + case 'ed25519': + if (format === 'ssh') { + buf = new SSHBuffer({}); + buf.writeString('ssh-' + this.type); + buf.writePart(this.part.sig); + return (buf.toBuffer()); + } else { + return (this.part.sig.data); + } + + case 'dsa': + case 'ecdsa': + var r, s; + if (format === 'asn1') { + var der = new asn1.BerWriter(); + der.startSequence(); + r = utils.mpNormalize(this.part.r.data); + s = utils.mpNormalize(this.part.s.data); + der.writeBuffer(r, asn1.Ber.Integer); + der.writeBuffer(s, asn1.Ber.Integer); + der.endSequence(); + return (der.buffer); + } else if (format === 'ssh' && this.type === 'dsa') { + buf = new SSHBuffer({}); + buf.writeString('ssh-dss'); + r = this.part.r.data; + if (r[0] === 0x00) + r = r.slice(1); + s = this.part.s.data; + buf.writeBuffer(Buffer.concat([r, s])); + return (buf.toBuffer()); + } else if (format === 'ssh' && this.type === 'ecdsa') { + var inner = new SSHBuffer({}); + r = this.part.r; + if (r[0] === 0x00) + r = r.slice(1); + inner.writePart(r); + inner.writePart(this.part.s); + + buf = new SSHBuffer({}); + /* XXX: find a more proper way to do this? */ + var curve; + var sz = this.part.r.data.length * 8; + if (sz === 256) + curve = 'nistp256'; + else if (sz === 384) + curve = 'nistp384'; + else if (sz === 528) + curve = 'nistp521'; + buf.writeString('ecdsa-sha2-' + curve); + buf.writeBuffer(inner.toBuffer()); + return (buf.toBuffer()); + } + throw (new Error('Invalid signature format')); + default: + throw (new Error('Invalid signature data')); + } +}; + +Signature.prototype.toString = function (format) { + assert.optionalString(format, 'format'); + return (this.toBuffer(format).toString('base64')); +}; + +Signature.parse = function (data, type, format) { + if (typeof (data) === 'string') + data = new Buffer(data, 'base64'); + assert.buffer(data, 'data'); + assert.string(format, 'format'); + assert.string(type, 'type'); + + var opts = {}; + opts.type = type.toLowerCase(); + opts.parts = []; + + try { + assert.ok(data.length > 0, 'signature must not be empty'); + switch (opts.type) { + case 'rsa': + return (parseOneNum(data, type, format, opts, + 'ssh-rsa')); + case 'ed25519': + return (parseOneNum(data, type, format, opts, + 'ssh-ed25519')); + + case 'dsa': + case 'ecdsa': + if (format === 'asn1') + return (parseDSAasn1(data, type, format, opts)); + else if (opts.type === 'dsa') + return (parseDSA(data, type, format, opts)); + else + return (parseECDSA(data, type, format, opts)); + + default: + throw (new InvalidAlgorithmError(type)); + } + + } catch (e) { + if (e instanceof InvalidAlgorithmError) + throw (e); + throw (new SignatureParseError(type, format, e)); + } +}; + +function parseOneNum(data, type, format, opts, headType) { + if (format === 'ssh') { + try { + var buf = new SSHBuffer({buffer: data}); + var head = buf.readString(); + } catch (e) { + /* fall through */ + } + if (head === headType) { + var sig = buf.readPart(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + sig.name = 'sig'; + opts.parts.push(sig); + return (new Signature(opts)); + } + } + opts.parts.push({name: 'sig', data: data}); + return (new Signature(opts)); +} + +function parseDSAasn1(data, type, format, opts) { + var der = new asn1.BerReader(data); + der.readSequence(); + var r = der.readString(asn1.Ber.Integer, true); + var s = der.readString(asn1.Ber.Integer, true); + + opts.parts.push({name: 'r', data: utils.mpNormalize(r)}); + opts.parts.push({name: 's', data: utils.mpNormalize(s)}); + + return (new Signature(opts)); +} + +function parseDSA(data, type, format, opts) { + if (data.length != 40) { + var buf = new SSHBuffer({buffer: data}); + var d = buf.readBuffer(); + if (d.toString('ascii') === 'ssh-dss') + d = buf.readBuffer(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + assert.strictEqual(d.length, 40, 'invalid inner length'); + data = d; + } + opts.parts.push({name: 'r', data: data.slice(0, 20)}); + opts.parts.push({name: 's', data: data.slice(20, 40)}); + return (new Signature(opts)); +} + +function parseECDSA(data, type, format, opts) { + var buf = new SSHBuffer({buffer: data}); + + var r, s; + var inner = buf.readBuffer(); + if (inner.toString('ascii').match(/^ecdsa-/)) { + inner = buf.readBuffer(); + assert.ok(buf.atEnd(), 'extra trailing bytes on outer'); + buf = new SSHBuffer({buffer: inner}); + r = buf.readPart(); + } else { + r = {data: inner}; + } + + s = buf.readPart(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + + r.name = 'r'; + s.name = 's'; + + opts.parts.push(r); + opts.parts.push(s); + return (new Signature(opts)); +} + +Signature.isSignature = function (obj, ver) { + return (utils.isCompatible(obj, Signature, ver)); +}; + +/* + * API versions for Signature: + * [1,0] -- initial ver + * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent + * hashAlgorithm property + * [2,1] -- first tagged version + */ +Signature.prototype._sshpkApiVersion = [2, 1]; + +Signature._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + if (obj.hasOwnProperty('hashAlgorithm')) + return ([2, 0]); + return ([1, 0]); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js new file mode 100644 index 00000000000..0b002773495 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js @@ -0,0 +1,124 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = SSHBuffer; + +var assert = require('assert-plus'); + +function SSHBuffer(opts) { + assert.object(opts, 'options'); + if (opts.buffer !== undefined) + assert.buffer(opts.buffer, 'options.buffer'); + + this._size = opts.buffer ? opts.buffer.length : 1024; + this._buffer = opts.buffer || (new Buffer(this._size)); + this._offset = 0; +} + +SSHBuffer.prototype.toBuffer = function () { + return (this._buffer.slice(0, this._offset)); +}; + +SSHBuffer.prototype.atEnd = function () { + return (this._offset >= this._buffer.length); +}; + +SSHBuffer.prototype.remainder = function () { + return (this._buffer.slice(this._offset)); +}; + +SSHBuffer.prototype.skip = function (n) { + this._offset += n; +}; + +SSHBuffer.prototype.expand = function () { + this._size *= 2; + var buf = new Buffer(this._size); + this._buffer.copy(buf, 0); + this._buffer = buf; +}; + +SSHBuffer.prototype.readPart = function () { + return ({data: this.readBuffer()}); +}; + +SSHBuffer.prototype.readBuffer = function () { + var len = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + assert.ok(this._offset + len <= this._buffer.length, + 'length out of bounds at +0x' + this._offset.toString(16) + + ' (data truncated?)'); + var buf = this._buffer.slice(this._offset, this._offset + len); + this._offset += len; + return (buf); +}; + +SSHBuffer.prototype.readString = function () { + return (this.readBuffer().toString()); +}; + +SSHBuffer.prototype.readCString = function () { + var offset = this._offset; + while (offset < this._buffer.length && + this._buffer[offset] !== 0x00) + offset++; + assert.ok(offset < this._buffer.length, 'c string does not terminate'); + var str = this._buffer.slice(this._offset, offset).toString(); + this._offset = offset + 1; + return (str); +}; + +SSHBuffer.prototype.readInt = function () { + var v = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + return (v); +}; + +SSHBuffer.prototype.readChar = function () { + var v = this._buffer[this._offset++]; + return (v); +}; + +SSHBuffer.prototype.writeBuffer = function (buf) { + while (this._offset + 4 + buf.length > this._size) + this.expand(); + this._buffer.writeUInt32BE(buf.length, this._offset); + this._offset += 4; + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; + +SSHBuffer.prototype.writeString = function (str) { + this.writeBuffer(new Buffer(str, 'utf8')); +}; + +SSHBuffer.prototype.writeCString = function (str) { + while (this._offset + 1 + str.length > this._size) + this.expand(); + this._buffer.write(str, this._offset); + this._offset += str.length; + this._buffer[this._offset++] = 0; +}; + +SSHBuffer.prototype.writeInt = function (v) { + while (this._offset + 4 > this._size) + this.expand(); + this._buffer.writeUInt32BE(v, this._offset); + this._offset += 4; +}; + +SSHBuffer.prototype.writeChar = function (v) { + while (this._offset + 1 > this._size) + this.expand(); + this._buffer[this._offset++] = v; +}; + +SSHBuffer.prototype.writePart = function (p) { + this.writeBuffer(p.data); +}; + +SSHBuffer.prototype.write = function (buf) { + while (this._offset + buf.length > this._size) + this.expand(); + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js new file mode 100644 index 00000000000..d57245cc16b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js @@ -0,0 +1,246 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + bufferSplit: bufferSplit, + addRSAMissing: addRSAMissing, + calculateDSAPublic: calculateDSAPublic, + mpNormalize: mpNormalize, + ecNormalize: ecNormalize, + countZeros: countZeros, + assertCompatible: assertCompatible, + isCompatible: isCompatible, + opensslKeyDeriv: opensslKeyDeriv +}; + +var assert = require('assert-plus'); +var PrivateKey = require('./private-key'); +var crypto = require('crypto'); + +var MAX_CLASS_DEPTH = 3; + +function isCompatible(obj, klass, needVer) { + if (obj === null || typeof (obj) !== 'object') + return (false); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return (true); + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + if (!proto || ++depth > MAX_CLASS_DEPTH) + return (false); + } + if (proto.constructor.name !== klass.name) + return (false); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + if (ver[0] != needVer[0] || ver[1] < needVer[1]) + return (false); + return (true); +} + +function assertCompatible(obj, klass, needVer, name) { + if (name === undefined) + name = 'object'; + assert.ok(obj, name + ' must not be null'); + assert.object(obj, name + ' must be an object'); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return; + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, + name + ' must be a ' + klass.name + ' instance'); + } + assert.strictEqual(proto.constructor.name, klass.name, + name + ' must be a ' + klass.name + ' instance'); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], + name + ' must be compatible with ' + klass.name + ' klass ' + + 'version ' + needVer[0] + '.' + needVer[1]); +} + +var CIPHER_LEN = { + 'des-ede3-cbc': { key: 7, iv: 8 }, + 'aes-128-cbc': { key: 16, iv: 16 } +}; +var PKCS5_SALT_LEN = 8; + +function opensslKeyDeriv(cipher, salt, passphrase, count) { + assert.buffer(salt, 'salt'); + assert.buffer(passphrase, 'passphrase'); + assert.number(count, 'iteration count'); + + var clen = CIPHER_LEN[cipher]; + assert.object(clen, 'supported cipher'); + + salt = salt.slice(0, PKCS5_SALT_LEN); + + var D, D_prev, bufs; + var material = new Buffer(0); + while (material.length < clen.key + clen.iv) { + bufs = []; + if (D_prev) + bufs.push(D_prev); + bufs.push(passphrase); + bufs.push(salt); + D = Buffer.concat(bufs); + for (var j = 0; j < count; ++j) + D = crypto.createHash('md5').update(D).digest(); + material = Buffer.concat([material, D]); + D_prev = D; + } + + return ({ + key: material.slice(0, clen.key), + iv: material.slice(clen.key, clen.key + clen.iv) + }); +} + +/* Count leading zero bits on a buffer */ +function countZeros(buf) { + var o = 0, obit = 8; + while (o < buf.length) { + var mask = (1 << obit); + if ((buf[o] & mask) === mask) + break; + obit--; + if (obit < 0) { + o++; + obit = 8; + } + } + return (o*8 + (8 - obit) - 1); +} + +function bufferSplit(buf, chr) { + assert.buffer(buf); + assert.string(chr); + + var parts = []; + var lastPart = 0; + var matches = 0; + for (var i = 0; i < buf.length; ++i) { + if (buf[i] === chr.charCodeAt(matches)) + ++matches; + else if (buf[i] === chr.charCodeAt(0)) + matches = 1; + else + matches = 0; + + if (matches >= chr.length) { + var newPart = i + 1; + parts.push(buf.slice(lastPart, newPart - matches)); + lastPart = newPart; + matches = 0; + } + } + if (lastPart <= buf.length) + parts.push(buf.slice(lastPart, buf.length)); + + return (parts); +} + +function ecNormalize(buf, addZero) { + assert.buffer(buf); + if (buf[0] === 0x00 && buf[1] === 0x04) { + if (addZero) + return (buf); + return (buf.slice(1)); + } else if (buf[0] === 0x04) { + if (!addZero) + return (buf); + } else { + while (buf[0] === 0x00) + buf = buf.slice(1); + if (buf[0] === 0x02 || buf[0] === 0x03) + throw (new Error('Compressed elliptic curve points ' + + 'are not supported')); + if (buf[0] !== 0x04) + throw (new Error('Not a valid elliptic curve point')); + if (!addZero) + return (buf); + } + var b = new Buffer(buf.length + 1); + b[0] = 0x0; + buf.copy(b, 1); + return (b); +} + +function mpNormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) + buf = buf.slice(1); + if ((buf[0] & 0x80) === 0x80) { + var b = new Buffer(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function bigintToMpBuf(bigint) { + var buf = new Buffer(bigint.toByteArray()); + buf = mpNormalize(buf); + return (buf); +} + +function calculateDSAPublic(g, p, x) { + assert.buffer(g); + assert.buffer(p); + assert.buffer(x); + try { + var bigInt = require('jsbn').BigInteger; + } catch (e) { + throw (new Error('To load a PKCS#8 format DSA private key, ' + + 'the node jsbn library is required.')); + } + g = new bigInt(g); + p = new bigInt(p); + x = new bigInt(x); + var y = g.modPow(x, p); + var ybuf = bigintToMpBuf(y); + return (ybuf); +} + +function addRSAMissing(key) { + assert.object(key); + assertCompatible(key, PrivateKey, [1, 1]); + try { + var bigInt = require('jsbn').BigInteger; + } catch (e) { + throw (new Error('To write a PEM private key from ' + + 'this source, the node jsbn lib is required.')); + } + + var d = new bigInt(key.part.d.data); + var buf; + + if (!key.part.dmodp) { + var p = new bigInt(key.part.p.data); + var dmodp = d.mod(p.subtract(1)); + + buf = bigintToMpBuf(dmodp); + key.part.dmodp = {name: 'dmodp', data: buf}; + key.parts.push(key.part.dmodp); + } + if (!key.part.dmodq) { + var q = new bigInt(key.part.q.data); + var dmodq = d.mod(q.subtract(1)); + + buf = bigintToMpBuf(dmodq); + key.part.dmodq = {name: 'dmodq', data: buf}; + key.parts.push(key.part.dmodq); + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 new file mode 100644 index 00000000000..0887dce2728 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 @@ -0,0 +1,135 @@ +.TH sshpk\-conv 1 "Jan 2016" sshpk "sshpk Commands" +.SH NAME +.PP +sshpk\-conv \- convert between key formats +.SH SYNOPSYS +.PP +\fB\fCsshpk\-conv\fR \-t FORMAT [FILENAME] [OPTIONS...] +.PP +\fB\fCsshpk\-conv\fR \-i [FILENAME] [OPTIONS...] +.SH DESCRIPTION +.PP +Reads in a public or private key and converts it between different formats, +particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7 +formats. +.PP +In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to +stderr information about its nature, size and fingerprint. +.SH EXAMPLES +.PP +Assume the following SSH\-format public key in \fB\fCid_ecdsa.pub\fR: +.PP +.RS +.nf +ecdsa\-sha2\-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host +.fi +.RE +.PP +Identify it with \fB\fC\-i\fR: +.PP +.RS +.nf +$ sshpk\-conv \-i id_ecdsa.pub +id_ecdsa: a 256 bit ECDSA public key +ECDSA curve: nistp256 +Comment: user@host +Fingerprint: + SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k + 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51 +.fi +.RE +.PP +Convert it to \fB\fCpkcs8\fR format, for use with e.g. OpenSSL: +.PP +.RS +.nf +$ sshpk\-conv \-t pkcs8 id_ecdsa +\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR +zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg== +\-\-\-\-\-END PUBLIC KEY\-\-\-\-\- +.fi +.RE +.PP +Retrieve the public half of a private key: +.PP +.RS +.nf +$ openssl genrsa 2048 | sshpk\-conv \-t ssh \-c foo@bar +ssh\-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar +.fi +.RE +.PP +Convert a private key to PKCS#1 (OpenSSL) format from a new\-style OpenSSH key +format (the \fB\fCssh\-keygen \-o\fR format): +.PP +.RS +.nf +$ ssh\-keygen \-o \-f foobar +\&... +$ sshpk\-conv \-p \-t pkcs1 foobar +\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\- +MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL.... +\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\- +.fi +.RE +.SH OPTIONS +.TP +\fB\fC\-i, \-\-identify\fR +Instead of converting the key, output identifying information about it to +stderr, including its type, size and fingerprints. +.TP +\fB\fC\-p, \-\-private\fR +Treat the key as a private key instead of a public key (the default). If you +supply \fB\fCsshpk\-conv\fR with a private key and do not give this option, it will +extract only the public half of the key from it and work with that. +.TP +\fB\fC\-f PATH, \-\-file=PATH\fR +Input file to take the key from instead of stdin. If a filename is supplied +as a positional argument, it is equivalent to using this option. +.TP +\fB\fC\-o PATH, \-\-out=PATH\fR +Output file name to use instead of stdout. +.PP +\fB\fC\-T FORMAT, \-\-informat=FORMAT\fR +.TP +\fB\fC\-t FORMAT, \-\-outformat=FORMAT\fR +Selects the input and output formats to be used (see FORMATS, below). +.TP +\fB\fC\-c TEXT, \-\-comment=TEXT\fR +Sets the key comment for the output file, if supported. +.SH FORMATS +.PP +Currently supported formats: +.TP +\fB\fCpem, pkcs1\fR +The standard PEM format used by older OpenSSH and most TLS libraries such as +OpenSSL. The classic \fB\fCid_rsa\fR file is usually in this format. It is an ASN.1 +encoded structure, base64\-encoded and placed between PEM headers. +.TP +\fB\fCssh\fR +The SSH public key text format (the format of an \fB\fCid_rsa.pub\fR file). A single +line, containing 3 space separated parts: the key type, key body and optional +key comment. +.TP +\fB\fCpkcs8\fR +A newer PEM format, usually used only for public keys by TLS libraries such +as OpenSSL. The ASN.1 structure is more generic than that of \fB\fCpkcs1\fR\&. +.TP +\fB\fCopenssh\fR +The new \fB\fCssh\-keygen \-o\fR format from OpenSSH. This can be mistaken for a PEM +encoding but is actually an OpenSSH internal format. +.TP +\fB\fCrfc4253\fR +The internal binary format of keys when sent over the wire in the SSH +protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol. +.SH SEE ALSO +.PP +.BR ssh-keygen (1), +.BR openssl (1) +.SH BUGS +.PP +Encrypted (password\-protected) keys are not supported. +.PP +Report bugs at Github +\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 new file mode 100644 index 00000000000..749916ba887 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 @@ -0,0 +1,81 @@ +.TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands" +.SH NAME +.PP +sshpk\-sign \- sign data using an SSH key +.SH SYNOPSYS +.PP +\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...] +.SH DESCRIPTION +.PP +Takes in arbitrary bytes, and signs them using an SSH private key. The key can +be of any type or format supported by the \fB\fCsshpk\fR library, including the +standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8. +.PP +The signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fR +option is given. +.SH EXAMPLES +.PP +Signing with default settings: +.PP +.RS +.nf +$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa +MEUCIAMdLS/vXrrtWFepwe... +.fi +.RE +.PP +Signing in SSH (RFC 4253) format (rather than the default ASN.1): +.PP +.RS +.nf +$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t ssh +AAAAFGVjZHNhLXNoYTIt... +.fi +.RE +.PP +Saving the binary signature to a file: +.PP +.RS +.nf +$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\ + \-o signature.bin \-b +$ cat signature.bin | base64 +MEUCIAMdLS/vXrrtWFepwe... +.fi +.RE +.SH OPTIONS +.TP +\fB\fC\-v, \-\-verbose\fR +Print extra information about the key and signature to stderr when signing. +.TP +\fB\fC\-b, \-\-binary\fR +Don't base64\-encode the signature before outputting it. +.TP +\fB\fC\-i KEY, \-\-identity=KEY\fR +Select the key to be used for signing. \fB\fCKEY\fR must be a relative or absolute +filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR library +is supported, including OpenSSH formats and standard PEM PKCS. +.TP +\fB\fC\-f PATH, \-\-file=PATH\fR +Input file to sign instead of stdin. +.TP +\fB\fC\-o PATH, \-\-out=PATH\fR +Output file to save signature in instead of stdout. +.TP +\fB\fC\-H HASH, \-\-hash=HASH\fR +Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, +\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash +algorithms may be used (e.g. ED25519 keys can only use SHA\-512). +.TP +\fB\fC\-t FORMAT, \-\-format=FORMAT\fR +Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for +ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format +used with TLS and typically the standard in most non\-SSH libraries (e.g. +OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. +.SH SEE ALSO +.PP +.BR sshpk-verify (1) +.SH BUGS +.PP +Report bugs at Github +\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 new file mode 100644 index 00000000000..f79169d2753 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 @@ -0,0 +1,68 @@ +.TH sshpk\-verify 1 "Jan 2016" sshpk "sshpk Commands" +.SH NAME +.PP +sshpk\-verify \- verify a signature on data using an SSH key +.SH SYNOPSYS +.PP +\fB\fCsshpk\-verify\fR \-i KEYPATH \-s SIGNATURE [OPTION...] +.SH DESCRIPTION +.PP +Takes in arbitrary bytes and a Base64\-encoded signature, and verifies that the +signature was produced by the private half of the given SSH public key. +.SH EXAMPLES +.PP +.RS +.nf +$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s MEUCIQCYp... +OK +$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s GARBAGE... +NOT OK +.fi +.RE +.SH EXIT STATUS +.TP +\fB\fC0\fR +Signature validates and matches the key. +.TP +\fB\fC1\fR +Signature is parseable and the correct length but does not match the key or +otherwise is invalid. +.TP +\fB\fC2\fR +The signature or key could not be parsed. +.TP +\fB\fC3\fR +Invalid commandline options were supplied. +.SH OPTIONS +.TP +\fB\fC\-v, \-\-verbose\fR +Print extra information about the key and signature to stderr when verifying. +.TP +\fB\fC\-i KEY, \-\-identity=KEY\fR +Select the key to be used for verification. \fB\fCKEY\fR must be a relative or +absolute filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR +library is supported, including OpenSSH formats and standard PEM PKCS. +.TP +\fB\fC\-s BASE64, \-\-signature=BASE64\fR +Supplies the base64\-encoded signature to be verified. +.TP +\fB\fC\-f PATH, \-\-file=PATH\fR +Input file to verify instead of stdin. +.TP +\fB\fC\-H HASH, \-\-hash=HASH\fR +Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, +\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash +algorithms may be used (e.g. ED25519 keys can only use SHA\-512). +.TP +\fB\fC\-t FORMAT, \-\-format=FORMAT\fR +Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for +ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format +used with TLS and typically the standard in most non\-SSH libraries (e.g. +OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. +.SH SEE ALSO +.PP +.BR sshpk-sign (1) +.SH BUGS +.PP +Report bugs at Github +\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS new file mode 100644 index 00000000000..1923524fe40 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS @@ -0,0 +1,6 @@ +Dave Eddy +Fred Kuo +Lars-Magnus Skog +Mark Cavage +Patrick Mooney +Rob Gulewich diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md new file mode 100644 index 00000000000..57d92bfdb9d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md @@ -0,0 +1,14 @@ +# assert-plus Changelog + +## 1.0.0 + +- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input +- Add assert.finite check. Previous assert.number callers should use this if + they expect Infinity inputs to throw. + +## 0.2.0 + +- Fix `assert.object(null)` so it throws +- Fix optional/arrayOf exports for non-type-of asserts +- Add optiona/arrayOf exports for Stream/Date/Regex/uuid +- Add basic unit test coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md new file mode 100644 index 00000000000..ec200d161ef --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md @@ -0,0 +1,162 @@ +# assert-plus + +This library is a super small wrapper over node's assert module that has two +things: (1) the ability to disable assertions with the environment variable +NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like +`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks +like this: + +```javascript + var assert = require('assert-plus'); + + function fooAccount(options, callback) { + assert.object(options, 'options'); + assert.number(options.id, 'options.id'); + assert.bool(options.isManager, 'options.isManager'); + assert.string(options.name, 'options.name'); + assert.arrayOfString(options.email, 'options.email'); + assert.func(callback, 'callback'); + + // Do stuff + callback(null, {}); + } +``` + +# API + +All methods that *aren't* part of node's core assert API are simply assumed to +take an argument, and then a string 'name' that's not a message; `AssertionError` +will be thrown if the assertion fails with a message like: + + AssertionError: foo (string) is required + at test (/home/mark/work/foo/foo.js:3:9) + at Object. (/home/mark/work/foo/foo.js:15:1) + at Module._compile (module.js:446:26) + at Object..js (module.js:464:10) + at Module.load (module.js:353:31) + at Function._load (module.js:311:12) + at Array.0 (module.js:484:10) + at EventEmitter._tickCallback (node.js:190:38) + +from: + +```javascript + function test(foo) { + assert.string(foo, 'foo'); + } +``` + +There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: + +```javascript + function test(foo) { + assert.arrayOfString(foo, 'foo'); + } +``` + +You can assert IFF an argument is not `undefined` (i.e., an optional arg): + +```javascript + assert.optionalString(foo, 'foo'); +``` + +Lastly, you can opt-out of assertion checking altogether by setting the +environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have +lots of assertions, and don't want to pay `typeof ()` taxes to v8 in +production. Be advised: The standard functions re-exported from `assert` are +also disabled in assert-plus if NDEBUG is specified. Using them directly from +the `assert` module avoids this behavior. + +The complete list of APIs is: + +* assert.array +* assert.bool +* assert.buffer +* assert.func +* assert.number +* assert.finite +* assert.object +* assert.string +* assert.stream +* assert.date +* assert.regexp +* assert.uuid +* assert.arrayOfArray +* assert.arrayOfBool +* assert.arrayOfBuffer +* assert.arrayOfFunc +* assert.arrayOfNumber +* assert.arrayOfFinite +* assert.arrayOfObject +* assert.arrayOfString +* assert.arrayOfStream +* assert.arrayOfDate +* assert.arrayOfRegexp +* assert.arrayOfUuid +* assert.optionalArray +* assert.optionalBool +* assert.optionalBuffer +* assert.optionalFunc +* assert.optionalNumber +* assert.optionalFinite +* assert.optionalObject +* assert.optionalString +* assert.optionalStream +* assert.optionalDate +* assert.optionalRegexp +* assert.optionalUuid +* assert.optionalArrayOfArray +* assert.optionalArrayOfBool +* assert.optionalArrayOfBuffer +* assert.optionalArrayOfFunc +* assert.optionalArrayOfNumber +* assert.optionalArrayOfFinite +* assert.optionalArrayOfObject +* assert.optionalArrayOfString +* assert.optionalArrayOfStream +* assert.optionalArrayOfDate +* assert.optionalArrayOfRegexp +* assert.optionalArrayOfUuid +* assert.AssertionError +* assert.fail +* assert.ok +* assert.equal +* assert.notEqual +* assert.deepEqual +* assert.notDeepEqual +* assert.strictEqual +* assert.notStrictEqual +* assert.throws +* assert.doesNotThrow +* assert.ifError + +# Installation + + npm install assert-plus + +## License + +The MIT License (MIT) +Copyright (c) 2012 Mark Cavage + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +## Bugs + +See . diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js new file mode 100644 index 00000000000..26f944eec30 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js @@ -0,0 +1,211 @@ +// Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. + +var assert = require('assert'); +var Stream = require('stream').Stream; +var util = require('util'); + + +///--- Globals + +/* JSSTYLED */ +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + + +///--- Internal + +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); +} + +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); +} + +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); +} + +function noop() { + // Why even bother with asserts? +} + + +///--- Exports + +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; + } + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } +}; + +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } + + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { + if (k === 'AssertionError') { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json new file mode 100644 index 00000000000..25a6d698626 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + "assert-plus@^1.0.0", + "/Users/eshanker/Code/fsevents/node_modules/sshpk" + ] + ], + "_from": "assert-plus@>=1.0.0 <2.0.0", + "_id": "assert-plus@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/sshpk/assert-plus", + "_nodeVersion": "0.10.40", + "_npmUser": { + "email": "patrick.f.mooney@gmail.com", + "name": "pfmooney" + }, + "_npmVersion": "3.3.9", + "_phantomChildren": {}, + "_requested": { + "name": "assert-plus", + "raw": "assert-plus@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/sshpk" + ], + "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", + "_shrinkwrap": null, + "_spec": "assert-plus@^1.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/sshpk", + "author": { + "email": "mcavage@gmail.com", + "name": "Mark Cavage" + }, + "bugs": { + "url": "https://github.com/mcavage/node-assert-plus/issues" + }, + "contributors": [ + { + "email": "dave@daveeddy.com", + "name": "Dave Eddy" + }, + { + "email": "fred.kuo@joyent.com", + "name": "Fred Kuo" + }, + { + "email": "ralphtheninja@riseup.net", + "name": "Lars-Magnus Skog" + }, + { + "email": "mcavage@gmail.com", + "name": "Mark Cavage" + }, + { + "email": "pmooney@pfmooney.com", + "name": "Patrick Mooney" + }, + { + "email": "robert.gulewich@joyent.com", + "name": "Rob Gulewich" + } + ], + "dependencies": {}, + "description": "Extra assertions on top of node's assert module", + "devDependencies": { + "faucet": "0.0.1", + "tape": "4.2.2" + }, + "directories": {}, + "dist": { + "shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", + "tarball": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + }, + "engines": { + "node": ">=0.8" + }, + "homepage": "https://github.com/mcavage/node-assert-plus#readme", + "license": "MIT", + "main": "./assert.js", + "maintainers": [ + { + "email": "mcavage@gmail.com", + "name": "mcavage" + }, + { + "email": "patrick.f.mooney@gmail.com", + "name": "pfmooney" + } + ], + "name": "assert-plus", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mcavage/node-assert-plus.git" + }, + "scripts": { + "test": "tape tests/*.js | ./node_modules/.bin/faucet" + }, + "version": "1.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json new file mode 100644 index 00000000000..dcb361becd7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + "sshpk@^1.7.0", + "/Users/eshanker/Code/fsevents/node_modules/http-signature" + ] + ], + "_from": "sshpk@>=1.7.0 <2.0.0", + "_id": "sshpk@1.8.3", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/sshpk", + "_nodeVersion": "0.12.13", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/sshpk-1.8.3.tgz_1461968607532_0.32797130732797086" + }, + "_npmUser": { + "email": "alex@cooperi.net", + "name": "arekinath" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "name": "sshpk", + "raw": "sshpk@^1.7.0", + "rawSpec": "^1.7.0", + "scope": null, + "spec": ">=1.7.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/http-signature" + ], + "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz", + "_shasum": "890cc9d614dc5292e5cb1a543b03c9abaa5c374e", + "_shrinkwrap": null, + "_spec": "sshpk@^1.7.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/http-signature", + "author": { + "name": "Joyent, Inc" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "bugs": { + "url": "https://github.com/arekinath/node-sshpk/issues" + }, + "contributors": [ + { + "email": "dave@daveeddy.com", + "name": "Dave Eddy" + }, + { + "email": "mcavage@gmail.com", + "name": "Mark Cavage" + }, + { + "email": "alex@cooperi.net", + "name": "Alex Wilson" + } + ], + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jodid25519": "^1.0.0", + "jsbn": "~0.1.0", + "tweetnacl": "~0.13.0" + }, + "description": "A library for finding and using SSH public keys", + "devDependencies": { + "benchmark": "^1.0.0", + "sinon": "^1.17.2", + "tape": "^3.5.0", + "temp": "^0.8.2" + }, + "directories": { + "bin": "./bin", + "lib": "./lib", + "man": "./man/man1" + }, + "dist": { + "shasum": "890cc9d614dc5292e5cb1a543b03c9abaa5c374e", + "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "gitHead": "82d39066b2df4e8284350ff5ebb08c5b95c74652", + "homepage": "https://github.com/arekinath/node-sshpk#readme", + "license": "MIT", + "main": "lib/index.js", + "maintainers": [ + { + "email": "alex@cooperi.net", + "name": "arekinath" + } + ], + "man": [ + "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-conv.1", + "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-sign.1", + "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-verify.1" + ], + "name": "sshpk", + "optionalDependencies": { + "ecc-jsbn": "~0.1.1", + "jodid25519": "^1.0.0", + "jsbn": "~0.1.0", + "tweetnacl": "~0.13.0" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/arekinath/node-sshpk.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "version": "1.8.3" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js new file mode 100644 index 00000000000..aa2f839b6dd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js @@ -0,0 +1,32 @@ +'use strict'; +var stripAnsi = require('strip-ansi'); +var codePointAt = require('code-point-at'); +var isFullwidthCodePoint = require('is-fullwidth-code-point'); + +// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345 +module.exports = function (str) { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + var width = 0; + + str = stripAnsi(str); + + for (var i = 0; i < str.length; i++) { + var code = codePointAt(str, i); + + // surrogates + if (code >= 0x10000) { + i++; + } + + if (isFullwidthCodePoint(code)) { + width += 2; + } else { + width++; + } + } + + return width; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json new file mode 100644 index 00000000000..8fa2102b022 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "string-width@^1.0.1", + "/Users/eshanker/Code/fsevents/node_modules/gauge" + ] + ], + "_from": "string-width@>=1.0.1 <2.0.0", + "_id": "string-width@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/string-width", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "string-width", + "raw": "string-width@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/gauge", + "/fsevents/wide-align" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz", + "_shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", + "_shrinkwrap": null, + "_spec": "string-width@^1.0.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", + "tarball": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "f279cfd14835f0a3c8df69ba18e9a3960156e135", + "homepage": "https://github.com/sindresorhus/string-width", + "keywords": [ + "ansi", + "char", + "character", + "chinese", + "cjk", + "cli", + "codes", + "column", + "columns", + "command-line", + "console", + "escape", + "fixed-width", + "full", + "full-width", + "fullwidth", + "japanese", + "korean", + "str", + "string", + "terminal", + "unicode", + "visual", + "width" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "string-width", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md new file mode 100644 index 00000000000..a7737a986c5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md @@ -0,0 +1,41 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install --save string-width +``` + + +## Usage + +```js +var stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore new file mode 100644 index 00000000000..206320cc1d2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore @@ -0,0 +1,2 @@ +build +test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000000..6de584a48f5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE @@ -0,0 +1,20 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md new file mode 100644 index 00000000000..4d2aa001501 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md @@ -0,0 +1,7 @@ +**string_decoder.js** (`require('string_decoder')`) from Node.js core + +Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. + +Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** + +The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js new file mode 100644 index 00000000000..b00e54fb790 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js @@ -0,0 +1,221 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). + this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. + this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. + this.charLength = 0; +}; + + +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var available = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; + } + break; + } + + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; +} + +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json new file mode 100644 index 00000000000..6d95b19f1e8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + "string_decoder@~0.10.x", + "/Users/eshanker/Code/fsevents/node_modules/readable-stream" + ] + ], + "_from": "string_decoder@>=0.10.0 <0.11.0", + "_id": "string_decoder@0.10.31", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/string_decoder", + "_npmUser": { + "email": "rod@vagg.org", + "name": "rvagg" + }, + "_npmVersion": "1.4.23", + "_phantomChildren": {}, + "_requested": { + "name": "string_decoder", + "raw": "string_decoder@~0.10.x", + "rawSpec": "~0.10.x", + "scope": null, + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/bl/readable-stream", + "/fsevents/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_shrinkwrap": null, + "_spec": "string_decoder@~0.10.x", + "_where": "/Users/eshanker/Code/fsevents/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "dependencies": {}, + "description": "The string_decoder module from Node core", + "devDependencies": { + "tap": "~0.4.8" + }, + "directories": {}, + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "browser", + "browserify", + "decoder", + "string" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "mail@substack.net", + "name": "substack" + }, + { + "email": "rod@vagg.org", + "name": "rvagg" + } + ], + "name": "string_decoder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "version": "0.10.31" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore new file mode 100644 index 00000000000..7dccd970766 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore @@ -0,0 +1,15 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +node_modules +npm-debug.log \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml new file mode 100644 index 00000000000..f1d0f13c8a5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt new file mode 100644 index 00000000000..ab861acdc12 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2012 Michael Hart (michael.hart.au@gmail.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md new file mode 100644 index 00000000000..32fc9825565 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md @@ -0,0 +1,38 @@ +# Decode streams into strings The Right Way(tm) + +```javascript +var fs = require('fs') +var zlib = require('zlib') +var strs = require('stringstream') + +var utf8Stream = fs.createReadStream('massiveLogFile.gz') + .pipe(zlib.createGunzip()) + .pipe(strs('utf8')) +``` + +No need to deal with `setEncoding()` weirdness, just compose streams +like they were supposed to be! + +Handles input and output encoding: + +```javascript +// Stream from utf8 to hex to base64... Why not, ay. +var hex64Stream = fs.createReadStream('myFile') + .pipe(strs('utf8', 'hex')) + .pipe(strs('hex', 'base64')) +``` + +Also deals with `base64` output correctly by aligning each emitted data +chunk so that there are no dangling `=` characters: + +```javascript +var stream = fs.createReadStream('myFile').pipe(strs('base64')) + +var base64Str = '' + +stream.on('data', function(data) { base64Str += data }) +stream.on('end', function() { + console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding() + console.log('Original file is: ' + new Buffer(base64Str, 'base64')) +}) +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js new file mode 100644 index 00000000000..f82b85edc7f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js @@ -0,0 +1,27 @@ +var fs = require('fs') +var zlib = require('zlib') +var strs = require('stringstream') + +var utf8Stream = fs.createReadStream('massiveLogFile.gz') + .pipe(zlib.createGunzip()) + .pipe(strs('utf8')) + +utf8Stream.pipe(process.stdout) + +// Stream from utf8 to hex to base64... Why not, ay. +var hex64Stream = fs.createReadStream('myFile') + .pipe(strs('utf8', 'hex')) + .pipe(strs('hex', 'base64')) + +hex64Stream.pipe(process.stdout) + +// Deals with base64 correctly by aligning chunks +var stream = fs.createReadStream('myFile').pipe(strs('base64')) + +var base64Str = '' + +stream.on('data', function(data) { base64Str += data }) +stream.on('end', function() { + console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding() + console.log('Original file is: ' + new Buffer(base64Str, 'base64')) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json new file mode 100644 index 00000000000..3c567cc9e42 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "stringstream@~0.0.4", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "stringstream@>=0.0.4 <0.1.0", + "_id": "stringstream@0.0.5", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/stringstream", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "michael.hart.au@gmail.com", + "name": "hichaelmart" + }, + "_npmVersion": "2.14.8", + "_phantomChildren": {}, + "_requested": { + "name": "stringstream", + "raw": "stringstream@~0.0.4", + "rawSpec": "~0.0.4", + "scope": null, + "spec": ">=0.0.4 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "_shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", + "_shrinkwrap": null, + "_spec": "stringstream@~0.0.4", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "author": { + "email": "michael.hart.au@gmail.com", + "name": "Michael Hart", + "url": "http://github.com/mhart" + }, + "bugs": { + "url": "https://github.com/mhart/StringStream/issues" + }, + "dependencies": {}, + "description": "Encode and decode streams into string streams", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", + "tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" + }, + "gitHead": "1efe3bf507bf3a1161f8473908b60e881d41422b", + "homepage": "https://github.com/mhart/StringStream#readme", + "keywords": [ + "base64", + "gzip", + "stream", + "string" + ], + "license": "MIT", + "main": "stringstream.js", + "maintainers": [ + { + "email": "michael.hart.au@gmail.com", + "name": "hichaelmart" + } + ], + "name": "stringstream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/mhart/StringStream.git" + }, + "scripts": {}, + "version": "0.0.5" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js new file mode 100644 index 00000000000..4ece1275f44 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js @@ -0,0 +1,102 @@ +var util = require('util') +var Stream = require('stream') +var StringDecoder = require('string_decoder').StringDecoder + +module.exports = StringStream +module.exports.AlignedStringDecoder = AlignedStringDecoder + +function StringStream(from, to) { + if (!(this instanceof StringStream)) return new StringStream(from, to) + + Stream.call(this) + + if (from == null) from = 'utf8' + + this.readable = this.writable = true + this.paused = false + this.toEncoding = (to == null ? from : to) + this.fromEncoding = (to == null ? '' : from) + this.decoder = new AlignedStringDecoder(this.toEncoding) +} +util.inherits(StringStream, Stream) + +StringStream.prototype.write = function(data) { + if (!this.writable) { + var err = new Error('stream not writable') + err.code = 'EPIPE' + this.emit('error', err) + return false + } + if (this.fromEncoding) { + if (Buffer.isBuffer(data)) data = data.toString() + data = new Buffer(data, this.fromEncoding) + } + var string = this.decoder.write(data) + if (string.length) this.emit('data', string) + return !this.paused +} + +StringStream.prototype.flush = function() { + if (this.decoder.flush) { + var string = this.decoder.flush() + if (string.length) this.emit('data', string) + } +} + +StringStream.prototype.end = function() { + if (!this.writable && !this.readable) return + this.flush() + this.emit('end') + this.writable = this.readable = false + this.destroy() +} + +StringStream.prototype.destroy = function() { + this.decoder = null + this.writable = this.readable = false + this.emit('close') +} + +StringStream.prototype.pause = function() { + this.paused = true +} + +StringStream.prototype.resume = function () { + if (this.paused) this.emit('drain') + this.paused = false +} + +function AlignedStringDecoder(encoding) { + StringDecoder.call(this, encoding) + + switch (this.encoding) { + case 'base64': + this.write = alignedWrite + this.alignedBuffer = new Buffer(3) + this.alignedBytes = 0 + break + } +} +util.inherits(AlignedStringDecoder, StringDecoder) + +AlignedStringDecoder.prototype.flush = function() { + if (!this.alignedBuffer || !this.alignedBytes) return '' + var leftover = this.alignedBuffer.toString(this.encoding, 0, this.alignedBytes) + this.alignedBytes = 0 + return leftover +} + +function alignedWrite(buffer) { + var rem = (this.alignedBytes + buffer.length) % this.alignedBuffer.length + if (!rem && !this.alignedBytes) return buffer.toString(this.encoding) + + var returnBuffer = new Buffer(this.alignedBytes + buffer.length - rem) + + this.alignedBuffer.copy(returnBuffer, 0, 0, this.alignedBytes) + buffer.copy(returnBuffer, this.alignedBytes, 0, buffer.length - rem) + + buffer.copy(this.alignedBuffer, 0, buffer.length - rem, buffer.length) + this.alignedBytes = rem + + return returnBuffer.toString(this.encoding) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000..099480fbfc5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000..cc5b0090c60 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + "strip-ansi@^3.0.1", + "/Users/eshanker/Code/fsevents/node_modules/gauge" + ] + ], + "_from": "strip-ansi@>=3.0.1 <4.0.0", + "_id": "strip-ansi@3.0.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/strip-ansi", + "_nodeVersion": "0.12.7", + "_npmOperationalInternal": { + "host": "packages-9-west.internal.npmjs.com", + "tmp": "tmp/strip-ansi-3.0.1.tgz_1456057278183_0.28958667791448534" + }, + "_npmUser": { + "email": "jappelman@xebia.com", + "name": "jbnicolai" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "strip-ansi", + "raw": "strip-ansi@^3.0.1", + "rawSpec": "^3.0.1", + "scope": null, + "spec": ">=3.0.1 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/chalk", + "/fsevents/gauge", + "/fsevents/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", + "_shrinkwrap": null, + "_spec": "strip-ansi@^3.0.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "description": "Strip ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", + "tarball": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "8270705c704956da865623e564eba4875c3ea17f", + "homepage": "https://github.com/chalk/strip-ansi", + "keywords": [ + "256", + "ansi", + "color", + "colors", + "colour", + "command-line", + "console", + "escape", + "formatting", + "log", + "logging", + "remove", + "rgb", + "shell", + "string", + "strip", + "styles", + "terminal", + "text", + "trim", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + { + "email": "jappelman@xebia.com", + "name": "jbnicolai" + } + ], + "name": "strip-ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000000..cb7d9ff7ee4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js new file mode 100755 index 00000000000..aec5aa20e4a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js @@ -0,0 +1,41 @@ +#!/usr/bin/env node +'use strict'; +var fs = require('fs'); +var strip = require('./strip-json-comments'); +var input = process.argv[2]; + + +function getStdin(cb) { + var ret = ''; + + process.stdin.setEncoding('utf8'); + + process.stdin.on('data', function (data) { + ret += data; + }); + + process.stdin.on('end', function () { + cb(ret); + }); +} + +if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { + console.log('strip-json-comments input-file > output-file'); + console.log('or'); + console.log('strip-json-comments < input-file > output-file'); + return; +} + +if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { + console.log(require('./package').version); + return; +} + +if (input) { + process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); + return; +} + +getStdin(function (data) { + process.stdout.write(strip(data)); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json new file mode 100644 index 00000000000..01e092d0078 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + "strip-json-comments@~1.0.4", + "/Users/eshanker/Code/fsevents/node_modules/rc" + ] + ], + "_from": "strip-json-comments@>=1.0.4 <1.1.0", + "_id": "strip-json-comments@1.0.4", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/strip-json-comments", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "strip-json-comments", + "raw": "strip-json-comments@~1.0.4", + "rawSpec": "~1.0.4", + "scope": null, + "spec": ">=1.0.4 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/rc" + ], + "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "_shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", + "_shrinkwrap": null, + "_spec": "strip-json-comments@~1.0.4", + "_where": "/Users/eshanker/Code/fsevents/node_modules/rc", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bin": { + "strip-json-comments": "cli.js" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-json-comments/issues" + }, + "dependencies": {}, + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", + "tarball": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "cli.js", + "strip-json-comments.js" + ], + "gitHead": "f58348696368583cc5bb18525fe31eacc9bd00e1", + "homepage": "https://github.com/sindresorhus/strip-json-comments", + "keywords": [ + "bin", + "cli", + "comments", + "conf", + "config", + "configuration", + "delete", + "env", + "environment", + "json", + "multiline", + "parse", + "remove", + "settings", + "strip", + "trim", + "util" + ], + "license": "MIT", + "main": "strip-json-comments", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "strip-json-comments", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-json-comments.git" + }, + "scripts": { + "test": "mocha --ui tdd" + }, + "version": "1.0.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md new file mode 100644 index 00000000000..63ce165b238 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md @@ -0,0 +1,80 @@ +# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments) + +> Strip comments from JSON. Lets you use comments in your JSON files! + +This is now possible: + +```js +{ + // rainbows + "unicorn": /* ❤ */ "cake" +} +``` + +It will remove single-line comments `//` and multi-line comments `/**/`. + +Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. + +- + +*There's also [`json-comments`](https://npmjs.org/package/json-comments), but it's only for Node.js, inefficient, bloated as it also minifies, and comes with a `require` hook, which is :(* + + +## Install + +```sh +$ npm install --save strip-json-comments +``` + +```sh +$ bower install --save strip-json-comments +``` + +```sh +$ component install sindresorhus/strip-json-comments +``` + + +## Usage + +```js +var json = '{/*rainbows*/"unicorn":"cake"}'; +JSON.parse(stripJsonComments(json)); +//=> {unicorn: 'cake'} +``` + + +## API + +### stripJsonComments(input) + +#### input + +Type: `string` + +Accepts a string with JSON and returns a string without comments. + + +## CLI + +```sh +$ npm install --global strip-json-comments +``` + +```sh +$ strip-json-comments --help + +strip-json-comments input-file > output-file +# or +strip-json-comments < input-file > output-file +``` + + +## Related + +- [`strip-css-comments`](https://github.com/sindresorhus/strip-css-comments) + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js new file mode 100644 index 00000000000..eb77ce7456b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js @@ -0,0 +1,73 @@ +/*! + strip-json-comments + Strip comments from JSON. Lets you use comments in your JSON files! + https://github.com/sindresorhus/strip-json-comments + by Sindre Sorhus + MIT License +*/ +(function () { + 'use strict'; + + var singleComment = 1; + var multiComment = 2; + + function stripJsonComments(str) { + var currentChar; + var nextChar; + var insideString = false; + var insideComment = false; + var ret = ''; + + for (var i = 0; i < str.length; i++) { + currentChar = str[i]; + nextChar = str[i + 1]; + + if (!insideComment && currentChar === '"') { + var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!insideComment && !escaped && currentChar === '"') { + insideString = !insideString; + } + } + + if (insideString) { + ret += currentChar; + continue; + } + + if (!insideComment && currentChar + nextChar === '//') { + insideComment = singleComment; + i++; + } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { + insideComment = false; + i++; + ret += currentChar; + ret += nextChar; + continue; + } else if (insideComment === singleComment && currentChar === '\n') { + insideComment = false; + } else if (!insideComment && currentChar + nextChar === '/*') { + insideComment = multiComment; + i++; + continue; + } else if (insideComment === multiComment && currentChar + nextChar === '*/') { + insideComment = false; + i++; + continue; + } + + if (insideComment) { + continue; + } + + ret += currentChar; + } + + return ret; + } + + if (typeof module !== 'undefined' && module.exports) { + module.exports = stripJsonComments; + } else { + window.stripJsonComments = stripJsonComments; + } +})(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js new file mode 100644 index 00000000000..4346e272e1f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json new file mode 100644 index 00000000000..a7906fa1d7d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "supports-color@^2.0.0", + "/Users/eshanker/Code/fsevents/node_modules/chalk" + ] + ], + "_from": "supports-color@>=2.0.0 <3.0.0", + "_id": "supports-color@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/supports-color", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "supports-color", + "raw": "supports-color@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "_shasum": "535d045ce6b6363fa40117084629995e9df324c7", + "_shrinkwrap": null, + "_spec": "supports-color@^2.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/chalk", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "dependencies": {}, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + }, + "directories": {}, + "dist": { + "shasum": "535d045ce6b6363fa40117084629995e9df324c7", + "tarball": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "index.js" + ], + "gitHead": "8400d98ade32b2adffd50902c06d9e725a5c6588", + "homepage": "https://github.com/chalk/supports-color", + "keywords": [ + "256", + "ansi", + "capability", + "cli", + "color", + "colors", + "colour", + "command-line", + "console", + "detect", + "rgb", + "shell", + "styles", + "support", + "supports", + "terminal", + "tty", + "xterm" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + { + "email": "jappelman@xebia.com", + "name": "jbnicolai" + } + ], + "name": "supports-color", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md new file mode 100644 index 00000000000..b4761f1ecde --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore new file mode 100644 index 00000000000..c6f386f85f3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore @@ -0,0 +1,14 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid + +pids +logs +results + +npm-debug.log +node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml new file mode 100644 index 00000000000..cf5d63687de --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml @@ -0,0 +1,7 @@ +sudo: false +language: node_js +node_js: + - stable + - "0.10" + - "0.8" +before_install: if [[ `npm --version` != 3* ]]; then npm install -g npm; fi; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE new file mode 100644 index 00000000000..67b20da3089 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2014, Forbes Lindesay +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md new file mode 100644 index 00000000000..dab8dc99f5a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md @@ -0,0 +1,81 @@ +# Tar Pack + +Package and un-package modules of some sort (in tar/gz bundles). This is mostly useful for package managers. Note that it doesn't check for or touch `package.json` so it can be used even if that's not the way you store your package info. + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/tar-pack/master.svg)](https://travis-ci.org/ForbesLindesay/tar-pack) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/tar-pack.svg)](https://david-dm.org/ForbesLindesay/tar-pack) +[![NPM version](https://img.shields.io/npm/v/tar-pack.svg)](https://www.npmjs.com/package/tar-pack) + +## Installation + + $ npm install tar-pack + +## API + +### pack(folder|packer, [options]) + +Pack the folder at `folder` into a gzipped tarball and return the tgz as a stream. Files ignored by `.gitignore` will not be in the package. + +You can optionally pass a `fstream.DirReader` directly, instead of folder. For example, to create an npm package, do: + +```js +pack(require("fstream-npm")(folder), [options]) +``` + +Options: + + - `noProprietary` (defaults to `false`) Set this to `true` to prevent any proprietary attributes being added to the tarball. These attributes are allowed by the spec, but may trip up some poorly written tarball parsers. + - `ignoreFiles` (defaults to `['.gitignore']`) These files can specify files to be excluded from the package using the syntax of `.gitignore`. This option is ignored if you parse a `fstream.DirReader` instead of a string for folder. + - `filter` (defaults to `entry => true`) A function that takes an entry and returns `true` if it should be included in the package and `false` if it should not. Entryies are of the form `{path, basename, dirname, type}` where (type is "Directory" or "File"). This function is ignored if you parse a `fstream.DirReader` instead of a string for folder. + +Example: + +```js +var write = require('fs').createWriteStream +var pack = require('tar-pack').pack +pack(process.cwd()) + .pipe(write(__dirname + '/package.tar.gz')) + .on('error', function (err) { + console.error(err.stack) + }) + .on('close', function () { + console.log('done') + }) +``` + +### unpack(folder, [options,] cb) + +Return a stream that unpacks a tarball into a folder at `folder`. N.B. the output folder will be removed first if it already exists. + +The callback is called with an optional error and, as its second argument, a string which is one of: + + - `'directory'`, indicating that the extracted package was a directory (either `.tar.gz` or `.tar`) + - `'file'`, incating that the extracted package was just a single file (extracted to `defaultName`, see options) + +Basic Options: + + - `defaultName` (defaults to `index.js`) If the package is a single file, rather than a tarball, it will be "extracted" to this file name, set to `false` to disable. + +Advanced Options (you probably don't need any of these): + + - `gid` - (defaults to `null`) the `gid` to use when writing files + - `uid` - (defaults to `null`) the `uid` to use when writing files + - `dmode` - (defaults to `0777`) The mode to use when creating directories + - `fmode` - (defaults to `0666`) The mode to use when creating files + - `unsafe` - (defaults to `false`) (on non win32 OSes it overrides `gid` and `uid` with the current processes IDs) + +Example: + +```js +var read = require('fs').createReadStream +var unpack = require('tar-pack').unpack +read(process.cwd() + '/package.tar.gz') + .pipe(unpack(__dirname + '/package/', function (err) { + if (err) console.error(err.stack) + else console.log('done') + })) +``` + +## License + + BSD \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js new file mode 100644 index 00000000000..8a1539ba172 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js @@ -0,0 +1,240 @@ +"use strict" + +var debug = require('debug')('tar-pack') +var uidNumber = require('uid-number') +var rm = require('rimraf') +var tar = require('tar') +var once = require('once') +var fstream = require('fstream') +var packer = require('fstream-ignore') + +var PassThrough = require('stream').PassThrough || require('readable-stream').PassThrough +var zlib = require('zlib') +var path = require('path') + +var win32 = process.platform === 'win32' +var myUid = process.getuid && process.getuid() +var myGid = process.getgid && process.getgid() + +if (process.env.SUDO_UID && myUid === 0) { + if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID + if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID +} + +exports.pack = pack +exports.unpack = unpack + +function pack(folder, options) { + options = options || {} + if (typeof folder === 'string') { + + var filter = options.filter || function (entry) { return true; } + + folder = packer({ + path: folder, + type: 'Directory', + isDirectory: true, + ignoreFiles: options.ignoreFiles || ['.gitignore'], + filter: function (entry) { // {path, basename, dirname, type} (type is "Directory" or "File") + var basename = entry.basename + // some files are *never* allowed under any circumstances + // these files should always be either temporary files or + // version control related files + if (basename === '.git' || basename === '.lock-wscript' || basename.match(/^\.wafpickle-[0-9]+$/) || + basename === 'CVS' || basename === '.svn' || basename === '.hg' || basename.match(/^\..*\.swp$/) || + basename === '.DS_Store' || basename.match(/^\._/)) { + return false + } + //custom excludes + return filter(entry) + } + }) + } + // By default, npm includes some proprietary attributes in the + // package tarball. This is sane, and allowed by the spec. + // However, npm *itself* excludes these from its own package, + // so that it can be more easily bootstrapped using old and + // non-compliant tar implementations. + var tarPack = tar.Pack({ noProprietary: options.noProprietary || false }) + var gzip = zlib.Gzip() + + folder + .on('error', function (er) { + if (er) debug('Error reading folder') + return gzip.emit('error', er) + }) + tarPack + .on('error', function (er) { + if (er) debug('tar creation error') + gzip.emit('error', er) + }) + return folder.pipe(tarPack).pipe(gzip) +} + +function unpack(unpackTarget, options, cb) { + if (typeof options === 'function' && cb === undefined) cb = options, options = undefined + + var tarball = new PassThrough() + if (typeof cb === 'function') { + cb = once(cb) + tarball.on('error', cb) + tarball.on('close', function () { + cb() + }) + } + + var parent = path.dirname(unpackTarget) + var base = path.basename(unpackTarget) + + options = options || {} + var gid = options.gid || null + var uid = options.uid || null + var dMode = options.dmode || 0x0777 //npm.modes.exec + var fMode = options.fmode || 0x0666 //npm.modes.file + var defaultName = options.defaultName || (options.defaultName === false ? false : 'index.js') + + // figure out who we're supposed to be, if we're not pretending + // to be a specific user. + if (options.unsafe && !win32) { + uid = myUid + gid = myGid + } + + var pending = 2 + uidNumber(uid, gid, function (er, uid, gid) { + if (er) { + tarball.emit('error', er) + return tarball.end() + } + if (0 === --pending) next() + }) + rm(unpackTarget, function (er) { + if (er) { + tarball.emit('error', er) + return tarball.end() + } + if (0 === --pending) next() + }) + function next() { + // gzip {tarball} --decompress --stdout \ + // | tar -mvxpf - --strip-components=1 -C {unpackTarget} + gunzTarPerm(tarball, unpackTarget, dMode, fMode, uid, gid, defaultName) + } + return tarball +} + + +function gunzTarPerm(tarball, target, dMode, fMode, uid, gid, defaultName) { + debug('modes %j', [dMode.toString(8), fMode.toString(8)]) + + function fixEntry(entry) { + debug('fixEntry %j', entry.path) + // never create things that are user-unreadable, + // or dirs that are user-un-listable. Only leads to headaches. + var originalMode = entry.mode = entry.mode || entry.props.mode + entry.mode = entry.mode | (entry.type === 'Directory' ? dMode : fMode) + entry.props.mode = entry.mode + if (originalMode !== entry.mode) { + debug('modified mode %j', [entry.path, originalMode, entry.mode]) + } + + // if there's a specific owner uid/gid that we want, then set that + if (!win32 && typeof uid === 'number' && typeof gid === 'number') { + entry.props.uid = entry.uid = uid + entry.props.gid = entry.gid = gid + } + } + + var extractOpts = { type: 'Directory', path: target, strip: 1 } + + if (!win32 && typeof uid === 'number' && typeof gid === 'number') { + extractOpts.uid = uid + extractOpts.gid = gid + } + + extractOpts.filter = function () { + // symbolic links are not allowed in packages. + if (this.type.match(/^.*Link$/)) { + debug('excluding symbolic link: ' + this.path.substr(target.length + 1) + ' -> ' + this.linkpath) + return false + } + return true + } + + + type(tarball, function (err, type) { + if (err) return tarball.emit('error', err) + var strm = tarball + if (type === 'gzip') { + strm = strm.pipe(zlib.Unzip()) + strm.on('error', function (er) { + if (er) debug('unzip error') + tarball.emit('error', er) + }) + type = 'tar' + } + if (type === 'tar') { + strm + .pipe(tar.Extract(extractOpts)) + .on('entry', fixEntry) + .on('error', function (er) { + if (er) debug('untar error') + tarball.emit('error', er) + }) + .on('close', function () { + tarball.emit('close') + }) + return + } + if (type === 'naked-file' && defaultName) { + var jsOpts = { path: path.resolve(target, defaultName) } + + if (!win32 && typeof uid === 'number' && typeof gid === 'number') { + jsOpts.uid = uid + jsOpts.gid = gid + } + + strm + .pipe(fstream.Writer(jsOpts)) + .on('error', function (er) { + if (er) debug('copy error') + tarball.emit('error', er) + }) + .on('close', function () { + tarball.emit('close') + }) + return + } + + return cb(new Error('Unrecognised package type')); + }) +} + +function type(stream, callback) { + stream.on('error', handle) + stream.on('data', parse) + function handle(err) { + stream.removeListener('data', parse) + stream.removeListener('error', handle) + } + function parse(chunk) { + // detect what it is. + // Then, depending on that, we'll figure out whether it's + // a single-file module, gzipped tarball, or naked tarball. + + // gzipped files all start with 1f8b08 + if (chunk[0] === 0x1F && chunk[1] === 0x8B && chunk[2] === 0x08) { + callback(null, 'gzip') + } else if (chunk.toString().match(/^package\/\u0000/)) { + // note, this will only pick up on tarballs with a root directory called package + callback(null, 'tar') + } else { + callback(null, 'naked-file') + } + + // now un-hook, and re-emit the chunk + stream.removeListener('data', parse) + stream.removeListener('error', handle) + stream.unshift(chunk) + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json new file mode 100644 index 00000000000..4f888964787 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "tar-pack@~3.1.0", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "tar-pack@>=3.1.0 <3.2.0", + "_id": "tar-pack@3.1.4", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/tar-pack", + "_nodeVersion": "6.2.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/tar-pack-3.1.4.tgz_1467088357244_0.18669610540382564" + }, + "_npmUser": { + "email": "snnskwtnb@gmail.com", + "name": "shinnn" + }, + "_npmVersion": "3.10.2", + "_phantomChildren": {}, + "_requested": { + "name": "tar-pack", + "raw": "tar-pack@~3.1.0", + "rawSpec": "~3.1.0", + "scope": null, + "spec": ">=3.1.0 <3.2.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/node-pre-gyp" + ], + "_resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.4.tgz", + "_shasum": "bc8cf9a22f5832739f12f3910dac1eb97b49708c", + "_shrinkwrap": null, + "_spec": "tar-pack@~3.1.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "bugs": { + "url": "https://github.com/ForbesLindesay/tar-pack/issues" + }, + "dependencies": { + "debug": "~2.2.0", + "fstream": "~1.0.10", + "fstream-ignore": "~1.0.5", + "once": "~1.3.3", + "readable-stream": "~2.1.4", + "rimraf": "~2.5.1", + "tar": "~2.2.1", + "uid-number": "~0.0.6" + }, + "description": "Package and un-package modules of some sort (in tar/gz bundles).", + "devDependencies": { + "mkdirp": "*", + "mocha": "*", + "rfile": "*" + }, + "directories": {}, + "dist": { + "shasum": "bc8cf9a22f5832739f12f3910dac1eb97b49708c", + "tarball": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.4.tgz" + }, + "gitHead": "ee23170716772ae458574ea090500035202c7c64", + "homepage": "https://github.com/ForbesLindesay/tar-pack#readme", + "license": "BSD-2-Clause", + "maintainers": [ + { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + { + "email": "forbes@lindesay.co.uk", + "name": "forbeslindesay" + }, + { + "email": "snnskwtnb@gmail.com", + "name": "shinnn" + } + ], + "name": "tar-pack", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/tar-pack.git" + }, + "scripts": { + "test": "mocha -R list" + }, + "version": "3.1.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt new file mode 100644 index 00000000000..ba0e162e1c4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt @@ -0,0 +1 @@ +bar \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar new file mode 100644 index 0000000000000000000000000000000000000000..35fd1745182fd4c3c4572a7d11e0d9f2f41658b3 GIT binary patch literal 3584 zcmeH{K?(vf3`KjCoIsPdnVhF1>cYhgG7ItaMy)WoaTOTwchfe|B)s3Bxg9R;eB7tN zMU~Br5C~06%Nc|=-cm2n9-7U8z1dH%5{R?&dH4oMGH-ABi yL%KoIHG#3+*H@hXjKIhLr)k=T|24n-pMCzr|M8#E=YD(E_7jX0PWO03Iah41>hVd7f>@lNzOAX*jS9n z6yoU}#YM2$YLcfTRTkX(XB^`12+V^V_A=KiO0 zKek7s5rQoBpML#Y?%7-;lMswHl_$Y|&HKO9x{dv7{OsQh`(H!<`vd?0`||=f!0QwM G4gdh@=127a literal 0 HcmV?d00001 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt new file mode 100644 index 00000000000..3f953866625 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt @@ -0,0 +1 @@ +baz \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt new file mode 100644 index 00000000000..ba0e162e1c4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt @@ -0,0 +1 @@ +bar \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js new file mode 100644 index 00000000000..314c020af7b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js @@ -0,0 +1,67 @@ +var tar = require('../') +var path = require('path') +var rfile = require('rfile') +var rimraf = require('rimraf').sync +var mkdir = require('mkdirp').sync + +var read = require('fs').createReadStream +var write = require('fs').createWriteStream +var assert = require('assert') + +beforeEach(function () { + rimraf(__dirname + '/output') +}) +afterEach(function () { + rimraf(__dirname + '/output') +}) +describe('tarball.pipe(unpack(directory, callback))', function () { + it('unpacks the tarball into the directory', function (done) { + read(__dirname + '/fixtures/packed.tar').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { + if (err) return done(err) + assert.equal(rfile('./output/unpacked/bar.txt'), rfile('./fixtures/to-pack/bar.txt')) + assert.equal(rfile('./output/unpacked/foo.txt'), rfile('./fixtures/to-pack/foo.txt')) + done() + })) + }) +}) +describe('gziptarball.pipe(unpack(directory, callback))', function () { + it('unpacks the tarball into the directory', function (done) { + read(__dirname + '/fixtures/packed.tar.gz').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { + if (err) return done(err) + assert.equal(rfile('./output/unpacked/bar.txt'), rfile('./fixtures/to-pack/bar.txt')) + assert.equal(rfile('./output/unpacked/foo.txt'), rfile('./fixtures/to-pack/foo.txt')) + done() + })) + }) +}) +describe('file.pipe(unpack(directory, callback))', function () { + it('copies the file into the directory', function (done) { + read(__dirname + '/fixtures/packed-file.txt').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { + if (err) return done(err) + assert.equal(rfile('./output/unpacked/index.js'), rfile('./fixtures/packed-file.txt')) + done() + })) + }) +}) +describe('pack(directory).pipe(tarball)', function () { + it('packs the directory into the output', function (done) { + var called = false + mkdir(__dirname + '/output/') + tar.pack(__dirname + '/fixtures/to-pack').pipe(write(__dirname + '/output/packed.tar.gz')) + .on('error', function (err) { + if (called) return + called = true + done(err) + }) + .on('close', function () { + if (called) return + called = true + read(__dirname + '/output/packed.tar.gz').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { + if (err) return done(err) + assert.equal(rfile('./output/unpacked/bar.txt'), rfile('./fixtures/to-pack/bar.txt')) + assert.equal(rfile('./output/unpacked/foo.txt'), rfile('./fixtures/to-pack/foo.txt')) + done() + })) + }) + }) +}) \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore new file mode 100644 index 00000000000..c167ad5b1c1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore @@ -0,0 +1,5 @@ +.*.swp +node_modules +examples/extract/ +test/tmp/ +test/fixtures/ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml new file mode 100644 index 00000000000..fca8ef01940 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.10 + - 0.11 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE new file mode 100644 index 00000000000..019b7e40ea0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE @@ -0,0 +1,12 @@ +The ISC License +Copyright (c) Isaac Z. Schlueter and Contributors +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md new file mode 100644 index 00000000000..cfda2ac1806 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md @@ -0,0 +1,50 @@ +# node-tar + +Tar for Node.js. + +[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) + +## API + +See `examples/` for usage examples. + +### var tar = require('tar') + +Returns an object with `.Pack`, `.Extract` and `.Parse` methods. + +### tar.Pack([properties]) + +Returns a through stream. Use +[fstream](https://npmjs.org/package/fstream) to write files into the +pack stream and you will receive tar archive data from the pack +stream. + +This only works with directories, it does not work with individual files. + +The optional `properties` object are used to set properties in the tar +'Global Extended Header'. If the `fromBase` property is set to true, +the tar will contain files relative to the path passed, and not with +the path included. + +### tar.Extract([options]) + +Returns a through stream. Write tar data to the stream and the files +in the tarball will be extracted onto the filesystem. + +`options` can be: + +```js +{ + path: '/path/to/extract/tar/into', + strip: 0, // how many path segments to strip from the root when extracting +} +``` + +`options` also get passed to the `fstream.Writer` instance that `tar` +uses internally. + +### tar.Parse() + +Returns a writable stream. Write tar data to it and it will emit +`entry` events for each entry parsed from the tarball. This is used by +`tar.Extract`. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js new file mode 100644 index 00000000000..f6253a72c5c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js @@ -0,0 +1,19 @@ +var tar = require("../tar.js") + , fs = require("fs") + + +function onError(err) { + console.error('An error occurred:', err) +} + +function onEnd() { + console.log('Extracted!') +} + +var extractor = tar.Extract({path: __dirname + "/extract"}) + .on('error', onError) + .on('end', onEnd); + +fs.createReadStream(__dirname + "/../test/fixtures/c.tar") + .on('error', onError) + .pipe(extractor); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js new file mode 100644 index 00000000000..039969ce300 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js @@ -0,0 +1,24 @@ +var tar = require("../tar.js") + , fstream = require("fstream") + , fs = require("fs") + +var dirDest = fs.createWriteStream('dir.tar') + + +function onError(err) { + console.error('An error occurred:', err) +} + +function onEnd() { + console.log('Packed!') +} + +var packer = tar.Pack({ noProprietary: true }) + .on('error', onError) + .on('end', onEnd); + +// This must be a "directory" +fstream.Reader({ path: __dirname, type: "Directory" }) + .on('error', onError) + .pipe(packer) + .pipe(dirDest) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js new file mode 100644 index 00000000000..39f3f0888a2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js @@ -0,0 +1,36 @@ +var tar = require("../tar.js") + , fs = require("fs") + +fs.createReadStream(__dirname + "/../test/fixtures/c.tar") + .pipe(tar.Parse()) + .on("extendedHeader", function (e) { + console.error("extended pax header", e.props) + e.on("end", function () { + console.error("extended pax fields:", e.fields) + }) + }) + .on("ignoredEntry", function (e) { + console.error("ignoredEntry?!?", e.props) + }) + .on("longLinkpath", function (e) { + console.error("longLinkpath entry", e.props) + e.on("end", function () { + console.error("value=%j", e.body.toString()) + }) + }) + .on("longPath", function (e) { + console.error("longPath entry", e.props) + e.on("end", function () { + console.error("value=%j", e.body.toString()) + }) + }) + .on("entry", function (e) { + console.error("entry", e.props) + e.on("data", function (c) { + console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) + }) + e.on("end", function () { + console.error(" << 0 + return !this._needDrain +} + +EntryWriter.prototype.end = function (c) { + // console.error(".. ew end") + if (c) this._buffer.push(c) + this._buffer.push(EOF) + this._ended = true + this._process() + this._needDrain = this._buffer.length > 0 +} + +EntryWriter.prototype.pause = function () { + // console.error(".. ew pause") + this._paused = true + this.emit("pause") +} + +EntryWriter.prototype.resume = function () { + // console.error(".. ew resume") + this._paused = false + this.emit("resume") + this._process() +} + +EntryWriter.prototype.add = function (entry) { + // console.error(".. ew add") + if (!this.parent) return this.emit("error", new Error("no parent")) + + // make sure that the _header and such is emitted, and clear out + // the _currentEntry link on the parent. + if (!this._ended) this.end() + + return this.parent.add(entry) +} + +EntryWriter.prototype._header = function () { + // console.error(".. ew header") + if (this._didHeader) return + this._didHeader = true + + var headerBlock = TarHeader.encode(this.props) + + if (this.props.needExtended && !this._meta) { + var me = this + + ExtendedHeaderWriter = ExtendedHeaderWriter || + require("./extended-header-writer.js") + + ExtendedHeaderWriter(this.props) + .on("data", function (c) { + me.emit("data", c) + }) + .on("error", function (er) { + me.emit("error", er) + }) + .end() + } + + // console.error(".. .. ew headerBlock emitting") + this.emit("data", headerBlock) + this.emit("header") +} + +EntryWriter.prototype._process = function () { + // console.error(".. .. ew process") + if (!this._didHeader && !this._meta) { + this._header() + } + + if (this._paused || this._processing) { + // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing) + return + } + + this._processing = true + + var buf = this._buffer + for (var i = 0; i < buf.length; i ++) { + // console.error(".. .. .. i=%d", i) + + var c = buf[i] + + if (c === EOF) this._stream.end() + else this._stream.write(c) + + if (this._paused) { + // console.error(".. .. .. paused mid-emission") + this._processing = false + if (i < buf.length) { + this._needDrain = true + this._buffer = buf.slice(i + 1) + } + return + } + } + + // console.error(".. .. .. emitted") + this._buffer.length = 0 + this._processing = false + + // console.error(".. .. .. emitting drain") + this.emit("drain") +} + +EntryWriter.prototype.destroy = function () {} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js new file mode 100644 index 00000000000..591202bd3b9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js @@ -0,0 +1,220 @@ +// A passthrough read/write stream that sets its properties +// based on a header, extendedHeader, and globalHeader +// +// Can be either a file system object of some sort, or +// a pax/ustar metadata entry. + +module.exports = Entry + +var TarHeader = require("./header.js") + , tar = require("../tar") + , assert = require("assert").ok + , Stream = require("stream").Stream + , inherits = require("inherits") + , fstream = require("fstream").Abstract + +function Entry (header, extended, global) { + Stream.call(this) + this.readable = true + this.writable = true + + this._needDrain = false + this._paused = false + this._reading = false + this._ending = false + this._ended = false + this._remaining = 0 + this._abort = false + this._queue = [] + this._index = 0 + this._queueLen = 0 + + this._read = this._read.bind(this) + + this.props = {} + this._header = header + this._extended = extended || {} + + // globals can change throughout the course of + // a file parse operation. Freeze it at its current state. + this._global = {} + var me = this + Object.keys(global || {}).forEach(function (g) { + me._global[g] = global[g] + }) + + this._setProps() +} + +inherits(Entry, Stream) + +Entry.prototype.write = function (c) { + if (this._ending) this.error("write() after end()", null, true) + if (this._remaining === 0) { + this.error("invalid bytes past eof") + } + + // often we'll get a bunch of \0 at the end of the last write, + // since chunks will always be 512 bytes when reading a tarball. + if (c.length > this._remaining) { + c = c.slice(0, this._remaining) + } + this._remaining -= c.length + + // put it on the stack. + var ql = this._queueLen + this._queue.push(c) + this._queueLen ++ + + this._read() + + // either paused, or buffered + if (this._paused || ql > 0) { + this._needDrain = true + return false + } + + return true +} + +Entry.prototype.end = function (c) { + if (c) this.write(c) + this._ending = true + this._read() +} + +Entry.prototype.pause = function () { + this._paused = true + this.emit("pause") +} + +Entry.prototype.resume = function () { + // console.error(" Tar Entry resume", this.path) + this.emit("resume") + this._paused = false + this._read() + return this._queueLen - this._index > 1 +} + + // This is bound to the instance +Entry.prototype._read = function () { + // console.error(" Tar Entry _read", this.path) + + if (this._paused || this._reading || this._ended) return + + // set this flag so that event handlers don't inadvertently + // get multiple _read() calls running. + this._reading = true + + // have any data to emit? + while (this._index < this._queueLen && !this._paused) { + var chunk = this._queue[this._index ++] + this.emit("data", chunk) + } + + // check if we're drained + if (this._index >= this._queueLen) { + this._queue.length = this._queueLen = this._index = 0 + if (this._needDrain) { + this._needDrain = false + this.emit("drain") + } + if (this._ending) { + this._ended = true + this.emit("end") + } + } + + // if the queue gets too big, then pluck off whatever we can. + // this should be fairly rare. + var mql = this._maxQueueLen + if (this._queueLen > mql && this._index > 0) { + mql = Math.min(this._index, mql) + this._index -= mql + this._queueLen -= mql + this._queue = this._queue.slice(mql) + } + + this._reading = false +} + +Entry.prototype._setProps = function () { + // props = extended->global->header->{} + var header = this._header + , extended = this._extended + , global = this._global + , props = this.props + + // first get the values from the normal header. + var fields = tar.fields + for (var f = 0; fields[f] !== null; f ++) { + var field = fields[f] + , val = header[field] + if (typeof val !== "undefined") props[field] = val + } + + // next, the global header for this file. + // numeric values, etc, will have already been parsed. + ;[global, extended].forEach(function (p) { + Object.keys(p).forEach(function (f) { + if (typeof p[f] !== "undefined") props[f] = p[f] + }) + }) + + // no nulls allowed in path or linkpath + ;["path", "linkpath"].forEach(function (p) { + if (props.hasOwnProperty(p)) { + props[p] = props[p].split("\0")[0] + } + }) + + + // set date fields to be a proper date + ;["mtime", "ctime", "atime"].forEach(function (p) { + if (props.hasOwnProperty(p)) { + props[p] = new Date(props[p] * 1000) + } + }) + + // set the type so that we know what kind of file to create + var type + switch (tar.types[props.type]) { + case "OldFile": + case "ContiguousFile": + type = "File" + break + + case "GNUDumpDir": + type = "Directory" + break + + case undefined: + type = "Unknown" + break + + case "Link": + case "SymbolicLink": + case "CharacterDevice": + case "BlockDevice": + case "Directory": + case "FIFO": + default: + type = tar.types[props.type] + } + + this.type = type + this.path = props.path + this.size = props.size + + // size is special, since it signals when the file needs to end. + this._remaining = props.size +} + +// the parser may not call write if _abort is true. +// useful for skipping data from some files quickly. +Entry.prototype.abort = function(){ + this._abort = true +} + +Entry.prototype.warn = fstream.warn +Entry.prototype.error = fstream.error diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js new file mode 100644 index 00000000000..1728c4583ae --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js @@ -0,0 +1,191 @@ + +module.exports = ExtendedHeaderWriter + +var inherits = require("inherits") + , EntryWriter = require("./entry-writer.js") + +inherits(ExtendedHeaderWriter, EntryWriter) + +var tar = require("../tar.js") + , path = require("path") + , TarHeader = require("./header.js") + +// props is the props of the thing we need to write an +// extended header for. +// Don't be shy with it. Just encode everything. +function ExtendedHeaderWriter (props) { + // console.error(">> ehw ctor") + var me = this + + if (!(me instanceof ExtendedHeaderWriter)) { + return new ExtendedHeaderWriter(props) + } + + me.fields = props + + var p = + { path : ("PaxHeader" + path.join("/", props.path || "")) + .replace(/\\/g, "/").substr(0, 100) + , mode : props.mode || 0666 + , uid : props.uid || 0 + , gid : props.gid || 0 + , size : 0 // will be set later + , mtime : props.mtime || Date.now() / 1000 + , type : "x" + , linkpath : "" + , ustar : "ustar\0" + , ustarver : "00" + , uname : props.uname || "" + , gname : props.gname || "" + , devmaj : props.devmaj || 0 + , devmin : props.devmin || 0 + } + + + EntryWriter.call(me, p) + // console.error(">> ehw props", me.props) + me.props = p + + me._meta = true +} + +ExtendedHeaderWriter.prototype.end = function () { + // console.error(">> ehw end") + var me = this + + if (me._ended) return + me._ended = true + + me._encodeFields() + + if (me.props.size === 0) { + // nothing to write! + me._ready = true + me._stream.end() + return + } + + me._stream.write(TarHeader.encode(me.props)) + me.body.forEach(function (l) { + me._stream.write(l) + }) + me._ready = true + + // console.error(">> ehw _process calling end()", me.props) + this._stream.end() +} + +ExtendedHeaderWriter.prototype._encodeFields = function () { + // console.error(">> ehw _encodeFields") + this.body = [] + if (this.fields.prefix) { + this.fields.path = this.fields.prefix + "/" + this.fields.path + this.fields.prefix = "" + } + encodeFields(this.fields, "", this.body, this.fields.noProprietary) + var me = this + this.body.forEach(function (l) { + me.props.size += l.length + }) +} + +function encodeFields (fields, prefix, body, nop) { + // console.error(">> >> ehw encodeFields") + // "%d %s=%s\n", , , + // The length is a decimal number, and includes itself and the \n + // Numeric values are decimal strings. + + Object.keys(fields).forEach(function (k) { + var val = fields[k] + , numeric = tar.numeric[k] + + if (prefix) k = prefix + "." + k + + // already including NODETAR.type, don't need File=true also + if (k === fields.type && val === true) return + + switch (k) { + // don't include anything that's always handled just fine + // in the normal header, or only meaningful in the context + // of nodetar + case "mode": + case "cksum": + case "ustar": + case "ustarver": + case "prefix": + case "basename": + case "dirname": + case "needExtended": + case "block": + case "filter": + return + + case "rdev": + if (val === 0) return + break + + case "nlink": + case "dev": // Truly a hero among men, Creator of Star! + case "ino": // Speak his name with reverent awe! It is: + k = "SCHILY." + k + break + + default: break + } + + if (val && typeof val === "object" && + !Buffer.isBuffer(val)) encodeFields(val, k, body, nop) + else if (val === null || val === undefined) return + else body.push.apply(body, encodeField(k, val, nop)) + }) + + return body +} + +function encodeField (k, v, nop) { + // lowercase keys must be valid, otherwise prefix with + // "NODETAR." + if (k.charAt(0) === k.charAt(0).toLowerCase()) { + var m = k.split(".")[0] + if (!tar.knownExtended[m]) k = "NODETAR." + k + } + + // no proprietary + if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) { + return [] + } + + if (typeof val === "number") val = val.toString(10) + + var s = new Buffer(" " + k + "=" + v + "\n") + , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 + + // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) + + // if adding that many digits will make it go over that length, + // then add one to it. For example, if the string is: + // " foo=bar\n" + // then that's 9 characters. With the "9", that bumps the length + // up to 10. However, this is invalid: + // "10 foo=bar\n" + // but, since that's actually 11 characters, since 10 adds another + // character to the length, and the length includes the number + // itself. In that case, just bump it up again. + if (s.length + digits >= Math.pow(10, digits)) digits += 1 + // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) + + var len = digits + s.length + // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) + var lenBuf = new Buffer("" + len) + if (lenBuf.length + s.length !== len) { + throw new Error("Bad length calculation\n"+ + "len="+len+"\n"+ + "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ + "lenBuf.length="+lenBuf.length+"\n"+ + "digits="+digits+"\n"+ + "s="+JSON.stringify(s.toString())+"\n"+ + "s.length="+s.length) + } + + return [lenBuf, s] +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js new file mode 100644 index 00000000000..74f432ceee5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js @@ -0,0 +1,140 @@ +// An Entry consisting of: +// +// "%d %s=%s\n", , , +// +// The length is a decimal number, and includes itself and the \n +// \0 does not terminate anything. Only the length terminates the string. +// Numeric values are decimal strings. + +module.exports = ExtendedHeader + +var Entry = require("./entry.js") + , inherits = require("inherits") + , tar = require("../tar.js") + , numeric = tar.numeric + , keyTrans = { "SCHILY.dev": "dev" + , "SCHILY.ino": "ino" + , "SCHILY.nlink": "nlink" } + +function ExtendedHeader () { + Entry.apply(this, arguments) + this.on("data", this._parse) + this.fields = {} + this._position = 0 + this._fieldPos = 0 + this._state = SIZE + this._sizeBuf = [] + this._keyBuf = [] + this._valBuf = [] + this._size = -1 + this._key = "" +} + +inherits(ExtendedHeader, Entry) +ExtendedHeader.prototype._parse = parse + +var s = 0 + , states = ExtendedHeader.states = {} + , SIZE = states.SIZE = s++ + , KEY = states.KEY = s++ + , VAL = states.VAL = s++ + , ERR = states.ERR = s++ + +Object.keys(states).forEach(function (s) { + states[states[s]] = states[s] +}) + +states[s] = null + +// char code values for comparison +var _0 = "0".charCodeAt(0) + , _9 = "9".charCodeAt(0) + , point = ".".charCodeAt(0) + , a = "a".charCodeAt(0) + , Z = "Z".charCodeAt(0) + , a = "a".charCodeAt(0) + , z = "z".charCodeAt(0) + , space = " ".charCodeAt(0) + , eq = "=".charCodeAt(0) + , cr = "\n".charCodeAt(0) + +function parse (c) { + if (this._state === ERR) return + + for ( var i = 0, l = c.length + ; i < l + ; this._position++, this._fieldPos++, i++) { + // console.error("top of loop, size="+this._size) + + var b = c[i] + + if (this._size >= 0 && this._fieldPos > this._size) { + error(this, "field exceeds length="+this._size) + return + } + + switch (this._state) { + case ERR: return + + case SIZE: + // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString()) + if (b === space) { + this._state = KEY + // this._fieldPos = this._sizeBuf.length + this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10) + this._sizeBuf.length = 0 + continue + } + if (b < _0 || b > _9) { + error(this, "expected [" + _0 + ".." + _9 + "], got " + b) + return + } + this._sizeBuf.push(b) + continue + + case KEY: + // can be any char except =, not > size. + if (b === eq) { + this._state = VAL + this._key = new Buffer(this._keyBuf).toString() + if (keyTrans[this._key]) this._key = keyTrans[this._key] + this._keyBuf.length = 0 + continue + } + this._keyBuf.push(b) + continue + + case VAL: + // field must end with cr + if (this._fieldPos === this._size - 1) { + // console.error("finished with "+this._key) + if (b !== cr) { + error(this, "expected \\n at end of field") + return + } + var val = new Buffer(this._valBuf).toString() + if (numeric[this._key]) { + val = parseFloat(val) + } + this.fields[this._key] = val + + this._valBuf.length = 0 + this._state = SIZE + this._size = -1 + this._fieldPos = -1 + continue + } + this._valBuf.push(b) + continue + } + } +} + +function error (me, msg) { + msg = "invalid header: " + msg + + "\nposition=" + me._position + + "\nfield position=" + me._fieldPos + + me.error(msg) + me.state = ERR +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js new file mode 100644 index 00000000000..fe1bb976eb0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js @@ -0,0 +1,94 @@ +// give it a tarball and a path, and it'll dump the contents + +module.exports = Extract + +var tar = require("../tar.js") + , fstream = require("fstream") + , inherits = require("inherits") + , path = require("path") + +function Extract (opts) { + if (!(this instanceof Extract)) return new Extract(opts) + tar.Parse.apply(this) + + if (typeof opts !== "object") { + opts = { path: opts } + } + + // better to drop in cwd? seems more standard. + opts.path = opts.path || path.resolve("node-tar-extract") + opts.type = "Directory" + opts.Directory = true + + // similar to --strip or --strip-components + opts.strip = +opts.strip + if (!opts.strip || opts.strip <= 0) opts.strip = 0 + + this._fst = fstream.Writer(opts) + + this.pause() + var me = this + + // Hardlinks in tarballs are relative to the root + // of the tarball. So, they need to be resolved against + // the target directory in order to be created properly. + me.on("entry", function (entry) { + // if there's a "strip" argument, then strip off that many + // path components. + if (opts.strip) { + var p = entry.path.split("/").slice(opts.strip).join("/") + entry.path = entry.props.path = p + if (entry.linkpath) { + var lp = entry.linkpath.split("/").slice(opts.strip).join("/") + entry.linkpath = entry.props.linkpath = lp + } + } + if (entry.type === "Link") { + entry.linkpath = entry.props.linkpath = + path.join(opts.path, path.join("/", entry.props.linkpath)) + } + + if (entry.type === "SymbolicLink") { + var dn = path.dirname(entry.path) || "" + var linkpath = entry.props.linkpath + var target = path.resolve(opts.path, dn, linkpath) + if (target.indexOf(opts.path) !== 0) { + linkpath = path.join(opts.path, path.join("/", linkpath)) + } + entry.linkpath = entry.props.linkpath = linkpath + } + }) + + this._fst.on("ready", function () { + me.pipe(me._fst, { end: false }) + me.resume() + }) + + this._fst.on('error', function(err) { + me.emit('error', err) + }) + + this._fst.on('drain', function() { + me.emit('drain') + }) + + // this._fst.on("end", function () { + // console.error("\nEEEE Extract End", me._fst.path) + // }) + + this._fst.on("close", function () { + // console.error("\nEEEE Extract End", me._fst.path) + me.emit("finish") + me.emit("end") + me.emit("close") + }) +} + +inherits(Extract, tar.Parse) + +Extract.prototype._streamEnd = function () { + var me = this + if (!me._ended || me._entry) me.error("unexpected eof") + me._fst.end() + // my .end() is coming later. +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js new file mode 100644 index 00000000000..0bfc7b80aa7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js @@ -0,0 +1,14 @@ +module.exports = GlobalHeaderWriter + +var ExtendedHeaderWriter = require("./extended-header-writer.js") + , inherits = require("inherits") + +inherits(GlobalHeaderWriter, ExtendedHeaderWriter) + +function GlobalHeaderWriter (props) { + if (!(this instanceof GlobalHeaderWriter)) { + return new GlobalHeaderWriter(props) + } + ExtendedHeaderWriter.call(this, props) + this.props.type = "g" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js new file mode 100644 index 00000000000..05b237c0c7b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js @@ -0,0 +1,385 @@ +// parse a 512-byte header block to a data object, or vice-versa +// If the data won't fit nicely in a simple header, then generate +// the appropriate extended header file, and return that. + +module.exports = TarHeader + +var tar = require("../tar.js") + , fields = tar.fields + , fieldOffs = tar.fieldOffs + , fieldEnds = tar.fieldEnds + , fieldSize = tar.fieldSize + , numeric = tar.numeric + , assert = require("assert").ok + , space = " ".charCodeAt(0) + , slash = "/".charCodeAt(0) + , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null + +function TarHeader (block) { + if (!(this instanceof TarHeader)) return new TarHeader(block) + if (block) this.decode(block) +} + +TarHeader.prototype = + { decode : decode + , encode: encode + , calcSum: calcSum + , checkSum: checkSum + } + +TarHeader.parseNumeric = parseNumeric +TarHeader.encode = encode +TarHeader.decode = decode + +// note that this will only do the normal ustar header, not any kind +// of extended posix header file. If something doesn't fit comfortably, +// then it will set obj.needExtended = true, and set the block to +// the closest approximation. +function encode (obj) { + if (!obj && !(this instanceof TarHeader)) throw new Error( + "encode must be called on a TarHeader, or supplied an object") + + obj = obj || this + var block = obj.block = new Buffer(512) + + // if the object has a "prefix", then that's actually an extension of + // the path field. + if (obj.prefix) { + // console.error("%% header encoding, got a prefix", obj.prefix) + obj.path = obj.prefix + "/" + obj.path + // console.error("%% header encoding, prefixed path", obj.path) + obj.prefix = "" + } + + obj.needExtended = false + + if (obj.mode) { + if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8) + obj.mode = obj.mode & 0777 + } + + for (var f = 0; fields[f] !== null; f ++) { + var field = fields[f] + , off = fieldOffs[f] + , end = fieldEnds[f] + , ret + + switch (field) { + case "cksum": + // special, done below, after all the others + break + + case "prefix": + // special, this is an extension of the "path" field. + // console.error("%% header encoding, skip prefix later") + break + + case "type": + // convert from long name to a single char. + var type = obj.type || "0" + if (type.length > 1) { + type = tar.types[obj.type] + if (!type) type = "0" + } + writeText(block, off, end, type) + break + + case "path": + // uses the "prefix" field if > 100 bytes, but <= 255 + var pathLen = Buffer.byteLength(obj.path) + , pathFSize = fieldSize[fields.path] + , prefFSize = fieldSize[fields.prefix] + + // paths between 100 and 255 should use the prefix field. + // longer than 255 + if (pathLen > pathFSize && + pathLen <= pathFSize + prefFSize) { + // need to find a slash somewhere in the middle so that + // path and prefix both fit in their respective fields + var searchStart = pathLen - 1 - pathFSize + , searchEnd = prefFSize + , found = false + , pathBuf = new Buffer(obj.path) + + for ( var s = searchStart + ; (s <= searchEnd) + ; s ++ ) { + if (pathBuf[s] === slash || pathBuf[s] === bslash) { + found = s + break + } + } + + if (found !== false) { + prefix = pathBuf.slice(0, found).toString("utf8") + path = pathBuf.slice(found + 1).toString("utf8") + + ret = writeText(block, off, end, path) + off = fieldOffs[fields.prefix] + end = fieldEnds[fields.prefix] + // console.error("%% header writing prefix", off, end, prefix) + ret = writeText(block, off, end, prefix) || ret + break + } + } + + // paths less than 100 chars don't need a prefix + // and paths longer than 255 need an extended header and will fail + // on old implementations no matter what we do here. + // Null out the prefix, and fallthrough to default. + // console.error("%% header writing no prefix") + var poff = fieldOffs[fields.prefix] + , pend = fieldEnds[fields.prefix] + writeText(block, poff, pend, "") + // fallthrough + + // all other fields are numeric or text + default: + ret = numeric[field] + ? writeNumeric(block, off, end, obj[field]) + : writeText(block, off, end, obj[field] || "") + break + } + obj.needExtended = obj.needExtended || ret + } + + var off = fieldOffs[fields.cksum] + , end = fieldEnds[fields.cksum] + + writeNumeric(block, off, end, calcSum.call(this, block)) + + return block +} + +// if it's a negative number, or greater than will fit, +// then use write256. +var MAXNUM = { 12: 077777777777 + , 11: 07777777777 + , 8 : 07777777 + , 7 : 0777777 } +function writeNumeric (block, off, end, num) { + var writeLen = end - off + , maxNum = MAXNUM[writeLen] || 0 + + num = num || 0 + // console.error(" numeric", num) + + if (num instanceof Date || + Object.prototype.toString.call(num) === "[object Date]") { + num = num.getTime() / 1000 + } + + if (num > maxNum || num < 0) { + write256(block, off, end, num) + // need an extended header if negative or too big. + return true + } + + // god, tar is so annoying + // if the string is small enough, you should put a space + // between the octal string and the \0, but if it doesn't + // fit, then don't. + var numStr = Math.floor(num).toString(8) + if (num < MAXNUM[writeLen - 1]) numStr += " " + + // pad with "0" chars + if (numStr.length < writeLen) { + numStr = (new Array(writeLen - numStr.length).join("0")) + numStr + } + + if (numStr.length !== writeLen - 1) { + throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" + + "expected: "+writeLen) + } + block.write(numStr, off, writeLen, "utf8") + block[end - 1] = 0 +} + +function write256 (block, off, end, num) { + var buf = block.slice(off, end) + var positive = num >= 0 + buf[0] = positive ? 0x80 : 0xFF + + // get the number as a base-256 tuple + if (!positive) num *= -1 + var tuple = [] + do { + var n = num % 256 + tuple.push(n) + num = (num - n) / 256 + } while (num) + + var bytes = tuple.length + + var fill = buf.length - bytes + for (var i = 1; i < fill; i ++) { + buf[i] = positive ? 0 : 0xFF + } + + // tuple is a base256 number, with [0] as the *least* significant byte + // if it's negative, then we need to flip all the bits once we hit the + // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's- + // complement is (0xFF - n). + var zero = true + for (i = bytes; i > 0; i --) { + var byte = tuple[bytes - i] + if (positive) buf[fill + i] = byte + else if (zero && byte === 0) buf[fill + i] = 0 + else if (zero) { + zero = false + buf[fill + i] = 0x100 - byte + } else buf[fill + i] = 0xFF - byte + } +} + +function writeText (block, off, end, str) { + // strings are written as utf8, then padded with \0 + var strLen = Buffer.byteLength(str) + , writeLen = Math.min(strLen, end - off) + // non-ascii fields need extended headers + // long fields get truncated + , needExtended = strLen !== str.length || strLen > writeLen + + // write the string, and null-pad + if (writeLen > 0) block.write(str, off, writeLen, "utf8") + for (var i = off + writeLen; i < end; i ++) block[i] = 0 + + return needExtended +} + +function calcSum (block) { + block = block || this.block + assert(Buffer.isBuffer(block) && block.length === 512) + + if (!block) throw new Error("Need block to checksum") + + // now figure out what it would be if the cksum was " " + var sum = 0 + , start = fieldOffs[fields.cksum] + , end = fieldEnds[fields.cksum] + + for (var i = 0; i < fieldOffs[fields.cksum]; i ++) { + sum += block[i] + } + + for (var i = start; i < end; i ++) { + sum += space + } + + for (var i = end; i < 512; i ++) { + sum += block[i] + } + + return sum +} + + +function checkSum (block) { + var sum = calcSum.call(this, block) + block = block || this.block + + var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum]) + cksum = parseNumeric(cksum) + + return cksum === sum +} + +function decode (block) { + block = block || this.block + assert(Buffer.isBuffer(block) && block.length === 512) + + this.block = block + this.cksumValid = this.checkSum() + + var prefix = null + + // slice off each field. + for (var f = 0; fields[f] !== null; f ++) { + var field = fields[f] + , val = block.slice(fieldOffs[f], fieldEnds[f]) + + switch (field) { + case "ustar": + // if not ustar, then everything after that is just padding. + if (val.toString() !== "ustar\0") { + this.ustar = false + return + } else { + // console.error("ustar:", val, val.toString()) + this.ustar = val.toString() + } + break + + // prefix is special, since it might signal the xstar header + case "prefix": + var atime = parseNumeric(val.slice(131, 131 + 12)) + , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12)) + if ((val[130] === 0 || val[130] === space) && + typeof atime === "number" && + typeof ctime === "number" && + val[131 + 12] === space && + val[131 + 12 + 12] === space) { + this.atime = atime + this.ctime = ctime + val = val.slice(0, 130) + } + prefix = val.toString("utf8").replace(/\0+$/, "") + // console.error("%% header reading prefix", prefix) + break + + // all other fields are null-padding text + // or a number. + default: + if (numeric[field]) { + this[field] = parseNumeric(val) + } else { + this[field] = val.toString("utf8").replace(/\0+$/, "") + } + break + } + } + + // if we got a prefix, then prepend it to the path. + if (prefix) { + this.path = prefix + "/" + this.path + // console.error("%% header got a prefix", this.path) + } +} + +function parse256 (buf) { + // first byte MUST be either 80 or FF + // 80 for positive, FF for 2's comp + var positive + if (buf[0] === 0x80) positive = true + else if (buf[0] === 0xFF) positive = false + else return null + + // build up a base-256 tuple from the least sig to the highest + var zero = false + , tuple = [] + for (var i = buf.length - 1; i > 0; i --) { + var byte = buf[i] + if (positive) tuple.push(byte) + else if (zero && byte === 0) tuple.push(0) + else if (zero) { + zero = false + tuple.push(0x100 - byte) + } else tuple.push(0xFF - byte) + } + + for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) { + sum += tuple[i] * Math.pow(256, i) + } + + return positive ? sum : -1 * sum +} + +function parseNumeric (f) { + if (f[0] & 0x80) return parse256(f) + + var str = f.toString("utf8").split("\0")[0].trim() + , res = parseInt(str, 8) + + return isNaN(res) ? null : res +} + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js new file mode 100644 index 00000000000..5a3bb95a121 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js @@ -0,0 +1,236 @@ +// pipe in an fstream, and it'll make a tarball. +// key-value pair argument is global extended header props. + +module.exports = Pack + +var EntryWriter = require("./entry-writer.js") + , Stream = require("stream").Stream + , path = require("path") + , inherits = require("inherits") + , GlobalHeaderWriter = require("./global-header-writer.js") + , collect = require("fstream").collect + , eof = new Buffer(512) + +for (var i = 0; i < 512; i ++) eof[i] = 0 + +inherits(Pack, Stream) + +function Pack (props) { + // console.error("-- p ctor") + var me = this + if (!(me instanceof Pack)) return new Pack(props) + + if (props) me._noProprietary = props.noProprietary + else me._noProprietary = false + + me._global = props + + me.readable = true + me.writable = true + me._buffer = [] + // console.error("-- -- set current to null in ctor") + me._currentEntry = null + me._processing = false + + me._pipeRoot = null + me.on("pipe", function (src) { + if (src.root === me._pipeRoot) return + me._pipeRoot = src + src.on("end", function () { + me._pipeRoot = null + }) + me.add(src) + }) +} + +Pack.prototype.addGlobal = function (props) { + // console.error("-- p addGlobal") + if (this._didGlobal) return + this._didGlobal = true + + var me = this + GlobalHeaderWriter(props) + .on("data", function (c) { + me.emit("data", c) + }) + .end() +} + +Pack.prototype.add = function (stream) { + if (this._global && !this._didGlobal) this.addGlobal(this._global) + + if (this._ended) return this.emit("error", new Error("add after end")) + + collect(stream) + this._buffer.push(stream) + this._process() + this._needDrain = this._buffer.length > 0 + return !this._needDrain +} + +Pack.prototype.pause = function () { + this._paused = true + if (this._currentEntry) this._currentEntry.pause() + this.emit("pause") +} + +Pack.prototype.resume = function () { + this._paused = false + if (this._currentEntry) this._currentEntry.resume() + this.emit("resume") + this._process() +} + +Pack.prototype.end = function () { + this._ended = true + this._buffer.push(eof) + this._process() +} + +Pack.prototype._process = function () { + var me = this + if (me._paused || me._processing) { + return + } + + var entry = me._buffer.shift() + + if (!entry) { + if (me._needDrain) { + me.emit("drain") + } + return + } + + if (entry.ready === false) { + // console.error("-- entry is not ready", entry) + me._buffer.unshift(entry) + entry.on("ready", function () { + // console.error("-- -- ready!", entry) + me._process() + }) + return + } + + me._processing = true + + if (entry === eof) { + // need 2 ending null blocks. + me.emit("data", eof) + me.emit("data", eof) + me.emit("end") + me.emit("close") + return + } + + // Change the path to be relative to the root dir that was + // added to the tarball. + // + // XXX This should be more like how -C works, so you can + // explicitly set a root dir, and also explicitly set a pathname + // in the tarball to use. That way we can skip a lot of extra + // work when resolving symlinks for bundled dependencies in npm. + + var root = path.dirname((entry.root || entry).path); + if (me._global && me._global.fromBase && entry.root && entry.root.path) { + // user set 'fromBase: true' indicating tar root should be directory itself + root = entry.root.path; + } + + var wprops = {} + + Object.keys(entry.props || {}).forEach(function (k) { + wprops[k] = entry.props[k] + }) + + if (me._noProprietary) wprops.noProprietary = true + + wprops.path = path.relative(root, entry.path || '') + + // actually not a matter of opinion or taste. + if (process.platform === "win32") { + wprops.path = wprops.path.replace(/\\/g, "/") + } + + if (!wprops.type) + wprops.type = 'Directory' + + switch (wprops.type) { + // sockets not supported + case "Socket": + return + + case "Directory": + wprops.path += "/" + wprops.size = 0 + break + + case "Link": + var lp = path.resolve(path.dirname(entry.path), entry.linkpath) + wprops.linkpath = path.relative(root, lp) || "." + wprops.size = 0 + break + + case "SymbolicLink": + var lp = path.resolve(path.dirname(entry.path), entry.linkpath) + wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "." + wprops.size = 0 + break + } + + // console.error("-- new writer", wprops) + // if (!wprops.type) { + // // console.error("-- no type?", entry.constructor.name, entry) + // } + + // console.error("-- -- set current to new writer", wprops.path) + var writer = me._currentEntry = EntryWriter(wprops) + + writer.parent = me + + // writer.on("end", function () { + // // console.error("-- -- writer end", writer.path) + // }) + + writer.on("data", function (c) { + me.emit("data", c) + }) + + writer.on("header", function () { + Buffer.prototype.toJSON = function () { + return this.toString().split(/\0/).join(".") + } + // console.error("-- -- writer header %j", writer.props) + if (writer.props.size === 0) nextEntry() + }) + writer.on("close", nextEntry) + + var ended = false + function nextEntry () { + if (ended) return + ended = true + + // console.error("-- -- writer close", writer.path) + // console.error("-- -- set current to null", wprops.path) + me._currentEntry = null + me._processing = false + me._process() + } + + writer.on("error", function (er) { + // console.error("-- -- writer error", writer.path) + me.emit("error", er) + }) + + // if it's the root, then there's no need to add its entries, + // or data, since they'll be added directly. + if (entry === me._pipeRoot) { + // console.error("-- is the root, don't auto-add") + writer.add = null + } + + entry.pipe(writer) +} + +Pack.prototype.destroy = function () {} +Pack.prototype.write = function () {} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js new file mode 100644 index 00000000000..600ad782f0f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js @@ -0,0 +1,275 @@ + +// A writable stream. +// It emits "entry" events, which provide a readable stream that has +// header info attached. + +module.exports = Parse.create = Parse + +var stream = require("stream") + , Stream = stream.Stream + , BlockStream = require("block-stream") + , tar = require("../tar.js") + , TarHeader = require("./header.js") + , Entry = require("./entry.js") + , BufferEntry = require("./buffer-entry.js") + , ExtendedHeader = require("./extended-header.js") + , assert = require("assert").ok + , inherits = require("inherits") + , fstream = require("fstream") + +// reading a tar is a lot like reading a directory +// However, we're actually not going to run the ctor, +// since it does a stat and various other stuff. +// This inheritance gives us the pause/resume/pipe +// behavior that is desired. +inherits(Parse, fstream.Reader) + +function Parse () { + var me = this + if (!(me instanceof Parse)) return new Parse() + + // doesn't apply fstream.Reader ctor? + // no, becasue we don't want to stat/etc, we just + // want to get the entry/add logic from .pipe() + Stream.apply(me) + + me.writable = true + me.readable = true + me._stream = new BlockStream(512) + me.position = 0 + me._ended = false + + me._stream.on("error", function (e) { + me.emit("error", e) + }) + + me._stream.on("data", function (c) { + me._process(c) + }) + + me._stream.on("end", function () { + me._streamEnd() + }) + + me._stream.on("drain", function () { + me.emit("drain") + }) +} + +// overridden in Extract class, since it needs to +// wait for its DirWriter part to finish before +// emitting "end" +Parse.prototype._streamEnd = function () { + var me = this + if (!me._ended || me._entry) me.error("unexpected eof") + me.emit("end") +} + +// a tar reader is actually a filter, not just a readable stream. +// So, you should pipe a tarball stream into it, and it needs these +// write/end methods to do that. +Parse.prototype.write = function (c) { + if (this._ended) { + // gnutar puts a LOT of nulls at the end. + // you can keep writing these things forever. + // Just ignore them. + for (var i = 0, l = c.length; i > l; i ++) { + if (c[i] !== 0) return this.error("write() after end()") + } + return + } + return this._stream.write(c) +} + +Parse.prototype.end = function (c) { + this._ended = true + return this._stream.end(c) +} + +// don't need to do anything, since we're just +// proxying the data up from the _stream. +// Just need to override the parent's "Not Implemented" +// error-thrower. +Parse.prototype._read = function () {} + +Parse.prototype._process = function (c) { + assert(c && c.length === 512, "block size should be 512") + + // one of three cases. + // 1. A new header + // 2. A part of a file/extended header + // 3. One of two or more EOF null blocks + + if (this._entry) { + var entry = this._entry + if(!entry._abort) entry.write(c) + else { + entry._remaining -= c.length + if(entry._remaining < 0) entry._remaining = 0 + } + if (entry._remaining === 0) { + entry.end() + this._entry = null + } + } else { + // either zeroes or a header + var zero = true + for (var i = 0; i < 512 && zero; i ++) { + zero = c[i] === 0 + } + + // eof is *at least* 2 blocks of nulls, and then the end of the + // file. you can put blocks of nulls between entries anywhere, + // so appending one tarball to another is technically valid. + // ending without the eof null blocks is not allowed, however. + if (zero) { + if (this._eofStarted) + this._ended = true + this._eofStarted = true + } else { + this._eofStarted = false + this._startEntry(c) + } + } + + this.position += 512 +} + +// take a header chunk, start the right kind of entry. +Parse.prototype._startEntry = function (c) { + var header = new TarHeader(c) + , self = this + , entry + , ev + , EntryType + , onend + , meta = false + + if (null === header.size || !header.cksumValid) { + var e = new Error("invalid tar file") + e.header = header + e.tar_file_offset = this.position + e.tar_block = this.position / 512 + return this.emit("error", e) + } + + switch (tar.types[header.type]) { + case "File": + case "OldFile": + case "Link": + case "SymbolicLink": + case "CharacterDevice": + case "BlockDevice": + case "Directory": + case "FIFO": + case "ContiguousFile": + case "GNUDumpDir": + // start a file. + // pass in any extended headers + // These ones consumers are typically most interested in. + EntryType = Entry + ev = "entry" + break + + case "GlobalExtendedHeader": + // extended headers that apply to the rest of the tarball + EntryType = ExtendedHeader + onend = function () { + self._global = self._global || {} + Object.keys(entry.fields).forEach(function (k) { + self._global[k] = entry.fields[k] + }) + } + ev = "globalExtendedHeader" + meta = true + break + + case "ExtendedHeader": + case "OldExtendedHeader": + // extended headers that apply to the next entry + EntryType = ExtendedHeader + onend = function () { + self._extended = entry.fields + } + ev = "extendedHeader" + meta = true + break + + case "NextFileHasLongLinkpath": + // set linkpath= in extended header + EntryType = BufferEntry + onend = function () { + self._extended = self._extended || {} + self._extended.linkpath = entry.body + } + ev = "longLinkpath" + meta = true + break + + case "NextFileHasLongPath": + case "OldGnuLongPath": + // set path= in file-extended header + EntryType = BufferEntry + onend = function () { + self._extended = self._extended || {} + self._extended.path = entry.body + } + ev = "longPath" + meta = true + break + + default: + // all the rest we skip, but still set the _entry + // member, so that we can skip over their data appropriately. + // emit an event to say that this is an ignored entry type? + EntryType = Entry + ev = "ignoredEntry" + break + } + + var global, extended + if (meta) { + global = extended = null + } else { + var global = this._global + var extended = this._extended + + // extendedHeader only applies to one entry, so once we start + // an entry, it's over. + this._extended = null + } + entry = new EntryType(header, extended, global) + entry.meta = meta + + // only proxy data events of normal files. + if (!meta) { + entry.on("data", function (c) { + me.emit("data", c) + }) + } + + if (onend) entry.on("end", onend) + + this._entry = entry + var me = this + + entry.on("pause", function () { + me.pause() + }) + + entry.on("resume", function () { + me.resume() + }) + + if (this.listeners("*").length) { + this.emit("*", ev, entry) + } + + this.emit(ev, entry) + + // Zero-byte entry. End immediately. + if (entry.props.size === 0) { + entry.end() + this._entry = null + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json new file mode 100644 index 00000000000..efce1c64cb5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "tar@~2.2.0", + "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" + ] + ], + "_from": "tar@>=2.2.0 <2.3.0", + "_id": "tar@2.2.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/tar", + "_nodeVersion": "2.2.2", + "_npmUser": { + "email": "kat@sykosomatic.org", + "name": "zkat" + }, + "_npmVersion": "2.14.3", + "_phantomChildren": {}, + "_requested": { + "name": "tar", + "raw": "tar@~2.2.0", + "rawSpec": "~2.2.0", + "scope": null, + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/node-pre-gyp", + "/fsevents/tar-pack" + ], + "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", + "_shrinkwrap": null, + "_spec": "tar@~2.2.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/node-tar/issues" + }, + "dependencies": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + }, + "description": "tar for node", + "devDependencies": { + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "rimraf": "1.x", + "tap": "0.x" + }, + "directories": {}, + "dist": { + "shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", + "tarball": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" + }, + "gitHead": "52237e39d2eb68d22a32d9a98f1d762189fe6a3d", + "homepage": "https://github.com/isaacs/node-tar#readme", + "license": "ISC", + "main": "tar.js", + "maintainers": [ + { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + { + "email": "soldair@gmail.com", + "name": "soldair" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" + } + ], + "name": "tar", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-tar.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "2.2.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js new file mode 100644 index 00000000000..a81298b9a0b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js @@ -0,0 +1,173 @@ +// field paths that every tar file must have. +// header is padded to 512 bytes. +var f = 0 + , fields = {} + , path = fields.path = f++ + , mode = fields.mode = f++ + , uid = fields.uid = f++ + , gid = fields.gid = f++ + , size = fields.size = f++ + , mtime = fields.mtime = f++ + , cksum = fields.cksum = f++ + , type = fields.type = f++ + , linkpath = fields.linkpath = f++ + , headerSize = 512 + , blockSize = 512 + , fieldSize = [] + +fieldSize[path] = 100 +fieldSize[mode] = 8 +fieldSize[uid] = 8 +fieldSize[gid] = 8 +fieldSize[size] = 12 +fieldSize[mtime] = 12 +fieldSize[cksum] = 8 +fieldSize[type] = 1 +fieldSize[linkpath] = 100 + +// "ustar\0" may introduce another bunch of headers. +// these are optional, and will be nulled out if not present. + +var ustar = fields.ustar = f++ + , ustarver = fields.ustarver = f++ + , uname = fields.uname = f++ + , gname = fields.gname = f++ + , devmaj = fields.devmaj = f++ + , devmin = fields.devmin = f++ + , prefix = fields.prefix = f++ + , fill = fields.fill = f++ + +// terminate fields. +fields[f] = null + +fieldSize[ustar] = 6 +fieldSize[ustarver] = 2 +fieldSize[uname] = 32 +fieldSize[gname] = 32 +fieldSize[devmaj] = 8 +fieldSize[devmin] = 8 +fieldSize[prefix] = 155 +fieldSize[fill] = 12 + +// nb: prefix field may in fact be 130 bytes of prefix, +// a null char, 12 bytes for atime, 12 bytes for ctime. +// +// To recognize this format: +// 1. prefix[130] === ' ' or '\0' +// 2. atime and ctime are octal numeric values +// 3. atime and ctime have ' ' in their last byte + +var fieldEnds = {} + , fieldOffs = {} + , fe = 0 +for (var i = 0; i < f; i ++) { + fieldOffs[i] = fe + fieldEnds[i] = (fe += fieldSize[i]) +} + +// build a translation table of field paths. +Object.keys(fields).forEach(function (f) { + if (fields[f] !== null) fields[fields[f]] = f +}) + +// different values of the 'type' field +// paths match the values of Stats.isX() functions, where appropriate +var types = + { 0: "File" + , "\0": "OldFile" // like 0 + , "": "OldFile" + , 1: "Link" + , 2: "SymbolicLink" + , 3: "CharacterDevice" + , 4: "BlockDevice" + , 5: "Directory" + , 6: "FIFO" + , 7: "ContiguousFile" // like 0 + // posix headers + , g: "GlobalExtendedHeader" // k=v for the rest of the archive + , x: "ExtendedHeader" // k=v for the next file + // vendor-specific stuff + , A: "SolarisACL" // skip + , D: "GNUDumpDir" // like 5, but with data, which should be skipped + , I: "Inode" // metadata only, skip + , K: "NextFileHasLongLinkpath" // data = link path of next file + , L: "NextFileHasLongPath" // data = path of next file + , M: "ContinuationFile" // skip + , N: "OldGnuLongPath" // like L + , S: "SparseFile" // skip + , V: "TapeVolumeHeader" // skip + , X: "OldExtendedHeader" // like x + } + +Object.keys(types).forEach(function (t) { + types[types[t]] = types[types[t]] || t +}) + +// values for the mode field +var modes = + { suid: 04000 // set uid on extraction + , sgid: 02000 // set gid on extraction + , svtx: 01000 // set restricted deletion flag on dirs on extraction + , uread: 0400 + , uwrite: 0200 + , uexec: 0100 + , gread: 040 + , gwrite: 020 + , gexec: 010 + , oread: 4 + , owrite: 2 + , oexec: 1 + , all: 07777 + } + +var numeric = + { mode: true + , uid: true + , gid: true + , size: true + , mtime: true + , devmaj: true + , devmin: true + , cksum: true + , atime: true + , ctime: true + , dev: true + , ino: true + , nlink: true + } + +Object.keys(modes).forEach(function (t) { + modes[modes[t]] = modes[modes[t]] || t +}) + +var knownExtended = + { atime: true + , charset: true + , comment: true + , ctime: true + , gid: true + , gname: true + , linkpath: true + , mtime: true + , path: true + , realtime: true + , security: true + , size: true + , uid: true + , uname: true } + + +exports.fields = fields +exports.fieldSize = fieldSize +exports.fieldOffs = fieldOffs +exports.fieldEnds = fieldEnds +exports.types = types +exports.modes = modes +exports.numeric = numeric +exports.headerSize = headerSize +exports.blockSize = blockSize +exports.knownExtended = knownExtended + +exports.Pack = require("./lib/pack.js") +exports.Parse = require("./lib/parse.js") +exports.Extract = require("./lib/extract.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js new file mode 100644 index 00000000000..1524ff7af05 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js @@ -0,0 +1,53 @@ +// the fixtures have some weird stuff that is painful +// to include directly in the repo for various reasons. +// +// So, unpack the fixtures with the system tar first. +// +// This means, of course, that it'll only work if you +// already have a tar implementation, and some of them +// will not properly unpack the fixtures anyway. +// +// But, since usually those tests will fail on Windows +// and other systems with less capable filesystems anyway, +// at least this way we don't cause inconveniences by +// merely cloning the repo or installing the package. + +var tap = require("tap") +, child_process = require("child_process") +, rimraf = require("rimraf") +, test = tap.test +, path = require("path") + +test("clean fixtures", function (t) { + rimraf(path.resolve(__dirname, "fixtures"), function (er) { + t.ifError(er, "rimraf ./fixtures/") + t.end() + }) +}) + +test("clean tmp", function (t) { + rimraf(path.resolve(__dirname, "tmp"), function (er) { + t.ifError(er, "rimraf ./tmp/") + t.end() + }) +}) + +test("extract fixtures", function (t) { + var c = child_process.spawn("tar" + ,["xzvf", "fixtures.tgz"] + ,{ cwd: __dirname }) + + c.stdout.on("data", errwrite) + c.stderr.on("data", errwrite) + function errwrite (chunk) { + process.stderr.write(chunk) + } + + c.on("exit", function (code) { + t.equal(code, 0, "extract fixtures should exit with 0") + if (code) { + t.comment("Note, all tests from here on out will fail because of this.") + } + t.end() + }) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/cb-never-called-1.0.1.tgz b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/cb-never-called-1.0.1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..9e7014d85abe48a54cb6b4e1ec032df9a2073034 GIT binary patch literal 4096 zcmV+b5dZHViwFP!000001MOI6Sd-h91_Y5NO{$a-kt&eT2}P;Wl@<^X2_bX>Bta4B zh*T+|m(YrHJ$@AVon$2K1bnGjnI=&)j>@+~+y(pY`qa?su)7oxJON zp18u`jxbwz}afxwcd{NMW^{~g@X7#QmGDF4?wzdj4#-{Zds9+3k8KqSl=0fYd6a4R7s;ywZ; z1cx~}A*_Md&dAd>+TI0u#)E}H!r)(7YXlmOvUkP&#{5b;!|Z>q?2*<8kJF#huk5dl z=u_gX*=YiUKx59fA>ei{0CS)!3gv==0FW+#GXj8iMZoQC>=D-HKmZR90O4Ve0f2$0 zO7EZ5VD1<@7u0|Bbh3vdkm#Ss*Dz29l6#Z?*;o26h2MNHa(4Bn-`GE-$C>{nCI3hN zONfJh_rHXsn55{b|3y!q{__7n1NUJl!08151prE$InmxD|dP>VO0+d3I@mgOu8WXfCwZ8^$>UsU~^jIY!>k$ z_#csz!CjDO7bk?UlZ!1MP*vAZ{|*Fr4I%6b!`Pkn@cvzUHh2D$7WFsc(>Pp<* zcMDHUmM`*lommz%IhEqIpfC(=?vs+JU}a`0(8(cZ#l?4UNw^kaK7i7>l&;d3kbSUc z5W{Go@P?7%HAZH~5~c3xN(v5b(G($OtjFj=^vA~TMW6C0!h!JPICEtnsZ6Wk>+-4?xyI*FY5P*X7b18* zQ#;)wb!KCta{=d#O`e1}nLA{Bz1-#8=O3ZjB$@bOMLE^qS1N+M{DYsVde<-Ax~PI-9sxr3cjUIH?G_6g(t%feuXw9=AAUxMz3LTVO`c!x z-iK8l+1Ea?1$Wfgc+0XLF6wk8{@~z1deC>fmDu@4>z_50m}cVFp60T@BtE9^ zfLC2p<{wc@E=|>fqTKrK&iDqRt|E7RVi|W1sI{d;%2R@=n@UQyDr(1$H)e+0S28sF zj3@-0|uGPWd$n3h~PH2NKF@Iz64wvvwt7qD#B9 zL;y087W(|OBp+r4J||c&>IA&o@^tRJl~|CyVsKA6E%55ZgHHv?)N=PqL;~#3HxH7N z%g0mSV%s4Rmtr`E(U{7xO&xq(Ki_KQaemjmzNp6jP5PBrV;c4*lr37?eL+8hTy3pF zgu}X^WYUcErNvyjGsvM)^^nd>wt|^~DZR-vJI3yUsOD6SDcBN#4lfTN{Albmt-Ep; zu2L>OHxl^DXwhbweyPlTTQ#7NW*XJyvcw#f(NNWay0oB`JTEvD)n408ADCBm7->Ed z$BtC$t>ta+@!)TnVO1-p}HQbjOFzFcaR@JepTP4?y_@6wC8ULj@kUBM2wb^(mdCpGI^ zyYScO5bw6=gbT{^Q}bp}yLDM#(1idUtkhn^r`{mLXadG7C*Zs%tZnna^>8Bd>%2%L zrE5#_Bl1ERR|q~N*XuYAKGuIImui6<0I@k?@!(s`*e6Td+@VJGx1cW6hb0FMdux5S zwCmD2FHDjj-kr&jZr#`HY)x4koye0E{dQd|7u)73CLqK#$Q`vCP-)ioKt>~lzg6$) zqrR{PkJ6{v<-_iEJnCW|DJHNwh>Otz(~WxvejNmw`{R7y2OxTG&cK~ZR%##>T4usq zZo;Ls+mrkFrF_|pxCJwJBJ4#-yzmauIvYgatKC$$f1Eo=)h?(rHgsx^lgEvId)bV9 z32wVg|Bi5`+``1ow}-l~E-MWvRqP-P!IJS%3XO^nJ;smQWi$8Zy|YUtq|i6Wd=F(h zZ!*C;faYZA?@;uyJHgt)uyg58OTIEMw5*V=#dlA1TgwqITi#xvFbD+`UYW#g>EPVn zMbjp1`bqoqaGi7?yw&!Vmyn8-8SkapO%pZ9CxxGgEo;=gBPl*cgmZDVBt8Eoam{-y z)oskabX+^4=US=$3zTy=MKkC~dIZ0H2@(`s7)X6*8g@@u(<1#zyl5<&)9vUQ7UMUf zbLK@OjL>H5>5}#t1egUoD+)`Q@8G4e6O*WD7I0> z+U0SSp%YPwkxaVG5zLYHeALwZW^7>Z!sz&de!0I?oJ+4&3T>lyNT6Joi}(f^^-G#> zKna44%!2d#9U=-fu5?8gt_s;TOgk|~e=M z(haQdGr5=iTH8)nZXH;?u09#Rz+BrXZCbX1J_FzZ&qAQk9c)lKpP_OPIw=^k(M^Gp*dN^34MCzJl$h3Ui?QeGHsaDBf>&F zqwOuqj`uz9``CKo1H*CUef*-$lqTa6g}S-qAwocs+buTNG{q4LW!zdhZgnFu=iW@$#^D zf0!8E&1jN3HHCmZht^t6Q-p~0<_c{(bLj{Xt5i1hdRGraD|^yyDcY4!d-o$4l02VE z&+arc1Yff^@DZkNrO)5*jC&(eiO!G7h}0e!#Om+Qbf#XE?uQKfdXXd!NvX90NzW5; zt0SHXPbjk2s*xuh7Gn=nL@SaPm8ttxo;2z(tVa^e5jIi1!uc^cy}rw0Q*RMCuh3JnYF?qDv`?-IL0QE&DEbmYE~jLk>}h4zB57 z;6oAJH5tLx?sA+!XARU`KFDFukndYzpGW#J_Qi*UiSH8(tD0#Wrs>09LpoR{^L1ID zMPm&z6|Y@Q^-Z9FJZwD-W&e_C!5(&}l!&3t3|pI<_Bmbdt145s!Jsv>o(=t0QI7v+ zGnB)5``uQH%0Vr)a+OoQUfv?pORr*xjAvv5OmwCT+}s%9aG%X%s?T~S!@M{xw@kVb zZgt7*U1xOCXa6LlnDf@|LOEtnY zzEqI5I?^(M0wbC{FSeDM2-nc-o1E;!9@>}mJ~k4_5%AW2OFy2J5?aC!ba|GrUzh(P zH;-Q}UT$e?iP2ahx_SRHUmJWzK~H0=sYo(Sv;CoFNKS0`?pnw}6L2@0kuoY~0C3b+ z_k!U@)uxiwmc=_>0=RarSRrwE57V$m7v)j9VoIa}Zbcd7XOT_%a<|WLoHcHNG0?yM z0&xIkXbv*X;f<&-J~D0ktzl=)Yh^sN#>=}bAWq2yb+@UUp2fJT!Ms(AOcv7K{%ni+$8 zz$=z&nRh69i)q$1V{6|q#WA)wJ;}m$P;M~_q`Ws!oTG@tIASTaFohN0jW(4Wys~dW zv&H&%2xFyaB|l$KkInQmtnQ4u`O#-zba;D>Vp=+{xYhDo1^<}hIhg?y&L$wKx5*C{ zr4WXy0_Fj9J&8~<%+@{Iv0Z*4CAy*GNz-&=oj>&+=tc898+nvWmPMdINsE-cTouy4 zrK^}eind7L7z`S$TTlVooa}3NM2i-<(%k1T#!a(%EAXdr^|qP}<;il0R}=Hj2KoC1 zh^$(!w~U(47zn-L%(^TYAW-!HoVUq_!kOEjr1Q#9Y^;WS*xbU2i}zF3R?hPoDqT2M z^F~d2X;*s_sL%kd;)BWDdAPRxOXp@M_rHu-J&Q;Rs+i|c66vVN-lcvKrVz805jc+O z!f2?HlA-C?r?f5BwAZHUjm4-Eld?r|f~HYf>-`IYq4Uo4oTMeT)ZwV8sl#gA_q{Tz znWptaRUdk8Q?>g;VAAoh4TtOif7Nyp4(E%<#;@gbrTlQR`GRJ!F2!+j$9a|u>aS%8 zkNlwTdaGySDF-|K<}yunncD&gsvRKudg_NN+cm@R>WQpYsvyRGeRvo}&)Y$ZS2TTV z!?DaM#u?#pYqR<(OWy0Pt-|^RR?9I;uO5NIZrtvT&4dsS%kPtw}<6))- yt=kRJt4#0W>hFnshu(4QecAmmIH4odAf{v@=5VI8kvw%kgq3P?0(H++;E@y9-yRnL literal 0 HcmV?d00001 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js new file mode 100644 index 00000000000..9719c42f354 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js @@ -0,0 +1,177 @@ +// Set the umask, so that it works the same everywhere. +process.umask(parseInt('22', 8)) + +var fs = require('fs') +var path = require('path') + +var fstream = require('fstream') +var test = require('tap').test + +var tar = require('../tar.js') +var file = path.resolve(__dirname, 'dir-normalization.tar') +var target = path.resolve(__dirname, 'tmp/dir-normalization-test') +var ee = 0 + +var expectEntries = [ + { path: 'fixtures/', + mode: '755', + type: '5', + linkpath: '' + }, + { path: 'fixtures/a/', + mode: '755', + type: '5', + linkpath: '' + }, + { path: 'fixtures/the-chumbler', + mode: '755', + type: '2', + linkpath: path.resolve(target, 'a/b/c/d/the-chumbler'), + }, + { path: 'fixtures/a/b/', + mode: '755', + type: '5', + linkpath: '' + }, + { path: 'fixtures/a/x', + mode: '644', + type: '0', + linkpath: '' + }, + { path: 'fixtures/a/b/c/', + mode: '755', + type: '5', + linkpath: '' + }, + { path: 'fixtures/a/b/c/y', + mode: '755', + type: '2', + linkpath: '../../x', + } +] + +var ef = 0 +var expectFiles = [ + { path: '', + mode: '40755', + type: 'Directory', + depth: 0, + linkpath: undefined + }, + { path: '/fixtures', + mode: '40755', + type: 'Directory', + depth: 1, + linkpath: undefined + }, + { path: '/fixtures/a', + mode: '40755', + type: 'Directory', + depth: 2, + linkpath: undefined + }, + { path: '/fixtures/a/b', + mode: '40755', + type: 'Directory', + depth: 3, + linkpath: undefined + }, + { path: '/fixtures/a/b/c', + mode: '40755', + type: 'Directory', + depth: 4, + linkpath: undefined + }, + { path: '/fixtures/a/b/c/y', + mode: '120755', + type: 'SymbolicLink', + depth: 5, + linkpath: '../../x' + }, + { path: '/fixtures/a/x', + mode: '100644', + type: 'File', + depth: 3, + linkpath: undefined + }, + { path: '/fixtures/the-chumbler', + mode: '120755', + type: 'SymbolicLink', + depth: 2, + linkpath: path.resolve(target, 'a/b/c/d/the-chumbler') + } +] + +test('preclean', function (t) { + require('rimraf').sync(path.join(__dirname, '/tmp/dir-normalization-test')) + t.pass('cleaned!') + t.end() +}) + +test('extract test', function (t) { + var extract = tar.Extract(target) + var inp = fs.createReadStream(file) + + inp.pipe(extract) + + extract.on('end', function () { + t.equal(ee, expectEntries.length, 'should see ' + expectEntries.length + ' entries') + + // should get no more entries after end + extract.removeAllListeners('entry') + extract.on('entry', function (e) { + t.fail('Should not get entries after end!') + }) + + next() + }) + + extract.on('entry', function (entry) { + var mode = entry.props.mode & (~parseInt('22', 8)) + var found = { + path: entry.path, + mode: mode.toString(8), + type: entry.props.type, + linkpath: entry.props.linkpath, + } + + var wanted = expectEntries[ee++] + t.equivalent(found, wanted, 'tar entry ' + ee + ' ' + (wanted && wanted.path)) + }) + + function next () { + var r = fstream.Reader({ + path: target, + type: 'Directory', + sort: 'alpha' + }) + + r.on('ready', function () { + foundEntry(r) + }) + + r.on('end', finish) + + function foundEntry (entry) { + var p = entry.path.substr(target.length) + var mode = entry.props.mode & (~parseInt('22', 8)) + var found = { + path: p, + mode: mode.toString(8), + type: entry.props.type, + depth: entry.props.depth, + linkpath: entry.props.linkpath + } + + var wanted = expectFiles[ef++] + t.equivalent(found, wanted, 'unpacked file ' + ef + ' ' + (wanted && wanted.path)) + + entry.on('entry', foundEntry) + } + + function finish () { + t.equal(ef, expectFiles.length, 'should have ' + ef + ' items') + t.end() + } + } +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.tar b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.tar new file mode 100644 index 0000000000000000000000000000000000000000..3c4845356cecb20939b415830a5fa9717fb91341 GIT binary patch literal 4608 zcmeHJS&qUm4DC^J0f_Cy&3Qtn6-dKR7m2w&PN6j7t4Me>Xkt~0n?~MVp55+r8K=G- zY^5gv5SUE`972tqikXFmnFvea&It?*4!@B>h$+50` z-pt$IGqpQZU1J+8}SF0 zCIB7{5IUmDkd5|W8~bGygDd>M_5W1rH{-sT+lc?%|G~}t525gXDWB^4;D59iEk}ZX z?bE#9F#qrUKRCf3v;xZQ7XGjNZ*)4qOZ=A~MLp$ne2HwSHsX(c~XH?({YrM8z literal 0 HcmV?d00001 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js new file mode 100644 index 00000000000..e484920fd96 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js @@ -0,0 +1,33 @@ +var fs = require('fs') +var path = require('path') +var zlib = require('zlib') + +var tap = require('tap') + +var tar = require('../tar.js') + +var file = path.join(__dirname, 'cb-never-called-1.0.1.tgz') +var target = path.join(__dirname, 'tmp/extract-test') + +tap.test('preclean', function (t) { + require('rimraf').sync(__dirname + '/tmp/extract-test') + t.pass('cleaned!') + t.end() +}) + +tap.test('extract test', function (t) { + var extract = tar.Extract(target) + var inp = fs.createReadStream(file) + + inp.pipe(zlib.createGunzip()).pipe(extract) + + extract.on('error', function (er) { + t.equal(er.message, 'unexpected eof', 'error noticed') + t.end() + }) + + extract.on('end', function () { + t.fail('shouldn\'t reach this point due to errors') + t.end() + }) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js new file mode 100644 index 00000000000..45400cd9bb8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js @@ -0,0 +1,132 @@ +// Set the umask, so that it works the same everywhere. +process.umask(parseInt('22', 8)) + +var tap = require("tap") + , tar = require("../tar.js") + , fs = require("fs") + , gfs = require("graceful-fs") + , path = require("path") + , file = path.resolve(__dirname, "fixtures/dir.tar") + , target = path.resolve(__dirname, "tmp/extract-test") + , index = 0 + , fstream = require("fstream") + , rimraf = require("rimraf") + , mkdirp = require("mkdirp") + + , ee = 0 + , expectEntries = [ + { + "path" : "dir/", + "mode" : "750", + "type" : "5", + "depth" : undefined, + "size" : 0, + "linkpath" : "", + "nlink" : undefined, + "dev" : undefined, + "ino" : undefined + }, + { + "path" : "dir/sub/", + "mode" : "750", + "type" : "5", + "depth" : undefined, + "size" : 0, + "linkpath" : "", + "nlink" : undefined, + "dev" : undefined, + "ino" : undefined + } ] + +function slow (fs, method, t1, t2) { + var orig = fs[method] + if (!orig) return null + fs[method] = function () { + var args = [].slice.call(arguments) + console.error("slow", method, args[0]) + var cb = args.pop() + + setTimeout(function () { + orig.apply(fs, args.concat(function(er, data) { + setTimeout(function() { + cb(er, data) + }, t2) + })) + }, t1) + } +} + +// Make sure we get the graceful-fs that fstream is using. +var gfs2 +try { + gfs2 = require("fstream/node_modules/graceful-fs") +} catch (er) {} + +var slowMethods = ["chown", "chmod", "utimes", "lutimes"] +slowMethods.forEach(function (method) { + var t1 = 500 + var t2 = 0 + slow(fs, method, t1, t2) + slow(gfs, method, t1, t2) + if (gfs2) { + slow(gfs2, method, t1, t2) + } +}) + + + +// The extract class basically just pipes the input +// to a Reader, and then to a fstream.DirWriter + +// So, this is as much a test of fstream.Reader and fstream.Writer +// as it is of tar.Extract, but it sort of makes sense. + +tap.test("preclean", function (t) { + rimraf.sync(target) + /mkdirp.sync(target) + t.pass("cleaned!") + t.end() +}) + +tap.test("extract test", function (t) { + var extract = tar.Extract(target) + var inp = fs.createReadStream(file) + + // give it a weird buffer size to try to break in odd places + inp.bufferSize = 1234 + + inp.pipe(extract) + + extract.on("end", function () { + rimraf.sync(target) + + t.equal(ee, expectEntries.length, "should see "+ee+" entries") + + // should get no more entries after end + extract.removeAllListeners("entry") + extract.on("entry", function (e) { + t.fail("Should not get entries after end!") + }) + + t.end() + }) + + + extract.on("entry", function (entry) { + var found = + { path: entry.path + , mode: entry.props.mode.toString(8) + , type: entry.props.type + , depth: entry.props.depth + , size: entry.props.size + , linkpath: entry.props.linkpath + , nlink: entry.props.nlink + , dev: entry.props.dev + , ino: entry.props.ino + } + + var wanted = expectEntries[ee ++] + + t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) + }) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js new file mode 100644 index 00000000000..eca4e7cc962 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js @@ -0,0 +1,367 @@ +// Set the umask, so that it works the same everywhere. +process.umask(parseInt('22', 8)) + +var tap = require("tap") + , tar = require("../tar.js") + , fs = require("fs") + , path = require("path") + , file = path.resolve(__dirname, "fixtures/c.tar") + , target = path.resolve(__dirname, "tmp/extract-test") + , index = 0 + , fstream = require("fstream") + + , ee = 0 + , expectEntries = +[ { path: 'c.txt', + mode: '644', + type: '0', + depth: undefined, + size: 513, + linkpath: '', + nlink: undefined, + dev: undefined, + ino: undefined }, + { path: 'cc.txt', + mode: '644', + type: '0', + depth: undefined, + size: 513, + linkpath: '', + nlink: undefined, + dev: undefined, + ino: undefined }, + { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: '644', + type: '0', + depth: undefined, + size: 100, + linkpath: '', + nlink: undefined, + dev: undefined, + ino: undefined }, + { path: 'Ω.txt', + mode: '644', + type: '0', + depth: undefined, + size: 2, + linkpath: '', + nlink: undefined, + dev: undefined, + ino: undefined }, + { path: 'Ω.txt', + mode: '644', + type: '0', + depth: undefined, + size: 2, + linkpath: '', + nlink: 1, + dev: 234881026, + ino: 51693379 }, + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: '644', + type: '0', + depth: undefined, + size: 200, + linkpath: '', + nlink: 1, + dev: 234881026, + ino: 51681874 }, + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: '644', + type: '0', + depth: undefined, + size: 201, + linkpath: '', + nlink: undefined, + dev: undefined, + ino: undefined }, + { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', + mode: '777', + type: '2', + depth: undefined, + size: 0, + linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + nlink: undefined, + dev: undefined, + ino: undefined }, + { path: '200-hard', + mode: '644', + type: '0', + depth: undefined, + size: 200, + linkpath: '', + nlink: 2, + dev: 234881026, + ino: 51681874 }, + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: '644', + type: '1', + depth: undefined, + size: 0, + linkpath: path.resolve(target, '200-hard'), + nlink: 2, + dev: 234881026, + ino: 51681874 } ] + + , ef = 0 + , expectFiles = +[ { path: '', + mode: '40755', + type: 'Directory', + depth: 0, + linkpath: undefined }, + { path: '/200-hard', + mode: '100644', + type: 'File', + depth: 1, + size: 200, + linkpath: undefined, + nlink: 2 }, + { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', + mode: '120777', + type: 'SymbolicLink', + depth: 1, + size: 200, + linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + nlink: 1 }, + { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: '100644', + type: 'Link', + depth: 1, + size: 200, + linkpath: path.join(target, '200-hard'), + nlink: 2 }, + { path: '/c.txt', + mode: '100644', + type: 'File', + depth: 1, + size: 513, + linkpath: undefined, + nlink: 1 }, + { path: '/cc.txt', + mode: '100644', + type: 'File', + depth: 1, + size: 513, + linkpath: undefined, + nlink: 1 }, + { path: '/r', + mode: '40755', + type: 'Directory', + depth: 1, + linkpath: undefined }, + { path: '/r/e', + mode: '40755', + type: 'Directory', + depth: 2, + linkpath: undefined }, + { path: '/r/e/a', + mode: '40755', + type: 'Directory', + depth: 3, + linkpath: undefined }, + { path: '/r/e/a/l', + mode: '40755', + type: 'Directory', + depth: 4, + linkpath: undefined }, + { path: '/r/e/a/l/l', + mode: '40755', + type: 'Directory', + depth: 5, + linkpath: undefined }, + { path: '/r/e/a/l/l/y', + mode: '40755', + type: 'Directory', + depth: 6, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-', + mode: '40755', + type: 'Directory', + depth: 7, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d', + mode: '40755', + type: 'Directory', + depth: 8, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e', + mode: '40755', + type: 'Directory', + depth: 9, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e', + mode: '40755', + type: 'Directory', + depth: 10, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p', + mode: '40755', + type: 'Directory', + depth: 11, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-', + mode: '40755', + type: 'Directory', + depth: 12, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', + mode: '40755', + type: 'Directory', + depth: 13, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', + mode: '40755', + type: 'Directory', + depth: 14, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', + mode: '40755', + type: 'Directory', + depth: 15, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', + mode: '40755', + type: 'Directory', + depth: 16, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', + mode: '40755', + type: 'Directory', + depth: 17, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', + mode: '40755', + type: 'Directory', + depth: 18, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', + mode: '40755', + type: 'Directory', + depth: 19, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', + mode: '40755', + type: 'Directory', + depth: 20, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', + mode: '40755', + type: 'Directory', + depth: 21, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', + mode: '40755', + type: 'Directory', + depth: 22, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', + mode: '40755', + type: 'Directory', + depth: 23, + linkpath: undefined }, + { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: '100644', + type: 'File', + depth: 24, + size: 100, + linkpath: undefined, + nlink: 1 }, + { path: '/Ω.txt', + mode: '100644', + type: 'File', + depth: 1, + size: 2, + linkpath: undefined, + nlink: 1 } ] + + + +// The extract class basically just pipes the input +// to a Reader, and then to a fstream.DirWriter + +// So, this is as much a test of fstream.Reader and fstream.Writer +// as it is of tar.Extract, but it sort of makes sense. + +tap.test("preclean", function (t) { + require("rimraf").sync(__dirname + "/tmp/extract-test") + t.pass("cleaned!") + t.end() +}) + +tap.test("extract test", function (t) { + var extract = tar.Extract(target) + var inp = fs.createReadStream(file) + + // give it a weird buffer size to try to break in odd places + inp.bufferSize = 1234 + + inp.pipe(extract) + + extract.on("end", function () { + t.equal(ee, expectEntries.length, "should see "+ee+" entries") + + // should get no more entries after end + extract.removeAllListeners("entry") + extract.on("entry", function (e) { + t.fail("Should not get entries after end!") + }) + + next() + }) + + extract.on("entry", function (entry) { + var found = + { path: entry.path + , mode: entry.props.mode.toString(8) + , type: entry.props.type + , depth: entry.props.depth + , size: entry.props.size + , linkpath: entry.props.linkpath + , nlink: entry.props.nlink + , dev: entry.props.dev + , ino: entry.props.ino + } + + var wanted = expectEntries[ee ++] + + t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) + }) + + function next () { + var r = fstream.Reader({ path: target + , type: "Directory" + // this is just to encourage consistency + , sort: "alpha" }) + + r.on("ready", function () { + foundEntry(r) + }) + + r.on("end", finish) + + function foundEntry (entry) { + var p = entry.path.substr(target.length) + var found = + { path: p + , mode: entry.props.mode.toString(8) + , type: entry.props.type + , depth: entry.props.depth + , size: entry.props.size + , linkpath: entry.props.linkpath + , nlink: entry.props.nlink + } + + var wanted = expectFiles[ef ++] + + t.has(found, wanted, "unpacked file " + ef + " " + wanted.path) + + entry.on("entry", foundEntry) + } + + function finish () { + t.equal(ef, expectFiles.length, "should have "+ef+" items") + t.end() + } + } +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/fixtures.tgz b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/fixtures.tgz new file mode 100644 index 0000000000000000000000000000000000000000..f1676023afa2bba2aa18b5508c92f03e1d0816c6 GIT binary patch literal 19352 zcmdS9Wm8?>6E%oKa0>)?hoHgXLLj)iOK^9Wixb@4-2;JO!GpWILvVM$XZZb}7gIGe zUtnIH+O<#h+1^?)mpt7>+4-uRLlz3qxI~Dff#Gk#6 z`g-rTn_<`NkGgSqh`9%iyIO+RJMIEk@Q^cjEPzS$QFJLbkvahQFp1Gi?M1xtX z_d_3jPIjl>+%+o^H;key?OVfX3E8v2FgIk&q5@J)^5h?H8?w4%1l*k;@LW8A*KOPe z2m})_YIt^yV27?Sb9o}&8YLHw}wmBaI#s5;w$~1gL}Yl8$kSfR+T&Wf?T=;vdl4$nrcnE0Smw^kG$rI+igCu zLr{XYa&G{kKrnW&uV)Zm056SzBh^q4DFok3neK>2dnOF*v9)P(VIXSxruX3R_(6<} zOZDyM+Urp`x)%;WHfqw~UlV|((9x}_0fV6Gd7)s-8b8Iyj6dV=FE|k7SbKGn(HT^^ z)#XFd>jGa=?AGFLS4E*@QNW1Z$Q|ykv(g=BFX*Wsx?zg(0`LaBgj=IE_Wi($#wNW= zsOzqY_94)b9n`KM(7@!i*G@qTGS7a5nPO`&8Hxx?HJ_Gs!6KRIcU9CIXw9oVS zaHGn2ODfpk4(T4xmN)?#5wf70ksW$_I+pa)A=&N+ErhZ;zaOTE3v1zIS}$30$99_@ zb#iRJNa!r%r72#Uo2unZQ3}G@roGZvMz_6UPggT$oZ&9C#MNJTEnx0o>7^3(ga*-0 z&|(RQ5v%!l@f?}!_P4aUe|2XDn?Mi3*r3P46Qlh9V>}CRA zNt_D6UCg|6b#Tv={{aM$OtzmQ$i&Yf7iIx&i#I_l@h5^OhV5nYfI{AjKXEfz1ce5@z7!Ei78)mBhq_n%2+n=ux$t?fCf*hcr8^+}NV~}t0I|P;l~Dfy z!P1AX08Kyxu($y+Y>8+@)w&bh(9{}u_Nj(4Ujc>yYM_@la&?%B6_turyY$u2@C7Ki z>{{J++UgDrJ_)=BW)`g6JJY#8KLD>o53tw3D;snh2o7LH?m=^eY+@U^sAij6@eoCg zkH_?3)Vt4Z*h_A7gvEms*^r9@fY@H{SLyQhOQ~PLr_8c^m+W6 zlrdDj_DAr1kbw4f7X2lu)tdOTJ+eBX@l1;u?E88w$R9$A)^86lIoi1RR&Q1rArGd{eH6$HSpvF zphwMqYsS@TeAefy_J-C#%>?2!(}CsK(bvhQe_#uM6`q@?pN%Z91eOzx%h4)7d56K} z)Y>XP9eIg+MkFab6~VjxnM+BoY1%4Zx=r3HKSCDP%_@HsDh**J8G*6><~JvS-j5}W zzN>y}rrh9r%-$m-a*1~eCCjaY{4WI0Chrb*X9B!|^Ez45U3nMx9@%|hqVgKF`s-r!h3v08+ywa|;0oDPc?XrN()H-=WDK=y zYaai@>}TjqOax|hLM@tiXH#C5pD3I`W*?@g?R}KHX+&_+UXGkWX;7aZlAJxXSl*cx zS*GW$`UZnO^uK)BKz6l^dSx}sl1Qpa^#+1uSF~LmnY(|A(wN?|1xcWw5zz3P!XGbX!q*-V*b{#S=Ws@+bDjMqk5mR zjb|;MQs=`KY3kmnTUYzAgWsv)(G8PGVimd8_qS2d+csIGooYB7qs$E z8qKum8fe9z76`L9-#PvjK?QY-b|}l)`zd|C4?)Yy-$!6Y;d`A+A@xA{o}Vktxsgwy zoqqc4KkmMe6m5e2jhguA|+(eH*iS?hzyIMn+ z*2>F;9VRY<+KhECR6w;$kdWCzOCC^eK?4a7Uxwsj*i2qfYtIB9Ji+y%+tD{y;QP1e z`|!*1-wv?f5AXS?iz0#SV`herWGe_@YUeXDa_PUs2~Rq~;?TQPYo3Kf3i zz<-779Bf06Qb8L<@Y$qZ9>^Q%l>Ue4G>6=*i}+H@LkU9n%wtq2r4 z&#xwgbmf|^$iYsa7@p&r=mtL$WkG}?rn(krh*giCv#S|G{h4&`XCJoOfL<32oY8zO zQlQ29&yX7?JdBB2^7R5-gfm$|)W%Ck|I|qwjDe&U21RC{5t3J}t$P|NmVocL+8ZvX z@9;*5@cyf>rQ9^-5z1!?ZOk|`D=IEEySb!I_CoH@KUfDyXp$Gk+r;Rra`-! zj0UZ?_`V$-(;BbcvphCA{EylZO-QQovUdy|4w*%v^%Nm=LAB>D*I!)3##;t#V zcQ1#fZS3oy&zBIV+ORF3FXyeVT?^mfJ%lTndN~%rZbdF^7%edU-&fNIfy*>DMkS=5 zB2JS}KyEh((s@kEt3{)RqWQTnruDh&O#P7zMN=62AnH)=<3cv@ruC`+=v~dLMa^zo z%Sa1g^ap9J&UN(pNxev6GfRK3Kx;9=fZr_ixV z(x3w`A`sma*0_xyvpxGm3S4%GwwrjDz(NP{m-A>O{M5bxY7Pzaiyj2SuXY45KD`E| z!eE4+X$r+XeEdHucqp6>k^Cp#T$t&NHUI;>gt0=sE1&ED2uMo_%uEi!-|vGfHc@{01*RPWf;3OmcKDu@q4D`r~G_ z(cEfdB8)Dxe8|Rcw$&nDOk;}!Y+gW~kii^451AKm=;+x4SMvd&f3I;Fc=G>fCJHGY zv93XawV43cpe67!%BJw191>o~x=y17u+AJ`0N-_20YniO;WGecsI%O=*cuEYTNie# z)1u!4c5u7z{(%;Nh{C2QfCXNI1x);os8>UWsq3y)G6$A&v^7Xv2j5j5l!KIP5H-cq zh2#bm)_D|wCx&uy_%g7I zhQO3;_N&K#5-&8U3GnvX;2+0JbarZeLmcoY-vt@N#Pv-;bSZ7^BaMZHWf6}{AIHbh zrg}Px@lB<@8%BSEaa-=tE+27*iMCAsoaCGXVZdb&_Ul5p2ej^zzZOq-5!>U1tbIo( z%H{qV6h^G^=)*3(+=_v~wQl;y|9YjlvvG?FVRnAF zx-snu-~?f$))jXqriYcbVp;Lai=f z7LWwI%QDBh-25|8bwe;s6!)8egGnwV?GC_ZjizE1c_TyYYy+$qE|o_7|EJmKo7;AG|CH~k3w3D?x9E0F z3KI8Ac*p&BPG3Zxxbzx&kO7^nM^H6MWAo~CbWI!?x_!>;g-Ky^%Ijv>rl8D&<}ko+ ze8>LO)zPs7y@`dSoEow>+JpZ~@!z;KL@Q%HAB? z?p;$|4`WPDlLU^H;3-~PzR?twcq6r^GPayPVaXZ$5P@VzCtq7SNSZ`Cc~VsD;f+V> zOHgm8(cKe^_Z*r}tA1;a;}YuSPG$y=-cZ0R3-J1qy@k-WBn9{O5N}cx2lw^#^7FRy z#udOhocCr;-VyfG&bsQU~7jK=$3BDXX#V z5|YBb^8=U__EqasEAjr`GGkhAyP)o#v)+}CZOW)}8{VqNcL-u&zmwmGn@2K8;KI=-m!&T{tS+)ga26y*a5X?0&iWY?>yGgvkxeHcLrci?Y$}zH1+|a zNVc1$H+j;h=U^S=z2`+mk-33|yeD9{a zci$n8{f>Xx%33GVpxAqN1`_N&_y=%wFN06eKoby*W$>@GzII^u7Em#|hhS7f?qi!( zzaXv%i2AC#bSt`l_3X)j1u?(!zJO?faD&x(us$;H+eLREEaJ%reu#jKfFYeW`|_U` zZb3m@vdLQD5HaCG(iC`+zLo0p*i7NCZiOtKfDF3-%C_u04?^$z(SBF~N07DM86q6s z85)rr<-U=5sskV^#Ls{W1JsEKq^mSohn)PnsmRm9Vvq+GTC|-+Li)D}@9QU|fKZ#> z89U7#DC4<%_a>puerSK*^6HnbD=nP>S)=~j=3c-JutPA}tNxfe~;2BRqT5#}dMsM5r|8?n=XVw51`#Q*3`Pl-PV5$y+?;#JpXb66s zuK`r@o!+m~ssC*o6aRTX^OzQJuCMZ+sexC+W=K?c#tArlW9x1abQRQH18{65-gR*z zxAZ(CChP(w-6bcWKScj62Xj{eUF0!sK;RdgLmedIoy-yUe}XUWaUI|89DE{@0NFsM zYOufVe=mmz{>Sw{e?yw1KWrGi^+3CxbfLb7ZBRI>lvChz(hz%ElDPlU_Lv*j78+RLYcK15!Fyrw!z6z$$w`>R-O&B|%F{bhq5hog z04W$UeDp7_!8Q?HhwhEE{c7|;=n()KS{df@p@eSH46p|Amudq35H+=@vU2kn+SwAj zE4&0p(S<%bw>)UKKizKko)0#Me;01|d^_&{=?QpU9Hhlz#JPiHKYPC-1D=E=fVxNa642WUvph;I>V8~GfQLR^emR^tS?_)0nWH#e zJ-4_!dFfbh_IYNtk-Ah)aEl-7bK)NA8l8w#)jG2sTS8oJwpBXvTDCcDn!kX8iyN8< zocN=i#-6Qm7hJgE=a1vl_^>*?G1%b*{vPnxuUjB^`K^`kijzO)i$u0(*`|!G0Pr z{1+;^@g$>2+9CXSyFa;Ob&5DCe!xXimh+*Su=-fIX0p^2T8maoCPJMOt`v_g?lvNz zdE!}22fk4I@Gm*2=bRHkYhb*+xx$-?RT=!b?_t*eVD9+spO5`5ruV?7SXSD#TlU|a zotQvYjLQztfs3i+QOAQn1lqNQD}`p|xTS4840q&&uczdt4VrVdh8i8X*z1)GSOSfH zL>smDyHHd(LSwi}`6&V?=ND}22{YM!ka0|6(mhdt5P(oh#Xf9YI8hob4Th7yvGmFp z;kkYNxfAaE%MlG_{$sJ_90OJMqqKjbC}`j@OR0!f8I==;5s_5%3#~+AeII0jE+MYo zDH0CFMOu}CEEK`;w2QEFX$5SCMk;aXx0cu4;zb(3_}rT$YHo$)OKAhI5;J9}2wNjD z!fpH{j28Gwfw};#;lq&Asq+w|Pz!O8frkgAm^?7L~UGScl-?lo9__q4Y(A47B zpAJ_zT}^kjueFbwSv}rwwo@e;sb53I(QX?yttxn$9@D@(=5-kD!pK~Esfqyuf@=WA zTgZjiJe~j36VFKm??(BTo9)@v;EuTCgtL_g!+TZ$vYvfW06Xw-r%dd}`|S7x>j3e! zY*ZSodqMw~A2et>DqMPpc`KmUC?!Svac8qHsmn_-vy>Qp-uCw4DIsfvNS;<}|UqE1v1L5t(E0Zf+zv7>t?j)BRv`v89t0CVGmO=E&Mli>C zS!nCy<+GeO)r;yZQAR9$MdLo*bp7{^TDt{SskIRzs3OJU;9)CaA-<1q5$^O*7N9Z~lZ(I&w`Y4jg4DnaUm_ zn$q-85%$sxEyk6;y0f3Ta4gU~!;=$JVK8(VV_4*$$V(OYj}?suJhqS6XL1IL zI-f8ImvB!n<;~Vj4~mjA=`OIxavM+~8uu*N$Ct&YzWxY!l-5bOsMRn?*TeTXzf)AM zY6qRo|Xx!Lp#{p33m01t-HZw~2f7we9*ssbILy%RT$N?Devedw-hN zmAF0M#h=c}jS+7K;h|0aK$0?lIFzDXY4G`7He~MslRI*Sn;P6FO+^`bTwZX-S@>qW z0lywtK(O^U8SgmbQ$1A`Nq~eaVxDlPz!D&Zx19vy{1Z2&?SIGBuTA!^4o^!39e%GG znvxQ=39~R*7E_v<)8e={Ex72-5Ht-V{A7f*vYqS|j2Sd6B#HrJs(#f7`np(%MdU8M zjIAil(WHpzV1<<+_lqa=F)e90Z))bt+NgwWc-N`FaI((UFog+~_c=bXFHs;(`tW0q zS#ZdemGSLAO^FcF-i2mgsN61Wkr%pNVm|N>)M%34D;}y>mB?ngt}jE}-%J#hsb8PJ zg<|G?sjO8~m=j+}LWSX>tG`SXl&)KrP!T*F1>uvKuiFF7Hbn{{G}$M&ynuObi4&+1GJ>z4JkX_I5AxKSjk1d= z(9~6Oh;a}{YBrnqPLL5*j#xioG7m9lhMTNhtk8cNY+BuzVoB0 zhir`hasHztJ!ptjHv30W6qZg~lh}H+SOyJE3}$Q-ugoAF!8f7l+8Qep8)3HCn>N(h zsQ@TRDBh9u$+cfnZqIGVe;p-*sBybSI{0JlgNMKF{7M+GB8~$@Ai#3h@yBtcmX!(i8g_ke4V56?ZEzGLR8k1ghRaTHS&5_x?g$ z#Qvk~W|MENd;nYG*JEg>(dfT86(lWQbC|7e!E_-}KRL_#zXYH@+kK9-<>>jacqVtfd~w70vFyopsz0`P^V+|8jqp^S zT~JBkxJG`-F@u&F)f0d0#(4j!y)}qltWbOP@ zAJTksj6=pJv)9d>GYnIo_QE?Ob|d%G`VzROz2|6k z6l-NpVtAXHu_O;7d6z;~o1U7?{}Q;*F^gCK1jjKpZ8aIke{q*s4N|!rkunY*8ut;Z zL$_>4yZ$tXS!(df&}J-bSkhP~nhy|V@9EyOjDKE!Dwe)pC4o!ec^10NdY)mO^OtU< zqu0*o{LU{vA+To}zM|AN+t3iT$w$%ick;^o=7a^ehFmsxM{_d0HSm?60F;IPOxMfF zIbatnUSgUuC6s#)Q3Fq@gu%TIm&6e@So(f%zXtbDXDx#Nbg1L8%rd?Zs7B7*KnN@o zm4$PQ2aP@}vJIoinIc1vt`p^uYlcmHspz3c>9ti~cImcMEoLUrwRW+LaBuz;E_2A( z+(b`>#px%qWK=)t@+`|h_8M|?dZ~)1`$|wYG2D`9OKZFZ1j%Z0V6 z$XWk~^;0mR6hd_Q;PDfHc)!_gX+`erEyKU-|>^{|+m*+&>F2P~+ubElv&U+s; zMOT;j`(EF#-|hcKD5t|pQn3(uDllY-t&_pRD*Rd&>*Wh#IPVs`(jzhK?u++PJ?nFk zsKQxNQAVBF`E9#CVppX=7?%)6hcn3Nhks<5Y|Meq-1I~_mM)aITOCfslr1Q4`k4Vn zo_FL>Mxadlp;a!UHxw!v;2cL@VG&^!Pm++mETuJhL`P_m6a3dfQ=uEg%Z{(Sa>TJ% zH%h(4b>L^vU?r-`;&R~XY?y*lUiHs7_2nWmZq&Cc+5N_o4*hcVpY?V2KUd4pInoBw z*Dv#EGKstlA9Oj1YUTM9qnq@Y`u!w)Hh=#LlF{TVN6{Z9A+jg}4up}QZsY_JKR)L(fx%d$j-tX>- zDaxr;2{IYl$t%Aj+7Yw(wb@-;A3nz*$3%E1E)?9N5FCBDUoX|yY1kr zfWQ{f>0_j8AgNcqau@?YJ<>3bmWCRbAHtBEc%7TAupMYDyhiPwj8m+t>4`~YjtlR_wW9rJw#o-CuSAhgo)2pHC-F*A&z*s{N2g~rsor5|9DN$wLrN^N`zCH{## z0!?mI(KswjWMRQjGM5e)D94iW;~(YPc$$j@sB|^F$EgsP`T4UwX-tfb#bdRV;A$iBXvzM3@=aFWUEX%|J*ygV$I^db3N@n%O(m^UGhrL383yT z`fv;-6G}Tyb0jxdo-VRPD4t6A6~20;OzN{o`~VT_EKfnk*OdTvp(I=Wfd(rJuN0O9 zO!GR!ejfTqa_mEeZsh=hh@cN17>xfY(q1`jc*iLJrU%ZwePcLUG8cuF9c85<0GuNi z3WV88IL`xuI(Lo|b{+i2=;sN%!mtpSZM3E>f84c|fLsfKIyqQKB30N*kg6!{>z%d!r1){}Y= z8j0E&5CNZpIxi^}5Sn1wbAZF_+NJ+Ai-(Ns2gvm9w}n*FUK(2NQqgolH{>4;uS z_{_9R8KALTb#FaqsieTzXtWcGq7xAt6VZ{>xUWac#oNPr_}$r68O4**_s*#OQ)6-p z(V`NGQa4{5iI@16BlsnU>F8v|N7$xtRfv?}?efaczWPd@%d10)C9D|Yc3dLyJ|uoc z9J|^xt&=e}f%E)4AG-vM{O~a=B=V)OLLL#be+<}xKazE+tEionvTi0Yfi9u3BIf^{ z6UXt~)3)y18FhrztLv<*S@cUWB;M{@Z-Wx!2~mVdsl~{bj3CKea9T#?kE(L{2g~@% zhPGsu%JKch+FVb?WNAjl=wwoqp3iJBc?8?Nz7j2El*Z4tiVbv@@b0doV?g8`+VL0u z+va-7wsHNhFK}_OV9ktOs&vX&f_gB=U)A1)3L=vlRPm2#SFPj+ldfpf-w1IBAZ#=B zfq{y4Gm$gYqfaGT0jQdKPum>mN{C4*LhdDmJx&#+ck4+3>6y% z&s8(>scOiSKIas!i}Vn4orh&_(p3a~&ukYeTH~50X}t}L=t085xv}kvOuO#Wel?03W#B+I5zE`mmtNej&8T)u4H zT6JUpm*}aKgs+2W;sM$>81aVq(M%JG6er@Gm^OroJNgB(JvQ1VxDg#hxc*HSjE2-P-IvS38)>j0J~r-4EMVr0D9wX7ONy7J7};c@0ixt4`}QXi9= z69xU^G6hn%YI%~2;0@E2TjF`Mb@c<8@p$gY|tS%CF&IzAJ z0-{;AvH`_1l4np-Nv@u-jYH&c5_fr6DIh}CN>96-f%K)l<59m@70pPTCae-$F1s;X zxgE43SW5K+s$q1Xm|kWUE2_))v5&aL`HDA6&C7Jfq{=tiJY_qJ{Y4gWCo&b>ztQ|} z$Sf6z$Q}1U%rm$kE$@<>tu&Y#76I^Ge>01rPU@%8rr&1hOEiu<16U4L)W^9hh`!-#dYW<& zrTqDTS>G_V_Eptq3WY3gi}=!V)y_isvd=Tr zDmb)dZg9`DDnfRp;TI38hX&NbsK}~V97!Cj!!nMCMAMFu5ggD>34ZkqIb&wGO8~qGk&OP&Czw7>2bj=cw?jRLV2V)~clR z(ql!59qI)^FUt@bPi0PP`7tmP(zQ*gsNS#fTwj-zt{TKtx_(41LWR$Pw#3sjCkd!b z{`2*K@gOi%o~XI-ho2DFV-=`aNYz|Moje#qi*8+rnK<01Q77dNaM>xTNim9B!(eK=HML^A)x3%H+M7O|#ks`KF@1WTf11NaDF#O3w6;G^ zT414+x~Qn&4dg_9D4lZZYTe~mPENYEU1+q$^b$O`-hZSq59z?Z$0ZyTWzsL8mVM4v z6>vIGO-yRshj=1Qi6{g&Lk@9sBeYEksGV+B~^hc#-$OB(9oM6oU=_4G&{z;S#+Flj4tNFw%yhtD;xMtB;UiY z(O^1E$l>b^)S0U*jCPl7u4CrmMz^g_@O+kAb+8;LmMq?jh|W|XM%!txx0;*AGBV=Y zvndnZ%T|-SGJeHnjI7Z5iHol>8~*5M=;Hvbd2MoL`kYF8g^ZP%c`!&F2A>vgnjp-! z?`|<*(sieWAeKpOre}>;NjhBKKkCe;0$Za=nVu724r(}L2M!e$>%=_MZ{%cq4qc-z z9eapX^OQJ>KlvMfL*qU-qb^noJeT%K(f1l-Z92>^2oXZxIMTH$h9r_dxb5|LhG_4| zPPcPkm5CADQ~et+oIc$t*!M3ASwwvh%?SI*XM-Xbz2o;<*fBaY7EY^1wD+uv;0@N2 zQ&Lp=>!XUQ;z6wmlVYj$y#d>-xSDg^=5tEKQNEP}rHiC2PGY37DuduZ)cGFYcJ$jQ2T$qFN1R~j)R z*iow<%zeGs<^w?{7lp(@+zMtvT%#(pt3@^284;4y?pKWPxxW8gJ9OckTf7!WBFpG) zL`EtPu1!Tv(G+7RR%Y_uj!jnP922WVWxg}$U$5JzVbidm`wR!&6!6A}x6JCvpy;nF zBEXAMh?j;Zx*V>N25d0w^a~-lT{p&S^TARz|Ds6eQ-5)&|3OWX9he%|pitR-HxkNa zCh6B?X~fT79b7n$i`->hV5GjsG$Ibd7sxyC(b7l&w@fYLZr3b6R=^M*Z)2ydA;{(}^Sj*9>93*Q8ZbBv;x=vvVu& zA8wL+z#>vR&1B@;G`rtwWey2z$`Pm03V9%zMT=OKXO>S;BkttPc4$ktYPg1!P9E!T z-Pz%dkfem`VJta|_72Y94Ywr8VvLwfu=?}kuFMTKljaTKru`u-hE|31{MC8ftK%<> zYVm15tMl`J{%QH!f?MqFg7PtUfg1HO!}D`acJp42-~h94K|S<^S8`X?c9*a7wK$$< zptP4Hkqx7vkK*9O)5QZnIE(#y)=d1oCN^fw`s7wxTW%j2ZLH5%r}vcITqNk1NGK-D z->TSsmeub1zfYhiO{>}hJ~k4ErNU~H$&!JpG#52If>jcHGub?UjV_rWWjj5rRf@f4 z!^rctY(p ze*P>EP=@pF709C>gwG1JKCWI~xm>XZ59hH_#eRoff@U7B0;Tf&n-eZO`*v3$Zoh%? z{h5_v;G#hRK;<1>6X0YOGe+fTR$2~C%2tqbjzu6i!1f`iN>^i(GUH*W7mdU4&M`NG zgGDLtVV$3)7$9dr>6OwL^h3}lj6|nPSP%Q$<>xl#=}Uaa6BT54}ucX2MhdqzujElZsA9FIEh=8R(FK2=V%N(UAJk}LCzOY?5d?N_riEKjCCJM@nPrcJ z2$eXoJ0&9$vo*1P(A8)NU?|*;NxxbN)bv`@)KE72_Bhfn6XSLi!?Ls@ugdb$(lSz* zV6kRZQzH=0CYS$MAo#OWR-JW%ZlFYKU-nYL2WPUk^jq2H;1R_6_GbTHv4nt@Wl_hQ z<>PTdBgM@b#v8G|AE!_%U0~lZFUj}hDo|@(P3XYe*Q3268(z6^FWA_63s-qrZmUBg z(%)<(t$xL-L@)!RLg^(bZY40ClRB zFUny;U6kwYsS3@ma9Dh#Z7zk3bJET!p*3EVHy6jmRgs43O$Req!^w)u56iqtFe3QU zygRPEDe!vnWrh*DnSN4kv27o5HE2*mJY@!#(NHTV0{FhV7u&c@qGhaU*Qftu;~$v7 z|By({5usl35jMvC-Y3}xC7T4HKsuq7!0EGWxak2sEQ)D~e{5U_x)8n;&rmfb|)$&Jai0u(|?f#W{ zgJe{6m2JP`p0}no=bLWhAMCV^9;;C8FTGZpWpG9z&9_+uvw1Lwjd<#GRw| z3=;4DXsmH~l?y74_kP!vA8vpE*D-EphDMoXT&+AOQFqTZFJFI=w^rWGYJdAis7)~- zvxVQEhRvJEIf6|sbBNSXEnSsaVRS25VPWPr8(R@Mv*VoXhdDSK(c#B2flysH@`-8h za8H29Np(PTzO)nfP6aJ*`O|vT~?fQr_ zCnil$`PU9^*_=C~>PJ_ziAI zgjUL`!Y`O9>U{J8(hNBiR&{IjIYy_f(;FX^4R5v^ZrdK)YGy_U+Us*e>^tS+OA00f(%Zcd*t*9co@s+l$UqLf} z{ru;)QBWS&03mET>Q@}r98Z0HL$j8}+4NSau8EM-*xB6kw(sP462tHcjc)>vO?v#aFEqkcDk=pTb%S3V~!g#GMlXtQ_M`r}yarJjf8 zt4O0e{1NVXu#t%;@wF*oGs(S8!;W{qU9T+qp`q|@Oh@apt!OwtTx5STa!wt#MWrh9 z&&2Oc=9{*$K9$zTDXSJ@TEvl5cT4KO(Pxx=aeA|^@uUS+1Mv>7cmZTqKp}<1l>0cT zO9%_lK0~%ANlCFD^*iHmIpigC&C@nM)Y&w|hJU-AeSCRxc}DZ(e6wozg5X4R-NO*C zx?J(VeuJILgoHQ<9T?Ji2?q>IR)eqv4A3UEb$s`JDrG`{UlZIc|8XWmQRrH3Sy?QW zD;0PQ=KZC(r2I|y4^B)!NlEghlgj5d36CEm<%}qA2kwp%8h!+hb)Pb9T@oEqV|wW& zsD4(<9;h+^8!}ZgT_tbO_VB{^e}0cE>BPI5XgRHr4GTM`PJ2XuQg7!}@-bwoXw*%2 zZ!R?<(Mg4qFEe#A<$66DI@L-_KTrFppw@ZcCrn1A%e6<^_|`7>E9n5Eg;PuOcQC4F zc1212(Lr-laGEz+j(3IHE^p&e^)cpNv@&JOpVjYN6Y{;#4Kyej=3?j}%TQ**&cyL} z(D3>VRddzHOx4s~6*^y^MW#`uEuspvA(^&&_V7Qgn$~y%nO^+quorP#Rjlm^Rc_iP zkk;+*YZ72Cb>J{_LY+YLFKvuX)?0_N9D^>Br4c#?vg6WjzWb5AR`vQOn^o8VTffc` z*aFRuhX-%0-XRfPPPd-R+%+?gwDM=ga8_AzjYf3c=d3;UlH?uh}ewaGIN>366b9ET0w?`)3c#{le=nU5?~9w@2$&l0T$YQA?}G zmXM}qPYYN5L^tdU7E{ZL7-uqZxRgV&i=tAW;xM)nyQ3GjiR8H>wXTb@{a*U1u`<)Z zLA$JZ)-)?*?NN>)TFOX@A@~V-N-Bn0M)>xs~vpA7LY5wvp&AT>RzCjOU zMLRxIA_d|eSHUM4-_Y>y;o_cx&Kpv98$5B}>}%>Qp7$UrQf%^JDpK5TNtvb_)XDU< zz0n^$+=Yy?C$3B8EwFS|uDY0zFpVx^94J*#L&3r(2KhO+%M=q<6fYnoR>;KalL{!9 zD;fm|*g4F-ggKq>C?b9Fb?%KEz_xh z!`sU9S7ah=9S z0XRmaZ_Tr^rrxSgq&nJq1D477zF%N8g-rRzoQL#~7?L`fl4u16g~U-Kjh^igaVq|} zCZ*A!R~E%*oG0BDxAXj@@cmX+H`4yFt7le^bEu4qH?Dl-R@ow^$#a-*l7Pk`3>mJL zLG(iQ`#hK2;T+ua&$%j>A>44J{r-7?Y;bn(n;maLso>x`g1(xD*;kJjA(z~}H+|FU zw?+Fey}zAPlj00Upl(YyBbPD9mT#Ji;Eq!asmY(YomCVjKO^Ml3dNOxXm>(irQn|kxMx4Yi*B&k(r zCPQe}@~1Ej%`WMOle=x*^C?jcms-bF3EW=L&?*jvlZxy9% z7J;oor9fV#d%tVBOrLd*^1Z26SEmSjy?%`k9jxxujk`xWP*QkCWyr6o=pzJBTr1XmtA9*a zdwav9s^QQ7468(C)Y>`F?4C+9Ph*TMtt=eYZiNXe^mQ8jQ@76@z6-z9 z)xFahF*Y|Mb&t^uk4s=^$+NiP95sEPS^y%YFB@)jkHg2W*)guIBYaVGRgeIC5yL-C zKX|C^ir)B`I+?1`%V)EjZGq;FxNMX#Fly9kwKT`HSfbWef~za?u`PP(?4ONz&+dQS zbMTDm%4ThX4yjdtnZ2q++ z;e>r0Daoz8m7<|GpDto%bIOQ)OvM-@?EDDlo)VEcL0i)9md$;1iefcmwQl$0e&J(z zxLWyKez6GC@h>i;eMF`4A}U7H)?2jJ?N`ff%AioOk`e23dV1DE1siZrHquS$ip<+j zGHb@aTh^)x58mTtELR!VvVJMHajK!8nb6J2D{((htC}uWSK}cyFhN%P|4v0b8VNh3 zHL56TcUqLHxDGKVe7mU_BTdz&0%B@2zX+&281y62xjXArEZ_AiH+ylE%Rj&TZU zl3(f)(TsMv4O4Tr-um?_SCLrny!6zxiO*5oJNW&4SaH27^3y5D)+tPl#*wZ^+x2X3 zr|KK?t0viD&Jp+&S+nZ=a+o5BUEEUOZ4;(r^;$F0xkrCLTKB7FIWty>06XqPUU@ER z=VmZbe+sR<{9t9Ze)#v3u2({~;5uaY7ZFkd!FJGbX;6Z<1wG_1_Wu>?2^IEHc0u=< ztyE(Lc*9(SQX|-{-amIyl2y(618p^9d%%oWlh~%1qD)t>n$$>MKwR3cH)M1(?%72m zDZ%ryK4XbyYG{|MHS;-#r%eT)pGo~S%QdYOsg`qpj>lK@(M0Pw4Xb*v2%W^{a z;tq=M@`__Bg`FC&j_c}9;$&H|PcAB3-e^sUoBgxC9qQqtz@nV{7iGO6Rq7VdtAUm0 z!SR5X>6*}evqD``Q;m|-Cw#^Wt*VRX%vCdV$qWLMGpMpe$JrTHT|+|crQbNc#w6Iu zc#1XCVaYkwrP?D7it2OiYK$g%fPQH{KltR`6T0N*iU$ep=&rd;cC9<(+$0W?ZqT4p zMQY91b$D{}L>45&(_1so5*7{T2SK0DP)H3CY^DfZb&6xj#?JWdO~B>f7^H@&_mj#) zB+b*r*Djx$Ws3+nMo&bf0`vYz#actah^P<&s;t;hmZ)>?2L`+;d0;YOl(>U%*X z|9EDK{TY)e>Iahf&dc&L*P-D;L6fo}UD1`V;HX`N%g=Dq9Xm@zKa9k*!u@?Nht_J(i}@4PiS z8+=!rxhG*u$u!}E%`Q0h*KD?1MQqjy5I6?L%9y3CLQGe{+v5}?k} zR_^QlVW%lm%Z_M zDIy&PVCs?A&v5<1DPBQf23ROC!UtH3VLE~(25KCqWy(W7tZc2r({^6>+00etbnKfg ztR;r*X*3Ij$c%5|pYrk?b68xC{Aar=0$!Vnm!NjdN7YSrGL1>1Hd-?+d0E<@AG$Q_ zgUKZww5T|8HW=}h>SdX8IznYfih37Xb(Xu=%E%bJ@4W zRLBRTAmH!aIRR14E;GAN-h?J=pw6b}DGJ1I+2GE5L|6?UygYJ;d4=%6TSUc=F)J5m zU^~?IgXEn6m`Geq%4@R9(|TS@;^G#)8G0WJJaD!jNe}xa-+a{c0i|>$X4I8$Q%(#9 zVpDg{;z_i;14BgHci6FyC}6TYMJ(l%c#U%)g2ncMx}ZiY+c#6)bXg&F)*@}Vema#2 z-Q9BPC~k3)PslmB z(i-+FSLqt5jr2XIK^daixLVsdCRAB8vaeBR1Lg8DXkeDC`jYkN2-saF7t9>BpFD4JkrKp$KA zAL@2H+T7=td2fHniTr5BwPpvVCMvwr99iMeii$Xu81{Q=%fuK83Ql;>8VHJl^6Di6 zgXC9gTW)iu(+NC1;Zq!F;2}a;0!js>P0lSt(?5I^=bFJVp1g$yBn^6zPK{Q8ij1;J zE&M7U)lFBkhp=D%55F2SV`}D>*@rI&NBiQ}PX}KDL z@n)2OSK9)#-C5m?+XI9Lho1~2=GPxT9qk>?`0n+WceB3Q{c`jktEiS=-cmaRo`L@} z{BQT|+s}K4hp#q1q{FBFGrU%DG$rTo8<%^cE#eocI0d8O<>S-IWc1V4*7xtyvZ}3r{Jk|fpWMC;&-0Qf5|6yN z-A;Ugf8)j~{Y$_5zVQ7d@j@>S!ccgD7l+X!aen)z=L6kR4PEIMY1%1fKL?NXdY9ng zp$Pr&Jpq_*ys6-2oep^QHv&)4eIhUY$lH$Mot+&YKTG+uFo?IqD2aA9f>4#s>t^3x z`boRp4*YH7CgH?j&|89T0Re*`KfHr_1+Oc;T|9ip@!giD-L6RiE|4};x{*M>X oml~`&|2uHtz<~n?4jede;J|?c2M!!Kc-Zj&1MZ2imH?Oo0D?ENMF0Q* literal 0 HcmV?d00001 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js new file mode 100644 index 00000000000..8ea6f79500d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js @@ -0,0 +1,183 @@ +var tap = require("tap") +var TarHeader = require("../lib/header.js") +var tar = require("../tar.js") +var fs = require("fs") + + +var headers = + { "a.txt file header": + [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + , { cksumValid: true + , path: 'a.txt' + , mode: 420 + , uid: 24561 + , gid: 20 + , size: 257 + , mtime: 1319493851 + , cksum: 5417 + , type: '0' + , linkpath: '' + , ustar: 'ustar\0' + , ustarver: '00' + , uname: 'isaacs' + , gname: 'staff' + , devmaj: 0 + , devmin: 0 + , fill: '' } + ] + + , "omega pax": // the extended header from omega tar. + [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + , { cksumValid: true + , path: 'PaxHeader/Ω.txt' + , mode: 420 + , uid: 24561 + , gid: 20 + , size: 120 + , mtime: 1301254537 + , cksum: 6697 + , type: 'x' + , linkpath: '' + , ustar: 'ustar\0' + , ustarver: '00' + , uname: 'isaacs' + , gname: 'staff' + , devmaj: 0 + , devmin: 0 + , fill: '' } ] + + , "omega file header": + [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + , { cksumValid: true + , path: 'Ω.txt' + , mode: 420 + , uid: 24561 + , gid: 20 + , size: 2 + , mtime: 1301254537 + , cksum: 5690 + , type: '0' + , linkpath: '' + , ustar: 'ustar\0' + , ustarver: '00' + , uname: 'isaacs' + , gname: 'staff' + , devmaj: 0 + , devmin: 0 + , fill: '' } ] + + , "foo.js file header": + [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + , { cksumValid: true + , path: 'foo.js' + , mode: 420 + , uid: 24561 + , gid: 20 + , size: 4 + , mtime: 1301246433 + , cksum: 5519 + , type: '0' + , linkpath: '' + , ustar: 'ustar\0' + , ustarver: '00' + , uname: 'isaacs' + , gname: 'staff' + , devmaj: 0 + , devmin: 0 + , fill: '' } + ] + + , "b.txt file header": + [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + , { cksumValid: true + , path: 'b.txt' + , mode: 420 + , uid: 24561 + , gid: 20 + , size: 512 + , mtime: 1319494079 + , cksum: 5425 + , type: '0' + , linkpath: '' + , ustar: 'ustar\0' + , ustarver: '00' + , uname: 'isaacs' + , gname: 'staff' + , devmaj: 0 + , devmin: 0 + , fill: '' } + ] + + , "deep nested file": + [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + , { cksumValid: true, + path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' + , mode: 420 + , uid: 24561 + , gid: 20 + , size: 100 + , mtime: 1319687003 + , cksum: 18124 + , type: '0' + , linkpath: '' + , ustar: 'ustar\0' + , ustarver: '00' + , uname: 'isaacs' + , gname: 'staff' + , devmaj: 0 + , devmin: 0 + , fill: '' } + ] + } + +tap.test("parsing", function (t) { + Object.keys(headers).forEach(function (name) { + var h = headers[name] + , header = new Buffer(h[0], "hex") + , expect = h[1] + , parsed = new TarHeader(header) + + // console.error(parsed) + t.has(parsed, expect, "parse " + name) + }) + t.end() +}) + +tap.test("encoding", function (t) { + Object.keys(headers).forEach(function (name) { + var h = headers[name] + , expect = new Buffer(h[0], "hex") + , encoded = TarHeader.encode(h[1]) + + // might have slightly different bytes, since the standard + // isn't very strict, but should have the same semantics + // checkSum will be different, but cksumValid will be true + + var th = new TarHeader(encoded) + delete h[1].block + delete h[1].needExtended + delete h[1].cksum + t.has(th, h[1], "fields "+name) + }) + t.end() +}) + +// test these manually. they're a bit rare to find in the wild +tap.test("parseNumeric tests", function (t) { + var parseNumeric = TarHeader.parseNumeric + , numbers = + { "303737373737373700": 2097151 + , "30373737373737373737373700": 8589934591 + , "303030303036343400": 420 + , "800000ffffffffffff": 281474976710655 + , "ffffff000000000001": -281474976710654 + , "ffffff000000000000": -281474976710655 + , "800000000000200000": 2097152 + , "8000000000001544c5": 1393861 + , "ffffffffffff1544c5": -15383354 } + Object.keys(numbers).forEach(function (n) { + var b = new Buffer(n, "hex") + t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) + }) + t.end() +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js new file mode 100644 index 00000000000..d4b03a1fe93 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js @@ -0,0 +1,886 @@ +// This is exactly like test/pack.js, except that it's excluding +// any proprietary headers. +// +// This loses some information about the filesystem, but creates +// tarballs that are supported by more versions of tar, especially +// old non-spec-compliant copies of gnutar. + +// the symlink file is excluded from git, because it makes +// windows freak the hell out. +var fs = require("fs") + , path = require("path") + , symlink = path.resolve(__dirname, "fixtures/symlink") +try { fs.unlinkSync(symlink) } catch (e) {} +fs.symlinkSync("./hardlink-1", symlink) +process.on("exit", function () { + fs.unlinkSync(symlink) +}) + +var tap = require("tap") + , tar = require("../tar.js") + , pkg = require("../package.json") + , Pack = tar.Pack + , fstream = require("fstream") + , Reader = fstream.Reader + , Writer = fstream.Writer + , input = path.resolve(__dirname, "fixtures/") + , target = path.resolve(__dirname, "tmp/pack.tar") + , uid = process.getuid ? process.getuid() : 0 + , gid = process.getgid ? process.getgid() : 0 + + , entries = + + // the global header and root fixtures/ dir are going to get + // a different date each time, so omit that bit. + // Also, dev/ino values differ across machines, so that's not + // included. + [ [ 'entry', + { path: 'fixtures/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'extendedHeader', + { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: uid, + gid: gid, + type: 'x', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + uid: uid, + gid: gid, + size: 200 } ] + + , [ 'entry', + { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: uid, + gid: gid, + size: 200, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/a.txt', + mode: 420, + uid: uid, + gid: gid, + size: 257, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/b.txt', + mode: 420, + uid: uid, + gid: gid, + size: 512, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/c.txt', + mode: 420, + uid: uid, + gid: gid, + size: 513, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/cc.txt', + mode: 420, + uid: uid, + gid: gid, + size: 513, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/dir/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/dir/sub/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/foo.js', + mode: 420, + uid: uid, + gid: gid, + size: 4, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/hardlink-1', + mode: 420, + uid: uid, + gid: gid, + size: 200, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/hardlink-2', + mode: 420, + uid: uid, + gid: gid, + size: 0, + type: '1', + linkpath: 'fixtures/hardlink-1', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/omega.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/packtest/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/packtest/omega.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/packtest/star.4.html', + mode: 420, + uid: uid, + gid: gid, + size: 54081, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'extendedHeader', + { path: 'PaxHeader/fixtures/packtest/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + type: 'x', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: 'fixtures/packtest/Ω.txt', + uid: uid, + gid: gid, + size: 2 } ] + + , [ 'entry', + { path: 'fixtures/packtest/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: uid, + gid: gid, + size: 100, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/symlink', + uid: uid, + gid: gid, + size: 0, + type: '2', + linkpath: 'hardlink-1', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'extendedHeader', + { path: 'PaxHeader/fixtures/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + type: 'x', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: "fixtures/Ω.txt" + , uid: uid + , gid: gid + , size: 2 } ] + + , [ 'entry', + { path: 'fixtures/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + ] + + +// first, make sure that the hardlinks are actually hardlinks, or this +// won't work. Git has a way of replacing them with a copy. +var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") + , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") + , fs = require("fs") + +try { fs.unlinkSync(hard2) } catch (e) {} +fs.linkSync(hard1, hard2) + +tap.test("with global header", { timeout: 10000 }, function (t) { + runTest(t, true) +}) + +tap.test("without global header", { timeout: 10000 }, function (t) { + runTest(t, false) +}) + +function alphasort (a, b) { + return a === b ? 0 + : a.toLowerCase() > b.toLowerCase() ? 1 + : a.toLowerCase() < b.toLowerCase() ? -1 + : a > b ? 1 + : -1 +} + + +function runTest (t, doGH) { + var reader = Reader({ path: input + , filter: function () { + return !this.path.match(/\.(tar|hex)$/) + } + , sort: alphasort + }) + + var props = doGH ? pkg : {} + props.noProprietary = true + var pack = Pack(props) + var writer = Writer(target) + + // global header should be skipped regardless, since it has no content. + var entry = 0 + + t.ok(reader, "reader ok") + t.ok(pack, "pack ok") + t.ok(writer, "writer ok") + + pack.pipe(writer) + + var parse = tar.Parse() + t.ok(parse, "parser should be ok") + + pack.on("data", function (c) { + // console.error("PACK DATA") + if (c.length !== 512) { + // this one is too noisy, only assert if it'll be relevant + t.equal(c.length, 512, "parser should emit data in 512byte blocks") + } + parse.write(c) + }) + + pack.on("end", function () { + // console.error("PACK END") + t.pass("parser ends") + parse.end() + }) + + pack.on("error", function (er) { + t.fail("pack error", er) + }) + + parse.on("error", function (er) { + t.fail("parse error", er) + }) + + writer.on("error", function (er) { + t.fail("writer error", er) + }) + + reader.on("error", function (er) { + t.fail("reader error", er) + }) + + parse.on("*", function (ev, e) { + var wanted = entries[entry++] + if (!wanted) { + t.fail("unexpected event: "+ev) + return + } + t.equal(ev, wanted[0], "event type should be "+wanted[0]) + + if (ev !== wanted[0] || e.path !== wanted[1].path) { + console.error("wanted", wanted) + console.error([ev, e.props]) + e.on("end", function () { + console.error(e.fields) + throw "break" + }) + } + + t.has(e.props, wanted[1], "properties "+wanted[1].path) + if (wanted[2]) { + e.on("end", function () { + if (!e.fields) { + t.ok(e.fields, "should get fields") + } else { + t.has(e.fields, wanted[2], "should get expected fields") + } + }) + } + }) + + reader.pipe(pack) + + writer.on("close", function () { + t.equal(entry, entries.length, "should get all expected entries") + t.pass("it finished") + t.end() + }) + +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js new file mode 100644 index 00000000000..0f16c07bb01 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js @@ -0,0 +1,952 @@ + +// the symlink file is excluded from git, because it makes +// windows freak the hell out. +var fs = require("fs") + , path = require("path") + , symlink = path.resolve(__dirname, "fixtures/symlink") +try { fs.unlinkSync(symlink) } catch (e) {} +fs.symlinkSync("./hardlink-1", symlink) +process.on("exit", function () { + fs.unlinkSync(symlink) +}) + + +var tap = require("tap") + , tar = require("../tar.js") + , pkg = require("../package.json") + , Pack = tar.Pack + , fstream = require("fstream") + , Reader = fstream.Reader + , Writer = fstream.Writer + , input = path.resolve(__dirname, "fixtures/") + , target = path.resolve(__dirname, "tmp/pack.tar") + , uid = process.getuid ? process.getuid() : 0 + , gid = process.getgid ? process.getgid() : 0 + + , entries = + + // the global header and root fixtures/ dir are going to get + // a different date each time, so omit that bit. + // Also, dev/ino values differ across machines, so that's not + // included. + [ [ 'globalExtendedHeader', + { path: 'PaxHeader/', + mode: 438, + uid: 0, + gid: 0, + type: 'g', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' }, + { "NODETAR.author": pkg.author, + "NODETAR.name": pkg.name, + "NODETAR.description": pkg.description, + "NODETAR.version": pkg.version, + "NODETAR.repository.type": pkg.repository.type, + "NODETAR.repository.url": pkg.repository.url, + "NODETAR.main": pkg.main, + "NODETAR.scripts.test": pkg.scripts.test } ] + + , [ 'entry', + { path: 'fixtures/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'extendedHeader', + { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: uid, + gid: gid, + type: 'x', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + 'NODETAR.depth': '1', + 'NODETAR.type': 'File', + nlink: 1, + uid: uid, + gid: gid, + size: 200, + 'NODETAR.blksize': '4096', + 'NODETAR.blocks': '8' } ] + + , [ 'entry', + { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: uid, + gid: gid, + size: 200, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '', + 'NODETAR.depth': '1', + 'NODETAR.type': 'File', + nlink: 1, + 'NODETAR.blksize': '4096', + 'NODETAR.blocks': '8' } ] + + , [ 'entry', + { path: 'fixtures/a.txt', + mode: 420, + uid: uid, + gid: gid, + size: 257, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/b.txt', + mode: 420, + uid: uid, + gid: gid, + size: 512, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/c.txt', + mode: 420, + uid: uid, + gid: gid, + size: 513, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/cc.txt', + mode: 420, + uid: uid, + gid: gid, + size: 513, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/dir/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/dir/sub/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + + , [ 'entry', + { path: 'fixtures/foo.js', + mode: 420, + uid: uid, + gid: gid, + size: 4, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/hardlink-1', + mode: 420, + uid: uid, + gid: gid, + size: 200, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/hardlink-2', + mode: 420, + uid: uid, + gid: gid, + size: 0, + type: '1', + linkpath: 'fixtures/hardlink-1', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/omega.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/packtest/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/packtest/omega.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/packtest/star.4.html', + mode: 420, + uid: uid, + gid: gid, + size: 54081, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'extendedHeader', + { path: 'PaxHeader/fixtures/packtest/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + type: 'x', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: 'fixtures/packtest/Ω.txt', + 'NODETAR.depth': '2', + 'NODETAR.type': 'File', + nlink: 1, + uid: uid, + gid: gid, + size: 2, + 'NODETAR.blksize': '4096', + 'NODETAR.blocks': '8' } ] + + , [ 'entry', + { path: 'fixtures/packtest/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '', + 'NODETAR.depth': '2', + 'NODETAR.type': 'File', + nlink: 1, + 'NODETAR.blksize': '4096', + 'NODETAR.blocks': '8' } ] + + , [ 'entry', + { path: 'fixtures/r/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', + mode: 493, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: uid, + gid: gid, + size: 100, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/symlink', + uid: uid, + gid: gid, + size: 0, + type: '2', + linkpath: 'hardlink-1', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'extendedHeader', + { path: 'PaxHeader/fixtures/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + type: 'x', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: "fixtures/Ω.txt" + , "NODETAR.depth": "1" + , "NODETAR.type": "File" + , nlink: 1 + , uid: uid + , gid: gid + , size: 2 + , "NODETAR.blksize": "4096" + , "NODETAR.blocks": "8" } ] + + , [ 'entry', + { path: 'fixtures/Ω.txt', + mode: 420, + uid: uid, + gid: gid, + size: 2, + type: '0', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '', + 'NODETAR.depth': '1', + 'NODETAR.type': 'File', + nlink: 1, + 'NODETAR.blksize': '4096', + 'NODETAR.blocks': '8' } ] + ] + + +// first, make sure that the hardlinks are actually hardlinks, or this +// won't work. Git has a way of replacing them with a copy. +var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") + , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") + , fs = require("fs") + +try { fs.unlinkSync(hard2) } catch (e) {} +fs.linkSync(hard1, hard2) + +tap.test("with global header", { timeout: 10000 }, function (t) { + runTest(t, true) +}) + +tap.test("without global header", { timeout: 10000 }, function (t) { + runTest(t, false) +}) + +tap.test("with from base", { timeout: 10000 }, function (t) { + runTest(t, true, true) +}) + +function alphasort (a, b) { + return a === b ? 0 + : a.toLowerCase() > b.toLowerCase() ? 1 + : a.toLowerCase() < b.toLowerCase() ? -1 + : a > b ? 1 + : -1 +} + + +function runTest (t, doGH, doFromBase) { + var reader = Reader({ path: input + , filter: function () { + return !this.path.match(/\.(tar|hex)$/) + } + , sort: alphasort + }) + + var props = doGH ? pkg : {} + if(doFromBase) props.fromBase = true; + + var pack = Pack(props) + var writer = Writer(target) + + // skip the global header if we're not doing that. + var entry = doGH ? 0 : 1 + + t.ok(reader, "reader ok") + t.ok(pack, "pack ok") + t.ok(writer, "writer ok") + + pack.pipe(writer) + + var parse = tar.Parse() + t.ok(parse, "parser should be ok") + + pack.on("data", function (c) { + // console.error("PACK DATA") + if (c.length !== 512) { + // this one is too noisy, only assert if it'll be relevant + t.equal(c.length, 512, "parser should emit data in 512byte blocks") + } + parse.write(c) + }) + + pack.on("end", function () { + // console.error("PACK END") + t.pass("parser ends") + parse.end() + }) + + pack.on("error", function (er) { + t.fail("pack error", er) + }) + + parse.on("error", function (er) { + t.fail("parse error", er) + }) + + writer.on("error", function (er) { + t.fail("writer error", er) + }) + + reader.on("error", function (er) { + t.fail("reader error", er) + }) + + parse.on("*", function (ev, e) { + var wanted = entries[entry++] + if (!wanted) { + t.fail("unexpected event: "+ev) + return + } + t.equal(ev, wanted[0], "event type should be "+wanted[0]) + + if(doFromBase) { + if(wanted[1].path.indexOf('fixtures/') && wanted[1].path.length == 100) + wanted[1].path = wanted[1].path.replace('fixtures/', '') + 'ccccccccc' + + if(wanted[1]) wanted[1].path = wanted[1].path.replace('fixtures/', '').replace('//', '/') + if(wanted[1].path == '') wanted[1].path = '/' + if(wanted[2] && wanted[2].path) wanted[2].path = wanted[2].path.replace('fixtures', '').replace(/^\//, '') + + wanted[1].linkpath = wanted[1].linkpath.replace('fixtures/', '') + } + + if (ev !== wanted[0] || e.path !== wanted[1].path) { + console.error("wanted", wanted) + console.error([ev, e.props]) + e.on("end", function () { + console.error(e.fields) + throw "break" + }) + } + + + t.has(e.props, wanted[1], "properties "+wanted[1].path) + if (wanted[2]) { + e.on("end", function () { + if (!e.fields) { + t.ok(e.fields, "should get fields") + } else { + t.has(e.fields, wanted[2], "should get expected fields") + } + }) + } + }) + + reader.pipe(pack) + + writer.on("close", function () { + t.equal(entry, entries.length, "should get all expected entries") + t.pass("it finished") + t.end() + }) + +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js new file mode 100644 index 00000000000..da01a65ccc7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js @@ -0,0 +1,29 @@ +var tap = require("tap") + , tar = require("../tar.js") + , fs = require("fs") + , path = require("path") + , file = path.resolve(__dirname, "fixtures/c.tar") + +tap.test("parser test", function (t) { + var parser = tar.Parse() + var total = 0 + var dataTotal = 0 + + parser.on("end", function () { + + t.equals(total-513,dataTotal,'should have discarded only c.txt') + + t.end() + }) + + fs.createReadStream(file) + .pipe(parser) + .on('entry',function(entry){ + if(entry.path === 'c.txt') entry.abort() + + total += entry.size; + entry.on('data',function(data){ + dataTotal += data.length + }) + }) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js new file mode 100644 index 00000000000..f765a50129b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js @@ -0,0 +1,359 @@ +var tap = require("tap") + , tar = require("../tar.js") + , fs = require("fs") + , path = require("path") + , file = path.resolve(__dirname, "fixtures/c.tar") + , index = 0 + + , expect = +[ [ 'entry', + { path: 'c.txt', + mode: 420, + uid: 24561, + gid: 20, + size: 513, + mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), + cksum: 5422, + type: '0', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + undefined ], + [ 'entry', + { path: 'cc.txt', + mode: 420, + uid: 24561, + gid: 20, + size: 513, + mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), + cksum: 5525, + type: '0', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + undefined ], + [ 'entry', + { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: 24561, + gid: 20, + size: 100, + mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), + cksum: 18124, + type: '0', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + undefined ], + [ 'entry', + { path: 'Ω.txt', + mode: 420, + uid: 24561, + gid: 20, + size: 2, + mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), + cksum: 5695, + type: '0', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + undefined ], + [ 'extendedHeader', + { path: 'PaxHeader/Ω.txt', + mode: 420, + uid: 24561, + gid: 20, + size: 120, + mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), + cksum: 6702, + type: 'x', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: 'Ω.txt', + ctime: 1319737909, + atime: 1319739061, + dev: 234881026, + ino: 51693379, + nlink: 1 } ], + [ 'entry', + { path: 'Ω.txt', + mode: 420, + uid: 24561, + gid: 20, + size: 2, + mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), + cksum: 5695, + type: '0', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '', + ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), + atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), + dev: 234881026, + ino: 51693379, + nlink: 1 }, + undefined ], + [ 'extendedHeader', + { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: 24561, + gid: 20, + size: 353, + mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), + cksum: 14488, + type: 'x', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + ctime: 1319686868, + atime: 1319741254, + 'LIBARCHIVE.creationtime': '1319686852', + dev: 234881026, + ino: 51681874, + nlink: 1 } ], + [ 'entry', + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: 24561, + gid: 20, + size: 200, + mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), + cksum: 14570, + type: '0', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '', + ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), + atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), + 'LIBARCHIVE.creationtime': '1319686852', + dev: 234881026, + ino: 51681874, + nlink: 1 }, + undefined ], + [ 'longPath', + { path: '././@LongLink', + mode: 0, + uid: 0, + gid: 0, + size: 201, + mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), + cksum: 4976, + type: 'L', + linkpath: '', + ustar: false }, + '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], + [ 'entry', + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: 1000, + gid: 1000, + size: 201, + mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), + cksum: 14086, + type: '0', + linkpath: '', + ustar: false }, + undefined ], + [ 'longLinkpath', + { path: '././@LongLink', + mode: 0, + uid: 0, + gid: 0, + size: 201, + mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), + cksum: 4975, + type: 'K', + linkpath: '', + ustar: false }, + '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], + [ 'longPath', + { path: '././@LongLink', + mode: 0, + uid: 0, + gid: 0, + size: 201, + mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), + cksum: 4976, + type: 'L', + linkpath: '', + ustar: false }, + '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], + [ 'entry', + { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', + mode: 511, + uid: 1000, + gid: 1000, + size: 0, + mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), + cksum: 21603, + type: '2', + linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + ustar: false }, + undefined ], + [ 'extendedHeader', + { path: 'PaxHeader/200-hard', + mode: 420, + uid: 24561, + gid: 20, + size: 143, + mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), + cksum: 6533, + type: 'x', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + { ctime: 1320617144, + atime: 1320617232, + 'LIBARCHIVE.creationtime': '1319686852', + dev: 234881026, + ino: 51681874, + nlink: 2 } ], + [ 'entry', + { path: '200-hard', + mode: 420, + uid: 24561, + gid: 20, + size: 200, + mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), + cksum: 5526, + type: '0', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '', + ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), + atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), + 'LIBARCHIVE.creationtime': '1319686852', + dev: 234881026, + ino: 51681874, + nlink: 2 }, + undefined ], + [ 'extendedHeader', + { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: 24561, + gid: 20, + size: 353, + mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), + cksum: 14488, + type: 'x', + linkpath: '', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '' }, + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + ctime: 1320617144, + atime: 1320617406, + 'LIBARCHIVE.creationtime': '1319686852', + dev: 234881026, + ino: 51681874, + nlink: 2 } ], + [ 'entry', + { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', + mode: 420, + uid: 24561, + gid: 20, + size: 0, + mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), + cksum: 15173, + type: '1', + linkpath: '200-hard', + ustar: 'ustar\0', + ustarver: '00', + uname: 'isaacs', + gname: 'staff', + devmaj: 0, + devmin: 0, + fill: '', + ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), + atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), + 'LIBARCHIVE.creationtime': '1319686852', + dev: 234881026, + ino: 51681874, + nlink: 2 }, + undefined ] ] + + +tap.test("parser test", function (t) { + var parser = tar.Parse() + + parser.on("end", function () { + t.equal(index, expect.length, "saw all expected events") + t.end() + }) + + fs.createReadStream(file) + .pipe(parser) + .on("*", function (ev, entry) { + var wanted = expect[index] + if (!wanted) { + return t.fail("Unexpected event: " + ev) + } + var result = [ev, entry.props] + entry.on("end", function () { + result.push(entry.fields || entry.body) + + t.equal(ev, wanted[0], index + " event type") + t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") + if (wanted[2]) { + t.equivalent(result[2], wanted[2], "metadata values") + } + index ++ + }) + }) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js new file mode 100644 index 00000000000..a00ff7faa03 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js @@ -0,0 +1,20 @@ +// clean up the fixtures + +var tap = require("tap") +, rimraf = require("rimraf") +, test = tap.test +, path = require("path") + +test("clean fixtures", function (t) { + rimraf(path.resolve(__dirname, "fixtures"), function (er) { + t.ifError(er, "rimraf ./fixtures/") + t.end() + }) +}) + +test("clean tmp", function (t) { + rimraf(path.resolve(__dirname, "tmp"), function (er) { + t.ifError(er, "rimraf ./tmp/") + t.end() + }) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE new file mode 100644 index 00000000000..1bc286fb579 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2015, Salesforce.com, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=== + +The following exceptions apply: + +=== + +`public_suffix_list.dat` was obtained from + via +. The license for this file is MPL/2.0. The header of +that file reads as follows: + + // This Source Code Form is subject to the terms of the Mozilla Public + // License, v. 2.0. If a copy of the MPL was not distributed with this + // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md new file mode 100644 index 00000000000..9899dbf6eed --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md @@ -0,0 +1,492 @@ +[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js + +[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie) + +[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie) +![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9) + +# Synopsis + +``` javascript +var tough = require('tough-cookie'); +var Cookie = tough.Cookie; +var cookie = Cookie.parse(header); +cookie.value = 'somethingdifferent'; +header = cookie.toString(); + +var cookiejar = new tough.CookieJar(); +cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); +// ... +cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { + res.headers['cookie'] = cookies.join('; '); +}); +``` + +# Installation + +It's _so_ easy! + +`npm install tough-cookie` + +Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. + +# API + +## tough + +Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". + +**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary. + +### `parseDate(string)` + +Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. + +### `formatDate(date)` + +Format a Date into a RFC1123 string (the RFC6265-recommended format). + +### `canonicalDomain(str)` + +Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). + +### `domainMatch(str,domStr[,canonicalize=true])` + +Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". + +The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. + +### `defaultPath(path)` + +Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. + +The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. + +### `pathMatch(reqPath,cookiePath)` + +Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. + +This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. + +### `parse(cookieString[, options])` + +alias for `Cookie.parse(cookieString[, options])` + +### `fromJSON(string)` + +alias for `Cookie.fromJSON(string)` + +### `getPublicSuffix(hostname)` + +Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. + +For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. + +For further information, see http://publicsuffix.org/. This module derives its list from that site. + +### `cookieCompare(a,b)` + +For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence: + +* Longest `.path` +* oldest `.creation` (which has a 1ms precision, same as `Date`) +* lowest `.creationIndex` (to get beyond the 1ms precision) + +``` javascript +var cookies = [ /* unsorted array of Cookie objects */ ]; +cookies = cookies.sort(cookieCompare); +``` + +**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`. + +### `permuteDomain(domain)` + +Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. + +### `permutePath(path)` + +Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. + + +## Cookie + +Exported via `tough.Cookie`. + +### `Cookie.parse(cookieString[, options])` + +Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. + +The options parameter is not required and currently has only one property: + + * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant. + +If options is not an object, it is ignored, which means you can use `Array#map` with it. + +Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: + +``` javascript +if (res.headers['set-cookie'] instanceof Array) + cookies = res.headers['set-cookie'].map(Cookie.parse); +else + cookies = [Cookie.parse(res.headers['set-cookie'])]; +``` + +### Properties + +Cookie object properties: + + * _key_ - string - the name or key of the cookie (default "") + * _value_ - string - the value of the cookie (default "") + * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` + * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` + * _domain_ - string - the `Domain=` attribute of the cookie + * _path_ - string - the `Path=` of the cookie + * _secure_ - boolean - the `Secure` cookie flag + * _httpOnly_ - boolean - the `HttpOnly` cookie flag + * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) + * _creation_ - `Date` - when this cookie was constructed + * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation) + +After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: + + * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) + * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. + * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar + * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. + +### `Cookie([{properties}])` + +Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties. + +### `.toString()` + +encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. + +### `.cookieString()` + +encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). + +### `.setExpires(String)` + +sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. + +### `.setMaxAge(number)` + +sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. + +### `.expiryTime([now=Date.now()])` + +### `.expiryDate([now=Date.now()])` + +expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. + +Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. + +If Expires (`.expires`) is set, that's returned. + +Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). + +### `.TTL([now=Date.now()])` + +compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. + +The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. + +### `.canonicalizedDoman()` + +### `.cdomain()` + +return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. + +### `.toJSON()` + +For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized. + +Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`). + +**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. + +### `Cookie.fromJSON(strOrObj)` + +Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first. + +Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer. + +Returns `null` upon JSON parsing error. + +### `.clone()` + +Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`. + +### `.validate()` + +Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. + +validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: + +``` javascript +if (cookie.validate() === true) { + // it's tasty +} else { + // yuck! +} +``` + + +## CookieJar + +Exported via `tough.CookieJar`. + +### `CookieJar([store],[options])` + +Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. + +The `options` object can be omitted and can have the following properties: + + * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk" + * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name. + This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers. + +Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. + +### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))` + +Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option. + +As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). + +### `.setCookieSync(cookieOrString, currentUrl, [{options}])` + +Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getCookies(currentUrl, [{options},] cb(err,cookies))` + +Retrieve the list of cookies that can be sent in a Cookie header for the current url. + +If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). + * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it). + +The `.lastAccessed` property of the returned cookies will have been updated. + +### `.getCookiesSync(currentUrl, [{options}])` + +Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getCookieString(...)` + +Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. + +### `.getCookieStringSync(...)` + +Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getSetCookieStrings(...)` + +Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`. + +### `.getSetCookieStringsSync(...)` + +Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.serialize(cb(err,serializedObject))` + +Serialize the Jar if the underlying store supports `.getAllCookies`. + +**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. + +See [Serialization Format]. + +### `.serializeSync()` + +Sync version of .serialize + +### `.toJSON()` + +Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`. + +### `CookieJar.deserialize(serialized, [store], cb(err,object))` + +A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization. + +The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. + +As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback. + +### `CookieJar.deserializeSync(serialized, [store])` + +Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work. + +### `CookieJar.fromJSON(string)` + +Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`. + +### `.clone([store,]cb(err,newJar))` + +Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa. + +The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`. + +### `.cloneSync([store])` + +Synchronous version of `.clone`, returning a new `CookieJar` instance. + +The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used. + +The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls. + +## Store + +Base class for CookieJar stores. Available as `tough.Store`. + +## Store API + +The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. + +Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. + +Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style + +All `domain` parameters will have been normalized before calling. + +The Cookie store must have all of the following methods. + +### `store.findCookie(domain, path, key, cb(err,cookie))` + +Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. + +Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). + +### `store.findCookies(domain, path, cb(err,cookies))` + +Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. + +If no cookies are found, the callback MUST be passed an empty array. + +The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. + +As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). + +### `store.putCookie(cookie, cb(err))` + +Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. + +The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. + +Pass an error if the cookie cannot be stored. + +### `store.updateCookie(oldCookie, newCookie, cb(err))` + +Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. + +The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement). + +Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. + +The `newCookie` and `oldCookie` objects MUST NOT be modified. + +Pass an error if the newCookie cannot be stored. + +### `store.removeCookie(domain, path, key, cb(err))` + +Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). + +The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. + +### `store.removeCookies(domain, path, cb(err))` + +Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed. + +Pass an error ONLY if removing any existing cookies failed. + +### `store.getAllCookies(cb(err, cookies))` + +Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure. + +Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail. + +Pass an error if retrieval fails. + +## MemoryCookieStore + +Inherits from `Store`. + +A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. + +# Serialization Format + +**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`. + +```js + { + // The version of tough-cookie that serialized this jar. + version: 'tough-cookie@1.x.y', + + // add the store type, to make humans happy: + storeType: 'MemoryCookieStore', + + // CookieJar configuration: + rejectPublicSuffixes: true, + // ... future items go here + + // Gets filled from jar.store.getAllCookies(): + cookies: [ + { + key: 'string', + value: 'string', + // ... + /* other Cookie.serializableProperties go here */ + } + ] + } +``` + +# Copyright and License + +(tl;dr: BSD-3-Clause with some MPL/2.0) + +```text + Copyright (c) 2015, Salesforce.com, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of Salesforce.com nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +``` + +Portions may be licensed under different licenses (in particular `public_suffix_list.dat` is MPL/2.0); please read that file and the LICENSE file for full details. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js new file mode 100644 index 00000000000..12da297ac4d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js @@ -0,0 +1,1342 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +'use strict'; +var net = require('net'); +var urlParse = require('url').parse; +var pubsuffix = require('./pubsuffix'); +var Store = require('./store').Store; +var MemoryCookieStore = require('./memstore').MemoryCookieStore; +var pathMatch = require('./pathMatch').pathMatch; +var VERSION = require('../package.json').version; + +var punycode; +try { + punycode = require('punycode'); +} catch(e) { + console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); +} + +var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; +var COOKIE_OCTETS = new RegExp('^'+COOKIE_OCTET.source+'+$'); + +var CONTROL_CHARS = /[\x00-\x1F]/; + +// Double quotes are part of the value (see: S4.1.1). +// '\r', '\n' and '\0' should be treated as a terminator in the "relaxed" mode +// (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60) +// '=' and ';' are attribute/values separators +// (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L64) +var COOKIE_PAIR = /^(([^=;]+))\s*=\s*([^\n\r\0]*)/; + +// Used to parse non-RFC-compliant cookies like '=abc' when given the `loose` +// option in Cookie.parse: +var LOOSE_COOKIE_PAIR = /^((?:=)?([^=;]*)\s*=\s*)?([^\n\r\0]*)/; + +// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; + +// Used for checking whether or not there is a trailing semi-colon +var TRAILING_SEMICOLON = /;+$/; + +var DAY_OF_MONTH = /^(\d{1,2})[^\d]*$/; +var TIME = /^(\d{1,2})[^\d]*:(\d{1,2})[^\d]*:(\d{1,2})[^\d]*$/; +var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/i; + +var MONTH_TO_NUM = { + jan:0, feb:1, mar:2, apr:3, may:4, jun:5, + jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 +}; +var NUM_TO_MONTH = [ + 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' +]; +var NUM_TO_DAY = [ + 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' +]; + +var YEAR = /^(\d{2}|\d{4})$/; // 2 to 4 digits + +var MAX_TIME = 2147483647000; // 31-bit max +var MIN_TIME = 0; // 31-bit min + + +// RFC6265 S5.1.1 date parser: +function parseDate(str) { + if (!str) { + return; + } + + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + var tokens = str.split(DATE_DELIM); + if (!tokens) { + return; + } + + var hour = null; + var minutes = null; + var seconds = null; + var day = null; + var month = null; + var year = null; + + for (var i=0; i 23 || minutes > 59 || seconds > 59) { + return; + } + + continue; + } + } + + /* 2.2. If the found-day-of-month flag is not set and the date-token matches + * the day-of-month production, set the found-day-of- month flag and set + * the day-of-month-value to the number denoted by the date-token. Skip + * the remaining sub-steps and continue to the next date-token. + */ + if (day === null) { + result = DAY_OF_MONTH.exec(token); + if (result) { + day = parseInt(result, 10); + /* RFC6265 S5.1.1.5: + * [fail if] the day-of-month-value is less than 1 or greater than 31 + */ + if(day < 1 || day > 31) { + return; + } + continue; + } + } + + /* 2.3. If the found-month flag is not set and the date-token matches the + * month production, set the found-month flag and set the month-value to + * the month denoted by the date-token. Skip the remaining sub-steps and + * continue to the next date-token. + */ + if (month === null) { + result = MONTH.exec(token); + if (result) { + month = MONTH_TO_NUM[result[1].toLowerCase()]; + continue; + } + } + + /* 2.4. If the found-year flag is not set and the date-token matches the year + * production, set the found-year flag and set the year-value to the number + * denoted by the date-token. Skip the remaining sub-steps and continue to + * the next date-token. + */ + if (year === null) { + result = YEAR.exec(token); + if (result) { + year = parseInt(result[0], 10); + /* From S5.1.1: + * 3. If the year-value is greater than or equal to 70 and less + * than or equal to 99, increment the year-value by 1900. + * 4. If the year-value is greater than or equal to 0 and less + * than or equal to 69, increment the year-value by 2000. + */ + if (70 <= year && year <= 99) { + year += 1900; + } else if (0 <= year && year <= 69) { + year += 2000; + } + + if (year < 1601) { + return; // 5. ... the year-value is less than 1601 + } + } + } + } + + if (seconds === null || day === null || month === null || year === null) { + return; // 5. ... at least one of the found-day-of-month, found-month, found- + // year, or found-time flags is not set, + } + + return new Date(Date.UTC(year, month, day, hour, minutes, seconds)); +} + +function formatDate(date) { + var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; + var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; + var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; + var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; + return NUM_TO_DAY[date.getUTCDay()] + ', ' + + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ + h+':'+m+':'+s+' GMT'; +} + +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) { + return null; + } + str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . + + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) { + str = punycode.toASCII(str); + } + + return str.toLowerCase(); +} + +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) { + return null; + } + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + + /* + * "The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) { + return true; + } + + /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ + + /* "* The string is a host name (i.e., not an IP address)." */ + if (net.isIP(str)) { + return false; + } + + /* "* The domain string is a suffix of the string" */ + var idx = str.indexOf(domStr); + if (idx <= 0) { + return false; // it's a non-match (-1) or prefix (0) + } + + // e.g "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) { // it's not a suffix + return false; + } + + /* "* The last character of the string that is not included in the domain + * string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') { + return false; + } + + return true; +} + + +// RFC6265 S5.1.4 Paths and Path-Match + +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0,1) !== "/") { + return "/"; + } + + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") { + return path; + } + + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) { + return "/"; + } + + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} + + +function parse(str, options) { + if (!options || typeof options !== 'object') { + options = {}; + } + str = str.trim(); + + // S4.1.1 Trailing semi-colons are not part of the specification. + var semiColonCheck = TRAILING_SEMICOLON.exec(str); + if (semiColonCheck) { + str = str.slice(0, semiColonCheck.index); + } + + // We use a regex to parse the "name-value-pair" part of S5.2 + var firstSemi = str.indexOf(';'); // S5.2 step 1 + var pairRe = options.loose ? LOOSE_COOKIE_PAIR : COOKIE_PAIR; + var result = pairRe.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); + + // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" + // constraints as well as trimming any whitespace. + if (!result) { + return; + } + + var c = new Cookie(); + if (result[1]) { + c.key = result[2].trim(); + } else { + c.key = ''; + } + c.value = result[3].trim(); + if (CONTROL_CHARS.test(c.key) || CONTROL_CHARS.test(c.value)) { + return; + } + + if (firstSemi === -1) { + return c; + } + + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); + + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) { + return c; + } + + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + var cookie_avs = unparsed.split(/\s*;\s*/); + while (cookie_avs.length) { + var av = cookie_avs.shift(); + var av_sep = av.indexOf('='); + var av_key, av_value; + + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0,av_sep); + av_value = av.substr(av_sep+1); + } + + av_key = av_key.trim().toLowerCase(); + + if (av_value) { + av_value = av_value.trim(); + } + + switch(av_key) { + case 'expires': // S5.2.1 + if (av_value) { + var exp = parseDate(av_value); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp) { + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + c.expires = exp; + } + } + break; + + case 'max-age': // S5.2.2 + if (av_value) { + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (/^-?[0-9]+$/.test(av_value)) { + var delta = parseInt(av_value, 10); + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + } + } + break; + + case 'domain': // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (av_value) { + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + var domain = av_value.trim().replace(/^\./, ''); + if (domain) { + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + } + } + break; + + case 'path': // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + c.path = av_value && av_value[0] === "/" ? av_value : null; + break; + + case 'secure': // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + c.secure = true; + break; + + case 'httponly': // S5.2.6 -- effectively the same as 'secure' + c.httpOnly = true; + break; + + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + + return c; +} + +// avoid the V8 deoptimization monster! +function jsonParse(str) { + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return e; + } + return obj; +} + +function fromJSON(str) { + if (!str) { + return null; + } + + var obj; + if (typeof str === 'string') { + obj = jsonParse(str); + if (obj instanceof Error) { + return null; + } + } else { + // assume it's an Object + obj = str; + } + + var c = new Cookie(); + for (var i=0; i 1) { + var lindex = path.lastIndexOf('/'); + if (lindex === 0) { + break; + } + path = path.substr(0,lindex); + permutations.push(path); + } + permutations.push('/'); + return permutations; +} + +function getCookieContext(url) { + if (url instanceof Object) { + return url; + } + // NOTE: decodeURI will throw on malformed URIs (see GH-32). + // Therefore, we will just skip decoding for such URIs. + try { + url = decodeURI(url); + } + catch(err) { + // Silently swallow error + } + + return urlParse(url); +} + +function Cookie(options) { + options = options || {}; + + Object.keys(options).forEach(function(prop) { + if (Cookie.prototype.hasOwnProperty(prop) && + Cookie.prototype[prop] !== options[prop] && + prop.substr(0,1) !== '_') + { + this[prop] = options[prop]; + } + }, this); + + this.creation = this.creation || new Date(); + + // used to break creation ties in cookieCompare(): + Object.defineProperty(this, 'creationIndex', { + configurable: false, + enumerable: false, // important for assert.deepEqual checks + writable: true, + value: ++Cookie.cookiesCreated + }); +} + +Cookie.cookiesCreated = 0; // incremented each time a cookie is created + +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; + +Cookie.prototype.key = ""; +Cookie.prototype.value = ""; + +// the order in which the RFC has them: +Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity +Cookie.prototype.maxAge = null; // takes precedence over expires for TTL +Cookie.prototype.domain = null; +Cookie.prototype.path = null; +Cookie.prototype.secure = false; +Cookie.prototype.httpOnly = false; +Cookie.prototype.extensions = null; + +// set by the CookieJar: +Cookie.prototype.hostOnly = null; // boolean when set +Cookie.prototype.pathIsDefault = null; // boolean when set +Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse +Cookie.prototype.lastAccessed = null; // Date when set +Object.defineProperty(Cookie.prototype, 'creationIndex', { + configurable: true, + enumerable: false, + writable: true, + value: 0 +}); + +Cookie.serializableProperties = Object.keys(Cookie.prototype) + .filter(function(prop) { + return !( + Cookie.prototype[prop] instanceof Function || + prop === 'creationIndex' || + prop.substr(0,1) === '_' + ); + }); + +Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="'+this.toString() + + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + + '"'; +}; + +Cookie.prototype.toJSON = function() { + var obj = {}; + + var props = Cookie.serializableProperties; + for (var i=0; i suffixLen) { + var publicSuffix = parts.slice(0,suffixLen+1).reverse().join('.'); + return converted ? punycode.toUnicode(publicSuffix) : publicSuffix; + } + + return null; +}; + +// The following generated structure is used under the MPL version 2.0 +// See public-suffix.txt for more information + +var index = module.exports.index = Object.freeze( +{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"ar":true,"com.ar":true,"edu.ar":true,"gob.ar":true,"gov.ar":true,"int.ar":true,"mil.ar":true,"net.ar":true,"org.ar":true,"tur.ar":true,"arpa":true,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"au":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"co.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"tv.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"eco.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"leg.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mp.br":true,"mus.br":true,"net.br":true,"*.nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bv":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"co.cm":true,"com.cm":true,"gov.cm":true,"net.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cw":true,"com.cw":true,"edu.cw":true,"net.cw":true,"org.cw":true,"cx":true,"gov.cx":true,"ac.cy":true,"biz.cy":true,"com.cy":true,"ekloges.cy":true,"gov.cy":true,"ltd.cy":true,"name.cy":true,"net.cy":true,"org.cy":true,"parliament.cy":true,"press.cy":true,"pro.cy":true,"tm.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"et":true,"com.et":true,"gov.et":true,"org.et":true,"edu.et":true,"biz.et":true,"name.et":true,"info.et":true,"net.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gb":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"net.gg":true,"org.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"co.gl":true,"com.gl":true,"edu.gl":true,"net.gl":true,"org.gl":true,"gm":true,"gn":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"gt":true,"com.gt":true,"edu.gt":true,"gob.gt":true,"ind.gt":true,"mil.gt":true,"net.gt":true,"org.gt":true,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"biz.id":true,"co.id":true,"desa.id":true,"go.id":true,"mil.id":true,"my.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"il":true,"ac.il":true,"co.il":true,"gov.il":true,"idf.il":true,"k12.il":true,"muni.il":true,"net.il":true,"org.il":true,"im":true,"ac.im":true,"co.im":true,"com.im":true,"ltd.co.im":true,"net.im":true,"org.im":true,"plc.co.im":true,"tt.im":true,"tv.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"abr.it":true,"abruzzo.it":true,"aosta-valley.it":true,"aostavalley.it":true,"bas.it":true,"basilicata.it":true,"cal.it":true,"calabria.it":true,"cam.it":true,"campania.it":true,"emilia-romagna.it":true,"emiliaromagna.it":true,"emr.it":true,"friuli-v-giulia.it":true,"friuli-ve-giulia.it":true,"friuli-vegiulia.it":true,"friuli-venezia-giulia.it":true,"friuli-veneziagiulia.it":true,"friuli-vgiulia.it":true,"friuliv-giulia.it":true,"friulive-giulia.it":true,"friulivegiulia.it":true,"friulivenezia-giulia.it":true,"friuliveneziagiulia.it":true,"friulivgiulia.it":true,"fvg.it":true,"laz.it":true,"lazio.it":true,"lig.it":true,"liguria.it":true,"lom.it":true,"lombardia.it":true,"lombardy.it":true,"lucania.it":true,"mar.it":true,"marche.it":true,"mol.it":true,"molise.it":true,"piedmont.it":true,"piemonte.it":true,"pmn.it":true,"pug.it":true,"puglia.it":true,"sar.it":true,"sardegna.it":true,"sardinia.it":true,"sic.it":true,"sicilia.it":true,"sicily.it":true,"taa.it":true,"tos.it":true,"toscana.it":true,"trentino-a-adige.it":true,"trentino-aadige.it":true,"trentino-alto-adige.it":true,"trentino-altoadige.it":true,"trentino-s-tirol.it":true,"trentino-stirol.it":true,"trentino-sud-tirol.it":true,"trentino-sudtirol.it":true,"trentino-sued-tirol.it":true,"trentino-suedtirol.it":true,"trentinoa-adige.it":true,"trentinoaadige.it":true,"trentinoalto-adige.it":true,"trentinoaltoadige.it":true,"trentinos-tirol.it":true,"trentinostirol.it":true,"trentinosud-tirol.it":true,"trentinosudtirol.it":true,"trentinosued-tirol.it":true,"trentinosuedtirol.it":true,"tuscany.it":true,"umb.it":true,"umbria.it":true,"val-d-aosta.it":true,"val-daosta.it":true,"vald-aosta.it":true,"valdaosta.it":true,"valle-aosta.it":true,"valle-d-aosta.it":true,"valle-daosta.it":true,"valleaosta.it":true,"valled-aosta.it":true,"valledaosta.it":true,"vallee-aoste.it":true,"valleeaoste.it":true,"vao.it":true,"vda.it":true,"ven.it":true,"veneto.it":true,"ag.it":true,"agrigento.it":true,"al.it":true,"alessandria.it":true,"alto-adige.it":true,"altoadige.it":true,"an.it":true,"ancona.it":true,"andria-barletta-trani.it":true,"andria-trani-barletta.it":true,"andriabarlettatrani.it":true,"andriatranibarletta.it":true,"ao.it":true,"aosta.it":true,"aoste.it":true,"ap.it":true,"aq.it":true,"aquila.it":true,"ar.it":true,"arezzo.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"asti.it":true,"at.it":true,"av.it":true,"avellino.it":true,"ba.it":true,"balsan.it":true,"bari.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"belluno.it":true,"benevento.it":true,"bergamo.it":true,"bg.it":true,"bi.it":true,"biella.it":true,"bl.it":true,"bn.it":true,"bo.it":true,"bologna.it":true,"bolzano.it":true,"bozen.it":true,"br.it":true,"brescia.it":true,"brindisi.it":true,"bs.it":true,"bt.it":true,"bz.it":true,"ca.it":true,"cagliari.it":true,"caltanissetta.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"campobasso.it":true,"carbonia-iglesias.it":true,"carboniaiglesias.it":true,"carrara-massa.it":true,"carraramassa.it":true,"caserta.it":true,"catania.it":true,"catanzaro.it":true,"cb.it":true,"ce.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"ch.it":true,"chieti.it":true,"ci.it":true,"cl.it":true,"cn.it":true,"co.it":true,"como.it":true,"cosenza.it":true,"cr.it":true,"cremona.it":true,"crotone.it":true,"cs.it":true,"ct.it":true,"cuneo.it":true,"cz.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"en.it":true,"enna.it":true,"fc.it":true,"fe.it":true,"fermo.it":true,"ferrara.it":true,"fg.it":true,"fi.it":true,"firenze.it":true,"florence.it":true,"fm.it":true,"foggia.it":true,"forli-cesena.it":true,"forlicesena.it":true,"fr.it":true,"frosinone.it":true,"ge.it":true,"genoa.it":true,"genova.it":true,"go.it":true,"gorizia.it":true,"gr.it":true,"grosseto.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"im.it":true,"imperia.it":true,"is.it":true,"isernia.it":true,"kr.it":true,"la-spezia.it":true,"laquila.it":true,"laspezia.it":true,"latina.it":true,"lc.it":true,"le.it":true,"lecce.it":true,"lecco.it":true,"li.it":true,"livorno.it":true,"lo.it":true,"lodi.it":true,"lt.it":true,"lu.it":true,"lucca.it":true,"macerata.it":true,"mantova.it":true,"massa-carrara.it":true,"massacarrara.it":true,"matera.it":true,"mb.it":true,"mc.it":true,"me.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"messina.it":true,"mi.it":true,"milan.it":true,"milano.it":true,"mn.it":true,"mo.it":true,"modena.it":true,"monza-brianza.it":true,"monza-e-della-brianza.it":true,"monza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"ms.it":true,"mt.it":true,"na.it":true,"naples.it":true,"napoli.it":true,"no.it":true,"novara.it":true,"nu.it":true,"nuoro.it":true,"og.it":true,"ogliastra.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"or.it":true,"oristano.it":true,"ot.it":true,"pa.it":true,"padova.it":true,"padua.it":true,"palermo.it":true,"parma.it":true,"pavia.it":true,"pc.it":true,"pd.it":true,"pe.it":true,"perugia.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"pescara.it":true,"pg.it":true,"pi.it":true,"piacenza.it":true,"pisa.it":true,"pistoia.it":true,"pn.it":true,"po.it":true,"pordenone.it":true,"potenza.it":true,"pr.it":true,"prato.it":true,"pt.it":true,"pu.it":true,"pv.it":true,"pz.it":true,"ra.it":true,"ragusa.it":true,"ravenna.it":true,"rc.it":true,"re.it":true,"reggio-calabria.it":true,"reggio-emilia.it":true,"reggiocalabria.it":true,"reggioemilia.it":true,"rg.it":true,"ri.it":true,"rieti.it":true,"rimini.it":true,"rm.it":true,"rn.it":true,"ro.it":true,"roma.it":true,"rome.it":true,"rovigo.it":true,"sa.it":true,"salerno.it":true,"sassari.it":true,"savona.it":true,"si.it":true,"siena.it":true,"siracusa.it":true,"so.it":true,"sondrio.it":true,"sp.it":true,"sr.it":true,"ss.it":true,"suedtirol.it":true,"sv.it":true,"ta.it":true,"taranto.it":true,"te.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"teramo.it":true,"terni.it":true,"tn.it":true,"to.it":true,"torino.it":true,"tp.it":true,"tr.it":true,"trani-andria-barletta.it":true,"trani-barletta-andria.it":true,"traniandriabarletta.it":true,"tranibarlettaandria.it":true,"trapani.it":true,"trentino.it":true,"trento.it":true,"treviso.it":true,"trieste.it":true,"ts.it":true,"turin.it":true,"tv.it":true,"ud.it":true,"udine.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"va.it":true,"varese.it":true,"vb.it":true,"vc.it":true,"ve.it":true,"venezia.it":true,"venice.it":true,"verbania.it":true,"vercelli.it":true,"verona.it":true,"vi.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vicenza.it":true,"viterbo.it":true,"vr.it":true,"vs.it":true,"vt.it":true,"vv.it":true,"je":true,"co.je":true,"net.je":true,"org.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"aichi.jp":true,"akita.jp":true,"aomori.jp":true,"chiba.jp":true,"ehime.jp":true,"fukui.jp":true,"fukuoka.jp":true,"fukushima.jp":true,"gifu.jp":true,"gunma.jp":true,"hiroshima.jp":true,"hokkaido.jp":true,"hyogo.jp":true,"ibaraki.jp":true,"ishikawa.jp":true,"iwate.jp":true,"kagawa.jp":true,"kagoshima.jp":true,"kanagawa.jp":true,"kochi.jp":true,"kumamoto.jp":true,"kyoto.jp":true,"mie.jp":true,"miyagi.jp":true,"miyazaki.jp":true,"nagano.jp":true,"nagasaki.jp":true,"nara.jp":true,"niigata.jp":true,"oita.jp":true,"okayama.jp":true,"okinawa.jp":true,"osaka.jp":true,"saga.jp":true,"saitama.jp":true,"shiga.jp":true,"shimane.jp":true,"shizuoka.jp":true,"tochigi.jp":true,"tokushima.jp":true,"tokyo.jp":true,"tottori.jp":true,"toyama.jp":true,"wakayama.jp":true,"yamagata.jp":true,"yamaguchi.jp":true,"yamanashi.jp":true,"xn--4pvxs.jp":true,"xn--vgu402c.jp":true,"xn--c3s14m.jp":true,"xn--f6qx53a.jp":true,"xn--8pvr4u.jp":true,"xn--uist22h.jp":true,"xn--djrs72d6uy.jp":true,"xn--mkru45i.jp":true,"xn--0trq7p7nn.jp":true,"xn--8ltr62k.jp":true,"xn--2m4a15e.jp":true,"xn--efvn9s.jp":true,"xn--32vp30h.jp":true,"xn--4it797k.jp":true,"xn--1lqs71d.jp":true,"xn--5rtp49c.jp":true,"xn--5js045d.jp":true,"xn--ehqz56n.jp":true,"xn--1lqs03n.jp":true,"xn--qqqt11m.jp":true,"xn--kbrq7o.jp":true,"xn--pssu33l.jp":true,"xn--ntsq17g.jp":true,"xn--uisz3g.jp":true,"xn--6btw5a.jp":true,"xn--1ctwo.jp":true,"xn--6orx2r.jp":true,"xn--rht61e.jp":true,"xn--rht27z.jp":true,"xn--djty4k.jp":true,"xn--nit225k.jp":true,"xn--rht3d.jp":true,"xn--klty5x.jp":true,"xn--kltx9a.jp":true,"xn--kltp7d.jp":true,"xn--uuwu58a.jp":true,"xn--zbx025d.jp":true,"xn--ntso0iqx3a.jp":true,"xn--elqq16h.jp":true,"xn--4it168d.jp":true,"xn--klt787d.jp":true,"xn--rny31h.jp":true,"xn--7t0a264c.jp":true,"xn--5rtq34k.jp":true,"xn--k7yn95e.jp":true,"xn--tor131o.jp":true,"xn--d5qv7z876c.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.nagoya.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.yokohama.jp":true,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.nagoya.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.yokohama.jp":false,"aisai.aichi.jp":true,"ama.aichi.jp":true,"anjo.aichi.jp":true,"asuke.aichi.jp":true,"chiryu.aichi.jp":true,"chita.aichi.jp":true,"fuso.aichi.jp":true,"gamagori.aichi.jp":true,"handa.aichi.jp":true,"hazu.aichi.jp":true,"hekinan.aichi.jp":true,"higashiura.aichi.jp":true,"ichinomiya.aichi.jp":true,"inazawa.aichi.jp":true,"inuyama.aichi.jp":true,"isshiki.aichi.jp":true,"iwakura.aichi.jp":true,"kanie.aichi.jp":true,"kariya.aichi.jp":true,"kasugai.aichi.jp":true,"kira.aichi.jp":true,"kiyosu.aichi.jp":true,"komaki.aichi.jp":true,"konan.aichi.jp":true,"kota.aichi.jp":true,"mihama.aichi.jp":true,"miyoshi.aichi.jp":true,"nishio.aichi.jp":true,"nisshin.aichi.jp":true,"obu.aichi.jp":true,"oguchi.aichi.jp":true,"oharu.aichi.jp":true,"okazaki.aichi.jp":true,"owariasahi.aichi.jp":true,"seto.aichi.jp":true,"shikatsu.aichi.jp":true,"shinshiro.aichi.jp":true,"shitara.aichi.jp":true,"tahara.aichi.jp":true,"takahama.aichi.jp":true,"tobishima.aichi.jp":true,"toei.aichi.jp":true,"togo.aichi.jp":true,"tokai.aichi.jp":true,"tokoname.aichi.jp":true,"toyoake.aichi.jp":true,"toyohashi.aichi.jp":true,"toyokawa.aichi.jp":true,"toyone.aichi.jp":true,"toyota.aichi.jp":true,"tsushima.aichi.jp":true,"yatomi.aichi.jp":true,"akita.akita.jp":true,"daisen.akita.jp":true,"fujisato.akita.jp":true,"gojome.akita.jp":true,"hachirogata.akita.jp":true,"happou.akita.jp":true,"higashinaruse.akita.jp":true,"honjo.akita.jp":true,"honjyo.akita.jp":true,"ikawa.akita.jp":true,"kamikoani.akita.jp":true,"kamioka.akita.jp":true,"katagami.akita.jp":true,"kazuno.akita.jp":true,"kitaakita.akita.jp":true,"kosaka.akita.jp":true,"kyowa.akita.jp":true,"misato.akita.jp":true,"mitane.akita.jp":true,"moriyoshi.akita.jp":true,"nikaho.akita.jp":true,"noshiro.akita.jp":true,"odate.akita.jp":true,"oga.akita.jp":true,"ogata.akita.jp":true,"semboku.akita.jp":true,"yokote.akita.jp":true,"yurihonjo.akita.jp":true,"aomori.aomori.jp":true,"gonohe.aomori.jp":true,"hachinohe.aomori.jp":true,"hashikami.aomori.jp":true,"hiranai.aomori.jp":true,"hirosaki.aomori.jp":true,"itayanagi.aomori.jp":true,"kuroishi.aomori.jp":true,"misawa.aomori.jp":true,"mutsu.aomori.jp":true,"nakadomari.aomori.jp":true,"noheji.aomori.jp":true,"oirase.aomori.jp":true,"owani.aomori.jp":true,"rokunohe.aomori.jp":true,"sannohe.aomori.jp":true,"shichinohe.aomori.jp":true,"shingo.aomori.jp":true,"takko.aomori.jp":true,"towada.aomori.jp":true,"tsugaru.aomori.jp":true,"tsuruta.aomori.jp":true,"abiko.chiba.jp":true,"asahi.chiba.jp":true,"chonan.chiba.jp":true,"chosei.chiba.jp":true,"choshi.chiba.jp":true,"chuo.chiba.jp":true,"funabashi.chiba.jp":true,"futtsu.chiba.jp":true,"hanamigawa.chiba.jp":true,"ichihara.chiba.jp":true,"ichikawa.chiba.jp":true,"ichinomiya.chiba.jp":true,"inzai.chiba.jp":true,"isumi.chiba.jp":true,"kamagaya.chiba.jp":true,"kamogawa.chiba.jp":true,"kashiwa.chiba.jp":true,"katori.chiba.jp":true,"katsuura.chiba.jp":true,"kimitsu.chiba.jp":true,"kisarazu.chiba.jp":true,"kozaki.chiba.jp":true,"kujukuri.chiba.jp":true,"kyonan.chiba.jp":true,"matsudo.chiba.jp":true,"midori.chiba.jp":true,"mihama.chiba.jp":true,"minamiboso.chiba.jp":true,"mobara.chiba.jp":true,"mutsuzawa.chiba.jp":true,"nagara.chiba.jp":true,"nagareyama.chiba.jp":true,"narashino.chiba.jp":true,"narita.chiba.jp":true,"noda.chiba.jp":true,"oamishirasato.chiba.jp":true,"omigawa.chiba.jp":true,"onjuku.chiba.jp":true,"otaki.chiba.jp":true,"sakae.chiba.jp":true,"sakura.chiba.jp":true,"shimofusa.chiba.jp":true,"shirako.chiba.jp":true,"shiroi.chiba.jp":true,"shisui.chiba.jp":true,"sodegaura.chiba.jp":true,"sosa.chiba.jp":true,"tako.chiba.jp":true,"tateyama.chiba.jp":true,"togane.chiba.jp":true,"tohnosho.chiba.jp":true,"tomisato.chiba.jp":true,"urayasu.chiba.jp":true,"yachimata.chiba.jp":true,"yachiyo.chiba.jp":true,"yokaichiba.chiba.jp":true,"yokoshibahikari.chiba.jp":true,"yotsukaido.chiba.jp":true,"ainan.ehime.jp":true,"honai.ehime.jp":true,"ikata.ehime.jp":true,"imabari.ehime.jp":true,"iyo.ehime.jp":true,"kamijima.ehime.jp":true,"kihoku.ehime.jp":true,"kumakogen.ehime.jp":true,"masaki.ehime.jp":true,"matsuno.ehime.jp":true,"matsuyama.ehime.jp":true,"namikata.ehime.jp":true,"niihama.ehime.jp":true,"ozu.ehime.jp":true,"saijo.ehime.jp":true,"seiyo.ehime.jp":true,"shikokuchuo.ehime.jp":true,"tobe.ehime.jp":true,"toon.ehime.jp":true,"uchiko.ehime.jp":true,"uwajima.ehime.jp":true,"yawatahama.ehime.jp":true,"echizen.fukui.jp":true,"eiheiji.fukui.jp":true,"fukui.fukui.jp":true,"ikeda.fukui.jp":true,"katsuyama.fukui.jp":true,"mihama.fukui.jp":true,"minamiechizen.fukui.jp":true,"obama.fukui.jp":true,"ohi.fukui.jp":true,"ono.fukui.jp":true,"sabae.fukui.jp":true,"sakai.fukui.jp":true,"takahama.fukui.jp":true,"tsuruga.fukui.jp":true,"wakasa.fukui.jp":true,"ashiya.fukuoka.jp":true,"buzen.fukuoka.jp":true,"chikugo.fukuoka.jp":true,"chikuho.fukuoka.jp":true,"chikujo.fukuoka.jp":true,"chikushino.fukuoka.jp":true,"chikuzen.fukuoka.jp":true,"chuo.fukuoka.jp":true,"dazaifu.fukuoka.jp":true,"fukuchi.fukuoka.jp":true,"hakata.fukuoka.jp":true,"higashi.fukuoka.jp":true,"hirokawa.fukuoka.jp":true,"hisayama.fukuoka.jp":true,"iizuka.fukuoka.jp":true,"inatsuki.fukuoka.jp":true,"kaho.fukuoka.jp":true,"kasuga.fukuoka.jp":true,"kasuya.fukuoka.jp":true,"kawara.fukuoka.jp":true,"keisen.fukuoka.jp":true,"koga.fukuoka.jp":true,"kurate.fukuoka.jp":true,"kurogi.fukuoka.jp":true,"kurume.fukuoka.jp":true,"minami.fukuoka.jp":true,"miyako.fukuoka.jp":true,"miyama.fukuoka.jp":true,"miyawaka.fukuoka.jp":true,"mizumaki.fukuoka.jp":true,"munakata.fukuoka.jp":true,"nakagawa.fukuoka.jp":true,"nakama.fukuoka.jp":true,"nishi.fukuoka.jp":true,"nogata.fukuoka.jp":true,"ogori.fukuoka.jp":true,"okagaki.fukuoka.jp":true,"okawa.fukuoka.jp":true,"oki.fukuoka.jp":true,"omuta.fukuoka.jp":true,"onga.fukuoka.jp":true,"onojo.fukuoka.jp":true,"oto.fukuoka.jp":true,"saigawa.fukuoka.jp":true,"sasaguri.fukuoka.jp":true,"shingu.fukuoka.jp":true,"shinyoshitomi.fukuoka.jp":true,"shonai.fukuoka.jp":true,"soeda.fukuoka.jp":true,"sue.fukuoka.jp":true,"tachiarai.fukuoka.jp":true,"tagawa.fukuoka.jp":true,"takata.fukuoka.jp":true,"toho.fukuoka.jp":true,"toyotsu.fukuoka.jp":true,"tsuiki.fukuoka.jp":true,"ukiha.fukuoka.jp":true,"umi.fukuoka.jp":true,"usui.fukuoka.jp":true,"yamada.fukuoka.jp":true,"yame.fukuoka.jp":true,"yanagawa.fukuoka.jp":true,"yukuhashi.fukuoka.jp":true,"aizubange.fukushima.jp":true,"aizumisato.fukushima.jp":true,"aizuwakamatsu.fukushima.jp":true,"asakawa.fukushima.jp":true,"bandai.fukushima.jp":true,"date.fukushima.jp":true,"fukushima.fukushima.jp":true,"furudono.fukushima.jp":true,"futaba.fukushima.jp":true,"hanawa.fukushima.jp":true,"higashi.fukushima.jp":true,"hirata.fukushima.jp":true,"hirono.fukushima.jp":true,"iitate.fukushima.jp":true,"inawashiro.fukushima.jp":true,"ishikawa.fukushima.jp":true,"iwaki.fukushima.jp":true,"izumizaki.fukushima.jp":true,"kagamiishi.fukushima.jp":true,"kaneyama.fukushima.jp":true,"kawamata.fukushima.jp":true,"kitakata.fukushima.jp":true,"kitashiobara.fukushima.jp":true,"koori.fukushima.jp":true,"koriyama.fukushima.jp":true,"kunimi.fukushima.jp":true,"miharu.fukushima.jp":true,"mishima.fukushima.jp":true,"namie.fukushima.jp":true,"nango.fukushima.jp":true,"nishiaizu.fukushima.jp":true,"nishigo.fukushima.jp":true,"okuma.fukushima.jp":true,"omotego.fukushima.jp":true,"ono.fukushima.jp":true,"otama.fukushima.jp":true,"samegawa.fukushima.jp":true,"shimogo.fukushima.jp":true,"shirakawa.fukushima.jp":true,"showa.fukushima.jp":true,"soma.fukushima.jp":true,"sukagawa.fukushima.jp":true,"taishin.fukushima.jp":true,"tamakawa.fukushima.jp":true,"tanagura.fukushima.jp":true,"tenei.fukushima.jp":true,"yabuki.fukushima.jp":true,"yamato.fukushima.jp":true,"yamatsuri.fukushima.jp":true,"yanaizu.fukushima.jp":true,"yugawa.fukushima.jp":true,"anpachi.gifu.jp":true,"ena.gifu.jp":true,"gifu.gifu.jp":true,"ginan.gifu.jp":true,"godo.gifu.jp":true,"gujo.gifu.jp":true,"hashima.gifu.jp":true,"hichiso.gifu.jp":true,"hida.gifu.jp":true,"higashishirakawa.gifu.jp":true,"ibigawa.gifu.jp":true,"ikeda.gifu.jp":true,"kakamigahara.gifu.jp":true,"kani.gifu.jp":true,"kasahara.gifu.jp":true,"kasamatsu.gifu.jp":true,"kawaue.gifu.jp":true,"kitagata.gifu.jp":true,"mino.gifu.jp":true,"minokamo.gifu.jp":true,"mitake.gifu.jp":true,"mizunami.gifu.jp":true,"motosu.gifu.jp":true,"nakatsugawa.gifu.jp":true,"ogaki.gifu.jp":true,"sakahogi.gifu.jp":true,"seki.gifu.jp":true,"sekigahara.gifu.jp":true,"shirakawa.gifu.jp":true,"tajimi.gifu.jp":true,"takayama.gifu.jp":true,"tarui.gifu.jp":true,"toki.gifu.jp":true,"tomika.gifu.jp":true,"wanouchi.gifu.jp":true,"yamagata.gifu.jp":true,"yaotsu.gifu.jp":true,"yoro.gifu.jp":true,"annaka.gunma.jp":true,"chiyoda.gunma.jp":true,"fujioka.gunma.jp":true,"higashiagatsuma.gunma.jp":true,"isesaki.gunma.jp":true,"itakura.gunma.jp":true,"kanna.gunma.jp":true,"kanra.gunma.jp":true,"katashina.gunma.jp":true,"kawaba.gunma.jp":true,"kiryu.gunma.jp":true,"kusatsu.gunma.jp":true,"maebashi.gunma.jp":true,"meiwa.gunma.jp":true,"midori.gunma.jp":true,"minakami.gunma.jp":true,"naganohara.gunma.jp":true,"nakanojo.gunma.jp":true,"nanmoku.gunma.jp":true,"numata.gunma.jp":true,"oizumi.gunma.jp":true,"ora.gunma.jp":true,"ota.gunma.jp":true,"shibukawa.gunma.jp":true,"shimonita.gunma.jp":true,"shinto.gunma.jp":true,"showa.gunma.jp":true,"takasaki.gunma.jp":true,"takayama.gunma.jp":true,"tamamura.gunma.jp":true,"tatebayashi.gunma.jp":true,"tomioka.gunma.jp":true,"tsukiyono.gunma.jp":true,"tsumagoi.gunma.jp":true,"ueno.gunma.jp":true,"yoshioka.gunma.jp":true,"asaminami.hiroshima.jp":true,"daiwa.hiroshima.jp":true,"etajima.hiroshima.jp":true,"fuchu.hiroshima.jp":true,"fukuyama.hiroshima.jp":true,"hatsukaichi.hiroshima.jp":true,"higashihiroshima.hiroshima.jp":true,"hongo.hiroshima.jp":true,"jinsekikogen.hiroshima.jp":true,"kaita.hiroshima.jp":true,"kui.hiroshima.jp":true,"kumano.hiroshima.jp":true,"kure.hiroshima.jp":true,"mihara.hiroshima.jp":true,"miyoshi.hiroshima.jp":true,"naka.hiroshima.jp":true,"onomichi.hiroshima.jp":true,"osakikamijima.hiroshima.jp":true,"otake.hiroshima.jp":true,"saka.hiroshima.jp":true,"sera.hiroshima.jp":true,"seranishi.hiroshima.jp":true,"shinichi.hiroshima.jp":true,"shobara.hiroshima.jp":true,"takehara.hiroshima.jp":true,"abashiri.hokkaido.jp":true,"abira.hokkaido.jp":true,"aibetsu.hokkaido.jp":true,"akabira.hokkaido.jp":true,"akkeshi.hokkaido.jp":true,"asahikawa.hokkaido.jp":true,"ashibetsu.hokkaido.jp":true,"ashoro.hokkaido.jp":true,"assabu.hokkaido.jp":true,"atsuma.hokkaido.jp":true,"bibai.hokkaido.jp":true,"biei.hokkaido.jp":true,"bifuka.hokkaido.jp":true,"bihoro.hokkaido.jp":true,"biratori.hokkaido.jp":true,"chippubetsu.hokkaido.jp":true,"chitose.hokkaido.jp":true,"date.hokkaido.jp":true,"ebetsu.hokkaido.jp":true,"embetsu.hokkaido.jp":true,"eniwa.hokkaido.jp":true,"erimo.hokkaido.jp":true,"esan.hokkaido.jp":true,"esashi.hokkaido.jp":true,"fukagawa.hokkaido.jp":true,"fukushima.hokkaido.jp":true,"furano.hokkaido.jp":true,"furubira.hokkaido.jp":true,"haboro.hokkaido.jp":true,"hakodate.hokkaido.jp":true,"hamatonbetsu.hokkaido.jp":true,"hidaka.hokkaido.jp":true,"higashikagura.hokkaido.jp":true,"higashikawa.hokkaido.jp":true,"hiroo.hokkaido.jp":true,"hokuryu.hokkaido.jp":true,"hokuto.hokkaido.jp":true,"honbetsu.hokkaido.jp":true,"horokanai.hokkaido.jp":true,"horonobe.hokkaido.jp":true,"ikeda.hokkaido.jp":true,"imakane.hokkaido.jp":true,"ishikari.hokkaido.jp":true,"iwamizawa.hokkaido.jp":true,"iwanai.hokkaido.jp":true,"kamifurano.hokkaido.jp":true,"kamikawa.hokkaido.jp":true,"kamishihoro.hokkaido.jp":true,"kamisunagawa.hokkaido.jp":true,"kamoenai.hokkaido.jp":true,"kayabe.hokkaido.jp":true,"kembuchi.hokkaido.jp":true,"kikonai.hokkaido.jp":true,"kimobetsu.hokkaido.jp":true,"kitahiroshima.hokkaido.jp":true,"kitami.hokkaido.jp":true,"kiyosato.hokkaido.jp":true,"koshimizu.hokkaido.jp":true,"kunneppu.hokkaido.jp":true,"kuriyama.hokkaido.jp":true,"kuromatsunai.hokkaido.jp":true,"kushiro.hokkaido.jp":true,"kutchan.hokkaido.jp":true,"kyowa.hokkaido.jp":true,"mashike.hokkaido.jp":true,"matsumae.hokkaido.jp":true,"mikasa.hokkaido.jp":true,"minamifurano.hokkaido.jp":true,"mombetsu.hokkaido.jp":true,"moseushi.hokkaido.jp":true,"mukawa.hokkaido.jp":true,"muroran.hokkaido.jp":true,"naie.hokkaido.jp":true,"nakagawa.hokkaido.jp":true,"nakasatsunai.hokkaido.jp":true,"nakatombetsu.hokkaido.jp":true,"nanae.hokkaido.jp":true,"nanporo.hokkaido.jp":true,"nayoro.hokkaido.jp":true,"nemuro.hokkaido.jp":true,"niikappu.hokkaido.jp":true,"niki.hokkaido.jp":true,"nishiokoppe.hokkaido.jp":true,"noboribetsu.hokkaido.jp":true,"numata.hokkaido.jp":true,"obihiro.hokkaido.jp":true,"obira.hokkaido.jp":true,"oketo.hokkaido.jp":true,"okoppe.hokkaido.jp":true,"otaru.hokkaido.jp":true,"otobe.hokkaido.jp":true,"otofuke.hokkaido.jp":true,"otoineppu.hokkaido.jp":true,"oumu.hokkaido.jp":true,"ozora.hokkaido.jp":true,"pippu.hokkaido.jp":true,"rankoshi.hokkaido.jp":true,"rebun.hokkaido.jp":true,"rikubetsu.hokkaido.jp":true,"rishiri.hokkaido.jp":true,"rishirifuji.hokkaido.jp":true,"saroma.hokkaido.jp":true,"sarufutsu.hokkaido.jp":true,"shakotan.hokkaido.jp":true,"shari.hokkaido.jp":true,"shibecha.hokkaido.jp":true,"shibetsu.hokkaido.jp":true,"shikabe.hokkaido.jp":true,"shikaoi.hokkaido.jp":true,"shimamaki.hokkaido.jp":true,"shimizu.hokkaido.jp":true,"shimokawa.hokkaido.jp":true,"shinshinotsu.hokkaido.jp":true,"shintoku.hokkaido.jp":true,"shiranuka.hokkaido.jp":true,"shiraoi.hokkaido.jp":true,"shiriuchi.hokkaido.jp":true,"sobetsu.hokkaido.jp":true,"sunagawa.hokkaido.jp":true,"taiki.hokkaido.jp":true,"takasu.hokkaido.jp":true,"takikawa.hokkaido.jp":true,"takinoue.hokkaido.jp":true,"teshikaga.hokkaido.jp":true,"tobetsu.hokkaido.jp":true,"tohma.hokkaido.jp":true,"tomakomai.hokkaido.jp":true,"tomari.hokkaido.jp":true,"toya.hokkaido.jp":true,"toyako.hokkaido.jp":true,"toyotomi.hokkaido.jp":true,"toyoura.hokkaido.jp":true,"tsubetsu.hokkaido.jp":true,"tsukigata.hokkaido.jp":true,"urakawa.hokkaido.jp":true,"urausu.hokkaido.jp":true,"uryu.hokkaido.jp":true,"utashinai.hokkaido.jp":true,"wakkanai.hokkaido.jp":true,"wassamu.hokkaido.jp":true,"yakumo.hokkaido.jp":true,"yoichi.hokkaido.jp":true,"aioi.hyogo.jp":true,"akashi.hyogo.jp":true,"ako.hyogo.jp":true,"amagasaki.hyogo.jp":true,"aogaki.hyogo.jp":true,"asago.hyogo.jp":true,"ashiya.hyogo.jp":true,"awaji.hyogo.jp":true,"fukusaki.hyogo.jp":true,"goshiki.hyogo.jp":true,"harima.hyogo.jp":true,"himeji.hyogo.jp":true,"ichikawa.hyogo.jp":true,"inagawa.hyogo.jp":true,"itami.hyogo.jp":true,"kakogawa.hyogo.jp":true,"kamigori.hyogo.jp":true,"kamikawa.hyogo.jp":true,"kasai.hyogo.jp":true,"kasuga.hyogo.jp":true,"kawanishi.hyogo.jp":true,"miki.hyogo.jp":true,"minamiawaji.hyogo.jp":true,"nishinomiya.hyogo.jp":true,"nishiwaki.hyogo.jp":true,"ono.hyogo.jp":true,"sanda.hyogo.jp":true,"sannan.hyogo.jp":true,"sasayama.hyogo.jp":true,"sayo.hyogo.jp":true,"shingu.hyogo.jp":true,"shinonsen.hyogo.jp":true,"shiso.hyogo.jp":true,"sumoto.hyogo.jp":true,"taishi.hyogo.jp":true,"taka.hyogo.jp":true,"takarazuka.hyogo.jp":true,"takasago.hyogo.jp":true,"takino.hyogo.jp":true,"tamba.hyogo.jp":true,"tatsuno.hyogo.jp":true,"toyooka.hyogo.jp":true,"yabu.hyogo.jp":true,"yashiro.hyogo.jp":true,"yoka.hyogo.jp":true,"yokawa.hyogo.jp":true,"ami.ibaraki.jp":true,"asahi.ibaraki.jp":true,"bando.ibaraki.jp":true,"chikusei.ibaraki.jp":true,"daigo.ibaraki.jp":true,"fujishiro.ibaraki.jp":true,"hitachi.ibaraki.jp":true,"hitachinaka.ibaraki.jp":true,"hitachiomiya.ibaraki.jp":true,"hitachiota.ibaraki.jp":true,"ibaraki.ibaraki.jp":true,"ina.ibaraki.jp":true,"inashiki.ibaraki.jp":true,"itako.ibaraki.jp":true,"iwama.ibaraki.jp":true,"joso.ibaraki.jp":true,"kamisu.ibaraki.jp":true,"kasama.ibaraki.jp":true,"kashima.ibaraki.jp":true,"kasumigaura.ibaraki.jp":true,"koga.ibaraki.jp":true,"miho.ibaraki.jp":true,"mito.ibaraki.jp":true,"moriya.ibaraki.jp":true,"naka.ibaraki.jp":true,"namegata.ibaraki.jp":true,"oarai.ibaraki.jp":true,"ogawa.ibaraki.jp":true,"omitama.ibaraki.jp":true,"ryugasaki.ibaraki.jp":true,"sakai.ibaraki.jp":true,"sakuragawa.ibaraki.jp":true,"shimodate.ibaraki.jp":true,"shimotsuma.ibaraki.jp":true,"shirosato.ibaraki.jp":true,"sowa.ibaraki.jp":true,"suifu.ibaraki.jp":true,"takahagi.ibaraki.jp":true,"tamatsukuri.ibaraki.jp":true,"tokai.ibaraki.jp":true,"tomobe.ibaraki.jp":true,"tone.ibaraki.jp":true,"toride.ibaraki.jp":true,"tsuchiura.ibaraki.jp":true,"tsukuba.ibaraki.jp":true,"uchihara.ibaraki.jp":true,"ushiku.ibaraki.jp":true,"yachiyo.ibaraki.jp":true,"yamagata.ibaraki.jp":true,"yawara.ibaraki.jp":true,"yuki.ibaraki.jp":true,"anamizu.ishikawa.jp":true,"hakui.ishikawa.jp":true,"hakusan.ishikawa.jp":true,"kaga.ishikawa.jp":true,"kahoku.ishikawa.jp":true,"kanazawa.ishikawa.jp":true,"kawakita.ishikawa.jp":true,"komatsu.ishikawa.jp":true,"nakanoto.ishikawa.jp":true,"nanao.ishikawa.jp":true,"nomi.ishikawa.jp":true,"nonoichi.ishikawa.jp":true,"noto.ishikawa.jp":true,"shika.ishikawa.jp":true,"suzu.ishikawa.jp":true,"tsubata.ishikawa.jp":true,"tsurugi.ishikawa.jp":true,"uchinada.ishikawa.jp":true,"wajima.ishikawa.jp":true,"fudai.iwate.jp":true,"fujisawa.iwate.jp":true,"hanamaki.iwate.jp":true,"hiraizumi.iwate.jp":true,"hirono.iwate.jp":true,"ichinohe.iwate.jp":true,"ichinoseki.iwate.jp":true,"iwaizumi.iwate.jp":true,"iwate.iwate.jp":true,"joboji.iwate.jp":true,"kamaishi.iwate.jp":true,"kanegasaki.iwate.jp":true,"karumai.iwate.jp":true,"kawai.iwate.jp":true,"kitakami.iwate.jp":true,"kuji.iwate.jp":true,"kunohe.iwate.jp":true,"kuzumaki.iwate.jp":true,"miyako.iwate.jp":true,"mizusawa.iwate.jp":true,"morioka.iwate.jp":true,"ninohe.iwate.jp":true,"noda.iwate.jp":true,"ofunato.iwate.jp":true,"oshu.iwate.jp":true,"otsuchi.iwate.jp":true,"rikuzentakata.iwate.jp":true,"shiwa.iwate.jp":true,"shizukuishi.iwate.jp":true,"sumita.iwate.jp":true,"tanohata.iwate.jp":true,"tono.iwate.jp":true,"yahaba.iwate.jp":true,"yamada.iwate.jp":true,"ayagawa.kagawa.jp":true,"higashikagawa.kagawa.jp":true,"kanonji.kagawa.jp":true,"kotohira.kagawa.jp":true,"manno.kagawa.jp":true,"marugame.kagawa.jp":true,"mitoyo.kagawa.jp":true,"naoshima.kagawa.jp":true,"sanuki.kagawa.jp":true,"tadotsu.kagawa.jp":true,"takamatsu.kagawa.jp":true,"tonosho.kagawa.jp":true,"uchinomi.kagawa.jp":true,"utazu.kagawa.jp":true,"zentsuji.kagawa.jp":true,"akune.kagoshima.jp":true,"amami.kagoshima.jp":true,"hioki.kagoshima.jp":true,"isa.kagoshima.jp":true,"isen.kagoshima.jp":true,"izumi.kagoshima.jp":true,"kagoshima.kagoshima.jp":true,"kanoya.kagoshima.jp":true,"kawanabe.kagoshima.jp":true,"kinko.kagoshima.jp":true,"kouyama.kagoshima.jp":true,"makurazaki.kagoshima.jp":true,"matsumoto.kagoshima.jp":true,"minamitane.kagoshima.jp":true,"nakatane.kagoshima.jp":true,"nishinoomote.kagoshima.jp":true,"satsumasendai.kagoshima.jp":true,"soo.kagoshima.jp":true,"tarumizu.kagoshima.jp":true,"yusui.kagoshima.jp":true,"aikawa.kanagawa.jp":true,"atsugi.kanagawa.jp":true,"ayase.kanagawa.jp":true,"chigasaki.kanagawa.jp":true,"ebina.kanagawa.jp":true,"fujisawa.kanagawa.jp":true,"hadano.kanagawa.jp":true,"hakone.kanagawa.jp":true,"hiratsuka.kanagawa.jp":true,"isehara.kanagawa.jp":true,"kaisei.kanagawa.jp":true,"kamakura.kanagawa.jp":true,"kiyokawa.kanagawa.jp":true,"matsuda.kanagawa.jp":true,"minamiashigara.kanagawa.jp":true,"miura.kanagawa.jp":true,"nakai.kanagawa.jp":true,"ninomiya.kanagawa.jp":true,"odawara.kanagawa.jp":true,"oi.kanagawa.jp":true,"oiso.kanagawa.jp":true,"sagamihara.kanagawa.jp":true,"samukawa.kanagawa.jp":true,"tsukui.kanagawa.jp":true,"yamakita.kanagawa.jp":true,"yamato.kanagawa.jp":true,"yokosuka.kanagawa.jp":true,"yugawara.kanagawa.jp":true,"zama.kanagawa.jp":true,"zushi.kanagawa.jp":true,"aki.kochi.jp":true,"geisei.kochi.jp":true,"hidaka.kochi.jp":true,"higashitsuno.kochi.jp":true,"ino.kochi.jp":true,"kagami.kochi.jp":true,"kami.kochi.jp":true,"kitagawa.kochi.jp":true,"kochi.kochi.jp":true,"mihara.kochi.jp":true,"motoyama.kochi.jp":true,"muroto.kochi.jp":true,"nahari.kochi.jp":true,"nakamura.kochi.jp":true,"nankoku.kochi.jp":true,"nishitosa.kochi.jp":true,"niyodogawa.kochi.jp":true,"ochi.kochi.jp":true,"okawa.kochi.jp":true,"otoyo.kochi.jp":true,"otsuki.kochi.jp":true,"sakawa.kochi.jp":true,"sukumo.kochi.jp":true,"susaki.kochi.jp":true,"tosa.kochi.jp":true,"tosashimizu.kochi.jp":true,"toyo.kochi.jp":true,"tsuno.kochi.jp":true,"umaji.kochi.jp":true,"yasuda.kochi.jp":true,"yusuhara.kochi.jp":true,"amakusa.kumamoto.jp":true,"arao.kumamoto.jp":true,"aso.kumamoto.jp":true,"choyo.kumamoto.jp":true,"gyokuto.kumamoto.jp":true,"hitoyoshi.kumamoto.jp":true,"kamiamakusa.kumamoto.jp":true,"kashima.kumamoto.jp":true,"kikuchi.kumamoto.jp":true,"kosa.kumamoto.jp":true,"kumamoto.kumamoto.jp":true,"mashiki.kumamoto.jp":true,"mifune.kumamoto.jp":true,"minamata.kumamoto.jp":true,"minamioguni.kumamoto.jp":true,"nagasu.kumamoto.jp":true,"nishihara.kumamoto.jp":true,"oguni.kumamoto.jp":true,"ozu.kumamoto.jp":true,"sumoto.kumamoto.jp":true,"takamori.kumamoto.jp":true,"uki.kumamoto.jp":true,"uto.kumamoto.jp":true,"yamaga.kumamoto.jp":true,"yamato.kumamoto.jp":true,"yatsushiro.kumamoto.jp":true,"ayabe.kyoto.jp":true,"fukuchiyama.kyoto.jp":true,"higashiyama.kyoto.jp":true,"ide.kyoto.jp":true,"ine.kyoto.jp":true,"joyo.kyoto.jp":true,"kameoka.kyoto.jp":true,"kamo.kyoto.jp":true,"kita.kyoto.jp":true,"kizu.kyoto.jp":true,"kumiyama.kyoto.jp":true,"kyotamba.kyoto.jp":true,"kyotanabe.kyoto.jp":true,"kyotango.kyoto.jp":true,"maizuru.kyoto.jp":true,"minami.kyoto.jp":true,"minamiyamashiro.kyoto.jp":true,"miyazu.kyoto.jp":true,"muko.kyoto.jp":true,"nagaokakyo.kyoto.jp":true,"nakagyo.kyoto.jp":true,"nantan.kyoto.jp":true,"oyamazaki.kyoto.jp":true,"sakyo.kyoto.jp":true,"seika.kyoto.jp":true,"tanabe.kyoto.jp":true,"uji.kyoto.jp":true,"ujitawara.kyoto.jp":true,"wazuka.kyoto.jp":true,"yamashina.kyoto.jp":true,"yawata.kyoto.jp":true,"asahi.mie.jp":true,"inabe.mie.jp":true,"ise.mie.jp":true,"kameyama.mie.jp":true,"kawagoe.mie.jp":true,"kiho.mie.jp":true,"kisosaki.mie.jp":true,"kiwa.mie.jp":true,"komono.mie.jp":true,"kumano.mie.jp":true,"kuwana.mie.jp":true,"matsusaka.mie.jp":true,"meiwa.mie.jp":true,"mihama.mie.jp":true,"minamiise.mie.jp":true,"misugi.mie.jp":true,"miyama.mie.jp":true,"nabari.mie.jp":true,"shima.mie.jp":true,"suzuka.mie.jp":true,"tado.mie.jp":true,"taiki.mie.jp":true,"taki.mie.jp":true,"tamaki.mie.jp":true,"toba.mie.jp":true,"tsu.mie.jp":true,"udono.mie.jp":true,"ureshino.mie.jp":true,"watarai.mie.jp":true,"yokkaichi.mie.jp":true,"furukawa.miyagi.jp":true,"higashimatsushima.miyagi.jp":true,"ishinomaki.miyagi.jp":true,"iwanuma.miyagi.jp":true,"kakuda.miyagi.jp":true,"kami.miyagi.jp":true,"kawasaki.miyagi.jp":true,"kesennuma.miyagi.jp":true,"marumori.miyagi.jp":true,"matsushima.miyagi.jp":true,"minamisanriku.miyagi.jp":true,"misato.miyagi.jp":true,"murata.miyagi.jp":true,"natori.miyagi.jp":true,"ogawara.miyagi.jp":true,"ohira.miyagi.jp":true,"onagawa.miyagi.jp":true,"osaki.miyagi.jp":true,"rifu.miyagi.jp":true,"semine.miyagi.jp":true,"shibata.miyagi.jp":true,"shichikashuku.miyagi.jp":true,"shikama.miyagi.jp":true,"shiogama.miyagi.jp":true,"shiroishi.miyagi.jp":true,"tagajo.miyagi.jp":true,"taiwa.miyagi.jp":true,"tome.miyagi.jp":true,"tomiya.miyagi.jp":true,"wakuya.miyagi.jp":true,"watari.miyagi.jp":true,"yamamoto.miyagi.jp":true,"zao.miyagi.jp":true,"aya.miyazaki.jp":true,"ebino.miyazaki.jp":true,"gokase.miyazaki.jp":true,"hyuga.miyazaki.jp":true,"kadogawa.miyazaki.jp":true,"kawaminami.miyazaki.jp":true,"kijo.miyazaki.jp":true,"kitagawa.miyazaki.jp":true,"kitakata.miyazaki.jp":true,"kitaura.miyazaki.jp":true,"kobayashi.miyazaki.jp":true,"kunitomi.miyazaki.jp":true,"kushima.miyazaki.jp":true,"mimata.miyazaki.jp":true,"miyakonojo.miyazaki.jp":true,"miyazaki.miyazaki.jp":true,"morotsuka.miyazaki.jp":true,"nichinan.miyazaki.jp":true,"nishimera.miyazaki.jp":true,"nobeoka.miyazaki.jp":true,"saito.miyazaki.jp":true,"shiiba.miyazaki.jp":true,"shintomi.miyazaki.jp":true,"takaharu.miyazaki.jp":true,"takanabe.miyazaki.jp":true,"takazaki.miyazaki.jp":true,"tsuno.miyazaki.jp":true,"achi.nagano.jp":true,"agematsu.nagano.jp":true,"anan.nagano.jp":true,"aoki.nagano.jp":true,"asahi.nagano.jp":true,"azumino.nagano.jp":true,"chikuhoku.nagano.jp":true,"chikuma.nagano.jp":true,"chino.nagano.jp":true,"fujimi.nagano.jp":true,"hakuba.nagano.jp":true,"hara.nagano.jp":true,"hiraya.nagano.jp":true,"iida.nagano.jp":true,"iijima.nagano.jp":true,"iiyama.nagano.jp":true,"iizuna.nagano.jp":true,"ikeda.nagano.jp":true,"ikusaka.nagano.jp":true,"ina.nagano.jp":true,"karuizawa.nagano.jp":true,"kawakami.nagano.jp":true,"kiso.nagano.jp":true,"kisofukushima.nagano.jp":true,"kitaaiki.nagano.jp":true,"komagane.nagano.jp":true,"komoro.nagano.jp":true,"matsukawa.nagano.jp":true,"matsumoto.nagano.jp":true,"miasa.nagano.jp":true,"minamiaiki.nagano.jp":true,"minamimaki.nagano.jp":true,"minamiminowa.nagano.jp":true,"minowa.nagano.jp":true,"miyada.nagano.jp":true,"miyota.nagano.jp":true,"mochizuki.nagano.jp":true,"nagano.nagano.jp":true,"nagawa.nagano.jp":true,"nagiso.nagano.jp":true,"nakagawa.nagano.jp":true,"nakano.nagano.jp":true,"nozawaonsen.nagano.jp":true,"obuse.nagano.jp":true,"ogawa.nagano.jp":true,"okaya.nagano.jp":true,"omachi.nagano.jp":true,"omi.nagano.jp":true,"ookuwa.nagano.jp":true,"ooshika.nagano.jp":true,"otaki.nagano.jp":true,"otari.nagano.jp":true,"sakae.nagano.jp":true,"sakaki.nagano.jp":true,"saku.nagano.jp":true,"sakuho.nagano.jp":true,"shimosuwa.nagano.jp":true,"shinanomachi.nagano.jp":true,"shiojiri.nagano.jp":true,"suwa.nagano.jp":true,"suzaka.nagano.jp":true,"takagi.nagano.jp":true,"takamori.nagano.jp":true,"takayama.nagano.jp":true,"tateshina.nagano.jp":true,"tatsuno.nagano.jp":true,"togakushi.nagano.jp":true,"togura.nagano.jp":true,"tomi.nagano.jp":true,"ueda.nagano.jp":true,"wada.nagano.jp":true,"yamagata.nagano.jp":true,"yamanouchi.nagano.jp":true,"yasaka.nagano.jp":true,"yasuoka.nagano.jp":true,"chijiwa.nagasaki.jp":true,"futsu.nagasaki.jp":true,"goto.nagasaki.jp":true,"hasami.nagasaki.jp":true,"hirado.nagasaki.jp":true,"iki.nagasaki.jp":true,"isahaya.nagasaki.jp":true,"kawatana.nagasaki.jp":true,"kuchinotsu.nagasaki.jp":true,"matsuura.nagasaki.jp":true,"nagasaki.nagasaki.jp":true,"obama.nagasaki.jp":true,"omura.nagasaki.jp":true,"oseto.nagasaki.jp":true,"saikai.nagasaki.jp":true,"sasebo.nagasaki.jp":true,"seihi.nagasaki.jp":true,"shimabara.nagasaki.jp":true,"shinkamigoto.nagasaki.jp":true,"togitsu.nagasaki.jp":true,"tsushima.nagasaki.jp":true,"unzen.nagasaki.jp":true,"ando.nara.jp":true,"gose.nara.jp":true,"heguri.nara.jp":true,"higashiyoshino.nara.jp":true,"ikaruga.nara.jp":true,"ikoma.nara.jp":true,"kamikitayama.nara.jp":true,"kanmaki.nara.jp":true,"kashiba.nara.jp":true,"kashihara.nara.jp":true,"katsuragi.nara.jp":true,"kawai.nara.jp":true,"kawakami.nara.jp":true,"kawanishi.nara.jp":true,"koryo.nara.jp":true,"kurotaki.nara.jp":true,"mitsue.nara.jp":true,"miyake.nara.jp":true,"nara.nara.jp":true,"nosegawa.nara.jp":true,"oji.nara.jp":true,"ouda.nara.jp":true,"oyodo.nara.jp":true,"sakurai.nara.jp":true,"sango.nara.jp":true,"shimoichi.nara.jp":true,"shimokitayama.nara.jp":true,"shinjo.nara.jp":true,"soni.nara.jp":true,"takatori.nara.jp":true,"tawaramoto.nara.jp":true,"tenkawa.nara.jp":true,"tenri.nara.jp":true,"uda.nara.jp":true,"yamatokoriyama.nara.jp":true,"yamatotakada.nara.jp":true,"yamazoe.nara.jp":true,"yoshino.nara.jp":true,"aga.niigata.jp":true,"agano.niigata.jp":true,"gosen.niigata.jp":true,"itoigawa.niigata.jp":true,"izumozaki.niigata.jp":true,"joetsu.niigata.jp":true,"kamo.niigata.jp":true,"kariwa.niigata.jp":true,"kashiwazaki.niigata.jp":true,"minamiuonuma.niigata.jp":true,"mitsuke.niigata.jp":true,"muika.niigata.jp":true,"murakami.niigata.jp":true,"myoko.niigata.jp":true,"nagaoka.niigata.jp":true,"niigata.niigata.jp":true,"ojiya.niigata.jp":true,"omi.niigata.jp":true,"sado.niigata.jp":true,"sanjo.niigata.jp":true,"seiro.niigata.jp":true,"seirou.niigata.jp":true,"sekikawa.niigata.jp":true,"shibata.niigata.jp":true,"tagami.niigata.jp":true,"tainai.niigata.jp":true,"tochio.niigata.jp":true,"tokamachi.niigata.jp":true,"tsubame.niigata.jp":true,"tsunan.niigata.jp":true,"uonuma.niigata.jp":true,"yahiko.niigata.jp":true,"yoita.niigata.jp":true,"yuzawa.niigata.jp":true,"beppu.oita.jp":true,"bungoono.oita.jp":true,"bungotakada.oita.jp":true,"hasama.oita.jp":true,"hiji.oita.jp":true,"himeshima.oita.jp":true,"hita.oita.jp":true,"kamitsue.oita.jp":true,"kokonoe.oita.jp":true,"kuju.oita.jp":true,"kunisaki.oita.jp":true,"kusu.oita.jp":true,"oita.oita.jp":true,"saiki.oita.jp":true,"taketa.oita.jp":true,"tsukumi.oita.jp":true,"usa.oita.jp":true,"usuki.oita.jp":true,"yufu.oita.jp":true,"akaiwa.okayama.jp":true,"asakuchi.okayama.jp":true,"bizen.okayama.jp":true,"hayashima.okayama.jp":true,"ibara.okayama.jp":true,"kagamino.okayama.jp":true,"kasaoka.okayama.jp":true,"kibichuo.okayama.jp":true,"kumenan.okayama.jp":true,"kurashiki.okayama.jp":true,"maniwa.okayama.jp":true,"misaki.okayama.jp":true,"nagi.okayama.jp":true,"niimi.okayama.jp":true,"nishiawakura.okayama.jp":true,"okayama.okayama.jp":true,"satosho.okayama.jp":true,"setouchi.okayama.jp":true,"shinjo.okayama.jp":true,"shoo.okayama.jp":true,"soja.okayama.jp":true,"takahashi.okayama.jp":true,"tamano.okayama.jp":true,"tsuyama.okayama.jp":true,"wake.okayama.jp":true,"yakage.okayama.jp":true,"aguni.okinawa.jp":true,"ginowan.okinawa.jp":true,"ginoza.okinawa.jp":true,"gushikami.okinawa.jp":true,"haebaru.okinawa.jp":true,"higashi.okinawa.jp":true,"hirara.okinawa.jp":true,"iheya.okinawa.jp":true,"ishigaki.okinawa.jp":true,"ishikawa.okinawa.jp":true,"itoman.okinawa.jp":true,"izena.okinawa.jp":true,"kadena.okinawa.jp":true,"kin.okinawa.jp":true,"kitadaito.okinawa.jp":true,"kitanakagusuku.okinawa.jp":true,"kumejima.okinawa.jp":true,"kunigami.okinawa.jp":true,"minamidaito.okinawa.jp":true,"motobu.okinawa.jp":true,"nago.okinawa.jp":true,"naha.okinawa.jp":true,"nakagusuku.okinawa.jp":true,"nakijin.okinawa.jp":true,"nanjo.okinawa.jp":true,"nishihara.okinawa.jp":true,"ogimi.okinawa.jp":true,"okinawa.okinawa.jp":true,"onna.okinawa.jp":true,"shimoji.okinawa.jp":true,"taketomi.okinawa.jp":true,"tarama.okinawa.jp":true,"tokashiki.okinawa.jp":true,"tomigusuku.okinawa.jp":true,"tonaki.okinawa.jp":true,"urasoe.okinawa.jp":true,"uruma.okinawa.jp":true,"yaese.okinawa.jp":true,"yomitan.okinawa.jp":true,"yonabaru.okinawa.jp":true,"yonaguni.okinawa.jp":true,"zamami.okinawa.jp":true,"abeno.osaka.jp":true,"chihayaakasaka.osaka.jp":true,"chuo.osaka.jp":true,"daito.osaka.jp":true,"fujiidera.osaka.jp":true,"habikino.osaka.jp":true,"hannan.osaka.jp":true,"higashiosaka.osaka.jp":true,"higashisumiyoshi.osaka.jp":true,"higashiyodogawa.osaka.jp":true,"hirakata.osaka.jp":true,"ibaraki.osaka.jp":true,"ikeda.osaka.jp":true,"izumi.osaka.jp":true,"izumiotsu.osaka.jp":true,"izumisano.osaka.jp":true,"kadoma.osaka.jp":true,"kaizuka.osaka.jp":true,"kanan.osaka.jp":true,"kashiwara.osaka.jp":true,"katano.osaka.jp":true,"kawachinagano.osaka.jp":true,"kishiwada.osaka.jp":true,"kita.osaka.jp":true,"kumatori.osaka.jp":true,"matsubara.osaka.jp":true,"minato.osaka.jp":true,"minoh.osaka.jp":true,"misaki.osaka.jp":true,"moriguchi.osaka.jp":true,"neyagawa.osaka.jp":true,"nishi.osaka.jp":true,"nose.osaka.jp":true,"osakasayama.osaka.jp":true,"sakai.osaka.jp":true,"sayama.osaka.jp":true,"sennan.osaka.jp":true,"settsu.osaka.jp":true,"shijonawate.osaka.jp":true,"shimamoto.osaka.jp":true,"suita.osaka.jp":true,"tadaoka.osaka.jp":true,"taishi.osaka.jp":true,"tajiri.osaka.jp":true,"takaishi.osaka.jp":true,"takatsuki.osaka.jp":true,"tondabayashi.osaka.jp":true,"toyonaka.osaka.jp":true,"toyono.osaka.jp":true,"yao.osaka.jp":true,"ariake.saga.jp":true,"arita.saga.jp":true,"fukudomi.saga.jp":true,"genkai.saga.jp":true,"hamatama.saga.jp":true,"hizen.saga.jp":true,"imari.saga.jp":true,"kamimine.saga.jp":true,"kanzaki.saga.jp":true,"karatsu.saga.jp":true,"kashima.saga.jp":true,"kitagata.saga.jp":true,"kitahata.saga.jp":true,"kiyama.saga.jp":true,"kouhoku.saga.jp":true,"kyuragi.saga.jp":true,"nishiarita.saga.jp":true,"ogi.saga.jp":true,"omachi.saga.jp":true,"ouchi.saga.jp":true,"saga.saga.jp":true,"shiroishi.saga.jp":true,"taku.saga.jp":true,"tara.saga.jp":true,"tosu.saga.jp":true,"yoshinogari.saga.jp":true,"arakawa.saitama.jp":true,"asaka.saitama.jp":true,"chichibu.saitama.jp":true,"fujimi.saitama.jp":true,"fujimino.saitama.jp":true,"fukaya.saitama.jp":true,"hanno.saitama.jp":true,"hanyu.saitama.jp":true,"hasuda.saitama.jp":true,"hatogaya.saitama.jp":true,"hatoyama.saitama.jp":true,"hidaka.saitama.jp":true,"higashichichibu.saitama.jp":true,"higashimatsuyama.saitama.jp":true,"honjo.saitama.jp":true,"ina.saitama.jp":true,"iruma.saitama.jp":true,"iwatsuki.saitama.jp":true,"kamiizumi.saitama.jp":true,"kamikawa.saitama.jp":true,"kamisato.saitama.jp":true,"kasukabe.saitama.jp":true,"kawagoe.saitama.jp":true,"kawaguchi.saitama.jp":true,"kawajima.saitama.jp":true,"kazo.saitama.jp":true,"kitamoto.saitama.jp":true,"koshigaya.saitama.jp":true,"kounosu.saitama.jp":true,"kuki.saitama.jp":true,"kumagaya.saitama.jp":true,"matsubushi.saitama.jp":true,"minano.saitama.jp":true,"misato.saitama.jp":true,"miyashiro.saitama.jp":true,"miyoshi.saitama.jp":true,"moroyama.saitama.jp":true,"nagatoro.saitama.jp":true,"namegawa.saitama.jp":true,"niiza.saitama.jp":true,"ogano.saitama.jp":true,"ogawa.saitama.jp":true,"ogose.saitama.jp":true,"okegawa.saitama.jp":true,"omiya.saitama.jp":true,"otaki.saitama.jp":true,"ranzan.saitama.jp":true,"ryokami.saitama.jp":true,"saitama.saitama.jp":true,"sakado.saitama.jp":true,"satte.saitama.jp":true,"sayama.saitama.jp":true,"shiki.saitama.jp":true,"shiraoka.saitama.jp":true,"soka.saitama.jp":true,"sugito.saitama.jp":true,"toda.saitama.jp":true,"tokigawa.saitama.jp":true,"tokorozawa.saitama.jp":true,"tsurugashima.saitama.jp":true,"urawa.saitama.jp":true,"warabi.saitama.jp":true,"yashio.saitama.jp":true,"yokoze.saitama.jp":true,"yono.saitama.jp":true,"yorii.saitama.jp":true,"yoshida.saitama.jp":true,"yoshikawa.saitama.jp":true,"yoshimi.saitama.jp":true,"aisho.shiga.jp":true,"gamo.shiga.jp":true,"higashiomi.shiga.jp":true,"hikone.shiga.jp":true,"koka.shiga.jp":true,"konan.shiga.jp":true,"kosei.shiga.jp":true,"koto.shiga.jp":true,"kusatsu.shiga.jp":true,"maibara.shiga.jp":true,"moriyama.shiga.jp":true,"nagahama.shiga.jp":true,"nishiazai.shiga.jp":true,"notogawa.shiga.jp":true,"omihachiman.shiga.jp":true,"otsu.shiga.jp":true,"ritto.shiga.jp":true,"ryuoh.shiga.jp":true,"takashima.shiga.jp":true,"takatsuki.shiga.jp":true,"torahime.shiga.jp":true,"toyosato.shiga.jp":true,"yasu.shiga.jp":true,"akagi.shimane.jp":true,"ama.shimane.jp":true,"gotsu.shimane.jp":true,"hamada.shimane.jp":true,"higashiizumo.shimane.jp":true,"hikawa.shimane.jp":true,"hikimi.shimane.jp":true,"izumo.shimane.jp":true,"kakinoki.shimane.jp":true,"masuda.shimane.jp":true,"matsue.shimane.jp":true,"misato.shimane.jp":true,"nishinoshima.shimane.jp":true,"ohda.shimane.jp":true,"okinoshima.shimane.jp":true,"okuizumo.shimane.jp":true,"shimane.shimane.jp":true,"tamayu.shimane.jp":true,"tsuwano.shimane.jp":true,"unnan.shimane.jp":true,"yakumo.shimane.jp":true,"yasugi.shimane.jp":true,"yatsuka.shimane.jp":true,"arai.shizuoka.jp":true,"atami.shizuoka.jp":true,"fuji.shizuoka.jp":true,"fujieda.shizuoka.jp":true,"fujikawa.shizuoka.jp":true,"fujinomiya.shizuoka.jp":true,"fukuroi.shizuoka.jp":true,"gotemba.shizuoka.jp":true,"haibara.shizuoka.jp":true,"hamamatsu.shizuoka.jp":true,"higashiizu.shizuoka.jp":true,"ito.shizuoka.jp":true,"iwata.shizuoka.jp":true,"izu.shizuoka.jp":true,"izunokuni.shizuoka.jp":true,"kakegawa.shizuoka.jp":true,"kannami.shizuoka.jp":true,"kawanehon.shizuoka.jp":true,"kawazu.shizuoka.jp":true,"kikugawa.shizuoka.jp":true,"kosai.shizuoka.jp":true,"makinohara.shizuoka.jp":true,"matsuzaki.shizuoka.jp":true,"minamiizu.shizuoka.jp":true,"mishima.shizuoka.jp":true,"morimachi.shizuoka.jp":true,"nishiizu.shizuoka.jp":true,"numazu.shizuoka.jp":true,"omaezaki.shizuoka.jp":true,"shimada.shizuoka.jp":true,"shimizu.shizuoka.jp":true,"shimoda.shizuoka.jp":true,"shizuoka.shizuoka.jp":true,"susono.shizuoka.jp":true,"yaizu.shizuoka.jp":true,"yoshida.shizuoka.jp":true,"ashikaga.tochigi.jp":true,"bato.tochigi.jp":true,"haga.tochigi.jp":true,"ichikai.tochigi.jp":true,"iwafune.tochigi.jp":true,"kaminokawa.tochigi.jp":true,"kanuma.tochigi.jp":true,"karasuyama.tochigi.jp":true,"kuroiso.tochigi.jp":true,"mashiko.tochigi.jp":true,"mibu.tochigi.jp":true,"moka.tochigi.jp":true,"motegi.tochigi.jp":true,"nasu.tochigi.jp":true,"nasushiobara.tochigi.jp":true,"nikko.tochigi.jp":true,"nishikata.tochigi.jp":true,"nogi.tochigi.jp":true,"ohira.tochigi.jp":true,"ohtawara.tochigi.jp":true,"oyama.tochigi.jp":true,"sakura.tochigi.jp":true,"sano.tochigi.jp":true,"shimotsuke.tochigi.jp":true,"shioya.tochigi.jp":true,"takanezawa.tochigi.jp":true,"tochigi.tochigi.jp":true,"tsuga.tochigi.jp":true,"ujiie.tochigi.jp":true,"utsunomiya.tochigi.jp":true,"yaita.tochigi.jp":true,"aizumi.tokushima.jp":true,"anan.tokushima.jp":true,"ichiba.tokushima.jp":true,"itano.tokushima.jp":true,"kainan.tokushima.jp":true,"komatsushima.tokushima.jp":true,"matsushige.tokushima.jp":true,"mima.tokushima.jp":true,"minami.tokushima.jp":true,"miyoshi.tokushima.jp":true,"mugi.tokushima.jp":true,"nakagawa.tokushima.jp":true,"naruto.tokushima.jp":true,"sanagochi.tokushima.jp":true,"shishikui.tokushima.jp":true,"tokushima.tokushima.jp":true,"wajiki.tokushima.jp":true,"adachi.tokyo.jp":true,"akiruno.tokyo.jp":true,"akishima.tokyo.jp":true,"aogashima.tokyo.jp":true,"arakawa.tokyo.jp":true,"bunkyo.tokyo.jp":true,"chiyoda.tokyo.jp":true,"chofu.tokyo.jp":true,"chuo.tokyo.jp":true,"edogawa.tokyo.jp":true,"fuchu.tokyo.jp":true,"fussa.tokyo.jp":true,"hachijo.tokyo.jp":true,"hachioji.tokyo.jp":true,"hamura.tokyo.jp":true,"higashikurume.tokyo.jp":true,"higashimurayama.tokyo.jp":true,"higashiyamato.tokyo.jp":true,"hino.tokyo.jp":true,"hinode.tokyo.jp":true,"hinohara.tokyo.jp":true,"inagi.tokyo.jp":true,"itabashi.tokyo.jp":true,"katsushika.tokyo.jp":true,"kita.tokyo.jp":true,"kiyose.tokyo.jp":true,"kodaira.tokyo.jp":true,"koganei.tokyo.jp":true,"kokubunji.tokyo.jp":true,"komae.tokyo.jp":true,"koto.tokyo.jp":true,"kouzushima.tokyo.jp":true,"kunitachi.tokyo.jp":true,"machida.tokyo.jp":true,"meguro.tokyo.jp":true,"minato.tokyo.jp":true,"mitaka.tokyo.jp":true,"mizuho.tokyo.jp":true,"musashimurayama.tokyo.jp":true,"musashino.tokyo.jp":true,"nakano.tokyo.jp":true,"nerima.tokyo.jp":true,"ogasawara.tokyo.jp":true,"okutama.tokyo.jp":true,"ome.tokyo.jp":true,"oshima.tokyo.jp":true,"ota.tokyo.jp":true,"setagaya.tokyo.jp":true,"shibuya.tokyo.jp":true,"shinagawa.tokyo.jp":true,"shinjuku.tokyo.jp":true,"suginami.tokyo.jp":true,"sumida.tokyo.jp":true,"tachikawa.tokyo.jp":true,"taito.tokyo.jp":true,"tama.tokyo.jp":true,"toshima.tokyo.jp":true,"chizu.tottori.jp":true,"hino.tottori.jp":true,"kawahara.tottori.jp":true,"koge.tottori.jp":true,"kotoura.tottori.jp":true,"misasa.tottori.jp":true,"nanbu.tottori.jp":true,"nichinan.tottori.jp":true,"sakaiminato.tottori.jp":true,"tottori.tottori.jp":true,"wakasa.tottori.jp":true,"yazu.tottori.jp":true,"yonago.tottori.jp":true,"asahi.toyama.jp":true,"fuchu.toyama.jp":true,"fukumitsu.toyama.jp":true,"funahashi.toyama.jp":true,"himi.toyama.jp":true,"imizu.toyama.jp":true,"inami.toyama.jp":true,"johana.toyama.jp":true,"kamiichi.toyama.jp":true,"kurobe.toyama.jp":true,"nakaniikawa.toyama.jp":true,"namerikawa.toyama.jp":true,"nanto.toyama.jp":true,"nyuzen.toyama.jp":true,"oyabe.toyama.jp":true,"taira.toyama.jp":true,"takaoka.toyama.jp":true,"tateyama.toyama.jp":true,"toga.toyama.jp":true,"tonami.toyama.jp":true,"toyama.toyama.jp":true,"unazuki.toyama.jp":true,"uozu.toyama.jp":true,"yamada.toyama.jp":true,"arida.wakayama.jp":true,"aridagawa.wakayama.jp":true,"gobo.wakayama.jp":true,"hashimoto.wakayama.jp":true,"hidaka.wakayama.jp":true,"hirogawa.wakayama.jp":true,"inami.wakayama.jp":true,"iwade.wakayama.jp":true,"kainan.wakayama.jp":true,"kamitonda.wakayama.jp":true,"katsuragi.wakayama.jp":true,"kimino.wakayama.jp":true,"kinokawa.wakayama.jp":true,"kitayama.wakayama.jp":true,"koya.wakayama.jp":true,"koza.wakayama.jp":true,"kozagawa.wakayama.jp":true,"kudoyama.wakayama.jp":true,"kushimoto.wakayama.jp":true,"mihama.wakayama.jp":true,"misato.wakayama.jp":true,"nachikatsuura.wakayama.jp":true,"shingu.wakayama.jp":true,"shirahama.wakayama.jp":true,"taiji.wakayama.jp":true,"tanabe.wakayama.jp":true,"wakayama.wakayama.jp":true,"yuasa.wakayama.jp":true,"yura.wakayama.jp":true,"asahi.yamagata.jp":true,"funagata.yamagata.jp":true,"higashine.yamagata.jp":true,"iide.yamagata.jp":true,"kahoku.yamagata.jp":true,"kaminoyama.yamagata.jp":true,"kaneyama.yamagata.jp":true,"kawanishi.yamagata.jp":true,"mamurogawa.yamagata.jp":true,"mikawa.yamagata.jp":true,"murayama.yamagata.jp":true,"nagai.yamagata.jp":true,"nakayama.yamagata.jp":true,"nanyo.yamagata.jp":true,"nishikawa.yamagata.jp":true,"obanazawa.yamagata.jp":true,"oe.yamagata.jp":true,"oguni.yamagata.jp":true,"ohkura.yamagata.jp":true,"oishida.yamagata.jp":true,"sagae.yamagata.jp":true,"sakata.yamagata.jp":true,"sakegawa.yamagata.jp":true,"shinjo.yamagata.jp":true,"shirataka.yamagata.jp":true,"shonai.yamagata.jp":true,"takahata.yamagata.jp":true,"tendo.yamagata.jp":true,"tozawa.yamagata.jp":true,"tsuruoka.yamagata.jp":true,"yamagata.yamagata.jp":true,"yamanobe.yamagata.jp":true,"yonezawa.yamagata.jp":true,"yuza.yamagata.jp":true,"abu.yamaguchi.jp":true,"hagi.yamaguchi.jp":true,"hikari.yamaguchi.jp":true,"hofu.yamaguchi.jp":true,"iwakuni.yamaguchi.jp":true,"kudamatsu.yamaguchi.jp":true,"mitou.yamaguchi.jp":true,"nagato.yamaguchi.jp":true,"oshima.yamaguchi.jp":true,"shimonoseki.yamaguchi.jp":true,"shunan.yamaguchi.jp":true,"tabuse.yamaguchi.jp":true,"tokuyama.yamaguchi.jp":true,"toyota.yamaguchi.jp":true,"ube.yamaguchi.jp":true,"yuu.yamaguchi.jp":true,"chuo.yamanashi.jp":true,"doshi.yamanashi.jp":true,"fuefuki.yamanashi.jp":true,"fujikawa.yamanashi.jp":true,"fujikawaguchiko.yamanashi.jp":true,"fujiyoshida.yamanashi.jp":true,"hayakawa.yamanashi.jp":true,"hokuto.yamanashi.jp":true,"ichikawamisato.yamanashi.jp":true,"kai.yamanashi.jp":true,"kofu.yamanashi.jp":true,"koshu.yamanashi.jp":true,"kosuge.yamanashi.jp":true,"minami-alps.yamanashi.jp":true,"minobu.yamanashi.jp":true,"nakamichi.yamanashi.jp":true,"nanbu.yamanashi.jp":true,"narusawa.yamanashi.jp":true,"nirasaki.yamanashi.jp":true,"nishikatsura.yamanashi.jp":true,"oshino.yamanashi.jp":true,"otsuki.yamanashi.jp":true,"showa.yamanashi.jp":true,"tabayama.yamanashi.jp":true,"tsuru.yamanashi.jp":true,"uenohara.yamanashi.jp":true,"yamanakako.yamanashi.jp":true,"yamanashi.yamanashi.jp":true,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"kp":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"lb":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"ac.lk":true,"lr":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"co.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"com.ms":true,"edu.ms":true,"gov.ms":true,"net.ms":true,"org.ms":true,"mt":true,"com.mt":true,"edu.mt":true,"net.mt":true,"org.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"teledata.mz":false,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ng":true,"com.ng":true,"edu.ng":true,"name.ng":true,"net.ng":true,"org.ng":true,"sch.ng":true,"gov.ng":true,"mil.ng":true,"mobi.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"nz":true,"ac.nz":true,"co.nz":true,"cri.nz":true,"geek.nz":true,"gen.nz":true,"govt.nz":true,"health.nz":true,"iwi.nz":true,"kiwi.nz":true,"maori.nz":true,"mil.nz":true,"xn--mori-qsa.nz":true,"net.nz":true,"org.nz":true,"parliament.nz":true,"school.nz":true,"om":true,"co.om":true,"com.om":true,"edu.om":true,"gov.om":true,"med.om":true,"museum.om":true,"net.om":true,"org.om":true,"pro.om":true,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"com.pl":true,"net.pl":true,"org.pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"gov.pl":true,"ap.gov.pl":true,"ic.gov.pl":true,"is.gov.pl":true,"us.gov.pl":true,"kmpsp.gov.pl":true,"kppsp.gov.pl":true,"kwpsp.gov.pl":true,"psp.gov.pl":true,"wskr.gov.pl":true,"kwp.gov.pl":true,"mw.gov.pl":true,"ug.gov.pl":true,"um.gov.pl":true,"umig.gov.pl":true,"ugim.gov.pl":true,"upow.gov.pl":true,"uw.gov.pl":true,"starostwo.gov.pl":true,"pa.gov.pl":true,"po.gov.pl":true,"psse.gov.pl":true,"pup.gov.pl":true,"rzgw.gov.pl":true,"sa.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"wsa.gov.pl":true,"sko.gov.pl":true,"uzs.gov.pl":true,"wiih.gov.pl":true,"winb.gov.pl":true,"pinb.gov.pl":true,"wios.gov.pl":true,"witd.gov.pl":true,"wzmiuw.gov.pl":true,"piw.gov.pl":true,"wiw.gov.pl":true,"griw.gov.pl":true,"wif.gov.pl":true,"oum.gov.pl":true,"sdn.gov.pl":true,"zp.gov.pl":true,"uppo.gov.pl":true,"mup.gov.pl":true,"wuoz.gov.pl":true,"konsulat.gov.pl":true,"oirm.gov.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"post":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"py":true,"com.py":true,"coop.py":true,"edu.py":true,"gov.py":true,"mil.py":true,"net.py":true,"org.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"tv.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"com.sh":true,"net.sh":true,"gov.sh":true,"org.sh":true,"mil.sh":true,"si":true,"sj":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"adygeya.su":true,"arkhangelsk.su":true,"balashov.su":true,"bashkiria.su":true,"bryansk.su":true,"dagestan.su":true,"grozny.su":true,"ivanovo.su":true,"kalmykia.su":true,"kaluga.su":true,"karelia.su":true,"khakassia.su":true,"krasnodar.su":true,"kurgan.su":true,"lenug.su":true,"mordovia.su":true,"msk.su":true,"murmansk.su":true,"nalchik.su":true,"nov.su":true,"obninsk.su":true,"penza.su":true,"pokrovsk.su":true,"sochi.su":true,"spb.su":true,"togliatti.su":true,"troitsk.su":true,"tula.su":true,"tuva.su":true,"vladikavkaz.su":true,"vladimir.su":true,"vologda.su":true,"sv":true,"com.sv":true,"edu.sv":true,"gob.sv":true,"org.sv":true,"red.sv":true,"sx":true,"gov.sx":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"com.tm":true,"co.tm":true,"org.tm":true,"net.tm":true,"nom.tm":true,"gov.tm":true,"mil.tm":true,"edu.tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"tp":true,"tr":true,"com.tr":true,"info.tr":true,"biz.tr":true,"net.tr":true,"org.tr":true,"web.tr":true,"gen.tr":true,"tv.tr":true,"av.tr":true,"dr.tr":true,"bbs.tr":true,"name.tr":true,"tel.tr":true,"gov.tr":true,"bel.tr":true,"pol.tr":true,"mil.tr":true,"k12.tr":true,"edu.tr":true,"kep.tr":true,"nc.tr":true,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"tz":true,"ac.tz":true,"co.tz":true,"go.tz":true,"hotel.tz":true,"info.tz":true,"me.tz":true,"mil.tz":true,"mobi.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"tv.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"cherkasy.ua":true,"chernigov.ua":true,"chernihiv.ua":true,"chernivtsi.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"cr.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"dnipropetrovsk.ua":true,"dominic.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkiv.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"khmelnytskyi.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"krym.ua":true,"ks.ua":true,"kv.ua":true,"kyiv.ua":true,"lg.ua":true,"lt.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lv.ua":true,"lviv.ua":true,"mk.ua":true,"mykolaiv.ua":true,"nikolaev.ua":true,"od.ua":true,"odesa.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rivne.ua":true,"rovno.ua":true,"rv.ua":true,"sb.ua":true,"sebastopol.ua":true,"sevastopol.ua":true,"sm.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uz.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vinnytsia.ua":true,"vn.ua":true,"volyn.ua":true,"yalta.ua":true,"zaporizhzhe.ua":true,"zaporizhzhia.ua":true,"zhitomir.ua":true,"zhytomyr.ua":true,"zp.ua":true,"zt.ua":true,"ug":true,"co.ug":true,"or.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"com.ug":true,"org.ug":true,"uk":true,"ac.uk":true,"co.uk":true,"gov.uk":true,"ltd.uk":true,"me.uk":true,"net.uk":true,"nhs.uk":true,"org.uk":true,"plc.uk":true,"police.uk":true,"*.sch.uk":true,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"uy":true,"com.uy":true,"edu.uy":true,"gub.uy":true,"mil.uy":true,"net.uy":true,"org.uy":true,"uz":true,"co.uz":true,"com.uz":true,"net.uz":true,"org.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"ve":true,"arts.ve":true,"co.ve":true,"com.ve":true,"e12.ve":true,"edu.ve":true,"firm.ve":true,"gob.ve":true,"gov.ve":true,"info.ve":true,"int.ve":true,"mil.ve":true,"net.ve":true,"org.ve":true,"rec.ve":true,"store.ve":true,"tec.ve":true,"web.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"com.vu":true,"edu.vu":true,"net.vu":true,"org.vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--y9a3aq":true,"xn--54b7fta0cc":true,"xn--90ais":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--qxam":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbtx2b":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--80ao21a":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--d1alf":true,"xn--l1acc":true,"xn--mix891f":true,"xn--mix082f":true,"xn--mgbx4cd0ab":true,"xn--mgb9awbf":true,"xn--mgbai9azgqp6j":true,"xn--mgbai9a5eva00b":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--o1ac.xn--90a3ac":true,"xn--c1avg.xn--90a3ac":true,"xn--90azh.xn--90a3ac":true,"xn--d1at.xn--90a3ac":true,"xn--o1ach.xn--90a3ac":true,"xn--80au.xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--mgbpl2fh":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"ac.za":true,"agrica.za":true,"alt.za":true,"co.za":true,"edu.za":true,"gov.za":true,"grondar.za":true,"law.za":true,"mil.za":true,"net.za":true,"ngo.za":true,"nis.za":true,"nom.za":true,"org.za":true,"school.za":true,"tm.za":true,"web.za":true,"*.zm":true,"*.zw":true,"aaa":true,"aarp":true,"abarth":true,"abb":true,"abbott":true,"abbvie":true,"abc":true,"able":true,"abogado":true,"abudhabi":true,"academy":true,"accenture":true,"accountant":true,"accountants":true,"aco":true,"active":true,"actor":true,"adac":true,"ads":true,"adult":true,"aeg":true,"aetna":true,"afamilycompany":true,"afl":true,"africa":true,"africamagic":true,"agakhan":true,"agency":true,"aig":true,"aigo":true,"airbus":true,"airforce":true,"airtel":true,"akdn":true,"alfaromeo":true,"alibaba":true,"alipay":true,"allfinanz":true,"allstate":true,"ally":true,"alsace":true,"alstom":true,"americanexpress":true,"americanfamily":true,"amex":true,"amfam":true,"amica":true,"amsterdam":true,"analytics":true,"android":true,"anquan":true,"anz":true,"aol":true,"apartments":true,"app":true,"apple":true,"aquarelle":true,"aramco":true,"archi":true,"army":true,"arte":true,"asda":true,"associates":true,"athleta":true,"attorney":true,"auction":true,"audi":true,"audible":true,"audio":true,"auspost":true,"author":true,"auto":true,"autos":true,"avianca":true,"aws":true,"axa":true,"azure":true,"baby":true,"baidu":true,"banamex":true,"bananarepublic":true,"band":true,"bank":true,"bar":true,"barcelona":true,"barclaycard":true,"barclays":true,"barefoot":true,"bargains":true,"basketball":true,"bauhaus":true,"bayern":true,"bbc":true,"bbt":true,"bbva":true,"bcg":true,"bcn":true,"beats":true,"beer":true,"bentley":true,"berlin":true,"best":true,"bestbuy":true,"bet":true,"bharti":true,"bible":true,"bid":true,"bike":true,"bing":true,"bingo":true,"bio":true,"black":true,"blackfriday":true,"blanco":true,"blockbuster":true,"blog":true,"bloomberg":true,"blue":true,"bms":true,"bmw":true,"bnl":true,"bnpparibas":true,"boats":true,"boehringer":true,"bofa":true,"bom":true,"bond":true,"boo":true,"book":true,"booking":true,"boots":true,"bosch":true,"bostik":true,"bot":true,"boutique":true,"bradesco":true,"bridgestone":true,"broadway":true,"broker":true,"brother":true,"brussels":true,"budapest":true,"bugatti":true,"build":true,"builders":true,"business":true,"buy":true,"buzz":true,"bzh":true,"cab":true,"cafe":true,"cal":true,"call":true,"calvinklein":true,"camera":true,"camp":true,"cancerresearch":true,"canon":true,"capetown":true,"capital":true,"capitalone":true,"car":true,"caravan":true,"cards":true,"care":true,"career":true,"careers":true,"cars":true,"cartier":true,"casa":true,"case":true,"caseih":true,"cash":true,"casino":true,"catering":true,"cba":true,"cbn":true,"cbre":true,"cbs":true,"ceb":true,"center":true,"ceo":true,"cern":true,"cfa":true,"cfd":true,"chanel":true,"channel":true,"chase":true,"chat":true,"cheap":true,"chintai":true,"chloe":true,"christmas":true,"chrome":true,"chrysler":true,"church":true,"cipriani":true,"circle":true,"cisco":true,"citadel":true,"citi":true,"citic":true,"city":true,"cityeats":true,"claims":true,"cleaning":true,"click":true,"clinic":true,"clothing":true,"cloud":true,"club":true,"clubmed":true,"coach":true,"codes":true,"coffee":true,"college":true,"cologne":true,"comcast":true,"commbank":true,"community":true,"company":true,"computer":true,"comsec":true,"condos":true,"construction":true,"consulting":true,"contact":true,"contractors":true,"cooking":true,"cookingchannel":true,"cool":true,"corsica":true,"country":true,"coupon":true,"coupons":true,"courses":true,"credit":true,"creditcard":true,"creditunion":true,"cricket":true,"crown":true,"crs":true,"cruises":true,"csc":true,"cuisinella":true,"cymru":true,"cyou":true,"dabur":true,"dad":true,"dance":true,"date":true,"dating":true,"datsun":true,"day":true,"dclk":true,"dds":true,"deal":true,"dealer":true,"deals":true,"degree":true,"delivery":true,"dell":true,"deloitte":true,"delta":true,"democrat":true,"dental":true,"dentist":true,"desi":true,"design":true,"dev":true,"dhl":true,"diamonds":true,"diet":true,"digital":true,"direct":true,"directory":true,"discount":true,"discover":true,"dish":true,"dnp":true,"docs":true,"dodge":true,"dog":true,"doha":true,"domains":true,"doosan":true,"dot":true,"download":true,"drive":true,"dstv":true,"dtv":true,"dubai":true,"duck":true,"dunlop":true,"duns":true,"dupont":true,"durban":true,"dvag":true,"dwg":true,"earth":true,"eat":true,"edeka":true,"education":true,"email":true,"emerck":true,"emerson":true,"energy":true,"engineer":true,"engineering":true,"enterprises":true,"epost":true,"epson":true,"equipment":true,"ericsson":true,"erni":true,"esq":true,"estate":true,"esurance":true,"etisalat":true,"eurovision":true,"eus":true,"events":true,"everbank":true,"exchange":true,"expert":true,"exposed":true,"express":true,"extraspace":true,"fage":true,"fail":true,"fairwinds":true,"faith":true,"family":true,"fan":true,"fans":true,"farm":true,"farmers":true,"fashion":true,"fast":true,"fedex":true,"feedback":true,"ferrari":true,"ferrero":true,"fiat":true,"fidelity":true,"fido":true,"film":true,"final":true,"finance":true,"financial":true,"fire":true,"firestone":true,"firmdale":true,"fish":true,"fishing":true,"fit":true,"fitness":true,"flickr":true,"flights":true,"flir":true,"florist":true,"flowers":true,"flsmidth":true,"fly":true,"foo":true,"foodnetwork":true,"football":true,"ford":true,"forex":true,"forsale":true,"forum":true,"foundation":true,"fox":true,"fresenius":true,"frl":true,"frogans":true,"frontdoor":true,"frontier":true,"ftr":true,"fujitsu":true,"fujixerox":true,"fund":true,"furniture":true,"futbol":true,"fyi":true,"gal":true,"gallery":true,"gallo":true,"gallup":true,"game":true,"games":true,"gap":true,"garden":true,"gbiz":true,"gdn":true,"gea":true,"gent":true,"genting":true,"george":true,"ggee":true,"gift":true,"gifts":true,"gives":true,"giving":true,"glade":true,"glass":true,"gle":true,"global":true,"globo":true,"gmail":true,"gmo":true,"gmx":true,"godaddy":true,"gold":true,"goldpoint":true,"golf":true,"goo":true,"goodhands":true,"goodyear":true,"goog":true,"google":true,"gop":true,"got":true,"gotv":true,"grainger":true,"graphics":true,"gratis":true,"green":true,"gripe":true,"group":true,"guardian":true,"gucci":true,"guge":true,"guide":true,"guitars":true,"guru":true,"hamburg":true,"hangout":true,"haus":true,"hbo":true,"hdfc":true,"hdfcbank":true,"health":true,"healthcare":true,"help":true,"helsinki":true,"here":true,"hermes":true,"hgtv":true,"hiphop":true,"hisamitsu":true,"hitachi":true,"hiv":true,"hkt":true,"hockey":true,"holdings":true,"holiday":true,"homedepot":true,"homegoods":true,"homes":true,"homesense":true,"honda":true,"honeywell":true,"horse":true,"host":true,"hosting":true,"hot":true,"hoteles":true,"hotmail":true,"house":true,"how":true,"hsbc":true,"htc":true,"hughes":true,"hyatt":true,"hyundai":true,"ibm":true,"icbc":true,"ice":true,"icu":true,"ieee":true,"ifm":true,"iinet":true,"ikano":true,"imamat":true,"imdb":true,"immo":true,"immobilien":true,"industries":true,"infiniti":true,"ing":true,"ink":true,"institute":true,"insurance":true,"insure":true,"intel":true,"international":true,"intuit":true,"investments":true,"ipiranga":true,"irish":true,"iselect":true,"ismaili":true,"ist":true,"istanbul":true,"itau":true,"itv":true,"iveco":true,"iwc":true,"jaguar":true,"java":true,"jcb":true,"jcp":true,"jeep":true,"jetzt":true,"jewelry":true,"jio":true,"jlc":true,"jll":true,"jmp":true,"jnj":true,"joburg":true,"jot":true,"joy":true,"jpmorgan":true,"jprs":true,"juegos":true,"juniper":true,"kaufen":true,"kddi":true,"kerryhotels":true,"kerrylogistics":true,"kerryproperties":true,"kfh":true,"kia":true,"kim":true,"kinder":true,"kindle":true,"kitchen":true,"kiwi":true,"koeln":true,"komatsu":true,"kosher":true,"kpmg":true,"kpn":true,"krd":true,"kred":true,"kuokgroup":true,"kyknet":true,"kyoto":true,"lacaixa":true,"ladbrokes":true,"lamborghini":true,"lancaster":true,"lancia":true,"lancome":true,"land":true,"landrover":true,"lanxess":true,"lasalle":true,"lat":true,"latino":true,"latrobe":true,"law":true,"lawyer":true,"lds":true,"lease":true,"leclerc":true,"lefrak":true,"legal":true,"lego":true,"lexus":true,"lgbt":true,"liaison":true,"lidl":true,"life":true,"lifeinsurance":true,"lifestyle":true,"lighting":true,"like":true,"lilly":true,"limited":true,"limo":true,"lincoln":true,"linde":true,"link":true,"lipsy":true,"live":true,"living":true,"lixil":true,"loan":true,"loans":true,"locker":true,"locus":true,"loft":true,"lol":true,"london":true,"lotte":true,"lotto":true,"love":true,"lpl":true,"lplfinancial":true,"ltd":true,"ltda":true,"lundbeck":true,"lupin":true,"luxe":true,"luxury":true,"macys":true,"madrid":true,"maif":true,"maison":true,"makeup":true,"man":true,"management":true,"mango":true,"market":true,"marketing":true,"markets":true,"marriott":true,"marshalls":true,"maserati":true,"mattel":true,"mba":true,"mcd":true,"mcdonalds":true,"mckinsey":true,"med":true,"media":true,"meet":true,"melbourne":true,"meme":true,"memorial":true,"men":true,"menu":true,"meo":true,"metlife":true,"miami":true,"microsoft":true,"mini":true,"mint":true,"mit":true,"mitsubishi":true,"mlb":true,"mls":true,"mma":true,"mnet":true,"mobily":true,"moda":true,"moe":true,"moi":true,"mom":true,"monash":true,"money":true,"monster":true,"montblanc":true,"mopar":true,"mormon":true,"mortgage":true,"moscow":true,"moto":true,"motorcycles":true,"mov":true,"movie":true,"movistar":true,"msd":true,"mtn":true,"mtpc":true,"mtr":true,"multichoice":true,"mutual":true,"mutuelle":true,"mzansimagic":true,"nab":true,"nadex":true,"nagoya":true,"naspers":true,"nationwide":true,"natura":true,"navy":true,"nba":true,"nec":true,"netbank":true,"netflix":true,"network":true,"neustar":true,"new":true,"newholland":true,"news":true,"next":true,"nextdirect":true,"nexus":true,"nfl":true,"ngo":true,"nhk":true,"nico":true,"nike":true,"nikon":true,"ninja":true,"nissan":true,"nokia":true,"northwesternmutual":true,"norton":true,"now":true,"nowruz":true,"nowtv":true,"nra":true,"nrw":true,"ntt":true,"nyc":true,"obi":true,"observer":true,"off":true,"office":true,"okinawa":true,"olayan":true,"olayangroup":true,"oldnavy":true,"ollo":true,"omega":true,"one":true,"ong":true,"onl":true,"online":true,"onyourside":true,"ooo":true,"open":true,"oracle":true,"orange":true,"organic":true,"orientexpress":true,"osaka":true,"otsuka":true,"ott":true,"ovh":true,"page":true,"pamperedchef":true,"panasonic":true,"panerai":true,"paris":true,"pars":true,"partners":true,"parts":true,"party":true,"passagens":true,"pay":true,"payu":true,"pccw":true,"pet":true,"pfizer":true,"pharmacy":true,"philips":true,"photo":true,"photography":true,"photos":true,"physio":true,"piaget":true,"pics":true,"pictet":true,"pictures":true,"pid":true,"pin":true,"ping":true,"pink":true,"pioneer":true,"pizza":true,"place":true,"play":true,"playstation":true,"plumbing":true,"plus":true,"pnc":true,"pohl":true,"poker":true,"politie":true,"porn":true,"pramerica":true,"praxi":true,"press":true,"prime":true,"prod":true,"productions":true,"prof":true,"progressive":true,"promo":true,"properties":true,"property":true,"protection":true,"pru":true,"prudential":true,"pub":true,"qpon":true,"quebec":true,"quest":true,"qvc":true,"racing":true,"raid":true,"read":true,"realestate":true,"realtor":true,"realty":true,"recipes":true,"red":true,"redstone":true,"redumbrella":true,"rehab":true,"reise":true,"reisen":true,"reit":true,"reliance":true,"ren":true,"rent":true,"rentals":true,"repair":true,"report":true,"republican":true,"rest":true,"restaurant":true,"review":true,"reviews":true,"rexroth":true,"rich":true,"richardli":true,"ricoh":true,"rightathome":true,"ril":true,"rio":true,"rip":true,"rocher":true,"rocks":true,"rodeo":true,"rogers":true,"room":true,"rsvp":true,"ruhr":true,"run":true,"rwe":true,"ryukyu":true,"saarland":true,"safe":true,"safety":true,"sakura":true,"sale":true,"salon":true,"samsclub":true,"samsung":true,"sandvik":true,"sandvikcoromant":true,"sanofi":true,"sap":true,"sapo":true,"sarl":true,"sas":true,"save":true,"saxo":true,"sbi":true,"sbs":true,"sca":true,"scb":true,"schaeffler":true,"schmidt":true,"scholarships":true,"school":true,"schule":true,"schwarz":true,"science":true,"scjohnson":true,"scor":true,"scot":true,"seat":true,"secure":true,"security":true,"seek":true,"sener":true,"services":true,"ses":true,"seven":true,"sew":true,"sex":true,"sexy":true,"sfr":true,"shangrila":true,"sharp":true,"shaw":true,"shell":true,"shia":true,"shiksha":true,"shoes":true,"shouji":true,"show":true,"showtime":true,"shriram":true,"silk":true,"sina":true,"singles":true,"site":true,"ski":true,"skin":true,"sky":true,"skype":true,"sling":true,"smart":true,"smile":true,"sncf":true,"soccer":true,"social":true,"softbank":true,"software":true,"sohu":true,"solar":true,"solutions":true,"song":true,"sony":true,"soy":true,"space":true,"spiegel":true,"spot":true,"spreadbetting":true,"srl":true,"srt":true,"stada":true,"staples":true,"star":true,"starhub":true,"statebank":true,"statefarm":true,"statoil":true,"stc":true,"stcgroup":true,"stockholm":true,"storage":true,"store":true,"studio":true,"study":true,"style":true,"sucks":true,"supersport":true,"supplies":true,"supply":true,"support":true,"surf":true,"surgery":true,"suzuki":true,"swatch":true,"swiftcover":true,"swiss":true,"sydney":true,"symantec":true,"systems":true,"tab":true,"taipei":true,"talk":true,"taobao":true,"target":true,"tatamotors":true,"tatar":true,"tattoo":true,"tax":true,"taxi":true,"tci":true,"tdk":true,"team":true,"tech":true,"technology":true,"telecity":true,"telefonica":true,"temasek":true,"tennis":true,"teva":true,"thd":true,"theater":true,"theatre":true,"theguardian":true,"tiaa":true,"tickets":true,"tienda":true,"tiffany":true,"tips":true,"tires":true,"tirol":true,"tjmaxx":true,"tjx":true,"tkmaxx":true,"tmall":true,"today":true,"tokyo":true,"tools":true,"top":true,"toray":true,"toshiba":true,"total":true,"tours":true,"town":true,"toyota":true,"toys":true,"trade":true,"trading":true,"training":true,"travelchannel":true,"travelers":true,"travelersinsurance":true,"trust":true,"trv":true,"tube":true,"tui":true,"tunes":true,"tushu":true,"tvs":true,"ubank":true,"ubs":true,"uconnect":true,"university":true,"uno":true,"uol":true,"ups":true,"vacations":true,"vana":true,"vanguard":true,"vegas":true,"ventures":true,"verisign":true,"versicherung":true,"vet":true,"viajes":true,"video":true,"vig":true,"viking":true,"villas":true,"vin":true,"vip":true,"virgin":true,"visa":true,"vision":true,"vista":true,"vistaprint":true,"viva":true,"vivo":true,"vlaanderen":true,"vodka":true,"volkswagen":true,"vote":true,"voting":true,"voto":true,"voyage":true,"vuelos":true,"wales":true,"walmart":true,"walter":true,"wang":true,"wanggou":true,"warman":true,"watch":true,"watches":true,"weather":true,"weatherchannel":true,"webcam":true,"weber":true,"website":true,"wed":true,"wedding":true,"weibo":true,"weir":true,"whoswho":true,"wien":true,"wiki":true,"williamhill":true,"win":true,"windows":true,"wine":true,"winners":true,"wme":true,"wolterskluwer":true,"woodside":true,"work":true,"works":true,"world":true,"wtc":true,"wtf":true,"xbox":true,"xerox":true,"xfinity":true,"xihuan":true,"xin":true,"xn--11b4c3d":true,"xn--1ck2e1b":true,"xn--1qqw23a":true,"xn--30rr7y":true,"xn--3bst00m":true,"xn--3ds443g":true,"xn--3oq18vl8pn36a":true,"xn--3pxu8k":true,"xn--42c2d9a":true,"xn--45q11c":true,"xn--4gbrim":true,"xn--4gq48lf9j":true,"xn--55qw42g":true,"xn--55qx5d":true,"xn--5su34j936bgsg":true,"xn--5tzm5g":true,"xn--6frz82g":true,"xn--6qq986b3xl":true,"xn--80adxhks":true,"xn--80asehdb":true,"xn--80aswg":true,"xn--8y0a063a":true,"xn--9dbq2a":true,"xn--9et52u":true,"xn--9krt00a":true,"xn--b4w605ferd":true,"xn--bck1b9a5dre4c":true,"xn--c1avg":true,"xn--c2br7g":true,"xn--cck2b3b":true,"xn--cg4bki":true,"xn--czr694b":true,"xn--czrs0t":true,"xn--czru2d":true,"xn--d1acj3b":true,"xn--eckvdtc9d":true,"xn--efvy88h":true,"xn--estv75g":true,"xn--fct429k":true,"xn--fhbei":true,"xn--fiq228c5hs":true,"xn--fiq64b":true,"xn--fjq720a":true,"xn--flw351e":true,"xn--fzys8d69uvgm":true,"xn--g2xx48c":true,"xn--gckr3f0f":true,"xn--hxt814e":true,"xn--i1b6b1a6a2e":true,"xn--imr513n":true,"xn--io0a7i":true,"xn--j1aef":true,"xn--jlq61u9w7b":true,"xn--jvr189m":true,"xn--kcrx77d1x4a":true,"xn--kpu716f":true,"xn--kput3i":true,"xn--mgba3a3ejt":true,"xn--mgba7c0bbn0a":true,"xn--mgbaakc7dvf":true,"xn--mgbab2bd":true,"xn--mgbb9fbpob":true,"xn--mgbca7dzdo":true,"xn--mgbt3dhd":true,"xn--mk1bu44c":true,"xn--mxtq1m":true,"xn--ngbc5azd":true,"xn--ngbe9e0a":true,"xn--nqv7f":true,"xn--nqv7fs00ema":true,"xn--nyqy26a":true,"xn--p1acf":true,"xn--pbt977c":true,"xn--pssy2u":true,"xn--q9jyb4c":true,"xn--qcka1pmc":true,"xn--rhqv96g":true,"xn--rovu88b":true,"xn--ses554g":true,"xn--t60b56a":true,"xn--tckwe":true,"xn--unup4y":true,"xn--vermgensberater-ctb":true,"xn--vermgensberatung-pwb":true,"xn--vhquv":true,"xn--vuq861b":true,"xn--w4r85el8fhu5dnra":true,"xn--w4rs40l":true,"xn--xhq521b":true,"xn--zfr164b":true,"xperia":true,"xyz":true,"yachts":true,"yahoo":true,"yamaxun":true,"yandex":true,"yodobashi":true,"yoga":true,"yokohama":true,"you":true,"youtube":true,"yun":true,"zappos":true,"zara":true,"zero":true,"zip":true,"zippo":true,"zone":true,"zuerich":true,"cloudfront.net":true,"ap-northeast-1.compute.amazonaws.com":true,"ap-southeast-1.compute.amazonaws.com":true,"ap-southeast-2.compute.amazonaws.com":true,"cn-north-1.compute.amazonaws.cn":true,"compute.amazonaws.cn":true,"compute.amazonaws.com":true,"compute-1.amazonaws.com":true,"eu-west-1.compute.amazonaws.com":true,"eu-central-1.compute.amazonaws.com":true,"sa-east-1.compute.amazonaws.com":true,"us-east-1.amazonaws.com":true,"us-gov-west-1.compute.amazonaws.com":true,"us-west-1.compute.amazonaws.com":true,"us-west-2.compute.amazonaws.com":true,"z-1.compute-1.amazonaws.com":true,"z-2.compute-1.amazonaws.com":true,"elasticbeanstalk.com":true,"elb.amazonaws.com":true,"s3.amazonaws.com":true,"s3-ap-northeast-1.amazonaws.com":true,"s3-ap-southeast-1.amazonaws.com":true,"s3-ap-southeast-2.amazonaws.com":true,"s3-external-1.amazonaws.com":true,"s3-external-2.amazonaws.com":true,"s3-fips-us-gov-west-1.amazonaws.com":true,"s3-eu-central-1.amazonaws.com":true,"s3-eu-west-1.amazonaws.com":true,"s3-sa-east-1.amazonaws.com":true,"s3-us-gov-west-1.amazonaws.com":true,"s3-us-west-1.amazonaws.com":true,"s3-us-west-2.amazonaws.com":true,"s3.cn-north-1.amazonaws.com.cn":true,"s3.eu-central-1.amazonaws.com":true,"betainabox.com":true,"ae.org":true,"ar.com":true,"br.com":true,"cn.com":true,"com.de":true,"com.se":true,"de.com":true,"eu.com":true,"gb.com":true,"gb.net":true,"hu.com":true,"hu.net":true,"jp.net":true,"jpn.com":true,"kr.com":true,"mex.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"se.net":true,"uk.com":true,"uk.net":true,"us.com":true,"uy.com":true,"za.bz":true,"za.com":true,"africa.com":true,"gr.com":true,"in.net":true,"us.org":true,"co.com":true,"c.la":true,"cloudcontrolled.com":true,"cloudcontrolapp.com":true,"co.ca":true,"c.cdn77.org":true,"cdn77-ssl.net":true,"r.cdn77.net":true,"rsc.cdn77.org":true,"ssl.origin.cdn77-secure.org":true,"co.nl":true,"co.no":true,"*.platform.sh":true,"cupcake.is":true,"dreamhosters.com":true,"duckdns.org":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true,"eu.org":true,"al.eu.org":true,"asso.eu.org":true,"at.eu.org":true,"au.eu.org":true,"be.eu.org":true,"bg.eu.org":true,"ca.eu.org":true,"cd.eu.org":true,"ch.eu.org":true,"cn.eu.org":true,"cy.eu.org":true,"cz.eu.org":true,"de.eu.org":true,"dk.eu.org":true,"edu.eu.org":true,"ee.eu.org":true,"es.eu.org":true,"fi.eu.org":true,"fr.eu.org":true,"gr.eu.org":true,"hr.eu.org":true,"hu.eu.org":true,"ie.eu.org":true,"il.eu.org":true,"in.eu.org":true,"int.eu.org":true,"is.eu.org":true,"it.eu.org":true,"jp.eu.org":true,"kr.eu.org":true,"lt.eu.org":true,"lu.eu.org":true,"lv.eu.org":true,"mc.eu.org":true,"me.eu.org":true,"mk.eu.org":true,"mt.eu.org":true,"my.eu.org":true,"net.eu.org":true,"ng.eu.org":true,"nl.eu.org":true,"no.eu.org":true,"nz.eu.org":true,"paris.eu.org":true,"pl.eu.org":true,"pt.eu.org":true,"q-a.eu.org":true,"ro.eu.org":true,"ru.eu.org":true,"se.eu.org":true,"si.eu.org":true,"sk.eu.org":true,"tr.eu.org":true,"uk.eu.org":true,"us.eu.org":true,"a.ssl.fastly.net":true,"b.ssl.fastly.net":true,"global.ssl.fastly.net":true,"a.prod.fastly.net":true,"global.prod.fastly.net":true,"firebaseapp.com":true,"flynnhub.com":true,"service.gov.uk":true,"github.io":true,"githubusercontent.com":true,"ro.com":true,"appspot.com":true,"blogspot.ae":true,"blogspot.al":true,"blogspot.am":true,"blogspot.ba":true,"blogspot.be":true,"blogspot.bg":true,"blogspot.bj":true,"blogspot.ca":true,"blogspot.cf":true,"blogspot.ch":true,"blogspot.cl":true,"blogspot.co.at":true,"blogspot.co.id":true,"blogspot.co.il":true,"blogspot.co.ke":true,"blogspot.co.nz":true,"blogspot.co.uk":true,"blogspot.co.za":true,"blogspot.com":true,"blogspot.com.ar":true,"blogspot.com.au":true,"blogspot.com.br":true,"blogspot.com.by":true,"blogspot.com.co":true,"blogspot.com.cy":true,"blogspot.com.ee":true,"blogspot.com.eg":true,"blogspot.com.es":true,"blogspot.com.mt":true,"blogspot.com.ng":true,"blogspot.com.tr":true,"blogspot.com.uy":true,"blogspot.cv":true,"blogspot.cz":true,"blogspot.de":true,"blogspot.dk":true,"blogspot.fi":true,"blogspot.fr":true,"blogspot.gr":true,"blogspot.hk":true,"blogspot.hr":true,"blogspot.hu":true,"blogspot.ie":true,"blogspot.in":true,"blogspot.is":true,"blogspot.it":true,"blogspot.jp":true,"blogspot.kr":true,"blogspot.li":true,"blogspot.lt":true,"blogspot.lu":true,"blogspot.md":true,"blogspot.mk":true,"blogspot.mr":true,"blogspot.mx":true,"blogspot.my":true,"blogspot.nl":true,"blogspot.no":true,"blogspot.pe":true,"blogspot.pt":true,"blogspot.qa":true,"blogspot.re":true,"blogspot.ro":true,"blogspot.rs":true,"blogspot.ru":true,"blogspot.se":true,"blogspot.sg":true,"blogspot.si":true,"blogspot.sk":true,"blogspot.sn":true,"blogspot.td":true,"blogspot.tw":true,"blogspot.ug":true,"blogspot.vn":true,"codespot.com":true,"googleapis.com":true,"googlecode.com":true,"pagespeedmobilizer.com":true,"withgoogle.com":true,"withyoutube.com":true,"herokuapp.com":true,"herokussl.com":true,"iki.fi":true,"biz.at":true,"info.at":true,"co.pl":true,"azurewebsites.net":true,"azure-mobile.net":true,"cloudapp.net":true,"bmoattachments.org":true,"4u.com":true,"nfshost.com":true,"nyc.mn":true,"nid.io":true,"operaunite.com":true,"outsystemscloud.com":true,"art.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pantheon.io":true,"gotpantheon.com":true,"priv.at":true,"qa2.com":true,"rhcloud.com":true,"sandcats.io":true,"biz.ua":true,"co.ua":true,"pp.ua":true,"sinaapp.com":true,"vipsinaapp.com":true,"1kapp.com":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"hk.com":true,"hk.org":true,"ltd.hk":true,"inc.hk":true,"yolasite.com":true,"za.net":true,"za.org":true}); + +// END of automatically generated file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js new file mode 100644 index 00000000000..bce52925db1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js @@ -0,0 +1,71 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +'use strict'; +/*jshint unused:false */ + +function Store() { +} +exports.Store = Store; + +// Stores may be synchronous, but are still required to use a +// Continuation-Passing Style API. The CookieJar itself will expose a "*Sync" +// API that converts from synchronous-callbacks to imperative style. +Store.prototype.synchronous = false; + +Store.prototype.findCookie = function(domain, path, key, cb) { + throw new Error('findCookie is not implemented'); +}; + +Store.prototype.findCookies = function(domain, path, cb) { + throw new Error('findCookies is not implemented'); +}; + +Store.prototype.putCookie = function(cookie, cb) { + throw new Error('putCookie is not implemented'); +}; + +Store.prototype.updateCookie = function(oldCookie, newCookie, cb) { + // recommended default implementation: + // return this.putCookie(newCookie, cb); + throw new Error('updateCookie is not implemented'); +}; + +Store.prototype.removeCookie = function(domain, path, key, cb) { + throw new Error('removeCookie is not implemented'); +}; + +Store.prototype.removeCookies = function(domain, path, cb) { + throw new Error('removeCookies is not implemented'); +}; + +Store.prototype.getAllCookies = function(cb) { + throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)'); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json new file mode 100644 index 00000000000..4072a280761 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + "tough-cookie@~2.2.0", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "tough-cookie@>=2.2.0 <2.3.0", + "_id": "tough-cookie@2.2.2", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/tough-cookie", + "_nodeVersion": "5.1.1", + "_npmOperationalInternal": { + "host": "packages-13-west.internal.npmjs.com", + "tmp": "tmp/tough-cookie-2.2.2.tgz_1457564639182_0.5129188685677946" + }, + "_npmUser": { + "email": "jstash@gmail.com", + "name": "jstash" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "tough-cookie", + "raw": "tough-cookie@~2.2.0", + "rawSpec": "~2.2.0", + "scope": null, + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz", + "_shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7", + "_shrinkwrap": null, + "_spec": "tough-cookie@~2.2.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "author": { + "email": "jstashewsky@salesforce.com", + "name": "Jeremy Stashewsky" + }, + "bugs": { + "url": "https://github.com/SalesforceEng/tough-cookie/issues" + }, + "contributors": [ + { + "name": "Alexander Savin" + }, + { + "name": "Ian Livingstone" + }, + { + "name": "Ivan Nikulin" + }, + { + "name": "Lalit Kapoor" + }, + { + "name": "Sam Thompson" + }, + { + "name": "Sebastian Mayr" + } + ], + "dependencies": {}, + "description": "RFC6265 Cookies and Cookie Jar for node.js", + "devDependencies": { + "async": "^1.4.2", + "vows": "^0.8.1" + }, + "directories": {}, + "dist": { + "shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7", + "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "lib" + ], + "gitHead": "cc46628c4d7d2e8c372ecba29293ca8a207ec192", + "homepage": "https://github.com/SalesforceEng/tough-cookie", + "keywords": [ + "HTTP", + "RFC2965", + "RFC6265", + "cookie", + "cookiejar", + "cookies", + "jar", + "set-cookie" + ], + "license": "BSD-3-Clause", + "main": "./lib/cookie", + "maintainers": [ + { + "email": "jeremy@goinstant.com", + "name": "jstash" + }, + { + "email": "services@goinstant.com", + "name": "goinstant" + } + ], + "name": "tough-cookie", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/SalesforceEng/tough-cookie.git" + }, + "scripts": { + "suffixup": "curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js", + "test": "vows test/*_test.js" + }, + "version": "2.2.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE new file mode 100644 index 00000000000..a4a9aee0c2f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md new file mode 100644 index 00000000000..bb533d56b1a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md @@ -0,0 +1,4 @@ +tunnel-agent +============ + +HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js new file mode 100644 index 00000000000..68013ac1f4e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js @@ -0,0 +1,243 @@ +'use strict' + +var net = require('net') + , tls = require('tls') + , http = require('http') + , https = require('https') + , events = require('events') + , assert = require('assert') + , util = require('util') + ; + +exports.httpOverHttp = httpOverHttp +exports.httpsOverHttp = httpsOverHttp +exports.httpOverHttps = httpOverHttps +exports.httpsOverHttps = httpsOverHttps + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + return agent +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + agent.createSocket = createSecureSocket + agent.defaultPort = 443 + return agent +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + return agent +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + agent.createSocket = createSecureSocket + agent.defaultPort = 443 + return agent +} + + +function TunnelingAgent(options) { + var self = this + self.options = options || {} + self.proxyOptions = self.options.proxy || {} + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets + self.requests = [] + self.sockets = [] + + self.on('free', function onFree(socket, host, port) { + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i] + if (pending.host === host && pending.port === port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1) + pending.request.onSocket(socket) + return + } + } + socket.destroy() + self.removeSocket(socket) + }) +} +util.inherits(TunnelingAgent, events.EventEmitter) + +TunnelingAgent.prototype.addRequest = function addRequest(req, options) { + var self = this + + // Legacy API: addRequest(req, host, port, path) + if (typeof options === 'string') { + options = { + host: options, + port: arguments[2], + path: arguments[3] + }; + } + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push({host: options.host, port: options.port, request: req}) + return + } + + // If we are under maxSockets create a new one. + self.createConnection({host: options.host, port: options.port, request: req}) +} + +TunnelingAgent.prototype.createConnection = function createConnection(pending) { + var self = this + + self.createSocket(pending, function(socket) { + socket.on('free', onFree) + socket.on('close', onCloseOrRemove) + socket.on('agentRemove', onCloseOrRemove) + pending.request.onSocket(socket) + + function onFree() { + self.emit('free', socket, pending.host, pending.port) + } + + function onCloseOrRemove(err) { + self.removeSocket(socket) + socket.removeListener('free', onFree) + socket.removeListener('close', onCloseOrRemove) + socket.removeListener('agentRemove', onCloseOrRemove) + } + }) +} + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this + var placeholder = {} + self.sockets.push(placeholder) + + var connectOptions = mergeOptions({}, self.proxyOptions, + { method: 'CONNECT' + , path: options.host + ':' + options.port + , agent: false + } + ) + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {} + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64') + } + + debug('making CONNECT request') + var connectReq = self.request(connectOptions) + connectReq.useChunkedEncodingByDefault = false // for v0.6 + connectReq.once('response', onResponse) // for v0.6 + connectReq.once('upgrade', onUpgrade) // for v0.6 + connectReq.once('connect', onConnect) // for v0.7 or later + connectReq.once('error', onError) + connectReq.end() + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head) + }) + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners() + socket.removeAllListeners() + + if (res.statusCode === 200) { + assert.equal(head.length, 0) + debug('tunneling connection has established') + self.sockets[self.sockets.indexOf(placeholder)] = socket + cb(socket) + } else { + debug('tunneling socket could not be established, statusCode=%d', res.statusCode) + var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } + } + + function onError(cause) { + connectReq.removeAllListeners() + + debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) + var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } +} + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) return + + this.sockets.splice(pos, 1) + + var pending = this.requests.shift() + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createConnection(pending) + } +} + +function createSecureSocket(options, cb) { + var self = this + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, mergeOptions({}, self.options, + { servername: options.host + , socket: socket + } + )) + self.sockets[self.sockets.indexOf(socket)] = secureSocket + cb(secureSocket) + }) +} + + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i] + if (typeof overrides === 'object') { + var keys = Object.keys(overrides) + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j] + if (overrides[k] !== undefined) { + target[k] = overrides[k] + } + } + } + } + return target +} + + +var debug +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments) + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0] + } else { + args.unshift('TUNNEL:') + } + console.error.apply(console, args) + } +} else { + debug = function() {} +} +exports.debug = debug // for test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json new file mode 100644 index 00000000000..27e8f58f0c4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + "tunnel-agent@~0.4.1", + "/Users/eshanker/Code/fsevents/node_modules/request" + ] + ], + "_from": "tunnel-agent@>=0.4.1 <0.5.0", + "_id": "tunnel-agent@0.4.3", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/tunnel-agent", + "_nodeVersion": "5.9.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/tunnel-agent-0.4.3.tgz_1462396470295_0.23639482469297945" + }, + "_npmUser": { + "email": "simeonvelichkov@gmail.com", + "name": "simov" + }, + "_npmVersion": "2.15.3", + "_phantomChildren": {}, + "_requested": { + "name": "tunnel-agent", + "raw": "tunnel-agent@~0.4.1", + "rawSpec": "~0.4.1", + "scope": null, + "spec": ">=0.4.1 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/request" + ], + "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "_shasum": "6373db76909fe570e08d73583365ed828a74eeeb", + "_shrinkwrap": null, + "_spec": "tunnel-agent@~0.4.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/request", + "author": { + "email": "mikeal.rogers@gmail.com", + "name": "Mikeal Rogers", + "url": "http://www.futurealoof.com" + }, + "bugs": { + "url": "https://github.com/mikeal/tunnel-agent/issues" + }, + "dependencies": {}, + "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "6373db76909fe570e08d73583365ed828a74eeeb", + "tarball": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "index.js" + ], + "gitHead": "e72d830f5ed388a2a71d37ce062c38e3fb34bdde", + "homepage": "https://github.com/mikeal/tunnel-agent#readme", + "license": "Apache-2.0", + "main": "index.js", + "maintainers": [ + { + "email": "mikeal.rogers@gmail.com", + "name": "mikeal" + }, + { + "email": "jnylen@gmail.com", + "name": "nylen" + }, + { + "email": "fkschott@gmail.com", + "name": "fredkschott" + }, + { + "email": "simeonvelichkov@gmail.com", + "name": "simov" + } + ], + "name": "tunnel-agent", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "url": "git+https://github.com/mikeal/tunnel-agent.git" + }, + "scripts": {}, + "version": "0.4.3" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore new file mode 100644 index 00000000000..7d98dcbd2d3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore @@ -0,0 +1,4 @@ +.eslintrc +.travis.yml +bower.json +test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md new file mode 100644 index 00000000000..77c69bd5ee4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md @@ -0,0 +1,128 @@ +TweetNaCl.js Changelog +====================== + + +v0.13.2 +------- + +* Fixed undefined variable bug in fast version of Poly1305. No worries, this + bug was *never* triggered. + +* Specified CC0 public domain dedication. + +* Updated development dependencies. + + +v0.13.1 +------- + +* Exclude `crypto` and `buffer` modules from browserify builds. + + +v0.13.0 +------- + +* Made `nacl-fast` the default version in NPM package. Now + `require("tweetnacl")` will use fast version; to get the original version, + use `require("tweetnacl/nacl.js")`. + +* Cleanup temporary array after generating random bytes. + + +v0.12.2 +------- + +* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`, + `nacl.sign` and related functions up to 3x faster in `nacl-fast` version. + + +v0.12.1 +------- + +* Significantly improved performance of Salsa20 (~1.5x faster) and + Poly1305 (~3.5x faster) in `nacl-fast` version. + + +v0.12.0 +------- + +* Instead of using the given secret key directly, TweetNaCl.js now copies it to + a new array in `nacl.box.keyPair.fromSecretKey` and + `nacl.sign.keyPair.fromSecretKey`. + + +v0.11.2 +------- + +* Added new constant: `nacl.sign.seedLength`. + + +v0.11.1 +------- + +* Even faster hash for both short and long inputs (in `nacl-fast`). + + +v0.11.0 +------- + +* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs + deterministically from a 32-byte seed. (It behaves like + [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html) + `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.) + +* Fast version now has an improved hash implementation that is 2x-5x faster. + +* Fixed benchmarks, which may have produced incorrect measurements. + + +v0.10.1 +------- + +* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`. + + +v0.10.0 +------- + +* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal + with signed messages, and new `nacl.sign.detached` and + `nacl.sign.detached.verify` are available. + + Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a + message and "detached" signature. This was unlike NaCl's API, which dealt with + signed messages (concatenation of signature and message). + + The new API is: + + nacl.sign(message, secretKey) -> signedMessage + nacl.sign.open(signedMessage, publicKey) -> message | null + + Since detached signatures are common, two new API functions were introduced: + + nacl.sign.detached(message, secretKey) -> signature + nacl.sign.detached.verify(message, signature, publicKey) -> true | false + + (Note that it's `verify`, not `open`, and it returns a boolean value, unlike + `open`, which returns an "unsigned" message.) + +* NPM package now comes without `test` directory to keep it small. + + +v0.9.2 +------ + +* Improved documentation. +* Fast version: increased theoretical message size limit from 2^32-1 to 2^52 + bytes in Poly1305 (and thus, secretbox and box). However this has no impact + in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit + indexes, and most implementations won't allocate more than a gigabyte or so. + (Obviously, there are no tests for the correctness of implementation.) Also, + it's not recommended to use messages that large without splitting them into + smaller packets anyway. + + +v0.9.1 +------ + +* Initial release diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md new file mode 100644 index 00000000000..11bd3472c25 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md @@ -0,0 +1,463 @@ +TweetNaCl.js +============ + +Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/) +to JavaScript for modern browsers and Node.js. Public domain. + +[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) +](https://travis-ci.org/dchest/tweetnacl-js) + +[Demo](https://dchest.github.io/tweetnacl-js/) + +**:warning: Beta version. The library is stable and API is frozen, however +it has not been independently reviewed. If you can help reviewing it, please +[contact me](mailto:dmitry@codingrobots.com).** + +Documentation +============= + +* [Overview](#overview) +* [Installation](#installation) +* [Usage](#usage) + * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box) + * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox) + * [Scalar multiplication](#scalar-multiplication) + * [Signatures](#signatures) + * [Hashing](#hashing) + * [Random bytes generation](#random-bytes-generation) + * [Constant-time comparison](#constant-time-comparison) + * [Utilities](#utilities) +* [Examples](#examples) +* [System requirements](#system-requirements) +* [Development and testing](#development-and-testing) +* [Contributors](#contributors) +* [Who uses it](#who-uses-it) + + +Overview +-------- + +The primary goal of this project is to produce a translation of TweetNaCl to +JavaScript which is as close as possible to the original C implementation, plus +a thin layer of idiomatic high-level API on top of it. + +There are two versions, you can use either of them: + +* `nacl.js` is the port of TweetNaCl with minimum differences from the + original + high-level API. + +* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with + faster versions. + + +Installation +------------ + +You can install TweetNaCl.js via a package manager: + +[Bower](http://bower.io): + + $ bower install tweetnacl + +[NPM](https://www.npmjs.org/): + + $ npm install tweetnacl + +or [download source code](https://github.com/dchest/tweetnacl-js/releases). + + +Usage +------ + +All API functions accept and return bytes as `Uint8Array`s. If you need to +encode or decode strings, use functions from `nacl.util` namespace. + +### Public-key authenticated encryption (box) + +Implements *curve25519-xsalsa20-poly1305*. + +#### nacl.box.keyPair() + +Generates a new random key pair for box and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 32-byte secret key + } + + +#### nacl.box.keyPair.fromSecretKey(secretKey) + +Returns a key pair for box with public key corresponding to the given secret +key. + +#### nacl.box(message, nonce, theirPublicKey, mySecretKey) + +Encrypt and authenticates message using peer's public key, our secret key, and +the given nonce, which must be unique for each distinct message for a key pair. + +Returns an encrypted and authenticated message, which is +`nacl.box.overheadLength` longer than the original message. + +#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey) + +Authenticates and decrypts the given box with peer's public key, our secret +key, and the given nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.box.before(theirPublicKey, mySecretKey) + +Returns a precomputed shared key which can be used in `nacl.box.after` and +`nacl.box.open.after`. + +#### nacl.box.after(message, nonce, sharedKey) + +Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.open.after(box, nonce, sharedKey) + +Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.publicKeyLength = 32 + +Length of public key in bytes. + +#### nacl.box.secretKeyLength = 32 + +Length of secret key in bytes. + +#### nacl.box.sharedKeyLength = 32 + +Length of precomputed shared key in bytes. + +#### nacl.box.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.box.overheadLength = 16 + +Length of overhead added to box compared to original message. + + +### Secret-key authenticated encryption (secretbox) + +Implements *xsalsa20-poly1305*. + +#### nacl.secretbox(message, nonce, key) + +Encrypt and authenticates message using the key and the nonce. The nonce must +be unique for each distinct message for this key. + +Returns an encrypted and authenticated message, which is +`nacl.secretbox.overheadLength` longer than the original message. + +#### nacl.secretbox.open(box, nonce, key) + +Authenticates and decrypts the given secret box using the key and the nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.secretbox.keyLength = 32 + +Length of key in bytes. + +#### nacl.secretbox.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.secretbox.overheadLength = 16 + +Length of overhead added to secret box compared to original message. + + +### Scalar multiplication + +Implements *curve25519*. + +#### nacl.scalarMult(n, p) + +Multiplies an integer `n` by a group element `p` and returns the resulting +group element. + +#### nacl.scalarMult.base(n) + +Multiplies an integer `n` by a standard group element and returns the resulting +group element. + +#### nacl.scalarMult.scalarLength = 32 + +Length of scalar in bytes. + +#### nacl.scalarMult.groupElementLength = 32 + +Length of group element in bytes. + + +### Signatures + +Implements [ed25519](http://ed25519.cr.yp.to). + +#### nacl.sign.keyPair() + +Generates new random key pair for signing and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 64-byte secret key + } + +#### nacl.sign.keyPair.fromSecretKey(secretKey) + +Returns a signing key pair with public key corresponding to the given +64-byte secret key. The secret key must have been generated by +`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`. + +#### nacl.sign.keyPair.fromSeed(seed) + +Returns a new signing key pair generated deterministically from a 32-byte seed. +The seed must contain enough entropy to be secure. This method is not +recommended for general use: instead, use `nacl.sign.keyPair` to generate a new +key pair from a random seed. + +#### nacl.sign(message, secretKey) + +Signs the message using the secret key and returns a signed message. + +#### nacl.sign.open(signedMessage, publicKey) + +Verifies the signed message and returns the message without signature. + +Returns `null` if verification failed. + +#### nacl.sign.detached(message, secretKey) + +Signs the message using the secret key and returns a signature. + +#### nacl.sign.detached.verify(message, signature, publicKey) + +Verifies the signature for the message and returns `true` if verification +succeeded or `false` if it failed. + +#### nacl.sign.publicKeyLength = 32 + +Length of signing public key in bytes. + +#### nacl.sign.secretKeyLength = 64 + +Length of signing secret key in bytes. + +#### nacl.sign.seedLength = 32 + +Length of seed for `nacl.sign.keyPair.fromSeed` in bytes. + +#### nacl.sign.signatureLength = 64 + +Length of signature in bytes. + + +### Hashing + +Implements *SHA-512*. + +#### nacl.hash(message) + +Returns SHA-512 hash of the message. + +#### nacl.hash.hashLength = 64 + +Length of hash in bytes. + + +### Random bytes generation + +#### nacl.randomBytes(length) + +Returns a `Uint8Array` of the given length containing random bytes of +cryptographic quality. + +**Implementation note** + +TweetNaCl.js uses the following methods to generate random bytes, +depending on the platform it runs on: + +* `window.crypto.getRandomValues` (WebCrypto standard) +* `window.msCrypto.getRandomValues` (Internet Explorer 11) +* `crypto.randomBytes` (Node.js) + +Note that browsers are required to throw `QuotaExceededError` exception if +requested `length` is more than 65536, so do not ask for more than 65536 bytes +in *one call* (multiple calls to get as many bytes as you like are okay: +browsers can generate infinite amount of random bytes without any bad +consequences). + +If the platform doesn't provide a suitable PRNG, the following functions, +which require random numbers, will throw exception: + +* `nacl.randomBytes` +* `nacl.box.keyPair` +* `nacl.sign.keyPair` + +Other functions are deterministic and will continue working. + +If a platform you are targeting doesn't implement secure random number +generator, but you somehow have a cryptographically-strong source of entropy +(not `Math.random`!), and you know what you are doing, you can plug it into +TweetNaCl.js like this: + + nacl.setPRNG(function(x, n) { + // ... copy n random bytes into x ... + }); + +Note that `nacl.setPRNG` *completely replaces* internal random byte generator +with the one provided. + + +### Constant-time comparison + +#### nacl.verify(x, y) + +Compares `x` and `y` in constant time and returns `true` if their lengths are +non-zero and equal, and their contents are equal. + +Returns `false` if either of the arguments has zero length, or arguments have +different lengths, or their contents differ. + + +### Utilities + +Encoding/decoding functions are provided for convenience. They are correct, +however their performance and wide compatibility with uncommon runtimes is not +something that is considered important compared to the simplicity and size of +implementation. You can use third-party libraries if you need to. + +#### nacl.util.decodeUTF8(string) + +Decodes string and returns `Uint8Array` of bytes. + +#### nacl.util.encodeUTF8(array) + +Encodes `Uint8Array` or `Array` of bytes into string. + +#### nacl.util.decodeBase64(string) + +Decodes Base-64 encoded string and returns `Uint8Array` of bytes. + +#### nacl.util.encodeBase64(array) + +Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding. + + +System requirements +------------------- + +TweetNaCl.js supports modern browsers that have a cryptographically secure +pseudorandom number generator and typed arrays, including the latest versions +of: + +* Chrome +* Firefox +* Safari (Mac, iOS) +* Internet Explorer 11 + +Other systems: + +* Node.js (we test on 0.10 and later) + + +Development and testing +------------------------ + +Install NPM modules needed for development: + + $ npm install + +To build minified versions: + + $ npm run build + +Tests use minified version, so make sure to rebuild it every time you change +`nacl.js` or `nacl-fast.js`. + +### Testing + +To run tests in Node.js: + + $ npm test + +By default all tests described here work on `nacl.min.js`. To test other +versions, set environment variable `NACL_SRC` to the file name you want to test. +For example, the following command will test fast minified version: + + $ NACL_SRC=nacl-fast.min.js npm test + +To run full suite of tests in Node.js, including comparing outputs of +JavaScript port to outputs of the original C version: + + $ npm run testall + +To prepare tests for browsers: + + $ npm run browser + +and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to +run them. + +To run headless browser tests with `testling`: + + $ npm run testling + +(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) + +### Benchmarking + +To run benchmarks in Node.js: + + $ npm run bench + $ NACL_SRC=nacl-fast.min.js npm run bench + +To run benchmarks in a browser, open `test/benchmark/bench.html` (or +`test/benchmark/bench-fast.html`). + + +Contributors +------------ + +JavaScript port: + + * [Dmitry Chestnykh](http://github.com/dchest) (ported xsalsa20, poly1305, curve25519) + * [Devi Mandiri](https://github.com/devi) (ported curve25519, ed25519, sha512) + +Original authors of [NaCl](http://nacl.cr.yp.to), [TweetNaCl](http://tweetnacl.cr.yp.to) +and [Poly1305-donna](https://github.com/floodyberry/poly1305-donna) +(who are *not* responsible for any errors in this implementation): + + * [Daniel J. Bernstein](http://cr.yp.to/djb.html) + * Wesley Janssen + * [Tanja Lange](http://hyperelliptic.org/tanja) + * [Peter Schwabe](http://www.cryptojedi.org/users/peter/) + * [Matthew Dempsky](https://github.com/mdempsky) + * [Andrew Moon](https://github.com/floodyberry) + +Contributors have dedicated their work to the public domain. + +This software is distributed without any warranty. + + +Third-party libraries based on TweetNaCl.js +------------------------------------------- + +* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation +* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption +* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html) + + +Who uses it +----------- + +Some notable users of TweetNaCl.js: + +* [miniLock](http://minilock.io/) +* [Stellar](https://www.stellar.org/) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js new file mode 100644 index 00000000000..6c4995848cc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js @@ -0,0 +1,2418 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function ts64(x, i, h, l) { + x[i] = (h >> 24) & 0xff; + x[i+1] = (h >> 16) & 0xff; + x[i+2] = (h >> 8) & 0xff; + x[i+3] = h & 0xff; + x[i+4] = (l >> 24) & 0xff; + x[i+5] = (l >> 16) & 0xff; + x[i+6] = (l >> 8) & 0xff; + x[i+7] = l & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core_salsa20(o, p, k, c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + x0 = x0 + j0 | 0; + x1 = x1 + j1 | 0; + x2 = x2 + j2 | 0; + x3 = x3 + j3 | 0; + x4 = x4 + j4 | 0; + x5 = x5 + j5 | 0; + x6 = x6 + j6 | 0; + x7 = x7 + j7 | 0; + x8 = x8 + j8 | 0; + x9 = x9 + j9 | 0; + x10 = x10 + j10 | 0; + x11 = x11 + j11 | 0; + x12 = x12 + j12 | 0; + x13 = x13 + j13 | 0; + x14 = x14 + j14 | 0; + x15 = x15 + j15 | 0; + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x1 >>> 0 & 0xff; + o[ 5] = x1 >>> 8 & 0xff; + o[ 6] = x1 >>> 16 & 0xff; + o[ 7] = x1 >>> 24 & 0xff; + + o[ 8] = x2 >>> 0 & 0xff; + o[ 9] = x2 >>> 8 & 0xff; + o[10] = x2 >>> 16 & 0xff; + o[11] = x2 >>> 24 & 0xff; + + o[12] = x3 >>> 0 & 0xff; + o[13] = x3 >>> 8 & 0xff; + o[14] = x3 >>> 16 & 0xff; + o[15] = x3 >>> 24 & 0xff; + + o[16] = x4 >>> 0 & 0xff; + o[17] = x4 >>> 8 & 0xff; + o[18] = x4 >>> 16 & 0xff; + o[19] = x4 >>> 24 & 0xff; + + o[20] = x5 >>> 0 & 0xff; + o[21] = x5 >>> 8 & 0xff; + o[22] = x5 >>> 16 & 0xff; + o[23] = x5 >>> 24 & 0xff; + + o[24] = x6 >>> 0 & 0xff; + o[25] = x6 >>> 8 & 0xff; + o[26] = x6 >>> 16 & 0xff; + o[27] = x6 >>> 24 & 0xff; + + o[28] = x7 >>> 0 & 0xff; + o[29] = x7 >>> 8 & 0xff; + o[30] = x7 >>> 16 & 0xff; + o[31] = x7 >>> 24 & 0xff; + + o[32] = x8 >>> 0 & 0xff; + o[33] = x8 >>> 8 & 0xff; + o[34] = x8 >>> 16 & 0xff; + o[35] = x8 >>> 24 & 0xff; + + o[36] = x9 >>> 0 & 0xff; + o[37] = x9 >>> 8 & 0xff; + o[38] = x9 >>> 16 & 0xff; + o[39] = x9 >>> 24 & 0xff; + + o[40] = x10 >>> 0 & 0xff; + o[41] = x10 >>> 8 & 0xff; + o[42] = x10 >>> 16 & 0xff; + o[43] = x10 >>> 24 & 0xff; + + o[44] = x11 >>> 0 & 0xff; + o[45] = x11 >>> 8 & 0xff; + o[46] = x11 >>> 16 & 0xff; + o[47] = x11 >>> 24 & 0xff; + + o[48] = x12 >>> 0 & 0xff; + o[49] = x12 >>> 8 & 0xff; + o[50] = x12 >>> 16 & 0xff; + o[51] = x12 >>> 24 & 0xff; + + o[52] = x13 >>> 0 & 0xff; + o[53] = x13 >>> 8 & 0xff; + o[54] = x13 >>> 16 & 0xff; + o[55] = x13 >>> 24 & 0xff; + + o[56] = x14 >>> 0 & 0xff; + o[57] = x14 >>> 8 & 0xff; + o[58] = x14 >>> 16 & 0xff; + o[59] = x14 >>> 24 & 0xff; + + o[60] = x15 >>> 0 & 0xff; + o[61] = x15 >>> 8 & 0xff; + o[62] = x15 >>> 16 & 0xff; + o[63] = x15 >>> 24 & 0xff; +} + +function core_hsalsa20(o,p,k,c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x5 >>> 0 & 0xff; + o[ 5] = x5 >>> 8 & 0xff; + o[ 6] = x5 >>> 16 & 0xff; + o[ 7] = x5 >>> 24 & 0xff; + + o[ 8] = x10 >>> 0 & 0xff; + o[ 9] = x10 >>> 8 & 0xff; + o[10] = x10 >>> 16 & 0xff; + o[11] = x10 >>> 24 & 0xff; + + o[12] = x15 >>> 0 & 0xff; + o[13] = x15 >>> 8 & 0xff; + o[14] = x15 >>> 16 & 0xff; + o[15] = x15 >>> 24 & 0xff; + + o[16] = x6 >>> 0 & 0xff; + o[17] = x6 >>> 8 & 0xff; + o[18] = x6 >>> 16 & 0xff; + o[19] = x6 >>> 24 & 0xff; + + o[20] = x7 >>> 0 & 0xff; + o[21] = x7 >>> 8 & 0xff; + o[22] = x7 >>> 16 & 0xff; + o[23] = x7 >>> 24 & 0xff; + + o[24] = x8 >>> 0 & 0xff; + o[25] = x8 >>> 8 & 0xff; + o[26] = x8 >>> 16 & 0xff; + o[27] = x8 >>> 24 & 0xff; + + o[28] = x9 >>> 0 & 0xff; + o[29] = x9 >>> 8 & 0xff; + o[30] = x9 >>> 16 & 0xff; + o[31] = x9 >>> 24 & 0xff; +} + +function crypto_core_salsa20(out,inp,k,c) { + core_salsa20(out,inp,k,c); +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core_hsalsa20(out,inp,k,c); +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = x[i]; + } + return 0; +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20(c,cpos,d,sn,s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); +} + +/* +* Port of Andrew Moon's Poly1305-donna-16. Public domain. +* https://github.com/floodyberry/poly1305-donna +*/ + +var poly1305 = function(key) { + this.buffer = new Uint8Array(16); + this.r = new Uint16Array(10); + this.h = new Uint16Array(10); + this.pad = new Uint16Array(8); + this.leftover = 0; + this.fin = 0; + + var t0, t1, t2, t3, t4, t5, t6, t7; + + t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; + t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; + t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; + this.r[5] = ((t4 >>> 1)) & 0x1ffe; + t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; + t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + this.r[9] = ((t7 >>> 5)) & 0x007f; + + this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; + this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; + this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; + this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; + this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; + this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; + this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; + this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; +}; + +poly1305.prototype.blocks = function(m, mpos, bytes) { + var hibit = this.fin ? 0 : (1 << 11); + var t0, t1, t2, t3, t4, t5, t6, t7, c; + var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; + + var h0 = this.h[0], + h1 = this.h[1], + h2 = this.h[2], + h3 = this.h[3], + h4 = this.h[4], + h5 = this.h[5], + h6 = this.h[6], + h7 = this.h[7], + h8 = this.h[8], + h9 = this.h[9]; + + var r0 = this.r[0], + r1 = this.r[1], + r2 = this.r[2], + r3 = this.r[3], + r4 = this.r[4], + r5 = this.r[5], + r6 = this.r[6], + r7 = this.r[7], + r8 = this.r[8], + r9 = this.r[9]; + + while (bytes >= 16) { + t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; + t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; + t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; + h5 += ((t4 >>> 1)) & 0x1fff; + t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; + t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + h9 += ((t7 >>> 5)) | hibit; + + c = 0; + + d0 = c; + d0 += h0 * r0; + d0 += h1 * (5 * r9); + d0 += h2 * (5 * r8); + d0 += h3 * (5 * r7); + d0 += h4 * (5 * r6); + c = (d0 >>> 13); d0 &= 0x1fff; + d0 += h5 * (5 * r5); + d0 += h6 * (5 * r4); + d0 += h7 * (5 * r3); + d0 += h8 * (5 * r2); + d0 += h9 * (5 * r1); + c += (d0 >>> 13); d0 &= 0x1fff; + + d1 = c; + d1 += h0 * r1; + d1 += h1 * r0; + d1 += h2 * (5 * r9); + d1 += h3 * (5 * r8); + d1 += h4 * (5 * r7); + c = (d1 >>> 13); d1 &= 0x1fff; + d1 += h5 * (5 * r6); + d1 += h6 * (5 * r5); + d1 += h7 * (5 * r4); + d1 += h8 * (5 * r3); + d1 += h9 * (5 * r2); + c += (d1 >>> 13); d1 &= 0x1fff; + + d2 = c; + d2 += h0 * r2; + d2 += h1 * r1; + d2 += h2 * r0; + d2 += h3 * (5 * r9); + d2 += h4 * (5 * r8); + c = (d2 >>> 13); d2 &= 0x1fff; + d2 += h5 * (5 * r7); + d2 += h6 * (5 * r6); + d2 += h7 * (5 * r5); + d2 += h8 * (5 * r4); + d2 += h9 * (5 * r3); + c += (d2 >>> 13); d2 &= 0x1fff; + + d3 = c; + d3 += h0 * r3; + d3 += h1 * r2; + d3 += h2 * r1; + d3 += h3 * r0; + d3 += h4 * (5 * r9); + c = (d3 >>> 13); d3 &= 0x1fff; + d3 += h5 * (5 * r8); + d3 += h6 * (5 * r7); + d3 += h7 * (5 * r6); + d3 += h8 * (5 * r5); + d3 += h9 * (5 * r4); + c += (d3 >>> 13); d3 &= 0x1fff; + + d4 = c; + d4 += h0 * r4; + d4 += h1 * r3; + d4 += h2 * r2; + d4 += h3 * r1; + d4 += h4 * r0; + c = (d4 >>> 13); d4 &= 0x1fff; + d4 += h5 * (5 * r9); + d4 += h6 * (5 * r8); + d4 += h7 * (5 * r7); + d4 += h8 * (5 * r6); + d4 += h9 * (5 * r5); + c += (d4 >>> 13); d4 &= 0x1fff; + + d5 = c; + d5 += h0 * r5; + d5 += h1 * r4; + d5 += h2 * r3; + d5 += h3 * r2; + d5 += h4 * r1; + c = (d5 >>> 13); d5 &= 0x1fff; + d5 += h5 * r0; + d5 += h6 * (5 * r9); + d5 += h7 * (5 * r8); + d5 += h8 * (5 * r7); + d5 += h9 * (5 * r6); + c += (d5 >>> 13); d5 &= 0x1fff; + + d6 = c; + d6 += h0 * r6; + d6 += h1 * r5; + d6 += h2 * r4; + d6 += h3 * r3; + d6 += h4 * r2; + c = (d6 >>> 13); d6 &= 0x1fff; + d6 += h5 * r1; + d6 += h6 * r0; + d6 += h7 * (5 * r9); + d6 += h8 * (5 * r8); + d6 += h9 * (5 * r7); + c += (d6 >>> 13); d6 &= 0x1fff; + + d7 = c; + d7 += h0 * r7; + d7 += h1 * r6; + d7 += h2 * r5; + d7 += h3 * r4; + d7 += h4 * r3; + c = (d7 >>> 13); d7 &= 0x1fff; + d7 += h5 * r2; + d7 += h6 * r1; + d7 += h7 * r0; + d7 += h8 * (5 * r9); + d7 += h9 * (5 * r8); + c += (d7 >>> 13); d7 &= 0x1fff; + + d8 = c; + d8 += h0 * r8; + d8 += h1 * r7; + d8 += h2 * r6; + d8 += h3 * r5; + d8 += h4 * r4; + c = (d8 >>> 13); d8 &= 0x1fff; + d8 += h5 * r3; + d8 += h6 * r2; + d8 += h7 * r1; + d8 += h8 * r0; + d8 += h9 * (5 * r9); + c += (d8 >>> 13); d8 &= 0x1fff; + + d9 = c; + d9 += h0 * r9; + d9 += h1 * r8; + d9 += h2 * r7; + d9 += h3 * r6; + d9 += h4 * r5; + c = (d9 >>> 13); d9 &= 0x1fff; + d9 += h5 * r4; + d9 += h6 * r3; + d9 += h7 * r2; + d9 += h8 * r1; + d9 += h9 * r0; + c += (d9 >>> 13); d9 &= 0x1fff; + + c = (((c << 2) + c)) | 0; + c = (c + d0) | 0; + d0 = c & 0x1fff; + c = (c >>> 13); + d1 += c; + + h0 = d0; + h1 = d1; + h2 = d2; + h3 = d3; + h4 = d4; + h5 = d5; + h6 = d6; + h7 = d7; + h8 = d8; + h9 = d9; + + mpos += 16; + bytes -= 16; + } + this.h[0] = h0; + this.h[1] = h1; + this.h[2] = h2; + this.h[3] = h3; + this.h[4] = h4; + this.h[5] = h5; + this.h[6] = h6; + this.h[7] = h7; + this.h[8] = h8; + this.h[9] = h9; +}; + +poly1305.prototype.finish = function(mac, macpos) { + var g = new Uint16Array(10); + var c, mask, f, i; + + if (this.leftover) { + i = this.leftover; + this.buffer[i++] = 1; + for (; i < 16; i++) this.buffer[i] = 0; + this.fin = 1; + this.blocks(this.buffer, 0, 16); + } + + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + for (i = 2; i < 10; i++) { + this.h[i] += c; + c = this.h[i] >>> 13; + this.h[i] &= 0x1fff; + } + this.h[0] += (c * 5); + c = this.h[0] >>> 13; + this.h[0] &= 0x1fff; + this.h[1] += c; + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + this.h[2] += c; + + g[0] = this.h[0] + 5; + c = g[0] >>> 13; + g[0] &= 0x1fff; + for (i = 1; i < 10; i++) { + g[i] = this.h[i] + c; + c = g[i] >>> 13; + g[i] &= 0x1fff; + } + g[9] -= (1 << 13); + + mask = (g[9] >>> ((2 * 8) - 1)) - 1; + for (i = 0; i < 10; i++) g[i] &= mask; + mask = ~mask; + for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; + + this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; + this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; + this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; + this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; + this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; + this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; + this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; + this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; + + f = this.h[0] + this.pad[0]; + this.h[0] = f & 0xffff; + for (i = 1; i < 8; i++) { + f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; + this.h[i] = f & 0xffff; + } + + mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; + mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; + mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; + mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; + mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; + mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; + mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; + mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; + mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; + mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; + mac[macpos+10] = (this.h[5] >>> 0) & 0xff; + mac[macpos+11] = (this.h[5] >>> 8) & 0xff; + mac[macpos+12] = (this.h[6] >>> 0) & 0xff; + mac[macpos+13] = (this.h[6] >>> 8) & 0xff; + mac[macpos+14] = (this.h[7] >>> 0) & 0xff; + mac[macpos+15] = (this.h[7] >>> 8) & 0xff; +}; + +poly1305.prototype.update = function(m, mpos, bytes) { + var i, want; + + if (this.leftover) { + want = (16 - this.leftover); + if (want > bytes) + want = bytes; + for (i = 0; i < want; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + bytes -= want; + mpos += want; + this.leftover += want; + if (this.leftover < 16) + return; + this.blocks(this.buffer, 0, 16); + this.leftover = 0; + } + + if (bytes >= 16) { + want = bytes - (bytes % 16); + this.blocks(m, mpos, want); + mpos += want; + bytes -= want; + } + + if (bytes) { + for (i = 0; i < bytes; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + this.leftover += bytes; + } +}; + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s = new poly1305(k); + s.update(m, mpos, n); + s.finish(out, outpos); + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var i, v, c = 1; + for (i = 0; i < 16; i++) { + v = o[i] + c + 65535; + c = Math.floor(v / 65536); + o[i] = v - c * 65536; + } + o[0] += c-1 + 37 * (c-1); +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; +} + +function Z(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; +} + +function M(o, a, b) { + var v, c, + t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, + t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, + t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, + t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, + b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8], + b9 = b[9], + b10 = b[10], + b11 = b[11], + b12 = b[12], + b13 = b[13], + b14 = b[14], + b15 = b[15]; + + v = a[0]; + t0 += v * b0; + t1 += v * b1; + t2 += v * b2; + t3 += v * b3; + t4 += v * b4; + t5 += v * b5; + t6 += v * b6; + t7 += v * b7; + t8 += v * b8; + t9 += v * b9; + t10 += v * b10; + t11 += v * b11; + t12 += v * b12; + t13 += v * b13; + t14 += v * b14; + t15 += v * b15; + v = a[1]; + t1 += v * b0; + t2 += v * b1; + t3 += v * b2; + t4 += v * b3; + t5 += v * b4; + t6 += v * b5; + t7 += v * b6; + t8 += v * b7; + t9 += v * b8; + t10 += v * b9; + t11 += v * b10; + t12 += v * b11; + t13 += v * b12; + t14 += v * b13; + t15 += v * b14; + t16 += v * b15; + v = a[2]; + t2 += v * b0; + t3 += v * b1; + t4 += v * b2; + t5 += v * b3; + t6 += v * b4; + t7 += v * b5; + t8 += v * b6; + t9 += v * b7; + t10 += v * b8; + t11 += v * b9; + t12 += v * b10; + t13 += v * b11; + t14 += v * b12; + t15 += v * b13; + t16 += v * b14; + t17 += v * b15; + v = a[3]; + t3 += v * b0; + t4 += v * b1; + t5 += v * b2; + t6 += v * b3; + t7 += v * b4; + t8 += v * b5; + t9 += v * b6; + t10 += v * b7; + t11 += v * b8; + t12 += v * b9; + t13 += v * b10; + t14 += v * b11; + t15 += v * b12; + t16 += v * b13; + t17 += v * b14; + t18 += v * b15; + v = a[4]; + t4 += v * b0; + t5 += v * b1; + t6 += v * b2; + t7 += v * b3; + t8 += v * b4; + t9 += v * b5; + t10 += v * b6; + t11 += v * b7; + t12 += v * b8; + t13 += v * b9; + t14 += v * b10; + t15 += v * b11; + t16 += v * b12; + t17 += v * b13; + t18 += v * b14; + t19 += v * b15; + v = a[5]; + t5 += v * b0; + t6 += v * b1; + t7 += v * b2; + t8 += v * b3; + t9 += v * b4; + t10 += v * b5; + t11 += v * b6; + t12 += v * b7; + t13 += v * b8; + t14 += v * b9; + t15 += v * b10; + t16 += v * b11; + t17 += v * b12; + t18 += v * b13; + t19 += v * b14; + t20 += v * b15; + v = a[6]; + t6 += v * b0; + t7 += v * b1; + t8 += v * b2; + t9 += v * b3; + t10 += v * b4; + t11 += v * b5; + t12 += v * b6; + t13 += v * b7; + t14 += v * b8; + t15 += v * b9; + t16 += v * b10; + t17 += v * b11; + t18 += v * b12; + t19 += v * b13; + t20 += v * b14; + t21 += v * b15; + v = a[7]; + t7 += v * b0; + t8 += v * b1; + t9 += v * b2; + t10 += v * b3; + t11 += v * b4; + t12 += v * b5; + t13 += v * b6; + t14 += v * b7; + t15 += v * b8; + t16 += v * b9; + t17 += v * b10; + t18 += v * b11; + t19 += v * b12; + t20 += v * b13; + t21 += v * b14; + t22 += v * b15; + v = a[8]; + t8 += v * b0; + t9 += v * b1; + t10 += v * b2; + t11 += v * b3; + t12 += v * b4; + t13 += v * b5; + t14 += v * b6; + t15 += v * b7; + t16 += v * b8; + t17 += v * b9; + t18 += v * b10; + t19 += v * b11; + t20 += v * b12; + t21 += v * b13; + t22 += v * b14; + t23 += v * b15; + v = a[9]; + t9 += v * b0; + t10 += v * b1; + t11 += v * b2; + t12 += v * b3; + t13 += v * b4; + t14 += v * b5; + t15 += v * b6; + t16 += v * b7; + t17 += v * b8; + t18 += v * b9; + t19 += v * b10; + t20 += v * b11; + t21 += v * b12; + t22 += v * b13; + t23 += v * b14; + t24 += v * b15; + v = a[10]; + t10 += v * b0; + t11 += v * b1; + t12 += v * b2; + t13 += v * b3; + t14 += v * b4; + t15 += v * b5; + t16 += v * b6; + t17 += v * b7; + t18 += v * b8; + t19 += v * b9; + t20 += v * b10; + t21 += v * b11; + t22 += v * b12; + t23 += v * b13; + t24 += v * b14; + t25 += v * b15; + v = a[11]; + t11 += v * b0; + t12 += v * b1; + t13 += v * b2; + t14 += v * b3; + t15 += v * b4; + t16 += v * b5; + t17 += v * b6; + t18 += v * b7; + t19 += v * b8; + t20 += v * b9; + t21 += v * b10; + t22 += v * b11; + t23 += v * b12; + t24 += v * b13; + t25 += v * b14; + t26 += v * b15; + v = a[12]; + t12 += v * b0; + t13 += v * b1; + t14 += v * b2; + t15 += v * b3; + t16 += v * b4; + t17 += v * b5; + t18 += v * b6; + t19 += v * b7; + t20 += v * b8; + t21 += v * b9; + t22 += v * b10; + t23 += v * b11; + t24 += v * b12; + t25 += v * b13; + t26 += v * b14; + t27 += v * b15; + v = a[13]; + t13 += v * b0; + t14 += v * b1; + t15 += v * b2; + t16 += v * b3; + t17 += v * b4; + t18 += v * b5; + t19 += v * b6; + t20 += v * b7; + t21 += v * b8; + t22 += v * b9; + t23 += v * b10; + t24 += v * b11; + t25 += v * b12; + t26 += v * b13; + t27 += v * b14; + t28 += v * b15; + v = a[14]; + t14 += v * b0; + t15 += v * b1; + t16 += v * b2; + t17 += v * b3; + t18 += v * b4; + t19 += v * b5; + t20 += v * b6; + t21 += v * b7; + t22 += v * b8; + t23 += v * b9; + t24 += v * b10; + t25 += v * b11; + t26 += v * b12; + t27 += v * b13; + t28 += v * b14; + t29 += v * b15; + v = a[15]; + t15 += v * b0; + t16 += v * b1; + t17 += v * b2; + t18 += v * b3; + t19 += v * b4; + t20 += v * b5; + t21 += v * b6; + t22 += v * b7; + t23 += v * b8; + t24 += v * b9; + t25 += v * b10; + t26 += v * b11; + t27 += v * b12; + t28 += v * b13; + t29 += v * b14; + t30 += v * b15; + + t0 += 38 * t16; + t1 += 38 * t17; + t2 += 38 * t18; + t3 += 38 * t19; + t4 += 38 * t20; + t5 += 38 * t21; + t6 += 38 * t22; + t7 += 38 * t23; + t8 += 38 * t24; + t9 += 38 * t25; + t10 += 38 * t26; + t11 += 38 * t27; + t12 += 38 * t28; + t13 += 38 * t29; + t14 += 38 * t30; + // t15 left as is + + // first car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + // second car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + o[ 0] = t0; + o[ 1] = t1; + o[ 2] = t2; + o[ 3] = t3; + o[ 4] = t4; + o[ 5] = t5; + o[ 6] = t6; + o[ 7] = t7; + o[ 8] = t8; + o[ 9] = t9; + o[10] = t10; + o[11] = t11; + o[12] = t12; + o[13] = t13; + o[14] = t14; + o[15] = t15; +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +var K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function crypto_hashblocks_hl(hh, hl, m, n) { + var wh = new Int32Array(16), wl = new Int32Array(16), + bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, + bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, + th, tl, i, j, h, l, a, b, c, d; + + var ah0 = hh[0], + ah1 = hh[1], + ah2 = hh[2], + ah3 = hh[3], + ah4 = hh[4], + ah5 = hh[5], + ah6 = hh[6], + ah7 = hh[7], + + al0 = hl[0], + al1 = hl[1], + al2 = hl[2], + al3 = hl[3], + al4 = hl[4], + al5 = hl[5], + al6 = hl[6], + al7 = hl[7]; + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) { + j = 8 * i + pos; + wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; + wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; + } + for (i = 0; i < 80; i++) { + bh0 = ah0; + bh1 = ah1; + bh2 = ah2; + bh3 = ah3; + bh4 = ah4; + bh5 = ah5; + bh6 = ah6; + bh7 = ah7; + + bl0 = al0; + bl1 = al1; + bl2 = al2; + bl3 = al3; + bl4 = al4; + bl5 = al5; + bl6 = al6; + bl7 = al7; + + // add + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma1 + h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); + l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Ch + h = (ah4 & ah5) ^ (~ah4 & ah6); + l = (al4 & al5) ^ (~al4 & al6); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // K + h = K[i*2]; + l = K[i*2+1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // w + h = wh[i%16]; + l = wl[i%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + th = c & 0xffff | d << 16; + tl = a & 0xffff | b << 16; + + // add + h = th; + l = tl; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma0 + h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); + l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Maj + h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); + l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh7 = (c & 0xffff) | (d << 16); + bl7 = (a & 0xffff) | (b << 16); + + // add + h = bh3; + l = bl3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = th; + l = tl; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh3 = (c & 0xffff) | (d << 16); + bl3 = (a & 0xffff) | (b << 16); + + ah1 = bh0; + ah2 = bh1; + ah3 = bh2; + ah4 = bh3; + ah5 = bh4; + ah6 = bh5; + ah7 = bh6; + ah0 = bh7; + + al1 = bl0; + al2 = bl1; + al3 = bl2; + al4 = bl3; + al5 = bl4; + al6 = bl5; + al7 = bl6; + al0 = bl7; + + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + // add + h = wh[j]; + l = wl[j]; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = wh[(j+9)%16]; + l = wl[(j+9)%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma0 + th = wh[(j+1)%16]; + tl = wl[(j+1)%16]; + h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); + l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma1 + th = wh[(j+14)%16]; + tl = wl[(j+14)%16]; + h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); + l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + wh[j] = (c & 0xffff) | (d << 16); + wl[j] = (a & 0xffff) | (b << 16); + } + } + } + + // add + h = ah0; + l = al0; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[0]; + l = hl[0]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[0] = ah0 = (c & 0xffff) | (d << 16); + hl[0] = al0 = (a & 0xffff) | (b << 16); + + h = ah1; + l = al1; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[1]; + l = hl[1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[1] = ah1 = (c & 0xffff) | (d << 16); + hl[1] = al1 = (a & 0xffff) | (b << 16); + + h = ah2; + l = al2; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[2]; + l = hl[2]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[2] = ah2 = (c & 0xffff) | (d << 16); + hl[2] = al2 = (a & 0xffff) | (b << 16); + + h = ah3; + l = al3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[3]; + l = hl[3]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[3] = ah3 = (c & 0xffff) | (d << 16); + hl[3] = al3 = (a & 0xffff) | (b << 16); + + h = ah4; + l = al4; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[4]; + l = hl[4]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[4] = ah4 = (c & 0xffff) | (d << 16); + hl[4] = al4 = (a & 0xffff) | (b << 16); + + h = ah5; + l = al5; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[5]; + l = hl[5]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[5] = ah5 = (c & 0xffff) | (d << 16); + hl[5] = al5 = (a & 0xffff) | (b << 16); + + h = ah6; + l = al6; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[6]; + l = hl[6]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[6] = ah6 = (c & 0xffff) | (d << 16); + hl[6] = al6 = (a & 0xffff) | (b << 16); + + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[7]; + l = hl[7]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[7] = ah7 = (c & 0xffff) | (d << 16); + hl[7] = al7 = (a & 0xffff) | (b << 16); + + pos += 128; + n -= 128; + } + + return n; +} + +function crypto_hash(out, m, n) { + var hh = new Int32Array(8), + hl = new Int32Array(8), + x = new Uint8Array(256), + i, b = n; + + hh[0] = 0x6a09e667; + hh[1] = 0xbb67ae85; + hh[2] = 0x3c6ef372; + hh[3] = 0xa54ff53a; + hh[4] = 0x510e527f; + hh[5] = 0x9b05688c; + hh[6] = 0x1f83d9ab; + hh[7] = 0x5be0cd19; + + hl[0] = 0xf3bcc908; + hl[1] = 0x84caa73b; + hl[2] = 0xfe94f82b; + hl[3] = 0x5f1d36f1; + hl[4] = 0xade682d1; + hl[5] = 0x2b3e6c1f; + hl[6] = 0xfb41bd6b; + hl[7] = 0x137e2179; + + crypto_hashblocks_hl(hh, hl, m, n); + n %= 128; + + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, (b / 0x20000000) | 0, b << 3); + crypto_hashblocks_hl(hh, hl, x, n); + + for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +nacl.util = {}; + +nacl.util.decodeUTF8 = function(s) { + var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; +}; + +nacl.util.encodeUTF8 = function(arr) { + var i, s = []; + for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); + return decodeURIComponent(escape(s.join(''))); +}; + +nacl.util.encodeBase64 = function(arr) { + if (typeof btoa === 'undefined') { + return (new Buffer(arr)).toString('base64'); + } else { + var i, s = [], len = arr.length; + for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); + return btoa(s.join('')); + } +}; + +nacl.util.decodeBase64 = function(s) { + if (typeof atob === 'undefined') { + return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); + } else { + var i, d = atob(s), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; + } +}; + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto; + if (typeof window !== 'undefined') { + // Browser. + if (window.crypto && window.crypto.getRandomValues) { + crypto = window.crypto; // Standard + } else if (window.msCrypto && window.msCrypto.getRandomValues) { + crypto = window.msCrypto; // Internet Explorer 11+ + } + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + crypto.getRandomValues(v); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js new file mode 100644 index 00000000000..7072c2af443 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js @@ -0,0 +1,2 @@ +!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;_=_+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+g|0,L=L+v|0,C=C+b|0,R=R+d|0,z=z+A|0,r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=C>>>0&255,r[53]=C>>>8&255,r[54]=C>>>16&255,r[55]=C>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=z>>>0&255,r[61]=z>>>8&255,r[62]=z>>>16&255,r[63]=z>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=z>>>0&255,r[13]=z>>>8&255,r[14]=z>>>16&255,r[15]=z>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function v(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function b(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function d(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(b(h),b(h),b(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function _(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,g=0,v=0,b=0,d=0,A=0,_=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,C=0,R=0,z=n[0],P=n[1],O=n[2],N=n[3],F=n[4],I=n[5],j=n[6],G=n[7],Z=n[8],V=n[9],q=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*z,h+=e*P,a+=e*O,f+=e*N,s+=e*F,u+=e*I,c+=e*j,y+=e*G,l+=e*Z,w+=e*V,p+=e*q,g+=e*X,v+=e*D,b+=e*H,d+=e*J,A+=e*Q,e=t[1],h+=e*z,a+=e*P,f+=e*O,s+=e*N,u+=e*F,c+=e*I,y+=e*j,l+=e*G,w+=e*Z,p+=e*V,g+=e*q,v+=e*X,b+=e*D,d+=e*H,A+=e*J,_+=e*Q,e=t[2],a+=e*z,f+=e*P,s+=e*O,u+=e*N,c+=e*F,y+=e*I,l+=e*j,w+=e*G,p+=e*Z,g+=e*V,v+=e*q,b+=e*X,d+=e*D,A+=e*H,_+=e*J,U+=e*Q,e=t[3],f+=e*z,s+=e*P,u+=e*O,c+=e*N,y+=e*F,l+=e*I,w+=e*j,p+=e*G,g+=e*Z,v+=e*V,b+=e*q,d+=e*X,A+=e*D,_+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*z,u+=e*P,c+=e*O,y+=e*N,l+=e*F,w+=e*I,p+=e*j,g+=e*G,v+=e*Z,b+=e*V,d+=e*q,A+=e*X,_+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*z,c+=e*P,y+=e*O,l+=e*N,w+=e*F,p+=e*I,g+=e*j,v+=e*G,b+=e*Z,d+=e*V,A+=e*q,_+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*z,y+=e*P,l+=e*O,w+=e*N,p+=e*F,g+=e*I,v+=e*j,b+=e*G,d+=e*Z,A+=e*V,_+=e*q,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*z,l+=e*P,w+=e*O,p+=e*N,g+=e*F,v+=e*I,b+=e*j,d+=e*G,A+=e*Z,_+=e*V,U+=e*q,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*z,w+=e*P,p+=e*O,g+=e*N,v+=e*F,b+=e*I,d+=e*j,A+=e*G,_+=e*Z,U+=e*V,E+=e*q,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*z,p+=e*P,g+=e*O,v+=e*N,b+=e*F,d+=e*I,A+=e*j,_+=e*G,U+=e*Z,E+=e*V,x+=e*q,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*z,g+=e*P,v+=e*O,b+=e*N,d+=e*F,A+=e*I,_+=e*j,U+=e*G,E+=e*Z,x+=e*V,M+=e*q,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],g+=e*z,v+=e*P,b+=e*O,d+=e*N,A+=e*F,_+=e*I,U+=e*j,E+=e*G,x+=e*Z,M+=e*V,m+=e*q,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],v+=e*z,b+=e*P,d+=e*O,A+=e*N,_+=e*F,U+=e*I,E+=e*j,x+=e*G,M+=e*Z,m+=e*V,B+=e*q,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],b+=e*z,d+=e*P,A+=e*O,_+=e*N,U+=e*F,E+=e*I,x+=e*j,M+=e*G,m+=e*Z,B+=e*V,S+=e*q,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],d+=e*z,A+=e*P,_+=e*O,U+=e*N,E+=e*F,x+=e*I,M+=e*j,m+=e*G,B+=e*Z,S+=e*V,K+=e*q,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,C+=e*Q,e=t[15],A+=e*z,_+=e*P,U+=e*O,E+=e*N,x+=e*F,M+=e*I,m+=e*j,B+=e*G,S+=e*Z,K+=e*V,T+=e*q,Y+=e*X,k+=e*D,L+=e*H,C+=e*J,R+=e*Q,i+=38*_,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,g+=38*k,v+=38*L,b+=38*C,d+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=g,r[12]=v,r[13]=b,r[14]=d,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,d(a,f,e),d(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),d(a,f,e),d(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function C(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function z(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],C=r[2],R=r[3],z=r[4],P=r[5],O=r[6],N=r[7],F=t[0],I=t[1],j=t[2],G=t[3],Z=t[4],V=t[5],q=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=C,a=R,f=z,s=P,u=O,c=N,y=F,l=I,w=j,p=G,g=Z,v=V,b=q,d=X,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(z>>>14|Z<<18)^(z>>>18|Z<<14)^(Z>>>9|z<<23),M=(Z>>>14|z<<18)^(Z>>>18|z<<14)^(z>>>9|Z<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=z&P^~z&O,M=Z&V^~Z&q,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,_=65535&m|B<<16,x=A,M=_,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&C^L&C,M=F&I^F&j^I&j,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,d=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=_,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,C=i,R=h,z=a,P=f,O=s,N=u,k=c,I=y,j=l,G=w,Z=p,V=g,q=v,X=b,F=d,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],_=Y[(E+1)%16],x=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7,M=(_>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],_=Y[(E+14)%16],x=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6,M=(_>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=C,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=C=65535&S|K<<16,t[2]=j=65535&m|B<<16,x=R,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=G=65535&m|B<<16,x=z,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=z=65535&S|K<<16,t[4]=Z=65535&m|B<<16,x=P,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=P=65535&S|K<<16,t[5]=V=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=O=65535&S|K<<16,t[6]=q=65535&m|B<<16,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=N=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function P(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,z(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),z(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function O(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function N(r,t,n){var e;for(e=0;4>e;e++)d(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(v(r[0],er),v(r[1],or),v(r[2],or),v(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,N(r,t,e),O(t,r),O(r,r),N(r,t,e)}function j(r,t){var n=[$(),$(),$(),$()];v(n[0],fr),v(n[1],sr),v(n[2],or),m(n[3],fr,sr),I(r,n,t)}function G(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),P(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,j(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function Z(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*gr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*gr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*gr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function V(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;Z(r,n)}function q(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];P(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(P(f,r.subarray(32),n+32),V(f),j(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(P(a,r,n+64),V(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return Z(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return v(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),_(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),_(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(P(f,r,n),V(f),I(s,u,f),j(u,t.subarray(32)),O(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==vr)throw new Error("bad key size");if(t.length!==br)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],C=this.r[1],R=this.r[2],z=this.r[3],P=this.r[4],O=this.r[5],N=this.r[6],F=this.r[7],I=this.r[8],j=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=5*x*j,y+=5*M*I,y+=5*m*F,y+=5*B*N,c=y>>>13,y&=8191,y+=5*S*O,y+=5*K*P,y+=5*T*z,y+=5*Y*R,y+=5*k*C,c+=y>>>13,y&=8191,l=c,l+=E*C,l+=x*L,l+=5*M*j,l+=5*m*I,l+=5*B*F,c=l>>>13,l&=8191,l+=5*S*N,l+=5*K*O,l+=5*T*P,l+=5*Y*z,l+=5*k*R,c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*C,w+=M*L,w+=5*m*j,w+=5*B*I,c=w>>>13,w&=8191,w+=5*S*F,w+=5*K*N,w+=5*T*O,w+=5*Y*P,w+=5*k*z,c+=w>>>13,w&=8191,p=c,p+=E*z,p+=x*R,p+=M*C,p+=m*L,p+=5*B*j,c=p>>>13,p&=8191,p+=5*S*I,p+=5*K*F,p+=5*T*N,p+=5*Y*O,p+=5*k*P,c+=p>>>13,p&=8191,g=c,g+=E*P,g+=x*z,g+=M*R,g+=m*C,g+=B*L,c=g>>>13,g&=8191,g+=5*S*j,g+=5*K*I,g+=5*T*F,g+=5*Y*N,g+=5*k*O,c+=g>>>13,g&=8191,v=c,v+=E*O,v+=x*P,v+=M*z,v+=m*R,v+=B*C,c=v>>>13,v&=8191,v+=S*L,v+=5*K*j,v+=5*T*I,v+=5*Y*F,v+=5*k*N,c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*z,b+=B*R,c=b>>>13,b&=8191,b+=S*C,b+=K*L,b+=5*T*j,b+=5*Y*I,b+=5*k*F,c+=b>>>13,b&=8191,d=c,d+=E*F,d+=x*N,d+=M*O,d+=m*P,d+=B*z,c=d>>>13,d&=8191,d+=S*R,d+=K*C,d+=T*L,d+=5*Y*j,d+=5*k*I,c+=d>>>13,d&=8191,A=c,A+=E*I,A+=x*F,A+=M*N,A+=m*O,A+=B*P,c=A>>>13,A&=8191,A+=S*z,A+=K*R,A+=T*C,A+=Y*L,A+=5*k*j,c+=A>>>13,A&=8191,_=c,_+=E*j,_+=x*I,_+=M*F,_+=m*N,_+=B*O,c=_>>>13,_&=8191,_+=S*P,_+=K*z,_+=T*R,_+=Y*C,_+=k*L,c+=_>>>13,_&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=g,S=v,K=b,T=d,Y=A,k=_,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(h[9]>>>15)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=g,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],gr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),vr=32,br=24,dr=32,Ar=16,_r=32,Ur=32,Er=32,xr=32,Mr=32,mr=br,Br=dr,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:g,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:C,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:P,crypto_sign:q,crypto_sign_keypair:G,crypto_sign_open:D,crypto_secretbox_KEYBYTES:vr,crypto_secretbox_NONCEBYTES:br,crypto_secretbox_ZEROBYTES:dr,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:_r,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util={},r.util.decodeUTF8=function(r){var t,n=unescape(encodeURIComponent(r)),e=new Uint8Array(n.length);for(t=0;tt;t++)n.push(String.fromCharCode(r[t]));return btoa(n.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var t,n=atob(r),e=new Uint8Array(n.length);for(t=0;te)return null;for(var o=new Uint8Array(e),i=0;ie;e++)o[e]=t[e];for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return G(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;ne;e++)n[e]=r[e];return G(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return P(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?t=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(t=window.msCrypto),t&&r.setPRNG(function(r,n){var e,o=new Uint8Array(n);for(t.getRandomValues(o),e=0;n>e;e++)r[e]=o[e];W(o)})):"undefined"!=typeof require&&(t=require("crypto"),t&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js new file mode 100644 index 00000000000..b8edbbee692 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js @@ -0,0 +1,1205 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; }; +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function L32(x, c) { return (x << c) | (x >>> (32 - c)); } + +function ld32(x, i) { + var u = x[i+3] & 0xff; + u = (u<<8)|(x[i+2] & 0xff); + u = (u<<8)|(x[i+1] & 0xff); + return (u<<8)|(x[i+0] & 0xff); +} + +function dl64(x, i) { + var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3]; + var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7]; + return new u64(h, l); +} + +function st32(x, j, u) { + var i; + for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; } +} + +function ts64(x, i, u) { + x[i] = (u.hi >> 24) & 0xff; + x[i+1] = (u.hi >> 16) & 0xff; + x[i+2] = (u.hi >> 8) & 0xff; + x[i+3] = u.hi & 0xff; + x[i+4] = (u.lo >> 24) & 0xff; + x[i+5] = (u.lo >> 16) & 0xff; + x[i+6] = (u.lo >> 8) & 0xff; + x[i+7] = u.lo & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core(out,inp,k,c,h) { + var w = new Uint32Array(16), x = new Uint32Array(16), + y = new Uint32Array(16), t = new Uint32Array(4); + var i, j, m; + + for (i = 0; i < 4; i++) { + x[5*i] = ld32(c, 4*i); + x[1+i] = ld32(k, 4*i); + x[6+i] = ld32(inp, 4*i); + x[11+i] = ld32(k, 16+4*i); + } + + for (i = 0; i < 16; i++) y[i] = x[i]; + + for (i = 0; i < 20; i++) { + for (j = 0; j < 4; j++) { + for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16]; + t[1] ^= L32((t[0]+t[3])|0, 7); + t[2] ^= L32((t[1]+t[0])|0, 9); + t[3] ^= L32((t[2]+t[1])|0,13); + t[0] ^= L32((t[3]+t[2])|0,18); + for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m]; + } + for (m = 0; m < 16; m++) x[m] = w[m]; + } + + if (h) { + for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0; + for (i = 0; i < 4; i++) { + x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0; + x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0; + } + for (i = 0; i < 4; i++) { + st32(out,4*i,x[5*i]); + st32(out,16+4*i,x[6+i]); + } + } else { + for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0); + } +} + +function crypto_core_salsa20(out,inp,k,c) { + core(out,inp,k,c,false); + return 0; +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core(out,inp,k,c,true); + return 0; +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + if (!b) return 0; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + if (m) mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,d,n,k) { + return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k); +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s); +} + +function add1305(h, c) { + var j, u = 0; + for (j = 0; j < 17; j++) { + u = (u + ((h[j] + c[j]) | 0)) | 0; + h[j] = u & 255; + u >>>= 8; + } +} + +var minusp = new Uint32Array([ + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252 +]); + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s, i, j, u; + var x = new Uint32Array(17), r = new Uint32Array(17), + h = new Uint32Array(17), c = new Uint32Array(17), + g = new Uint32Array(17); + for (j = 0; j < 17; j++) r[j]=h[j]=0; + for (j = 0; j < 16; j++) r[j]=k[j]; + r[3]&=15; + r[4]&=252; + r[7]&=15; + r[8]&=252; + r[11]&=15; + r[12]&=252; + r[15]&=15; + + while (n > 0) { + for (j = 0; j < 17; j++) c[j] = 0; + for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j]; + c[j] = 1; + mpos += j; n -= j; + add1305(h,c); + for (i = 0; i < 17; i++) { + x[i] = 0; + for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0; + } + for (i = 0; i < 17; i++) h[i] = x[i]; + u = 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u & 3; + u = (5 * (u >>> 2)) | 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u; + } + + for (j = 0; j < 17; j++) g[j] = h[j]; + add1305(h,minusp); + s = (-(h[16] >>> 7) | 0); + for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]); + + for (j = 0; j < 16; j++) c[j] = k[j + 16]; + c[16] = 0; + add1305(h,c); + for (j = 0; j < 16; j++) out[outpos+j] = h[j]; + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var c; + var i; + for (i = 0; i < 16; i++) { + o[i] += 65536; + c = Math.floor(o[i] / 65536); + o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0); + o[i] -= (c * 65536); + } +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0; +} + +function Z(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0; +} + +function M(o, a, b) { + var i, j, t = new Float64Array(31); + for (i = 0; i < 31; i++) t[i] = 0; + for (i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) { + t[i+j] += a[i] * b[j]; + } + } + for (i = 0; i < 15; i++) { + t[i] += 38 * t[i+16]; + } + for (i = 0; i < 16; i++) o[i] = t[i]; + car25519(o); + car25519(o); +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +function add64() { + var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i; + for (i = 0; i < arguments.length; i++) { + l = arguments[i].lo; + h = arguments[i].hi; + a += (l & m16); b += (l >>> 16); + c += (h & m16); d += (h >>> 16); + } + + b += (a >>> 16); + c += (b >>> 16); + d += (c >>> 16); + + return new u64((c & m16) | (d << 16), (a & m16) | (b << 16)); +} + +function shr64(x, c) { + return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c))); +} + +function xor64() { + var l = 0, h = 0, i; + for (i = 0; i < arguments.length; i++) { + l ^= arguments[i].lo; + h ^= arguments[i].hi; + } + return new u64(h, l); +} + +function R(x, c) { + var h, l, c1 = 32 - c; + if (c < 32) { + h = (x.hi >>> c) | (x.lo << c1); + l = (x.lo >>> c) | (x.hi << c1); + } else if (c < 64) { + h = (x.lo >>> c) | (x.hi << c1); + l = (x.hi >>> c) | (x.lo << c1); + } + return new u64(h, l); +} + +function Ch(x, y, z) { + var h = (x.hi & y.hi) ^ (~x.hi & z.hi), + l = (x.lo & y.lo) ^ (~x.lo & z.lo); + return new u64(h, l); +} + +function Maj(x, y, z) { + var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi), + l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo); + return new u64(h, l); +} + +function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); } +function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); } +function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); } +function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); } + +var K = [ + new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd), + new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc), + new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019), + new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118), + new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe), + new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2), + new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1), + new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694), + new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3), + new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65), + new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483), + new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5), + new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210), + new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4), + new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725), + new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70), + new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926), + new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df), + new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8), + new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b), + new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001), + new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30), + new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910), + new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8), + new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53), + new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8), + new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb), + new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3), + new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60), + new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec), + new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9), + new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b), + new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207), + new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178), + new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6), + new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b), + new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493), + new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c), + new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a), + new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817) +]; + +function crypto_hashblocks(x, m, n) { + var z = [], b = [], a = [], w = [], t, i, j; + + for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i); + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos); + for (i = 0; i < 80; i++) { + for (j = 0; j < 8; j++) b[j] = a[j]; + t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]); + b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2])); + b[3] = add64(b[3], t); + for (j = 0; j < 8; j++) a[(j+1)%8] = b[j]; + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16])); + } + } + } + + for (i = 0; i < 8; i++) { + a[i] = add64(a[i], z[i]); + z[i] = a[i]; + } + + pos += 128; + n -= 128; + } + + for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]); + return n; +} + +var iv = new Uint8Array([ + 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, + 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, + 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, + 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, + 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, + 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, + 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, + 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 +]); + +function crypto_hash(out, m, n) { + var h = new Uint8Array(64), x = new Uint8Array(256); + var i, b = n; + + for (i = 0; i < 64; i++) h[i] = iv[i]; + + crypto_hashblocks(h, m, n); + n %= 128; + + for (i = 0; i < 256; i++) x[i] = 0; + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3)); + crypto_hashblocks(h, x, n); + + for (i = 0; i < 64; i++) out[i] = h[i]; + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +nacl.util = {}; + +nacl.util.decodeUTF8 = function(s) { + var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; +}; + +nacl.util.encodeUTF8 = function(arr) { + var i, s = []; + for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); + return decodeURIComponent(escape(s.join(''))); +}; + +nacl.util.encodeBase64 = function(arr) { + if (typeof btoa === 'undefined') { + return (new Buffer(arr)).toString('base64'); + } else { + var i, s = [], len = arr.length; + for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); + return btoa(s.join('')); + } +}; + +nacl.util.decodeBase64 = function(s) { + if (typeof atob === 'undefined') { + return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); + } else { + var i, d = atob(s), b = new Uint8Array(d.length); + for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); + return b; + } +}; + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto; + if (typeof window !== 'undefined') { + // Browser. + if (window.crypto && window.crypto.getRandomValues) { + crypto = window.crypto; // Standard + } else if (window.msCrypto && window.msCrypto.getRandomValues) { + crypto = window.msCrypto; // Internet Explorer 11+ + } + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + crypto.getRandomValues(v); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js new file mode 100644 index 00000000000..95d869502e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js @@ -0,0 +1 @@ +!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function p(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function v(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,p(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(p(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,p(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function b(r,n,e,t,o,i){var a=new Uint8Array(16);return v(a,0,e,t,o,i),f(r,n,a,0)}function A(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),v(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function U(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==b(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function _(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function d(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function E(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(d(a),d(a),d(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,E(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];d(r),d(r)}function L(r,n){Y(r,n,n)}function C(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function k(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,E(f,u,t),E(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ur),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),E(f,u,t),E(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return C(l,l),Y(h,h,l),x(r,h),0}function z(r,n){return k(r,n,vr)}function P(r,n){return gr(n,32),z(r,n)}function O(r,n,e){var t=new Uint8Array(32);return k(t,e,n),y(r,pr,t,Br)}function F(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Kr(r,n,e,t,a)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function j(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function G(){var r,n=0,e=0;for(r=0;rn?(e=r.hi>>>n|r.lo<>>n|r.hi<n&&(e=r.lo>>>n|r.hi<>>n|r.lo<a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),Z(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,q(w[0]),V(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,dr),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)E(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();C(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(_(r[0],br),_(r[1],Ar),_(r[2],Ar),_(r[3],br),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];_(e[0],Er),_(e[1],xr),_(e[2],Ar),Y(e[3],Er,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*Cr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*Cr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*Cr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return _(r[2],Ar),S(r[1],n),L(o,r[1]),Y(i,o,_r),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),R(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],br,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==Rr)throw new Error("bad key size");if(n.length!==kr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Nr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;nn;n++)e.push(String.fromCharCode(r[n]));return btoa(e.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var n,e=atob(r),t=new Uint8Array(e.length);for(n=0;nt)return null;for(var o=new Uint8Array(t),i=0;it;t++)o[t]=n[t];for(t=0;t=0},r.sign.keyPair=function(){var r=new Uint8Array(qr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(qr),e=0;et;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=qr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Vr,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?n=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(n=window.msCrypto),n&&r.setPRNG(function(r,e){var t,o=new Uint8Array(e);for(n.getRandomValues(o),t=0;e>t;t++)r[t]=o[t];sr(o)})):"undefined"!=typeof require&&(n=require("crypto"),n&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json new file mode 100644 index 00000000000..3243f41a555 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + "tweetnacl@~0.13.0", + "/Users/eshanker/Code/fsevents/node_modules/sshpk" + ] + ], + "_from": "tweetnacl@>=0.13.0 <0.14.0", + "_id": "tweetnacl@0.13.3", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/tweetnacl", + "_nodeVersion": "4.2.3", + "_npmUser": { + "email": "dmitry@codingrobots.com", + "name": "dchest" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "tweetnacl", + "raw": "tweetnacl@~0.13.0", + "rawSpec": "~0.13.0", + "scope": null, + "spec": ">=0.13.0 <0.14.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/sshpk" + ], + "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", + "_shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56", + "_shrinkwrap": null, + "_spec": "tweetnacl@~0.13.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/sshpk", + "author": { + "name": "TweetNaCl-js contributors" + }, + "browser": { + "buffer": false, + "crypto": false + }, + "bugs": { + "url": "https://github.com/dchest/tweetnacl-js/issues" + }, + "dependencies": {}, + "description": "Port of TweetNaCl cryptographic library to JavaScript", + "devDependencies": { + "browserify": "^10.1.3", + "eslint": "^1.4.3", + "faucet": "0.0.1", + "tap-browser-color": "^0.1.2", + "tape": "^4.0.0", + "testling": "^1.7.1", + "uglify-js": "^2.4.21" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56", + "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz" + }, + "gitHead": "2bb422cb707fba4a5ec9654688564a4fb861b068", + "homepage": "https://dchest.github.io/tweetnacl-js", + "keywords": [ + "crypto", + "cryptography", + "curve25519", + "ed25519", + "encrypt", + "hash", + "key", + "nacl", + "poly1305", + "public", + "salsa20", + "signatures" + ], + "license": "Public domain", + "main": "nacl-fast.js", + "maintainers": [ + { + "email": "dmitry@codingrobots.com", + "name": "dchest" + } + ], + "name": "tweetnacl", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/dchest/tweetnacl-js.git" + }, + "scripts": { + "bench": "node test/benchmark/bench.js", + "browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null", + "browser-quick": "browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", + "build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js", + "chrome": "browserify test/browser/testling_init.js test/*.js | testling -x google-chrome | faucet", + "firefox": "browserify test/browser/testling_init.js test/*.js | testling -x firefox | faucet", + "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js", + "test": "tape test/*.js | faucet", + "testall": "make -C test/c && tape test/*.js test/c/*.js | faucet", + "testling": "browserify test/browser/testling_init.js test/*.js | testling | faucet" + }, + "testling": { + "browsers": [ + "android-browser/latest", + "chrome/22..latest", + "firefox/16..latest", + "ipad/6..latest", + "iphone/6..latest", + "opera/11.0..latest", + "safari/latest" + ], + "files": "test/*.js" + }, + "version": "0.13.3" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE new file mode 100644 index 00000000000..05eeeb88c2e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md new file mode 100644 index 00000000000..81166753aba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md @@ -0,0 +1,17 @@ +Use this module to convert a username/groupname to a uid/gid number. + +Usage: + +``` +npm install uid-number +``` + +Then, in your node program: + +```javascript +var uidNumber = require("uid-number") +uidNumber("isaacs", function (er, uid, gid) { + // gid is null because we didn't ask for a group name + // uid === 24561 because that's my number. +}) +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js new file mode 100755 index 00000000000..0b391748a93 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js @@ -0,0 +1,24 @@ +if (module !== require.main) { + throw new Error("This file should not be loaded with require()") +} + +if (!process.getuid || !process.getgid) { + throw new Error("this file should not be called without uid/gid support") +} + +var argv = process.argv.slice(2) + , user = argv[0] || process.getuid() + , group = argv[1] || process.getgid() + +if (!isNaN(user)) user = +user +if (!isNaN(group)) group = +group + +console.error([user, group]) + +try { + process.setgid(group) + process.setuid(user) + console.log(JSON.stringify({uid:+process.getuid(), gid:+process.getgid()})) +} catch (ex) { + console.log(JSON.stringify({error:ex.message,errno:ex.errno})) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json new file mode 100644 index 00000000000..e374169bc7a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "uid-number@~0.0.6", + "/Users/eshanker/Code/fsevents/node_modules/tar-pack" + ] + ], + "_from": "uid-number@>=0.0.6 <0.1.0", + "_id": "uid-number@0.0.6", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/uid-number", + "_nodeVersion": "0.10.31", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "2.1.3", + "_phantomChildren": {}, + "_requested": { + "name": "uid-number", + "raw": "uid-number@~0.0.6", + "rawSpec": "~0.0.6", + "scope": null, + "spec": ">=0.0.6 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/tar-pack" + ], + "_resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "_shasum": "0ea10e8035e8eb5b8e4449f06da1c730663baa81", + "_shrinkwrap": null, + "_spec": "uid-number@~0.0.6", + "_where": "/Users/eshanker/Code/fsevents/node_modules/tar-pack", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/uid-number/issues" + }, + "dependencies": {}, + "description": "Convert a username/group name to a uid/gid number", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "0ea10e8035e8eb5b8e4449f06da1c730663baa81", + "tarball": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" + }, + "engines": { + "node": "*" + }, + "gitHead": "aab48f5d6bda85794946b26d945d2ee452e0e9ab", + "homepage": "https://github.com/isaacs/uid-number", + "license": "ISC", + "main": "uid-number.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "name": "uid-number", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/uid-number.git" + }, + "scripts": {}, + "version": "0.0.6" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js new file mode 100644 index 00000000000..bd62184fda7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js @@ -0,0 +1,59 @@ +module.exports = uidNumber + +// This module calls into get-uid-gid.js, which sets the +// uid and gid to the supplied argument, in order to find out their +// numeric value. This can't be done in the main node process, +// because otherwise node would be running as that user from this +// point on. + +var child_process = require("child_process") + , path = require("path") + , uidSupport = process.getuid && process.setuid + , uidCache = {} + , gidCache = {} + +function uidNumber (uid, gid, cb) { + if (!uidSupport) return cb() + if (typeof cb !== "function") cb = gid, gid = null + if (typeof cb !== "function") cb = uid, uid = null + if (gid == null) gid = process.getgid() + if (uid == null) uid = process.getuid() + if (!isNaN(gid)) gid = gidCache[gid] = +gid + if (!isNaN(uid)) uid = uidCache[uid] = +uid + + if (uidCache.hasOwnProperty(uid)) uid = uidCache[uid] + if (gidCache.hasOwnProperty(gid)) gid = gidCache[gid] + + if (typeof gid === "number" && typeof uid === "number") { + return process.nextTick(cb.bind(null, null, uid, gid)) + } + + var getter = require.resolve("./get-uid-gid.js") + + child_process.execFile( process.execPath + , [getter, uid, gid] + , function (code, out, stderr) { + if (code) { + var er = new Error("could not get uid/gid\n" + stderr) + er.code = code + return cb(er) + } + + try { + out = JSON.parse(out+"") + } catch (ex) { + return cb(ex) + } + + if (out.error) { + var er = new Error(out.error) + er.errno = out.errno + return cb(er) + } + + if (isNaN(out.uid) || isNaN(out.gid)) return cb(new Error( + "Could not get uid/gid: "+JSON.stringify(out))) + + cb(null, uidCache[uid] = +out.uid, gidCache[gid] = +out.gid) + }) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md new file mode 100644 index 00000000000..acc8675372e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE new file mode 100644 index 00000000000..6a60e8c225c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md new file mode 100644 index 00000000000..75622fa7c25 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js new file mode 100644 index 00000000000..549ae2f065e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js new file mode 100644 index 00000000000..5e6fcff5ddd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json new file mode 100644 index 00000000000..0d1e3f94aa7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + "util-deprecate@~1.0.1", + "/Users/eshanker/Code/fsevents/node_modules/readable-stream" + ] + ], + "_from": "util-deprecate@>=1.0.1 <1.1.0", + "_id": "util-deprecate@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/util-deprecate", + "_nodeVersion": "4.1.2", + "_npmUser": { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "name": "util-deprecate", + "raw": "util-deprecate@~1.0.1", + "rawSpec": "~1.0.1", + "scope": null, + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/bl/readable-stream", + "/fsevents/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "_shrinkwrap": null, + "_spec": "util-deprecate@~1.0.1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/readable-stream", + "author": { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich", + "url": "http://n8.io/" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "dependencies": {}, + "description": "The Node.js `util.deprecate()` function with browser support", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "homepage": "https://github.com/TooTallNate/util-deprecate", + "keywords": [ + "browser", + "browserify", + "deprecate", + "node", + "util" + ], + "license": "MIT", + "main": "node.js", + "maintainers": [ + { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + } + ], + "name": "util-deprecate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.gitmodules b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.gitmodules new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore new file mode 100644 index 00000000000..3c3629e647f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE new file mode 100644 index 00000000000..cbc0bb3ba3b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile new file mode 100644 index 00000000000..00faa97de52 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile @@ -0,0 +1,35 @@ +# +# Copyright (c) 2012, Joyent, Inc. All rights reserved. +# +# Makefile: top-level Makefile +# +# This Makefile contains only repo-specific logic and uses included makefiles +# to supply common targets (javascriptlint, jsstyle, restdown, etc.), which are +# used by other repos as well. +# + +# +# Tools +# +NPM = npm + +# +# Files +# +JS_FILES := $(shell find lib examples tests -name '*.js') +JSL_FILES_NODE = $(JS_FILES) +JSSTYLE_FILES = $(JS_FILES) +JSL_CONF_NODE = jsl.node.conf + +.PHONY: all +all: + $(NPM) install + +.PHONY: test +test: + node tests/tst.inherit.js + node tests/tst.verror.js + node tests/tst.werror.js + @echo all tests passed + +include ./Makefile.targ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ new file mode 100644 index 00000000000..2a64fe7e950 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ @@ -0,0 +1,285 @@ +# -*- mode: makefile -*- +# +# Copyright (c) 2012, Joyent, Inc. All rights reserved. +# +# Makefile.targ: common targets. +# +# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped +# into other repos as-is without requiring any modifications. If you find +# yourself changing this file, you should instead update the original copy in +# eng.git and then update your repo to use the new version. +# +# This Makefile defines several useful targets and rules. You can use it by +# including it from a Makefile that specifies some of the variables below. +# +# Targets defined in this Makefile: +# +# check Checks JavaScript files for lint and style +# Checks bash scripts for syntax +# Checks SMF manifests for validity against the SMF DTD +# +# clean Removes built files +# +# docs Builds restdown documentation in docs/ +# +# prepush Depends on "check" and "test" +# +# test Does nothing (you should override this) +# +# xref Generates cscope (source cross-reference index) +# +# For details on what these targets are supposed to do, see the Joyent +# Engineering Guide. +# +# To make use of these targets, you'll need to set some of these variables. Any +# variables left unset will simply not be used. +# +# BASH_FILES Bash scripts to check for syntax +# (paths relative to top-level Makefile) +# +# CLEAN_FILES Files to remove as part of the "clean" target. Note +# that files generated by targets in this Makefile are +# automatically included in CLEAN_FILES. These include +# restdown-generated HTML and JSON files. +# +# DOC_FILES Restdown (documentation source) files. These are +# assumed to be contained in "docs/", and must NOT +# contain the "docs/" prefix. +# +# JSL_CONF_NODE Specify JavaScriptLint configuration files +# JSL_CONF_WEB (paths relative to top-level Makefile) +# +# Node.js and Web configuration files are separate +# because you'll usually want different global variable +# configurations. If no file is specified, none is given +# to jsl, which causes it to use a default configuration, +# which probably isn't what you want. +# +# JSL_FILES_NODE JavaScript files to check with Node config file. +# JSL_FILES_WEB JavaScript files to check with Web config file. +# +# You can also override these variables: +# +# BASH Path to bash (default: bash) +# +# CSCOPE_DIRS Directories to search for source files for the cscope +# index. (default: ".") +# +# JSL Path to JavaScriptLint (default: "jsl") +# +# JSL_FLAGS_NODE Additional flags to pass through to JSL +# JSL_FLAGS_WEB +# JSL_FLAGS +# +# JSSTYLE Path to jsstyle (default: jsstyle) +# +# JSSTYLE_FLAGS Additional flags to pass through to jsstyle +# + +# +# Defaults for the various tools we use. +# +BASH ?= bash +BASHSTYLE ?= tools/bashstyle +CP ?= cp +CSCOPE ?= cscope +CSCOPE_DIRS ?= . +JSL ?= jsl +JSSTYLE ?= jsstyle +MKDIR ?= mkdir -p +MV ?= mv +RESTDOWN_FLAGS ?= +RMTREE ?= rm -rf +JSL_FLAGS ?= --nologo --nosummary + +ifeq ($(shell uname -s),SunOS) + TAR ?= gtar +else + TAR ?= tar +endif + + +# +# Defaults for other fixed values. +# +BUILD = build +DISTCLEAN_FILES += $(BUILD) +DOC_BUILD = $(BUILD)/docs/public + +# +# Configure JSL_FLAGS_{NODE,WEB} based on JSL_CONF_{NODE,WEB}. +# +ifneq ($(origin JSL_CONF_NODE), undefined) + JSL_FLAGS_NODE += --conf=$(JSL_CONF_NODE) +endif + +ifneq ($(origin JSL_CONF_WEB), undefined) + JSL_FLAGS_WEB += --conf=$(JSL_CONF_WEB) +endif + +# +# Targets. For descriptions on what these are supposed to do, see the +# Joyent Engineering Guide. +# + +# +# Instruct make to keep around temporary files. We have rules below that +# automatically update git submodules as needed, but they employ a deps/*/.git +# temporary file. Without this directive, make tries to remove these .git +# directories after the build has completed. +# +.SECONDARY: $($(wildcard deps/*):%=%/.git) + +# +# This rule enables other rules that use files from a git submodule to have +# those files depend on deps/module/.git and have "make" automatically check +# out the submodule as needed. +# +deps/%/.git: + git submodule update --init deps/$* + +# +# These recipes make heavy use of dynamically-created phony targets. The parent +# Makefile defines a list of input files like BASH_FILES. We then say that each +# of these files depends on a fake target called filename.bashchk, and then we +# define a pattern rule for those targets that runs bash in check-syntax-only +# mode. This mechanism has the nice properties that if you specify zero files, +# the rule becomes a noop (unlike a single rule to check all bash files, which +# would invoke bash with zero files), and you can check individual files from +# the command line with "make filename.bashchk". +# +.PHONY: check-bash +check-bash: $(BASH_FILES:%=%.bashchk) $(BASH_FILES:%=%.bashstyle) + +%.bashchk: % + $(BASH) -n $^ + +%.bashstyle: % + $(BASHSTYLE) $^ + +.PHONY: check-jsl check-jsl-node check-jsl-web +check-jsl: check-jsl-node check-jsl-web + +check-jsl-node: $(JSL_FILES_NODE:%=%.jslnodechk) + +check-jsl-web: $(JSL_FILES_WEB:%=%.jslwebchk) + +%.jslnodechk: % $(JSL_EXEC) + $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_NODE) $< + +%.jslwebchk: % $(JSL_EXEC) + $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_WEB) $< + +.PHONY: check-jsstyle +check-jsstyle: $(JSSTYLE_FILES:%=%.jsstylechk) + +%.jsstylechk: % $(JSSTYLE_EXEC) + $(JSSTYLE) $(JSSTYLE_FLAGS) $< + +.PHONY: check +check: check-jsl check-jsstyle check-bash + @echo check ok + +.PHONY: clean +clean:: + -$(RMTREE) $(CLEAN_FILES) + +.PHONY: distclean +distclean:: clean + -$(RMTREE) $(DISTCLEAN_FILES) + +CSCOPE_FILES = cscope.in.out cscope.out cscope.po.out +CLEAN_FILES += $(CSCOPE_FILES) + +.PHONY: xref +xref: cscope.files + $(CSCOPE) -bqR + +.PHONY: cscope.files +cscope.files: + find $(CSCOPE_DIRS) -name '*.c' -o -name '*.h' -o -name '*.cc' \ + -o -name '*.js' -o -name '*.s' -o -name '*.cpp' > $@ + +# +# The "docs" target is complicated because we do several things here: +# +# (1) Use restdown to build HTML and JSON files from each of DOC_FILES. +# +# (2) Copy these files into $(DOC_BUILD) (build/docs/public), which +# functions as a complete copy of the documentation that could be +# mirrored or served over HTTP. +# +# (3) Then copy any directories and media from docs/media into +# $(DOC_BUILD)/media. This allows projects to include their own media, +# including files that will override same-named files provided by +# restdown. +# +# Step (3) is the surprisingly complex part: in order to do this, we need to +# identify the subdirectories in docs/media, recreate them in +# $(DOC_BUILD)/media, then do the same with the files. +# +DOC_MEDIA_DIRS := $(shell find docs/media -type d 2>/dev/null | grep -v "^docs/media$$") +DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/media/%=%) +DOC_MEDIA_DIRS_BUILD := $(DOC_MEDIA_DIRS:%=$(DOC_BUILD)/media/%) + +DOC_MEDIA_FILES := $(shell find docs/media -type f 2>/dev/null) +DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/media/%=%) +DOC_MEDIA_FILES_BUILD := $(DOC_MEDIA_FILES:%=$(DOC_BUILD)/media/%) + +# +# Like the other targets, "docs" just depends on the final files we want to +# create in $(DOC_BUILD), leveraging other targets and recipes to define how +# to get there. +# +.PHONY: docs +docs: \ + $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.html) \ + $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.json) \ + $(DOC_MEDIA_FILES_BUILD) + +# +# We keep the intermediate files so that the next build can see whether the +# files in DOC_BUILD are up to date. +# +.PRECIOUS: \ + $(DOC_FILES:%.restdown=docs/%.html) \ + $(DOC_FILES:%.restdown=docs/%json) + +# +# We do clean those intermediate files, as well as all of DOC_BUILD. +# +CLEAN_FILES += \ + $(DOC_BUILD) \ + $(DOC_FILES:%.restdown=docs/%.html) \ + $(DOC_FILES:%.restdown=docs/%.json) + +# +# Before installing the files, we must make sure the directories exist. The | +# syntax tells make that the dependency need only exist, not be up to date. +# Otherwise, it might try to rebuild spuriously because the directory itself +# appears out of date. +# +$(DOC_MEDIA_FILES_BUILD): | $(DOC_MEDIA_DIRS_BUILD) + +$(DOC_BUILD)/%: docs/% | $(DOC_BUILD) + $(CP) $< $@ + +docs/%.json docs/%.html: docs/%.restdown | $(DOC_BUILD) $(RESTDOWN_EXEC) + $(RESTDOWN) $(RESTDOWN_FLAGS) -m $(DOC_BUILD) $< + +$(DOC_BUILD): + $(MKDIR) $@ + +$(DOC_MEDIA_DIRS_BUILD): + $(MKDIR) $@ + +# +# The default "test" target does nothing. This should usually be overridden by +# the parent Makefile. It's included here so we can define "prepush" without +# requiring the repo to define "test". +# +.PHONY: test +test: + +.PHONY: prepush +prepush: check test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md new file mode 100644 index 00000000000..e9b5497851c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md @@ -0,0 +1,120 @@ +# verror: richer JavaScript errors + +This module provides two classes: VError, for accretive errors, and WError, for +wrapping errors. Both support printf-style error messages using extsprintf. + +## Printf-style errors + +At the most basic level, VError is just like JavaScript's Error class, but with +printf-style arguments: + + var verror = require('verror'); + + var opname = 'read'; + var err = new verror.VError('"%s" operation failed', opname); + console.log(err.message); + console.log(err.stack); + +This prints: + + "read" operation failed + "read" operation failed + at Object. (/Users/dap/node-verror/examples/varargs.js:4:11) + at Module._compile (module.js:449:26) + at Object.Module._extensions..js (module.js:467:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Module.runMain (module.js:492:10) + at process.startup.processNextTick.process._tickCallback (node.js:244:9) + + +## VError for accretive error messages + +More interestingly, you can use VError to build up an error describing what +happened at various levels in the stack. For example, suppose you have a +request handler that stats a file and fails if it doesn't exist: + + var fs = require('fs'); + var verror = require('verror'); + + function checkFile(filename, callback) { + fs.stat(filename, function (err) { + if (err) + /* Annotate the "stat" error with what we were doing. */ + return (callback(new verror.VError(err, + 'failed to check "%s"', filename))); + + /* ... */ + }); + } + + function handleRequest(filename, callback) { + checkFile('/nonexistent', function (err) { + if (err) { + /* Annotate the "checkFile" error with what we were doing. */ + return (callback(new verror.VError(err, 'request failed'))); + } + + /* ... */ + }); + } + + handleRequest('/nonexistent', function (err) { + if (err) + console.log(err.message); + /* ... */ + }); + +Since the file "/nonexistent" doesn't exist, this prints out: + + request failed: failed to check "/nonexistent": ENOENT, stat '/nonexistent' + +The idea here is that the lowest level (Node's "fs.stat" function) generates an +arbitrary error, and each higher level (request handler and stat callback) +creates a new VError that annotates the previous error with what it was doing, +so that the result is a clear message explaining what failed at each level. + +This plays nicely with extsprintf's "%r" specifier, which prints out a +Java-style stacktrace with the whole chain of exceptions: + + EXCEPTION: VError: request failed: failed to check "/nonexistent": ENOENT, stat '/nonexistent' + at /Users/dap/work/node-verror/examples/levels.js:21:21 + at /Users/dap/work/node-verror/examples/levels.js:9:12 + at Object.oncomplete (fs.js:297:15) + Caused by: EXCEPTION: VError: failed to check "/nonexistent": ENOENT, stat '/nonexistent' + at /Users/dap/work/node-verror/examples/levels.js:9:21 + at Object.oncomplete (fs.js:297:15) + Caused by: EXCEPTION: Error: Error: ENOENT, stat '/nonexistent' + + +## WError for wrapped errors + +Sometimes you don't want an Error's "message" field to include the details of +all of the low-level errors, but you still want to be able to get at them +programmatically. For example, in an HTTP server, you probably don't want to +spew all of the low-level errors back to the client, but you do want to include +them in the audit log entry for the request. In that case, you can use a +WError, which is created exactly like VError (and also supports both +printf-style arguments and an optional cause), but the resulting "message" only +contains the top-level error. It's also more verbose, including the class +associated with each error in the cause chain. Using the same example above, +but replacing the VError in handleRequest with WError, we get this output: + + request failed + +That's what we wanted -- just a high-level summary for the client. But we can +get the object's toString() for the full details: + + WError: request failed; caused by WError: failed to check "/nonexistent"; + caused by Error: ENOENT, stat '/nonexistent' + +# Contributing + +Contributions welcome. Code should be "make check" clean. To run "make check", +you'll need these tools: + +* https://github.com/davepacheco/jsstyle +* https://github.com/davepacheco/javascriptlint + +If you're changing something non-trivial or user-facing, you may want to submit +an issue first. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js new file mode 100644 index 00000000000..53a7022c6cd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js @@ -0,0 +1,36 @@ +var extsprintf = require('extsprintf'); +var fs = require('fs'); +var verror = require('../lib/verror'); + +function checkFile(filename, callback) { + fs.stat(filename, function (err) { + if (err) + /* Annotate the "stat" error with what we were doing. */ + return (callback(new verror.VError(err, + 'failed to check "%s"', filename))); + + /* ... */ + return (callback()); + }); +} + +function handleRequest(filename, callback) { + checkFile('/nonexistent', function (err) { + if (err) + /* Annotate the "checkFile" error. */ + return (callback(new verror.VError( + err, 'request failed'))); + + /* ... */ + return (callback()); + }); +} + +handleRequest('/nonexistent', function (err) { + if (err) { + console.log(err.message); + console.log(extsprintf.sprintf('%r', err)); + } + + /* ... */ +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js new file mode 100644 index 00000000000..7e570756ebc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js @@ -0,0 +1,34 @@ +var extsprintf = require('extsprintf'); +var fs = require('fs'); +var verror = require('../lib/verror'); + +function checkFile(filename, callback) { + fs.stat(filename, function (err) { + if (err) + /* Annotate the "stat" error with what we were doing. */ + return (callback(new verror.VError(err, + 'failed to check "%s"', filename))); + + /* ... */ + return (callback()); + }); +} + +function handleRequest(filename, callback) { + checkFile('/nonexistent', function (err) { + if (err) + /* Wrap the "checkFile" error. */ + return (callback(new verror.WError( + err, 'request failed'))); + + /* ... */ + return (callback()); + }); +} + +handleRequest('/nonexistent', function (err) { + if (err) { + console.log(err.message); + console.log(err.toString()); + } +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js new file mode 100644 index 00000000000..2e14ee48c5a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js @@ -0,0 +1,6 @@ +var verror = require('../lib/verror'); + +var opname = 'read'; +var err = new verror.VError('"%s" operation failed', opname); +console.log(err.message); +console.log(err.stack); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js new file mode 100644 index 00000000000..887b181b056 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js @@ -0,0 +1,13 @@ +var mod_fs = require('fs'); +var mod_verror = require('../lib/verror'); + +var filename = '/nonexistent'; + +mod_fs.stat(filename, function (err1) { + var err2 = new mod_verror.VError(err1, 'failed to stat "%s"', filename); + + /* The following would normally be higher up the stack. */ + var err3 = new mod_verror.VError(err2, 'failed to handle request'); + console.log(err3.message); + console.log(err3.stack); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js new file mode 100644 index 00000000000..f55e5322ead --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js @@ -0,0 +1,14 @@ +var mod_fs = require('fs'); +var mod_verror = require('../lib/verror'); + +var filename = '/nonexistent'; + +mod_fs.stat(filename, function (err1) { + var err2 = new mod_verror.WError(err1, 'failed to stat "%s"', filename); + + /* The following would normally be higher up the stack. */ + var err3 = new mod_verror.WError(err2, 'failed to handle request'); + console.log(err3.message); + console.log(err3.toString()); + console.log(err3.stack); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf new file mode 100644 index 00000000000..bd724a2c784 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf @@ -0,0 +1,139 @@ +# +# Configuration File for JavaScript Lint +# +# This configuration file can be used to lint a collection of scripts, or to enable +# or disable warnings for scripts that are linted via the command line. +# + +### Warnings +# Enable or disable warnings based on requirements. +# Use "+WarningName" to display or "-WarningName" to suppress. +# ++ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent ++ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity ++ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement ++anon_no_return_value # anonymous function does not always return value ++assign_to_function_call # assignment to a function call +-block_without_braces # block statement without curly braces ++comma_separated_stmts # multiple statements separated by commas (use semicolons?) ++comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) ++default_not_at_end # the default case is not at the end of the switch statement ++dup_option_explicit # duplicate "option explicit" control comment ++duplicate_case_in_switch # duplicate case in switch statement ++duplicate_formal # duplicate formal argument {name} ++empty_statement # empty statement or extra semicolon ++identifier_hides_another # identifer {name} hides an identifier in a parent scope +-inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement ++incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version. ++invalid_fallthru # unexpected "fallthru" control comment ++invalid_pass # unexpected "pass" control comment ++jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax ++leading_decimal_point # leading decimal point may indicate a number or an object member ++legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax ++meaningless_block # meaningless block; curly braces have no impact ++mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence ++misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma ++missing_break # missing break statement ++missing_break_for_last_case # missing break statement for last case in switch ++missing_default_case # missing default case in switch statement ++missing_option_explicit # the "option explicit" control comment is missing ++missing_semicolon # missing semicolon ++missing_semicolon_for_lambda # missing semicolon for lambda assignment ++multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs ++nested_comment # nested comment ++no_return_value # function {name} does not always return a value ++octal_number # leading zeros make an octal number ++parseint_missing_radix # parseInt missing radix parameter ++partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag ++redeclared_var # redeclaration of {name} ++trailing_comma_in_array # extra comma is not recommended in array initializers ++trailing_decimal_point # trailing decimal point may indicate a number or an object member ++undeclared_identifier # undeclared identifier: {name} ++unreachable_code # unreachable code +-unreferenced_argument # argument declared but never referenced: {name} +-unreferenced_function # function is declared but never referenced: {name} ++unreferenced_variable # variable is declared but never referenced: {name} ++unsupported_version # JavaScript {version} is not supported ++use_of_label # use of label ++useless_assign # useless assignment ++useless_comparison # useless comparison; comparing identical expressions +-useless_quotes # the quotation marks are unnecessary ++useless_void # use of the void type may be unnecessary (void is always undefined) ++var_hides_arg # variable {name} hides argument ++want_assign_or_call # expected an assignment or function call ++with_statement # with statement hides undeclared variables; use temporary variable instead + + +### Output format +# Customize the format of the error message. +# __FILE__ indicates current file path +# __FILENAME__ indicates current file name +# __LINE__ indicates current line +# __COL__ indicates current column +# __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__) +# __ERROR_NAME__ indicates error name (used in configuration file) +# __ERROR_PREFIX__ indicates error prefix +# __ERROR_MSG__ indicates error message +# +# For machine-friendly output, the output format can be prefixed with +# "encode:". If specified, all items will be encoded with C-slashes. +# +# Visual Studio syntax (default): ++output-format __FILE__(__LINE__): __ERROR__ +# Alternative syntax: +#+output-format __FILE__:__LINE__: __ERROR__ + + +### Context +# Show the in-line position of the error. +# Use "+context" to display or "-context" to suppress. +# ++context + + +### Control Comments +# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for +# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is +# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason, +# although legacy control comments are enabled by default for backward compatibility. +# +-legacy_control_comments + + +### Defining identifiers +# By default, "option explicit" is enabled on a per-file basis. +# To enable this for all files, use "+always_use_option_explicit" +-always_use_option_explicit + +# Define certain identifiers of which the lint is not aware. +# (Use this in conjunction with the "undeclared identifier" warning.) +# +# Common uses for webpages might be: ++define __dirname ++define clearInterval ++define clearTimeout ++define console ++define exports ++define global ++define process ++define require ++define setInterval ++define setTimeout ++define Buffer ++define JSON ++define Math ++define __dirname ++define __filename + +### JavaScript Version +# To change the default JavaScript version: +#+default-type text/javascript;version=1.5 +#+default-type text/javascript;e4x=1 + +### Files +# Specify which files to lint +# Use "+recurse" to enable recursion (disabled by default). +# To add a set of files, use "+process FileName", "+process Folder\Path\*.js", +# or "+process Folder\Path\*.htm". +# + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js new file mode 100644 index 00000000000..9ca087b170d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js @@ -0,0 +1,157 @@ +/* + * verror.js: richer JavaScript errors + */ + +var mod_assert = require('assert'); +var mod_util = require('util'); + +var mod_extsprintf = require('extsprintf'); + +/* + * Public interface + */ +exports.VError = VError; +exports.WError = WError; +exports.MultiError = MultiError; + +/* + * Like JavaScript's built-in Error class, but supports a "cause" argument and a + * printf-style message. The cause argument can be null. + */ +function VError(options) +{ + var args, causedBy, ctor, tailmsg; + + if (options instanceof Error || typeof (options) === 'object') { + args = Array.prototype.slice.call(arguments, 1); + } else { + args = Array.prototype.slice.call(arguments, 0); + options = undefined; + } + + tailmsg = args.length > 0 ? + mod_extsprintf.sprintf.apply(null, args) : ''; + this.jse_shortmsg = tailmsg; + this.jse_summary = tailmsg; + + if (options) { + causedBy = options.cause; + + if (!causedBy || !(options.cause instanceof Error)) + causedBy = options; + + if (causedBy && (causedBy instanceof Error)) { + this.jse_cause = causedBy; + this.jse_summary += ': ' + causedBy.message; + } + } + + this.message = this.jse_summary; + Error.call(this, this.jse_summary); + + if (Error.captureStackTrace) { + ctor = options ? options.constructorOpt : undefined; + ctor = ctor || arguments.callee; + Error.captureStackTrace(this, ctor); + } +} + +mod_util.inherits(VError, Error); +VError.prototype.name = 'VError'; + +VError.prototype.toString = function ve_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + + return (str); +}; + +VError.prototype.cause = function ve_cause() +{ + return (this.jse_cause); +}; + + +/* + * Represents a collection of errors for the purpose of consumers that generally + * only deal with one error. Callers can extract the individual errors + * contained in this object, but may also just treat it as a normal single + * error, in which case a summary message will be printed. + */ +function MultiError(errors) +{ + mod_assert.ok(errors.length > 0); + this.ase_errors = errors; + + VError.call(this, errors[0], 'first of %d error%s', + errors.length, errors.length == 1 ? '' : 's'); +} + +mod_util.inherits(MultiError, VError); + + + +/* + * Like JavaScript's built-in Error class, but supports a "cause" argument which + * is wrapped, not "folded in" as with VError. Accepts a printf-style message. + * The cause argument can be null. + */ +function WError(options) +{ + Error.call(this); + + var args, cause, ctor; + if (typeof (options) === 'object') { + args = Array.prototype.slice.call(arguments, 1); + } else { + args = Array.prototype.slice.call(arguments, 0); + options = undefined; + } + + if (args.length > 0) { + this.message = mod_extsprintf.sprintf.apply(null, args); + } else { + this.message = ''; + } + + if (options) { + if (options instanceof Error) { + cause = options; + } else { + cause = options.cause; + ctor = options.constructorOpt; + } + } + + Error.captureStackTrace(this, ctor || this.constructor); + if (cause) + this.cause(cause); + +} + +mod_util.inherits(WError, Error); +WError.prototype.name = 'WError'; + + +WError.prototype.toString = function we_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + if (this.we_cause && this.we_cause.message) + str += '; caused by ' + this.we_cause.toString(); + + return (str); +}; + +WError.prototype.cause = function we_cause(c) +{ + if (c instanceof Error) + this.we_cause = c; + + return (this.we_cause); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json new file mode 100644 index 00000000000..e4aa71c198a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "verror@1.3.6", + "/Users/eshanker/Code/fsevents/node_modules/jsprim" + ] + ], + "_from": "verror@1.3.6", + "_id": "verror@1.3.6", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/verror", + "_npmUser": { + "email": "dap@cs.brown.edu", + "name": "dap" + }, + "_npmVersion": "1.1.65", + "_phantomChildren": {}, + "_requested": { + "name": "verror", + "raw": "verror@1.3.6", + "rawSpec": "1.3.6", + "scope": null, + "spec": "1.3.6", + "type": "version" + }, + "_requiredBy": [ + "/fsevents/jsprim" + ], + "_resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "_shasum": "cff5df12946d297d2baaefaa2689e25be01c005c", + "_shrinkwrap": null, + "_spec": "verror@1.3.6", + "_where": "/Users/eshanker/Code/fsevents/node_modules/jsprim", + "bugs": { + "url": "https://github.com/davepacheco/node-verror/issues" + }, + "dependencies": { + "extsprintf": "1.0.2" + }, + "description": "richer JavaScript errors", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "cff5df12946d297d2baaefaa2689e25be01c005c", + "tarball": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz" + }, + "engines": [ + "node >=0.6.0" + ], + "homepage": "https://github.com/davepacheco/node-verror#readme", + "main": "./lib/verror.js", + "maintainers": [ + { + "email": "dap@cs.brown.edu", + "name": "dap" + } + ], + "name": "verror", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/davepacheco/node-verror.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.3.6" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js new file mode 100644 index 00000000000..0f0d70b5f63 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js @@ -0,0 +1,100 @@ +/* + * tst.inherit.js: test that inheriting from VError and WError work as expected. + */ + +var mod_assert = require('assert'); +var mod_util = require('util'); + +var mod_verror = require('../lib/verror'); + +var VError = mod_verror.VError; +var WError = mod_verror.WError; +var err, suberr; + +function VErrorChild() +{ + VError.apply(this, Array.prototype.slice.call(arguments)); +} + +mod_util.inherits(VErrorChild, VError); +VErrorChild.prototype.name = 'VErrorChild'; + + +function WErrorChild() +{ + WError.apply(this, Array.prototype.slice.call(arguments)); +} + +mod_util.inherits(WErrorChild, WError); +WErrorChild.prototype.name = 'WErrorChild'; + + +suberr = new Error('root cause'); +err = new VErrorChild(suberr, 'top'); +mod_assert.ok(err instanceof Error); +mod_assert.ok(err instanceof VError); +mod_assert.ok(err instanceof VErrorChild); +mod_assert.equal(err.cause(), suberr); +mod_assert.equal(err.message, 'top: root cause'); +mod_assert.equal(err.toString(), 'VErrorChild: top: root cause'); +mod_assert.equal(err.stack.split('\n')[0], 'VErrorChild: top: root cause'); + +suberr = new Error('root cause'); +err = new WErrorChild(suberr, 'top'); +mod_assert.ok(err instanceof Error); +mod_assert.ok(err instanceof WError); +mod_assert.ok(err instanceof WErrorChild); +mod_assert.equal(err.cause(), suberr); +mod_assert.equal(err.message, 'top'); +mod_assert.equal(err.toString(), + 'WErrorChild: top; caused by Error: root cause'); +mod_assert.equal(err.stack.split('\n')[0], + 'WErrorChild: top; caused by Error: root cause'); + + +// Test that `.toString()` uses the ctor name. I.e. setting +// `.prototype.name` isn't necessary. +function VErrorChildNoName() { + VError.apply(this, Array.prototype.slice.call(arguments)); +} +mod_util.inherits(VErrorChildNoName, VError); +err = new VErrorChildNoName('top'); +mod_assert.equal(err.toString(), 'VErrorChildNoName: top'); + +function WErrorChildNoName() { + WError.apply(this, Array.prototype.slice.call(arguments)); +} +mod_util.inherits(WErrorChildNoName, WError); +err = new WErrorChildNoName('top'); +mod_assert.equal(err.toString(), 'WErrorChildNoName: top'); + + +// Test that `.prototype.name` can be used for the `.toString()` +// when the ctor is anonymous. +var VErrorChildAnon = function () { + VError.apply(this, Array.prototype.slice.call(arguments)); +}; +mod_util.inherits(VErrorChildAnon, VError); +VErrorChildAnon.prototype.name = 'VErrorChildAnon'; +err = new VErrorChildAnon('top'); +mod_assert.equal(err.toString(), 'VErrorChildAnon: top'); + +var WErrorChildAnon = function () { + WError.apply(this, Array.prototype.slice.call(arguments)); +}; +mod_util.inherits(WErrorChildAnon, WError); +WErrorChildAnon.prototype.name = 'WErrorChildAnon'; +err = new WErrorChildAnon('top'); +mod_assert.equal(err.toString(), 'WErrorChildAnon: top'); + + +// Test get appropriate exception name in `.toString()` when reconstituting +// an error instance a la: +// https://github.com/mcavage/node-fast/blob/master/lib/client.js#L215 +err = new VError('top'); +err.name = 'CustomNameError'; +mod_assert.equal(err.toString(), 'CustomNameError: top'); + +err = new WError('top'); +err.name = 'CustomNameError'; +mod_assert.equal(err.toString(), 'CustomNameError: top'); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js new file mode 100644 index 00000000000..ee937cd00db --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js @@ -0,0 +1,156 @@ +/* + * tst.verror.js: tests basic functionality of the VError class. + */ + +var mod_assert = require('assert'); +var mod_verror = require('../lib/verror'); + +var VError = mod_verror.VError; +var WError = mod_verror.WError; + +var err, suberr, stack, substack; + +/* + * Remove full paths and relative line numbers from stack traces so that we can + * compare against "known-good" output. + */ +function cleanStack(stacktxt) +{ + var re = new RegExp(__filename + ':\\d+:\\d+', 'gm'); + stacktxt = stacktxt.replace(re, 'tst.verror.js'); + return (stacktxt); +} + +/* + * Save the generic parts of all stack traces so we can avoid hardcoding + * Node-specific implementation details in our testing of stack traces. + */ +var nodestack = new Error().stack.split('\n').slice(2).join('\n'); + +/* no arguments */ +err = new VError(); +mod_assert.equal(err.name, 'VError'); +mod_assert.ok(err instanceof Error); +mod_assert.ok(err instanceof VError); +mod_assert.equal(err.message, ''); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); + +/* options-argument form */ +err = new VError({}); +mod_assert.equal(err.message, ''); +mod_assert.ok(err.cause() === undefined); + +/* simple message */ +err = new VError('my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError: my error', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); + +err = new VError({}, 'my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.ok(err.cause() === undefined); + +/* printf-style message */ +err = new VError('%s error: %3d problems', 'very bad', 15); +mod_assert.equal(err.message, 'very bad error: 15 problems'); +mod_assert.ok(err.cause() === undefined); + +err = new VError({}, '%s error: %3d problems', 'very bad', 15); +mod_assert.equal(err.message, 'very bad error: 15 problems'); +mod_assert.ok(err.cause() === undefined); + +/* caused by another error, with no additional message */ +suberr = new Error('root cause'); +err = new VError(suberr); +mod_assert.equal(err.message, ': root cause'); +mod_assert.ok(err.cause() === suberr); + +err = new VError({ 'cause': suberr }); +mod_assert.equal(err.message, ': root cause'); +mod_assert.ok(err.cause() === suberr); + +/* caused by another error, with annotation */ +err = new VError(suberr, 'proximate cause: %d issues', 3); +mod_assert.equal(err.message, 'proximate cause: 3 issues: root cause'); +mod_assert.ok(err.cause() === suberr); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError: proximate cause: 3 issues: root cause', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); + +err = new VError({ 'cause': suberr }, 'proximate cause: %d issues', 3); +mod_assert.equal(err.message, 'proximate cause: 3 issues: root cause'); +mod_assert.ok(err.cause() === suberr); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError: proximate cause: 3 issues: root cause', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); + +/* caused by another VError, with annotation. */ +suberr = err; +err = new VError(suberr, 'top'); +mod_assert.equal(err.message, 'top: proximate cause: 3 issues: root cause'); +mod_assert.ok(err.cause() === suberr); + +err = new VError({ 'cause': suberr }, 'top'); +mod_assert.equal(err.message, 'top: proximate cause: 3 issues: root cause'); +mod_assert.ok(err.cause() === suberr); + +/* caused by a WError */ +suberr = new WError(new Error('root cause'), 'mid'); +err = new VError(suberr, 'top'); +mod_assert.equal(err.message, 'top: mid'); +mod_assert.ok(err.cause() === suberr); + +/* null cause (for backwards compatibility with older versions) */ +err = new VError(null, 'my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError: my error', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); + +err = new VError({ 'cause': null }, 'my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.ok(err.cause() === undefined); + +err = new VError(null); +mod_assert.equal(err.message, ''); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); + +/* constructorOpt */ +function makeErr(options) { + return (new VError(options, 'test error')); +} +err = makeErr({}); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError: test error', + ' at makeErr (tst.verror.js)', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); + +err = makeErr({ 'constructorOpt': makeErr }); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'VError: test error', + ' at Object. (tst.verror.js)' +].join('\n') + '\n' + nodestack); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js new file mode 100644 index 00000000000..c8cdc615afa --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js @@ -0,0 +1,179 @@ +/* + * tst.werror.js: tests basic functionality of the WError class. + */ + +var mod_assert = require('assert'); +var mod_verror = require('../lib/verror'); + +var VError = mod_verror.VError; +var WError = mod_verror.WError; + +var err, suberr, stack, substack; + +/* + * Remove full paths and relative line numbers from stack traces so that we can + * compare against "known-good" output. + */ +function cleanStack(stacktxt) +{ + var re = new RegExp(__filename + ':\\d+:\\d+', 'gm'); + stacktxt = stacktxt.replace(re, 'tst.werror.js'); + return (stacktxt); +} + +/* + * Save the generic parts of all stack traces so we can avoid hardcoding + * Node-specific implementation details in our testing of stack traces. + */ +var nodestack = new Error().stack.split('\n').slice(2).join('\n'); + +/* no arguments */ +err = new WError(); +mod_assert.equal(err.name, 'WError'); +mod_assert.ok(err instanceof Error); +mod_assert.ok(err instanceof WError); +mod_assert.equal(err.message, ''); +mod_assert.equal(err.toString(), 'WError'); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); + +/* options-argument form */ +err = new WError({}); +mod_assert.equal(err.message, ''); +mod_assert.equal(err.toString(), 'WError'); +mod_assert.ok(err.cause() === undefined); + +/* simple message */ +err = new WError('my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.equal(err.toString(), 'WError: my error'); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError: my error', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); + +err = new WError({}, 'my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.equal(err.toString(), 'WError: my error'); +mod_assert.ok(err.cause() === undefined); + +/* printf-style message */ +err = new WError('%s error: %3d problems', 'very bad', 15); +mod_assert.equal(err.message, 'very bad error: 15 problems'); +mod_assert.equal(err.toString(), 'WError: very bad error: 15 problems'); +mod_assert.ok(err.cause() === undefined); + +err = new WError({}, '%s error: %3d problems', 'very bad', 15); +mod_assert.equal(err.message, 'very bad error: 15 problems'); +mod_assert.equal(err.toString(), 'WError: very bad error: 15 problems'); +mod_assert.ok(err.cause() === undefined); + +/* caused by another error, with no additional message */ +suberr = new Error('root cause'); +err = new WError(suberr); +mod_assert.equal(err.message, ''); +mod_assert.equal(err.toString(), 'WError; caused by Error: root cause'); +mod_assert.ok(err.cause() === suberr); + +err = new WError({ 'cause': suberr }); +mod_assert.equal(err.message, ''); +mod_assert.equal(err.toString(), 'WError; caused by Error: root cause'); +mod_assert.ok(err.cause() === suberr); + +/* caused by another error, with annotation */ +err = new WError(suberr, 'proximate cause: %d issues', 3); +mod_assert.equal(err.message, 'proximate cause: 3 issues'); +mod_assert.equal(err.toString(), 'WError: proximate cause: 3 issues; ' + + 'caused by Error: root cause'); +mod_assert.ok(err.cause() === suberr); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError: proximate cause: 3 issues; caused by Error: root cause', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); + +err = new WError({ 'cause': suberr }, 'proximate cause: %d issues', 3); +mod_assert.equal(err.message, 'proximate cause: 3 issues'); +mod_assert.equal(err.toString(), 'WError: proximate cause: 3 issues; ' + + 'caused by Error: root cause'); +mod_assert.ok(err.cause() === suberr); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError: proximate cause: 3 issues; caused by Error: root cause', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); + +/* caused by another WError, with annotation. */ +suberr = err; +err = new WError(suberr, 'top'); +mod_assert.equal(err.message, 'top'); +mod_assert.equal(err.toString(), 'WError: top; caused by WError: ' + + 'proximate cause: 3 issues; caused by Error: root cause'); +mod_assert.ok(err.cause() === suberr); + +err = new WError({ 'cause': suberr }, 'top'); +mod_assert.equal(err.message, 'top'); +mod_assert.equal(err.toString(), 'WError: top; caused by WError: ' + + 'proximate cause: 3 issues; caused by Error: root cause'); +mod_assert.ok(err.cause() === suberr); + +/* caused by a VError */ +suberr = new VError(new Error('root cause'), 'mid'); +err = new WError(suberr, 'top'); +mod_assert.equal(err.message, 'top'); +mod_assert.equal(err.toString(), + 'WError: top; caused by VError: mid: root cause'); +mod_assert.ok(err.cause() === suberr); + +/* null cause (for backwards compatibility with older versions) */ +err = new WError(null, 'my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.equal(err.toString(), 'WError: my error'); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError: my error', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); + +err = new WError({ 'cause': null }, 'my error'); +mod_assert.equal(err.message, 'my error'); +mod_assert.equal(err.toString(), 'WError: my error'); +mod_assert.ok(err.cause() === undefined); + +err = new WError(null); +mod_assert.equal(err.message, ''); +mod_assert.equal(err.toString(), 'WError'); +mod_assert.ok(err.cause() === undefined); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); + +/* constructorOpt */ +function makeErr(options) { + return (new WError(options, 'test error')); +} +err = makeErr({}); +mod_assert.equal(err.toString(), 'WError: test error'); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError: test error', + ' at makeErr (tst.werror.js)', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); + +err = makeErr({ 'constructorOpt': makeErr }); +mod_assert.equal(err.toString(), 'WError: test error'); +stack = cleanStack(err.stack); +mod_assert.equal(stack, [ + 'WError: test error', + ' at Object. (tst.werror.js)' +].join('\n') + '\n' + nodestack); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore new file mode 100644 index 00000000000..d1a6b0054bc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore @@ -0,0 +1,5 @@ +*~ +/node_modules +.#* +/.nyc_output +/coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE new file mode 100644 index 00000000000..f4be44d881b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md new file mode 100644 index 00000000000..32f1be04f09 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md @@ -0,0 +1,47 @@ +wide-align +---------- + +A wide-character aware text alignment function for use in terminals / on the +console. + +### Usage + +``` +var align = require('wide-align') + +// Note that if you view this on a unicode console, all of the slashes are +// aligned. This is because on a console, all narrow characters are +// an en wide and all wide characters are an em. In browsers, this isn't +// held to and wide characters like "古" can be less than two narrow +// characters even with a fixed width font. + +console.log(align.center('abc', 10)) // ' abc ' +console.log(align.center('古古古', 10)) // ' 古古古 ' +console.log(align.left('abc', 10)) // 'abc ' +console.log(align.left('古古古', 10)) // '古古古 ' +console.log(align.right('abc', 10)) // ' abc' +console.log(align.right('古古古', 10)) // ' 古古古' +``` + +### Functions + +#### `align.center(str, length)` → `str` + +Returns *str* with spaces added to both sides such that that it is *length* +chars long and centered in the spaces. + +#### `align.left(str, length)` → `str` + +Returns *str* with spaces to the right such that it is *length* chars long. + +### `align.right(str, length)` → `str` + +Returns *str* with spaces to the left such that it is *length* chars long. + +### Origins + +These functions were originally taken from +[cliui](https://npmjs.com/package/cliui). Changes include switching to the +MUCH faster pad generation function from +[lodash](https://npmjs.com/package/lodash), making center alignment pad +both sides and adding left alignment. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js new file mode 100644 index 00000000000..4f94ca4cde1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js @@ -0,0 +1,65 @@ +'use strict' +var stringWidth = require('string-width') + +exports.center = alignCenter +exports.left = alignLeft +exports.right = alignRight + +// lodash's way of generating pad characters. + +function createPadding (width) { + var result = '' + var string = ' ' + var n = width + do { + if (n % 2) { + result += string; + } + n = Math.floor(n / 2); + string += string; + } while (n); + + return result; +} + +function alignLeft (str, width) { + var trimmed = str.trimRight() + if (trimmed.length === 0 && str.length >= width) return str + var padding = '' + var strWidth = stringWidth(trimmed) + + if (strWidth < width) { + padding = createPadding(width - strWidth) + } + + return trimmed + padding +} + +function alignRight (str, width) { + var trimmed = str.trimLeft() + if (trimmed.length === 0 && str.length >= width) return str + var padding = '' + var strWidth = stringWidth(trimmed) + + if (strWidth < width) { + padding = createPadding(width - strWidth) + } + + return padding + trimmed +} + +function alignCenter (str, width) { + var trimmed = str.trim() + if (trimmed.length === 0 && str.length >= width) return str + var padLeft = '' + var padRight = '' + var strWidth = stringWidth(trimmed) + + if (strWidth < width) { + var padLeftBy = parseInt((width - strWidth) / 2, 10) + padLeft = createPadding(padLeftBy) + padRight = createPadding(width - (strWidth + padLeftBy)) + } + + return padLeft + trimmed + padRight +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json new file mode 100644 index 00000000000..ecf0663559b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + "wide-align@^1.1.0", + "/Users/eshanker/Code/fsevents/node_modules/gauge" + ] + ], + "_from": "wide-align@>=1.1.0 <2.0.0", + "_id": "wide-align@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/wide-align", + "_nodeVersion": "4.2.2", + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.5.3", + "_phantomChildren": {}, + "_requested": { + "name": "wide-align", + "raw": "wide-align@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/gauge" + ], + "_resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", + "_shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", + "_shrinkwrap": null, + "_spec": "wide-align@^1.1.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", + "author": { + "email": "me@re-becca.org", + "name": "Rebecca Turner", + "url": "http://re-becca.org/" + }, + "bugs": { + "url": "https://github.com/iarna/wide-align/issues" + }, + "dependencies": { + "string-width": "^1.0.1" + }, + "description": "A wide-character aware text alignment function for use on the console or with fixed width fonts.", + "devDependencies": { + "tap": "^2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", + "tarball": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz" + }, + "gitHead": "fe3f7f210650913d5bee702d7e19938f6977bc8a", + "homepage": "https://github.com/iarna/wide-align#readme", + "keywords": [ + "align", + "cjkv", + "double", + "pad", + "unicode", + "wide" + ], + "license": "ISC", + "main": "align.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "name": "wide-align", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/wide-align.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.1.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js new file mode 100644 index 00000000000..64e9f9dbda4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js @@ -0,0 +1,37 @@ +'use strict' +var test = require('tap').test +var align = require('..') + +test('align', function (t) { + t.is(align.center('abc', 10), ' abc ', 'center narrow') + t.is(align.center('古古古', 10), ' 古古古 ', 'center wide') + t.is(align.left('abc', 10), 'abc ', 'left narrow') + t.is(align.left('古古古', 10), '古古古 ', 'left wide') + t.is(align.right('abc', 10), ' abc', 'right narrow') + t.is(align.right('古古古', 10), ' 古古古', 'right wide') + + t.is(align.center('abc', 2), 'abc', 'center narrow overflow') + t.is(align.center('古古古', 4), '古古古', 'center wide overflow') + t.is(align.left('abc', 2), 'abc', 'left narrow overflow') + t.is(align.left('古古古', 4), '古古古', 'left wide overflow') + t.is(align.right('abc', 2), 'abc', 'right narrow overflow') + t.is(align.right('古古古', 4), '古古古', 'right wide overflow') + + t.is(align.left('', 5), ' ', 'left align nothing') + t.is(align.center('', 5), ' ', 'center align nothing') + t.is(align.right('', 5), ' ', 'right align nothing') + + t.is(align.left(' ', 5), ' ', 'left align whitespace') + t.is(align.center(' ', 5), ' ', 'center align whitespace') + t.is(align.right(' ', 5), ' ', 'right align whitespace') + + t.is(align.left(' ', 2), ' ', 'left align whitespace overflow') + t.is(align.center(' ', 2), ' ', 'center align whitespace overflow') + t.is(align.right(' ', 2), ' ', 'right align whitespace overflow') + + t.is(align.left('x ', 10), 'x ', 'left align whitespace mix') + t.is(align.center('x ', 10), ' x ', 'center align whitespace mix') + t.is(align.right('x ', 10), ' x', 'right align whitespace mix') + + t.end() +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md new file mode 100644 index 00000000000..98eab2522b8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json new file mode 100644 index 00000000000..28e40b50e85 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "wrappy@1", + "/Users/eshanker/Code/fsevents/node_modules/inflight" + ] + ], + "_from": "wrappy@>=1.0.0 <2.0.0", + "_id": "wrappy@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/wrappy", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" + }, + "_npmUser": { + "email": "kat@sykosomatic.org", + "name": "zkat" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "name": "wrappy", + "raw": "wrappy@1", + "rawSpec": "1", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/inflight", + "/fsevents/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "_shrinkwrap": null, + "_spec": "wrappy@1", + "_where": "/Users/eshanker/Code/fsevents/node_modules/inflight", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "files": [ + "wrappy.js" + ], + "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" + } + ], + "name": "wrappy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js new file mode 100644 index 00000000000..bb7e7d6fcf7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc new file mode 100644 index 00000000000..77887b5f0f2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc @@ -0,0 +1,30 @@ +{ + "maxdepth": 4, + "maxstatements": 200, + "maxcomplexity": 12, + "maxlen": 80, + "maxparams": 5, + + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": false, + "noarg": true, + "noempty": true, + "nonew": true, + "undef": true, + "unused": "vars", + "trailing": true, + + "quotmark": true, + "expr": true, + "asi": true, + + "browser": false, + "esnext": true, + "devel": false, + "node": false, + "nonstandard": false, + + "predef": ["require", "module", "__dirname", "__filename"] +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore new file mode 100644 index 00000000000..3c3629e647f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE new file mode 100644 index 00000000000..1a14b437e87 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012-2014 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile new file mode 100644 index 00000000000..d583fcf49dc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile @@ -0,0 +1,4 @@ +browser: + node ./support/compile + +.PHONY: browser \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md new file mode 100644 index 00000000000..093cb2978e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md @@ -0,0 +1,32 @@ +# xtend + +[![browser support][3]][4] + +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. + +## Examples + +```js +var extend = require("xtend") + +// extend returns a new object. Does not mutate arguments +var combination = extend({ + a: "a", + b: 'c' +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + +## Stability status: Locked + +## MIT Licenced + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js new file mode 100644 index 00000000000..94889c9de11 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js @@ -0,0 +1,19 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js new file mode 100644 index 00000000000..72debede6ca --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js @@ -0,0 +1,17 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json new file mode 100644 index 00000000000..5498e6b6d22 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + "xtend@^4.0.0", + "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid" + ] + ], + "_from": "xtend@>=4.0.0 <5.0.0", + "_id": "xtend@4.0.1", + "_inCache": true, + "_installable": true, + "_location": "/fsevents/xtend", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "raynos2@gmail.com", + "name": "raynos" + }, + "_npmVersion": "2.14.1", + "_phantomChildren": {}, + "_requested": { + "name": "xtend", + "raw": "xtend@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents/is-my-json-valid" + ], + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "_shrinkwrap": null, + "_spec": "xtend@^4.0.0", + "_where": "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid", + "author": { + "email": "raynos2@gmail.com", + "name": "Raynos" + }, + "bugs": { + "email": "raynos2@gmail.com", + "url": "https://github.com/Raynos/xtend/issues" + }, + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "dependencies": {}, + "description": "extend like a boss", + "devDependencies": { + "tape": "~1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + }, + "engines": { + "node": ">=0.4" + }, + "gitHead": "23dc302a89756da89c1897bc732a752317e35390", + "homepage": "https://github.com/Raynos/xtend", + "keywords": [ + "array", + "extend", + "merge", + "object", + "options", + "opts" + ], + "license": "MIT", + "main": "immutable", + "maintainers": [ + { + "email": "raynos2@gmail.com", + "name": "raynos" + } + ], + "name": "xtend", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "scripts": { + "test": "node test" + }, + "testling": { + "browsers": [ + "chrome/22..latest", + "chrome/canary", + "firefox/16..latest", + "firefox/nightly", + "ie/7..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "opera/12..latest", + "opera/next", + "safari/5.1..latest" + ], + "files": "test.js" + }, + "version": "4.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js new file mode 100644 index 00000000000..093a2b061e8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js @@ -0,0 +1,83 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) + +test("null prototype", function(assert) { + var a = { a: "foo" } + var b = Object.create(null) + b.b = "bar"; + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("null prototype mutable", function (assert) { + var a = { foo: "bar" } + var b = Object.create(null) + b.bar = "baz"; + + mutableExtend(a, b) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/nodefsevents.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/nodefsevents.cc deleted file mode 100644 index cb167482125..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/nodefsevents.cc +++ /dev/null @@ -1,196 +0,0 @@ -/* -** © 2013 by Philipp Dunkel . Licensed under MIT License. -*/ - -#include -#include -#include - -#include -#include -#include - -#include - -#define MAXPATH 1024 - -typedef struct s_evt *p_evt; -struct s_evt { - FSEventStreamEventFlags flags; - FSEventStreamEventId evtid; - char path[MAXPATH + 1]; - p_evt next; -}; -static v8::Persistent constructor_template; -namespace node_fsevents { - using namespace v8; - using namespace node; - - static Persistent emit_sym; - static Persistent change_sym; - class NodeFSEvents : node::ObjectWrap { - public: - static void Initialize(v8::Handle target) { - HandleScope scope; - emit_sym = NODE_PSYMBOL("emit"); - change_sym = NODE_PSYMBOL("fsevent"); - Local t = FunctionTemplate::New(NodeFSEvents::New); - constructor_template = Persistent::New(t); - constructor_template->InstanceTemplate()->SetInternalFieldCount(1); - constructor_template->SetClassName(String::NewSymbol("FSEvents")); - Local constructor = constructor_template->GetFunction(); - - constructor->Set(String::New("kFSEventStreamEventFlagNone"), Integer::New(0x00000000)); - constructor->Set(String::New("kFSEventStreamEventFlagMustScanSubDirs"), Integer::New(0x00000001)); - constructor->Set(String::New("kFSEventStreamEventFlagUserDropped"), Integer::New(0x00000002)); - constructor->Set(String::New("kFSEventStreamEventFlagKernelDropped"), Integer::New(0x00000004)); - constructor->Set(String::New("kFSEventStreamEventFlagEventIdsWrapped"), Integer::New(0x00000008)); - constructor->Set(String::New("kFSEventStreamEventFlagHistoryDone"), Integer::New(0x00000010)); - constructor->Set(String::New("kFSEventStreamEventFlagRootChanged"), Integer::New(0x00000020)); - constructor->Set(String::New("kFSEventStreamEventFlagMount"), Integer::New(0x00000040)); - constructor->Set(String::New("kFSEventStreamEventFlagUnmount"), Integer::New(0x00000080)); - constructor->Set(String::New("kFSEventStreamEventFlagItemCreated"), Integer::New(0x00000100)); - constructor->Set(String::New("kFSEventStreamEventFlagItemRemoved"), Integer::New(0x00000200)); - constructor->Set(String::New("kFSEventStreamEventFlagItemInodeMetaMod"), Integer::New(0x00000400)); - constructor->Set(String::New("kFSEventStreamEventFlagItemRenamed"), Integer::New(0x00000800)); - constructor->Set(String::New("kFSEventStreamEventFlagItemModified"), Integer::New(0x00001000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemFinderInfoMod"), Integer::New(0x00002000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemChangeOwner"), Integer::New(0x00004000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemXattrMod"), Integer::New(0x00008000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemIsFile"), Integer::New(0x00010000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemIsDir"), Integer::New(0x00020000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemIsSymlink"), Integer::New(0x00040000)); - - target->Set(String::NewSymbol("FSEvents"), constructor); - } - static v8::Handle Shutdown(const v8::Arguments& args) { - HandleScope scope; - NodeFSEvents *native = node::ObjectWrap::Unwrap(args.This()); - native->Shutdown(); - return Undefined(); - } - static v8::Handle New(const v8::Arguments& args) { - HandleScope scope; - - if (args.Length() != 1 || !args[0]->IsString()) { - return ThrowException(String::New("Bad arguments")); - } - - String::Utf8Value pathname(args[0]->ToString()); - - NodeFSEvents *nativeobj = new NodeFSEvents(*pathname); - nativeobj->Wrap(args.Holder()); - NODE_SET_METHOD(args.Holder(), "stop", NodeFSEvents::Shutdown); - return args.This(); - } - - - NodeFSEvents(const char *path) : ObjectWrap() { - running=1; - first = NULL; - last = NULL; - strncpy(pathname, path ? path : "/", MAXPATH); - pthread_mutex_init(&mutex, NULL); - uv_async_init(uv_default_loop(), &watcher, NodeFSEvents::Callback); - watcher.data = this; - pthread_create(&thread, NULL, &NodeFSEvents::Run, this); - } - - ~NodeFSEvents() { - this->Shutdown(); - } - void Shutdown() { - if (running) { - CFRunLoopStop(runLoop); - pthread_join(thread, NULL); - pthread_mutex_destroy(&mutex); - uv_close((uv_handle_t*) &watcher, NULL); - } - running = 0; - } - static void *Run(void *data) { - NodeFSEvents *This = (NodeFSEvents *)data; - CFStringRef dir_names[1]; - dir_names[0] = CFStringCreateWithCString(NULL, This->pathname, kCFStringEncodingUTF8); - CFArrayRef pathsToWatch = CFArrayCreate(NULL, (const void **)&dir_names, 1, NULL); - FSEventStreamContext context = { 0, data, NULL, NULL, NULL }; - FSEventStreamRef stream = FSEventStreamCreate(NULL, &NodeFSEvents::Event, &context, pathsToWatch, kFSEventStreamEventIdSinceNow, (CFAbsoluteTime) 0.1, kFSEventStreamCreateFlagNone | kFSEventStreamCreateFlagWatchRoot | kFSEventStreamCreateFlagFileEvents); - This->runLoop = CFRunLoopGetCurrent(); - FSEventStreamScheduleWithRunLoop(stream, This->runLoop, kCFRunLoopDefaultMode); - FSEventStreamStart(stream); - CFRunLoopRun(); - FSEventStreamStop(stream); - FSEventStreamUnscheduleFromRunLoop(stream, This->runLoop, kCFRunLoopDefaultMode); - FSEventStreamInvalidate(stream); - FSEventStreamRelease(stream); - pthread_exit(NULL); - } - static void Event(ConstFSEventStreamRef streamRef, void *userData, size_t numEvents, void *eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) { - NodeFSEvents *This = static_cast(userData); - char **paths = static_cast(eventPaths); - size_t idx; - p_evt item; - pthread_mutex_lock(&(This->mutex)); - for (idx=0; idx < numEvents; idx++) { - item = (p_evt)malloc(sizeof(struct s_evt)); - if (!This->first) { - This->first = item; - This->last = item; - } else { - This->last->next = item; - This->last = item; - } - item->next = NULL; - strncpy(item->path, paths[idx],MAXPATH); - item->flags = eventFlags[idx]; - item->evtid = eventIds[idx]; - } - pthread_mutex_unlock(&(This->mutex)); - uv_async_send(&(This->watcher)); - } - static void Callback(uv_async_t *handle, int status) { - NodeFSEvents *This = static_cast(handle->data); - HandleScope scope; - TryCatch try_catch; - Local callback_v = This->handle_->Get(emit_sym); - Local callback = Local::Cast(callback_v); - p_evt item; - pthread_mutex_lock(&(This->mutex)); - - v8::Handle args[4]; - args[0] = change_sym; - This->Ref(); - item = This->first; - while (item) { - This->first = item->next; - if (!try_catch.HasCaught()) { - args[1] = v8::String::New(item->path ? item->path : ""); - args[2] = v8::Integer::New(item->flags); - args[3] = v8::Integer::New(item->evtid); - callback->Call(This->handle_, 4, args); - } - free(item); - item = This->first; - } - This->first = NULL; - This->last = NULL; - This->Ref(); - pthread_mutex_unlock(&(This->mutex)); - if (try_catch.HasCaught()) try_catch.ReThrow(); - } - - int running; - char pathname[MAXPATH + 1]; - CFRunLoopRef runLoop; - p_evt first; - p_evt last; - uv_async_t watcher; - pthread_t thread; - pthread_mutex_t mutex; - }; - extern "C" void init(v8::Handle target) { - node_fsevents::NodeFSEvents::Initialize(target); - } -} - -NODE_MODULE(fswatch, node_fsevents::init) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/package.json index 1f7e4666a7e..bb7a0278e5d 100644 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/package.json +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/package.json @@ -1,26 +1,119 @@ { - "name": "fsevents", - "description": "Native Access to Mac OS-X FSEvents", - "homepage": "https://github.com/phidelta/NodeJS-FSEvents", - "version": "0.1.5", - "maintainers": [ - "Philipp Dunkel " + "_args": [ + [ + "fsevents@^1.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] ], - "contributors": [ - "Philipp Dunkel " + "_from": "fsevents@>=1.0.0 <2.0.0", + "_id": "fsevents@1.0.14", + "_inCache": true, + "_installable": true, + "_location": "/fsevents", + "_nodeVersion": "5.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/fsevents-1.0.14.tgz_1468846610948_0.4684492303058505" + }, + "_npmUser": { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "name": "fsevents", + "raw": "fsevents@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar" ], + "_resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.14.tgz", + "_shasum": "558e8cc38643d8ef40fe45158486d0d25758eee4", + "_shrinkwrap": null, + "_spec": "fsevents@^1.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "author": { + "email": "pip@pipobscure.com", + "name": "Philipp Dunkel" + }, + "binary": { + "host": "https://fsevents-binaries.s3-us-west-2.amazonaws.com", + "module_name": "fse", + "module_path": "./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/", + "package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz", + "remote_path": "./v{version}/" + }, "bugs": { - "url": "https://github.com/phidelta/fsevents" + "url": "https://github.com/strongloop/fsevents/issues" + }, + "bundleDependencies": [ + "node-pre-gyp" + ], + "dependencies": { + "nan": "^2.3.0", + "node-pre-gyp": "^0.6.29" + }, + "description": "Native Access to Mac OS-X FSEvents", + "devDependencies": { + "tap": "~0.4.8" }, - "licenses": [ + "directories": {}, + "dist": { + "shasum": "558e8cc38643d8ef40fe45158486d0d25758eee4", + "tarball": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.14.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "gitHead": "fe059ea77fae15ed289271eecc881a2b7fb54edd", + "homepage": "https://github.com/strongloop/fsevents", + "keywords": [ + "fsevents", + "mac" + ], + "license": "MIT", + "main": "fsevents.js", + "maintainers": [ + { + "email": "miro.bajtos@gmail.com", + "name": "bajtos" + }, + { + "email": "info@bnoordhuis.nl", + "name": "bnoordhuis" + }, { - "type": "MIT" + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + { + "email": "pip@pipobscure.com", + "name": "pipobscure" + }, + { + "email": "callback@strongloop.com", + "name": "strongloop" } ], + "name": "fsevents", + "optionalDependencies": {}, + "os": [ + "darwin" + ], + "readme": "ERROR: No README data found!", "repository": { "type": "git", - "url": "https://github.com/phidelta/fsevents.git" + "url": "git+https://github.com/strongloop/fsevents.git" + }, + "scripts": { + "install": "node-pre-gyp install --fallback-to-build", + "prepublish": "if [ $(npm -v | head -c 1) -lt 3 ]; then exit 1; fi && npm dedupe", + "test": "tap ./test" }, - "main": "./fsevents.js", - "engines": {"node": ">=0.8"} + "version": "1.0.14" } diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc new file mode 100644 index 00000000000..d5129940666 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc @@ -0,0 +1,43 @@ +/* +** © 2014 by Philipp Dunkel +** Licensed under MIT License. +*/ + + +void async_propagate(uv_async_t *async) { + if (!async->data) return; + FSEvents *fse = (FSEvents *)async->data; + CFIndex idx, cnt; + fse_event *event; + char pathbuf[1024]; + const char *pathptr = NULL; + fse->lock(); + cnt = fse->events.size(); + for (idx=0; idxevents.at(idx); + if (event == NULL) continue; + pathptr = CFStringGetCStringPtr(event->path, kCFStringEncodingUTF8); + if (!pathptr) CFStringGetCString(event->path, pathbuf, 1024, kCFStringEncodingUTF8); + fse->emitEvent(pathptr ? pathptr : pathbuf, event->flags, event->id); + delete event; + } + if (cnt>0) fse->events.clear(); + fse->unlock(); +} + +void FSEvents::asyncStart() { + if (async.data == this) return; + async.data = this; + uv_async_init(uv_default_loop(), &async, (uv_async_cb) async_propagate); +} + +void FSEvents::asyncTrigger() { + if (async.data != this) return; + uv_async_send(&async); +} + +void FSEvents::asyncStop() { + if (async.data != this) return; + async.data = NULL; + uv_close((uv_handle_t *) &async, NULL); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc new file mode 100644 index 00000000000..fbd61ee9bcd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc @@ -0,0 +1,110 @@ +/* +** © 2014 by Philipp Dunkel +** Licensed under MIT License. +*/ + +// constants from https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/index.html#//apple_ref/doc/constant_group/FSEventStreamEventFlags +#ifndef kFSEventStreamEventFlagNone +#define kFSEventStreamEventFlagNone 0x00000000 +#endif + +#ifndef kFSEventStreamEventFlagMustScanSubDirs +#define kFSEventStreamEventFlagMustScanSubDirs 0x00000001 +#endif + +#ifndef kFSEventStreamEventFlagUserDropped +#define kFSEventStreamEventFlagUserDropped 0x00000002 +#endif + +#ifndef kFSEventStreamEventFlagKernelDropped +#define kFSEventStreamEventFlagKernelDropped 0x00000004 +#endif + +#ifndef kFSEventStreamEventFlagEventIdsWrapped +#define kFSEventStreamEventFlagEventIdsWrapped 0x00000008 +#endif + +#ifndef kFSEventStreamEventFlagHistoryDone +#define kFSEventStreamEventFlagHistoryDone 0x00000010 +#endif + +#ifndef kFSEventStreamEventFlagRootChanged +#define kFSEventStreamEventFlagRootChanged 0x00000020 +#endif + +#ifndef kFSEventStreamEventFlagMount +#define kFSEventStreamEventFlagMount 0x00000040 +#endif + +#ifndef kFSEventStreamEventFlagUnmount +#define kFSEventStreamEventFlagUnmount 0x00000080 +#endif + +#ifndef kFSEventStreamEventFlagItemCreated +#define kFSEventStreamEventFlagItemCreated 0x00000100 +#endif + +#ifndef kFSEventStreamEventFlagItemRemoved +#define kFSEventStreamEventFlagItemRemoved 0x00000200 +#endif + +#ifndef kFSEventStreamEventFlagItemInodeMetaMod +#define kFSEventStreamEventFlagItemInodeMetaMod 0x00000400 +#endif + +#ifndef kFSEventStreamEventFlagItemRenamed +#define kFSEventStreamEventFlagItemRenamed 0x00000800 +#endif + +#ifndef kFSEventStreamEventFlagItemModified +#define kFSEventStreamEventFlagItemModified 0x00001000 +#endif + +#ifndef kFSEventStreamEventFlagItemFinderInfoMod +#define kFSEventStreamEventFlagItemFinderInfoMod 0x00002000 +#endif + +#ifndef kFSEventStreamEventFlagItemChangeOwner +#define kFSEventStreamEventFlagItemChangeOwner 0x00004000 +#endif + +#ifndef kFSEventStreamEventFlagItemXattrMod +#define kFSEventStreamEventFlagItemXattrMod 0x00008000 +#endif + +#ifndef kFSEventStreamEventFlagItemIsFile +#define kFSEventStreamEventFlagItemIsFile 0x00010000 +#endif + +#ifndef kFSEventStreamEventFlagItemIsDir +#define kFSEventStreamEventFlagItemIsDir 0x00020000 +#endif + +#ifndef kFSEventStreamEventFlagItemIsSymlink +#define kFSEventStreamEventFlagItemIsSymlink 0x00040000 +#endif + +static v8::Local Constants() { + v8::Local object = Nan::New(); + object->Set(Nan::New("kFSEventStreamEventFlagNone").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagNone)); + object->Set(Nan::New("kFSEventStreamEventFlagMustScanSubDirs").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagMustScanSubDirs)); + object->Set(Nan::New("kFSEventStreamEventFlagUserDropped").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagUserDropped)); + object->Set(Nan::New("kFSEventStreamEventFlagKernelDropped").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagKernelDropped)); + object->Set(Nan::New("kFSEventStreamEventFlagEventIdsWrapped").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagEventIdsWrapped)); + object->Set(Nan::New("kFSEventStreamEventFlagHistoryDone").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagHistoryDone)); + object->Set(Nan::New("kFSEventStreamEventFlagRootChanged").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagRootChanged)); + object->Set(Nan::New("kFSEventStreamEventFlagMount").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagMount)); + object->Set(Nan::New("kFSEventStreamEventFlagUnmount").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagUnmount)); + object->Set(Nan::New("kFSEventStreamEventFlagItemCreated").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemCreated)); + object->Set(Nan::New("kFSEventStreamEventFlagItemRemoved").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemRemoved)); + object->Set(Nan::New("kFSEventStreamEventFlagItemInodeMetaMod").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemInodeMetaMod)); + object->Set(Nan::New("kFSEventStreamEventFlagItemRenamed").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemRenamed)); + object->Set(Nan::New("kFSEventStreamEventFlagItemModified").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemModified)); + object->Set(Nan::New("kFSEventStreamEventFlagItemFinderInfoMod").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemFinderInfoMod)); + object->Set(Nan::New("kFSEventStreamEventFlagItemChangeOwner").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemChangeOwner)); + object->Set(Nan::New("kFSEventStreamEventFlagItemXattrMod").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemXattrMod)); + object->Set(Nan::New("kFSEventStreamEventFlagItemIsFile").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemIsFile)); + object->Set(Nan::New("kFSEventStreamEventFlagItemIsDir").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemIsDir)); + object->Set(Nan::New("kFSEventStreamEventFlagItemIsSymlink").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemIsSymlink)); + return object; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc new file mode 100644 index 00000000000..271208022ea --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc @@ -0,0 +1,27 @@ +/* +** © 2014 by Philipp Dunkel +** Licensed under MIT License. +*/ + +void FSEvents::lockingStart() { + if (lockStarted) return; + lockStarted = true; + pthread_mutex_init(&lockmutex, NULL); +} + +void FSEvents::lock() { + if (!lockStarted) return; + pthread_mutex_lock(&lockmutex); +} + +void FSEvents::unlock() { + if (!lockStarted) return; + pthread_mutex_unlock(&lockmutex); +} + +void FSEvents::lockingStop() { + if (!lockStarted) return; + lockStarted = false; + + pthread_mutex_destroy(&lockmutex); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc new file mode 100644 index 00000000000..976c9597e64 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc @@ -0,0 +1,42 @@ +/* +** © 2014 by Philipp Dunkel +** Licensed under MIT License. +*/ + +void FSEvents::emitEvent(const char *path, UInt32 flags, UInt64 id) { + if (!handler) return; + Nan::HandleScope handle_scope; + v8::Local argv[] = { + Nan::New(path).ToLocalChecked(), + Nan::New(flags), + Nan::New(id) + }; + handler->Call(3, argv); +} + +NAN_METHOD(FSEvents::New) { + Nan::Utf8String *path = new Nan::Utf8String(info[0]); + Nan::Callback *callback = new Nan::Callback(info[1].As()); + + FSEvents *fse = new FSEvents(**path, callback); + fse->Wrap(info.This()); + + info.GetReturnValue().Set(info.This()); +} + +NAN_METHOD(FSEvents::Stop) { + FSEvents* fse = node::ObjectWrap::Unwrap(info.This()); + + fse->threadStop(); + fse->asyncStop(); + + info.GetReturnValue().Set(info.This()); +} + +NAN_METHOD(FSEvents::Start) { + FSEvents* fse = node::ObjectWrap::Unwrap(info.This()); + fse->asyncStart(); + fse->threadStart(); + + info.GetReturnValue().Set(info.This()); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc new file mode 100644 index 00000000000..9dc558818f7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc @@ -0,0 +1,27 @@ +/* + ** © 2014 by Philipp Dunkel + ** Licensed under MIT License. + */ + +struct fse_event { + UInt64 id; + UInt32 flags; + CFStringRef path; + + fse_event(CFStringRef eventPath, UInt32 eventFlag, UInt64 eventId) { + this->path = eventPath; + this->flags = eventFlag; + this->id = eventId; + if (this->path != NULL) + CFRetain(this->path); + } + + ~fse_event() { + if (this->path != NULL) + CFRelease(this->path); + } + +private: + fse_event(const fse_event&); + void operator=(const fse_event&); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc new file mode 100644 index 00000000000..4813fdc56eb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc @@ -0,0 +1,72 @@ +/* +** © 2014 by Philipp Dunkel +** Licensed under MIT License. +*/ + +// constants from https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/index.html#//apple_ref/doc/constant_group/FSEventStreamCreateFlags +#ifndef kFSEventStreamCreateFlagNone +#define kFSEventStreamCreateFlagNone 0x00000000 +#endif + +#ifndef kFSEventStreamCreateFlagUseCFTypes +#define kFSEventStreamCreateFlagUseCFTypes 0x00000001 +#endif + +#ifndef kFSEventStreamCreateFlagNoDefer +#define kFSEventStreamCreateFlagNoDefer 0x00000002 +#endif + +#ifndef kFSEventStreamCreateFlagWatchRoot +#define kFSEventStreamCreateFlagWatchRoot 0x00000004 +#endif + +#ifndef kFSEventStreamCreateFlagIgnoreSelf +#define kFSEventStreamCreateFlagIgnoreSelf 0x00000008 +#endif + +#ifndef kFSEventStreamCreateFlagFileEvents +#define kFSEventStreamCreateFlagFileEvents 0x00000010 +#endif + +void FSEvents::threadStart() { + if (threadloop) return; + pthread_create(&thread, NULL, &FSEvents::threadRun, this); +} + +void HandleStreamEvents(ConstFSEventStreamRef stream, void *ctx, size_t numEvents, void *eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) { + FSEvents * fse = (FSEvents *)ctx; + size_t idx; + fse->lock(); + for (idx=0; idx < numEvents; idx++) { + fse_event *event = new fse_event( + (CFStringRef)CFArrayGetValueAtIndex((CFArrayRef)eventPaths, idx), + eventFlags[idx], + eventIds[idx] + ); + fse->events.push_back(event); + } + fse->asyncTrigger(); + fse->unlock(); +} + +void *FSEvents::threadRun(void *ctx) { + FSEvents *fse = (FSEvents*)ctx; + FSEventStreamContext context = { 0, ctx, NULL, NULL, NULL }; + fse->threadloop = CFRunLoopGetCurrent(); + FSEventStreamRef stream = FSEventStreamCreate(NULL, &HandleStreamEvents, &context, fse->paths, kFSEventStreamEventIdSinceNow, (CFAbsoluteTime) 0.1, kFSEventStreamCreateFlagNone | kFSEventStreamCreateFlagWatchRoot | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagUseCFTypes); + FSEventStreamScheduleWithRunLoop(stream, fse->threadloop, kCFRunLoopDefaultMode); + FSEventStreamStart(stream); + CFRunLoopRun(); + FSEventStreamStop(stream); + FSEventStreamUnscheduleFromRunLoop(stream, fse->threadloop, kCFRunLoopDefaultMode); + FSEventStreamInvalidate(stream); + FSEventStreamRelease(stream); + fse->threadloop = NULL; + return NULL; +} + +void FSEvents::threadStop() { + if (!threadloop) return; + CFRunLoopStop(threadloop); + pthread_join(thread, NULL); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/binding.gyp b/src/filesystem/impls/appshell/node/node_modules/fsevents_win/binding.gyp deleted file mode 100644 index 0e32c560323..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/binding.gyp +++ /dev/null @@ -1,8 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'fswatch_win', - 'sources': [ 'fsevents_win.cpp' ], - } - ] -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/build/Release/fswatch_win.node b/src/filesystem/impls/appshell/node/node_modules/fsevents_win/build/Release/fswatch_win.node deleted file mode 100644 index 50f64f95c07df7c5cbb45c12da9f73521b7ab9a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120832 zcmeEve|%KMx%b)ZCOLskc98^v1YIB~8dPXN$qms2*d!={4S@|QB+v@!c15M(EMO&& zcoNLvu(!0;UcI%qQfx1__LlbgBU*oK2xfzg7^qjFK#iK}Y&XSN(y&O#dB4w`vzrat zzTVI0zJI+J-E(H1nR(`!XJ(#x=9y6=qmdcL{EvAOR4Z`6J5UdP>EyYIgHCCAq{I_iA)Ilg(HWAX9|$G!J& z*m!el>X>W;b!~sb52k&0)9caShQNQmejDN&0()Oy$KU?f?RabV{rl@vdA@sJ-;eh# z?aJ#8{yy~jbpC$9c>jjKSA6qs58=GB1umx`EHxzxMK3ujqiH=t!ql-Qt01JC1mTZ5 zbkZ`s?fA_Gj6xJn5QHR(;a~JE6aq-h!@mTf5SfvY^2XjqbiYZ+pCkwiUNQ+Yd2)i# z!%u;{x@HOdcg7CpUK&kED!#fl2xPOI$PmbsxHkI2ip>)TUGZ^rGMv; z-|~Yyx2OA`;v(kGVBrv9^cN02aDK4OB&Afcm-7TcK4MXW>uP`|m_+G3$<6i~Ngb3z zL&hRL0-Pdf|uTRdj7*=v+iQ`+?DMKntDKQu*gbCP&3gNMaekz-VPT>lir#@7kno=l@XXNV$y;hA6|C+dMdW0T+vRwy1upW%PV#vdb8xacMMycz>8;|Vxsbf(v1-?Cq}11NYK=&4{U?xk(s6g^z?Z8DF1(tJ}MDU-!pSZ4^&Dw==-jb z6dQ%qe>7fbw5Wx4r6{g$qEH{7c#3-G#{`AZ9(5)9KLPS*;TMgLt}ZY7aW=+Nw1+5u z68##D2TcsrMPprEt)zU7M7weWaS_znN()mQ6ZP`({3Cq-J^oRNc>ZmI4kTl$M*El2 z4gQrINiqHfO@~I&ugBx*q4fVAJyar|o-k$u6b1+0CO!;^kLj^w^bB3o2Dj{*~Dgxlbf2S75)YYp)@XZLUw$}#IC1%FWp6v6DWgL4YIESF zBgkTNb_a{oZ5T|!Vy@nIBnb`wB>2YV9xY#?9%D~IZzbUfir=X8KVaHpDryS&F6O+o zjwd(Al1EX8@%i@X`av(mA=UsnV)D)KW*C*K$Bb${J;;x`S#AuY%gu^4P19>{jf}=e z>xq@!{NHZR+vERXd!CCWU(p_--RfrFzm^Zd<^Z)vnJtYC7Ft$*ppPR2T}H603*=eY zyO^Z9x=HJeR}AvqRj^oBEsMEQ87#&IEyjIz`4*!B={hAzR{(&Qa;QmOf&No4bRDxz zcBMEStZ8TI4gm{+yHdTVZcA?-lv2E!Tg$K@hrG)!NK!@E>|Y|N$?7_5bHHcGJrPb& z?dn2N{atBWC}Dc1{Gk~_OSQD9S&wPU?Y@*?38yG*)=I3+r=?l)gXv=37%i8r)oIHO z1Q(?z6U~eGh^eSm%&bsPqbhyhUjs6dK}0r)(6*&(88Z=3-(nZWVKaUkOV{%T35T$* zhR-_iN6XlR841RTs3GYQOzvQ@gYwWI$)dcqO0iWb&Q^+ND#f#u;@QgXCjeD;KZz&% z49ummqA!blDiRL%8?ag4=@9G2YFn-Bv70%6QG<@#z^oo4+**bQ6ksZgSc%zy@Sc; z)ed;DKSAy+&rCfp2`A)|qB+ph2R20W1f~kWmk|Lr@FyGPW+9r13gsi2sz|lElvKXu z$>>KWuSpfPjQL3SYP^!!20=Uzsv`N7P-p8E zzpLIfi&velg35BWt6Z6*c46&Xnw_Qn7uDxAp)5+Rj+UC~(%zMid|`fX0!lda{0(0s zKgVy;^FQ@v^NV`^t}mOPdJpsueA)a4{h5lvrGL;~PJf|}f5Df`?`gmY*Nd$EvPA?4 zAHB$qFI@!o3BAaZU%CinlV0S=mo9<{sTb+{(nTO>^dj~>U&vu)4u)a;2=oY!Xpy;J zT;y|u)*}=~i>&|BMbI%iVJ%;}2s%bD^30bnl3*0+{_;gEMv;LpQ3Q({7e*NJx}?Y; zVa7$$6%)J=6MSj5L(8xu!@8R4HS!U@v6TBV0k=Ttb78nRI~%(pIbd^Yn9q3_d-9)MpAkdtIw(ylLBFD{ypYH zb70q1K!>T#(Ge;kY*vebQEkgMFF>|ukWDSp_7o;BXs~@R&=jyWJr0n(QxrZ|Rz%rl z79g|&A%iHyh$4#u5ujxVpw06X%Ca>xd3zwLZIH!ww5#wUw3NIppVch~261`ODh)9&U6_b{+6d=Su zSCI4z`BhpC1zYoTnE4fzTw5R|ILj+|LYJ}fW~9?Hye!MV)9PPs%0IPjio7dbRMy$+ z#;D1;M{5=9>hMH0XoOPB)%Kh=^(`0cfj&Sv>nv(Al!su2i!0Zo@p>~^(e+Wzq<|}9 zE@&Ef62OAp48BhUQG8Oe`fGSLtl|WRZC*#7pxyyO5nJdrgLbpmgq76}im}$q5zW^0 zUr2-YzBOChIvd={;z_d!$8VA1-#OP-8SvMXdU~!C?AXR7R|HGAexhZ(4PK+fN-)ox zrEFcwKAS=$*mcbTJz1|V%T`47pPvLG6{-cSc}93Pj0(~4OxpT!WkcC+Hv+5E^+2#N z6J=?5+g%{?dBPOLN=QJ@z8Qj@xUs+(f3&Uns4p36b}F*1TN71Ypl6^z zD~%477U@;+4i!)lI0-h)h5`U==!)m5-*uJGUtH?Nyw6yzkCPx*kdP|qDA3gLE_MV| zVLS$TQ+Q(WY_))NG^CHgN*yeot%GO90JC%ex=gaW*h2<}V$22L-kII3NfV*qZT*|3 zRkFD=bo|BHl&ULua-V$_j2xNGf3Y>)f(FR-nHZ@vXr#I;p`U^|KCV51X`GWT&n_f- zO?=E~K8xmqgb+E6wkA5v;B#drvU3_-;Cxn;;S_=4lY$`CpT!;mxoSTc1MStLE)p@FAG922E^Jju3-vFu8he#mB~3l%Vvi?6 z_uQEYyAE1^n}UgUr2dJ7Pz$yCZ#l<~Uo2mNRu-}(Xd~EDQ@DaD zz=Qr?O40csv(&Z-0l%e)$NPCK_e9R8#mCR(ciKw+3i7V;fBP2y4|%@n4 zYVzOleF7e3>exV#SFkNwoV`GwkzNfm-jJ|X47YONUkUm>HoYAi2%mqmsbg{WO2N&3 zf@TBJ29o|LNMx);cPs$RCF+O^-Q`yzRTpKJ$`Q-9G%dT?exqQ2m4rYz@l_x*uq_5Q zjmTO_!ygJLUq9Sf!WL)m0EBi7q}%JuZo2vwPuYwVkIQS;w$jo^a9;i zSzPQV`$n}Wb)-dlA)`Hr=#)D_xgN@oYeUrj4g*H1x-4D3NZJdpB>!aHt$K6<>U>8n zw)-s$^V_#hjmv}4WzRXO9y@-i!p+LjqcFFN0=8w(V8^?P=xoW-*ShmqMZF^TD1Kl%GN=T zM~K?iPrluowOxWi>>CJRyBxR(>tL>`?LILq989Y3%&_noSi~vQafpRJSts}bj3=# zw)`=Kd#2yo3aAJnYbTXiE5_D<4k*|*C^mdpfgErel4HCsUrT*v7+fH}2Qh;x)tw@S zQ6}&$S1ql`mEvOObR7dcWPq>Jfv2L12gt`Fp_|aif)v-^mAt?0asBO-FH$tx-{!;U z?l}aTKpm|nsmF3oqN5|1G>x;ALpu!U2T>^ReoTXH-_~bywBL_|7Er&IkK~ycWY@*| z-Cl>`Ys_Q4@4%Pn@JE@kl@%`5=7@Hk;1!o*)}qQFUe z{>8cnxivYM)0TgD+f<@US!R%8p`pjkxik?G!wABny(oSf=6qJ+&k|J>m(pB*%Xn7> zD?^PVVrC6BD@r6E%uyO?JaQRxcI;>p_5P`p-_jsc9<*z=g%8^0P7T8oLD=cnJ0cjauM|25E(>D$Cm1ash%@mBL3asVOMY&0qB%r9=XRjM)%omT^ zQB8x8WFVhFo@#x@SdAHzI*LN@59H`V&!Fi}RCNb9kyl;;nkMTs-Be!5r#t&CdY#u< zGcre4s~u}__O8!v+D@&ZDv2jt#{O{32v5Fnz4;Nw^yu~Gmgsu37fHN2eZ9#&v8q-{ zFQS?J6YQ#E0=~SG)gdRCch}!x-Z)~O-*OMuj#9o6(>aHM7v&t6G{)+oi=G&Iy>Cru zhaS3+5^WK;?KcjSY}}Tw7NzHRY{}5RWp}d=L0)bkzoTYy;KE6;qIu9~Q@({YjugI> z+(4~jici)#^{p7*=rEW2tgFD}%gQwDlyoSQB;~5N@R6 z(w4Fhh14>O-$H#tDpY!1 z{6B8H!ziu}BYVyze-i#)l1~*otx&tC-9=&*j}1?N;_M9K6u) zIC?@kB}v(tuGH9NjWo0V4$C#@&w&jJZO?@&h!bd&G`)SjvGOH)dE-3G*dYQN?G0Gl z)RFl?^4Y4(=WW;1R5tRGz>ld0hU{2Zqbmj&2t|}Nx_ISWl#Ka%r)vdkO^P;!YYJS& zAkBa@1p`r3Q9v|0lk_*nkSKp<@@2>m@U2%0hB3~DNT`tB8V9WOFDSwak%}Su#_`bk zUyMImd;S;ekZBY`eY`m0$BXqJj2C8%mthQ=F8}hs%^(qWJ!PaiJV#B&{?OIroz1ulZ25B1XMK1b0$Ln2?=YC7Jn`Vh;^T_EItR2|MK|_VHhmNBlgJyv; ze)5!#&FSAWOFLj%Lk+MU8*WnALt0EyVr~E4?5LjOr2I;aahO(AM&=*JYI6TZ-+6e9a@NTm>&o6m^T~Be9$0^vlf#MHRP7j5?MWIa;`UXN|4J&wR zzR51MK8dGfSIfjaQA(8qqP*QA_|E4Bs@riOQQgjSF1?j}|Aj4XRU8$dE;%mwrP0YSx_V81=MaS7K48M~+0Xvffpxz1yEuGs_6ME)RD+96 z!lFn^K4v8Zv%hRW!P6Tz>N{_s{YKVo~x0~uv|X~vO{O?K0k;Fyk#65deh+YEU-X}TKC)+^_a!}@dEeJn@-`n`@ zDK<|(-cn+g&vEX3!nyaGIMhU&k!Pf@&Lzm7@Lp(%%egNuA6kGG8hv)oEPp~hYkSCz z___^>~jo&@^f!A5!br#;4cxU3Bj(0lVcDyOwinkSS5pS5d z{uz73?_gsX-#0psnt*RFeox?ch~qZ;rq~P)#PtP_qqTAUfVLrz4jbKfy1##=+9CJY zurqBwf$5+gm*3yj_UB}2qj4QzALe!v&2*A6ZW2f}voR-=@mo%lvl5_P>j1jHwh)i| zTzG6K`*}=gVvxuY=%Di z5-ia|PIt~57CZ77TbjL2ZLw zG1JYSAd6)`96bSXvHgfuDM>Y42XNE5`f$&-`ztERTWM*Eb6haIrnH$Ijqz;N&!+e0!!a@UhA5?#QEo-Or*Nm<5UZLTr~^$}7Eu;e{Do zd#6!!9vQWHtFd(IIrV((hLIe{3Dr;xm61Ul$#4i6{LO?IN39lb61)?@lM5$3WK)?O z$UQopC)O(d?I6YP-wZd2a+kt^@VZA{P(IaTFC-c$(L=jA7aKQHMH#Px(on9Cn&6_u zz}PA|QnJeuWN~wpHN2yp&+lz$zcqFIO48K;^KAjkmPK@|7 z)CTQ2$~1}*j_eq#Iw{Azl~=NAnByR0QS;A`!&AuHL0mUjb#^2}Gcvf@BZM;`R=GjE zZTC5J3~L0a%DeWfwilKb59>`-9%Ue=HvbLjW;LQ7_b=D{)@8NwXSYZb^55HXl^jY~ zWP8D+cGu=NQ%0CPIA?OToOXpn{d)^R-0H z5%htrnKp$6-}taWs$+!sPNb?Fv)@weij^Op7UR&*c=-_yp?uFsY70_5t{8Wa*gleY z4-$2h-Z3s#Hy!Lyf0xs#gJ7;%PY{2TllY2ZW@jfy$i4+-k$5*>_ zByk`CZTb;Ss|t1*V6|Vb(ZxPNtg+(|W~RC0Rbp9Heuth`W!rs%56~`TdC`wxjLr(T zi@gP?F{XZiV)6V$YWLI_x3=@tk*SB&-;AVw6{((v7}-dCbR@Ch^F_Cfq+Ux!*B3>n zG>U$8Br$;!uX30SZhLx=&&58T#mSN*W?S1BUVu3>VQ%ohmtSF?0i{sR*sXYJ$^s-&I{|+0eS0+&9;- zJI_OW;OtnAB-)zE-z41Y9l+^0#Flz8SCcPk(mEK4){xsub3f>DYtPYm^5E8}-QdM9 zQ4HQ}&4KN6E3}NoC@M!1d^0Qkd^TY!Q8^de0phBnF=TWhBShmS_7e>L3x!LqXpb+W z(rc+?`v8#xg)n1YN2u+nJ-%MHIhvk_m4SUd8e@FYWQHeI(m(b%)-~@0_P3d+7purM zFmSQUAcD4lerGzo5`dT7XM7@S0wN6S>UOu+;&re$F<`2y)PA_+tpu3|T;>G(fu(rB zuAk`5TwT*HUq@?NyVvS@5<5XA--PlTdj+@*-Mx;bavZe3VwVYx5-N2yo5f zy(=YX-Ch$+#I>;aRaJ#{;uXq)%N*Z@+rz1ZU@3eDvAj#;C{m0>ihRT!1+U!Jw?lvW z+_rupxJrFWhl6Ee2W}d`SR&G)zsLMUdGE08Of-_KI#_f;b)m*aK zm(0rMLw`x4!`J-8w@)E411H9MdeLT3^s9WN!`%|c$VHnECio`Eoe4_OX4GQ}k5Nr1 zT4bU05u*vTF5H8&+MZ7<_7}Y-M<#7E%WV$Z^Ak(_3ytVu2eeHKR=+>wys=Jg)0HE+ z;1Tdn@ZBIo-}6mmhheV^@~hPB6__sQ=w}zEYQ0sEKCBLX4^bMzeEdR#!1%T5mY+U5 zOdv2z(?ZgV-hufS=P$|J{tLACjG(Or+E)o}xL9@e%dH22M)0Lpz`G4lngQXPaxU4P zw_FR1Sf|e1j&-c8U+uR&Z$|V@L@_-Vk=mHwFTI=7-%vj!pr*2j{I$)O`AH=2N6{0Y zSyFu?dc5!%To8eZEcg=H*HD(_f(q3~6W+$gq8#(0GWOV2=n`WxW3maM7CiK9 zX>vj5AL!;nBD(`w+ryhl4Awwl2bBE))Dt~xJTIFemQ2h$lV*h4-#ln*qABDyGVY~} zGy^idP^P*HDW+wt2OE?md6`8EPja&mq;?fIH)2VnT><;}4&=)X6tX*R;NCMdzv`_f zH0Iaf$%vdw2Dvm&aIgW<)kB@q2|`d3N;ukT&6`L3ur>8kM&ima?91|Sf^VLhI%^?# zc2vTEgE)qeIIcK*p;$Hj8hH&E8;7PC;C}^Jt+rQCUe*CJFd6H6fzU@TK-m>gbVT+a zfLCCoitJsiQTurn0V$b-v~CP6RBra&s3Un6SuUKM9GFgsq>N~89KjGd-5kHsJ8Cd| z9i4fY%5e!KCgyR9MPj~P-AIRTAXUo^Fe@0qEvCdUNF+PWDv_0-GR>E%`O;Y)`m?I4 zy8VCcc_X&5|9|ay2Uq+fdmg2Jp*`>Aa&9|nrF7Vk7SOv3un2xxh{SAk|Hz(4*kSL9 zL93BMiqN%(ETZv%d7@q-QMf54tcm8lvvI)Gmnemw;F ze{RoPyprnW_Pl|LziZDcMH2dgGVfcB@DBW*!Y^ur`$Bsj<^FQ^JdQVtD`xfjNA^4e zcLX#Ds7A!kj$bBz4*X`~myaL%=6}GRN0q7CN<7!%w+X)nf<*h~f9-kyPwaWov+U^k z^o2Gk1cH>k2d>^GxHK)(0lrU2rxOh8q482pFKNTWJI&p4zm|I#_iUaPOr}POsYOF5 z`IV+#Df?-x#ey^*FI)jn2*2qs(&!vJr>)&zG#m?Ej)jJd5ZA~Z?nZrmz>+NS#(~b0&YL^QVrP2RZUjS8(J2$lJ38D3wq*d{#!L2*W!bZyZ6o zJkv>)Z2)rlNEWtj(7DySv($SWS`TU?#~Q9_^kwo!`^%WTkqNnN*taOoexO&J1FAE< zFzD>-bqjW-EP@@N?wSN=AitC8?nqEe%Au#Q%TR>XPI&a_V6~0#udaI7lCAad{+wUY zST7PuzN=b~tj63fvyvlPVTde0^2Sc+vRxUKg598|Gq+7~cB{@z#rZZT20PCz#d$_` zI^di{`&%Mc-q;6+s9xn>7NxAy@9fk`K<^P}!EW9jY+wgiBRXAeAf71B2+m_&NQF|i zDpFO&HO%@xL7KQhg{>I*%xZO~V&0(eSU5$EA_gy`+$%2!0&;b8tDDisoJ&4@d1Scx z^!8kJm0cdzd}G;7#GA4R;>+&oNY7g-TI!SXSBm0JD3ls*Bh?SxMWgrh188r0u`-)l zJs*hkw_CSa@-J)^S(x^ZWf7FdhS$t_3#P(N5~Co1o*IhLY_K0=4BdV2kb3u!)?+wP zQ3>qsD>tZo=qtVmSkzTTH>LR2ZHR_ah6l3*X!#JmOr2C@*`OA1hEzwCe1jb^&nzHC zCbI4;X>8hDklFGWv3Hq;r6Z;sq8M#R`Q%{&I({WMc0TfXBe` zBHGH?a60h-Tnav|sSbSz?HAi)&=fv_n%S=@cLP;{T}qnngFvKXck?%lt?G7iLqJAc zQ9;9pz^L4S%jLq{hAus#i~k7wJ4{%N32K)!LSwf)Xj%!`!`7EW;U*mZq7)h~asaN< zueo3+B11z}VbnbVjsZs@ETVn``#-_HXk;VK=El%E(V7nUZ)>yJL8DJ}&kAG;nkW^X3~oTmA`9Q4lEJ3Z#l$t#k=BkyqG{b4>KWi~ zz}-_R1=np@0SZ)6V~7nk?HFDdCyA{dR8P#p=MXUVy`}>%WAn|f0xA;buVXta7Z3>h zE^Kg3Eb>*12v3Sd2(a(dUYC!s#=dOYOiyHgXy=15(VI~9<_!m){1Z0IsZY=|<1u

Zfxm9rf!7n?Nj!v?>J$z<#ov|#2l0m6 z$bn}m-h2kjRWPw1n`RTPJnyH(1J589OneegA~=}%6i*8k6A*$8&mxXR zM9||Z_a9M~CPol%>k-t{P2C_FanBCwt}g6Yqf5w)0C7j|%c{U>S;`c05Alv+#}5-D zY)wlcg>eIO3T4U-*nR@@BIT&`V*`FHK}lBDS(N3XQVBFNTvhhCO*v<>5yr!#zp1JuQHBaDRF$!9W1pli|?GCiYqCT08;1m zAS-TPPN5=n5(#v_id6We=f-yGOUJO9u)BAW==?CtQV2E^)SsaGD+c8l=C1sThR)g7s zG|5A6)`KscQkRY4%q372+qnw%Z`T|gy)3|ky-8z@tcr^~?>-^enU_HpS+eI-hHT2P z6&d7$QZyU+q{$u%v4;)BP;$Kq)Y$|z)@*=GMD4#*L9!>qcU3FHQaWio3*RroL-+5?4#&i2LJ(>Wb-z)bhDaL_+lyYTMx2=0<4 zp=~%Gz(`n>|6W}`lmJ~_p%Q^GoIrebH4Wy*1noHTtv^AmvR16DtOq0<(n z`fVI}N%{#401>6SSE=t&>d(lZSn$lhREH~kI#=?Nr9UHHqTPm!{ZXirOb0kL+M-w$ z=gAnpvXgmby}raeXOHwBN?EUZ3Kc@V#&v=xJR7L%R#Mmf7P7vo%Cm_89s>NF0}Qhz z7c+7_9To%=c{|Y%w0;o=2+c-TgJp@*B@xh@2-?o3kB6ZXCt>+X#G;5v%0T31ih$YI z$_33}oUVj!KV@;+Vz=($j zjetrwdzB<)q^cSBEFVC61!{g4B9h3kHQ4|G-~a(YN~%GMt!WTdHx3g$wx%Lv^0=0Q z9qAC*9y^F-T?k>A=ANeW{W+9@yfQoskycTA;Lbmj3?vtfS1)1q0rO<;hvDWK*mv~8 zRFvw`f$soV2&xurou>m{2f%Cg93dAGtCPf~+IACF05^+%cR5SLAT$odX;bCtMn+EI zt3;ujy@HxSBGs}F>6JXq&3+aI`|3S*oLBRcYBwuLqUi z$FjVoDOJQ!sLjh-E~OMTUK~J+>prgVH(LO0slMd$H&eQc{g|}jXbjS>0gPBfC%?IG z*0A#b(p8BH`p51A4mv_>?3;<^j&vTBK&=vb90t@jQpx3?_F!D$aJ?5V?^3u3u~QgZ z{$>KBl}htT1pLjjAt)5C8o{fF!u~V#eDowefAlszpX;XQD_wZj?tL`EU;aM+`Vq;Q z+P%$3`0J+u{`%$1cs=o*=6<|Xrv*+R2>2;5fIyH}Ng9}1I0WY#o(bd-U8>U#2oE54 z9|F44sYd*qTo-fC(+A#ooJ-iK&3coYu;Hiz!*btT$ELom^NY(h@xTHc)bZi2&7)v! zr8QS;J^G=+$VO)zx*cCO#1_cq;@cHEfq>FF<3&ShO@z|w_L^Ru2xZajO<-HleQu_I z*U`>b5lkZ7QODN-0^xhHYGWjiXHVgz)H|U@na!T0xz!P_z)rwU7Y89`>uhdl=4BuA zUO}l_vDu{F%7JvG(Wv=S*xejK*oy31#^kWH z2%GBW6TYkIItTo}VsvEkf>cJmP)o~w5*$sJ_y$nq?VP{bUP!>jkqQ14^gRQ~yu^1d zH-LlMZo+YLkSY(q1n!c&z>puWuAn#9{&77ecs@6{=J3|}PiP78etnRsig``K|gshvQhrgu*-vyMHkWDo?}=qoq^ zL>(eLBTge&HJC^V3DQ)I$nQUIjL2k+NUzD00a*yS{2{!OFlZ3^1Nxfe1RsOjr{aKf zXDS^*PE=D1F%80F_4fgasBNfCgX@QJg#8&N9xk79e#`agV}Qdq2FJKb(1gZ>6R~zi ztphFw;V9@G12YHuV*+~~i1e=i4b9|^5a~X&z*SUkOJ$GgsUa0WbyX$?7VdbNY>x&C z^PKi=DQr8XPYeGMrXKG!IWSz4-?8ltT=lxxd_r+%;-;lE&U@2p6!AZRJw)M!KM=Gm zQ+-c8oO|MeFI`zBs@))1j-+f&lmnGvvmBU>feSBcx;2)VUuLg+8xPEnx(vNb5>X{4 zlZ8_ob`UTb?!L9E+4h3X2rFad_5>(Df5vdd9mT`x!v4ij8rVZN;xaN0_*Wy;@Q5wq}m5}JY8g44NCtmDF_bS!|xy|8UVQIX$ z`E8TEK6yVO2s3hFVFw}n8wyA#B16f|kn`F+N@fpXjgV(h5ZXg4;o-sn6O<#(|Fmve zy%Bxgw&!OA@J8#CtYSGO$($eB$_kh`$S@}WC>tbtD z-~pT5a~WR@2q(+StPc5i+B$MOX(#iEl12(LEFmzFkos%&I7sUqlY))DhU0K9HhuU$ zI&^W+pY3KY2&F2ee#p(TAQ!6QPsbV53^=&6aVQN(BvGyJb+hkK{&sJ=r;rf;S~L(( ztv`cW8^LA6>`d_DPm%-Q_Afrt+#)p7`8rFyW?Dod64s3|!DR8<-F;Ajq> zI$OSE@?GU(yD10m{YlrBfd25L=F`3mWJr)~F6K4TeC8DA8PevN6%`eSn^8N6Ree1i zr8f6av?jV8i$WTkfQ+a?4N7L!d4}DLcC_oI(2VJKa^^v$rZ&=TV9q><0$Oz-Ffi{j z*^>U4)LI-wwG?vtVg%AkSKn1=da;s) zu{KmG)kBqR9asxrG^gEF0cE3-jYl(SGt~?2|0<;6Kx7n6?d^ZD=k0|Z(;)j{EYQdvIzpXS zZ^s;m<|Ac6lgeZpN3yLqve9M`Coc=}QhW@3N7oUxJGQ0-on+wI6;8re1>oF*_GS5< zhMworR^i)q@Ro$qQjHUcC0beUcC6Ap9jMdUQ;3~iI0Ly|*zCV|H}yOX`RPcajETq< zzRE}r#F8y)dl*~tJZCSy47GFE_M?Ez64unLBfASWmNAW!>n^b3lmc>KDLp9dz)CzI zE3!QYseeDlFp)RDjbAtK=N=mJCo$mV;jz11aChr~*%V*Fn1-K-UrkP%uatc_8T7-? z<|OnTxV&khuS1Z55meQFdW37VZENw}7=Y2H01kY5@nu3cZg4Q0bgRsgr0J#7RqS$K ztUDrD62s2|2NAiS9^tDIBf9s~BWy*CXx~o{m^GE^9;_YYN{B-!zEeDnzM-WNy2vsN zPfS4ae)@1RXwbctM9j$HvE(&m@nxwc>v57Le`7t|m_*+lYRLv1Zv{&>>;)Er+@z*9 ztbnF+Tv^q%zX>68TYh(a_C0S{)snUH22m6iB1O*>{$q4^ua@;Hrsz=4G*CITZ5!O$ zsxwvLt4W?#_o(2UPTjAZpst-KqS83}a1{BrQnH>XNm8BNO34OzBkjZnOjk**YU*~- zL@QHXokdE$r_G9wh?$+%{O-DQ_Z+pF%dGjwx1=D=XHgH2EJFC40bP&)rw%ur*Zx?0Evk@JU16Txe^$12B9C)N_!)2dEM~jbN=Dwtf_>i^Dd=!wzgh z3~NiehmGJy`2!xn)q1Ay=8$1BOwf2GW6bOY*?GP`X$lPKp;yo-ir6*YN_|9m&EY@o z=NP8Y0Lu?b%kv7TCaDCtwRsc-W56fax19|8fLnk&M>~$^)&8Gk-hT-rfG#9tJ81dZeBkh?N>kd$ohFS`6| zG`sbk;EcS)&7f%O6gRu^I=U9XFa)de=W(DJwp2PWeH}M@qB>5cT0m*JgJc(Y^micX zWEB?g>5#40y4gno=ij~M-X7mfxxllE z^!aN&^k$C~(ejCtHz|$VcX8qjFuo6ftq=Ar?4$J{9OuugB6%*W1nmgzapUWzAM0>s zwN-DHFI>B)OjD{O&`B>1+nQ^zEH)jLO2Sjg`vd>*rLzaE!_ut=hTpx!Rk9}u%@us< zCgrCx%9pRO0L7gHI>Xyz?0cHPaqN4X;_yIzM_nSa3BYS?M-NCCk?_zQ{SP<2&!%Uy zvJEh3rh+^S_;&n70t<^^sa^5IQwy>&N~}_OZR3LMT?yFz90L4lWNh$Vd+IZ};4vJ} z3AX0xDF0F-!2VR)K7|~JBUk?}-zfkU2vCtqL zI(zc;P4=z0;*hhqzK*Xh&Le!E*z9WGA7ry%6v#ls?0T zD%#$+oUM+G?W|SGhR^D*0DP)hG1YLGeqR3Q+QD{FnlR|Jnp7d)f-WCClK9}#aA^!m@mYFO_$%?yZ(n0TuNegu&n9jMny~Rc z)pK@|{Lyge1X0$Wpr28IL^xi*22f?LHrQ^LOeMf^)^zIJA41fZi*4$6ka!j@R-#Mq zh_?euKeSv+!Oj(FfCM_pS?(91GjAD zPJ6B5{0u@Pzpeg;931ry3_^rSi4eo4lH-ilGn@-cB2AnIgpS`ES>ii$);WMNmT;;E z^5SeJu8L|U&DuJsVNlY+M0Cn!qJ11%xngg&W3+XOYKt;ceqJGV%bd+c-Yq2w}A zO)>`zh!}+&X9mO)g|soV0ZJfH5(>7lL=KwX4hXvg>`=Q05931@NRyXX?SqFc2*bEk zY83|$!;?-ATLur~uu=~v3?6pi8&^&-1(G-^I&A0Z!*-fJY^@l!H&Axb9G*(_n&h5g zx~pOeUu8ruk8Kb4Qx?Y%VF4u={Eh-LGf7l@8c+KWDy&}oW4Y4;o1PvC%bg;=Jr5_R zvh=q16LZDJ_j@#xFo*ghWwk@DcL>rfLa^TPKAfpeVTOsPR%5y&bv>SHb(Xw-J(9#z z=2NR(;eR5$MGm>=Lw=#gfih>Q%-L8Oq*rIDMeCzk2+LXX+0`yqi>XbsfDTciY?6~9 zuniW8cF8PXH;jNtflCNjC~yIR1PXkDfQbU{kt-#xQQ&I}G83d*N~LQ`rLm>HnT=^A z6v7TQX@-Vblu9B&NebhGKA^1o=gFQQG5?LStD;hW*fp$d)jA?X6r z*v9$rr-RWQe_sj90bPHPXYdm8M)5VuZ|FhcF>=pqkRk+P1K1W5iREYOhfaTBdkx-< zy6Rc}!&CJ`5KXB3!tv=&Ywh&1q1v&Xwin<%XgzhWH9jjOJ|>w-8gu%l7La(lTKpl+ zIr|Ua>(L>Q`#(g4<}&g;f;xQi;) zHXO|-sCC<+X(#bWlKPtlFfcA&w<9j{o0d_D-Xwor)|$qhk#5}DfoQlLO0AA3S>8DS z4+eGTP#mbkewXir`Vd(T5^3**%Ecmn4gkg(*1$@2cN5hSkZKDK{SjE#sm0q7Tb-Bb zTdD4D(93J;6bb8L@xn$f!J%5hTmTZfae@N#e)k zyvL}OMCf|duYZ%BeH9t2s=P_7{r~nPQt7KYJF^;h=`5V0CWHQTdA{I-UGEk`pUYQM|hSlV1#H!+`a#E8p^{^Ct8Mv{Oojm2Fl#RM0^FXJ*Pia6;U zlcp?PKST@i!9_53u3McA|G=4*%6!&MW;P7}$!_*6baR~2Rrzd5SZ-@cDyA=bsFRTP5{{UKJ(j!{Q_-Ei3(@h2&sv}#MyxJ; z=Hvb|bh1hpydbrVr$BG+>DQ<%#nC-N2sabI9%Y)3c+Qz>e^> zw&%-Dw&w%kRD4!DwL{PCD9k^+^%H!reGhI6_|8_)H_e-eP|AfH*HjLxVg-}eV`}J0 z=+eqqTBY_pwX=d{ucPfyA&Ou`P|lG&9$LSm`G#sJU$*)?+Y3!)RLwz?l-95`ZIXRY zQ|b_KhwTRwqzr;M2m)*^O=-lcaB|BNJW!PXR$W`T%KKyg4+yUQZgtLK9L)ol`M4RO zUW9OVLl`LikU}tJPYZD zH3~COd;~M_FEA124q~#f%P=+LI}`d8T)tV#%G7}sQ`vWC zW3aBs165mCL0yd3iBt8?ooA4<$_@hC%MxPtNpVWb1484rZc?Be*rLk`IZ^+B-5_CxL z^U=h;jDZfy?s4|chRxaEz`zVxp;4{cDb3qcME9L?Y|oD)88@-}LA6wbKLlc1kf=g|D zm1ez)`#KLurk&~3B_w65*I+^c2wO<1+PDvNz>{OO++)J3drd?AfS@*#u4Q}Pnn_!^ zetG@o%W50n_ERcgW&LzhUTqJ(ihS^CmbU}{O=>%6Xp7)XMJxwzTLhd9;un(W8rbbTNBQkCyUiDf<~k8+We7 z`4#?-skU`3dxRj65I+DHx!$EN^FU!V1ilFZUzd}~3C)tFT?SM%iwFdRSt zm7RSZLxyh3w9_AUoC{&2e|CDBh6yaqQifJkl3jee%!PsqjxB>zmo z4B(D_rhq7JEoc%Rg&{qDkw{z)aLenz35!QQxAqAletVQwA&hJ!OFB158v( z@g@v%aX)nd!rInN>`k1L#2613CxMLtHSHikXSsF*N|OdY$OG)+33wI!8eu}j?nVLV zzMj|i;#gWv!8%8s!4GvmbVoVn|0u?>o1z^1Pvqqsn@k^eIM1hm{$U55V_3A{j05We z(ATubx)@!XkCJjK|F}d|C$hFR4C z3P-sFJwspNGn7L5%f!iTC-j$UXM#= zB3!)z^JZgPj6>ICQILbyMvW@l@t4LtvecpsW!-fg?8i7n1|#5{xVPThDJog zzQ#N<@o@m{ox>X%^T-Iu0nG%cXw36R0kndK7dGaR*^uWTl;JszdEbiy_7K3)nD<4ATIo`~XqV*O;Ay3QB*6=o|2Tk*wiFm(-<=>v~pK~@T~&ztOt{6j#UTjtaTi!8zzIYm>d#D=eBH|#0O z&fe8hlnwZdF=Ldf`7Kp*<+ef~-%q8(9e(FtXdj0#U2Em~SD}*JLjCFtkm5miX7OhX zq0a>@@Mkx}+S8+da;S4hB2kFb2*98M)O4E``VOr$6G2rb1Hd~f?n8&s!auzPJ1=aW{9)2<#I-ox7nw_8sZq7Cw4 zi?XUGEGyRM2#JYvPqpw!l!?TwQB3?i^TJ)!ZlDecSUb@q^00VY*335l3)G|wMCUw% zO!;UKx zT^ePzy(CnCc3==P5vbvm5c+_G#aPyxO~S%m`6{)A+s1D5KgR8@IJ_u;-Xtj6}VCa>lFO8 zhTv-52*q5xV~dkMN_0`%Qs7U2JpXvztt;5<_aUU|N`iDlw4~qiV;7kQsIZd?mnsEx zedxg3c)%T)oR7%LquW8@O$xh0CauAh@^tbr3X%p(;tjkMmHB+4SaA=pOl-J)8vfci z9G-CkQml3!ng&>So<@HdBauEDTCyjpxWze{D|^)|z-3^t#w8c;aZZM^JP9fl6P=Z66sbT&!_?PsD@uv}TPvki>(ExbI9uI}b zE+NbuqdxA(z;CI5F}%ISnwh`D zWF9mlrkRVm>Zv0YfHZUydJZ&$<3MDVr-8Gec*HD~$kt$khP#dQStx9}ptMXRargtY zbwL5n&)n=^U)8kYDsw*(=L`EwOyoj)?vK>-N&(#+!;-8?Z|Ep0z$xi=cxR$e!|erC z`1_&KG}7~5K>;P1uik}jd}uGj!KV=vf>JqXF%ySe*++%H#Wq3H z;5?Gr+##i0=srLfM8mcGqYD`Uni+a9j%n941Rh; zxn+I1xZKd0|CTTL#pS>qwl^Qc(N|mQxDxtvG4`>Y3crwg;kd#tqVn%J&;bIz9tABF z8;Xo0ge`(`tw}yNy#8??%1&PFc}c#A@$Roc!*VXTjt>{(P68;fq6`Q`x8LSszc`Do zAomgJM&baj8e-x{bAi7p73|VMtRav9T1F?;)*enVg1D5ayTp-7{3NdCG#p;!)FS&V*e zir2#ZZScogkrkZNkHIlw3vpq*dGLW5`_r*j<__wV!{CIk>(X8g_u?Yo_L+(mo>4zK z{c(Wg4#Z;13X+2Zz^Kk6KPxrjc?zIP?HwJB=McpX5JzI5Rt_RI#6U+lh?*V)b#o9k zHwNnCAZlL>G{iyA#)Iq?RAXyAXeI}}91kkwpg=rmB?lde2T2^%84udaL0$2nr#PrP z9@NS~Z^wZSoJ7RaMerE)jORKNm&+rrB$}khqH4XpaYFaS#o_D02>E zBI21v@F>W$l;_Hd%eC%+12KLviDp{H$>=oTu``HamiI(~@(S4 zqX*8HlOPK8o1pm@>OO^tMEVnyPLD52k2(2ZYRi3=3Vaa6_#_9cBdaj~$j#*5A(pok zyXs1<8-nX>HDIgMaN|Wx5)GTG$Rp6iTTfxtnfGKrD2{%` zasoew=?>#th5Ya|x{;#Az6<3}Qn?0{V~@gqtQOMg-rpD>&yO-yqlRY#%1hcE= zY5EbqMWugklq#pKa?7K@I}>=(EM%=Syt};ecDvcPp>cb4 zqLyaCbg@t^Cx4*piTV}zzzusJ6&bXLXXFOvb60LU4Q982fkIP%Q5B|2yi36cebaH zTD1ar>60sPNyTob6X#Vp1cXKoT}s=U>32eBnDATLJHUaL-2r`2ZD;|v;lIn~@EGaL zinEJNM@%_HX)Kcx%Ir!DPpigfN1)@=Qlt4CF<+BP_8@G%Q0-7PG~5vOjj&1evH!!~ z+lNP0oeSSHnMoLufgK=V)F@G+MWZb>Xo-WG022_6CO{Gp15zPEM8IS=AC{2BNi@TD z)SgPK9&Pnhd+?ODoJSF=p!uLlKn{eDY7n#$sqQ!&jfzP?$~?b&?U^K~?bG+V-s^qO zA5X6AS!=JozSq6(wbs4vkK+s`gckZ@KeTl!_2eeV4I&s;;jVtbSw*zUIPHz8&_dxy z6z{>YtEa2w#{vF!pBlKg2u(@I*QUWTD*xAYl}*2-2Dz?Aw328+1nnNO1lo3 z7s%yKheH;57d_fM!zlx+u`BivrC$3uwNFbb!C2)uvy< zVtx^WfRzif2JV=;2(m8yn+yl7uQ=XR>fGiT!zf<)Dlq>%docetIojFapxeTQg#etH zOnkGJZ){mb)ICrqQOqYG=?TxCutdl;rEj=3I!evRaCKBeHv1}}6Y35Gt-|_M=2k|G zU3OX+F-B3ySY$rTp#q&WS&L;hhxM@mSOmQ(;T5dTL;!n1sre}t@bA0|Q7Vokd1e-w zSZrv_CSi?G-IA&1QpVq(OUeG#DO`Y>ub)sv)oqL4F04NG#yk-Fle zb;aT8N@o>q6?n-Kc*z1@VCf96jrB}*u8lQ+%8`UYv_?j&eGObBqodUhp*7JF8ihwq z>mhh#T5GkRl4<6=6s`8Jc+4xPQRb5};9AXQvM`egFs!LC1aGOmu-SXmZd6%Q#bp+- zt&=@0T0u2x5CM#I1sIn_iya;bde z8L==<7oO2;4|jg3f_RlKgtb+{u~sYkwyoZ({l~o}OhTFS-P%K6P{W|NowH#V8_Ztd zt;l=@Fchlx&LmH6yXM~~QSxN>94I&uyrT<|d~`WwPU_Mg`xT!&lTK=n$*ID)K2UMe zcmQ4iGy*W<+M`txntRg7NinkA!91s73yle{Ofh2e@&#Ev2_qy2ZaV!+Nb*L(ad-$% z%JB<9y`cgg}(td2Qfzkd82Ym=zC%PDBQ&;Vn|bS<4{;{3+pEVYSbqorE2bw zIkxjEqu_+-P0H=c_BSR4(Be{XLK^d+Tpwl}sj5h^`QiZr^M9R^nOjv6w&`n(L6`A$ z^bG=8W%v3kiL)rYDy7i;gx*r)RcN+BfHvQfpJsj{$n|x+{)#l(>MFDli@p|WR_Fm3 zDe2{vqbC%n=o!%}_ey2yYXd=D$xzL`All|Ld=xn}evO$?O4tVS`-{w>1W(oKGu==Ll+b4JU zuBg6g#$?<}tfq0T8qr~eg7N<)!;k`PtoB8c!1*lNgI|F^OQ;Y+Q&6i;>P#~SO1RJ; zb|x7GXFR*h*96gA=1uYBoLqaiC#Sb^9*lzPoUj}kYX_YK{f;mSoyMIpCy8D46D%Z28qmBc+5TqWqt~;$EI1Ei ztrqn{)RJ+FSp@xL8L9=o&b)YCF$)?R%s`J>eb5{z=v9Zcb=MLeUXcRU4PWDE$TQ!7 zR1FiD1>B<`m%u$fO+oe<(g4W&LNPDfrvlqB8hdVByK(-!^-YR&V*V7)GIJ+Cig{b{ zFBhU!@P4PGv9^2l5Lmm7q)~=D-m%vqs*m z2VCkpKu;>1k*|d2$$$WFF$qFO(epQa<3z zYkY}r@jlzfnj6{nnZu;YFc;W>NAq#M&~M&EV;VLFwVGc7T@&WOWV`{7kq0SUclS^Y zfxHJLNVWsDyH>|SCv%)u>wHqpt~IxdX2t2xzrdD{g(^GT#+C)45_4m=g{-xjD@a_5 z>aCymg^22Z+309e`+RfjS!q>ZP^T!r5N(ExQ?hW`U19#XFU^P4L~_aN3)xSIjPVUGB5p^z`mG^bZWJ-z;LUj)%fwK9{o{g2_2d_ zFImqt-_NpI;=5bQZ;QSakekG{ax}kC+l#y+v-Mw8&Y|ng7o$a10WCf7=f6X0=T=H*9OnMnaH6c_);Jc{$dTuSM z5G1s#wFPdb`0ngf_(ZsZv2{;!miR8oydU-zxtYn-Q}oKxFzPEoqi$2I<1$Y}OEd3x z>mwo=Sc}t~%==S(vobHx$NL{hbd-HR^MRz5R~VC0=uS}9Xv3Q(#8S0DrdZh}lH-i< z+blMr(N;JZa=<4um-)+AU?R%6rD(UHG$1KIIL!rLIWj5OqeYe{&DGOL z=h@)RjJe*fUjy0n^6MAa^()ZddQpR!czt$^ei4Dgu3zBLlhE=CR;@V>pD7UBr0hst zSnqGOH=*CSQ6R*ZygtU?XeX=T-R_Y9F}RqRh?&vr_1)p`Ez!?c11WoY23L0V z$J7x4OCA2+1-^^@z1co1iX}=Aja9+6D>N<&1Ot-GMSJMH@A%Nha)yL)WKVw;kY74( zHtV<1+T!gEGh6{^rALCfhs>Wo%Y>*%stvD+F}`L61sdVw5H%%(O^q!<>8Ma*aB4!` z#h%txN#@_!tCU_kAJ)rLoW47c%Ptt9s~F=B_JAjhrUoGg4*LAr*0c`i z>be}(y_nKPdFEH12;8FJMth>+?5?U0I;t90)VZ3o99+D2-cC*#_0=EJH&qEu(Dcbr z=>P0H&dsvt2$>qwofjVQf7ns|frvo)o4%J(pU@B}?$W;}k#ocbp)tv6#DfepTSBW? zc;NUG;`+H)1b#w;nsZ`)D3SK&u<4aMuVy=!s|dpyRe~Z68&`OCvQQbYQC>CJf4xn6 zsF82}MM*Z)=4jy8Ga|_pUN@7joZ%efO&YTwZk}o`sx+JS<}UO8EY`bmb4nZyh#L8O zGgrnqkn9stDcCu=N6Bytbt*@XtxKL3`phWq@*p;oBp)*MK~+uH*CmGrpKYjPDL9)Irpk!| zTBu0)CDVd6)X{_Jjc{UNTv>YkKgUza=qRqJi&GUbpTCKoX*J$uoIVgx8PlGg+k0XA zYOT`Ao&4bD9D6zh_s|eLSL5k9JfgklNORmcJx|QtW#>U~$T!R3lyHs< z6qs}dAlIWO5bMIqSpTVoWmv{pNR+(qigK|;i6@iNc%ocAAWEPZZ6Z|-kU- zYIdct353J0vGzb^jM0K_ScFEIX+M*%YNkE*Dl_dbfQvc-cC zTSrr#d5pVIa^iN~%N^dA{s~v>am|jagXQ+x1M5bLc|rk{t^q)a+2je{6iMFb=wgnF zu<9VADZLq??8S9*G$}MsTQ{s6_*MpQi^;4=@;RF0yeOqHCb_F7jPqR$v`$|W*YmCn zRO!OGo`Y*$M&naGU)z|g@dIBSwnArj>?{bv_IbXfs?2e^Rtie6vk<)ykcG^BE~hi5 z_hf62=_8CEJrgCfoVco=bCIP#n0uT%%OoLJxY4Im2xr)#e3-;gP}>TYQ0PU6C-rw6 z{KlC%a!PIv`78@3@#Z*!NfkN{52ojH-zY?r_xdXiNsp$t(#J>WW6Xtl59I|XQ_qZD z*2jj(C&xZHIQ(*glq0*{SPah!GDe%iA&xKrhHN;#QgoY?KCa&1)KLlR%)+G@Q#Y8) z#zatamJ{iKGp6lHA_yN;1W=O9x=m8gxtJxa;fUDz6rjKb5*M@+ij#dvH=W_m3k_3A zfW!3)92!bmoa4rURS;B&VpP#+T*+R%&=kg_In1S;IiVOw7c+Reg#H_$NZ9~C{b);} z7NrY$&E-;7oYC9!myoNc-P5}^#^~j4c`2!w|Apprkg(|P`BfFYYNni&nIhuReQo{r z$XTN{cjkam8-9KNsQvV}j9Rk!_{;Q1Q)nrh8}67G%{5l|YAbxEHF(_T4j4ROLWT{x zB2$BIVNml0&=C;%^tyA#in&POYBlJd9epCdgbPtryd$GSmVA0dIK8J76H5b z%xD8fm~C8&(tv%eqOe5%JHr-f!w7SW_30JslffqzjEr5={1t6iLpWhsV?qW~GErWQ zEvEE_U@iqfgP3W4|J?eczx&WMlrL(}G$1~(Hr?Y*s<<2u+4%L2$&jl~)lEj+9f)ib z(SA;pMW$Z?BzDCHgbNDe)6EbXAOZ9>|8#9%^99kl6hD`+Ix0$`&?QA{fO#8RCfNm4 zbghr4=#j?5(S`5&R^OmW5~zQ*K4ucTw(+6C6BqdsCVC}2h6;XOXnZlf>iTiM(~(rJ z^|HgWPhTH5DW^_ibk7sSFkd)Mdlkp2HF=~$(ftufO6H(-9hon>o-LH@J735a=IwNu z67cF3iN7g*7D(bBTYZw|W~4I`a7#*K^QgR?ErZ(KkqZ zgHk$-LY-fOWUwoH3dhnLdW0r`94k-&o0;-AsfB)LX|nmp9Rw>zRL$)84TtrJf!NR_ z^jDuR=U8YX(FDme6(1Mu^&K)&?!b7JQ3$Dv<17n(Y@FPmu!GGqv#3%N`LL8(j7n1M zo0~bos0NMV8sbKOOR~xoZlr80*Z$@mhAA92OlB+K6dwO4Ngf_)sTAYZ(F)Hv0Om8M zO>`jgn4P3;ofGG;Pj)oWy%z#$7$xwWEgOvS3CCW~sj~P<{`#?=gJtZF)SR!JlP75>w;{91Y)W>Md(B`nYS zGJ}ppzXOZx^+r}&gE_jV4Yu?MMF5g_>qTo{0Ne{G<_3Z>!Gpzpj zW9}X7i8En~5PFE}7x8861y#tT4A&8TE4lImsxr%5hn&l-3-+oJBOx9C596tkG&7qUA;A9FAJZ5qY{$ zlo<|b=FRFoi}wQ?b~{QWQ`0|3?BL>( zfFn59QXqNzISM3UGMhhFtNn?9#J5#Q{?aP9K+3%|^w2r*3BAHC_F+I|mD;OQ(p=hW zmx<1Hd-)K8-9-j!FTVVbP_e|TK3&BqtQ|@eQ8jPZ9&7=>7a6Dgr=4X#>^Usrk3#_jlU$ZlkrK!-ZW99274ZyZy%;Vpluv%imI5ycO>giATBfoA`A$74n;uP_K`r zbY-Y0<3JDkHYEmbm(kR-knmQcSzO2d&{X_)5+cnY&i>B*NA`cRzdd1>ezNCFql;Kc z#F&zn*z=KNf7wtE@m9IYG!JoC4!$j&4;Ri#OG1G)0r=cK@AkC&-?bULjf2KvDQ8|| zq76B&ZGsLfIo~U7a_FbXhXOC^@=6`^`jq8W%#5nRV^&U4s_?kWc$-dA+~ZEsg6BV* zwDyWdG~le z(a1BbMzV}q!U#&hl{GZkG@euEkZm|EHmQfGcJH^RDwHP9CznuRBVARixmGxuHNV<* zzTfb5tZ~-=@#uz+Y3#GY2}@%qNMrSQ^W9%jUaBorT4s=9Sg8Rks&X`-!O zL|eAfdOsI^TcqCR5RpO@{`5RKkJU=ihAOfT*6dEMV6Ne-*}aE>-(_Si&8*u<_Xlf} ziJfO9V$}--Cw?<^c)UG4()mMyPOV0anP+a1I6hYmqL=UU9v*4qtFb}4E@RgvL8()q zHc@_qOKlRrGP;-SkZj4c_V=up>){o&8c}sR zo`o}@DjI2=HH8ATk|1-feS$A#{S^E7IxI)2pt^#uN@Fe|T$n;bcW7@k=9$l3ruxV? z#i*5f8mdm|jSeqTM0V|=BNSO0Gb30l6~@qx>R-&XqO3hub*j`E(v?&>bU7D~TO=SF z{qX_O-=;?*P23epke^=~8&Iv53UL=_m69LcBApar2URtfF5W-}n9@?+m~V9f+n zF^UYS8k8!9GAvUkhJslmD1hzw-0Fu+1v=UzH_M>ykb(ByVr3XqUw|Yk<2~8zJvrnb zWdGkXO?Sws+OM?6XhhC3ut5Qq z8gmHpR(Dt+(3kj@d~=>)3@hUj)UoIsgfbOez=b?yc3wdBoH^m#Shwd`H8NE0R_A*P z614|k;@H~hrN+jyGAVM_#~2%ADjIHuwCbkBkB?xcmMJk4h-d3mHpP`Zn9QUn^fFr;=RMHeD1~y2CiF9(1Xc%(YaWX`~jn)K9S3u}# zDxb1Geo|Ila5QnNPQ_b^3^fNav8KAYdC-ul+3Pn*jJort8Y|D>+TJ4i~%@NQmBS`$vQ;dIdXEVXZZXiRe{eeFYXJ6f$~ z55#2Y?Mx`uEqPc8_y?U5nMJC(G8g4a*6N_hn((Z2llI8xXXz9RRW?{4klsjjwFkdX zZ*?A&uYiD>!U6*8fr)RoxON(O8ERss@3z|Pd8^!`ZT%6=MXz>1eJb&6QSBaHI%Ix{ z2vo#aNmR?nNz3bL`9=_HSwlv5F!;FqpBv461|$;8DaRr#$(gJ>2ffd!{JMM>pyArgS)wU5_TfN;AUdZEX05WE=MFNW$5-y3e@(h9MFrfqYGc4_67Og6?pc9dTUd^ zrusdqemAP$di8sVU-MWsKdXK&X`kUe^I0iDztUVtP-MF?pPk2qXSWmXi#KYw;R@M| zeN^XHtj)#-sRL({J=)gc0v#uLH5$-hfg1?!QNNqycf)ahOGGoxe~_-F_HkZk(~B*& zkKkLVe0BJiDBqL#mgDoQHpT#db>$>0ogJLiF~7vqvP#poHfnEFb<{$==+H!-(AXiR zX>V+Au|345qXqjJyc?=(8hWvAA+P@4LE6I!K*Bgz8t^l@MZc<7b>!*`7YwkP}S9H|3EbVTP|xPI-gf>&d6I( zz1c%u)o)eN!jS2ID<6NofJZ<_9PzBlIjE<*Nf~E)VurlarA2_s~QwY5`C~@Mc zlE0x1sl!@%?M&kf7mKyhvd)WmiR7Mc<*veO>#fRKWodykY-S^U(bN6pbrZa7kt&xAowow}hf#L2l=J zeD=SU*!gGN($v`r?VX4F5@=fy+q+I5W9$$BEAdyxjMqoWg_e^n=(k7~PfHfP83W^8 z6OH#_xKaRH(sz~-uf(H3O{+N>+|F4 z^8sF@Uj>qa3dCD#1uSHLkQd(4j(3LXA$QI$oxdWo>Z*m>V^^@SVGEvLfA37~vCBx{ ztMHrIzC-|LHjiuCG_Ce&D9`kRqpd}OqU35#8$*p)aLXAA@V}MyM;jSMKtWA7fsscE zYfTfj=E^I?F6X)jX+>4@76aRC4}_56>e;hA%2s|Pzfo-7h{|@wsc8} z&CY=G7%R_oH>IM65e&uMNt|(Q>R%Ah*=01Nr-q2u>}UCZR2T-<+u&WTX~t(EFgQ~3 z^UPitZa9$`D#09|JM{VXK<#QiMhZqsqINB>kx>qB*~klryzmw&jTtH#1yzc|yzsSRw$zeiLCf^l zTvb(nOuKBpOZ+<|zKy#)3tUiBAVy51ana{S!!lKO>nSj442UOYPy6Fl-FUTDD+X{F z4Vst}nSgFWtk%eAl@1D}_|0+@jj%ltK>rs$vzTbL0n(Iy&+2%3+BVx-;yFwNRucyn z4u5@qNg&utZGq9zxE;w5qgTRHJiV34Yhj=$9}dF=SG86ftR^t@k2Att+gexywYjlK%Z5hzKkTt$ zps|Kptc!h39HSwjMUTVk6?F@4`5G8D8m9*ozTqAj9fAoh2yCkkeQHKtQNH;Djwk+x zae-%RNP!tEevQ-qQ<>}H9KjdlMWwA9dYgqlLYob>N(Y0IcRI{73ad~{3io*-Eyq^f zILMHNK?tDJ-!UrE zL8)YqSF5>5hDl81)XG3uBR~*1_YPx6o77e{JpEKU9qZOFvX+j>f>AWXyh(aUMNyQS zXGjqY%Cv+IAZrTfNixneClQfraZ&d>8pXc)1?T1@oHK~vNt{Ig4nZ?yD_y76zD#wP z@{j%&7wuA81YJ)H)JpGu8znwRD5&}`m#CZqwNLO~Tfgp}b4m+uk!WTv#Th}#jy2B_ zl&FTvHlP9--6unZ-A#08X}Vh8l}g`Z0==nslms@M+hd(##g)CKwSPodV9U2VqtNuI zCMH>^3w9*w3-rz_Ocw1`*0ntIBU(#e7z&$!Oi;48`#x*at%5AziELc95>Gn4f2Ufz z?kf)8JGK*uw15%ZCan~WMBL{q)ktISp|$Mu&GAOxe)$JK>r126{22z>{&bzqyw2Za zOT28iEpZOd?|H&JZgxd;cxw2ju8rJKz?rK4)!YDG#7(=){FK3%Gv|-ggxyMm2stJC zT|%VxCW_QIspO)lwtL;h+~_9B3E?(L2HTGejQ^&vkL9WI?U8laaDKr2;JT%VOQFBBO7=qg-hz|tXwAq; zp2q2{cGtS|@@Ev8f2QU%-DnR@_3uih+|XjK9efvZCxEWb7Gs~-T~d@@hea3)#r_es z)QR2MP-!t>GZTrn^Dcr#tx+Z^YAY_oiqU$ntIi&RV<;;REwRE(P-HHR7UU^*`vyn4 z1v9`XpnbJI+MU9j067R&f-CQ(N4cq2Kp?tQT;^X&2?D9-&J2wM-`R6SP7!v5Yvoot zJklkkS+wNo^D<*6K&ba+6`JqWS*z|v{<9q`-zqf!OWw^wexomO zoGy{jYIMxJ`ke4nSN|85c4Qow-P7&yy2~~54BMV)&Y^tm4+6nd6yB(_ z9jitbqCqB7*@+M|jaG>5SNd;|$|_q^Kac{r8EIn@FuS*hUa>rJR+fgyNAzFW$-VR} zbu*U44Ow!*4D^IAey+XGCW3Y5-WlLJYheJIFnDcB+Bjpji`Z9XoX^!Y*CD74os~A; zfBLM?>G@*i_k-hC2Jd`1(MUk)w*M#Cgx{mI&!OzkJjR0kM}XKSFDH2kZC>~o8!o{} z$=r4~k*%{Q+bO$srS#sHL3v0VxH4MNb1x#Ji<3oYZ$)BwMUt9Wz+JJ5Lo)&~!gwWo z53o!dSA_3R3E!U_zJIJa(wgzg3VdPFOauFA8Amb>AVwb!?^keRd;$%nfm^VfsFnJ< zi|^s^M~o7kRBD^CIOnh}G2eW8s?8Q*249-ynvoy&r6rkL1Vd91%N{%6NY4-F3|u|o zz4zD=priJl#SDv@?c|mbe*Hu08FYHs4jWzj&z2UzhOzlhAP^9JMssPI`Cm#N5V8c>g{`I{bci}WEn~1i5T_0S)TiXY1r`j6UH>7Frpm3!611H;h<6TF) zzbP?1=KqCa4)3zcIsDg1@dW%%75vw>zqS2o{hug!eaC=Wv>k6d9>4S3buk+l&cnOj zYi}~;N;TB|Ui*9Phd*snj@fi%2h$>ajT}|;=Xg=H#8CPbPe`kl>28(ES z7oum_4G0bH3r2&tD1Jg_Di`@{GmwkX6IfC^^73bxCoUAU;l}(!Np*z_YaEWl_qleR z3owW451%>u!QowpI}UfD8@%E0-`+di1h#TkAA@1b>gU8ZnQlW>*`=Q`3HU6nq^dodE?KM@bjI9v&8j8oj}+6%1-4Id=%?hLro zj$D=I-x*JqK-DCtFeA7IZ-@DAuaXtf8Mv=X*Hinx8%4zvD-zxIp}fP-C!6aC(#pI9|^h63Q6+B?u>+_Ss}@u*w#qM za4RIm6T2r8VzWY0J+W<(kWZNyrZ+bE|UG%s(i1toiTCy~_NRa>tp!Q0{p1G3BP14=Z%mw5lAyeGx`n)3FF_YcZ@M!YX5ubl49r<7NuN6km^ zsw#_CU9(DkkYk3aD{rEBOO-cCyz`YeS-i89H$}WRD{rcJZ&cni@n$IRSn-Zk-mAoW zk@Aic?{MWEFWy1QE0@ydnR#K_KT*7&D{q!~KT_T);yr>_Re74c{g?W1t9TogH&47< zm3NkSH!1II@jkD-cZ&Dt%6pf14ZOnBt+qz_`Th4)A}^hcy!5(DI2#&!Z$@Uv=gMNk z{uLbc!gD^&(;Qr3hta>w$W22X8HS|UJQ~;}ccLHBnt^OwXeR@OKD(%fULfog3|E3yBjNB?;=%oTX zhTf|xiAcHdi<^%^A`rZ7HncFBauz8` z*ZDLb5SzH&YEO@}XL8VelhvTipp#v1e`~gKk8PX;x8Bnd7j4ZCq&1?I);FUiPPL}l z#f4Zm0UX_ts}T8jRoM@qKS)*UeV2$ru}p8O?##;z#aSYML=-uGrGw1qEi^^Ccg{?6 zlsHC9aM1}i;*dTv{>vO!NQqIY6WPcM-~P`R0gL)r_;Dqd0a|6O!Xdptn)B~WJ6ABr z%4Gl`8M!Iy*zipNNhuNtNrkc@&_SNx1Q0pO3Ur9lnsv8Sf8E7B#wvR9!oHp?9@vxj z4UhEXp8lTvE3^%(C$|phNu!6J{7uk#p{PHMds`aeR^UM;1VU1x5F*N8lJkVKKRhx~ zPS45gT|EI6Su(KH@muHlYuL6X8Pm`rXohE~^L(O_H+F`Rmo~!$ zDY2np?FhqrgfNj&ztCX6&n@m6 zr_=#vgM7C!!=0J$(qpY-!p!{F6QP}l5+WWlaR+X31tvQK_qq%6^JdRMaTpq~!fg?8 zfu456vODb2fs4Sv-E3n-(aak3x?=~pE3ecky*frA3b)aUWvPISoWRLeceeinX9O}L zvO5h?BotAqJ`4pc&$pq?Ss=;Z;e>rx2GWGeq@d=U12*GX6tNYhJ@_{%rNXsp6-wOQ zMx#>UUZO2~_X};s5t}yZ$R9N#jM)cS;$TPmsf+_(YRk0}?Xv?Vnr}bPTP4~%yT`QZ z$+)}5v}!vV94#P!uh22D(-Uf&$%n&Z+V_8uQJ>y0ruF7AZ_SNHn$kFbSCbSAQ6Mv; zzNbZs@{QD9)jYekDP-eIooWSQVNzSxNPZ>S^>8gmK?-Lfih1qcOCD#={G-EBwXp5tD}@{WJS| zulsMjwb&;N65$1=P0JYyqTAr$XSH_~84n1#Zj^bQ4{H9Xc?j=Zvz7sE?yR8&B9^-H zI1)aHV?#W38V$mvk%d?&!m3V5acO7|a)UF2^Xx_wF)mntUd;inr`|X)6|%~>JL(d% zZm!)`*-2^5tdP4_53joE+OH0%GHarRGgPG3> zT~HH5n?5S(x8ytzS?XQDn<8iK6@6#s+iY!+-OIpM41a}U#y~*QEKUYA+EI;QC=0sm z5zK%Ky%Or8Ou#5}7A z1e&+eUD0)P?75pMkYu~X=;Jays%q^SM^N930^h!>HJ%3_fEY*ZD#|nWyQycZf9F`_ zRW?d}P9e45P`a%^m%4`J{Gi%u(%~-Zb@MWDte92ML$lr@4V`>BA4xR1*>fn z!8(_13s>S?f}qE6mXM)L@JsTXmtb^pwJS6`SZya##u4ac>^F?h8$KP`a4aF=3rG$L zUqT>fnG2LV0}1HExtt5g5sq$ScXf+gjWl$QPWU|N93F72F$0JjQ3KT6mpc=BOR!`V zLDWF7|HL`sm!hgT5zEgML^2TSNLHdB?O^O=GC}=bTH^lD{=-W2;|QW3h>8#k)ed|~?i2k;iimzB zTB0Ax2z;a{(GMjAlDlTmx1>LA*P~&@^X4N7vZv})R{6-PQ>o=~+V9#9e$r$#W*n&c zVDv!~6+#&Y6kZVnsBVAnQjswjz%meHK5{>6fK`gif9kA0#H=I_>(VJS0rZmQQOeiL zQ;Y_=!0C;JTfbjm!-Wh3Qj_NNzC@;%l0~SCfsPZ*8X5+A2K(N{vw&wsy$$V~hy5RF z>`Yf1@A{8bHiQQG#+7K5cAjidaAkI?{76uCmi*+&&t3AfA{byw*>2I>SQma|yxS0R z`ZVa{H{1A%v6jSJ^ltw#&6mQbPhy}cYwHMgPABw3hc6BrT({__XU}cwIRcqC{ooAa zATmTMe7b%bT-=v}eD3H3!B{#fMP2tkQ5KzK&R-_|qr@5RSQ!o{w1m8hlQFZpX@qwsmK?BAwGRDhLs0i-a;^ybOHvT{C~+f*BUgbaSV{f` z(kA!R@@XFmB*2Qzx1n+Bfqqpw;y$ke#_+fze0-r?{!oGvEEDJ~(&*u1PSxtYpJPeE$qM=?f2-~A|N zGa}Oq#RpM2($eI`vt@v8_mfP-nc4#wFR(QBaVLvvDw#F3?qc)X>|D%otfpn#`kI$4ck8`txuIpYYq*HGJ_wOC%{jUu~=k zE!6@0u#eNC4>R8;rPW+6nBNIa;Rqbe?FHe<5>3}7Gu%uXEqWnaOZ+*ZgGRGJ5qRvQ zC?2a?IL`SuNCN1;v-Fj#r7%%#hQOW4tb!0fhKa^@*Z|~aFE(RWNr0W9b;Oawx16_r zTR^=z@NL^jYi$@x6UF;%-Cjlf(vCQ(+5pP_NQtt?$`M$2xw4Sy_gAvl|DI>QZ!Jo8 zGuhW~sAtu5g;)6sO9zKnVGU4Gdn&qUPy*4)zF)P@Zu5;bDt)0JMpLjyBMmi}S|q8^ z(4kV1WT^QP+dwdiW$@|TgJjG6&hZwW8@Rve9k{=F{w|I+VrMbl`~#O5k=L+32oX8Z z3Fc`;139uWxvqSAK2OQn_>Ps(Te6YsU(NUI$q#a}N^iXo!^mS=jh&Z?`8>4I#2XEB zo-k|yXIj(M!ai4P3w0VwmAve~?U_SnBYBHhlPpynaR+V+MOI&!HMH96IN=wW6WQ~; zF3bf=M)LbbW;y}*&-yMcGDqV#x{4ak#+pfZ{T-v{G<3u{Ec+ek>M)wtXJPPUVvJ>g zt;qaTaFTE&kkK*AuQGZYe~-4ag|ipV5QjZAU0_4pNbh z6lGInPWNPIm2W-+i{MddthM>Rk3mq2iZ3z(^D??K^{#c-gl~7Q9&Tvsr(AmyeMo~a z-uYPu~-mV>^5*>}$^P=v`~~${2-4`=>h3;#nPUXuzs}P)x|pHj@+= zQxYkntUbAtsiCzsw}hh$-;mKNG)Ju?X8=BsE%ReAMyg$b`;$Y%@Hm6nNd&iKC&vgD zz&`c@r!8P-xf8e$cyOh+`ajSd4Hxc8XqeOaE(oYEbWk*OC!sTqquBg7-sRuvEHLhM z29}~4?F6C$WZMrA#^l68qudQwjw=vkK@J;n(|qaEd};8aPxFlu{f^4^@&l!bp;0Yy zfQ&7)taNxNzI0e9jx#|_scU{dhVo!G`E4}=t2D7rHEv-oNQ58g)F@wq|I|gSwu|b| zBHrz-e=i4Kdn{5r-Yec5@YYLGrDPFtA}O8`tI9KP6wJLd*-$lt6F@YHAAg9j8(nke zVC(jV=eWp$X{FFizlfe>&Z0@d97+t;`D~QU{n@JTjSuHqlVHk#Hs_+_l@@2mqh68? zew(5f1uE(T-tC+{Dy7@wsy_+eBnP7|BRhsWR_@`Eq7D>r_u5;1+FlQx?K0y_qbc*w zS~!8SFbK2uWal5D*$*y(?I8JWz1-MfB_)>=FU}kDwxbQn&OpJ=>JLV98d?*3vwv4dcKYWm_hR&BFNo-12XfA}Q#N#IH7^KM zv>fc{X_NPmGxN?3U3&Z^&)aLi>a3M--aSv1j-E4SzXOhzJ!E{DmFYBpYe!akDJ&xILzGzat{TFGJW;;!OP!MvC&?7D7f10 z!QN%N(NY%6arK<2YyM1SQIl;H?36lQLUQ<@Jk1ru=oDjbaN@(F#pui5s#qPF#fNvycD@Q;g@Wu|_boA_W6qC2HL(OfY|E$sSH<}K9On(=5^t{6kW={HB zfV~9Is_in~l1`_)#EIRta_2q+A5KyRTZ`% zC!n_~i2i1Ws-85yWT+3%PH&IFh$WoS9Id$%9_NT{tWXDBS}dOnNb1ij1On+10#)^AohStkeidsFq8z>h5Y zgrY^=Ik9iS^Pl+t4ddof+y9Gk{}IN$RfZXiD?RmpF|PhU9^=kpoc?EF+-cM(igBfO z|8p?zozzA!uGBD!aV2a3#+3^HPrU}E6&-=%R|3V)1&Ut?6h9Lv-jwN0gNy$6cl6QBUV=-C zyKomochL$DH~Z%G@ep5qTGgq+K78>=#GD$UJ0^ubM$tfB?r;6Q3EIOyVXuZ{>?LlX zB75IN*Q&Tu$L#5$_fRMer$$7TTn0!rgL<-{?)G@%pvQds4wJp`E%vcx$x)oQqTMS;RNt%f^d z^a^h76k`rnRR~^-<%w4eosu&v&-3@5Up~01b6i%PHZ^3=p-e2EjaP0td`8Tq@ zS!JEB)kqzvwpIga2elIXSOo;UFOWS)ob$*CGKqK7`uJ&*sjnyC-NYxU!DW%+M@sRo zNb$Et3jZitI9;RFxTEDblxOlf=;>bV(NEcFM|$TWk*t~CIasw(@}dfixc0CRp-P>d zKj3q4(%FD_vo*ehN(XmdNLXYjFXhCTsD|0k$t%xa@9miwyEgW0eVw<* z$lY{%X>vAA+=NE@+)cvk^8yiXpDu?Z`7{K@>M~pO6#tt~D_| z?>m4H?=y_E!=Wb|-WSA|uBTWP)gGHpUe#wehv?=9+QZk#+nYD3w^gn{@t)2fNklI4(sFvd zdw{Y^a=_H2SW6n_uh_{^UzDhM_jZbrn-XN|M&Pz9jG?zKF#U`$d6a}>{P#VB+U=OzYr~a0jNHve#gm5j5wv4u-ENgc_`ewX6Gp+& z>gJewdb{FKpkQ+etZbgz1FNr*!}U82pNuwI9rbd(*ys=}!ZzP=K+yy-W}C3z(M1wy z1f;6mEk8@tH%Ax#HN{484OegN(3wEzj;?O+A-m5$nZpT;1|6drto`?G9_-z0csDnE zFna%I`#-_j3ou)7lv2oE-&<;{JwgF}0F|w;2^fgD4+`A`qJ$b*Kpg%`O9O~Nx z-sV8=?vjAMHyR!q8t4?J*;m`kW-St+@m?8~Sb({)etXo%LHr6N}%$ z;Cy>%jH=EXQgUew3?h+Fn8G7Usgw7EbB&6s1n=V|fvNFEQ%OJz6vYHq#r2W)%6?$2 zyEnz!6MxDR;z^0aDl?C5kUjByp0zylc;4W7nWv5ig6ua*aN1V1ZSUgtI7QV88X*G_ zD1Kzj+b!NUA^K@s^~CHkT`k^2^48*Q-?QiIn*s$@fOC;Zfy6aWj=4JI!KD7r?urB_6O73ZY)b|7`i6?_4u8w6 zK*bXZhn@f*_2JNcf!rtiaOh4@J?{#KHVY0_<7#+60V^@XDs8qOdSAFq+)MNqSl1ja zfr{sD)3!px*<9iQaG57HX#Ecqp9~e`((??B>VpF2^VbfPFY(zUwYT+EgK7R4 zH}TxQvY+a$Zc!Ll?}D7n(g4P-7mRz7OR-jPZWQBoL&b&u?5GduT?q{eeK}5%1cEN9 z1mlJ)@3%0n1gu$P6xSOqJ?$9>z`2muyqg(=Nk&CYO+goykHsWelfu09`|qnC?5!tn z!MvaD4<&pa&fP3y2Bk#r()Xbgx46DmYCG4bl^D$>35}q)E<=ZW3%cu4+g$J{nD--v zdErU2Fz*);%-bC(R$jrpr{TvE{Ll@q7R;M_dTIpoo>rK*TbPgq^L|0UM$m3=xupCe zq2dJ!hR$}98305Faz6s7O9B<2gy7``yT0&E>}m?eM8PJe)PQ}X;t5DY%#_;hGxUD$ zHbhAa(D6u)=9@w;2i2liM|<#BKvp&oz|<0I(z{qNJ_RUS96kcj72DqwI35Fmws*|F zfVW1hNc5`O(#s{DR%^>(cxw=Rdq(qT2&gJJmz_Jl2%O7Kq69?q58-^6id3(k&tzx^ zY$_>2ccX#brepY^&F0&}s*uZd5zFIj6eriSWvJ-Dpj~icQNa6npkkA@70fY6`$L_!FqxW`ej_*xX_G9-mccYAc zL6`mx+YvBIuS^Q9CYMnG0FB*QB?+y7bQk4xLQ4#*9Yqwb^b3Q6O zIKckTam3M`a5$k&CRVX|yZ)h3!2x``HOUx4u+NWBmGLnhZCiJ>QM}#Qz5i3N4ID)s z@TS3L6-sEkoup(yeLo;Ai=s6}b!if_e^YRslj055BtT7jw3WQT+s5u-#ZId5qT|4e zFGBT&G)$$!30xL!502+%DdBShjNMp^mzpND!58P<2|t{B0+ZRZ52$Y~zmQ8E<1J64 zbpa$-2(`OVP@22VXU{Rbtuj4M6S244p5xH>7!5|jHe(<8nWF;*^?`zpVA4$qZR8$w zUPrAH8Vta~Yc`n4bZc=4t|Jb))2KJCU@|6vU08`bZxoDA^D3TMpB-kkn0W14Z)k8; zW~T0HwvW5nv#S?fI3hRh^EyX%6j;U3GWb;Xcjk+r7PVnYDWpn;)@~ zvYTfQ;P8JO`9b44W8~y|M3^XNnm^Bv+Sr4?L9_|PZmXiBxn6uzw1$X{xR`{N?gpnX zc8JX>0WsoZOCu@>@NpgdhOpZAG$?7xn1p6y|LY=ZIp&~mwC8Q#D9<~-1kXWz#1PwE z98BFqY*{!YOyvkjNsjqrcF&uO(Pi}N`;wI#LxSDcM-t+5V+UubJ?1Unm2{O4(<0KL+{CqT{ZP|iPEvWW%9_VYgb{*v zxH%O3lkIp(`sKTt@}_FaJKxcicm7^eR73u`b~GgH&1im!ZjW>x+{N%I8qNJ|yBub$ zscO%X>FMydq6S1}K&wk;CvKw5P2AMTq{JIjXzYJOfFlC=Z~MkD5;8>A1btg3C{sfw zDBvU$6zDScBQ{McAG+HGX7o7tADQCw=Sj{O9kdVtoQ#Q!R}06Qi0PlJHycJR(LkLH zJut$o_HT?08{j%WuBA7-{3pgg)|veqGV!O{LU%BSV7C0W&TJSdW|1AdkD;OFCSqG< z$>nH8A1|b6?J@@F$X?D~3YN5+ts1WEOJ&}FE5)HBJBii^^M%+#auu2Fs%UtF@}3ul zM1R<>5AIgvV7s2+569>!-C0xYzESYm{*I{F+3Yf3kTi2V&AyZ(^GWf;FEv*2OX=}Z zRpuh5R%D(;rfQC{Pnai9#fs)|cTh@co|5ULyL{NmeHm_?In+x;2!v-b%9rIs5%XDu zs;!)1B+kn#b@0EK_GT?U%J~#YEXw?~uysW^szj@e=)Qp|cQ^tN!h0^1B03p9$;#-P zD_jUq3>(gs!^}cTx8xgU+yZTKwkZ693+~15vl4l`U`X1$k@EB(gPD{5C<{M(uazD+ z=``|BC@P$3w*5+-pG`M8S)6I69j`I&Tn4q~d6tF#{=dI$?zQhuT0eRI=7QI6tE%+%fb(^i@n1Fq2XRzLfDAJA(CRwp}Bor*~`>{1cj zSTh~MHLT6T1T4&P{dzLYW+Bw>#Hb*jggw!X6kOwTGGbBvJ?ER_$tVJMx4Bc*HnZ~z zs%&ZS8Ku5nDlO>vh6bO?|FZ_4Um=zd)!_3p<&S9a8Fzq6a8O2rPvN_GqZ)iF25Rt$ zQ5t+?Ki{vzXV~*M9Cz_#16SU5SvoC%Bw%yb53 zx-tu}*DbQXT;~*Eb&}0EoSY}&PU583pf;#bEHId1>_zZ_ZEBb7SJAYVa7y-tdmRTH z-Lfz23XDLMg^lAWBqJP+2u7f|6+^4+2|eE97Vn7zXu8;FM&scMJCwgz|5>~Bp(gtB7qF1Wr zbx$KC45{cRP>awlqt(6*2&?`?Bygrn|GqKPX(Sk5&}qjKIrp-m{WMXG9e$7)+r|71 zBv?`_N2K4&UB*molG>`6;o}XDQSO8Zcdzue)xo5597xz7tBzJ&a-6Z^`VI#?(zuyO zos&AzvY?g%T55MS4yj%)7Ja10*G8_IwaA+p#b$$zd7r_`q>+t_V>K z_zPdQn0X(*Y=z8znYReF06OrKzX`-)QL-%!*O=@y%3WB-zC~;)&P>G2+&ckyXMd7Z zEkwpdxWdG0`%h8=6=&GK!5o$m?h!+}HrQ0)OJWfTR3J-pB2dw#k47{`DX4Oz9=>RC zk?p?v@W_Rf53Ns`aYi=h#&n2vu-)|z| zOX7$mxny9S5#3zZS83#=I`>Ey!Is|gupL(GK}F$_y);KvfM%0fyedD&s-C_svpmUn zb!K@A49Qa`R!^Lu?D&W|zRX)ExbzX8wG+l8*Us6PpHA>;vV3aCigV|bXi^1* zEwOnFVDe2YtdaNG-*}%DeW#QEzyGUy-EMn<=QW-KJSI;!k9)h_b|udgo>@E#dCGVm zKwKH;(Lu-iuQT+VYHPY%y)o@G2$Jdf}^$FrShFV9h)PkB!B41a_2 zc(QnA@XX^`!SevmLp=Y&^KU$_@$BI_#&d>e_?vdyRXjO7ck!&{d77t@XE)FLJYVpf z<#E^BZ5QyQ@l4>!;kkpSlxHo^dY-3wHt}rdY2)epOSB~>@}%;NQeH6ano<+7Fmo2|{(X!MPOI9qhMao>Vd|B#(A1^Oc zg%1piRBZ{-%a-3G)wc~yQ?{r?FP91rNJFGWK4~w-`<5(Q;8U4L+FrKketk)qYNCy9 zxm)*1C#04vFS~DnFLhB_8Ff{4S52n1bkO4Ebb-E%PP%(>q|0ne7ScION|r1tOD$V; z-}04`Q_!MicT4|LhZWR*McI-Cd|0wvI@(vZd}-?P6^qJL z^(4;91xuGKB-x^SrS410Qx~Kzq^5V%duwdANZ+NFFL^+X<+4S-Rm;onrT+1{)jQZct&B`XTEp_>_rE5|Zq?NBJ_bs}QyrMm(vXlH% zt+JNieYaj_eb<*V>#UhqwqO~+S?&{|dQ zJjn+tA)jml>h~>JW>u$LpmLe?R$smPz6)e9|N7p`*WCBx7td3mh#yK zBg7=NMdAL%p;MDE7-;0C`9+iAV zU4Y~xn6w=?4p-9uB;sCz+r|5#i0hApe?)yGJv0xSbD}+QByKV;7W-@yaAmSe{TD>) z_aX6bC46WkKCh}i7f0g#*=eOeKk}Z6EBO;_yNh%eMZ(cwqrxwuAwI&haO-fhai7G! z33oH@wYY7#=i_$adU2gM*b{SclW}u!ufqKiZWivvxOd^^<1WP=k6VSCg!?4!<+v~4 zPQ%@XI~I2j?gZQp+}m-xa3|q9Z)APLO~Rdwn}$0TcLMJ9xYKZN#=R5wI^3nWH{hqWJluP57vjpCufbi4`y?)!3e>pD{N2R6R7BwR3S5CZfrCAS z%lHetU5I;}cciEloR7s7_!77{Nw~njE5n|6C2k6?jQe<88E@%t5gZmclyRR;xXdGg zCxNrYyvzJsjVtrI4p+y05_cu;M%-1n+i`_J6*5an}F7shLuE5;{!lUy@;5UzOna_9OR^hI|t-!6qU5ER>+j|%AsH(H?dq;yt ziW(6W5$&iTQ4^T+`4mVXXutpgqDGUD3`t~iFf+kKsYXS`78R8$TC}LB)Y2LiEwxlr zixykdXlbREDphQ$Qkz2iN-)whQ?ox0ZxD0fH zfd1$sNFpJk29iOeJ{IY{d#nQiYTy{iVixjIb4^pKo76=sEi*o*M*_XGMq)^fDDa>m z66k$?tf@8GnU)<4*-R27W3CMHj58!i#@)VndMu}b6t8Hvn7 zfH;XYx3t$cAR{#C;z?%gYHv$DjE0n3?`~%+&ARRDnrgR__RtKt0{mXYgP@AJ=2*? z$)5d^-rQ29WX~!?_LM@_1p*>AWXEKcIemIvR%K+rOy0#NQ;q3>`WtJy+>wb!mpgR1 zr%K5^necQutICk+Qsr+^JfkYkEZ;jS+@47(I3e-EHHBdZdr=7}t z5Hj0sOxbmb`2f3|+f|sonD2zj#$>`=j@=7>E%)h4Emxm+#c86cdBk??K1kV(yCb7c zn$#0D`DvPr0mJow4yR}dele|0OKOc;i`J}Jw1rv?>Nuu#nv9oa*tTf({MTqrnjaS$ z_s+ETGqvDTY-8BAqh=<7pR4!}3kq(W4_>GRPyyJ^q9>hF+5!o5>`yh$Dfpy zS5e@+SG$ zXbDmtHpnOs;a-*7JndXk+CaJzpzyc&RBc;0!<=^`9CtdL!_T+0b>X=h%2L|4wC0)t z>GPz+mDUl{doxzKa4D%!?J$n65i*A+^;Ao5X~A8aUIJ~Ykj?dF(=zonc=*yINPlps za5D8H;TS!E^k>q`v=D+(hEf;O7f3luu48%~2}h`!F{jV2In((+{Bo@#bX8VTDwFhb zm68*kq{v9!VDY)q@wLK{QahFu4<*s7-gqIZX1xxKkxhDi;fzd(iZASNnZaL&pZ)}C zMC#H@PTHfSyHSs!QM(#6dgM%O20z=i48I(He8MYN{fqJS=O3eFje0*Y^-`V&PZ{Y~ zW#urn#VNGUa$FjD7%ZH@`X2`^+9>Zr%1K&D6TGMDT{v;DkTRpL5pNSEqUv5+l^WTF zr-Vx<(tng=D&w;XPwGlIKw=ZK8ps$^B|fv&kDL&$`6V7+Ac{Qr;gwvZd)3YBW9Z)tThzBSTo#!_jQd`V7)7i2_~o>qFZ zh5Q?B-pHBa5~G|7^l}p3GbCOMve+a{ zn+!JRm`jYs^f(TrqlsD(sVLRMnxXcWCbx9V*QUjig)C?+j?HguW}Yhg(waodtgNNA zorNaM<|blo7cIDgU6$$1Y7dANocV-?T}qBr0nA~YT{bw9HO;a_sMRE7*9)v|5wTsX z!NNd0io}&|vIM7zGjSr;wXsGKQ?-Th7IvAyngzPwrj|Ncw$$Qvu?|`Ps;X5MRSli3 zErhZV2V%dlEoI+n)v7veP_xFIynccBX=Z`HW+96J8v9yEg5()1A)6I@(xIoDwCK2f zMpo`Fs1Mo?T>)xK`L+ug!_IY8TZewV5r8wW3(9xNomvqYOW7x`J@=TPvBxzh3b8 zXQha++v6gBOE~Qb%9pU%fLS0#CtnT~$vb*U$b9~#Vr6uab=s+V8x{A`mm2;=&eWqx`OoN8 zI0?c~E>w6TNoCAb*li{gBOb$-5uZp;8M6xrQy6+Gp$UIU4<+SONDnC}dP&sWdA%N|#6-hKZ5J{$_>bSe~*J&HyJ-UUmF;rs5Z! z{A7JV?BypCvoaA^%4LaG!g@y&KR;>JS%lOz)6S%4Q%}|rM`jN@>gb$fhJRtivBw>s zd&0;QN1b%?DWgvvbK2O`&-kL{%(KoOH~yRndFP&YetyBkNmiTP;dHq@UY|b@422`n z!pT#Lilf2D~q|9$OsqZkUSD4gyn$&lh z)OVZI8;;0?`K(Djf_Ml^Uq6sJyo~v6l$nhDY8)_D0pO*0qEME^Bx$Ipw#8zCbm{YC zXHwL24E6Np#$+Qq?^nmBw4ti4iO*p$pr1G5}-XI&g3=p-8rqT7(uo4?fxm8xJEiLhK_FIMj((X-$^J^NDQ(M{wIG$1yk1rt1 zgf=DKl86nkmAt9+Wh^8dG4B^g%5Xp!y6Mz-d!oS@<;Z<(vVJ;1XGkfu(#8dC^r`b3 zV$DWkX2Rzvd+o2fYeP(Q)^9IY)-PRvAG^SaTZZo6eH(2 zlwLWOn3Z0tz-%vLe=1JpbSC>T65sR$e9~Cg&#-jLjGESTZ2j_29o5vwrq@Xt${TAJ zO=)RwPP(1Co2hIanDRckv!tfEF0NQd@;rq7d~L@AoE>64?6wCp>%8W*u-N%ltCh57 zLA|wV|7|-c>uWnfX|KCM+Of6|l>IubPVIl@fYNSrL1{~)L0Mz5fYRpkKxuDQ@L13b z9tTE2*%vPXbHOrD*3Bxwkzh4=BG>?q0$V}Zm+Sy#-?9so^|WQ+so)Aw*3(vjvYxgE z)b|-d+28C2WnFC}DC=rHpat9lo(cAXvaYrrJR95zjstgt~f`GB$&Mrz5qqu8wTd0KMEWR9u4M!IiM3f2CSF`KY&s6BfwJdSTP5W1M9%! z!B$WhZV7k-D6-{9P-M#!!DX0_0#|}3fos5%!Sa3gpsxEUM+_JXH@JHWBvZt!$) zFL(y1)x!_q2+#tK2G0b?foFkM@N6&$jsr`;@nAW44pxRU0^Y|9GnWS0;hp%!RcT(cmcQxyb#<1mV(>Bncz{>$3Ooj^1c!qSVh<+8ejMo#dvJx=gR8|JTqpK< zq(|(*&0-Jsig`Zi5p!_2n1g%8+^TU{5p!?^I2;@eW;tn}Vh&ox91M!Nm+}%lST6b? z7F#`>M;DFST|C}(Q+f!`5x z?2iC*Tj(pq9DO!87QKu$dEhOeMz|sqIMGvtS`K=V4Wj5D21~&^!3t2uraJH$uoe6! zC}WI_ZA;L91Mc*LyxE~G%(U*cH*iRHhp8&1ce*r8_rCZL7xOyVNchi zZAJeixE&PPBZ~R4;4btRfur%42lk=A0_?^9i{O6rHDC$)y&o(?e}mZL{{&EEqzG7v`K@3aoC7vs zZU;NicY+%F@xW5__254Ij{{erUkI)SZwIZoJ0Dz!z6sm_-U#+!9uh=z%?%m9!QyPv|Hs zg!0Ial035hqEK=#dgX2*yAATlPKP|QFQZVnUDJ0k6ee}OtUt>m>&@~sr^1yzG3wZVe?N&!Ut++3Ax<_Tl7_GcEEgO1WQ@ z3NOJlM<1= zQB`7!Hwvi#Ld=Cf3be`W1SuXVUWfedpA@i4 zE9SC~ENPbTg#rul=dg}sM>;RONMXBkF+VNWy!VCwj>m(T|~uHE+^}yD10nsq{_WX zFVmTN8A%^4q0Z97kUU7gEPNwrQt6O>S3;ICTl!q#Gbu;aW|Vu?W|Voe?$>BDQl@38 zI#Vew!^F%(stu@iYv!{ldLC6@qUu|<6II`n_3|>;rP;la|6=kZkIHAU&I@V}vP9=o z8Eb^ErQNGM7wT(b-iSl>1rmp*NT$S4ly#`dd4IZwvBE>C6xaE4?s&Ez0 zs&M5*f$+ZKK}lo(I*{|aMsI3_C1((fy1gK!7Jif2A__;Wh7gZ! z@v9cAYTNLmTB1txWW64YvXHi-`0oNe{mM;wisvLPg?c?GH>G;pH}WoWwF*aZvT}2w zzE7^)l%?9MgfoS9WyDozs*kxk?Mw^c`m?L0X=@kugJ@C&PJp+B@5N+)?P<^nP zc__82FGDSDPpReKP{;MUR_0Cco*|2g_{#&H;m6F3$ zdJOqV>BNu7n2Yp0D>-qI-rvX^Oj@DDq2y&XJ5w@~;#Vc-s@a#4?^LL2R8X@ZnHxzS zqVl}@}Gh-#gs(6+Bqxes$RXUYg{$)H6*<8({ z)f`1m8;ZFaw~hI@p;x|?y~sLdd(oTirDRm>%Dt3MMlbU%ISVUx24BjlOp&3*w7}4 zj_8G}GJ5f++&1X(E47@fHOv!wTT|vqy&qTeLKTmMWqSDhpX;TDGar8E_*doHV|n@_ zIoUZmLRvPvfI{h~FLK=xhWl`o3(|Q0aGkQwO}SdtqZF&63j0#_O85WzzeOAP%j3MV z`VF)hOkct^GY9)E)eijicYnQ>`DJN`_cMoZgO>Rnp&j1O@NfBlz52=jfwgMXf8HQ= z2fF@m;DD^_)4#04e2f|tydf*|J0k1weun=8^YhP|>%Q^CH`jmb+fQ~s_4G3vo_+2+8^8Pf_cne1g%^8%@X`-Azx>LNw!He| zpKN{Y^*4IoeCwy%e)jXXxBuduU+(zTyYKD%_4^;}`tUcu-Tk|dKHl^DPyW#N$4~#X z_rL!9mwkWz?DPG9`};q%fA^s3&<9Zu>!9lYbpHRRbx;Eo zhdQ98&~j)M)D3NddZ9ij_XgsC%Ai(gCDaXVgZ4sWZzOK01S*Bfp*m<8v;tZUt%tTi zyP@2rxQD8t<ZK>nb*d_)|y0Z zjV{PnRV9*js6|s%m27Af3p7<#3wcGyP%qZ6K1(^1aN=!gKe3txOiBnd*~UTJD!F-r zgTTBFf|?6R;*Isqypv*>NbM+@ zw#ap0+{abVIrKVZE(OzEuhfgBUMK;~+T~t3OsiEft75@ne_QN%OF&L#%Oz`uH%l!C z(%ai&5@@y5U5(s;MzId&KNY^&J15P#_D+x96n{E&vvt~DC4KNvsuwr5CELk;U1Op( z&ZRf{#f6;Gm;A*VEQd&f*-fTwESY4O!Z=tmwCdWHR{a*mbXGD2Roz~fb2)ZEBjI`Md-QEI$8Qy7ZtO%->5 z-KCeAZ1Ky*Fq~?yJ5=EfbT?=LO4`izFrbt&CEd@RQPxAcuCD8B=31XxE@ClW;%Jkb z94(S}!;Y5%xD&#})`kn*q#0w#DAH~YnHb6A0cCcOaQn5_r2Yzt(QGZ{v};RI`obY; zXO_v*bf?5?xJ4;rW2s46koHY>g>7v$op?w&E#ZPnc?+)7 zL#j>YHMhs(^j&$ZF34M5ao&G5o})DFC=JOoS3B}3?WiMivx|$1hsoozvV+KzXYrO* za2nWSwaza)nusj=yg#S9p_+%qiq;OE962w1w8r`XM}YW=R)3D_>bkk>`Ys|k^5(9a zZ|E8|Y#1@zbkj}4G|g)5D(hN?>%0lxviV*3Cz7(VWq7pYbuH_{mqs)V4GlRtM|ZTg zUe(&#FMQkCb7mIKUEXn$wWl!qI`USndIw5Y&88BA><84bza(#+i>iE!vL(DSI5<3)1e z>X2n6?kZ}M$+knJe|kdRygGP%(-W}VA<{HG!E0=(>+H12HQa%mx;I%E9`=x}4^Tuf zbs?(U^q0QtSDClABpAMUm%2`_3=WouGcH9oHMjhUwEF~m#_EoYPQ8T_!B{Q#$389h zd8mg43*#O#!8NBSec4DYH+llcsG%t8-jlF{Bz^L9i8*9Bkub35(5D_w&&jxjB&?mF z;m(MoYm~CHN?1^1%M}UZzG?H_({slz<8JKjnS4li`RId?Iep@8u<*pM<%5iWb6iPNxRSS}=qpTS62Cmz_+Mi( zmw39-Z!)q^WvVCJOVidr5?PZ9bu$f!ecGgvtq{&sOx?j#P_v@&~NvmM+`AZKT37AOD>e9q!- zxoiwK6NkjN%M`!i*2sr}Mkoe~KOw0rF&lAbCJ%<$Sd$q}w9A~CzEt!-a%j0mTFP)M z;k6F%Bkqhe7-*!yz=3I5WeUSc%Q};pgn7HWe_H0RLZ2^!INrhts;WTn}VU*TC?P zNqw`zNZ&yFr*7%*e_;CaZ|!eyj$h*4aa$(uyG`nW?n?PyhLMI#P3nQ}qAU8xw`4$h zG_CA!Z}z{IcktIi=JGJxw_=wZU_UUw(I=GuVc_wQk>>6J>G;#vmAh%+EXZ(Yj<5c4 zEq4(#RCvqsA$DxKF1H0-305nB6I-p!%kl)h#IYBAdk0_n%-kBoGg z>-{V~ZFmkOj&C4-!TftvpXUXQ_AY(B*cs`NKBhk9ez0)G?b`K2=U41c{_fEB)1TLJ zDx;PJW@k{lIpa^J0Jdf&Tjj*qh5m;yvoq{{GGNDfagau-}rZDkpfHQ&gAZh)SHK7metfbZ)-Pe8qp{lP44A#^`<#MiU5Gax^d zgqA`pp*7G;(EHFCq(7L>L;GUx-`3Zmx$jD!R7E0IR;(7q+M9U?6&tXp!kGXKr$# zR|RFN5#ctyN^oHv(uFDfeu+ud1Nl`q;6zO!_s^@zf;5#)E-K0R{TF=AWvOLhBO7BW z?$(RdD6g`%Mpo{)FHaSLEyZ&Yn{qIRtqoXSGOjGvmXLP7_t}-h&fg6!a?GxKGntd zZyIJB@|*HAg{`l2C!(i}tQ<}?m?~dFnuXEXJpdIz;#f2-Ipp8QvlQZvxT|L^qyRXQt2}f@R%NGrR5%AOWCD* zQ}O?Q!V^t>k579{PCcr^e<#fiLse=>xbWh4$E z%Smi;L1JcwKsJrpE0zXmAR^Yx5`!3L+ zYLi;bT5)gKY4|bJ1`cMX`%AgCru-Z6R1@D|)cqC80n(NuD}tjzQEx}R8`=V`fpRfh zBYA+Lqang$-C1h|t>{^g)_T!biyi6L#7xQ*WX)My1F<%($;Albrw{i#h0ymB{x(R= zqnHVr)sk+}Yq;$b_mG6$oze@6Ud(&(FJVZyhCk7J-_O!cfET7f_0UbwGtj%x@sDR| zg-{FhHRuP>@1fJzWocpPV(2F5o6u{}9%$G%vNRiX5mXPYf?k34K%<|?(n_FO=vL@a z=mlsObo@8@P9=0PbQAOl^cvI$S=MK1v!H9BN1)Bn9%$sZNH^39t$;Q_Z$qC$U;K8K zRtB{}E1`|hJJ6q@(N7}3LzhBJp!=Zbptqpi&?()73)Mq+LN7wwq5aT_Pi1KyXa*F6 zz6QMs{RKMd=`5`ndII_gI{TR{?Lz2U=mBUOG=2kdLT^HQp$X4sX)~dAXbtot^geX- zbEFZv9J&^I8u}0#^Bv-cs-QcdEs(Ymw@?%G0JI%C`n$vpwLlL*TcE!~dCyC$XCA`} zVYW6*J4$0GTRVo^iod`o?~m1v(~j42wG*_FFx4m+^kf?MXg&ZlMmvqIn$xv2v@dEF zc6QFv&Ssx^JZFg}=sP**ak40%-Q9_tDw1y<*x5ODYA)`i_i*pOkDcfM=Zr$^{zkMY zZvswcuUFo%pURu6CF~4cz}vE=ygey<*k!yeJexO<%h}DI$D4>1yhV74b}2j0mvJ7c zN~_l7F6df)4|<^{-+E|d?|BhB$ntKC-2Z>2zTYjk=r3k3x`Tb~tF>#)d%Y87T#+ul zuvWev*`jab8KbV6@}$Oy#*_@DCT6-1M9s!z=M?oJ%(N#2b*nz+9mEaeEVj(%ICjKE zisl)c3?&Cn*>Ih9MuZC+>)X{=H`CEF;3Hi#wx^tmR9Kj(ZERE$`0Uh|EX^`EgQ1LC z2lp_Yxmh|AVwir&DEj&6AHI=_d5vrrrlzoxVRM;DJ|*!(x$Pg~Ka;!uZsowq;H7a< zd$P4XiE9oIq_b{L;-C&xx-!!RC3_t#r-yQ@LR8b10g{@q2-6K!7jyIv)TSlbfdx8< zbt>e8EG!HN#HL?FK7iX(G7;iZnm6_0>TiA+jCfcc(rk60>%my%Kv(^%-(2;FayyV! zGVTxHgpAd}YB%F*@Y>bu$2Oqi(w>}ybykIi((RbIH0^3mzm)+hb}*-d_GJe;l+G^J zku+Mxfev&o9Ar+dyVO@PxaL{$t<%i0gM>6h?|7ig{!2QtMn{Pzl5Kn- zF?o>8C{`XiF9TS8&C9ftGt_%qP0(Gbi- z{XjQEk39!>IdJ4LTp!S;4U2;{W5dmW#+Eidh&YgPGqwMIg{&7*^iv0NrEaeG?gx%k z{r3n=Yeo7NL8OS|?<@jEr8cGB`WM{5;z+Fr$@2Y_29AWz;ST)h0cFF$DGQw9N>9`P zS&DVil&xVgSgH}Y3~QBALYql1zBp!d{d$@+TQ9`gZ*|&m)~~BzrOvcWXKIvKh;TZkaeoNCGotw5~V`R3g@Oh&TXxeT|%{N9I0tf zwp8&g<^^%paxz@VI8ZfHI05H1=>i#KVwmpU=BB&qx)@*6a}zB4foe=h zJL}}jw;TgL(5c?~8jySRPx4m9Wt%2yWTn3xG+olVXlBclmUw$pvmC08ngtvHp|2*0`+u@f^qnm|BJp^*B}0U=%aZnY_{C%P$=-AAq7)M!q~7Sy(z#2v zBx~ZCG8v5b`<2E3_a=5Zq*uP?Tz9xJwY0Y(1@{-6W=VDHCk757HmPwUp@&grYD%WQ zXL7OLXb!8uh_+C7Js|IcWtiS)FsFwoCd1dEODN^ibW}QZvYPv=^mS8~PI>Ox#2Ttq z)=>|9mVGZvTMIo8y#?)t{tS)4&v{T0R1VcaZO{$ST4)2*18s$NKp#Qc_c@CKodda{ zsZa&f40S=vp*7GZ=yhlZ^a=DCH1Y-FgQC!E=yIqPx*EC}x(j+3dLG&ey$|h&M!uM( zdEGnhIS4T>&kDz6{+Dt%o*2y^uT`k3hVc z)gEh))urC#;@Aq)vt)Zh`^K=;7lq~^^u%LIK+$Gq&*n2l#;0{U)mtfv`Pxs0&2OxW zp=~Q~nZan;IJuMeV_!;rT}WP&n6JHgWZI^@#c-}=XP5Ej&=85xev}GfI^&W4su>9^ zYmu+wy`Hj}!De+wp{9L>l<5cTbpuViPJQu6t%PX1Q?Au_j^HB6Ij?tcSYNpygbRyj z&nzx=*eBM>d&FhpLcaD_tX^<(94X_a{uwB3lCCb)KM&O-?&c)xQW0rk(MyJ9HmTKS z;t?}Bbu*v$nlh%!oBkE3cZccXhKxWhQeJ0f=`v?5b=pAtyL>~A)pA3>C5xCS7G4;v zli|2fJ5It)eNjo}ln)ANk?h$ujR{t{YmJX!ug{*HjL&W6RjWF!{zzU?i7jZaXOFzB zEymt(QftC2{ne$Ze7}lQEr#905=Y8XN<`CUWtl&i{eWR#SXW1I2~B%X7APqlV$7f^0attrJOuo9pJZHa6?|(8`9*iN|8C+A#;_MyncD9&2lA$9AYTp|>EZ<4;U_ z0)so;I;YHzsn&bXk)@e$auLJJdOhgp>ZJW*Vv+JPweS7e=q1inGvu>i+GG9sk^2AN z=U^pJ$oppr{k>D;tJW6%eOTkGxqi*Uj%I>=Ofgrc856nFQoh+ICUxwWa?UuyyGT$k zB=NSd;(a-2=5M0kd+O8|i?ULQ5oC*>J=e^;8KRbVJ>(d`Fz8r__mkO)m3NDIZv)Cn zp_qwY;uO0tK!%-!D}Du!ha_A{jF`#M0Jivb67w@5F?T_tFHGsDr1UVZ?q_z&d`=2s zM?HMG30mT2n9{>(0xeK0G!~+n>*<$#NP4;;N%Qq7yaANF+z5&NQb^KsCnRraKbX=# z1WNkWLK5HOkhuE}Bzbxr68pCyu^&yLNck9LCU){f|D@_gFe^)$>Hm6dne-^dkJ(9o zTV-#AJJ9Zb_5WJ}gOz~s9c5)_+yS^xULoKacxRy2H42AoXQ*#*tOLiOUk}PRK)S&% zf*V1O@Mt~YnV<$92jqa#Msh*v2S$U!<`z);mpt$c&0AcB`9sL4wODC4oVwNf~SB>z_Y-m;Mw3Za2&WC91pGl&jD9~fIMCDF{o6V z>(Z=gwX*%U{&R&X;r@+>cRf5t`|#o256c&%`akLLuYE}OF^dj*);pKK zW6`SKx#Asrf5+&q|LOL3cm9<-U#?X?W%Q7Kb4to(&P@7nC>I(9jfTcT7HAxl4>_SA zR05Sll~4l|hgzW|)B!Dlx}c@dGH5xp0$K^Jg4RImp$(9@-vn)jwnE#WozQM*FQi?> zJ#$bFGz!XtQvJQ=L>+{Rpi-zDs)XvGIJ5*>4y}f|q0P`XXgAac?Sr&3!iI98(U1ko zgRGDjib5q&1r&!mAaTDGS^=$w)W*1ZvqfrkJ81Y9Ws5|7mJL~uQr`{|+Sy40h+M?1s) zP$Xdr&wLqPka#S-H!Em7ySV>w4`k?Nf||9T+p#ea*)R(IgTAc`ydGWvq z_sIvNe|>RH(eJMxdB^oPd^h@H@Mn*`@sH_W?0D&?(Uw6-~H}Boch5dQ;&_EGNS$Zo7)$^S~8S?J}<0$+LXu1o%L*<*bVS$fJJUGAxQ^KW0d^9=S3!{Ow0tVw*xztRpgxZ)b0;%e(cD=D@%(fAN|~Y?Vevw^gFH``_|dN zw0|;v#U;MSZh4_+{yUG}@Yuu8+TU+@`h>@4f4%79@8sr>pT4WW?YwBtw_jg0{*H^Y z*Y>>o(w9Ep{mK~+{&v|V^Y0A4Sa#!Cqi0?iTky9V?|Aa4m0vnxSHZhqfBmg3*}r;h z`yjnz-*v+K`m>C&ag3Hb3gl3GZk%-=CsYQNPgd<_BF8IYvUFd?m2|Os?%0ZQVQ4fe z{>^Txrl||fs)lgf&+YWoC1*o8?&o%nzM4CP%l>ItP*YdMTW2k`sU(`ii5biGgV@De z>KkiS4C&07{i;pD{tnFcE$zvwmW5Sqa-D>F&&z;s#(CyGF=wWC*^c>U!{TSK?y$kJzK85x}M{)NQAIQud1C4_wLSASxR0_?5s-Y{O zBy=sb47v+i4Lt^RLp@M0^bWKO(s|~8|NcWufcJn%8PwH3f%0w)>m-AiAH#T9f?aj) z5!#mq5g>w*j;1)5j`HGgOLJ&~ZK8F8g;O;8`K{1|x#d#}yb~;JiZ|EQ#JPAcG@&z= zm=FmcJ3PqEn6ah>@lFc?G$%q6xM|g&sBMTf)g%hIB($w1(XudEz#RbonncsY#kL6+ zHg_5qav3h2O(r&ivRHy#kelG0)rBpo(9SwUXpXaVfA~yrIE7Z;=e`rEYVtVu97GB|2QLRhK?mTsb89clhT>PdvKCbZfN>f;@~=3ET0=DERhmuItQmnYYIw)bjpmT#Qzdf!vNH+_43 zi~NiI@A5L#O@Z43&jx-F7#8#dn}UhpwZU704+WnHz8ri#__N@y;NIY8!R*lSq0ynU zL+6H^A%AFks4P?!x;gY*=r^I0!&AeH!;gi35grkVMA{;cMz%-Dn1%H<;0xBU^-Akn z>)Y1hHlHnOtFc{e`?_s|t=IO6?L2$LUS_}6{*e8f_V3#_+uyeDvY+H=a{S2gzT+no10KXm@d`46Yv^>bH_`+D~(_e1WF+$VTW_MGdndt#oid9Lzq_3rRy`%d=x zeY1R>zQ6c#{iFP&{bT(W|0#hp1Lp@m4E!PRad3P18c7$8NhScNTko*WCpF)-xgAp- z6^`FI7Q2?YM!V1VSUrKWs>qT^S7a&m@`mI;%3hHafi=fE!kTLxWgTrDYqeO%S(~j% zYln4-wadEK_L*&j{e1fc_8NPueWU%4_WkyA9Mc@_j)xpiP&2cfZBB) zMrz~*_YU`8-Di3lJUyNxycO`--QG>!PrbFi249nJsqZ!4Hs20ksehLL68}Q~BL7PN z{r=zj|I7amza!uelm#vc^ah>?z90N;@Q=aq@K;f2X6TO4qoLPBzY9ge<>BV=o8f5%*uH1$p{;DO{n2)c-DMBjqxK?uiMDcAi?bze!bL@45XKWzjYktoawyE`DN$*&R;nH==|Jyit7y5IG5e! zbH?z+NtrK`hrx9b7dPh9W13f%MEK2N7-sprd{G5&mivHvUnyZx*DZw2y@ocyX{U7!P&^Zw!7T_zwKh7aSET4E-%M4}QNT{EhJbus`w#$$u;R5kQn4 z^v|~awjBGh_L25e>=t{%-eLcaeUtrV`;YBEwQsk7XrBxR)H|-E-cNPrIWKfpIu|&b zo!2^-I`1a+PdK}s&pBUkZg&3I`Id9L^Ihj}oPTis+4*zGdJ63z#lYn|V8 zK24f_;rzha=lsk$+;y4j4%ZW|F&>+z(Q~b5x#z32zG>c8@0Y!Ic^~j@@V-uu^hfVM z=o?S;75d`7M|{8V?eQ(4hk4t7R$x`|rQqaH3mo?(eaT3A@zQX6ctvv`6fZToD;+E27!XrFJt*Z!RSWBXB#3mvoQ zO~2*%(6Nt{cRKHLzUX|zxy$*9b1!MuTy?HS*I(T^o`~l{&mHvMk9(f;{J`^DdX3|} zr_;weybHWnc(3<9>;0wo58lrxy%T(A`p%^{4f{%bGkur&>giFWFTKO}gztIZ4}CxJ zec=1EZ@=#d|1tiN{!{#?`^Wpw^IQF1f5<<@f1$t3KhJ-;zt-RAzmoB8iGQj8R{tIT zd;P2Z5Bs0+Kk0wg|9$^U{w@Aq|Ihrt^nc*r?f=C8XaDE^tiUmW;{u}sV;Muv2}}w& z>8U0MrUhmM=F(qP2O0uRfkfaMYV>Bt&$|Qn(dr-5>-M{}{vQRl2Hpz16L^o&=l6k6 z1N(U8cv$cY!4rd{gJ%TK37#Lc1%1JAuqap>oE4lGtb)(42(|?~f;R_O2EP_u7krAo z<3)J>z2HTmOG4G5TS8kyZ-w3ty%)NQe*UZBXT#bWzSjZoTx0#N{TI&P((0zWe&@c5 z5$hITBv>7c1+nZ__bM#6ePBDszSHrL^D57mJU4oFd-i!w@}A}$?+tiodh5JR-cIjQ z?>8Aq_j=FrP4Ja6YSsH*p>%)c``mZD|0MrL|HMEzP)?qc!Fz+tLf;5=lbT)h(0>U{ z4|j&|fp1<7|1@lmG)8WWd_&q~kCIXIt!u0n+vT=;+fBB=*f!h$#CS5>ajC=WoPr#4 zg)`sfauvESaJxNSo?AUndA{JC?ESv?L*Hkd4s;yzL$NU=o}LE z|IS}VUBrXuhw{V0@QmlO#hjp5D z4P%qT{w4dZj6|>4e_{XJegyK|0>@*HCmkCZcTR9xogdLgj(2Tzed2Pvi`{kZZ@D+R zf8_qHd$gwpS>!_RcJC^rhAI9SoOcrK_L)#&cse<#3-^VOj)Wu6N|`eVl=AOzoB`L@kXg56%c)8ay>*r+-}# zx}RFrSRv1s^n0)HKji<8|5yI`ft7&=1K$t)D)33*h+t0e*x*OOqe9cdGsBvN^PRYT z-@4oSx%DhtgY7QcLyXMtGM0R5JKgSKT)xeIAF|$7azD~xXB1iBScp8k*l~m7W`~?% zT|?iJXUn%)ZB8V`B3p^A)K+1uv{lfVL~vdg{4z1O|po$VRn8RZ%483!*oJwZ>ArxZ!J(o^S&dy<|dj5^CbD?O_{Ybn(Y zo=r%{TRq!6JCKq0c=mesd$PSFyraBhz2m(3UZ*$6=wIqB_g2zM;@+fp3GHOLccpi& zcRhXVChunC&uz4uUEV#ko&EH-BYdNLW0AA-eNJD{S43MX_f`7p=z){IB}hZdeJkO~ zwZ8Sf4M>8UsZ)`TcF{NQg-f&jBamOm`o}RYI{iU^k-yYm?yvOM`Q!ei-hVAeep>Bc z>tFBR;NRrm?BD9&=HKDp<=^Aq>)-Fs4vYwlij0nog^R~U@*?@%^5l$oBf&@%o-RRl zD2tRwDk7DU>PQ_N9!Ew@Mmkbb;E%af% zp>2GVh5Zt3J(Jr8SKQUg{AHzUwQH?wy=#MOlWVhUt81HUhijK>4>Owmu59-R_bB&R z_c(XH+vyIvi`@T-{IL2zny*jW~AH6mO zHZyi@3+xE&LK@o}*dNFajtGtljzuQR4?2TEeatEkR_c;jGPoqTG`O5GYjtpKaDA{l zxG~rh+!E{!ZV&DZ?nYkQ$5k6Sph&JB+aTf%u^YuFo(hD*X_;fio|xPiG(2lJj~ z^x&()Ymi;K!yA#7w}gA?%XcEh^o93v%|}iomlk26HCSm0QCdM6Eub3iZ-w)_BFiEx zBCFv0b@2Q~_*r)8gx8iX_LDYa4B|*z)M(y!3G;wlaFS zYI@67TZgU7w#>Ey34D!hovqupky*_a=E>V_J8ipdeaKpxJ;$DFAB{|#hfMBeo>Rgc zr-HWFz&x#k*0{{R!oJGBh8a&c^R^!Q7JDxe?@s$}d!KzD*P!G$avh@`7Dt}L>hLlb zDq$v6;iz^rI9eSYjxNVC#|os*HI8+TZbqdZ#}_ucwSRP|BMq z=gpM#R?2!?dd|5!yoWO1OR4Xt+_Ne95tRME*B`BjtfY2U57IAfrlz)1SKFwq9n{w@ zYHSa6wwGGlAJMva=RvQx>;bdgm4Q|8`x-cY9X#KSJialoDbNGwZ-Mu>!}~ko{@w6@ zA1z=XZ9ofVGv18|=F$>I(-x9QYF6fQMLI7xz{N{K%i-dcq1B-cq0MmccIN6kk&pI- zvcsd`-aKY<*02+)qa5CC)o1Hcs;WFUQHHzVS5mrK)y}wcnR6v`r(WkC z<|iXuxh^Ynzo4taRgKiY#MMO)zsA)~&%V>On{}$uZi_q5ZPk19GIy(c1*3VlyVu?4 z&Sedz%+tyW44LZXJrm@DGUUDrtF(f(&h^d>&P~kEwmP>tcQCiugWR;=ne7_k8s!?x zoHO6$B;F!dDJx@@#2sgRS>jsi+UDENIJuLNayMgTAEV_y#!D@b9mrwK%th88O)qJo zpUk7Dw9;34=`Ex5monQgqtC3+=lgZY{_#L7eP;)~XBWNa3i{83aa1q;>EUpdg+4Zq zUe-!K>!qiygU^=Ix2|Osp*OgVK6OWMf3Pf6PVZSs|5-;58mA9UhNR~^uvN+`khw)l zdladFa^1;$F+l&dl1gfOJvE(89}#54UgB8o*x=Z9z$(c;$9}F<%68^BM>um?ryK1Y n3m1%IHl2?g>vVdZL3qMgNhx<$FvqTT);SyC5+eQINBjQ(x|o|I diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.cpp b/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.cpp deleted file mode 100644 index a9e574e7de8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.cpp +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - -/* This implementation based on code originally written by - * (c) 2013 by Philipp Dunkel . Licensed under MIT License - * https://github.com/phidelta/fsevents.git - */ - -#include "fsevents_win.h" -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#include - -#include - -#pragma comment(lib, "node") // link to node - -static Persistent constructor_template; -static Persistent emit_sym; -static Persistent change_sym; - -//***************************************************************************** - -// node addon required function -extern "C" void init(Handle target) { - NodeFSEvents::Initialize(target); -} - -NODE_MODULE(fswatch_win, init) - -//***************************************************************************** - -// wraps gaining access to a given mutex -class CMutexAccess -{ -public: - CMutexAccess(HANDLE hMutex) : m_hMutex(hMutex) - { - if (m_hMutex != NULL) - ::WaitForSingleObject(m_hMutex, INFINITE); - } - - ~CMutexAccess() - { - if (m_hMutex != NULL) - ::ReleaseMutex(m_hMutex); - } - -private: - HANDLE m_hMutex; -}; - -//***************************************************************************** - -// constructor -CFileNotifyChangeInfo::Entry::Entry(LPWSTR lpFilename, int iFilenameLen, DWORD dwAction) : - m_wstrFilename(lpFilename, iFilenameLen), - m_dwAction(dwAction) -{ -} - -// constructor -CFileNotifyChangeInfo::CFileNotifyChangeInfo() -{ - // mutex to synchronize access to the queue - m_hMutex = ::CreateMutexA(NULL, FALSE, NULL); -} - -// destructor -CFileNotifyChangeInfo::~CFileNotifyChangeInfo() -{ - // cleanup queue - { - CMutexAccess access(m_hMutex); - while (!m_Entries.empty()) - { - LPEntry lpEntry = m_Entries.front(); - m_Entries.pop(); - delete lpEntry; - } - } - - // cleanup - ::CloseHandle(m_hMutex); -} - -// pushes a new entry to the tail of the queue -void CFileNotifyChangeInfo::Push(LPEntry lpEntry) -{ - if (lpEntry != NULL) - { - CMutexAccess access(m_hMutex); - m_Entries.push(lpEntry); - } -} - -// retrieves the entry at the head of the queue -CFileNotifyChangeInfo::LPEntry CFileNotifyChangeInfo::Peek() -{ - LPEntry lpEntry = NULL; - - CMutexAccess access(m_hMutex); - if (!m_Entries.empty()) - lpEntry = m_Entries.front(); - - return lpEntry; -} - -// pops the entry off the head of the queue -void CFileNotifyChangeInfo::Pop() -{ - CMutexAccess access(m_hMutex); - if (!m_Entries.empty()) - m_Entries.pop(); -} - - -//***************************************************************************** - -// constructor -NodeFSEvents::NodeFSEvents(const char *lpszPath) : ObjectWrap(), - m_pChangeInfo(NULL), - m_lpBuffer(NULL), - m_hAsyncDir(NULL), - m_hIoCPort(NULL), - m_hThread(NULL), - m_lpThreadInfo(NULL) -{ - Startup(lpszPath); -} - -// destructor -NodeFSEvents::~NodeFSEvents() -{ - Shutdown(); -} - -// initialize a JS wrapper around this object -void NodeFSEvents::Initialize(Handle target) -{ - HandleScope scope; - emit_sym = NODE_PSYMBOL("emit"); - change_sym = NODE_PSYMBOL("fsevent"); - Local t = FunctionTemplate::New(NodeFSEvents::New); - constructor_template = Persistent::New(t); - constructor_template->InstanceTemplate()->SetInternalFieldCount(1); - constructor_template->SetClassName(String::NewSymbol("FSEvents")); - Local constructor = constructor_template->GetFunction(); - - constructor->Set(String::New("kFSEventStreamEventFlagNone"), Integer::New(0x00000000)); - constructor->Set(String::New("kFSEventStreamEventFlagMustScanSubDirs"), Integer::New(0x00000001)); - constructor->Set(String::New("kFSEventStreamEventFlagUserDropped"), Integer::New(0x00000002)); - constructor->Set(String::New("kFSEventStreamEventFlagKernelDropped"), Integer::New(0x00000004)); - constructor->Set(String::New("kFSEventStreamEventFlagEventIdsWrapped"), Integer::New(0x00000008)); - constructor->Set(String::New("kFSEventStreamEventFlagHistoryDone"), Integer::New(0x00000010)); - constructor->Set(String::New("kFSEventStreamEventFlagRootChanged"), Integer::New(0x00000020)); - constructor->Set(String::New("kFSEventStreamEventFlagMount"), Integer::New(0x00000040)); - constructor->Set(String::New("kFSEventStreamEventFlagUnmount"), Integer::New(0x00000080)); - constructor->Set(String::New("kFSEventStreamEventFlagItemCreated"), Integer::New(0x00000100)); - constructor->Set(String::New("kFSEventStreamEventFlagItemRemoved"), Integer::New(0x00000200)); - constructor->Set(String::New("kFSEventStreamEventFlagItemInodeMetaMod"), Integer::New(0x00000400)); - constructor->Set(String::New("kFSEventStreamEventFlagItemRenamed"), Integer::New(0x00000800)); - constructor->Set(String::New("kFSEventStreamEventFlagItemModified"), Integer::New(0x00001000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemFinderInfoMod"), Integer::New(0x00002000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemChangeOwner"), Integer::New(0x00004000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemXattrMod"), Integer::New(0x00008000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemIsFile"), Integer::New(0x00010000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemIsDir"), Integer::New(0x00020000)); - constructor->Set(String::New("kFSEventStreamEventFlagItemIsSymlink"), Integer::New(0x00040000)); - - target->Set(String::NewSymbol("FSEvents"), constructor); -} - -// unwrap the JS wrapper -Handle NodeFSEvents::Shutdown(const Arguments& args) -{ - HandleScope scope; - NodeFSEvents *native = node::ObjectWrap::Unwrap(args.This()); - native->Shutdown(); - return Undefined(); -} - -// API to allocate a new object from JS -Handle NodeFSEvents::New(const Arguments& args) -{ - HandleScope scope; - - if (args.Length() != 1 || !args[0]->IsString()) { - return ThrowException(String::New("Bad arguments")); - } - - String::Utf8Value szPathName(args[0]->ToString()); - - NodeFSEvents *nativeobj = new NodeFSEvents(*szPathName); - nativeobj->Wrap(args.Holder()); - NODE_SET_METHOD(args.Holder(), "stop", NodeFSEvents::Shutdown); - return args.This(); -} - -// starts up the file watching thread -void NodeFSEvents::Startup(const char *lpszPath) -{ - if (m_hThread != NULL) // check if already started - return; - - BOOL bResult = FALSE; - - // validate path input - int iLen = ::MultiByteToWideChar(CP_UTF8, 0, lpszPath, -1, NULL, 0); - m_wstrRootPath.resize(iLen + 1); - ::MultiByteToWideChar(CP_UTF8, 0, lpszPath, -1, &m_wstrRootPath[0], iLen + 1); - - // allocate buffer to hold asynchronous watch info - m_pChangeInfo = new CFileNotifyChangeInfo(); - if (m_pChangeInfo != NULL) - { - // allocate buffer to hold directory change information - m_lpBuffer = (PFILE_NOTIFY_INFORMATION)malloc(READ_DIRECTORY_CHANGES_BUFSIZE); - if (m_lpBuffer != NULL) - { - // open the directory to watch - m_hAsyncDir = CreateFileW( - m_wstrRootPath.c_str(), - FILE_LIST_DIRECTORY, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, - NULL); - if (m_hAsyncDir != INVALID_HANDLE_VALUE) - { - // set up communication channels between watcher and our thread - m_hIoCPort = ::CreateIoCompletionPort( - m_hAsyncDir, - m_hIoCPort, - (ULONG_PTR)m_pChangeInfo, - 0); - if (m_hIoCPort != NULL) - { - memset(&m_Overlapped, 0, sizeof(m_Overlapped)); - - // set up communication between our file watching thread and a callback to post changes back to JS - uv_async_init(uv_default_loop(), &m_uvaWatcher, NodeFSEvents::Callback); - m_uvaWatcher.data = (LPVOID)this; - - // collect info to be shared with the worker thread - m_lpThreadInfo = (LPTHREADINFO)malloc(sizeof(THREADINFO)); - if (m_lpThreadInfo != NULL) - { - m_lpThreadInfo->m_pChangeInfo = m_pChangeInfo; - m_lpThreadInfo->m_hAsyncDir = m_hAsyncDir; - m_lpThreadInfo->m_hIoCPort = m_hIoCPort; - m_lpThreadInfo->m_lpBuffer = m_lpBuffer; - m_lpThreadInfo->m_lpOverlapped = &m_Overlapped; - m_lpThreadInfo->m_lpuvaWatcher = &m_uvaWatcher; - m_lpThreadInfo->m_bShouldExit = FALSE; - - // start the thread - DWORD dwThreadId = 0; - m_hThread = ::CreateThread(NULL, 0, &NodeFSEvents::Run, (LPVOID)m_lpThreadInfo, 0, &dwThreadId); - - bResult = m_hThread != NULL; - } - } - } - } - } - - // if something failed, then shutdown and cleanup - if (!bResult) - Shutdown(); -} - -// cleanly shuts down the file watching thread -void NodeFSEvents::Shutdown() -{ - // shutdown the thread, if it's running - if (m_hThread != NULL) - { - m_lpThreadInfo->m_bShouldExit = TRUE; // tell the thread to quit - ::PostQueuedCompletionStatus(m_hIoCPort, 0, 0, NULL); // wake up threat - ::WaitForSingleObject(m_hThread, INFINITE); // wait for the thread to quit - uv_close((uv_handle_t*) &m_uvaWatcher, NULL); - m_hThread = NULL; - } - - // cleanup - if (m_lpThreadInfo != NULL) - { - free(m_lpThreadInfo); - m_lpThreadInfo = NULL; - } - if (m_hIoCPort != NULL) - { - ::CloseHandle(m_hIoCPort); - m_hIoCPort = NULL; - } - if (m_hAsyncDir != NULL) - { - ::CloseHandle(m_hAsyncDir); - m_hAsyncDir = NULL; - } - if (m_lpBuffer != NULL) - { - ::free(m_lpBuffer); - m_lpBuffer = NULL; - } - if (m_pChangeInfo != NULL) - { - delete m_pChangeInfo; - m_pChangeInfo = NULL; - } -} - -// threadproc used to maintain the file watcher and any file changes it finds -DWORD WINAPI NodeFSEvents::Run(LPVOID lpData) -{ - LPTHREADINFO lpThreadInfo = (LPTHREADINFO)lpData; - if (lpThreadInfo != NULL) - { - // iterate watching for directory changes until we're signalled to stop - while (lpThreadInfo->m_bShouldExit == FALSE) - { - // set the watcher - DWORD dwBytesReturned = (DWORD)0; - if (!::ReadDirectoryChangesW(lpThreadInfo->m_hAsyncDir, lpThreadInfo->m_lpBuffer, READ_DIRECTORY_CHANGES_BUFSIZE, TRUE, - FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE - | FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_LAST_ACCESS | FILE_NOTIFY_CHANGE_CREATION | FILE_NOTIFY_CHANGE_SECURITY, - &dwBytesReturned, lpThreadInfo->m_lpOverlapped, NULL)) - { - break; - } - // wait for a signal - DWORD dwNumBytes; - LPOVERLAPPED lpOverlapped = NULL; - ULONG_PTR lpCompletionKey = NULL; - ::GetQueuedCompletionStatus(lpThreadInfo->m_hIoCPort, &dwNumBytes, &lpCompletionKey, &lpOverlapped, INFINITE); - if (dwNumBytes > 0) - { - if (lpOverlapped == NULL) - { - // in case an unknown error occurred in the completion port, skip to the next change notification - continue; - } - else - { - // process the watched directory change - PFILE_NOTIFY_INFORMATION pfni = lpThreadInfo->m_lpBuffer; - while (pfni != NULL) - { - CFileNotifyChangeInfo::LPEntry lpEntry = new CFileNotifyChangeInfo::Entry( - pfni->FileName, - pfni->FileNameLength / sizeof(WCHAR), - pfni->Action); - if (lpEntry != NULL && (lpThreadInfo->m_pChangeInfo != NULL)) - { - lpThreadInfo->m_pChangeInfo->Push(lpEntry); - - // post a signal to send this back to JS - uv_async_send(lpThreadInfo->m_lpuvaWatcher); - } - - // process the next change - pfni = (pfni->NextEntryOffset > 0) ? (PFILE_NOTIFY_INFORMATION)(((BYTE*)pfni) + pfni->NextEntryOffset) : NULL; - } - } - } - } - } - - return TRUE; -} - -// callback signaled from file watching threadproc that allows us to asynchronously post changes back to JS -void NodeFSEvents::Callback(uv_async_t *handle, int status) -{ - NodeFSEvents *This = static_cast(handle->data); - if (This->m_pChangeInfo != NULL) - { - HandleScope scope; - - // initialize wrapper to call back into JS - Local callback_v = This->handle_->Get(emit_sym); - Local callback = Local::Cast(callback_v); - Handle args[3]; - args[0] = change_sym; - - // iterate thru each queued file watching entry - CFileNotifyChangeInfo::LPEntry lpEntry = NULL; - while ((lpEntry = This->m_pChangeInfo->Peek()) != NULL) - { - // concatenate the root search path and the file notification path - std::wstring wstrFullPath = This->m_wstrRootPath.c_str(); - wstrFullPath += lpEntry->m_wstrFilename; - - // normalize path separators from '\' to '/' - std::replace(wstrFullPath.begin(), wstrFullPath.end(), '\\', '/'); - - // convert the full pathname to utf8 - int iLen = ::WideCharToMultiByte(CP_UTF8, 0, wstrFullPath.c_str(), -1, NULL, 0, NULL, NULL); - std::string strFullPath(iLen + 1, 0x00); - ::WideCharToMultiByte(CP_UTF8, 0, wstrFullPath.c_str(), -1, &strFullPath[0], iLen + 1, NULL, NULL); - - // map the FILE_NOTIFY_INFORMATION 'Action' to a node fs-event.c 'enum uv_fs_event' type - int iAction; - switch(lpEntry->m_dwAction) - { - case FILE_ACTION_ADDED: - case FILE_ACTION_REMOVED: - case FILE_ACTION_RENAMED_OLD_NAME: - case FILE_ACTION_RENAMED_NEW_NAME: - iAction = UV_RENAME; - break; - case FILE_ACTION_MODIFIED: - default: - iAction = UV_CHANGE; - } - - // call back into JS with each change. - args[1] = String::New(strFullPath.c_str()); - args[2] = Integer::New(iAction); - callback->Call(This->handle_, 3, args); - - // discard the now-processed entry - This->m_pChangeInfo->Pop(); - delete lpEntry; - } - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.h b/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.h deleted file mode 100644 index bc19e031a05..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - -#include -#include -#include - -#include -#include - -#define READ_DIRECTORY_CHANGES_BUFSIZE 8192 - -using namespace v8; - -// encapsulates changes reported by ReadDirectoryChangesW() -class CFileNotifyChangeInfo -{ -public: - // records a single change as reported by ReadDirectoryChanges() - struct Entry { - std::wstring m_wstrFilename; - DWORD m_dwAction; - - Entry(LPWSTR lpwszFilename, int iFilenameLen, DWORD dwAction); - }; - typedef Entry* LPEntry; - -public: - CFileNotifyChangeInfo(); - ~CFileNotifyChangeInfo(); - - // mutex-synchronized accessor methods - void Push(LPEntry lpEntry); // pushes a new entry to the tail of the queue - LPEntry Peek(); // retrieves the entry at the head of the queue - void Pop(); // pops the entry off the head of the queue - -protected: - std::queue m_Entries; // queue of ReadDirectoryChangesW() entries - HANDLE m_hMutex; // mutex synchronizing access to queue -}; - -// encapsulates data to be shared with the worker thread -struct THREADINFO -{ - CFileNotifyChangeInfo *m_pChangeInfo; // queue of file notification changes - PFILE_NOTIFY_INFORMATION m_lpBuffer; // buffer for watched file notification changes - HANDLE m_hAsyncDir; // handle to watched parent folder - HANDLE m_hIoCPort; // handle to I/O completion port - LPOVERLAPPED m_lpOverlapped; // handle to overlapped I/O - uv_async_t *m_lpuvaWatcher; // handle to uv watch - BOOL m_bShouldExit; // flag to control thread state -}; -typedef THREADINFO *LPTHREADINFO; - -// main node object -class NodeFSEvents : public node::ObjectWrap -{ -public: - NodeFSEvents(const char *lpszPath); - ~NodeFSEvents(); - - // JS wrapper methods - static void Initialize(Handle target); - static Handle Shutdown(const Arguments& args); - static Handle New(const Arguments& args); - -protected: - // file watching methods - void Startup(const char *lpszPath); - void Shutdown(); -public: - static DWORD WINAPI Run(LPVOID lpData); - static void Callback(uv_async_t *handle, int status); - -protected: - std::wstring m_wstrRootPath; // root path to watch - CFileNotifyChangeInfo *m_pChangeInfo; // queue of file notification changes - PFILE_NOTIFY_INFORMATION m_lpBuffer; // buffer for watched file notification changes - HANDLE m_hAsyncDir; // handle to watched parent folder - HANDLE m_hIoCPort; // handle to I/O completion port - OVERLAPPED m_Overlapped; // handle to overlapped I/O - uv_async_t m_uvaWatcher; // handle to uv watch - HANDLE m_hThread; // handle to watcher thread - LPTHREADINFO m_lpThreadInfo; // info to be shared with the worker thread -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.js b/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.js deleted file mode 100644 index d6e010773f6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents_win/fsevents_win.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - -/* This implementation based on code originally written by - * (c) 2013 by Philipp Dunkel . Licensed under MIT License - * https://github.com/phidelta/fsevents.git - */ - -var util = require('util'); -var events = require('events'); - -// link to native (C++) node_modules addon -var binding = require('./build/Release/fswatch_win'); - -module.exports = function(path) { - // create node object and kick-off file watcher thread on this path - var fsevents = new FSEvents(path); - - // process file change events emitted by node object - fsevents.on('fsevent', function(path, action) { - var info = { - event:'unknown', - path: path, - }; - - if (action === 1) { - info.event = 'rename'; - } else { - info.event = 'modified'; - } - - fsevents.emit('change', path, info); - }); - - return fsevents; -}; - -var FSEvents = binding.FSEvents; -util.inherits(FSEvents, events.EventEmitter); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE b/src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE new file mode 100644 index 00000000000..65f90aca8c2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/README.md b/src/filesystem/impls/appshell/node/node_modules/glob-base/README.md new file mode 100644 index 00000000000..1da2e82f15b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-base/README.md @@ -0,0 +1,158 @@ +# glob-base [![NPM version](https://badge.fury.io/js/glob-base.svg)](http://badge.fury.io/js/glob-base) [![Build Status](https://travis-ci.org/jonschlinkert/glob-base.svg)](https://travis-ci.org/jonschlinkert/glob-base) + +> Returns an object with the (non-glob) base path and the actual pattern. + +Use [glob-parent](https://github.com/es128/glob-parent) if you just want the base path. + +## Install with [npm](npmjs.org) + +```bash +npm i glob-base --save +``` + +## Related projects +* [glob-parent](https://github.com/es128/glob-parent): Strips glob magic from a string to provide the parent path +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. +* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. +* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. +* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. +* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. +* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. + +## Usage + +```js +var globBase = require('glob-base'); + +globBase('a/b/.git/'); +//=> { base: 'a/b/.git/', isGlob: false, glob: '' }) + +globBase('a/b/**/e'); +//=> { base: 'a/b', isGlob: true, glob: '**/e' } + +globBase('a/b/*.{foo,bar}'); +//=> { base: 'a/b', isGlob: true, glob: '*.{foo,bar}' } + +globBase('a/b/.git/**'); +//=> { base: 'a/b/.git', isGlob: true, glob: '**' } + +globBase('a/b/c/*.md'); +//=> { base: 'a/b/c', isGlob: true, glob: '*.md' } + +globBase('a/b/c/.*.md'); +//=> { base: 'a/b/c', isGlob: true, glob: '.*.md' } + +globBase('a/b/{c,d}'); +//=> { base: 'a/b', isGlob: true, glob: '{c,d}' } + +globBase('!*.min.js'); +//=> { base: '.', isGlob: true, glob: '!*.min.js' } + +globBase('!foo'); +//=> { base: '.', isGlob: true, glob: '!foo' } + +globBase('!foo/(a|b).min.js'); +//=> { base: '.', isGlob: true, glob: '!foo/(a|b).min.js' } + +globBase(''); +//=> { base: '.', isGlob: false, glob: '' } + +globBase('**/*.md'); +//=> { base: '.', isGlob: true, glob: '**/*.md' } + +globBase('**/*.min.js'); +//=> { base: '.', isGlob: true, glob: '**/*.min.js' } + +globBase('**/.*'); +//=> { base: '.', isGlob: true, glob: '**/.*' } + +globBase('**/d'); +//=> { base: '.', isGlob: true, glob: '**/d' } + +globBase('*.*'); +//=> { base: '.', isGlob: true, glob: '*.*' } + +globBase('*.min.js'); +//=> { base: '.', isGlob: true, glob: '*.min.js' } + +globBase('*/*'); +//=> { base: '.', isGlob: true, glob: '*/*' } + +globBase('*b'); +//=> { base: '.', isGlob: true, glob: '*b' } + +globBase('.'); +//=> { base: '.', isGlob: false, glob: '.' } + +globBase('.*'); +//=> { base: '.', isGlob: true, glob: '.*' } + +globBase('./*'); +//=> { base: '.', isGlob: true, glob: '*' } + +globBase('/a'); +//=> { base: '/', isGlob: false, glob: 'a' } + +globBase('@(a|b)/e.f.g/'); +//=> { base: '.', isGlob: true, glob: '@(a|b)/e.f.g/' } + +globBase('[a-c]b*'); +//=> { base: '.', isGlob: true, glob: '[a-c]b*' } + +globBase('a'); +//=> { base: '.', isGlob: false, glob: 'a' } + +globBase('a.min.js'); +//=> { base: '.', isGlob: false, glob: 'a.min.js' } + +globBase('a/'); +//=> { base: 'a/', isGlob: false, glob: '' } + +globBase('a/**/j/**/z/*.md'); +//=> { base: 'a', isGlob: true, glob: '**/j/**/z/*.md' } + +globBase('a/*/c/*.md'); +//=> { base: 'a', isGlob: true, glob: '*/c/*.md' } + +globBase('a/?/c.md'); +//=> { base: 'a', isGlob: true, glob: '?/c.md' } + +globBase('a/??/c.js'); +//=> { base: 'a', isGlob: true, glob: '??/c.js' } + +globBase('a?b'); +//=> { base: '.', isGlob: true, glob: 'a?b' } + +globBase('bb'); +//=> { base: '.', isGlob: false, glob: 'bb' } + +globBase('c.md'); +//=> { base: '.', isGlob: false, glob: 'c.md' } +``` + +## Running tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/glob-base/issues) + + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 08, 2015._ diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/index.js b/src/filesystem/impls/appshell/node/node_modules/glob-base/index.js new file mode 100644 index 00000000000..564b4a8854f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-base/index.js @@ -0,0 +1,51 @@ +/*! + * glob-base + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var path = require('path'); +var parent = require('glob-parent'); +var isGlob = require('is-glob'); + +module.exports = function globBase(pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('glob-base expects a string.'); + } + + var res = {}; + res.base = parent(pattern); + res.isGlob = isGlob(pattern); + + if (res.base !== '.') { + res.glob = pattern.substr(res.base.length); + if (res.glob.charAt(0) === '/') { + res.glob = res.glob.substr(1); + } + } else { + res.glob = pattern; + } + + if (!res.isGlob) { + res.base = dirname(pattern); + res.glob = res.base !== '.' + ? pattern.substr(res.base.length) + : pattern; + } + + if (res.glob.substr(0, 2) === './') { + res.glob = res.glob.substr(2); + } + if (res.glob.charAt(0) === '/') { + res.glob = res.glob.substr(1); + } + return res; +}; + +function dirname(glob) { + if (glob.slice(-1) === '/') return glob; + return path.dirname(glob); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/package.json b/src/filesystem/impls/appshell/node/node_modules/glob-base/package.json new file mode 100644 index 00000000000..9c082ae14b2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-base/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "glob-base@^0.3.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob" + ] + ], + "_from": "glob-base@>=0.3.0 <0.4.0", + "_id": "glob-base@0.3.0", + "_inCache": true, + "_installable": true, + "_location": "/glob-base", + "_nodeVersion": "0.12.7", + "_npmUser": { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "glob-base", + "raw": "glob-base@^0.3.0", + "rawSpec": "^0.3.0", + "scope": null, + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "_shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", + "_shrinkwrap": null, + "_spec": "glob-base@^0.3.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/glob-base/issues" + }, + "dependencies": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "description": "Returns an object with the (non-glob) base path and the actual pattern.", + "devDependencies": { + "mocha": "*", + "should": "^5.1.0" + }, + "directories": {}, + "dist": { + "shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", + "tarball": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "adbc0ab07ec8a85f76ffd1b54dd41cdb9d1d0b83", + "homepage": "https://github.com/jonschlinkert/glob-base", + "keywords": [ + "base", + "directory", + "dirname", + "expression", + "glob", + "parent", + "path", + "pattern", + "regex", + "regular", + "root" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + }, + { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "glob-base", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/glob-base.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.3.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore b/src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore new file mode 100644 index 00000000000..33e391f0e08 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +npm-debug.log +coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml new file mode 100644 index 00000000000..18fc42f69f5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "4" + - "iojs-v3" + - "iojs-v2" + - "iojs-v1" + - "0.12" + - "0.10" diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE b/src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE new file mode 100644 index 00000000000..734076d8aff --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2015 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md b/src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md new file mode 100644 index 00000000000..ff5310d3b4c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md @@ -0,0 +1,43 @@ +glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) +====== +Javascript module to extract the non-magic parent path from a glob string. + +[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) +[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) + +Usage +----- +```sh +npm install glob-parent --save +``` + +```js +var globParent = require('glob-parent'); + +globParent('path/to/*.js'); // 'path/to' +globParent('/root/path/to/*.js'); // '/root/path/to' +globParent('/*.js'); // '/' +globParent('*.js'); // '.' +globParent('**/*.js'); // '.' +globParent('path/{to,from}'); // 'path' +globParent('path/!(to|from)'); // 'path' +globParent('path/?(to|from)'); // 'path' +globParent('path/+(to|from)'); // 'path' +globParent('path/*(to|from)'); // 'path' +globParent('path/@(to|from)'); // 'path' +globParent('path/**/*'); // 'path' + +// if provided a non-glob path, returns the nearest dir +globParent('path/foo/bar.js'); // 'path/foo' +globParent('path/foo/'); // 'path/foo' +globParent('path/foo'); // 'path' (see issue #3 for details) + +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) + +License +------- +[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js b/src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js new file mode 100644 index 00000000000..61615f1ac06 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var path = require('path'); +var isglob = require('is-glob'); + +module.exports = function globParent(str) { + str += 'a'; // preserves full path in case of trailing path separator + do {str = path.dirname(str)} while (isglob(str)); + return str; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json b/src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json new file mode 100644 index 00000000000..eacfafc583c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "glob-parent@^2.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] + ], + "_from": "glob-parent@>=2.0.0 <3.0.0", + "_id": "glob-parent@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/glob-parent", + "_nodeVersion": "3.0.0", + "_npmUser": { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + }, + "_npmVersion": "2.13.3", + "_phantomChildren": {}, + "_requested": { + "name": "glob-parent", + "raw": "glob-parent@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar", + "/glob-base" + ], + "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "_shasum": "81383d72db054fcccf5336daa902f182f6edbb28", + "_shrinkwrap": null, + "_spec": "glob-parent@^2.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "author": { + "name": "Elan Shanker" + }, + "bugs": { + "url": "https://github.com/es128/glob-parent/issues" + }, + "dependencies": { + "is-glob": "^2.0.0" + }, + "description": "Strips glob magic from a string to provide the parent path", + "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.5", + "mocha": "^2.1.0" + }, + "directories": {}, + "dist": { + "shasum": "81383d72db054fcccf5336daa902f182f6edbb28", + "tarball": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" + }, + "gitHead": "a956910c7ccb5eafd1b3fe900ceb6335cc5b6d3d", + "homepage": "https://github.com/es128/glob-parent", + "keywords": [ + "glob", + "parent", + "strip", + "path", + "directory", + "base" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + } + ], + "name": "glob-parent", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/es128/glob-parent.git" + }, + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "version": "2.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js b/src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js new file mode 100644 index 00000000000..01156d2ff0d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js @@ -0,0 +1,28 @@ +'use strict'; + +var gp = require('./'); +var assert = require('assert'); + +describe('glob-parent', function() { + it('should strip glob magic to return parent path', function() { + assert.equal(gp('path/to/*.js'), 'path/to'); + assert.equal(gp('/root/path/to/*.js'), '/root/path/to'); + assert.equal(gp('/*.js'), '/'); + assert.equal(gp('*.js'), '.'); + assert.equal(gp('**/*.js'), '.'); + assert.equal(gp('path/{to,from}'), 'path'); + assert.equal(gp('path/!(to|from)'), 'path'); + assert.equal(gp('path/?(to|from)'), 'path'); + assert.equal(gp('path/+(to|from)'), 'path'); + assert.equal(gp('path/*(to|from)'), 'path'); + assert.equal(gp('path/@(to|from)'), 'path'); + assert.equal(gp('path/**/*'), 'path'); + assert.equal(gp('path/**/subdir/foo.*'), 'path'); + }); + + it('should return parent dirname from non-glob paths', function() { + assert.equal(gp('path/foo/bar.js'), 'path/foo'); + assert.equal(gp('path/foo/'), 'path/foo'); + assert.equal(gp('path/foo'), 'path'); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE new file mode 100644 index 00000000000..9d2c8036969 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md new file mode 100644 index 00000000000..5273a50ad6a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md @@ -0,0 +1,133 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](https://nodejs.org/api/fs.html) + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFileSync('some-file-or-whatever') +``` + +## Global Patching + +If you want to patch the global fs module (or any other fs-like +module) you can do this: + +```javascript +// Make sure to read the caveat below. +var realFs = require('fs') +var gracefulFs = require('graceful-fs') +gracefulFs.gracefulify(realFs) +``` + +This should only ever be done at the top-level application layer, in +order to delay on EMFILE errors from any fs-using dependencies. You +should **not** do this in a library, because it can cause unexpected +delays in other parts of the program. + +## Changes + +This module is fairly stable at this point, and used by a lot of +things. That being said, because it implements a subtle behavior +change in a core part of the node API, even modest changes can be +extremely breaking, and the versioning is thus biased towards +bumping the major when in doubt. + +The main change between major versions has been switching between +providing a fully-patched `fs` module vs monkey-patching the node core +builtin, and the approach by which a non-monkey-patched `fs` was +created. + +The goal is to trade `EMFILE` errors for slower fs operations. So, if +you try to open a zillion files, rather than crashing, `open` +operations will be queued up and wait for something else to `close`. + +There are advantages to each approach. Monkey-patching the fs means +that no `EMFILE` errors can possibly occur anywhere in your +application, because everything is using the same core `fs` module, +which is patched. However, it can also obviously cause undesirable +side-effects, especially if the module is loaded multiple times. + +Implementing a separate-but-identical patched `fs` module is more +surgical (and doesn't run the risk of patching multiple times), but +also imposes the challenge of keeping in sync with the core module. + +The current approach loads the `fs` module, and then creates a +lookalike object that has all the same methods, except a few that are +patched. It is safe to use in all versions of Node from 0.8 through +7.0. + +### v4 + +* Do not monkey-patch the fs module. This module may now be used as a + drop-in dep, and users can opt into monkey-patching the fs builtin + if their app requires it. + +### v3 + +* Monkey-patch fs, because the eval approach no longer works on recent + node. +* fixed possible type-error throw if rename fails on windows +* verify that we *never* get EMFILE errors +* Ignore ENOSYS from chmod/chown +* clarify that graceful-fs must be used as a drop-in + +### v2.1.0 + +* Use eval rather than monkey-patching fs. +* readdir: Always sort the results +* win32: requeue a file if error has an OK status + +### v2.0 + +* A return to monkey patching +* wrap process.cwd + +### v1.1 + +* wrap readFile +* Wrap fs.writeFile. +* readdir protection +* Don't clobber the fs builtin +* Handle fs.read EAGAIN errors by trying again +* Expose the curOpen counter +* No-op lchown/lchmod if not implemented +* fs.rename patch only for win32 +* Patch fs.rename to handle AV software on Windows +* Close #4 Chown should not fail on einval or eperm if non-root +* Fix isaacs/fstream#1 Only wrap fs one time +* Fix #3 Start at 1024 max files, then back off on EMFILE +* lutimes that doens't blow up on Linux +* A full on-rewrite using a queue instead of just swallowing the EMFILE error +* Wrap Read/Write streams as well + +### 1.0 + +* Update engines for node 0.6 +* Be lstat-graceful on Windows +* first diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js new file mode 100644 index 00000000000..8ad4a383965 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js @@ -0,0 +1,21 @@ +'use strict' + +var fs = require('fs') + +module.exports = clone(fs) + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 00000000000..9bf803e686c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,253 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var queue = [] + +var util = require('util') + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(queue) + require('assert').equal(queue.length, 0) + }) +} + +module.exports = patch(require('./fs.js')) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { + module.exports = patch(fs) +} + +// Always patch fs.close/closeSync, because we want to +// retry() whenever a close happens *anywhere* in the program. +// This is essential when multiple graceful-fs instances are +// in play at the same time. +module.exports.close = +fs.close = (function (fs$close) { return function (fd, cb) { + return fs$close.call(fs, fd, function (err) { + if (!err) + retry() + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) +}})(fs.close) + +module.exports.closeSync = +fs.closeSync = (function (fs$closeSync) { return function (fd) { + // Note that graceful-fs also retries when fs.closeSync() fails. + // Looks like a bug to me, although it's probably a harmless one. + var rval = fs$closeSync.apply(fs, arguments) + retry() + return rval +}})(fs.closeSync) + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + fs.FileReadStream = ReadStream; // Legacy name. + fs.FileWriteStream = WriteStream; // Legacy name. + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, cb) { + return go$readdir(path, cb) + + function go$readdir () { + return fs$readdir(path, function (err, files) { + if (files && files.sort) + files.sort(); // Backwards compatibility with graceful-fs. + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [path, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + + var fs$WriteStream = fs.WriteStream + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + + fs.ReadStream = ReadStream + fs.WriteStream = WriteStream + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + queue.push(elem) +} + +function retry () { + var elem = queue.shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 00000000000..d617b50fc08 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js @@ -0,0 +1,118 @@ +var Stream = require('stream').Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json new file mode 100644 index 00000000000..3739aa2afdc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + "graceful-fs@^4.1.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" + ] + ], + "_from": "graceful-fs@>=4.1.2 <5.0.0", + "_id": "graceful-fs@4.1.5", + "_inCache": true, + "_installable": true, + "_location": "/graceful-fs", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/graceful-fs-4.1.5.tgz_1469558843062_0.986795610981062" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.10.6", + "_phantomChildren": {}, + "_requested": { + "name": "graceful-fs", + "raw": "graceful-fs@^4.1.2", + "rawSpec": "^4.1.2", + "scope": null, + "spec": ">=4.1.2 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/readdirp" + ], + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz", + "_shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0", + "_shrinkwrap": null, + "_spec": "graceful-fs@^4.1.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "dependencies": {}, + "description": "A drop-in replacement for fs, making various improvements.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^5.4.2" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0", + "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js" + ], + "gitHead": "d170f3f2ceb56adb4d6bd50df4b535bed54120c0", + "homepage": "https://github.com/isaacs/node-graceful-fs#readme", + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "main": "graceful-fs.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "name": "graceful-fs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/node-graceful-fs.git" + }, + "scripts": { + "test": "node test.js | tap -" + }, + "version": "4.1.5" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js new file mode 100644 index 00000000000..1cc74c8236b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,275 @@ +var fs = require('./fs.js') +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 1 second. + if (process.platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 1000) { + return fs$rename(from, to, CB) + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + }})(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) +} + +function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } +} + +function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } +} + +function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er, res) { + if (chownErOk(er)) er = null + if (cb) cb(er, res) + }) + } +} + +function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + + +function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er, res) { + if (chownErOk(er)) er = null + if (cb) cb(er, res) + }) + } +} + +function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + +// ENOSYS means that the fs doesn't support the op. Just ignore +// that, because it doesn't matter. +// +// if there's no getuid, or if getuid() is something other +// than 0, and the error is EINVAL or EPERM, then just ignore +// it. +// +// This specific case is a silent failure in cp, install, tar, +// and most other unix tools that manage permissions. +// +// When running as root, or if other types of errors are +// encountered, then it's strict. +function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false +} diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE b/src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE new file mode 100644 index 00000000000..dea3013d671 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/README.md b/src/filesystem/impls/appshell/node/node_modules/inherits/README.md new file mode 100644 index 00000000000..b1c56658557 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js b/src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js new file mode 100644 index 00000000000..29f5e24f57b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js b/src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js new file mode 100644 index 00000000000..c1e78a75e6b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/package.json b/src/filesystem/impls/appshell/node/node_modules/inherits/package.json new file mode 100644 index 00000000000..999d5ab60f5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/inherits/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "inherits@^2.0.1", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] + ], + "_from": "inherits@>=2.0.1 <3.0.0", + "_id": "inherits@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/inherits", + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "1.3.8", + "_phantomChildren": {}, + "_requested": { + "name": "inherits", + "raw": "inherits@^2.0.1", + "rawSpec": "^2.0.1", + "scope": null, + "spec": ">=2.0.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar", + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_shrinkwrap": null, + "_spec": "inherits@^2.0.1", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "dependencies": {}, + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "license": "ISC", + "main": "./inherits.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "name": "inherits", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/test.js b/src/filesystem/impls/appshell/node/node_modules/inherits/test.js new file mode 100644 index 00000000000..fc53012d31c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js new file mode 100644 index 00000000000..6c8c7e72841 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js @@ -0,0 +1,12 @@ +'use strict'; +var path = require('path'); +var binaryExtensions = require('binary-extensions'); +var exts = Object.create(null); + +binaryExtensions.forEach(function (el) { + exts[el] = true; +}); + +module.exports = function (filepath) { + return path.extname(filepath).slice(1).toLowerCase() in exts; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/license b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json new file mode 100644 index 00000000000..d11fd647ae1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + "is-binary-path@^1.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] + ], + "_from": "is-binary-path@>=1.0.0 <2.0.0", + "_id": "is-binary-path@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/is-binary-path", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-binary-path", + "raw": "is-binary-path@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "_shasum": "75f16642b480f187a711c814161fd3a4a7655898", + "_shrinkwrap": null, + "_spec": "is-binary-path@^1.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-binary-path/issues" + }, + "dependencies": { + "binary-extensions": "^1.0.0" + }, + "description": "Check if a filepath is a binary file", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "75f16642b480f187a711c814161fd3a4a7655898", + "tarball": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "ed26bd7be5e29dad159c2771cb99dd48913f9de0", + "homepage": "https://github.com/sindresorhus/is-binary-path", + "keywords": [ + "bin", + "binary", + "ext", + "extensions", + "extension", + "file", + "path", + "check", + "detect", + "is" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + { + "email": "paul@paulmillr.com", + "name": "paulmillr" + }, + { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + } + ], + "name": "is-binary-path", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-binary-path.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md new file mode 100644 index 00000000000..a17d6a245d1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md @@ -0,0 +1,34 @@ +# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) + +> Check if a filepath is a binary file + + +## Install + +``` +$ npm install --save is-binary-path +``` + + +## Usage + +```js +var isBinaryPath = require('is-binary-path'); + +isBinaryPath('src/unicorn.png'); +//=> true + +isBinaryPath('src/unicorn.txt'); +//=> false +``` + + +## Related + +- [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions +- [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml new file mode 100644 index 00000000000..8803fc1945b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: +- 'iojs' +env: + global: + - secure: du27W3wTgZ3G183axW7w0I01lOIurx8kilMH9p45VMfNXCu8lo6FLtLIQZxJ1FYMoJLQ1yfJTu2G0rq39SotDfJumsk6tF7BjTY/HKCocZaHqCMgw0W2bcylb5kMAdLhBNPlzejpPoWa1x1axbAHNFOLQNVosG/Bavu3/kuIIps= + - secure: Ax/5aekM40o67NuTkvQqx1DhfP86ZlHTtKbv5yI+WFmbjD3FQM8b8G1J/o7doaBDev7Mp+1zDJOK2pFGtt+JGRl0lM2JUmLh6yh/b28obXyei5iuUkqzKJLfKZHMbY5QW/1i4DUM+zSXe6Kava0qnqYg5wBBnrF6gLdsVsCGNQk= diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml b/src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml new file mode 100644 index 00000000000..dc1efbaa6bd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml @@ -0,0 +1,16 @@ +ui: tape +browsers: + - name: chrome + version: 39..latest + - name: firefox + version: 34..latest + - name: safari + version: 5..latest + - name: microsoftedge + version: latest + - name: ie + version: 8..latest + - name: opera + version: 11..latest + - name: android + version: 5.0..latest diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE new file mode 100644 index 00000000000..0c068ceecbd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md b/src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md new file mode 100644 index 00000000000..e6eb61adb59 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md @@ -0,0 +1,49 @@ +# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] + +#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (incl. [browser Buffers](https://github.com/feross/buffer)) + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/is-buffer +[npm-image]: https://img.shields.io/npm/v/is-buffer.svg +[npm-url]: https://npmjs.org/package/is-buffer +[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg +[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg +[saucelabs-url]: https://saucelabs.com/u/is-buffer + +## Why not use `Buffer.isBuffer`? + +This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). + +It's future-proof and works in node too! + +## install + +```bash +npm install is-buffer +``` + +## usage + +```js +var isBuffer = require('is-buffer') + +isBuffer(new Buffer(4)) // true + +isBuffer(undefined) // false +isBuffer(null) // false +isBuffer('') // false +isBuffer(true) // false +isBuffer(false) // false +isBuffer(0) // false +isBuffer(1) // false +isBuffer(1.0) // false +isBuffer('string') // false +isBuffer({}) // false +isBuffer(function foo () {}) // false +``` + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js b/src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js new file mode 100644 index 00000000000..ef028240a80 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js @@ -0,0 +1,17 @@ +/** + * Determine if an object is Buffer + * + * Author: Feross Aboukhadijeh + * License: MIT + * + * `npm install is-buffer` + */ + +module.exports = function (obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json b/src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json new file mode 100644 index 00000000000..5ef9715a913 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + "is-buffer@^1.0.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/kind-of" + ] + ], + "_from": "is-buffer@>=1.0.2 <2.0.0", + "_id": "is-buffer@1.1.3", + "_inCache": true, + "_installable": true, + "_location": "/is-buffer", + "_nodeVersion": "4.3.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/is-buffer-1.1.3.tgz_1457390977775_0.6384289276320487" + }, + "_npmUser": { + "email": "feross@feross.org", + "name": "feross" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "name": "is-buffer", + "raw": "is-buffer@^1.0.2", + "rawSpec": "^1.0.2", + "scope": null, + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/kind-of" + ], + "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.3.tgz", + "_shasum": "db897fc3f7aca2d50de94b6c8c2896a4771627af", + "_shrinkwrap": null, + "_spec": "is-buffer@^1.0.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/kind-of", + "author": { + "email": "feross@feross.org", + "name": "Feross Aboukhadijeh", + "url": "http://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/is-buffer/issues" + }, + "dependencies": {}, + "description": "Determine if an object is Buffer", + "devDependencies": { + "standard": "^6.0.5", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "directories": {}, + "dist": { + "shasum": "db897fc3f7aca2d50de94b6c8c2896a4771627af", + "tarball": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.3.tgz" + }, + "engines": { + "node": ">=0.12" + }, + "gitHead": "dfd658d887e6b63254b89d22af1a755a39313455", + "homepage": "https://github.com/feross/is-buffer", + "keywords": [ + "buffer", + "buffers", + "type", + "core buffer", + "browser buffer", + "browserify", + "typed array", + "uint32array", + "int16array", + "int32array", + "float32array", + "float64array", + "browser", + "arraybuffer", + "dataview" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "feross@feross.org", + "name": "feross" + } + ], + "name": "is-buffer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/feross/is-buffer.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "testling": { + "files": "test/*.js" + }, + "version": "1.1.3", + "warnings": [ + { + "code": "ENOTSUP", + "pkgid": "is-buffer@1.1.3", + "required": { + "node": ">=0.12" + } + } + ] +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js b/src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js new file mode 100644 index 00000000000..38d883b0745 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js @@ -0,0 +1,20 @@ +var isBuffer = require('../') +var test = require('tape') + +test('is-buffer', function (t) { + t.ok(isBuffer(new Buffer(4)), 'new Buffer(4)') + + t.notOk(isBuffer(undefined), 'undefined') + t.notOk(isBuffer(null), 'null') + t.notOk(isBuffer(''), 'empty string') + t.notOk(isBuffer(true), 'true') + t.notOk(isBuffer(false), 'false') + t.notOk(isBuffer(0), '0') + t.notOk(isBuffer(1), '1') + t.notOk(isBuffer(1.0), '1.0') + t.notOk(isBuffer('string'), 'string') + t.notOk(isBuffer({}), '{}') + t.notOk(isBuffer(function foo () {}), 'function foo () {}') + + t.end() +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE new file mode 100644 index 00000000000..33754daecd9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md new file mode 100644 index 00000000000..d17b55ccb71 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md @@ -0,0 +1,74 @@ +# is-dotfile [![NPM version](https://badge.fury.io/js/is-dotfile.svg)](http://badge.fury.io/js/is-dotfile) + +> Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-dotfile --save +``` + +## Usage + +```js +var isDotfile = require('is-dotfile'); +``` + +**false** + +All of the following return `false`: + +```js +isDotfile('a/b/c.js'); +isDotfile('/.git/foo'); +isDotfile('a/b/c/.git/foo'); +//=> false +``` + +**true** + +All of the following return `true`: + +```js +isDotfile('a/b/.gitignore'); +isDotfile('.gitignore'); +isDotfile('/.gitignore'); +//=> true +``` + +## Related projects + +* [dotfile-regex](https://www.npmjs.com/package/dotfile-regex): Regular expresson for matching dotfiles. | [homepage](https://github.com/regexps/dotfile-regex) +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob) +* [is-dotdir](https://www.npmjs.com/package/is-dotdir): Returns true if a path is a dot-directory. | [homepage](https://github.com/jonschlinkert/is-dotdir) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-dotfile/issues/new). + +## Authors + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 20, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js new file mode 100644 index 00000000000..5a0a0caa8d1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js @@ -0,0 +1,15 @@ +/*! + * is-dotfile + * + * Copyright (c) 2015 Jon Schlinkert, contributors. + * Licensed under the MIT license. + */ + +module.exports = function(str) { + if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) { + return true; + } + + var last = str.lastIndexOf('/'); + return last !== -1 ? str.charCodeAt(last + 1) === 46 /* . */ : false; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json new file mode 100644 index 00000000000..c23108e28c1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "is-dotfile@^1.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob" + ] + ], + "_from": "is-dotfile@>=1.0.0 <2.0.0", + "_id": "is-dotfile@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/is-dotfile", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "is-dotfile", + "raw": "is-dotfile@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz", + "_shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", + "_shrinkwrap": null, + "_spec": "is-dotfile@^1.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-dotfile/issues" + }, + "dependencies": {}, + "description": "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.", + "devDependencies": { + "benchmarked": "^0.1.3", + "dotfile-regex": "^0.1.2", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", + "tarball": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "df258600b0afa6403a2a840f2ec486c9d350492f", + "homepage": "https://github.com/jonschlinkert/is-dotfile", + "keywords": [ + "detect", + "dot", + "dotfile", + "expression", + "file", + "filepath", + "find", + "fs", + "is", + "match", + "path", + "regex", + "regexp", + "regular" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "is-dotfile", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-dotfile.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "has-glob", + "is-glob", + "dotfile-regex", + "is-dotdir" + ] + } + }, + "version": "1.0.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE new file mode 100644 index 00000000000..65f90aca8c2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md new file mode 100644 index 00000000000..11422761f1c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md @@ -0,0 +1,90 @@ +# is-equal-shallow [![NPM version](https://badge.fury.io/js/is-equal-shallow.svg)](http://badge.fury.io/js/is-equal-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/is-equal-shallow.svg)](https://travis-ci.org/jonschlinkert/is-equal-shallow) + +> Does a shallow comparison of two objects, returning false if the keys or values differ. + +The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives. + +* only compares objects. +* only compares the first level of each object +* values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-equal-shallow --save +``` + +## Usage + +```js +var equals = require('is-equal-shallow'); +equals(object_a, object_b); +``` + +**Examples** + +```js +equals({a: true, b: true}, {a: true, b: true}); +//=> 'true' + +equals({a: true, b: false}, {c: false, b: false}); +//=> 'false' + +equals({a: true, b: false}, {a: false, b: false}); +//=> 'false' +``` + +Strict comparison for equality: + +```js +equals({a: true, b: true}, {a: true, b: 'true'}); +//=> 'false' +``` + +When values are not primitives, `false` is always returned: + +```js +equals({ b: {}}, { b: {}}); +//=> 'false' + +equals({ b: []}, { b: []}); +//=> 'false' +``` + +## Related projects + +Other object utils: + +* [clone-deep](https://github.com/jonschlinkert/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. +* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) +* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-equal-shallow/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js new file mode 100644 index 00000000000..1006eef10f4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js @@ -0,0 +1,27 @@ +/*! + * is-equal-shallow + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isPrimitive = require('is-primitive'); + +module.exports = function isEqual(a, b) { + if (!a && !b) { return true; } + if (!a && b || a && !b) { return false; } + + var numKeysA = 0, numKeysB = 0, key; + for (key in b) { + numKeysB++; + if (!isPrimitive(b[key]) || !a.hasOwnProperty(key) || (a[key] !== b[key])) { + return false; + } + } + for (key in a) { + numKeysA++; + } + return numKeysA === numKeysB; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json new file mode 100644 index 00000000000..df1a012b7b1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + "is-equal-shallow@^0.1.3", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache" + ] + ], + "_from": "is-equal-shallow@>=0.1.3 <0.2.0", + "_id": "is-equal-shallow@0.1.3", + "_inCache": true, + "_installable": true, + "_location": "/is-equal-shallow", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-equal-shallow", + "raw": "is-equal-shallow@^0.1.3", + "rawSpec": "^0.1.3", + "scope": null, + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/regex-cache" + ], + "_resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "_shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534", + "_shrinkwrap": null, + "_spec": "is-equal-shallow@^0.1.3", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-equal-shallow/issues" + }, + "dependencies": { + "is-primitive": "^2.0.0" + }, + "description": "Does a shallow comparison of two objects, returning false if the keys or values differ.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534", + "tarball": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "dceb47dd9c9c21066958116e3b54b3c8c251ee4a", + "homepage": "https://github.com/jonschlinkert/is-equal-shallow", + "keywords": [ + "compare", + "comparison", + "equal", + "equals", + "is", + "is-equal", + "key", + "object", + "same", + "shallow", + "value" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + } + ], + "name": "is-equal-shallow", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-equal-shallow.git" + }, + "scripts": { + "test": "mocha" + }, + "verbiage": { + "related": { + "description": "Other object utils:", + "list": [ + "is-plain-object", + "isobject", + "for-in", + "for-own", + "clone-deep" + ] + } + }, + "version": "0.1.3" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE new file mode 100644 index 00000000000..65f90aca8c2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md b/src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md new file mode 100644 index 00000000000..e4cfaebcb79 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md @@ -0,0 +1,72 @@ +# is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable) + +> Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?" + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-extendable --save +``` + +## Usage + +```js +var isExtendable = require('is-extendable'); +``` + +Returns true if the value is any of the following: + +* `array` +* `regexp` +* `plain object` +* `function` +* `date` +* `error` + +## Notes + +All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: + +* the value is not a primitive, or +* that the object is an `object`, `function` + +Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. + +## Related projects + +* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js b/src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js new file mode 100644 index 00000000000..4ee71a44a3a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js @@ -0,0 +1,13 @@ +/*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function isExtendable(val) { + return typeof val !== 'undefined' && val !== null + && (typeof val === 'object' || typeof val === 'function'); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json b/src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json new file mode 100644 index 00000000000..a7a9b97c1d4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "is-extendable@^0.1.1", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/object.omit" + ] + ], + "_from": "is-extendable@>=0.1.1 <0.2.0", + "_id": "is-extendable@0.1.1", + "_inCache": true, + "_installable": true, + "_location": "/is-extendable", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-extendable", + "raw": "is-extendable@^0.1.1", + "rawSpec": "^0.1.1", + "scope": null, + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/object.omit" + ], + "_resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "_shasum": "62b110e289a471418e3ec36a617d472e301dfc89", + "_shrinkwrap": null, + "_spec": "is-extendable@^0.1.1", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/object.omit", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-extendable/issues" + }, + "dependencies": {}, + "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "62b110e289a471418e3ec36a617d472e301dfc89", + "tarball": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c36a0732e6a76931c6f66c5931d1f3e54fa44380", + "homepage": "https://github.com/jonschlinkert/is-extendable", + "keywords": [ + "array", + "assign", + "check", + "date", + "extend", + "extensible", + "function", + "is", + "object", + "regex", + "test" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "is-extendable", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extendable.git" + }, + "scripts": { + "test": "mocha" + }, + "verbiage": { + "related": { + "list": [ + "isobject", + "is-plain-object", + "kind-of", + "is-extendable", + "is-equal-shallow", + "extend-shallow", + "assign-deep" + ] + } + }, + "version": "0.1.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE new file mode 100644 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md b/src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md new file mode 100644 index 00000000000..80e7128d64d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md @@ -0,0 +1,75 @@ +# is-extglob [![NPM version](https://badge.fury.io/js/is-extglob.svg)](http://badge.fury.io/js/is-extglob) [![Build Status](https://travis-ci.org/jonschlinkert/is-extglob.svg)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install with [npm](npmjs.org) + +```bash +npm i is-extglob --save +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +Everything else... + +```js +isExtglob('foo.js'); +isExtglob('!foo.js'); +isExtglob('*.js'); +isExtglob('**/abc.js'); +isExtglob('abc/*.js'); +isExtglob('abc/(aaa|bbb).js'); +isExtglob('abc/[a-z].js'); +isExtglob('abc/{a,b}.js'); +isExtglob('abc/?.js'); +isExtglob('abc.js'); +isExtglob('abc/def/ghi.js'); +``` + +## Related +* [extglob](https://github.com/jonschlinkert/extglob): Extended globs. extglobs add the expressive power of regular expressions to glob patterns. +* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. +* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. + +## Run tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extglob/issues) + + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 06, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js b/src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js new file mode 100644 index 00000000000..803047f7485 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js @@ -0,0 +1,11 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + return typeof str === 'string' + && /[@?!+*]\(/.test(str); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json b/src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json new file mode 100644 index 00000000000..f87f2c0783b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + "is-extglob@^1.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "is-extglob@>=1.0.0 <2.0.0", + "_id": "is-extglob@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/is-extglob", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-extglob", + "raw": "is-extglob@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/extglob", + "/is-glob", + "/micromatch", + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "_shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", + "_shrinkwrap": null, + "_spec": "is-extglob@^1.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "dependencies": {}, + "description": "Returns true if a string has an extglob.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", + "tarball": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-extglob", + "keywords": [ + "bash", + "braces", + "check", + "exec", + "extglob", + "expression", + "glob", + "globbing", + "globstar", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "is-extglob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-extglob.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js", + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE new file mode 100644 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/README.md b/src/filesystem/impls/appshell/node/node_modules/is-glob/README.md new file mode 100644 index 00000000000..b1625429314 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-glob/README.md @@ -0,0 +1,105 @@ +# is-glob [![NPM version](https://badge.fury.io/js/is-glob.svg)](http://badge.fury.io/js/is-glob) [![Build Status](https://travis-ci.org/jonschlinkert/is-glob.svg)](https://travis-ci.org/jonschlinkert/is-glob) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +Also take a look at [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-glob --save +``` + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +isGlob('abc/?.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +## Related + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob) +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) +* [is-posix-bracket](https://www.npmjs.com/package/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). | [homepage](https://github.com/jonschlinkert/is-posix-bracket) +* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) + +## Run tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-glob/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 02, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/index.js b/src/filesystem/impls/appshell/node/node_modules/is-glob/index.js new file mode 100644 index 00000000000..ef27bba4fd7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-glob/index.js @@ -0,0 +1,14 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = require('is-extglob'); + +module.exports = function isGlob(str) { + return typeof str === 'string' + && (/[*!?{}(|)[\]]/.test(str) + || isExtglob(str)); +}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/package.json b/src/filesystem/impls/appshell/node/node_modules/is-glob/package.json new file mode 100644 index 00000000000..645fbf402ae --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-glob/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + "is-glob@^2.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] + ], + "_from": "is-glob@>=2.0.0 <3.0.0", + "_id": "is-glob@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/is-glob", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-glob", + "raw": "is-glob@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar", + "/glob-base", + "/glob-parent", + "/micromatch", + "/parse-glob" + ], + "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "_shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", + "_shrinkwrap": null, + "_spec": "is-glob@^2.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-glob/issues" + }, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", + "tarball": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d7db1b2dd559b3d5a73f89dbe72d9e9f4d6587d7", + "homepage": "https://github.com/jonschlinkert/is-glob", + "keywords": [ + "bash", + "braces", + "check", + "exec", + "extglob", + "expression", + "glob", + "globbing", + "globstar", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + } + ], + "name": "is-glob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-glob.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "has-glob", + "is-extglob", + "is-posix-bracket", + "is-valid-glob", + "micromatch" + ] + } + }, + "version": "2.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE new file mode 100644 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/README.md b/src/filesystem/impls/appshell/node/node_modules/is-number/README.md new file mode 100644 index 00000000000..8395f913179 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-number/README.md @@ -0,0 +1,103 @@ +# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i is-number --save +``` + +## Usage + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## Other projects + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even) +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even) +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd) +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues/new). + +## Run tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/index.js b/src/filesystem/impls/appshell/node/node_modules/is-number/index.js new file mode 100644 index 00000000000..96ec66d5e2f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-number/index.js @@ -0,0 +1,19 @@ +/*! + * is-number + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var typeOf = require('kind-of'); + +module.exports = function isNumber(num) { + var type = typeOf(num); + if (type !== 'number' && type !== 'string') { + return false; + } + var n = +num; + return (n - n + 1) >= 0 && num !== ''; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/package.json b/src/filesystem/impls/appshell/node/node_modules/is-number/package.json new file mode 100644 index 00000000000..43232695f7a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-number/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + "is-number@^2.1.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" + ] + ], + "_from": "is-number@>=2.1.0 <3.0.0", + "_id": "is-number@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/is-number", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "is-number", + "raw": "is-number@^2.1.0", + "rawSpec": "^2.1.0", + "scope": null, + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fill-range", + "/randomatic" + ], + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "_shasum": "01fcbbb393463a548f2f466cce16dece49db908f", + "_shrinkwrap": null, + "_spec": "is-number@^2.1.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "dependencies": { + "kind-of": "^3.0.2" + }, + "description": "Returns true if the value is a number. comprehensive tests.", + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "01fcbbb393463a548f2f466cce16dece49db908f", + "tarball": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d06c6e2cc048d3cad016cb8dfb055bb14d86fffa", + "homepage": "https://github.com/jonschlinkert/is-number", + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is number", + "is-number", + "istype", + "kind of", + "math", + "number", + "test", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + } + ], + "name": "is-number", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-number.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "kind-of", + "is-primitive", + "even", + "odd", + "is-even", + "is-odd" + ] + } + }, + "version": "2.1.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE new file mode 100644 index 00000000000..1e49edf81fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md new file mode 100644 index 00000000000..1d06a4d9e0a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md @@ -0,0 +1,88 @@ +# is-posix-bracket [![NPM version](https://img.shields.io/npm/v/is-posix-bracket.svg?style=flat)](https://www.npmjs.com/package/is-posix-bracket) [![NPM downloads](https://img.shields.io/npm/dm/is-posix-bracket.svg?style=flat)](https://npmjs.org/package/is-posix-bracket) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-posix-bracket.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-posix-bracket) + +> Returns true if the given string is a POSIX bracket expression (POSIX character class). + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install is-posix-bracket --save +``` + +## Usage + +```js +var isPosixBracket = require('is-posix-bracket'); + +isPosixBracket('[foo:]]'); +//=> false +isPosixBracket('[xdigit:]]'); +//=> false +isPosixBracket('[[:xdigit:]]'); +//=> true +isPosixBracket('[[:xdigit:]]'); +//=> true +isPosixBracket('[[:alpha:]123]'); +//=> true +isPosixBracket('[[:alpha:]123]'); +//=> true +isPosixBracket('[a-c[:digit:]x-z]'); +//=> true +isPosixBracket('[:al:]'); +//=> true +isPosixBracket('[abc[:punct:][0-9]'); +//=> true +``` + +## Related projects + +You might also be interested in these projects: + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets) +* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-posix-bracket/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-posix-bracket/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on April 05, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js new file mode 100644 index 00000000000..7cf1de55b62 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js @@ -0,0 +1,10 @@ +/*! + * is-posix-bracket + * + * Copyright (c) 2015-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isPosixBracket(str) { + return typeof str === 'string' && /\[([:.=+])(?:[^\[\]]|)+\1\]/.test(str); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json new file mode 100644 index 00000000000..61b6c7d1e66 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + "is-posix-bracket@^0.1.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/expand-brackets" + ] + ], + "_from": "is-posix-bracket@>=0.1.0 <0.2.0", + "_id": "is-posix-bracket@0.1.1", + "_inCache": true, + "_installable": true, + "_location": "/is-posix-bracket", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/is-posix-bracket-0.1.1.tgz_1459834297811_0.5273812564555556" + }, + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "name": "is-posix-bracket", + "raw": "is-posix-bracket@^0.1.0", + "rawSpec": "^0.1.0", + "scope": null, + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/expand-brackets" + ], + "_resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "_shasum": "3334dc79774368e92f016e6fbc0a88f5cd6e6bc4", + "_shrinkwrap": null, + "_spec": "is-posix-bracket@^0.1.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/expand-brackets", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-posix-bracket/issues" + }, + "dependencies": {}, + "description": "Returns true if the given string is a POSIX bracket expression (POSIX character class).", + "devDependencies": { + "gulp-format-md": "^0.1.7", + "mocha": "^2.4.5" + }, + "directories": {}, + "dist": { + "shasum": "3334dc79774368e92f016e6fbc0a88f5cd6e6bc4", + "tarball": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "43972556cfdbb681a15072da75c97952c4e4deba", + "homepage": "https://github.com/jonschlinkert/is-posix-bracket", + "keywords": [ + "braces", + "brackets", + "character", + "character-class", + "class", + "expression", + "posix", + "regex", + "regexp", + "regular" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "is-posix-bracket", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-posix-bracket.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "layout": "default", + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "is-extglob", + "is-glob", + "micromatch" + ] + }, + "run": true, + "tasks": [ + "readme" + ], + "toc": false + }, + "version": "0.1.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE new file mode 100644 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md b/src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md new file mode 100644 index 00000000000..e1c306428fd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md @@ -0,0 +1,57 @@ +# is-primitive [![NPM version](https://badge.fury.io/js/is-primitive.svg)](http://badge.fury.io/js/is-primitive) [![Build Status](https://travis-ci.org/jonschlinkert/is-primitive.svg)](https://travis-ci.org/jonschlinkert/is-primitive) + +> Returns `true` if the value is a primitive. + +## Install with [npm](npmjs.org) + +```bash +npm i is-primitive --save +``` + +## Running tests +Install dev dependencies. + +```bash +npm i -d && npm test +``` + +## Usage + +```js +var isPrimitive = require('is-primitive'); +isPrimitive('abc'); +//=> true + +isPrimitive(42); +//=> true + +isPrimitive(false); +//=> true + +isPrimitive(true); +//=> true + +isPrimitive({}); +//=> false + +isPrimitive([]); +//=> false + +isPrimitive(function(){}); +//=> false +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014-2015 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 16, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js b/src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js new file mode 100644 index 00000000000..55f11cf05b4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js @@ -0,0 +1,13 @@ +/*! + * is-primitive + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +// see http://jsperf.com/testing-value-is-primitive/7 +module.exports = function isPrimitive(value) { + return value == null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json b/src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json new file mode 100644 index 00000000000..c3b691d9662 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "is-primitive@^2.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache" + ] + ], + "_from": "is-primitive@>=2.0.0 <3.0.0", + "_id": "is-primitive@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/is-primitive", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "is-primitive", + "raw": "is-primitive@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/is-equal-shallow", + "/regex-cache" + ], + "_resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "_shasum": "207bab91638499c07b2adf240a41a87210034575", + "_shrinkwrap": null, + "_spec": "is-primitive@^2.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-primitive/issues" + }, + "dependencies": {}, + "description": "Returns `true` if the value is a primitive. ", + "devDependencies": { + "mocha": "*", + "should": "^4.0.4" + }, + "directories": {}, + "dist": { + "shasum": "207bab91638499c07b2adf240a41a87210034575", + "tarball": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c512b7c95fb049aa9b1f039ddc0670611b66cce2", + "homepage": "https://github.com/jonschlinkert/is-primitive", + "keywords": [ + "boolean", + "check", + "number", + "primitive", + "string", + "symbol", + "type", + "typeof", + "util" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/is-primitive/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "is-primitive", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/is-primitive.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore b/src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore new file mode 100644 index 00000000000..3c3629e647f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml new file mode 100644 index 00000000000..cc4dba29d95 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/Makefile b/src/filesystem/impls/appshell/node/node_modules/isarray/Makefile new file mode 100644 index 00000000000..787d56e1e98 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test.js + +.PHONY: test + diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/README.md b/src/filesystem/impls/appshell/node/node_modules/isarray/README.md new file mode 100644 index 00000000000..16d2c59c619 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/README.md @@ -0,0 +1,60 @@ + +# isarray + +`Array#isArray` for older browsers. + +[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) +[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) + +[![browser support](https://ci.testling.com/juliangruber/isarray.png) +](https://ci.testling.com/juliangruber/isarray) + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/component.json b/src/filesystem/impls/appshell/node/node_modules/isarray/component.json new file mode 100644 index 00000000000..9e31b683889 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/index.js b/src/filesystem/impls/appshell/node/node_modules/isarray/index.js new file mode 100644 index 00000000000..a57f6349594 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/index.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/package.json b/src/filesystem/impls/appshell/node/node_modules/isarray/package.json new file mode 100644 index 00000000000..965800c9d5b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "isarray@1.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/isobject" + ] + ], + "_from": "isarray@1.0.0", + "_id": "isarray@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/isarray", + "_nodeVersion": "5.1.0", + "_npmUser": { + "email": "julian@juliangruber.com", + "name": "juliangruber" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "isarray", + "raw": "isarray@1.0.0", + "rawSpec": "1.0.0", + "scope": null, + "spec": "1.0.0", + "type": "version" + }, + "_requiredBy": [ + "/isobject", + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", + "_shrinkwrap": null, + "_spec": "isarray@1.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/isobject", + "author": { + "email": "mail@juliangruber.com", + "name": "Julian Gruber", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tape": "~2.13.4" + }, + "directories": {}, + "dist": { + "shasum": "bb935d48582cba168c06834957a54a3e07124f11", + "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "julian@juliangruber.com", + "name": "juliangruber" + } + ], + "name": "isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tape test.js" + }, + "testling": { + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ], + "files": "test.js" + }, + "version": "1.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/test.js b/src/filesystem/impls/appshell/node/node_modules/isarray/test.js new file mode 100644 index 00000000000..e0c3444d85d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isarray/test.js @@ -0,0 +1,20 @@ +var isArray = require('./'); +var test = require('tape'); + +test('is array', function(t){ + t.ok(isArray([])); + t.notOk(isArray({})); + t.notOk(isArray(null)); + t.notOk(isArray(false)); + + var obj = {}; + obj[0] = true; + t.notOk(isArray(obj)); + + var arr = []; + arr.foo = 'bar'; + t.ok(isArray(arr)); + + t.end(); +}); + diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE b/src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE new file mode 100644 index 00000000000..39245ac1c60 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/README.md b/src/filesystem/impls/appshell/node/node_modules/isobject/README.md new file mode 100644 index 00000000000..9dd897aa058 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isobject/README.md @@ -0,0 +1,112 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](https://travis-ci.org/jonschlinkert/isobject) + +Returns true if the value is an object and not an array or null. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject --save +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install isobject +``` + +## Usage + +```js +var isObject = require('isobject'); +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## Related projects + +You might also be interested in these projects: + +[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object) +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/isobject/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/index.js b/src/filesystem/impls/appshell/node/node_modules/isobject/index.js new file mode 100644 index 00000000000..aa0dce0bbad --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isobject/index.js @@ -0,0 +1,14 @@ +/*! + * isobject + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isArray = require('isarray'); + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && isArray(val) === false; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/package.json b/src/filesystem/impls/appshell/node/node_modules/isobject/package.json new file mode 100644 index 00000000000..6b2eeb33f35 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/isobject/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + "isobject@^2.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" + ] + ], + "_from": "isobject@>=2.0.0 <3.0.0", + "_id": "isobject@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/isobject", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/isobject-2.1.0.tgz_1461618425262_0.8524945541284978" + }, + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "name": "isobject", + "raw": "isobject@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "_shasum": "f065561096a3f1da2ef46272f815c840d87e0c89", + "_shrinkwrap": null, + "_spec": "isobject@^2.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "dependencies": { + "isarray": "1.0.0" + }, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5" + }, + "directories": {}, + "dist": { + "shasum": "f065561096a3f1da2ef46272f815c840d87e0c89", + "tarball": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "d693ec8d31b02b42a19b2d806407a4ecb2f9fb73", + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + } + ], + "name": "isobject", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "layout": "default", + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "related": { + "list": [ + "merge-deep", + "extend-shallow", + "is-plain-object", + "kind-of" + ] + }, + "tasks": [ + "readme" + ], + "toc": false + }, + "version": "2.1.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE b/src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE new file mode 100644 index 00000000000..39245ac1c60 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/README.md b/src/filesystem/impls/appshell/node/node_modules/kind-of/README.md new file mode 100644 index 00000000000..4ac4f18b155 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/kind-of/README.md @@ -0,0 +1,247 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat)](https://travis-ci.org/jonschlinkert/kind-of) + +Get the native type of a value. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` + +## About + +### Related projects + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/kind-of/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 29, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/index.js b/src/filesystem/impls/appshell/node/node_modules/kind-of/index.js new file mode 100644 index 00000000000..87938c9a2ba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/kind-of/index.js @@ -0,0 +1,113 @@ +var isBuffer = require('is-buffer'); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + + // buffer + if (typeof Buffer !== 'undefined' && isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/package.json b/src/filesystem/impls/appshell/node/node_modules/kind-of/package.json new file mode 100644 index 00000000000..394718a038d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/kind-of/package.json @@ -0,0 +1,148 @@ +{ + "_args": [ + [ + "kind-of@^3.0.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "kind-of@>=3.0.2 <4.0.0", + "_id": "kind-of@3.0.4", + "_inCache": true, + "_installable": true, + "_location": "/kind-of", + "_nodeVersion": "6.3.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/kind-of-3.0.4.tgz_1469811230830_0.8813814013265073" + }, + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "name": "kind-of", + "raw": "kind-of@^3.0.2", + "rawSpec": "^3.0.2", + "scope": null, + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/is-number", + "/micromatch", + "/randomatic" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", + "_shasum": "7b8ecf18a4e17f8269d73b501c9f232c96887a74", + "_shrinkwrap": null, + "_spec": "kind-of@^3.0.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "dependencies": { + "is-buffer": "^1.0.2" + }, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.2.5", + "browserify": "^13.1.0", + "glob": "^7.0.5", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "7b8ecf18a4e17f8269d73b501c9f232c96887a74", + "tarball": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "gitHead": "8f93765a6bbbe350e1ba68e790d1ff337b91331a", + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + } + ], + "name": "kind-of", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "layout": "default", + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "tasks": [ + "readme" + ], + "toc": false + }, + "version": "3.0.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE new file mode 100755 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/README.md b/src/filesystem/impls/appshell/node/node_modules/micromatch/README.md new file mode 100644 index 00000000000..8fb391910c5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/README.md @@ -0,0 +1,689 @@ +# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Build Status](https://img.shields.io/travis/jonschlinkert/micromatch.svg?style=flat)](https://travis-ci.org/jonschlinkert/micromatch) + +> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. + +Micromatch supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch). + +* [mm()](#usage) is the same as [multimatch()](https://github.com/sindresorhus/multimatch) +* [mm.match()](#match) is the same as [minimatch.match()](https://github.com/isaacs/minimatch) +* use [mm.isMatch()](#ismatch) instead of [minimatch()](https://github.com/isaacs/minimatch) + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save micromatch +``` + +## Start matching! + +```js +var mm = require('micromatch'); +console.log(mm([''])) +``` + +*** + +### Features + +* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) +* Built-in support for multiple glob patterns, like `['foo/*.js', '!bar.js']` +* [Brace Expansion](https://github.com/jonschlinkert/braces) (`foo/bar-{1..5}.md`, `one/{two,three}/four.md`) +* Typical glob patterns, like `**/*`, `a/b/*.js`, or `['foo/*.js', '!bar.js']` +* Methods like `.isMatch()`, `.contains()` and `.any()` + +**Extended globbing features:** + +* Logical `OR` (`foo/bar/(abc|xyz).js`) +* Regex character classes (`foo/bar/baz-[1-5].js`) +* POSIX [bracket expressions](https://github.com/jonschlinkert/expand-brackets) (`**/[[:alpha:][:digit:]]/`) +* [extglobs](https://github.com/jonschlinkert/extglob) (`**/+(x|y)`, `!(a|b)`, etc). + +You can combine these to create whatever matching patterns you need. + +**Example** + +```js +// double-negation! +mm(['fa', 'fb', 'f', 'fo'], '!(f!(o))'); +//=> ['fo'] +``` + +## Why switch to micromatch? + +* Native support for multiple glob patterns, no need for wrappers like [multimatch](https://github.com/sindresorhus/multimatch) +* [10-55x faster](#benchmarks) and more performant than [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch). This is achieved through a combination of caching and regex optimization strategies, a fundamentally different approach than minimatch. +* More extensive support for the Bash 4.3 specification +* More complete extglob support +* Extensive [unit tests](./test) (approx. 1,300 tests). Minimatch fails many of the tests. + +### Switch from minimatch + +Use `mm.isMatch()` instead of `minimatch()`: + +```js +mm.isMatch('foo', 'b*'); +//=> false +``` + +Use `mm.match()` instead of `minimatch.match()`: + +```js +mm.match(['foo', 'bar'], 'b*'); +//=> 'bar' +``` + +### Switch from multimatch + +Same signature: + +```js +mm(['foo', 'bar', 'baz'], ['f*', '*z']); +//=> ['foo', 'baz'] +``` + +*** + +## Usage + +Add micromatch to your node.js project: + +```js +var mm = require('micromatch'); +``` + +**Signature** + +```js +mm(array_of_strings, glob_patterns[, options]); +``` + +**Example** + +```js +mm(['foo', 'bar', 'baz'], 'b*'); +//=> ['bar', 'baz'] +``` + +### Usage examples + +**Brace expansion** + +Match files with `.js` or `.txt` extensions. + +```js +mm(['a.js', 'b.md', 'c.txt'], '*.{js,txt}'); +//=> ['a.js', 'c.txt'] +``` + +**Extglobs** + +Match anything except for files with the `.md` extension. + +```js +mm(files, '**/*.!(md)'); + +//=> ['a.js', 'c.txt'] +``` + +**Multiple patterns** + +Match using an array of patterns. + +```js +mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.md', '*.txt']); +//=> ['a.md', 'c.txt'] +``` + +**Negation patterns:** + +Behavior is designed to be what users would expect, based on conventions that are already well-established. + +* [minimatch](https://github.com/isaacs/minimatch) behavior is used when the pattern is a string, so patterns are **inclusive by default**. +* [multimatch](https://github.com/sindresorhus/multimatch) behavior is used when an array of patterns is passed, so patterns are **exclusive by default**. + +```js +mm(['a.js', 'b.md', 'c.txt'], '!*.{js,txt}'); +//=> ['b.md'] + +mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.*', '!*.{js,txt}']); +//=> ['a.md', 'd.json'] +``` + +*** + +## API methods + +```js +var mm = require('micromatch'); +``` + +### .match + +```js +mm.match(array, globString); +``` + +Return an array of files that match the given glob pattern. Useful if you only need to use a single glob pattern. + +**Example** + +```js +mm.match(['ab', 'a/b', 'bb', 'b/c'], '?b'); +//=> ['ab', 'bb'] + +mm.match(['ab', 'a/b', 'bb', 'b/c'], '*/b'); +//=> ['a/b'] +``` + +### .isMatch + +```js +mm.isMatch(filepath, globString); +``` + +Returns true if a file path matches the given glob pattern. + +**Example** + +```js +mm.isMatch('.verb.md', '*.md'); +//=> false + +mm.isMatch('.verb.md', '*.md', {dot: true}); +//=> true +``` + +### .contains + +Returns true if any part of a file path matches the given glob pattern. Think of this is "has path" versus "is path". + +**Example** + +`.isMatch()` would return false for both of the following: + +```js +mm.contains('a/b/c', 'a/b'); +//=> true + +mm.contains('a/b/c', 'a/*'); +//=> true +``` + +### .matcher + +Returns a function for matching using the supplied pattern. e.g. create your own "matcher". The advantage of this method is that the pattern can be compiled outside of a loop. + +**Pattern** + +Can be any of the following: + +* `glob/string` +* `regex` +* `function` + +**Example** + +```js +var isMatch = mm.matcher('*.md'); +var files = []; + +['a.md', 'b.txt', 'c.md'].forEach(function(fp) { + if (isMatch(fp)) { + files.push(fp); + } +}); +``` + +### .filter + +Returns a function that can be passed to `Array#filter()`. + +**Params** + +* `patterns` **{String|Array}**: + +**Examples** + +Single glob: + +```js +var fn = mm.filter('*.md'); +['a.js', 'b.txt', 'c.md'].filter(fn); +//=> ['c.md'] + +var fn = mm.filter('[a-c]'); +['a', 'b', 'c', 'd', 'e'].filter(fn); +//=> ['a', 'b', 'c'] +``` + +Array of glob patterns: + +```js +var arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; + +var fn = mm.filter(['{1..10}', '![7-9]', '!{3..4}']); +arr.filter(fn); +//=> [1, 2, 5, 6, 10] +``` + +_(Internally this function generates the matching function by using the [matcher](#matcher) method. You can use the [matcher](#matcher) method directly to create your own filter function)_ + +### .any + +Returns true if a file path matches any of the given patterns. + +```js +mm.any(filepath, patterns, options); +``` + +**Params** + +* filepath `{String}`: The file path to test. +* patterns `{String|Array}`: One or more glob patterns +* options: `{Object}`: options to pass to the `.matcher()` method. + +**Example** + +```js +mm.any('abc', ['!*z']); +//=> true +mm.any('abc', ['a*', 'z*']); +//=> true +mm.any('abc', 'a*'); +//=> true +mm.any('abc', ['z*']); +//=> false +``` + +### .expand + +Returns an object with a regex-compatible string and tokens. + +```js +mm.expand('*.js'); + +// when `track` is enabled (for debugging), the `history` array is used +// to record each mutation to the glob pattern as it's converted to regex +{ options: { track: false, dot: undefined, makeRe: true, negated: false }, + pattern: '(.*\\/|^)bar\\/(?:(?!(?:^|\\/)\\.).)*?', + history: [], + tokens: + { path: + { whole: '**/bar/**', + dirname: '**/bar/', + filename: '**', + basename: '**', + extname: '', + ext: '' }, + is: + { glob: true, + negated: false, + globstar: true, + dotfile: false, + dotdir: false }, + match: {}, + original: '**/bar/**', + pattern: '**/bar/**', + base: '' } } +``` + +### .makeRe + +Create a regular expression for matching file paths based on the given pattern: + +```js +mm.makeRe('*.js'); +//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ +``` + +## Options + +### options.unixify + +Normalize slashes in file paths and glob patterns to forward slashes. + +Type: `{Boolean}` + +Default: `undefined` on non-windows, `true` on windows. + +### options.dot + +Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.unescape + +Unescape slashes in glob patterns. Use cautiously, especially on windows. + +Type: `{Boolean}` + +Default: `undefined` + +**Example** + +```js +mm.isMatch('abc', '\\a\\b\\c', {unescape: true}); +//=> true +``` + +### options.nodupes + +Remove duplicate elements from the result array. + +Type: `{Boolean}` + +Default: `undefined` + +**Example** + +Example of using the `unescape` and `nodupes` options together: + +```js +mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true}); +//=> ['abc', 'abc'] + +mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true, nodupes: true}); +//=> ['abc'] +``` + +### options.matchBase + +Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +**Example** + +```js +mm(['a/b.js', 'a/c.md'], '*.js'); +//=> [] + +mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); +//=> ['a/b.js'] +``` + +### options.nobraces + +Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) `nobrace`. + +Type: `{Boolean}` + +Default: `undefined` + +See [braces](https://github.com/jonschlinkert/braces) for more information about extended brace expansion. + +### options.nobrackets + +Don't expand POSIX bracket expressions. + +Type: `{Boolean}` + +Default: `undefined` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. + +### options.noextglob + +Don't expand extended globs. + +Type: `{Boolean}` + +Default: `undefined` + +See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. + +### options.nocase + +Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.nonegate + +Disallow negation (`!`) patterns. + +Type: `{Boolean}` + +Default: `false` + +### options.nonull + +If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch). + +Type: `{Boolean}` + +Default: `false` + +### options.cache + +Cache the platform (e.g. `win32`) to prevent this from being looked up for every filepath. + +Type: `{Boolean}` + +Default: `true` + +*** + +## Other features + +Micromatch also supports the following. + +### Extended globbing + +#### extglobs + +Extended globbing, as described by the bash man page: + +| **pattern** | **regex equivalent** | **description** | +| --- | --- | --- | +| `?(pattern-list)` | `(... | ...)?` | Matches zero or one occurrence of the given patterns | +| `*(pattern-list)` | `(... | ...)*` | Matches zero or more occurrences of the given patterns | +| `+(pattern-list)` | `(... | ...)+` | Matches one or more occurrences of the given patterns | +| `@(pattern-list)` | `(... | ...)` * | Matches one of the given patterns | +| `!(pattern-list)` | N/A | Matches anything except one of the given patterns | + +* `@` isn't a RegEx character. + +Powered by [extglob](https://github.com/jonschlinkert/extglob). Visit that library for the full range of options or to report extglob related issues. + +See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. + +#### brace expansion + +In simple cases, brace expansion appears to work the same way as the logical `OR` operator. For example, `(a|b)` will achieve the same result as `{a,b}`. + +Here are some powerful features unique to brace expansion (versus character classes): + +* range expansion: `a{1..3}b/*.js` expands to: `['a1b/*.js', 'a2b/*.js', 'a3b/*.js']` +* nesting: `a{c,{d,e}}b/*.js` expands to: `['acb/*.js', 'adb/*.js', 'aeb/*.js']` + +Visit [braces](https://github.com/jonschlinkert/braces) to ask questions and create an issue related to brace-expansion, or to see the full range of features and options related to brace expansion. + +#### regex character classes + +With the exception of brace expansion (`{a,b}`, `{1..5}`, etc), most of the special characters convert directly to regex, so you can expect them to follow the same rules and produce the same results as regex. + +For example, given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` +* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` + +Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). + +#### regex groups + +Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: + +* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` +* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` +* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` + +As with regex, parenthese can be nested, so patterns like `((a|b)|c)/b` will work. But it might be easier to achieve your goal using brace expansion. + +#### POSIX bracket expressions + +**Example** + +```js +mm.isMatch('a1', '[[:alpha:][:digit:]]'); +//=> true +``` + +See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. + +*** + +## Notes + +Whenever possible parsing behavior for patterns is based on globbing specifications in Bash 4.3. Patterns that aren't described by Bash follow wildmatch spec (used by git). + +## Benchmarks + +Run the [benchmarks](./benchmark): + +```bash +node benchmark +``` + +As of July 15, 2016: + +```bash +#1: basename-braces + micromatch x 26,420 ops/sec ±0.89% (91 runs sampled) + minimatch x 3,507 ops/sec ±0.64% (97 runs sampled) + +#2: basename + micromatch x 25,315 ops/sec ±0.82% (93 runs sampled) + minimatch x 4,398 ops/sec ±0.86% (94 runs sampled) + +#3: braces-no-glob + micromatch x 341,254 ops/sec ±0.78% (93 runs sampled) + minimatch x 30,197 ops/sec ±1.12% (91 runs sampled) + +#4: braces + micromatch x 54,649 ops/sec ±0.74% (94 runs sampled) + minimatch x 3,095 ops/sec ±0.82% (95 runs sampled) + +#5: immediate + micromatch x 16,719 ops/sec ±0.79% (95 runs sampled) + minimatch x 4,348 ops/sec ±0.86% (96 runs sampled) + +#6: large + micromatch x 721 ops/sec ±0.77% (94 runs sampled) + minimatch x 17.73 ops/sec ±1.08% (50 runs sampled) + +#7: long + micromatch x 5,051 ops/sec ±0.87% (97 runs sampled) + minimatch x 628 ops/sec ±0.83% (94 runs sampled) + +#8: mid + micromatch x 51,280 ops/sec ±0.80% (95 runs sampled) + minimatch x 1,923 ops/sec ±0.84% (95 runs sampled) + +#9: multi-patterns + micromatch x 22,440 ops/sec ±0.97% (94 runs sampled) + minimatch x 2,481 ops/sec ±1.10% (94 runs sampled) + +#10: no-glob + micromatch x 722,823 ops/sec ±1.30% (87 runs sampled) + minimatch x 52,967 ops/sec ±1.09% (94 runs sampled) + +#11: range + micromatch x 243,471 ops/sec ±0.79% (94 runs sampled) + minimatch x 11,736 ops/sec ±0.82% (96 runs sampled) + +#12: shallow + micromatch x 190,874 ops/sec ±0.98% (95 runs sampled) + minimatch x 21,699 ops/sec ±0.81% (97 runs sampled) + +#13: short + micromatch x 496,393 ops/sec ±3.86% (90 runs sampled) + minimatch x 53,765 ops/sec ±0.75% (95 runs sampled) +``` + +## Tests + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Coverage + +As of July 15, 2016: + +```sh +Statements : 100% (441/441) +Branches : 100% (270/270) +Functions : 100% (54/54) +Lines : 100% (429/429) +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please be sure to run the benchmarks before/after any code changes to judge the impact before you do a PR. thanks! + +## Related + +* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.") +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.") +* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.") +* [gulp-micromatch](https://www.npmjs.com/package/gulp-micromatch): Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream. | [homepage](https://github.com/tunnckocore/gulp-micromatch#readme "Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [parse-glob](https://www.npmjs.com/package/parse-glob): Parse a glob pattern into an object of tokens. | [homepage](https://github.com/jonschlinkert/parse-glob "Parse a glob pattern into an object of tokens.") + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +## Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/micromatch/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 15, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/index.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/index.js new file mode 100755 index 00000000000..f898ec176ba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/index.js @@ -0,0 +1,431 @@ +/*! + * micromatch + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var expand = require('./lib/expand'); +var utils = require('./lib/utils'); + +/** + * The main function. Pass an array of filepaths, + * and a string or array of glob patterns + * + * @param {Array|String} `files` + * @param {Array|String} `patterns` + * @param {Object} `opts` + * @return {Array} Array of matches + */ + +function micromatch(files, patterns, opts) { + if (!files || !patterns) return []; + opts = opts || {}; + + if (typeof opts.cache === 'undefined') { + opts.cache = true; + } + + if (!Array.isArray(patterns)) { + return match(files, patterns, opts); + } + + var len = patterns.length, i = 0; + var omit = [], keep = []; + + while (len--) { + var glob = patterns[i++]; + if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, match(files, glob.slice(1), opts)); + } else { + keep.push.apply(keep, match(files, glob, opts)); + } + } + return utils.diff(keep, omit); +} + +/** + * Return an array of files that match the given glob pattern. + * + * This function is called by the main `micromatch` function If you only + * need to pass a single pattern you might get very minor speed improvements + * using this function. + * + * @param {Array} `files` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Array} + */ + +function match(files, pattern, opts) { + if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { + throw new Error(msg('match', 'files', 'a string or array')); + } + + files = utils.arrayify(files); + opts = opts || {}; + + var negate = opts.negate || false; + var orig = pattern; + + if (typeof pattern === 'string') { + negate = pattern.charAt(0) === '!'; + if (negate) { + pattern = pattern.slice(1); + } + + // we need to remove the character regardless, + // so the above logic is still needed + if (opts.nonegate === true) { + negate = false; + } + } + + var _isMatch = matcher(pattern, opts); + var len = files.length, i = 0; + var res = []; + + while (i < len) { + var file = files[i++]; + var fp = utils.unixify(file, opts); + + if (!_isMatch(fp)) { continue; } + res.push(fp); + } + + if (res.length === 0) { + if (opts.failglob === true) { + throw new Error('micromatch.match() found no matches for: "' + orig + '".'); + } + + if (opts.nonull || opts.nullglob) { + res.push(utils.unescapeGlob(orig)); + } + } + + // if `negate` was defined, diff negated files + if (negate) { res = utils.diff(files, res); } + + // if `ignore` was defined, diff ignored filed + if (opts.ignore && opts.ignore.length) { + pattern = opts.ignore; + opts = utils.omit(opts, ['ignore']); + res = utils.diff(res, micromatch(res, pattern, opts)); + } + + if (opts.nodupes) { + return utils.unique(res); + } + return res; +} + +/** + * Returns a function that takes a glob pattern or array of glob patterns + * to be used with `Array#filter()`. (Internally this function generates + * the matching function using the [matcher] method). + * + * ```js + * var fn = mm.filter('[a-c]'); + * ['a', 'b', 'c', 'd', 'e'].filter(fn); + * //=> ['a', 'b', 'c'] + * ``` + * @param {String|Array} `patterns` Can be a glob or array of globs. + * @param {Options} `opts` Options to pass to the [matcher] method. + * @return {Function} Filter function to be passed to `Array#filter()`. + */ + +function filter(patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('filter', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length, i = 0; + var patternMatchers = Array(len); + while (i < len) { + patternMatchers[i] = matcher(patterns[i++], opts); + } + + return function(fp) { + if (fp == null) return []; + var len = patternMatchers.length, i = 0; + var res = true; + + fp = utils.unixify(fp, opts); + while (i < len) { + var fn = patternMatchers[i++]; + if (!fn(fp)) { + res = false; + break; + } + } + return res; + }; +} + +/** + * Returns true if the filepath contains the given + * pattern. Can also return a function for matching. + * + * ```js + * isMatch('foo.md', '*.md', {}); + * //=> true + * + * isMatch('*.md', {})('foo.md') + * //=> true + * ``` + * @param {String} `fp` + * @param {String} `pattern` + * @param {Object} `opts` + * @return {Boolean} + */ + +function isMatch(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('isMatch', 'filepath', 'a string')); + } + + fp = utils.unixify(fp, opts); + if (utils.typeOf(pattern) === 'object') { + return matcher(fp, pattern); + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if the filepath matches the + * given pattern. + */ + +function contains(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('contains', 'pattern', 'a string')); + } + + opts = opts || {}; + opts.contains = (pattern !== ''); + fp = utils.unixify(fp, opts); + + if (opts.contains && !utils.isGlob(pattern)) { + return fp.indexOf(pattern) !== -1; + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if a file path matches any of the + * given patterns. + * + * @param {String} `fp` The filepath to test. + * @param {String|Array} `patterns` Glob patterns to use. + * @param {Object} `opts` Options to pass to the `matcher()` function. + * @return {String} + */ + +function any(fp, patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('any', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length; + + fp = utils.unixify(fp, opts); + while (len--) { + var isMatch = matcher(patterns[len], opts); + if (isMatch(fp)) { + return true; + } + } + return false; +} + +/** + * Filter the keys of an object with the given `glob` pattern + * and `options` + * + * @param {Object} `object` + * @param {Pattern} `object` + * @return {Array} + */ + +function matchKeys(obj, glob, options) { + if (utils.typeOf(obj) !== 'object') { + throw new TypeError(msg('matchKeys', 'first argument', 'an object')); + } + + var fn = matcher(glob, options); + var res = {}; + + for (var key in obj) { + if (obj.hasOwnProperty(key) && fn(key)) { + res[key] = obj[key]; + } + } + return res; +} + +/** + * Return a function for matching based on the + * given `pattern` and `options`. + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {Function} + */ + +function matcher(pattern, opts) { + // pattern is a function + if (typeof pattern === 'function') { + return pattern; + } + // pattern is a regex + if (pattern instanceof RegExp) { + return function(fp) { + return pattern.test(fp); + }; + } + + if (typeof pattern !== 'string') { + throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); + } + + // strings, all the way down... + pattern = utils.unixify(pattern, opts); + + // pattern is a non-glob string + if (!utils.isGlob(pattern)) { + return utils.matchPath(pattern, opts); + } + // pattern is a glob string + var re = makeRe(pattern, opts); + + // `matchBase` is defined + if (opts && opts.matchBase) { + return utils.hasFilename(re, opts); + } + // `matchBase` is not defined + return function(fp) { + fp = utils.unixify(fp, opts); + return re.test(fp); + }; +} + +/** + * Create and cache a regular expression for matching + * file paths. + * + * If the leading character in the `glob` is `!`, a negation + * regex is returned. + * + * @param {String} `glob` + * @param {Object} `options` + * @return {RegExp} + */ + +function toRegex(glob, options) { + // clone options to prevent mutating the original object + var opts = Object.create(options || {}); + var flags = opts.flags || ''; + if (opts.nocase && flags.indexOf('i') === -1) { + flags += 'i'; + } + + var parsed = expand(glob, opts); + + // pass in tokens to avoid parsing more than once + opts.negated = opts.negated || parsed.negated; + opts.negate = opts.negated; + glob = wrapGlob(parsed.pattern, opts); + var re; + + try { + re = new RegExp(glob, flags); + return re; + } catch (err) { + err.reason = 'micromatch invalid regex: (' + re + ')'; + if (opts.strict) throw new SyntaxError(err); + } + + // we're only here if a bad pattern was used and the user + // passed `options.silent`, so match nothing + return /$^/; +} + +/** + * Create the regex to do the matching. If the leading + * character in the `glob` is `!` a negation regex is returned. + * + * @param {String} `glob` + * @param {Boolean} `negate` + */ + +function wrapGlob(glob, opts) { + var prefix = (opts && !opts.contains) ? '^' : ''; + var after = (opts && !opts.contains) ? '$' : ''; + glob = ('(?:' + glob + ')' + after); + if (opts && opts.negate) { + return prefix + ('(?!^' + glob + ').*$'); + } + return prefix + glob; +} + +/** + * Create and cache a regular expression for matching file paths. + * If the leading character in the `glob` is `!`, a negation + * regex is returned. + * + * @param {String} `glob` + * @param {Object} `options` + * @return {RegExp} + */ + +function makeRe(glob, opts) { + if (utils.typeOf(glob) !== 'string') { + throw new Error(msg('makeRe', 'glob', 'a string')); + } + return utils.cache(toRegex, glob, opts); +} + +/** + * Make error messages consistent. Follows this format: + * + * ```js + * msg(methodName, argNumber, nativeType); + * // example: + * msg('matchKeys', 'first', 'an object'); + * ``` + * + * @param {String} `method` + * @param {String} `num` + * @param {String} `type` + * @return {String} + */ + +function msg(method, what, type) { + return 'micromatch.' + method + '(): ' + what + ' should be ' + type + '.'; +} + +/** + * Public methods + */ + +/* eslint no-multi-spaces: 0 */ +micromatch.any = any; +micromatch.braces = micromatch.braceExpand = utils.braces; +micromatch.contains = contains; +micromatch.expand = expand; +micromatch.filter = filter; +micromatch.isMatch = isMatch; +micromatch.makeRe = makeRe; +micromatch.match = match; +micromatch.matcher = matcher; +micromatch.matchKeys = matchKeys; + +/** + * Expose `micromatch` + */ + +module.exports = micromatch; diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js new file mode 100644 index 00000000000..a1ffe371418 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js @@ -0,0 +1,67 @@ +'use strict'; + +var chars = {}, unesc, temp; + +function reverse(object, prepender) { + return Object.keys(object).reduce(function(reversed, key) { + var newKey = prepender ? prepender + key : key; // Optionally prepend a string to key. + reversed[object[key]] = newKey; // Swap key and value. + return reversed; // Return the result. + }, {}); +} + +/** + * Regex for common characters + */ + +chars.escapeRegex = { + '?': /\?/g, + '@': /\@/g, + '!': /\!/g, + '+': /\+/g, + '*': /\*/g, + '(': /\(/g, + ')': /\)/g, + '[': /\[/g, + ']': /\]/g +}; + +/** + * Escape characters + */ + +chars.ESC = { + '?': '__UNESC_QMRK__', + '@': '__UNESC_AMPE__', + '!': '__UNESC_EXCL__', + '+': '__UNESC_PLUS__', + '*': '__UNESC_STAR__', + ',': '__UNESC_COMMA__', + '(': '__UNESC_LTPAREN__', + ')': '__UNESC_RTPAREN__', + '[': '__UNESC_LTBRACK__', + ']': '__UNESC_RTBRACK__' +}; + +/** + * Unescape characters + */ + +chars.UNESC = unesc || (unesc = reverse(chars.ESC, '\\')); + +chars.ESC_TEMP = { + '?': '__TEMP_QMRK__', + '@': '__TEMP_AMPE__', + '!': '__TEMP_EXCL__', + '*': '__TEMP_STAR__', + '+': '__TEMP_PLUS__', + ',': '__TEMP_COMMA__', + '(': '__TEMP_LTPAREN__', + ')': '__TEMP_RTPAREN__', + '[': '__TEMP_LTBRACK__', + ']': '__TEMP_RTBRACK__' +}; + +chars.TEMP = temp || (temp = reverse(chars.ESC_TEMP)); + +module.exports = chars; diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js new file mode 100644 index 00000000000..e99b081eb56 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js @@ -0,0 +1,304 @@ +/*! + * micromatch + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var utils = require('./utils'); +var Glob = require('./glob'); + +/** + * Expose `expand` + */ + +module.exports = expand; + +/** + * Expand a glob pattern to resolve braces and + * similar patterns before converting to regex. + * + * @param {String|Array} `pattern` + * @param {Array} `files` + * @param {Options} `opts` + * @return {Array} + */ + +function expand(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('micromatch.expand(): argument should be a string.'); + } + + var glob = new Glob(pattern, options || {}); + var opts = glob.options; + + if (!utils.isGlob(pattern)) { + glob.pattern = glob.pattern.replace(/([\/.])/g, '\\$1'); + return glob; + } + + glob.pattern = glob.pattern.replace(/(\+)(?!\()/g, '\\$1'); + glob.pattern = glob.pattern.split('$').join('\\$'); + + if (typeof opts.braces !== 'boolean' && typeof opts.nobraces !== 'boolean') { + opts.braces = true; + } + + if (glob.pattern === '.*') { + return { + pattern: '\\.' + star, + tokens: tok, + options: opts + }; + } + + if (glob.pattern === '*') { + return { + pattern: oneStar(opts.dot), + tokens: tok, + options: opts + }; + } + + // parse the glob pattern into tokens + glob.parse(); + var tok = glob.tokens; + tok.is.negated = opts.negated; + + // dotfile handling + if ((opts.dotfiles === true || tok.is.dotfile) && opts.dot !== false) { + opts.dotfiles = true; + opts.dot = true; + } + + if ((opts.dotdirs === true || tok.is.dotdir) && opts.dot !== false) { + opts.dotdirs = true; + opts.dot = true; + } + + // check for braces with a dotfile pattern + if (/[{,]\./.test(glob.pattern)) { + opts.makeRe = false; + opts.dot = true; + } + + if (opts.nonegate !== true) { + opts.negated = glob.negated; + } + + // if the leading character is a dot or a slash, escape it + if (glob.pattern.charAt(0) === '.' && glob.pattern.charAt(1) !== '/') { + glob.pattern = '\\' + glob.pattern; + } + + /** + * Extended globs + */ + + // expand braces, e.g `{1..5}` + glob.track('before braces'); + if (tok.is.braces) { + glob.braces(); + } + glob.track('after braces'); + + // expand extglobs, e.g `foo/!(a|b)` + glob.track('before extglob'); + if (tok.is.extglob) { + glob.extglob(); + } + glob.track('after extglob'); + + // expand brackets, e.g `[[:alpha:]]` + glob.track('before brackets'); + if (tok.is.brackets) { + glob.brackets(); + } + glob.track('after brackets'); + + // special patterns + glob._replace('[!', '[^'); + glob._replace('(?', '(%~'); + glob._replace(/\[\]/, '\\[\\]'); + glob._replace('/[', '/' + (opts.dot ? dotfiles : nodot) + '[', true); + glob._replace('/?', '/' + (opts.dot ? dotfiles : nodot) + '[^/]', true); + glob._replace('/.', '/(?=.)\\.', true); + + // windows drives + glob._replace(/^(\w):([\\\/]+?)/gi, '(?=.)$1:$2', true); + + // negate slashes in exclusion ranges + if (glob.pattern.indexOf('[^') !== -1) { + glob.pattern = negateSlash(glob.pattern); + } + + if (opts.globstar !== false && glob.pattern === '**') { + glob.pattern = globstar(opts.dot); + + } else { + glob.pattern = balance(glob.pattern, '[', ']'); + glob.escape(glob.pattern); + + // if the pattern has `**` + if (tok.is.globstar) { + glob.pattern = collapse(glob.pattern, '/**'); + glob.pattern = collapse(glob.pattern, '**/'); + glob._replace('/**/', '(?:/' + globstar(opts.dot) + '/|/)', true); + glob._replace(/\*{2,}/g, '**'); + + // 'foo/*' + glob._replace(/(\w+)\*(?!\/)/g, '$1[^/]*?', true); + glob._replace(/\*\*\/\*(\w)/g, globstar(opts.dot) + '\\/' + (opts.dot ? dotfiles : nodot) + '[^/]*?$1', true); + + if (opts.dot !== true) { + glob._replace(/\*\*\/(.)/g, '(?:**\\/|)$1'); + } + + // 'foo/**' or '{**,*}', but not 'foo**' + if (tok.path.dirname !== '' || /,\*\*|\*\*,/.test(glob.orig)) { + glob._replace('**', globstar(opts.dot), true); + } + } + + // ends with /* + glob._replace(/\/\*$/, '\\/' + oneStar(opts.dot), true); + // ends with *, no slashes + glob._replace(/(?!\/)\*$/, star, true); + // has 'n*.' (partial wildcard w/ file extension) + glob._replace(/([^\/]+)\*/, '$1' + oneStar(true), true); + // has '*' + glob._replace('*', oneStar(opts.dot), true); + glob._replace('?.', '?\\.', true); + glob._replace('?:', '?:', true); + + glob._replace(/\?+/g, function(match) { + var len = match.length; + if (len === 1) { + return qmark; + } + return qmark + '{' + len + '}'; + }); + + // escape '.abc' => '\\.abc' + glob._replace(/\.([*\w]+)/g, '\\.$1'); + // fix '[^\\\\/]' + glob._replace(/\[\^[\\\/]+\]/g, qmark); + // '///' => '\/' + glob._replace(/\/+/g, '\\/'); + // '\\\\\\' => '\\' + glob._replace(/\\{2,}/g, '\\'); + } + + // unescape previously escaped patterns + glob.unescape(glob.pattern); + glob._replace('__UNESC_STAR__', '*'); + + // escape dots that follow qmarks + glob._replace('?.', '?\\.'); + + // remove unnecessary slashes in character classes + glob._replace('[^\\/]', qmark); + + if (glob.pattern.length > 1) { + if (/^[\[?*]/.test(glob.pattern)) { + // only prepend the string if we don't want to match dotfiles + glob.pattern = (opts.dot ? dotfiles : nodot) + glob.pattern; + } + } + + return glob; +} + +/** + * Collapse repeated character sequences. + * + * ```js + * collapse('a/../../../b', '../'); + * //=> 'a/../b' + * ``` + * + * @param {String} `str` + * @param {String} `ch` Character sequence to collapse + * @return {String} + */ + +function collapse(str, ch) { + var res = str.split(ch); + var isFirst = res[0] === ''; + var isLast = res[res.length - 1] === ''; + res = res.filter(Boolean); + if (isFirst) res.unshift(''); + if (isLast) res.push(''); + return res.join(ch); +} + +/** + * Negate slashes in exclusion ranges, per glob spec: + * + * ```js + * negateSlash('[^foo]'); + * //=> '[^\\/foo]' + * ``` + * + * @param {String} `str` glob pattern + * @return {String} + */ + +function negateSlash(str) { + return str.replace(/\[\^([^\]]*?)\]/g, function(match, inner) { + if (inner.indexOf('/') === -1) { + inner = '\\/' + inner; + } + return '[^' + inner + ']'; + }); +} + +/** + * Escape imbalanced braces/bracket. This is a very + * basic, naive implementation that only does enough + * to serve the purpose. + */ + +function balance(str, a, b) { + var aarr = str.split(a); + var alen = aarr.join('').length; + var blen = str.split(b).join('').length; + + if (alen !== blen) { + str = aarr.join('\\' + a); + return str.split(b).join('\\' + b); + } + return str; +} + +/** + * Special patterns to be converted to regex. + * Heuristics are used to simplify patterns + * and speed up processing. + */ + +/* eslint no-multi-spaces: 0 */ +var qmark = '[^/]'; +var star = qmark + '*?'; +var nodot = '(?!\\.)(?=.)'; +var dotfileGlob = '(?:\\/|^)\\.{1,2}($|\\/)'; +var dotfiles = '(?!' + dotfileGlob + ')(?=.)'; +var twoStarDot = '(?:(?!' + dotfileGlob + ').)*?'; + +/** + * Create a regex for `*`. + * + * If `dot` is true, or the pattern does not begin with + * a leading star, then return the simpler regex. + */ + +function oneStar(dotfile) { + return dotfile ? '(?!' + dotfileGlob + ')(?=.)' + star : (nodot + star); +} + +function globstar(dotfile) { + if (dotfile) { return twoStarDot; } + return '(?:(?!(?:\\/|^)\\.).)*?'; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js new file mode 100644 index 00000000000..c613326736c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js @@ -0,0 +1,193 @@ +'use strict'; + +var chars = require('./chars'); +var utils = require('./utils'); + +/** + * Expose `Glob` + */ + +var Glob = module.exports = function Glob(pattern, options) { + if (!(this instanceof Glob)) { + return new Glob(pattern, options); + } + this.options = options || {}; + this.pattern = pattern; + this.history = []; + this.tokens = {}; + this.init(pattern); +}; + +/** + * Initialize defaults + */ + +Glob.prototype.init = function(pattern) { + this.orig = pattern; + this.negated = this.isNegated(); + this.options.track = this.options.track || false; + this.options.makeRe = true; +}; + +/** + * Push a change into `glob.history`. Useful + * for debugging. + */ + +Glob.prototype.track = function(msg) { + if (this.options.track) { + this.history.push({msg: msg, pattern: this.pattern}); + } +}; + +/** + * Return true if `glob.pattern` was negated + * with `!`, also remove the `!` from the pattern. + * + * @return {Boolean} + */ + +Glob.prototype.isNegated = function() { + if (this.pattern.charCodeAt(0) === 33 /* '!' */) { + this.pattern = this.pattern.slice(1); + return true; + } + return false; +}; + +/** + * Expand braces in the given glob pattern. + * + * We only need to use the [braces] lib when + * patterns are nested. + */ + +Glob.prototype.braces = function() { + if (this.options.nobraces !== true && this.options.nobrace !== true) { + // naive/fast check for imbalanced characters + var a = this.pattern.match(/[\{\(\[]/g); + var b = this.pattern.match(/[\}\)\]]/g); + + // if imbalanced, don't optimize the pattern + if (a && b && (a.length !== b.length)) { + this.options.makeRe = false; + } + + // expand brace patterns and join the resulting array + var expanded = utils.braces(this.pattern, this.options); + this.pattern = expanded.join('|'); + } +}; + +/** + * Expand bracket expressions in `glob.pattern` + */ + +Glob.prototype.brackets = function() { + if (this.options.nobrackets !== true) { + this.pattern = utils.brackets(this.pattern); + } +}; + +/** + * Expand bracket expressions in `glob.pattern` + */ + +Glob.prototype.extglob = function() { + if (this.options.noextglob === true) return; + + if (utils.isExtglob(this.pattern)) { + this.pattern = utils.extglob(this.pattern, {escape: true}); + } +}; + +/** + * Parse the given pattern + */ + +Glob.prototype.parse = function(pattern) { + this.tokens = utils.parseGlob(pattern || this.pattern, true); + return this.tokens; +}; + +/** + * Replace `a` with `b`. Also tracks the change before and + * after each replacement. This is disabled by default, but + * can be enabled by setting `options.track` to true. + * + * Also, when the pattern is a string, `.split()` is used, + * because it's much faster than replace. + * + * @param {RegExp|String} `a` + * @param {String} `b` + * @param {Boolean} `escape` When `true`, escapes `*` and `?` in the replacement. + * @return {String} + */ + +Glob.prototype._replace = function(a, b, escape) { + this.track('before (find): "' + a + '" (replace with): "' + b + '"'); + if (escape) b = esc(b); + if (a && b && typeof a === 'string') { + this.pattern = this.pattern.split(a).join(b); + } else { + this.pattern = this.pattern.replace(a, b); + } + this.track('after'); +}; + +/** + * Escape special characters in the given string. + * + * @param {String} `str` Glob pattern + * @return {String} + */ + +Glob.prototype.escape = function(str) { + this.track('before escape: '); + var re = /["\\](['"]?[^"'\\]['"]?)/g; + + this.pattern = str.replace(re, function($0, $1) { + var o = chars.ESC; + var ch = o && o[$1]; + if (ch) { + return ch; + } + if (/[a-z]/i.test($0)) { + return $0.split('\\').join(''); + } + return $0; + }); + + this.track('after escape: '); +}; + +/** + * Unescape special characters in the given string. + * + * @param {String} `str` + * @return {String} + */ + +Glob.prototype.unescape = function(str) { + var re = /__([A-Z]+)_([A-Z]+)__/g; + this.pattern = str.replace(re, function($0, $1) { + return chars[$1][$0]; + }); + this.pattern = unesc(this.pattern); +}; + +/** + * Escape/unescape utils + */ + +function esc(str) { + str = str.split('?').join('%~'); + str = str.split('*').join('%%'); + return str; +} + +function unesc(str) { + str = str.split('%~').join('?'); + str = str.split('%%').join('*'); + return str; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js new file mode 100644 index 00000000000..7c24a510643 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js @@ -0,0 +1,149 @@ +'use strict'; + +var win32 = process && process.platform === 'win32'; +var path = require('path'); +var fileRe = require('filename-regex'); +var utils = module.exports; + +/** + * Module dependencies + */ + +utils.diff = require('arr-diff'); +utils.unique = require('array-unique'); +utils.braces = require('braces'); +utils.brackets = require('expand-brackets'); +utils.extglob = require('extglob'); +utils.isExtglob = require('is-extglob'); +utils.isGlob = require('is-glob'); +utils.typeOf = require('kind-of'); +utils.normalize = require('normalize-path'); +utils.omit = require('object.omit'); +utils.parseGlob = require('parse-glob'); +utils.cache = require('regex-cache'); + +/** + * Get the filename of a filepath + * + * @param {String} `string` + * @return {String} + */ + +utils.filename = function filename(fp) { + var seg = fp.match(fileRe()); + return seg && seg[0]; +}; + +/** + * Returns a function that returns true if the given + * pattern is the same as a given `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.isPath = function isPath(pattern, opts) { + opts = opts || {}; + return function(fp) { + var unixified = utils.unixify(fp, opts); + if(opts.nocase){ + return pattern.toLowerCase() === unixified.toLowerCase(); + } + return pattern === unixified; + }; +}; + +/** + * Returns a function that returns true if the given + * pattern contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.hasPath = function hasPath(pattern, opts) { + return function(fp) { + return utils.unixify(pattern, opts).indexOf(fp) !== -1; + }; +}; + +/** + * Returns a function that returns true if the given + * pattern matches or contains a `filepath` + * + * @param {String} `pattern` + * @return {Function} + */ + +utils.matchPath = function matchPath(pattern, opts) { + var fn = (opts && opts.contains) + ? utils.hasPath(pattern, opts) + : utils.isPath(pattern, opts); + return fn; +}; + +/** + * Returns a function that returns true if the given + * regex matches the `filename` of a file path. + * + * @param {RegExp} `re` + * @return {Boolean} + */ + +utils.hasFilename = function hasFilename(re) { + return function(fp) { + var name = utils.filename(fp); + return name && re.test(name); + }; +}; + +/** + * Coerce `val` to an array + * + * @param {*} val + * @return {Array} + */ + +utils.arrayify = function arrayify(val) { + return !Array.isArray(val) + ? [val] + : val; +}; + +/** + * Normalize all slashes in a file path or glob pattern to + * forward slashes. + */ + +utils.unixify = function unixify(fp, opts) { + if (opts && opts.unixify === false) return fp; + if (opts && opts.unixify === true || win32 || path.sep === '\\') { + return utils.normalize(fp, false); + } + if (opts && opts.unescape === true) { + return fp ? fp.toString().replace(/\\(\w)/g, '$1') : ''; + } + return fp; +}; + +/** + * Escape/unescape utils + */ + +utils.escapePath = function escapePath(fp) { + return fp.replace(/[\\.]/g, '\\$&'); +}; + +utils.unescapeGlob = function unescapeGlob(fp) { + return fp.replace(/[\\"']/g, ''); +}; + +utils.escapeRe = function escapeRe(str) { + return str.replace(/[-[\\$*+?.#^\s{}(|)\]]/g, '\\$&'); +}; + +/** + * Expose `utils` + */ + +module.exports = utils; diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/package.json b/src/filesystem/impls/appshell/node/node_modules/micromatch/package.json new file mode 100644 index 00000000000..357f6a92379 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/micromatch/package.json @@ -0,0 +1,180 @@ +{ + "_args": [ + [ + "micromatch@^2.1.5", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch" + ] + ], + "_from": "micromatch@>=2.1.5 <3.0.0", + "_id": "micromatch@2.3.11", + "_inCache": true, + "_installable": true, + "_location": "/micromatch", + "_nodeVersion": "6.3.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/micromatch-2.3.11.tgz_1468602931475_0.3629888044670224" + }, + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "name": "micromatch", + "raw": "micromatch@^2.1.5", + "rawSpec": "^2.1.5", + "scope": null, + "spec": ">=2.1.5 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/anymatch" + ], + "_resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "_shasum": "86677c97d1720b363431d04d0d15293bd38c1565", + "_shrinkwrap": null, + "_spec": "micromatch@^2.1.5", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/micromatch/issues" + }, + "dependencies": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.", + "devDependencies": { + "benchmarked": "^0.1.4", + "chalk": "^1.1.1", + "gulp": "^3.9.0", + "gulp-eslint": "^1.1.1", + "gulp-format-md": "^0.1.8", + "gulp-istanbul": "^0.10.1", + "gulp-mocha": "^2.1.3", + "minimatch": "^3.0.0", + "minimist": "^1.2.0", + "mocha": "^2", + "multimatch": "^2.0.0", + "should": "^8", + "write": "^0.2.1" + }, + "directories": {}, + "dist": { + "shasum": "86677c97d1720b363431d04d0d15293bd38c1565", + "tarball": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "f194c187d04677b03047bb7d8d25643725f7a577", + "homepage": "https://github.com/jonschlinkert/micromatch", + "keywords": [ + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "minimatch", + "multimatch", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + }, + { + "email": "elan.shanker+npm@gmail.com", + "name": "es128" + } + ], + "name": "micromatch", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/micromatch.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "layout": false, + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "braces", + "expand-brackets", + "extglob", + "minimatch", + "multimatch", + "verb" + ], + "related": { + "list": [ + "braces", + "expand-brackets", + "expand-range", + "extglob", + "fill-range", + "gulp-micromatch", + "is-glob", + "parse-glob" + ] + }, + "tasks": [ + "readme" + ], + "toc": false + }, + "version": "2.3.11" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/README.md b/src/filesystem/impls/appshell/node/node_modules/minimatch/README.md new file mode 100644 index 00000000000..ad72b8133ea --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/minimatch/README.md @@ -0,0 +1,209 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js b/src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js new file mode 100644 index 00000000000..830a27246cd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js @@ -0,0 +1,924 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/package.json b/src/filesystem/impls/appshell/node/node_modules/minimatch/package.json new file mode 100644 index 00000000000..f5addbba30b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/minimatch/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "minimatch@^3.0.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" + ] + ], + "_from": "minimatch@>=3.0.2 <4.0.0", + "_id": "minimatch@3.0.2", + "_inCache": true, + "_installable": true, + "_location": "/minimatch", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957" + }, + "_npmUser": { + "email": "i@izs.me", + "name": "isaacs" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "name": "minimatch", + "raw": "minimatch@^3.0.2", + "rawSpec": "^3.0.2", + "scope": null, + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/readdirp" + ], + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz", + "_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", + "_shrinkwrap": null, + "_spec": "minimatch@^3.0.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "description": "a glob matcher in javascript", + "devDependencies": { + "standard": "^3.7.2", + "tap": "^5.6.0" + }, + "directories": {}, + "dist": { + "shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", + "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "minimatch.js" + ], + "gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0", + "homepage": "https://github.com/isaacs/minimatch#readme", + "license": "ISC", + "main": "minimatch.js", + "maintainers": [ + { + "email": "i@izs.me", + "name": "isaacs" + } + ], + "name": "minimatch", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" + }, + "version": "3.0.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md new file mode 100644 index 00000000000..2519fbc4009 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md @@ -0,0 +1,430 @@ +# NAN ChangeLog + +**Version 2.4.0: current Node 6.3.0, Node 12: 0.12.15, Node 10: 0.10.46, iojs: 3.3.1** + +### 2.4.0 Jul 10 2016 + + - Feature: Rewrite Callback to add Callback::Reset c4cf44d61f8275cd5f7b0c911d7a806d4004f649 + - Feature: AsyncProgressWorker: add template types for .send 1242c9a11a7ed481c8f08ec06316385cacc513d0 + - Bugfix: Add constness to old Persistent comparison operators bd43cb9982c7639605d60fd073efe8cae165d9b2 + +### 2.3.5 May 31 2016 + + - Bugfix: Replace NAN_INLINE with 'inline' keyword. 71819d8725f822990f439479c9aba3b240804909 + +### 2.3.4 May 31 2016 + + - Bugfix: Remove V8 deprecation warnings 0592fb0a47f3a1c7763087ebea8e1138829f24f9 + - Bugfix: Fix new versions not to use WeakCallbackInfo::IsFirstPass 615c19d9e03d4be2049c10db0151edbc3b229246 + - Bugfix: Make ObjectWrap::handle() const d19af99595587fe7a26bd850af6595c2a7145afc + - Bugfix: Fix compilation errors related to 0592fb0a47f3a1c7763087ebea8e1138829f24f9 e9191c525b94f652718325e28610a1adcf90fed8 + +### 2.3.3 May 4 2016 + + - Bugfix: Refactor SetMethod() to deal with v8::Templates (#566) b9083cf6d5de6ebe6bcb49c7502fbb7c0d9ddda8 + +### 2.3.2 Apr 27 2016 + + - Bugfix: Fix compilation on outdated versions due to Handle removal f8b7c875d04d425a41dfd4f3f8345bc3a11e6c52 + +### 2.3.1 Apr 27 2016 + + - Bugfix: Don't use deprecated v8::Template::Set() in SetMethod a90951e9ea70fa1b3836af4b925322919159100e + +### 2.3.0 Apr 27 2016 + + - Feature: added Signal() for invoking async callbacks without sending data from AsyncProgressWorker d8adba45f20e077d00561b20199133620c990b38 + - Bugfix: Don't use deprecated v8::Template::Set() 00dacf0a4b86027415867fa7f1059acc499dcece + +### 2.2.1 Mar 29 2016 + + - Bugfix: Use NewFromUnsigned in ReturnValue::Set(uint32_t i) for pre_12 3a18f9bdce29826e0e4c217854bc476918241a58 + - Performance: Remove unneeeded nullptr checks b715ef44887931c94f0d1605b3b1a4156eebece9 + +### 2.2.0 Jan 9 2016 + + - Feature: Add Function::Call wrapper 4c157474dacf284d125c324177b45aa5dabc08c6 + - Feature: Rename GC*logueCallback to GCCallback for > 4.0 3603435109f981606d300eb88004ca101283acec + - Bugfix: Fix Global::Pass for old versions 367e82a60fbaa52716232cc89db1cc3f685d77d9 + - Bugfix: Remove weird MaybeLocal wrapping of what already is a MaybeLocal 23b4590db10c2ba66aee2338aebe9751c4cb190b + +### 2.1.0 Oct 8 2015 + + - Deprecation: Deprecate NanErrnoException in favor of ErrnoException 0af1ca4cf8b3f0f65ed31bc63a663ab3319da55c + - Feature: added helper class for accessing contents of typedarrays 17b51294c801e534479d5463697a73462d0ca555 + - Feature: [Maybe types] Add MakeMaybe(...) 48d7b53d9702b0c7a060e69ea10fea8fb48d814d + - Feature: new: allow utf16 string with length 66ac6e65c8ab9394ef588adfc59131b3b9d8347b + - Feature: Introduce SetCallHandler and SetCallAsFunctionHandler 7764a9a115d60ba10dc24d86feb0fbc9b4f75537 + - Bugfix: Enable creating Locals from Globals under Node 0.10. 9bf9b8b190821af889790fdc18ace57257e4f9ff + - Bugfix: Fix issue #462 where PropertyCallbackInfo data is not stored safely. 55f50adedd543098526c7b9f4fffd607d3f9861f + +### 2.0.9 Sep 8 2015 + + - Bugfix: EscapableHandleScope in Nan::NewBuffer for Node 0.8 and 0.10 b1654d7 + +### 2.0.8 Aug 28 2015 + + - Work around duplicate linking bug in clang 11902da + +### 2.0.7 Aug 26 2015 + + - Build: Repackage + +### 2.0.6 Aug 26 2015 + + - Bugfix: Properly handle null callback in FunctionTemplate factory 6e99cb1 + - Bugfix: Remove unused static std::map instances 525bddc + - Bugfix: Make better use of maybe versions of APIs bfba85b + - Bugfix: Fix shadowing issues with handle in ObjectWrap 0a9072d + +### 2.0.5 Aug 10 2015 + + - Bugfix: Reimplement weak callback in ObjectWrap 98d38c1 + - Bugfix: Make sure callback classes are not assignable, copyable or movable 81f9b1d + +### 2.0.4 Aug 6 2015 + + - Build: Repackage + +### 2.0.3 Aug 6 2015 + + - Bugfix: Don't use clang++ / g++ syntax extension. 231450e + +### 2.0.2 Aug 6 2015 + + - Build: Repackage + +### 2.0.1 Aug 6 2015 + + - Bugfix: Add workaround for missing REPLACE_INVALID_UTF8 60d6687 + - Bugfix: Reimplement ObjectWrap from scratch to prevent memory leaks 6484601 + - Bugfix: Fix Persistent leak in FunctionCallbackInfo and PropertyCallbackInfo 641ef5f + - Bugfix: Add missing overload for Nan::NewInstance that takes argc/argv 29450ed + +### 2.0.0 Jul 31 2015 + + - Change: Renamed identifiers with leading underscores b5932b4 + - Change: Replaced NanObjectWrapHandle with class NanObjectWrap 464f1e1 + - Change: Replace NanScope and NanEscpableScope macros with classes 47751c4 + - Change: Rename NanNewBufferHandle to NanNewBuffer 6745f99 + - Change: Rename NanBufferUse to NanNewBuffer 3e8b0a5 + - Change: Rename NanNewBuffer to NanCopyBuffer d6af78d + - Change: Remove Nan prefix from all names 72d1f67 + - Change: Update Buffer API for new upstream changes d5d3291 + - Change: Rename Scope and EscapableScope to HandleScope and EscapableHandleScope 21a7a6a + - Change: Get rid of Handles e6c0daf + - Feature: Support io.js 3 with V8 4.4 + - Feature: Introduce NanPersistent 7fed696 + - Feature: Introduce NanGlobal 4408da1 + - Feature: Added NanTryCatch 10f1ca4 + - Feature: Update for V8 v4.3 4b6404a + - Feature: Introduce NanNewOneByteString c543d32 + - Feature: Introduce namespace Nan 67ed1b1 + - Removal: Remove NanLocker and NanUnlocker dd6e401 + - Removal: Remove string converters, except NanUtf8String, which now follows the node implementation b5d00a9 + - Removal: Remove NanReturn* macros d90a25c + - Removal: Remove HasInstance e8f84fe + + +### 1.9.0 Jul 31 2015 + + - Feature: Added `NanFatalException` 81d4a2c + - Feature: Added more error types 4265f06 + - Feature: Added dereference and function call operators to NanCallback c4b2ed0 + - Feature: Added indexed GetFromPersistent and SaveToPersistent edd510c + - Feature: Added more overloads of SaveToPersistent and GetFromPersistent 8b1cef6 + - Feature: Added NanErrnoException dd87d9e + - Correctness: Prevent assign, copy, and move for classes that do not support it 1f55c59, 4b808cb, c96d9b2, fba4a29, 3357130 + - Deprecation: Deprecate `NanGetPointerSafe` and `NanSetPointerSafe` 81d4a2c + - Deprecation: Deprecate `NanBooleanOptionValue` and `NanUInt32OptionValue` 0ad254b + +### 1.8.4 Apr 26 2015 + + - Build: Repackage + +### 1.8.3 Apr 26 2015 + + - Bugfix: Include missing header 1af8648 + +### 1.8.2 Apr 23 2015 + + - Build: Repackage + +### 1.8.1 Apr 23 2015 + + - Bugfix: NanObjectWrapHandle should take a pointer 155f1d3 + +### 1.8.0 Apr 23 2015 + + - Feature: Allow primitives with NanReturnValue 2e4475e + - Feature: Added comparison operators to NanCallback 55b075e + - Feature: Backport thread local storage 15bb7fa + - Removal: Remove support for signatures with arguments 8a2069d + - Correcteness: Replaced NanObjectWrapHandle macro with function 0bc6d59 + +### 1.7.0 Feb 28 2015 + + - Feature: Made NanCallback::Call accept optional target 8d54da7 + - Feature: Support atom-shell 0.21 0b7f1bb + +### 1.6.2 Feb 6 2015 + + - Bugfix: NanEncode: fix argument type for node::Encode on io.js 2be8639 + +### 1.6.1 Jan 23 2015 + + - Build: version bump + +### 1.5.3 Jan 23 2015 + + - Build: repackage + +### 1.6.0 Jan 23 2015 + + - Deprecated `NanNewContextHandle` in favor of `NanNew` 49259af + - Support utility functions moved in newer v8 versions (Node 0.11.15, io.js 1.0) a0aa179 + - Added `NanEncode`, `NanDecodeBytes` and `NanDecodeWrite` 75e6fb9 + +### 1.5.2 Jan 23 2015 + + - Bugfix: Fix non-inline definition build error with clang++ 21d96a1, 60fadd4 + - Bugfix: Readded missing String constructors 18d828f + - Bugfix: Add overload handling NanNew(..) 5ef813b + - Bugfix: Fix uv_work_cb versioning 997e4ae + - Bugfix: Add function factory and test 4eca89c + - Bugfix: Add object template factory and test cdcb951 + - Correctness: Lifted an io.js related typedef c9490be + - Correctness: Make explicit downcasts of String lengths 00074e6 + - Windows: Limit the scope of disabled warning C4530 83d7deb + +### 1.5.1 Jan 15 2015 + + - Build: version bump + +### 1.4.3 Jan 15 2015 + + - Build: version bump + +### 1.4.2 Jan 15 2015 + + - Feature: Support io.js 0dbc5e8 + +### 1.5.0 Jan 14 2015 + + - Feature: Support io.js b003843 + - Correctness: Improved NanNew internals 9cd4f6a + - Feature: Implement progress to NanAsyncWorker 8d6a160 + +### 1.4.1 Nov 8 2014 + + - Bugfix: Handle DEBUG definition correctly + - Bugfix: Accept int as Boolean + +### 1.4.0 Nov 1 2014 + + - Feature: Added NAN_GC_CALLBACK 6a5c245 + - Performance: Removed unnecessary local handle creation 18a7243, 41fe2f8 + - Correctness: Added constness to references in NanHasInstance 02c61cd + - Warnings: Fixed spurious warnings from -Wundef and -Wshadow, 541b122, 99d8cb6 + - Windoze: Shut Visual Studio up when compiling 8d558c1 + - License: Switch to plain MIT from custom hacked MIT license 11de983 + - Build: Added test target to Makefile e232e46 + - Performance: Removed superfluous scope in NanAsyncWorker f4b7821 + - Sugar/Feature: Added NanReturnThis() and NanReturnHolder() shorthands 237a5ff, d697208 + - Feature: Added suitable overload of NanNew for v8::Integer::NewFromUnsigned b27b450 + +### 1.3.0 Aug 2 2014 + + - Added NanNew(std::string) + - Added NanNew(std::string&) + - Added NanAsciiString helper class + - Added NanUtf8String helper class + - Added NanUcs2String helper class + - Deprecated NanRawString() + - Deprecated NanCString() + - Added NanGetIsolateData(v8::Isolate *isolate) + - Added NanMakeCallback(v8::Handle target, v8::Handle func, int argc, v8::Handle* argv) + - Added NanMakeCallback(v8::Handle target, v8::Handle symbol, int argc, v8::Handle* argv) + - Added NanMakeCallback(v8::Handle target, const char* method, int argc, v8::Handle* argv) + - Added NanSetTemplate(v8::Handle templ, v8::Handle name , v8::Handle value, v8::PropertyAttribute attributes) + - Added NanSetPrototypeTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) + - Added NanSetInstanceTemplate(v8::Local templ, const char *name, v8::Handle value) + - Added NanSetInstanceTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) + +### 1.2.0 Jun 5 2014 + + - Add NanSetPrototypeTemplate + - Changed NAN_WEAK_CALLBACK internals, switched _NanWeakCallbackData to class, + introduced _NanWeakCallbackDispatcher + - Removed -Wno-unused-local-typedefs from test builds + - Made test builds Windows compatible ('Sleep()') + +### 1.1.2 May 28 2014 + + - Release to fix more stuff-ups in 1.1.1 + +### 1.1.1 May 28 2014 + + - Release to fix version mismatch in nan.h and lack of changelog entry for 1.1.0 + +### 1.1.0 May 25 2014 + + - Remove nan_isolate, use v8::Isolate::GetCurrent() internally instead + - Additional explicit overloads for NanNew(): (char*,int), (uint8_t*[,int]), + (uint16_t*[,int), double, int, unsigned int, bool, v8::String::ExternalStringResource*, + v8::String::ExternalAsciiStringResource* + - Deprecate NanSymbol() + - Added SetErrorMessage() and ErrorMessage() to NanAsyncWorker + +### 1.0.0 May 4 2014 + + - Heavy API changes for V8 3.25 / Node 0.11.13 + - Use cpplint.py + - Removed NanInitPersistent + - Removed NanPersistentToLocal + - Removed NanFromV8String + - Removed NanMakeWeak + - Removed NanNewLocal + - Removed NAN_WEAK_CALLBACK_OBJECT + - Removed NAN_WEAK_CALLBACK_DATA + - Introduce NanNew, replaces NanNewLocal, NanPersistentToLocal, adds many overloaded typed versions + - Introduce NanUndefined, NanNull, NanTrue and NanFalse + - Introduce NanEscapableScope and NanEscapeScope + - Introduce NanMakeWeakPersistent (requires a special callback to work on both old and new node) + - Introduce NanMakeCallback for node::MakeCallback + - Introduce NanSetTemplate + - Introduce NanGetCurrentContext + - Introduce NanCompileScript and NanRunScript + - Introduce NanAdjustExternalMemory + - Introduce NanAddGCEpilogueCallback, NanAddGCPrologueCallback, NanRemoveGCEpilogueCallback, NanRemoveGCPrologueCallback + - Introduce NanGetHeapStatistics + - Rename NanAsyncWorker#SavePersistent() to SaveToPersistent() + +### 0.8.0 Jan 9 2014 + + - NanDispose -> NanDisposePersistent, deprecate NanDispose + - Extract _NAN_*_RETURN_TYPE, pull up NAN_*() + +### 0.7.1 Jan 9 2014 + + - Fixes to work against debug builds of Node + - Safer NanPersistentToLocal (avoid reinterpret_cast) + - Speed up common NanRawString case by only extracting flattened string when necessary + +### 0.7.0 Dec 17 2013 + + - New no-arg form of NanCallback() constructor. + - NanCallback#Call takes Handle rather than Local + - Removed deprecated NanCallback#Run method, use NanCallback#Call instead + - Split off _NAN_*_ARGS_TYPE from _NAN_*_ARGS + - Restore (unofficial) Node 0.6 compatibility at NanCallback#Call() + - Introduce NanRawString() for char* (or appropriate void*) from v8::String + (replacement for NanFromV8String) + - Introduce NanCString() for null-terminated char* from v8::String + +### 0.6.0 Nov 21 2013 + + - Introduce NanNewLocal(v8::Handle value) for use in place of + v8::Local::New(...) since v8 started requiring isolate in Node 0.11.9 + +### 0.5.2 Nov 16 2013 + + - Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public + +### 0.5.1 Nov 12 2013 + + - Use node::MakeCallback() instead of direct v8::Function::Call() + +### 0.5.0 Nov 11 2013 + + - Added @TooTallNate as collaborator + - New, much simpler, "include_dirs" for binding.gyp + - Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros + +### 0.4.4 Nov 2 2013 + + - Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+ + +### 0.4.3 Nov 2 2013 + + - Include node_object_wrap.h, removed from node.h for Node 0.11.8. + +### 0.4.2 Nov 2 2013 + + - Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for + Node 0.11.8 release. + +### 0.4.1 Sep 16 2013 + + - Added explicit `#include ` as it was removed from node.h for v0.11.8 + +### 0.4.0 Sep 2 2013 + + - Added NAN_INLINE and NAN_DEPRECATED and made use of them + - Added NanError, NanTypeError and NanRangeError + - Cleaned up code + +### 0.3.2 Aug 30 2013 + + - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent + in NanAsyncWorker + +### 0.3.1 Aug 20 2013 + + - fix "not all control paths return a value" compile warning on some platforms + +### 0.3.0 Aug 19 2013 + + - Made NAN work with NPM + - Lots of fixes to NanFromV8String, pulling in features from new Node core + - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API + - Added optional error number argument for NanThrowError() + - Added NanInitPersistent() + - Added NanReturnNull() and NanReturnEmptyString() + - Added NanLocker and NanUnlocker + - Added missing scopes + - Made sure to clear disposed Persistent handles + - Changed NanAsyncWorker to allocate error messages on the heap + - Changed NanThrowError(Local) to NanThrowError(Handle) + - Fixed leak in NanAsyncWorker when errmsg is used + +### 0.2.2 Aug 5 2013 + + - Fixed usage of undefined variable with node::BASE64 in NanFromV8String() + +### 0.2.1 Aug 5 2013 + + - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for + NanFromV8String() + +### 0.2.0 Aug 5 2013 + + - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR, + NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY + - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS, + _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS, + _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS, + _NAN_PROPERTY_QUERY_ARGS + - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer + - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT, + NAN_WEAK_CALLBACK_DATA, NanMakeWeak + - Renamed THROW_ERROR to _NAN_THROW_ERROR + - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*) + - Added NanBufferUse(char*, uint32_t) + - Added NanNewContextHandle(v8::ExtensionConfiguration*, + v8::Handle, v8::Handle) + - Fixed broken NanCallback#GetFunction() + - Added optional encoding and size arguments to NanFromV8String() + - Added NanGetPointerSafe() and NanSetPointerSafe() + - Added initial test suite (to be expanded) + - Allow NanUInt32OptionValue to convert any Number object + +### 0.1.0 Jul 21 2013 + + - Added `NAN_GETTER`, `NAN_SETTER` + - Added `NanThrowError` with single Local argument + - Added `NanNewBufferHandle` with single uint32_t argument + - Added `NanHasInstance(Persistent&, Handle)` + - Added `Local NanCallback#GetFunction()` + - Added `NanCallback#Call(int, Local[])` + - Deprecated `NanCallback#Run(int, Local[])` in favour of Call diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md b/src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md new file mode 100644 index 00000000000..e4fc4127eb5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md @@ -0,0 +1,13 @@ +The MIT License (MIT) +===================== + +Copyright (c) 2016 NAN contributors +----------------------------------- + +*NAN contributors listed at * + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/README.md b/src/filesystem/impls/appshell/node/node_modules/nan/README.md new file mode 100644 index 00000000000..7f163b6f093 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/README.md @@ -0,0 +1,403 @@ +Native Abstractions for Node.js +=============================== + +**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 4, 5 and 6.** + +***Current version: 2.4.0*** + +*(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* + +[![NPM](https://nodei.co/npm/nan.png?downloads=true&downloadRank=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6&height=3)](https://nodei.co/npm/nan/) + +[![Build Status](https://api.travis-ci.org/nodejs/nan.svg?branch=master)](http://travis-ci.org/nodejs/nan) +[![Build status](https://ci.appveyor.com/api/projects/status/kh73pbm9dsju7fgh)](https://ci.appveyor.com/project/RodVagg/nan) + +Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.12 to 4.0, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle. + +This project also contains some helper utilities that make addon development a bit more pleasant. + + * **[News & Updates](#news)** + * **[Usage](#usage)** + * **[Example](#example)** + * **[API](#api)** + * **[Tests](#tests)** + * **[Governance & Contributing](#governance)** + + +## News & Updates + + +## Usage + +Simply add **NAN** as a dependency in the *package.json* of your Node addon: + +``` bash +$ npm install --save nan +``` + +Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include ` in your *.cpp* files: + +``` python +"include_dirs" : [ + "` when compiling your addon. + + +## Example + +Just getting started with Nan? Take a look at the **[Node Add-on Examples](https://github.com/nodejs/node-addon-examples)**. + +Refer to a [quick-start **Nan** Boilerplate](https://github.com/fcanas/node-native-boilerplate) for a ready-to-go project that utilizes basic Nan functionality. + +For a simpler example, see the **[async pi estimation example](https://github.com/nodejs/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**. + +Yet another example is **[nan-example-eol](https://github.com/CodeCharmLtd/nan-example-eol)**. It shows newline detection implemented as a native addon. + +Also take a look at our comprehensive **[C++ test suite](https://github.com/nodejs/nan/tree/master/test/cpp)** which has a plehora of code snippets for your pasting pleasure. + + +## API + +Additional to the NAN documentation below, please consult: + +* [The V8 Getting Started Guide](https://developers.google.com/v8/get_started) +* [The V8 Embedders Guide](https://developers.google.com/v8/embed) +* [V8 API Documentation](http://v8docs.nodesource.com/) +* [Node Add-on Documentation](https://nodejs.org/api/addons.html) + + + +### JavaScript-accessible methods + +A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://developers.google.com/v8/embed#templates) for further information. + +In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type. + +* **Method argument types** + - Nan::FunctionCallbackInfo + - Nan::PropertyCallbackInfo + - Nan::ReturnValue +* **Method declarations** + - Method declaration + - Getter declaration + - Setter declaration + - Property getter declaration + - Property setter declaration + - Property enumerator declaration + - Property deleter declaration + - Property query declaration + - Index getter declaration + - Index setter declaration + - Index enumerator declaration + - Index deleter declaration + - Index query declaration +* Method and template helpers + - Nan::SetMethod() + - Nan::SetPrototypeMethod() + - Nan::SetAccessor() + - Nan::SetNamedPropertyHandler() + - Nan::SetIndexedPropertyHandler() + - Nan::SetTemplate() + - Nan::SetPrototypeTemplate() + - Nan::SetInstanceTemplate() + - Nan::SetCallHandler() + - Nan::SetCallAsFunctionHandler() + +### Scopes + +A _local handle_ is a pointer to an object. All V8 objects are accessed using handles, they are necessary because of the way the V8 garbage collector works. + +A handle scope can be thought of as a container for any number of handles. When you've finished with your handles, instead of deleting each one individually you can simply delete their scope. + +The creation of `HandleScope` objects is different across the supported versions of V8. Therefore, NAN provides its own implementations that can be used safely across these. + + - Nan::HandleScope + - Nan::EscapableHandleScope + +Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). + +### Persistent references + +An object reference that is independent of any `HandleScope` is a _persistent_ reference. Where a `Local` handle only lives as long as the `HandleScope` in which it was allocated, a `Persistent` handle remains valid until it is explicitly disposed. + +Due to the evolution of the V8 API, it is necessary for NAN to provide a wrapper implementation of the `Persistent` classes to supply compatibility across the V8 versions supported. + + - Nan::PersistentBase & v8::PersistentBase + - Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits + - Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits + - Nan::Persistent + - Nan::Global + - Nan::WeakCallbackInfo + - Nan::WeakCallbackType + +Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). + +### New + +NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8. + + - Nan::New() + - Nan::Undefined() + - Nan::Null() + - Nan::True() + - Nan::False() + - Nan::EmptyString() + + +### Converters + +NAN contains functions that convert `v8::Value`s to other `v8::Value` types and native types. Since type conversion is not guaranteed to succeed, they return `Nan::Maybe` types. These converters can be used in place of `value->ToX()` and `value->XValue()` (where `X` is one of the types, e.g. `Boolean`) in a way that provides a consistent interface across V8 versions. Newer versions of V8 use the new `v8::Maybe` and `v8::MaybeLocal` types for these conversions, older versions don't have this functionality so it is provided by NAN. + + - Nan::To() + +### Maybe Types + +The `Nan::MaybeLocal` and `Nan::Maybe` types are monads that encapsulate `v8::Local` handles that _may be empty_. + +* **Maybe Types** + - Nan::MaybeLocal + - Nan::Maybe + - Nan::Nothing + - Nan::Just +* **Maybe Helpers** + - Nan::Call() + - Nan::ToDetailString() + - Nan::ToArrayIndex() + - Nan::Equals() + - Nan::NewInstance() + - Nan::GetFunction() + - Nan::Set() + - Nan::ForceSet() + - Nan::Get() + - Nan::GetPropertyAttributes() + - Nan::Has() + - Nan::Delete() + - Nan::GetPropertyNames() + - Nan::GetOwnPropertyNames() + - Nan::SetPrototype() + - Nan::ObjectProtoToString() + - Nan::HasOwnProperty() + - Nan::HasRealNamedProperty() + - Nan::HasRealIndexedProperty() + - Nan::HasRealNamedCallbackProperty() + - Nan::GetRealNamedPropertyInPrototypeChain() + - Nan::GetRealNamedProperty() + - Nan::CallAsFunction() + - Nan::CallAsConstructor() + - Nan::GetSourceLine() + - Nan::GetLineNumber() + - Nan::GetStartColumn() + - Nan::GetEndColumn() + - Nan::CloneElementAt() + - Nan::MakeMaybe() + +### Script + +NAN provides a `v8::Script` helpers as the API has changed over the supported versions of V8. + + - Nan::CompileScript() + - Nan::RunScript() + + +### Errors + +NAN includes helpers for creating, throwing and catching Errors as much of this functionality varies across the supported versions of V8 and must be abstracted. + +Note that an Error object is simply a specialized form of `v8::Value`. + +Also consult the V8 Embedders Guide section on [Exceptions](https://developers.google.com/v8/embed#exceptions) for more information. + + - Nan::Error() + - Nan::RangeError() + - Nan::ReferenceError() + - Nan::SyntaxError() + - Nan::TypeError() + - Nan::ThrowError() + - Nan::ThrowRangeError() + - Nan::ThrowReferenceError() + - Nan::ThrowSyntaxError() + - Nan::ThrowTypeError() + - Nan::FatalException() + - Nan::ErrnoException() + - Nan::TryCatch + + +### Buffers + +NAN's `node::Buffer` helpers exist as the API has changed across supported Node versions. Use these methods to ensure compatibility. + + - Nan::NewBuffer() + - Nan::CopyBuffer() + - Nan::FreeCallback() + +### Nan::Callback + +`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution. + + - Nan::Callback + +### Asynchronous work helpers + +`Nan::AsyncWorker` and `Nan::AsyncProgressWorker` are helper classes that make working with asynchronous code easier. + + - Nan::AsyncWorker + - Nan::AsyncProgressWorkerBase & Nan::AsyncProgressWorker + - Nan::AsyncQueueWorker + +### Strings & Bytes + +Miscellaneous string & byte encoding and decoding functionality provided for compatibility across supported versions of V8 and Node. Implemented by NAN to ensure that all encoding types are supported, even for older versions of Node where they are missing. + + - Nan::Encoding + - Nan::Encode() + - Nan::DecodeBytes() + - Nan::DecodeWrite() + + +### Object Wrappers + +The `ObjectWrap` class can be used to make wrapped C++ objects and a factory of wrapped objects. + + - Nan::ObjectWrap + + +### V8 internals + +The hooks to access V8 internals—including GC and statistics—are different across the supported versions of V8, therefore NAN provides its own hooks that call the appropriate V8 methods. + + - NAN_GC_CALLBACK() + - Nan::AddGCEpilogueCallback() + - Nan::RemoveGCEpilogueCallback() + - Nan::AddGCPrologueCallback() + - Nan::RemoveGCPrologueCallback() + - Nan::GetHeapStatistics() + - Nan::SetCounterFunction() + - Nan::SetCreateHistogramFunction() + - Nan::SetAddHistogramSampleFunction() + - Nan::IdleNotification() + - Nan::LowMemoryNotification() + - Nan::ContextDisposedNotification() + - Nan::GetInternalFieldPointer() + - Nan::SetInternalFieldPointer() + - Nan::AdjustExternalMemory() + + +### Miscellaneous V8 Helpers + + - Nan::Utf8String + - Nan::GetCurrentContext() + - Nan::SetIsolateData() + - Nan::GetIsolateData() + - Nan::TypedArrayContents + + +### Miscellaneous Node Helpers + + - Nan::MakeCallback() + - NAN_MODULE_INIT() + - Nan::Export() + + + + + +### Tests + +To run the NAN tests do: + +``` sh +npm install +npm run-script rebuild-tests +npm test +``` + +Or just: + +``` sh +npm install +make test +``` + + +## Governance & Contributing + +NAN is governed by the [io.js](https://iojs.org/) Addon API Working Group + +### Addon API Working Group (WG) + +The NAN project is jointly governed by a Working Group which is responsible for high-level guidance of the project. + +Members of the WG are also known as Collaborators, there is no distinction between the two, unlike other io.js projects. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project [README.md](./README.md#collaborators). + +Individuals making significant and valuable contributions are made members of the WG and given commit-access to the project. These individuals are identified by the WG and their addition to the WG is discussed via GitHub and requires unanimous consensus amongst those WG members participating in the discussion with a quorum of 50% of WG members required for acceptance of the vote. + +_Note:_ If you make a significant contribution and are not considered for commit-access log an issue or contact a WG member directly. + +For the current list of WG members / Collaborators, see the project [README.md](./README.md#collaborators). + +### Consensus Seeking Process + +The WG follows a [Consensus Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) decision making model. + +Modifications of the contents of the NAN repository are made on a collaborative basis. Anybody with a GitHub account may propose a modification via pull request and it will be considered by the WG. All pull requests must be reviewed and accepted by a WG member with sufficient expertise who is able to take full responsibility for the change. In the case of pull requests proposed by an existing WG member, an additional WG member is required for sign-off. Consensus should be sought if additional WG members participate and there is disagreement around a particular modification. + +If a change proposal cannot reach a consensus, a WG member can call for a vote amongst the members of the WG. Simple majority wins. + + +## Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + + +### WG Members / Collaborators + + + + + + + + + +
Rod VaggGitHub/rvaggTwitter/@rvagg
Benjamin ByholmGitHub/kkoopa-
Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
Nathan RajlichGitHub/TooTallNateTwitter/@TooTallNate
Brett LawsonGitHub/brett19Twitter/@brett19x
Ben NoordhuisGitHub/bnoordhuisTwitter/@bnoordhuis
David SiegelGitHub/agnat-
+ +## Licence & copyright + +Copyright (c) 2016 NAN WG Members / Collaborators (listed above). + +Native Abstractions for Node.js is licensed under an MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md new file mode 100644 index 00000000000..6bc4cce229f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md @@ -0,0 +1,103 @@ +## Asynchronous work helpers + +`Nan::AsyncWorker` and `Nan::AsyncProgressWorker` are helper classes that make working with asynchronous code easier. + + - Nan::AsyncWorker + - Nan::AsyncProgressWorker + - Nan::AsyncQueueWorker + + +### Nan::AsyncWorker + +`Nan::AsyncWorker` is an _abstract_ class that you can subclass to have much of the annoying asynchronous queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the asynchronous work is in progress. + +Definition: + +```c++ +class AsyncWorker { + public: + explicit AsyncWorker(Callback *callback_); + + virtual ~AsyncWorker(); + + virtual void WorkComplete(); + + void SaveToPersistent(const char *key, const v8::Local &value); + + void SaveToPersistent(const v8::Local &key, + const v8::Local &value); + + void SaveToPersistent(uint32_t index, + const v8::Local &value); + + v8::Local GetFromPersistent(const char *key) const; + + v8::Local GetFromPersistent(const v8::Local &key) const; + + v8::Local GetFromPersistent(uint32_t index) const; + + virtual void Execute() = 0; + + uv_work_t request; + + virtual void Destroy(); + + protected: + Persistent persistentHandle; + + Callback *callback; + + virtual void HandleOKCallback(); + + virtual void HandleErrorCallback(); + + void SetErrorMessage(const char *msg); + + const char* ErrorMessage(); +}; +``` + + +### Nan::AsyncProgressWorkerBase & Nan::AsyncProgressWorker + +`Nan::AsyncProgressWorkerBase` is an _abstract_ class template that extends `Nan::AsyncWorker` and adds additional progress reporting callbacks that can be used during the asynchronous work execution to provide progress data back to JavaScript. + +Previously the definiton of `Nan::AsyncProgressWorker` only allowed sending `const char` data. Now extending `Nan::AsyncProgressWorker` will yield an instance of the implicit `Nan::AsyncProgressWorkerBase` template with type `` for compatibility. + +Definition: + +```c++ +template +class AsyncProgressWorkerBase : public AsyncWorker { + public: + explicit AsyncProgressWorker(Callback *callback_); + + virtual ~AsyncProgressWorker(); + + void WorkProgress(); + + class ExecutionProgress { + public: + void Signal() const; + void Send(const T* data, size_t size) const; + }; + + virtual void Execute(const ExecutionProgress& progress) = 0; + + virtual void HandleProgressCallback(const T *data, size_t size) = 0; + + virtual void Destroy(); + +typedef AsyncProgressWorkerBase AsyncProgressWorker; +``` + + +### Nan::AsyncQueueWorker + +`Nan::AsyncQueueWorker` will run a `Nan::AsyncWorker` asynchronously via libuv. Both the `execute` and `after_work` steps are taken care of for you. Most of the logic for this is embedded in `Nan::AsyncWorker`. + +Definition: + +```c++ +void AsyncQueueWorker(AsyncWorker *); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md new file mode 100644 index 00000000000..8d8d25cf75a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md @@ -0,0 +1,54 @@ +## Buffers + +NAN's `node::Buffer` helpers exist as the API has changed across supported Node versions. Use these methods to ensure compatibility. + + - Nan::NewBuffer() + - Nan::CopyBuffer() + - Nan::FreeCallback() + + +### Nan::NewBuffer() + +Allocate a new `node::Buffer` object with the specified size and optional data. Calls `node::Buffer::New()`. + +Note that when creating a `Buffer` using `Nan::NewBuffer()` and an existing `char*`, it is assumed that the ownership of the pointer is being transferred to the new `Buffer` for management. +When a `node::Buffer` instance is garbage collected and a `FreeCallback` has not been specified, `data` will be disposed of via a call to `free()`. +You _must not_ free the memory space manually once you have created a `Buffer` in this way. + +Signature: + +```c++ +Nan::MaybeLocal Nan::NewBuffer(uint32_t size) +Nan::MaybeLocal Nan::NewBuffer(char* data, uint32_t size) +Nan::MaybeLocal Nan::NewBuffer(char *data, + size_t length, + Nan::FreeCallback callback, + void *hint) +``` + + + +### Nan::CopyBuffer() + +Similar to [`Nan::NewBuffer()`](#api_nan_new_buffer) except that an implicit memcpy will occur within Node. Calls `node::Buffer::Copy()`. + +Management of the `char*` is left to the user, you should manually free the memory space if necessary as the new `Buffer` will have its own copy. + +Signature: + +```c++ +Nan::MaybeLocal Nan::CopyBuffer(const char *data, uint32_t size) +``` + + + +### Nan::FreeCallback() + +A free callback that can be provided to [`Nan::NewBuffer()`](#api_nan_new_buffer). +The supplied callback will be invoked when the `Buffer` undergoes garbage collection. + +Signature: + +```c++ +typedef void (*FreeCallback)(char *data, void *hint); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md new file mode 100644 index 00000000000..46de1d7172b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md @@ -0,0 +1,56 @@ +## Nan::Callback + +`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution. + + - Nan::Callback + + +### Nan::Callback + +```c++ +class Callback { + public: + Callback(); + + explicit Callback(const v8::Local &fn); + + ~Callback(); + + bool operator==(const Callback &other) const; + + bool operator!=(const Callback &other) const; + + v8::Local operator*() const; + + v8::Local operator()(v8::Local target, + int argc = 0, + v8::Local argv[] = 0) const; + + v8::Local operator()(int argc = 0, + v8::Local argv[] = 0) const; + + void SetFunction(const v8::Local &fn); + + v8::Local GetFunction() const; + + bool IsEmpty() const; + + void Reset(const v8::Local &fn); + + void Reset(); + + v8::Local Call(v8::Local target, + int argc, + v8::Local argv[]) const; + + v8::Local Call(int argc, v8::Local argv[]) const; +}; +``` + +Example usage: + +```c++ +v8::Local function; +Nan::Callback callback(function); +callback.Call(0, 0); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md new file mode 100644 index 00000000000..d20861b5935 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md @@ -0,0 +1,41 @@ +## Converters + +NAN contains functions that convert `v8::Value`s to other `v8::Value` types and native types. Since type conversion is not guaranteed to succeed, they return `Nan::Maybe` types. These converters can be used in place of `value->ToX()` and `value->XValue()` (where `X` is one of the types, e.g. `Boolean`) in a way that provides a consistent interface across V8 versions. Newer versions of V8 use the new `v8::Maybe` and `v8::MaybeLocal` types for these conversions, older versions don't have this functionality so it is provided by NAN. + + - Nan::To() + + +### Nan::To() + +Converts a `v8::Local` to a different subtype of `v8::Value` or to a native data type. Returns a `Nan::MaybeLocal<>` or a `Nan::Maybe<>` accordingly. + +See [maybe_types.md](./maybe_types.md) for more information on `Nan::Maybe` types. + +Signatures: + +```c++ +// V8 types +Nan::MaybeLocal Nan::To(v8::Local val); +Nan::MaybeLocal Nan::To(v8::Local val); +Nan::MaybeLocal Nan::To(v8::Local val); +Nan::MaybeLocal Nan::To(v8::Local val); +Nan::MaybeLocal Nan::To(v8::Local val); +Nan::MaybeLocal Nan::To(v8::Local val); +Nan::MaybeLocal Nan::To(v8::Local val); + +// Native types +Nan::Maybe Nan::To(v8::Local val); +Nan::Maybe Nan::To(v8::Local val); +Nan::Maybe Nan::To(v8::Local val); +Nan::Maybe Nan::To(v8::Local val); +Nan::Maybe Nan::To(v8::Local val); +``` + +### Example + +```c++ +v8::Local val; +Nan::MaybeLocal str = Nan::To(val); +Nan::Maybe d = Nan::To(val); +``` + diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md new file mode 100644 index 00000000000..aac6e087fc6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md @@ -0,0 +1,226 @@ +## Errors + +NAN includes helpers for creating, throwing and catching Errors as much of this functionality varies across the supported versions of V8 and must be abstracted. + +Note that an Error object is simply a specialized form of `v8::Value`. + +Also consult the V8 Embedders Guide section on [Exceptions](https://developers.google.com/v8/embed#exceptions) for more information. + + - Nan::Error() + - Nan::RangeError() + - Nan::ReferenceError() + - Nan::SyntaxError() + - Nan::TypeError() + - Nan::ThrowError() + - Nan::ThrowRangeError() + - Nan::ThrowReferenceError() + - Nan::ThrowSyntaxError() + - Nan::ThrowTypeError() + - Nan::FatalException() + - Nan::ErrnoException() + - Nan::TryCatch + + + +### Nan::Error() + +Create a new Error object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. + +Note that an Error object is simply a specialized form of `v8::Value`. + +Signature: + +```c++ +v8::Local Nan::Error(const char *msg); +v8::Local Nan::Error(v8::Local msg); +``` + + + +### Nan::RangeError() + +Create a new RangeError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. + +Note that an RangeError object is simply a specialized form of `v8::Value`. + +Signature: + +```c++ +v8::Local Nan::RangeError(const char *msg); +v8::Local Nan::RangeError(v8::Local msg); +``` + + + +### Nan::ReferenceError() + +Create a new ReferenceError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. + +Note that an ReferenceError object is simply a specialized form of `v8::Value`. + +Signature: + +```c++ +v8::Local Nan::ReferenceError(const char *msg); +v8::Local Nan::ReferenceError(v8::Local msg); +``` + + + +### Nan::SyntaxError() + +Create a new SyntaxError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. + +Note that an SyntaxError object is simply a specialized form of `v8::Value`. + +Signature: + +```c++ +v8::Local Nan::SyntaxError(const char *msg); +v8::Local Nan::SyntaxError(v8::Local msg); +``` + + + +### Nan::TypeError() + +Create a new TypeError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. + +Note that an TypeError object is simply a specialized form of `v8::Value`. + +Signature: + +```c++ +v8::Local Nan::TypeError(const char *msg); +v8::Local Nan::TypeError(v8::Local msg); +``` + + + +### Nan::ThrowError() + +Throw an Error object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new Error object will be created. + +Signature: + +```c++ +void Nan::ThrowError(const char *msg); +void Nan::ThrowError(v8::Local msg); +void Nan::ThrowError(v8::Local error); +``` + + + +### Nan::ThrowRangeError() + +Throw an RangeError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new RangeError object will be created. + +Signature: + +```c++ +void Nan::ThrowRangeError(const char *msg); +void Nan::ThrowRangeError(v8::Local msg); +void Nan::ThrowRangeError(v8::Local error); +``` + + + +### Nan::ThrowReferenceError() + +Throw an ReferenceError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new ReferenceError object will be created. + +Signature: + +```c++ +void Nan::ThrowReferenceError(const char *msg); +void Nan::ThrowReferenceError(v8::Local msg); +void Nan::ThrowReferenceError(v8::Local error); +``` + + + +### Nan::ThrowSyntaxError() + +Throw an SyntaxError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new SyntaxError object will be created. + +Signature: + +```c++ +void Nan::ThrowSyntaxError(const char *msg); +void Nan::ThrowSyntaxError(v8::Local msg); +void Nan::ThrowSyntaxError(v8::Local error); +``` + + + +### Nan::ThrowTypeError() + +Throw an TypeError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new TypeError object will be created. + +Signature: + +```c++ +void Nan::ThrowTypeError(const char *msg); +void Nan::ThrowTypeError(v8::Local msg); +void Nan::ThrowTypeError(v8::Local error); +``` + + +### Nan::FatalException() + +Replaces `node::FatalException()` which has a different API across supported versions of Node. For use with [`Nan::TryCatch`](#api_nan_try_catch). + +Signature: + +```c++ +void Nan::FatalException(const Nan::TryCatch& try_catch); +``` + + +### Nan::ErrnoException() + +Replaces `node::ErrnoException()` which has a different API across supported versions of Node. + +Signature: + +```c++ +v8::Local Nan::ErrnoException(int errorno, + const char* syscall = NULL, + const char* message = NULL, + const char* path = NULL); +``` + + + +### Nan::TryCatch + +A simple wrapper around [`v8::TryCatch`](https://v8docs.nodesource.com/io.js-3.0/d4/dc6/classv8_1_1_try_catch.html) compatible with all supported versions of V8. Can be used as a direct replacement in most cases. See also [`Nan::FatalException()`](#api_nan_fatal_exception) for an internal use compatible with `node::FatalException`. + +Signature: + +```c++ +class Nan::TryCatch { + public: + Nan::TryCatch(); + + bool HasCaught() const; + + bool CanContinue() const; + + v8::Local ReThrow(); + + v8::Local Exception() const; + + // Nan::MaybeLocal for older versions of V8 + v8::MaybeLocal StackTrace() const; + + v8::Local Message() const; + + void Reset(); + + void SetVerbose(bool value); + + void SetCaptureMessage(bool value); +}; +``` + diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md new file mode 100644 index 00000000000..9ca9ceecfd0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md @@ -0,0 +1,512 @@ +## Maybe Types + +The `Nan::MaybeLocal` and `Nan::Maybe` types are monads that encapsulate `v8::Local` handles that _may be empty_. + +* **Maybe Types** + - Nan::MaybeLocal + - Nan::Maybe + - Nan::Nothing + - Nan::Just +* **Maybe Helpers** + - Nan::Call() + - Nan::ToDetailString() + - Nan::ToArrayIndex() + - Nan::Equals() + - Nan::NewInstance() + - Nan::GetFunction() + - Nan::Set() + - Nan::ForceSet() + - Nan::Get() + - Nan::GetPropertyAttributes() + - Nan::Has() + - Nan::Delete() + - Nan::GetPropertyNames() + - Nan::GetOwnPropertyNames() + - Nan::SetPrototype() + - Nan::ObjectProtoToString() + - Nan::HasOwnProperty() + - Nan::HasRealNamedProperty() + - Nan::HasRealIndexedProperty() + - Nan::HasRealNamedCallbackProperty() + - Nan::GetRealNamedPropertyInPrototypeChain() + - Nan::GetRealNamedProperty() + - Nan::CallAsFunction() + - Nan::CallAsConstructor() + - Nan::GetSourceLine() + - Nan::GetLineNumber() + - Nan::GetStartColumn() + - Nan::GetEndColumn() + - Nan::CloneElementAt() + - Nan::MakeMaybe() + + +### Nan::MaybeLocal + +A `Nan::MaybeLocal` is a wrapper around [`v8::Local`](https://v8docs.nodesource.com/io.js-3.0/de/deb/classv8_1_1_local.html) that enforces a check that determines whether the `v8::Local` is empty before it can be used. + +If an API method returns a `Nan::MaybeLocal`, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a `v8::TerminateExecution` exception was thrown. In that case, an empty `Nan::MaybeLocal` is returned. + +Definition: + +```c++ +template class Nan::MaybeLocal { + public: + MaybeLocal(); + + template MaybeLocal(v8::Local that); + + bool IsEmpty() const; + + template bool ToLocal(v8::Local *out); + + // Will crash if the MaybeLocal<> is empty. + v8::Local ToLocalChecked(); + + template v8::Local FromMaybe(v8::Local default_value) const; +}; +``` + +See the documentation for [`v8::MaybeLocal`](https://v8docs.nodesource.com/io.js-3.0/d8/d7d/classv8_1_1_maybe_local.html) for further details. + + +### Nan::Maybe + +A simple `Nan::Maybe` type, representing an object which may or may not have a value, see https://hackage.haskell.org/package/base/docs/Data-Maybe.html. + +If an API method returns a `Nan::Maybe<>`, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a `v8::TerminateExecution` exception was thrown. In that case, a "Nothing" value is returned. + +Definition: + +```c++ +template class Nan::Maybe { + public: + bool IsNothing() const; + bool IsJust() const; + + // Will crash if the Maybe<> is nothing. + T FromJust(); + + T FromMaybe(const T& default_value); + + bool operator==(const Maybe &other); + + bool operator!=(const Maybe &other); +}; +``` + +See the documentation for [`v8::Maybe`](https://v8docs.nodesource.com/io.js-3.0/d9/d4b/classv8_1_1_maybe.html) for further details. + + +### Nan::Nothing + +Construct an empty `Nan::Maybe` type representing _nothing_. + +```c++ +template Nan::Maybe Nan::Nothing(); +``` + + +### Nan::Just + +Construct a `Nan::Maybe` type representing _just_ a value. + +```c++ +template Nan::Maybe Nan::Just(const T &t); +``` + + +### Nan::Call() + +A helper method for calling [`v8::Function#Call()`](https://v8docs.nodesource.com/io.js-3.0/d5/d54/classv8_1_1_function.html#a468a89f737af0612db10132799c827c0) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::Call(v8::Local fun, v8::Local recv, int argc, v8::Local argv[]); +``` + + + +### Nan::ToDetailString() + +A helper method for calling [`v8::Value#ToDetailString()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#a2f9770296dc2c8d274bc8cc0dca243e5) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::ToDetailString(v8::Local val); +``` + + + +### Nan::ToArrayIndex() + +A helper method for calling [`v8::Value#ToArrayIndex()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#acc5bbef3c805ec458470c0fcd6f13493) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::ToArrayIndex(v8::Local val); +``` + + + +### Nan::Equals() + +A helper method for calling [`v8::Value#Equals()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#a0d9616ab2de899d4e3047c30a10c9285) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::Equals(v8::Local a, v8::Local(b)); +``` + + + +### Nan::NewInstance() + +A helper method for calling [`v8::Function#NewInstance()`](https://v8docs.nodesource.com/io.js-3.0/d5/d54/classv8_1_1_function.html#a691b13f7a553069732cbacf5ac8c62ec) and [`v8::ObjectTemplate#NewInstance()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ad605a7543cfbc5dab54cdb0883d14ae4) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::NewInstance(v8::Local h); +Nan::MaybeLocal Nan::NewInstance(v8::Local h, int argc, v8::Local argv[]); +Nan::MaybeLocal Nan::NewInstance(v8::Local h); +``` + + + +### Nan::GetFunction() + +A helper method for calling [`v8::FunctionTemplate#GetFunction()`](https://v8docs.nodesource.com/io.js-3.0/d8/d83/classv8_1_1_function_template.html#a56d904662a86eca78da37d9bb0ed3705) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::GetFunction(v8::Local t); +``` + + + +### Nan::Set() + +A helper method for calling [`v8::Object#Set()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a67604ea3734f170c66026064ea808f20) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::Set(v8::Local obj, + v8::Local key, + v8::Local value) +Nan::Maybe Nan::Set(v8::Local obj, + uint32_t index, + v8::Local value); +``` + + + +### Nan::ForceSet() + +A helper method for calling [`v8::Object#ForceSet()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a796b7b682896fb64bf1872747734e836) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::ForceSet(v8::Local obj, + v8::Local key, + v8::Local value, + v8::PropertyAttribute attribs = v8::None); +``` + + + +### Nan::Get() + +A helper method for calling [`v8::Object#Get()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a2565f03e736694f6b1e1cf22a0b4eac2) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::Get(v8::Local obj, + v8::Local key); +Nan::MaybeLocal Nan::Get(v8::Local obj, uint32_t index); +``` + + + +### Nan::GetPropertyAttributes() + +A helper method for calling [`v8::Object#GetPropertyAttributes()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a9b898894da3d1db2714fd9325a54fe57) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::GetPropertyAttributes( + v8::Local obj, + v8::Local key); +``` + + + +### Nan::Has() + +A helper method for calling [`v8::Object#Has()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab3c3d89ea7c2f9afd08965bd7299a41d) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::Has(v8::Local obj, v8::Local key); +Nan::Maybe Nan::Has(v8::Local obj, uint32_t index); +``` + + + +### Nan::Delete() + +A helper method for calling [`v8::Object#Delete()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a2fa0f5a592582434ed1ceceff7d891ef) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::Delete(v8::Local obj, + v8::Local key); +Nan::Maybe Nan::Delete(v8::Local obj, uint32_t index); +``` + + + +### Nan::GetPropertyNames() + +A helper method for calling [`v8::Object#GetPropertyNames()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#aced885270cfd2c956367b5eedc7fbfe8) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::GetPropertyNames(v8::Local obj); +``` + + + +### Nan::GetOwnPropertyNames() + +A helper method for calling [`v8::Object#GetOwnPropertyNames()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a79a6e4d66049b9aa648ed4dfdb23e6eb) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::GetOwnPropertyNames(v8::Local obj); +``` + + + +### Nan::SetPrototype() + +A helper method for calling [`v8::Object#SetPrototype()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a442706b22fceda6e6d1f632122a9a9f4) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::SetPrototype(v8::Local obj, + v8::Local prototype); +``` + + + +### Nan::ObjectProtoToString() + +A helper method for calling [`v8::Object#ObjectProtoToString()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab7a92b4dcf822bef72f6c0ac6fea1f0b) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::ObjectProtoToString(v8::Local obj); +``` + + + +### Nan::HasOwnProperty() + +A helper method for calling [`v8::Object#HasOwnProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab7b7245442ca6de1e1c145ea3fd653ff) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::HasOwnProperty(v8::Local obj, + v8::Local key); +``` + + + +### Nan::HasRealNamedProperty() + +A helper method for calling [`v8::Object#HasRealNamedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ad8b80a59c9eb3c1e6c3cd6c84571f767) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::HasRealNamedProperty(v8::Local obj, + v8::Local key); +``` + + + +### Nan::HasRealIndexedProperty() + +A helper method for calling [`v8::Object#HasRealIndexedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#af94fc1135a5e74a2193fb72c3a1b9855) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::HasRealIndexedProperty(v8::Local obj, + uint32_t index); +``` + + + +### Nan::HasRealNamedCallbackProperty() + +A helper method for calling [`v8::Object#HasRealNamedCallbackProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#af743b7ea132b89f84d34d164d0668811) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::HasRealNamedCallbackProperty( + v8::Local obj, + v8::Local key); +``` + + + +### Nan::GetRealNamedPropertyInPrototypeChain() + +A helper method for calling [`v8::Object#GetRealNamedPropertyInPrototypeChain()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a8700b1862e6b4783716964ba4d5e6172) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::GetRealNamedPropertyInPrototypeChain( + v8::Local obj, + v8::Local key); +``` + + + +### Nan::GetRealNamedProperty() + +A helper method for calling [`v8::Object#GetRealNamedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a84471a824576a5994fdd0ffcbf99ccc0) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::GetRealNamedProperty(v8::Local obj, + v8::Local key); +``` + + + +### Nan::CallAsFunction() + +A helper method for calling [`v8::Object#CallAsFunction()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a9ef18be634e79b4f0cdffa1667a29f58) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::CallAsFunction(v8::Local obj, + v8::Local recv, + int argc, + v8::Local argv[]); +``` + + + +### Nan::CallAsConstructor() + +A helper method for calling [`v8::Object#CallAsConstructor()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a50d571de50d0b0dfb28795619d07a01b) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::CallAsConstructor(v8::Local obj, + int argc, + v8::Local argv[]); +``` + + + +### Nan::GetSourceLine() + +A helper method for calling [`v8::Message#GetSourceLine()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#a849f7a6c41549d83d8159825efccd23a) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::GetSourceLine(v8::Local msg); +``` + + + +### Nan::GetLineNumber() + +A helper method for calling [`v8::Message#GetLineNumber()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#adbe46c10a88a6565f2732a2d2adf99b9) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::GetLineNumber(v8::Local msg); +``` + + + +### Nan::GetStartColumn() + +A helper method for calling [`v8::Message#GetStartColumn()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#a60ede616ba3822d712e44c7a74487ba6) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::GetStartColumn(v8::Local msg); +``` + + + +### Nan::GetEndColumn() + +A helper method for calling [`v8::Message#GetEndColumn()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#aaa004cf19e529da980bc19fcb76d93be) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::Maybe Nan::GetEndColumn(v8::Local msg); +``` + + + +### Nan::CloneElementAt() + +A helper method for calling [`v8::Array#CloneElementAt()`](https://v8docs.nodesource.com/io.js-3.0/d3/d32/classv8_1_1_array.html#a1d3a878d4c1c7cae974dd50a1639245e) in a way compatible across supported versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::CloneElementAt(v8::Local array, uint32_t index); +``` + + +### Nan::MakeMaybe() + +Wraps a `v8::Local<>` in a `Nan::MaybeLocal<>`. When called with a `Nan::MaybeLocal<>` it just returns its argument. This is useful in generic template code that builds on NAN. + +Synopsis: + +```c++ + MaybeLocal someNumber = MakeMaybe(New(3.141592654)); + MaybeLocal someString = MakeMaybe(New("probably")); +``` + +Signature: + +```c++ +template class MaybeMaybe> +Nan::MaybeLocal Nan::MakeMaybe(MaybeMaybe v); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md new file mode 100644 index 00000000000..0411a7056b5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md @@ -0,0 +1,659 @@ +## JavaScript-accessible methods + +A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://developers.google.com/v8/embed#templates) for further information. + +In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type. + +* **Method argument types** + - Nan::FunctionCallbackInfo + - Nan::PropertyCallbackInfo + - Nan::ReturnValue +* **Method declarations** + - Method declaration + - Getter declaration + - Setter declaration + - Property getter declaration + - Property setter declaration + - Property enumerator declaration + - Property deleter declaration + - Property query declaration + - Index getter declaration + - Index setter declaration + - Index enumerator declaration + - Index deleter declaration + - Index query declaration +* Method and template helpers + - Nan::SetMethod() + - Nan::SetPrototypeMethod() + - Nan::SetAccessor() + - Nan::SetNamedPropertyHandler() + - Nan::SetIndexedPropertyHandler() + - Nan::SetTemplate() + - Nan::SetPrototypeTemplate() + - Nan::SetInstanceTemplate() + - Nan::SetCallHandler() + - Nan::SetCallAsFunctionHandler() + + +### Nan::FunctionCallbackInfo + +`Nan::FunctionCallbackInfo` should be used in place of [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/dd/d0d/classv8_1_1_function_callback_info.html), even with older versions of Node where `v8::FunctionCallbackInfo` does not exist. + +Definition: + +```c++ +template class FunctionCallbackInfo { + public: + ReturnValue GetReturnValue() const; + v8::Local Callee(); + v8::Local Data(); + v8::Local Holder(); + bool IsConstructCall(); + int Length() const; + v8::Local operator[](int i) const; + v8::Local This() const; + v8::Isolate *GetIsolate() const; +}; +``` + +See the [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/dd/d0d/classv8_1_1_function_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from methods. + + +### Nan::PropertyCallbackInfo + +`Nan::PropertyCallbackInfo` should be used in place of [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d7/dc5/classv8_1_1_property_callback_info.html), even with older versions of Node where `v8::PropertyCallbackInfo` does not exist. + +Definition: + +```c++ +template class PropertyCallbackInfo : public PropertyCallbackInfoBase { + public: + ReturnValue GetReturnValue() const; + v8::Isolate* GetIsolate() const; + v8::Local Data() const; + v8::Local This() const; + v8::Local Holder() const; +}; +``` + +See the [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d7/dc5/classv8_1_1_property_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from property accessor methods. + + +### Nan::ReturnValue + +`Nan::ReturnValue` is used in place of [`v8::ReturnValue`](https://v8docs.nodesource.com/io.js-3.0/da/da7/classv8_1_1_return_value.html) on both [`Nan::FunctionCallbackInfo`](#api_nan_function_callback_info) and [`Nan::PropertyCallbackInfo`](#api_nan_property_callback_info) as the return type of `GetReturnValue()`. + +Example usage: + +```c++ +void EmptyArray(const Nan::FunctionCallbackInfo& info) { + info.GetReturnValue().Set(Nan::New()); +} +``` + +Definition: + +```c++ +template class ReturnValue { + public: + // Handle setters + template void Set(const v8::Local &handle); + template void Set(const Nan::Global &handle); + + // Fast primitive setters + void Set(bool value); + void Set(double i); + void Set(int32_t i); + void Set(uint32_t i); + + // Fast JS primitive setters + void SetNull(); + void SetUndefined(); + void SetEmptyString(); + + // Convenience getter for isolate + v8::Isolate *GetIsolate() const; +}; +``` + +See the documentation on [`v8::ReturnValue`](https://v8docs.nodesource.com/io.js-3.0/da/da7/classv8_1_1_return_value.html) for further information on this. + + +### Method declaration + +JavaScript-accessible methods should be declared with the following signature to form a `Nan::FunctionCallback`: + +```c++ +typedef void(*FunctionCallback)(const FunctionCallbackInfo&); +``` + +Example: + +```c++ +void MethodName(const Nan::FunctionCallbackInfo& info) { + ... +} +``` + +You do not need to declare a new `HandleScope` within a method as one is implicitly created for you. + +**Example usage** + +```c++ +// .h: +class Foo : public Nan::ObjectWrap { + ... + + static void Bar(const Nan::FunctionCallbackInfo& info); + static void Baz(const Nan::FunctionCallbackInfo& info); +} + + +// .cc: +void Foo::Bar(const Nan::FunctionCallbackInfo& info) { + ... +} + +void Foo::Baz(const Nan::FunctionCallbackInfo& info) { + ... +} +``` + +A helper macro `NAN_METHOD(methodname)` exists, compatible with NAN v1 method declarations. + +**Example usage with `NAN_METHOD(methodname)`** + +```c++ +// .h: +class Foo : public Nan::ObjectWrap { + ... + + static NAN_METHOD(Bar); + static NAN_METHOD(Baz); +} + + +// .cc: +NAN_METHOD(Foo::Bar) { + ... +} + +NAN_METHOD(Foo::Baz) { + ... +} +``` + +Use [`Nan::SetPrototypeMethod`](#api_nan_set_prototype_method) to attach a method to a JavaScript function prototype or [`Nan::SetMethod`](#api_nan_set_method) to attach a method directly on a JavaScript object. + + +### Getter declaration + +JavaScript-accessible getters should be declared with the following signature to form a `Nan::GetterCallback`: + +```c++ +typedef void(*GetterCallback)(v8::Local, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void GetterName(v8::Local property, + const Nan::PropertyCallbackInfo& info) { + ... +} +``` + +You do not need to declare a new `HandleScope` within a getter as one is implicitly created for you. + +A helper macro `NAN_GETTER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors). + + +### Setter declaration + +JavaScript-accessible setters should be declared with the following signature to form a Nan::SetterCallback: + +```c++ +typedef void(*SetterCallback)(v8::Local, + v8::Local, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void SetterName(v8::Local property, + v8::Local value, + const Nan::PropertyCallbackInfo& info) { + ... +} +``` + +You do not need to declare a new `HandleScope` within a setter as one is implicitly created for you. + +A helper macro `NAN_SETTER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors). + + +### Property getter declaration + +JavaScript-accessible property getters should be declared with the following signature to form a Nan::PropertyGetterCallback: + +```c++ +typedef void(*PropertyGetterCallback)(v8::Local, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void PropertyGetterName(v8::Local property, + const Nan::PropertyCallbackInfo& info) { + ... +} +``` + +You do not need to declare a new `HandleScope` within a property getter as one is implicitly created for you. + +A helper macro `NAN_PROPERTY_GETTER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Property setter declaration + +JavaScript-accessible property setters should be declared with the following signature to form a Nan::PropertySetterCallback: + +```c++ +typedef void(*PropertySetterCallback)(v8::Local, + v8::Local, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void PropertySetterName(v8::Local property, + v8::Local value, + const Nan::PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a property setter as one is implicitly created for you. + +A helper macro `NAN_PROPERTY_SETTER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Property enumerator declaration + +JavaScript-accessible property enumerators should be declared with the following signature to form a Nan::PropertyEnumeratorCallback: + +```c++ +typedef void(*PropertyEnumeratorCallback)(const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void PropertyEnumeratorName(const Nan::PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a property enumerator as one is implicitly created for you. + +A helper macro `NAN_PROPERTY_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Property deleter declaration + +JavaScript-accessible property deleters should be declared with the following signature to form a Nan::PropertyDeleterCallback: + +```c++ +typedef void(*PropertyDeleterCallback)(v8::Local, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void PropertyDeleterName(v8::Local property, + const Nan::PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a property deleter as one is implicitly created for you. + +A helper macro `NAN_PROPERTY_DELETER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Property query declaration + +JavaScript-accessible property query methods should be declared with the following signature to form a Nan::PropertyQueryCallback: + +```c++ +typedef void(*PropertyQueryCallback)(v8::Local, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void PropertyQueryName(v8::Local property, + const Nan::PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a property query method as one is implicitly created for you. + +A helper macro `NAN_PROPERTY_QUERY(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Index getter declaration + +JavaScript-accessible index getter methods should be declared with the following signature to form a Nan::IndexGetterCallback: + +```c++ +typedef void(*IndexGetterCallback)(uint32_t, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void IndexGetterName(uint32_t index, const PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a index getter as one is implicitly created for you. + +A helper macro `NAN_INDEX_GETTER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Index setter declaration + +JavaScript-accessible index setter methods should be declared with the following signature to form a Nan::IndexSetterCallback: + +```c++ +typedef void(*IndexSetterCallback)(uint32_t, + v8::Local, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void IndexSetterName(uint32_t index, + v8::Local value, + const PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a index setter as one is implicitly created for you. + +A helper macro `NAN_INDEX_SETTER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Index enumerator declaration + +JavaScript-accessible index enumerator methods should be declared with the following signature to form a Nan::IndexEnumeratorCallback: + +```c++ +typedef void(*IndexEnumeratorCallback)(const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void IndexEnumeratorName(const PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a index enumerator as one is implicitly created for you. + +A helper macro `NAN_INDEX_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Index deleter declaration + +JavaScript-accessible index deleter methods should be declared with the following signature to form a Nan::IndexDeleterCallback: + +```c++ +typedef void(*IndexDeleterCallback)(uint32_t, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void IndexDeleterName(uint32_t index, const PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a index deleter as one is implicitly created for you. + +A helper macro `NAN_INDEX_DELETER(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Index query declaration + +JavaScript-accessible index query methods should be declared with the following signature to form a Nan::IndexQueryCallback: + +```c++ +typedef void(*IndexQueryCallback)(uint32_t, + const PropertyCallbackInfo&); +``` + +Example: + +```c++ +void IndexQueryName(uint32_t index, const PropertyCallbackInfo& info); +``` + +You do not need to declare a new `HandleScope` within a index query method as one is implicitly created for you. + +A helper macro `NAN_INDEX_QUERY(methodname)` exists, compatible with NAN v1 method declarations. + +Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). + + +### Nan::SetMethod() + +Sets a method with a given name directly on a JavaScript object where the method has the `Nan::FunctionCallback` signature (see Method declaration). + +Signature: + +```c++ +void Nan::SetMethod(v8::Local recv, + const char *name, + Nan::FunctionCallback callback) +void Nan::SetMethod(v8::Local templ, + const char *name, + Nan::FunctionCallback callback) +``` + + +### Nan::SetPrototypeMethod() + +Sets a method with a given name on a `FunctionTemplate`'s prototype where the method has the `Nan::FunctionCallback` signature (see Method declaration). + +Signature: + +```c++ +void Nan::SetPrototypeMethod(v8::Local recv, + const char* name, + Nan::FunctionCallback callback) +``` + + +### Nan::SetAccessor() + +Sets getters and setters for a property with a given name on an `ObjectTemplate` or a plain `Object`. Accepts getters with the `Nan::GetterCallback` signature (see Getter declaration) and setters with the `Nan::SetterCallback` signature (see Setter declaration). + +Signature: + +```c++ +void SetAccessor(v8::Local tpl, + v8::Local name, + Nan::GetterCallback getter, + Nan::SetterCallback setter = 0, + v8::Local data = v8::Local(), + v8::AccessControl settings = v8::DEFAULT, + v8::PropertyAttribute attribute = v8::None, + imp::Sig signature = imp::Sig()); +bool SetAccessor(v8::Local obj, + v8::Local name, + Nan::GetterCallback getter, + Nan::SetterCallback setter = 0, + v8::Local data = v8::Local(), + v8::AccessControl settings = v8::DEFAULT, + v8::PropertyAttribute attribute = v8::None) +``` + +See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#aa90691622f01269c6a11391d372ca0c5) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a3f9dee085f5ec346465f1dc924325043) for further information about how to use `Nan::SetAccessor()`. + + +### Nan::SetNamedPropertyHandler() + +Sets named property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts: + +* Property getters with the `Nan::PropertyGetterCallback` signature (see Property getter declaration) +* Property setters with the `Nan::PropertySetterCallback` signature (see Property setter declaration) +* Property query methods with the `Nan::PropertyQueryCallback` signature (see Property query declaration) +* Property deleters with the `Nan::PropertyDeleterCallback` signature (see Property deleter declaration) +* Property enumerators with the `Nan::PropertyEnumeratorCallback` signature (see Property enumerator declaration) + +Signature: + +```c++ +void SetNamedPropertyHandler(v8::Local tpl, + Nan::PropertyGetterCallback getter, + Nan::PropertySetterCallback setter = 0, + Nan::PropertyQueryCallback query = 0, + Nan::PropertyDeleterCallback deleter = 0, + Nan::PropertyEnumeratorCallback enumerator = 0, + v8::Local data = v8::Local()) +``` + +See the V8 [`ObjectTemplate#SetNamedPropertyHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#a34d1cc45b642cd131706663801aadd76) for further information about how to use `Nan::SetNamedPropertyHandler()`. + + +### Nan::SetIndexedPropertyHandler() + +Sets indexed property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts: + +* Indexed property getters with the `Nan::IndexGetterCallback` signature (see Index getter declaration) +* Indexed property setters with the `Nan::IndexSetterCallback` signature (see Index setter declaration) +* Indexed property query methods with the `Nan::IndexQueryCallback` signature (see Index query declaration) +* Indexed property deleters with the `Nan::IndexDeleterCallback` signature (see Index deleter declaration) +* Indexed property enumerators with the `Nan::IndexEnumeratorCallback` signature (see Index enumerator declaration) + +Signature: + +```c++ +void SetIndexedPropertyHandler(v8::Local tpl, + Nan::IndexGetterCallback getter, + Nan::IndexSetterCallback setter = 0, + Nan::IndexQueryCallback query = 0, + Nan::IndexDeleterCallback deleter = 0, + Nan::IndexEnumeratorCallback enumerator = 0, + v8::Local data = v8::Local()) +``` + +See the V8 [`ObjectTemplate#SetIndexedPropertyHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ac0234cbede45d51778bb5f6a32a9e125) for further information about how to use `Nan::SetIndexedPropertyHandler()`. + + +### Nan::SetTemplate() + +Adds properties on an `Object`'s or `Function`'s template. + +Signature: + +```c++ +void Nan::SetTemplate(v8::Local templ, + const char *name, + v8::Local value); +void Nan::SetTemplate(v8::Local templ, + v8::Local name, + v8::Local value, + v8::PropertyAttribute attributes) +``` + +Calls the `Template`'s [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). + + +### Nan::SetPrototypeTemplate() + +Adds properties on an `Object`'s or `Function`'s prototype template. + +Signature: + +```c++ +void Nan::SetPrototypeTemplate(v8::Local templ, + const char *name, + v8::Local value); +void Nan::SetPrototypeTemplate(v8::Local templ, + v8::Local name, + v8::Local value, + v8::PropertyAttribute attributes) +``` + +Calls the `FunctionTemplate`'s _PrototypeTemplate's_ [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). + + +### Nan::SetInstanceTemplate() + +Use to add instance properties on `FunctionTemplate`'s. + +Signature: + +```c++ +void Nan::SetInstanceTemplate(v8::Local templ, + const char *name, + v8::Local value); +void Nan::SetInstanceTemplate(v8::Local templ, + v8::Local name, + v8::Local value, + v8::PropertyAttribute attributes) +``` + +Calls the `FunctionTemplate`'s _InstanceTemplate's_ [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). + + +### Nan::SetCallHandler() + +Set the call-handler callback for a `v8::FunctionTemplate`. +This callback is called whenever the function created from this FunctionTemplate is called. + +Signature: + +```c++ +void Nan::SetCallHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) +``` + +Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/io.js-3.0/d8/d83/classv8_1_1_function_template.html#a26cf14e36aa1a47091b98536d08ea821). + + +### Nan::SetCallAsFunctionHandler() + +Sets the callback to be used when calling instances created from the `v8::ObjectTemplate` as a function. +If no callback is set, instances behave like normal JavaScript objects that cannot be called as a function. + +Signature: + +```c++ +void Nan::SetCallAsFunctionHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) +``` + +Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ae0a0e72fb0c5e5f32e255fe5bcc7316a). + diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md new file mode 100644 index 00000000000..c0734bd7350 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md @@ -0,0 +1,147 @@ +## New + +NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8. + + - Nan::New() + - Nan::Undefined() + - Nan::Null() + - Nan::True() + - Nan::False() + - Nan::EmptyString() + + + +### Nan::New() + +`Nan::New()` should be used to instantiate new JavaScript objects. + +Refer to the specific V8 type in the [V8 documentation](https://v8docs.nodesource.com/io.js-3.0/d1/d83/classv8_1_1_data.html) for information on the types of arguments required for instantiation. + +Signatures: + +Return types are mostly omitted from the signatures for simplicity. In most cases the type will be contained within a `v8::Local`. The following types will be contained within a `Nan::MaybeLocal`: `v8::String`, `v8::Date`, `v8::RegExp`, `v8::Script`, `v8::UnboundScript`. + +Empty objects: + +```c++ +Nan::New(); +``` + +Generic single and multiple-argument: + +```c++ +Nan::New(A0 arg0); +Nan::New(A0 arg0, A1 arg1); +Nan::New(A0 arg0, A1 arg1, A2 arg2); +Nan::New(A0 arg0, A1 arg1, A2 arg2, A3 arg3); +``` + +For creating `v8::FunctionTemplate` and `v8::Function` objects: + +_The definition of `Nan::FunctionCallback` can be found in the [Method declaration](./methods.md#api_nan_method) documentation._ + +```c++ +Nan::New(Nan::FunctionCallback callback, + v8::Local data = v8::Local()); +Nan::New(Nan::FunctionCallback callback, + v8::Local data = v8::Local(), + A2 a2 = A2()); +``` + +Native number types: + +```c++ +v8::Local Nan::New(bool value); +v8::Local Nan::New(int32_t value); +v8::Local Nan::New(uint32_t value); +v8::Local Nan::New(double value); +``` + +String types: + +```c++ +Nan::MaybeLocal Nan::New(std::string const& value); +Nan::MaybeLocal Nan::New(const char * value, int length); +Nan::MaybeLocal Nan::New(const char * value); +Nan::MaybeLocal Nan::New(const uint16_t * value); +Nan::MaybeLocal Nan::New(const uint16_t * value, int length); +``` + +Specialized types: + +```c++ +v8::Local Nan::New(v8::String::ExternalStringResource * value); +v8::Local Nan::New(Nan::ExternalOneByteStringResource * value); +v8::Local Nan::New(v8::Local pattern, v8::RegExp::Flags flags); +``` + +Note that `Nan::ExternalOneByteStringResource` maps to [`v8::String::ExternalOneByteStringResource`](https://v8docs.nodesource.com/io.js-3.0/d9/db3/classv8_1_1_string_1_1_external_one_byte_string_resource.html), and `v8::String::ExternalAsciiStringResource` in older versions of V8. + + + +### Nan::Undefined() + +A helper method to reference the `v8::Undefined` object in a way that is compatible across all supported versions of V8. + +Signature: + +```c++ +v8::Local Nan::Undefined() +``` + + +### Nan::Null() + +A helper method to reference the `v8::Null` object in a way that is compatible across all supported versions of V8. + +Signature: + +```c++ +v8::Local Nan::Null() +``` + + +### Nan::True() + +A helper method to reference the `v8::Boolean` object representing the `true` value in a way that is compatible across all supported versions of V8. + +Signature: + +```c++ +v8::Local Nan::True() +``` + + +### Nan::False() + +A helper method to reference the `v8::Boolean` object representing the `false` value in a way that is compatible across all supported versions of V8. + +Signature: + +```c++ +v8::Local Nan::False() +``` + + +### Nan::EmptyString() + +Call [`v8::String::Empty`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a7c1bc8886115d7ee46f1d571dd6ebc6d) to reference the empty string in a way that is compatible across all supported versions of V8. + +Signature: + +```c++ +v8::Local Nan::EmptyString() +``` + + + +### Nan::NewOneByteString() + +An implementation of [`v8::String::NewFromOneByte()`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a5264d50b96d2c896ce525a734dc10f09) provided for consistent availability and API across supported versions of V8. Allocates a new string from Latin-1 data. + +Signature: + +```c++ +Nan::MaybeLocal Nan::NewOneByteString(const uint8_t * value, + int length = -1) +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md new file mode 100644 index 00000000000..8aa080f52c0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md @@ -0,0 +1,63 @@ +## Miscellaneous Node Helpers + + - Nan::MakeCallback() + - NAN_MODULE_INIT() + - Nan::Export() + + + +### Nan::MakeCallback() + +Wrappers around `node::MakeCallback()` providing a consistent API across all supported versions of Node. + +Use `MakeCallback()` rather than using `v8::Function#Call()` directly in order to properly process internal Node functionality including domains, async hooks, the microtask queue, and other debugging functionality. + +Signatures: + +```c++ +v8::Local Nan::MakeCallback(v8::Local target, + v8::Local func, + int argc, + v8::Local* argv); +v8::Local Nan::MakeCallback(v8::Local target, + v8::Local symbol, + int argc, + v8::Local* argv); +v8::Local Nan::MakeCallback(v8::Local target, + const char* method, + int argc, + v8::Local* argv); +``` + + + +### NAN_MODULE_INIT() + +Used to define the entry point function to a Node add-on. Creates a function with a given `name` that receives a `target` object representing the equivalent of the JavaScript `exports` object. + +See example below. + + +### Nan::Export() + +A simple helper to register a `v8::FunctionTemplate` from a JavaScript-accessible method (see [Methods](./methods.md)) as a property on an object. Can be used in a way similar to assigning properties to `module.exports` in JavaScript. + +Signature: + +```c++ +void Export(v8::Local target, const char *name, Nan::FunctionCallback f) +``` + +Also available as the shortcut `NAN_EXPORT` macro. + +Example: + +```c++ +NAN_METHOD(Foo) { + ... +} + +NAN_MODULE_INIT(Init) { + NAN_EXPORT(target, Foo); +} +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md new file mode 100644 index 00000000000..27b0636ba57 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md @@ -0,0 +1,263 @@ +## Object Wrappers + +The `ObjectWrap` class can be used to make wrapped C++ objects and a factory of wrapped objects. + + - Nan::ObjectWrap + + + +### Nan::ObjectWrap() + +A reimplementation of `node::ObjectWrap` that adds some API not present in older versions of Node. Should be preferred over `node::ObjectWrap` in all cases for consistency. + +Definition: + +```c++ +class ObjectWrap { + public: + ObjectWrap(); + + virtual ~ObjectWrap(); + + template + static inline T* Unwrap(v8::Local handle); + + inline v8::Local handle(); + + inline Nan::Persistent& persistent(); + + protected: + inline void Wrap(v8::Local handle); + + inline void MakeWeak(); + + /* Ref() marks the object as being attached to an event loop. + * Refed objects will not be garbage collected, even if + * all references are lost. + */ + virtual void Ref(); + + /* Unref() marks an object as detached from the event loop. This is its + * default state. When an object with a "weak" reference changes from + * attached to detached state it will be freed. Be careful not to access + * the object after making this call as it might be gone! + * (A "weak reference" means an object that only has a + * persistant handle.) + * + * DO NOT CALL THIS FROM DESTRUCTOR + */ + virtual void Unref(); + + int refs_; // ro +}; +``` + +See the Node documentation on [Wrapping C++ Objects](https://nodejs.org/api/addons.html#addons_wrapping_c_objects) for more details. + +### This vs. Holder + +When calling `Unwrap`, it is important that the argument is indeed some JavaScript object which got wrapped by a `Wrap` call for this class or any derived class. +The `Signature` installed by [`Nan::SetPrototypeMethod()`](methods.md#api_nan_set_prototype_method) does ensure that `info.Holder()` is just such an instance. +In Node 0.12 and later, `info.This()` will also be of such a type, since otherwise the invocation will get rejected. +However, in Node 0.10 and before it was possible to invoke a method on a JavaScript object which just had the extension type in its prototype chain. +In such a situation, calling `Unwrap` on `info.This()` will likely lead to a failed assertion causing a crash, but could lead to even more serious corruption. + +On the other hand, calling `Unwrap` in an [accessor](methods.md#api_nan_set_accessor) should not use `Holder()` if the accessor is defined on the prototype. +So either define your accessors on the instance template, +or use `This()` after verifying that it is indeed a valid object. + +### Examples + +#### Basic + +```c++ +class MyObject : public Nan::ObjectWrap { + public: + static NAN_MODULE_INIT(Init) { + v8::Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("MyObject").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + SetPrototypeMethod(tpl, "getHandle", GetHandle); + SetPrototypeMethod(tpl, "getValue", GetValue); + + constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked()); + Nan::Set(target, Nan::New("MyObject").ToLocalChecked(), + Nan::GetFunction(tpl).ToLocalChecked()); + } + + private: + explicit MyObject(double value = 0) : value_(value) {} + ~MyObject() {} + + static NAN_METHOD(New) { + if (info.IsConstructCall()) { + double value = info[0]->IsUndefined() ? 0 : Nan::To(info[0]).FromJust(); + MyObject *obj = new MyObject(value); + obj->Wrap(info.This()); + info.GetReturnValue().Set(info.This()); + } else { + const int argc = 1; + v8::Local argv[argc] = {info[0]}; + v8::Local cons = Nan::New(constructor()); + info.GetReturnValue().Set(cons->NewInstance(argc, argv)); + } + } + + static NAN_METHOD(GetHandle) { + MyObject* obj = Nan::ObjectWrap::Unwrap(info.Holder()); + info.GetReturnValue().Set(obj->handle()); + } + + static NAN_METHOD(GetValue) { + MyObject* obj = Nan::ObjectWrap::Unwrap(info.Holder()); + info.GetReturnValue().Set(obj->value_); + } + + static inline Nan::Persistent & constructor() { + static Nan::Persistent my_constructor; + return my_constructor; + } + + double value_; +}; + +NODE_MODULE(objectwrapper, MyObject::Init) +``` + +To use in Javascript: + +```Javascript +var objectwrapper = require('bindings')('objectwrapper'); + +var obj = new objectwrapper.MyObject(5); +console.log('Should be 5: ' + obj.getValue()); +``` + +#### Factory of wrapped objects + +```c++ +class MyFactoryObject : public Nan::ObjectWrap { + public: + static NAN_MODULE_INIT(Init) { + v8::Local tpl = Nan::New(New); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + Nan::SetPrototypeMethod(tpl, "getValue", GetValue); + + constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked()); + } + + static NAN_METHOD(NewInstance) { + v8::Local cons = Nan::New(constructor()); + double value = info[0]->IsNumber() ? Nan::To(info[0]).FromJust() : 0; + const int argc = 1; + v8::Local argv[1] = {Nan::New(value)}; + info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked()); + } + + // Needed for the next example: + inline double value() const { + return value_; + } + + private: + explicit MyFactoryObject(double value = 0) : value_(value) {} + ~MyFactoryObject() {} + + static NAN_METHOD(New) { + if (info.IsConstructCall()) { + double value = info[0]->IsNumber() ? Nan::To(info[0]).FromJust() : 0; + MyFactoryObject * obj = new MyFactoryObject(value); + obj->Wrap(info.This()); + info.GetReturnValue().Set(info.This()); + } else { + const int argc = 1; + v8::Local argv[argc] = {info[0]}; + v8::Local cons = Nan::New(constructor()); + info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked()); + } + } + + static NAN_METHOD(GetValue) { + MyFactoryObject* obj = ObjectWrap::Unwrap(info.Holder()); + info.GetReturnValue().Set(obj->value_); + } + + static inline Nan::Persistent & constructor() { + static Nan::Persistent my_constructor; + return my_constructor; + } + + double value_; +}; + +NAN_MODULE_INIT(Init) { + MyFactoryObject::Init(target); + Nan::Set(target, + Nan::New("newFactoryObjectInstance").ToLocalChecked(), + Nan::GetFunction( + Nan::New(MyFactoryObject::NewInstance)).ToLocalChecked() + ); +} + +NODE_MODULE(wrappedobjectfactory, Init) +``` + +To use in Javascript: + +```Javascript +var wrappedobjectfactory = require('bindings')('wrappedobjectfactory'); + +var obj = wrappedobjectfactory.newFactoryObjectInstance(10); +console.log('Should be 10: ' + obj.getValue()); +``` + +#### Passing wrapped objects around + +Use the `MyFactoryObject` class above along with the following: + +```c++ +static NAN_METHOD(Sum) { + Nan::MaybeLocal maybe1 = Nan::To(info[0]); + Nan::MaybeLocal maybe2 = Nan::To(info[1]); + + // Quick check: + if (maybe1.IsEmpty() || maybe2.IsEmpty()) { + // return value is undefined by default + return; + } + + MyFactoryObject* obj1 = + Nan::ObjectWrap::Unwrap(maybe1.ToLocalChecked()); + MyFactoryObject* obj2 = + Nan::ObjectWrap::Unwrap(maybe2.ToLocalChecked()); + + info.GetReturnValue().Set(Nan::New(obj1->value() + obj2->value())); +} + +NAN_MODULE_INIT(Init) { + MyFactoryObject::Init(target); + Nan::Set(target, + Nan::New("newFactoryObjectInstance").ToLocalChecked(), + Nan::GetFunction( + Nan::New(MyFactoryObject::NewInstance)).ToLocalChecked() + ); + Nan::Set(target, + Nan::New("sum").ToLocalChecked(), + Nan::GetFunction(Nan::New(Sum)).ToLocalChecked() + ); +} + +NODE_MODULE(myaddon, Init) +``` + +To use in Javascript: + +```Javascript +var myaddon = require('bindings')('myaddon'); + +var obj1 = myaddon.newFactoryObjectInstance(5); +var obj2 = myaddon.newFactoryObjectInstance(10); +console.log('sum of object values: ' + myaddon.sum(obj1, obj2)); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md new file mode 100644 index 00000000000..743b44a4c1a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md @@ -0,0 +1,295 @@ +## Persistent references + +An object reference that is independent of any `HandleScope` is a _persistent_ reference. Where a `Local` handle only lives as long as the `HandleScope` in which it was allocated, a `Persistent` handle remains valid until it is explicitly disposed. + +Due to the evolution of the V8 API, it is necessary for NAN to provide a wrapper implementation of the `Persistent` classes to supply compatibility across the V8 versions supported. + + - Nan::PersistentBase & v8::PersistentBase + - Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits + - Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits + - Nan::Persistent + - Nan::Global + - Nan::WeakCallbackInfo + - Nan::WeakCallbackType + +Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). + + +### Nan::PersistentBase & v8::PersistentBase + +A persistent handle contains a reference to a storage cell in V8 which holds an object value and which is updated by the garbage collector whenever the object is moved. A new storage cell can be created using the constructor or `Nan::PersistentBase::Reset()`. Existing handles can be disposed using an argument-less `Nan::PersistentBase::Reset()`. + +Definition: + +_(note: this is implemented as `Nan::PersistentBase` for older versions of V8 and the native `v8::PersistentBase` is used for newer versions of V8)_ + +```c++ +template class PersistentBase { + public: + /** + * If non-empty, destroy the underlying storage cell + */ + void Reset(); + + /** + * If non-empty, destroy the underlying storage cell and create a new one with + * the contents of another if it is also non-empty + */ + template void Reset(const v8::Local &other); + + /** + * If non-empty, destroy the underlying storage cell and create a new one with + * the contents of another if it is also non-empty + */ + template void Reset(const PersistentBase &other); + + /** + * If non-empty, destroy the underlying storage cell + * IsEmpty() will return true after this call. + */ + bool IsEmpty(); + + void Empty(); + + template bool operator==(const PersistentBase &that); + + template bool operator==(const v8::Local &that); + + template bool operator!=(const PersistentBase &that); + + template bool operator!=(const v8::Local &that); + + /** + * Install a finalization callback on this object. + * NOTE: There is no guarantee as to *when* or even *if* the callback is + * invoked. The invocation is performed solely on a best effort basis. + * As always, GC-based finalization should *not* be relied upon for any + * critical form of resource management! At the moment you can either + * specify a parameter for the callback or the location of two internal + * fields in the dying object. + */ + template + void SetWeak(P *parameter, + typename WeakCallbackInfo

::Callback callback, + WeakCallbackType type); + + void ClearWeak(); + + /** + * Marks the reference to this object independent. Garbage collector is free + * to ignore any object groups containing this object. Weak callback for an + * independent handle should not assume that it will be preceded by a global + * GC prologue callback or followed by a global GC epilogue callback. + */ + void MarkIndependent() const; + + bool IsIndependent() const; + + /** Checks if the handle holds the only reference to an object. */ + bool IsNearDeath() const; + + /** Returns true if the handle's reference is weak. */ + bool IsWeak() const +}; +``` + +See the V8 documentation for [`PersistentBase`](https://v8docs.nodesource.com/io.js-3.0/d4/dca/classv8_1_1_persistent_base.html) for further information. + +**Tip:** To get a `v8::Local` reference to the original object back from a `PersistentBase` or `Persistent` object: + +```c++ +v8::Local object = Nan::New(persistent); +``` + + +### Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits + +Default traits for `Nan::Persistent`. This class does not allow use of the a copy constructor or assignment operator. At present `kResetInDestructor` is not set, but that will change in a future version. + +Definition: + +_(note: this is implemented as `Nan::NonCopyablePersistentTraits` for older versions of V8 and the native `v8::NonCopyablePersistentTraits` is used for newer versions of V8)_ + +```c++ +template class NonCopyablePersistentTraits { + public: + typedef Persistent > NonCopyablePersistent; + + static const bool kResetInDestructor = false; + + template + static void Copy(const Persistent &source, + NonCopyablePersistent *dest); + + template static void Uncompilable(); +}; +``` + +See the V8 documentation for [`NonCopyablePersistentTraits`](https://v8docs.nodesource.com/io.js-3.0/de/d73/classv8_1_1_non_copyable_persistent_traits.html) for further information. + + +### Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits + +A helper class of traits to allow copying and assignment of `Persistent`. This will clone the contents of storage cell, but not any of the flags, etc.. + +Definition: + +_(note: this is implemented as `Nan::CopyablePersistentTraits` for older versions of V8 and the native `v8::NonCopyablePersistentTraits` is used for newer versions of V8)_ + +```c++ +template +class CopyablePersistentTraits { + public: + typedef Persistent > CopyablePersistent; + + static const bool kResetInDestructor = true; + + template + static void Copy(const Persistent &source, + CopyablePersistent *dest); +}; +``` + +See the V8 documentation for [`CopyablePersistentTraits`](https://v8docs.nodesource.com/io.js-3.0/da/d5c/structv8_1_1_copyable_persistent_traits.html) for further information. + + +### Nan::Persistent + +A type of `PersistentBase` which allows copy and assignment. Copy, assignment and destructor behavior is controlled by the traits class `M`. + +Definition: + +```c++ +template > +class Persistent; + +template class Persistent : public PersistentBase { + public: + /** + * A Persistent with no storage cell. + */ + Persistent(); + + /** + * Construct a Persistent from a v8::Local. When the v8::Local is non-empty, a + * new storage cell is created pointing to the same object, and no flags are + * set. + */ + template Persistent(v8::Local that); + + /** + * Construct a Persistent from a Persistent. When the Persistent is non-empty, + * a new storage cell is created pointing to the same object, and no flags are + * set. + */ + Persistent(const Persistent &that); + + /** + * The copy constructors and assignment operator create a Persistent exactly + * as the Persistent constructor, but the Copy function from the traits class + * is called, allowing the setting of flags based on the copied Persistent. + */ + Persistent &operator=(const Persistent &that); + + template + Persistent &operator=(const Persistent &that); + + /** + * The destructor will dispose the Persistent based on the kResetInDestructor + * flags in the traits class. Since not calling dispose can result in a + * memory leak, it is recommended to always set this flag. + */ + ~Persistent(); +}; +``` + +See the V8 documentation for [`Persistent`](https://v8docs.nodesource.com/io.js-3.0/d2/d78/classv8_1_1_persistent.html) for further information. + + +### Nan::Global + +A type of `PersistentBase` which has move semantics. + +```c++ +template class Global : public PersistentBase { + public: + /** + * A Global with no storage cell. + */ + Global(); + + /** + * Construct a Global from a v8::Local. When the v8::Local is non-empty, a new + * storage cell is created pointing to the same object, and no flags are set. + */ + template Global(v8::Local that); + /** + * Construct a Global from a PersistentBase. When the Persistent is non-empty, + * a new storage cell is created pointing to the same object, and no flags are + * set. + */ + template Global(const PersistentBase &that); + + /** + * Pass allows returning globals from functions, etc. + */ + Global Pass(); +}; +``` + +See the V8 documentation for [`Global`](https://v8docs.nodesource.com/io.js-3.0/d5/d40/classv8_1_1_global.html) for further information. + + +### Nan::WeakCallbackInfo + +`Nan::WeakCallbackInfo` is used as an argument when setting a persistent reference as weak. You may need to free any external resources attached to the object. It is a mirror of `v8:WeakCallbackInfo` as found in newer versions of V8. + +Definition: + +```c++ +template class WeakCallbackInfo { + public: + typedef void (*Callback)(const WeakCallbackInfo& data); + + v8::Isolate *GetIsolate() const; + + /** + * Get the parameter that was associated with the weak handle. + */ + T *GetParameter() const; + + /** + * Get pointer from internal field, index can be 0 or 1. + */ + void *GetInternalField(int index) const; +}; +``` + +Example usage: + +```c++ +void weakCallback(const WeakCallbackInfo &data) { + int *parameter = data.GetParameter(); + delete parameter; +} + +Persistent obj; +int *data = new int(0); +obj.SetWeak(data, callback, WeakCallbackType::kParameter); +``` + +See the V8 documentation for [`WeakCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d8/d06/classv8_1_1_weak_callback_info.html) for further information. + + +### Nan::WeakCallbackType + +Represents the type of a weak callback. +A weak callback of type `kParameter` makes the supplied parameter to `Nan::PersistentBase::SetWeak` available through `WeakCallbackInfo::GetParameter`. +A weak callback of type `kInternalFields` uses up to two internal fields at indices 0 and 1 on the `Nan::PersistentBase` being made weak. +Note that only `v8::Object`s and derivatives can have internal fields. + +Definition: + +```c++ +enum class WeakCallbackType { kParameter, kInternalFields }; +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md new file mode 100644 index 00000000000..e9a35d0fe1c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md @@ -0,0 +1,73 @@ +## Scopes + +A _local handle_ is a pointer to an object. All V8 objects are accessed using handles, they are necessary because of the way the V8 garbage collector works. + +A handle scope can be thought of as a container for any number of handles. When you've finished with your handles, instead of deleting each one individually you can simply delete their scope. + +The creation of `HandleScope` objects is different across the supported versions of V8. Therefore, NAN provides its own implementations that can be used safely across these. + + - Nan::HandleScope + - Nan::EscapableHandleScope + +Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). + + +### Nan::HandleScope + +A simple wrapper around [`v8::HandleScope`](https://v8docs.nodesource.com/io.js-3.0/d3/d95/classv8_1_1_handle_scope.html). + +Definition: + +```c++ +class Nan::HandleScope { + public: + Nan::HandleScope(); + static int NumberOfHandles(); +}; +``` + +Allocate a new `Nan::HandleScope` whenever you are creating new V8 JavaScript objects. Note that an implicit `HandleScope` is created for you on JavaScript-accessible methods so you do not need to insert one yourself. + +Example: + +```c++ +// new object is created, it needs a new scope: +void Pointless() { + Nan::HandleScope scope; + v8::Local obj = Nan::New(); +} + +// JavaScript-accessible method already has a HandleScope +NAN_METHOD(Pointless2) { + v8::Local obj = Nan::New(); +} +``` + + +### Nan::EscapableHandleScope + +Similar to [`Nan::HandleScope`](#api_nan_handle_scope) but should be used in cases where a function needs to return a V8 JavaScript type that has been created within it. + +Definition: + +```c++ +class Nan::EscapableHandleScope { + public: + Nan::EscapableHandleScope(); + static int NumberOfHandles(); + template v8::Local Escape(v8::Local value); +} +``` + +Use `Escape(value)` to return the object. + +Example: + +```c++ +v8::Local EmptyObj() { + Nan::EscapableHandleScope scope; + v8::Local obj = Nan::New(); + return scope.Escape(obj); +} +``` + diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md new file mode 100644 index 00000000000..1267b5e7cfb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md @@ -0,0 +1,38 @@ +## Script + +NAN provides a `v8::Script` helpers as the API has changed over the supported versions of V8. + + - Nan::CompileScript() + - Nan::RunScript() + + + +### Nan::CompileScript() + +A wrapper around [`v8::Script::Compile()`](https://v8docs.nodesource.com/io.js-3.0/da/da5/classv8_1_1_script_compiler.html#a93f5072a0db55d881b969e9fc98e564b). + +Note that `Nan::BoundScript` is an alias for `v8::Script`. + +Signature: + +```c++ +Nan::MaybeLocal Nan::CompileScript( + v8::Local s, + const v8::ScriptOrigin& origin); +Nan::MaybeLocal Nan::CompileScript(v8::Local s); +``` + + + +### Nan::RunScript() + +Calls `script->Run()` or `script->BindToCurrentContext()->Run(Nan::GetCurrentContext())`. + +Note that `Nan::BoundScript` is an alias for `v8::Script` and `Nan::UnboundScript` is an alias for `v8::UnboundScript` where available and `v8::Script` on older versions of V8. + +Signature: + +```c++ +Nan::MaybeLocal Nan::RunScript(v8::Local script) +Nan::MaybeLocal Nan::RunScript(v8::Local script) +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md new file mode 100644 index 00000000000..7c1bd325047 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md @@ -0,0 +1,62 @@ +## Strings & Bytes + +Miscellaneous string & byte encoding and decoding functionality provided for compatibility across supported versions of V8 and Node. Implemented by NAN to ensure that all encoding types are supported, even for older versions of Node where they are missing. + + - Nan::Encoding + - Nan::Encode() + - Nan::DecodeBytes() + - Nan::DecodeWrite() + + + +### Nan::Encoding + +An enum representing the supported encoding types. A copy of `node::encoding` that is consistent across versions of Node. + +Definition: + +```c++ +enum Nan::Encoding { ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER } +``` + + + +### Nan::Encode() + +A wrapper around `node::Encode()` that provides a consistent implementation across supported versions of Node. + +Signature: + +```c++ +v8::Local Nan::Encode(const void *buf, + size_t len, + enum Nan::Encoding encoding = BINARY); +``` + + + +### Nan::DecodeBytes() + +A wrapper around `node::DecodeBytes()` that provides a consistent implementation across supported versions of Node. + +Signature: + +```c++ +ssize_t Nan::DecodeBytes(v8::Local val, + enum Nan::Encoding encoding = BINARY); +``` + + + +### Nan::DecodeWrite() + +A wrapper around `node::DecodeWrite()` that provides a consistent implementation across supported versions of Node. + +Signature: + +```c++ +ssize_t Nan::DecodeWrite(char *buf, + size_t len, + v8::Local val, + enum Nan::Encoding encoding = BINARY); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md new file mode 100644 index 00000000000..8e6319ba545 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md @@ -0,0 +1,199 @@ +## V8 internals + +The hooks to access V8 internals—including GC and statistics—are different across the supported versions of V8, therefore NAN provides its own hooks that call the appropriate V8 methods. + + - NAN_GC_CALLBACK() + - Nan::AddGCEpilogueCallback() + - Nan::RemoveGCEpilogueCallback() + - Nan::AddGCPrologueCallback() + - Nan::RemoveGCPrologueCallback() + - Nan::GetHeapStatistics() + - Nan::SetCounterFunction() + - Nan::SetCreateHistogramFunction() + - Nan::SetAddHistogramSampleFunction() + - Nan::IdleNotification() + - Nan::LowMemoryNotification() + - Nan::ContextDisposedNotification() + - Nan::GetInternalFieldPointer() + - Nan::SetInternalFieldPointer() + - Nan::AdjustExternalMemory() + + + +### NAN_GC_CALLBACK(callbackname) + +Use `NAN_GC_CALLBACK` to declare your callbacks for `Nan::AddGCPrologueCallback()` and `Nan::AddGCEpilogueCallback()`. Your new method receives the arguments `v8::GCType type` and `v8::GCCallbackFlags flags`. + +```c++ +static Nan::Persistent callback; + +NAN_GC_CALLBACK(gcPrologueCallback) { + v8::Local argv[] = { Nan::New("prologue").ToLocalChecked() }; + Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(callback), 1, argv); +} + +NAN_METHOD(Hook) { + callback.Reset(args[0].As()); + Nan::AddGCPrologueCallback(gcPrologueCallback); + info.GetReturnValue().Set(info.Holder()); +} +``` + + +### Nan::AddGCEpilogueCallback() + +Signature: + +```c++ +void Nan::AddGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback, v8::GCType gc_type_filter = v8::kGCTypeAll) +``` + +Calls V8's [`AddGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a90d1860babc76059c62514b422f56960). + + +### Nan::RemoveGCEpilogueCallback() + +Signature: + +```c++ +void Nan::RemoveGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback) +``` + +Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a05c60859fd4b8e96bfcd451281ed6c7c). + + +### Nan::AddGCPrologueCallback() + +Signature: + +```c++ +void Nan::AddGCPrologueCallback(v8::Isolate::GCPrologueCallback, v8::GCType gc_type_filter callback) +``` + +Calls V8's [`AddGCPrologueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ab4b87b8f9f8e5bf95eba4009357e001f). + + +### Nan::RemoveGCPrologueCallback() + +Signature: + +```c++ +void Nan::RemoveGCPrologueCallback(v8::Isolate::GCPrologueCallback callback) +``` + +Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a9f6c51932811593f81ff30b949124186). + + +### Nan::GetHeapStatistics() + +Signature: + +```c++ +void Nan::GetHeapStatistics(v8::HeapStatistics *heap_statistics) +``` + +Calls V8's [`GetHeapStatistics()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a5593ac74687b713095c38987e5950b34). + + +### Nan::SetCounterFunction() + +Signature: + +```c++ +void Nan::SetCounterFunction(v8::CounterLookupCallback cb) +``` + +Calls V8's [`SetCounterFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a045d7754e62fa0ec72ae6c259b29af94). + + +### Nan::SetCreateHistogramFunction() + +Signature: + +```c++ +void Nan::SetCreateHistogramFunction(v8::CreateHistogramCallback cb) +``` + +Calls V8's [`SetCreateHistogramFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a542d67e85089cb3f92aadf032f99e732). + + +### Nan::SetAddHistogramSampleFunction() + +Signature: + +```c++ +void Nan::SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) +``` + +Calls V8's [`SetAddHistogramSampleFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#aeb420b690bc2c216882d6fdd00ddd3ea). + + +### Nan::IdleNotification() + +Signature: + +```c++ +void Nan::IdleNotification(v8::HeapStatistics *heap_statistics) +``` + +Calls V8's [`IdleNotification()` or `IdleNotificationDeadline()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad6a2a02657f5425ad460060652a5a118) depending on V8 version. + + +### Nan::LowMemoryNotification() + +Signature: + +```c++ +void Nan::LowMemoryNotification() +``` + +Calls V8's [`IdleNotification()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a24647f61d6b41f69668094bdcd6ea91f). + + +### Nan::ContextDisposedNotification() + +Signature: + +```c++ +void Nan::ContextDisposedNotification() +``` + +Calls V8's [`ContextDisposedNotification()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b). + + +### Nan::GetInternalFieldPointer() + +Gets a pointer to the internal field with at `index` from a V8 `Object` handle. + +Signature: + +```c++ +void* Nan::GetInternalFieldPointer(v8::Local object, int index) +``` + +Calls the Object's [`GetAlignedPointerFromInternalField()` or `GetPointerFromInternalField()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab3c57184263cf29963ef0017bec82281) depending on the version of V8. + + +### Nan::SetInternalFieldPointer() + +Sets the value of the internal field at `index` on a V8 `Object` handle. + +Signature: + +```c++ +void Nan::SetInternalFieldPointer(v8::Local object, int index, void* value) +``` + +Calls the Object's [`SetAlignedPointerInInternalField()` or `SetPointerInInternalField()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b) depending on the version of V8. + + +### Nan::AdjustExternalMemory() + +Signature: + +```c++ +int Nan::AdjustExternalMemory(int bytesChange) +``` + +Calls V8's [`AdjustAmountOfExternalAllocatedMemory()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ae1a59cac60409d3922582c4af675473e). + diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md new file mode 100644 index 00000000000..64f736d6d16 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md @@ -0,0 +1,85 @@ +## Miscellaneous V8 Helpers + + - Nan::Utf8String + - Nan::GetCurrentContext() + - Nan::SetIsolateData() + - Nan::GetIsolateData() + - Nan::TypedArrayContents + + + +### Nan::Utf8String + +Converts an object to a UTF-8-encoded character array. If conversion to a string fails (e.g. due to an exception in the toString() method of the object) then the length() method returns 0 and the * operator returns NULL. The underlying memory used for this object is managed by the object. + +An implementation of [`v8::String::Utf8Value`](https://v8docs.nodesource.com/io.js-3.0/d4/d1b/classv8_1_1_string_1_1_utf8_value.html) that is consistent across all supported versions of V8. + +Definition: + +```c++ +class Nan::Utf8String { + public: + Nan::Utf8String(v8::Local from); + + int length() const; + + char* operator*(); + const char* operator*() const; +}; +``` + + +### Nan::GetCurrentContext() + +A call to [`v8::Isolate::GetCurrent()->GetCurrentContext()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a81c7a1ed7001ae2a65e89107f75fd053) that works across all supported versions of V8. + +Signature: + +```c++ +v8::Local Nan::GetCurrentContext() +``` + + +### Nan::SetIsolateData() + +A helper to provide a consistent API to [`v8::Isolate#SetData()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a7acadfe7965997e9c386a05f098fbe36). + +Signature: + +```c++ +void Nan::SetIsolateData(v8::Isolate *isolate, T *data) +``` + + + +### Nan::GetIsolateData() + +A helper to provide a consistent API to [`v8::Isolate#GetData()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#aabd223436bc1100a787dadaa024c6257). + +Signature: + +```c++ +T *Nan::GetIsolateData(v8::Isolate *isolate) +``` + + +### Nan::TypedArrayContents + +A helper class for accessing the contents of an ArrayBufferView (aka a typedarray) from C++. If the input array is not a valid typedarray, then the data pointer of TypedArrayContents will default to `NULL` and the length will be 0. If the data pointer is not compatible with the alignment requirements of type, an assertion error will fail. + +Note that you must store a reference to the `array` object while you are accessing its contents. + +Definition: + +```c++ +template +class Nan::TypedArrayContents { + public: + TypedArrayContents(v8::Local array); + + size_t length() const; + + T* const operator*(); + const T* const operator*() const; +}; +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js b/src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js new file mode 100644 index 00000000000..4f1dfb41667 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js @@ -0,0 +1 @@ +console.log(require('path').relative('.', __dirname)); diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan.h new file mode 100644 index 00000000000..7176da1719f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan.h @@ -0,0 +1,2274 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors: + * - Rod Vagg + * - Benjamin Byholm + * - Trevor Norris + * - Nathan Rajlich + * - Brett Lawson + * - Ben Noordhuis + * - David Siegel + * + * MIT License + * + * Version 2.4.0: current Node 6.3.0, Node 12: 0.12.15, Node 10: 0.10.46, iojs: 3.3.1 + * + * See https://github.com/nodejs/nan for the latest update to this file + **********************************************************************************/ + +#ifndef NAN_H_ +#define NAN_H_ + +#include + +#define NODE_0_10_MODULE_VERSION 11 +#define NODE_0_12_MODULE_VERSION 14 +#define ATOM_0_21_MODULE_VERSION 41 +#define IOJS_1_0_MODULE_VERSION 42 +#define IOJS_1_1_MODULE_VERSION 43 +#define IOJS_2_0_MODULE_VERSION 44 +#define IOJS_3_0_MODULE_VERSION 45 +#define NODE_4_0_MODULE_VERSION 46 +#define NODE_5_0_MODULE_VERSION 47 +#define NODE_6_0_MODULE_VERSION 48 + +#ifdef _MSC_VER +# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800) +#else +# define NAN_HAS_CPLUSPLUS_11 (__cplusplus >= 201103L) +#endif + +#if NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION && !NAN_HAS_CPLUSPLUS_11 +# error This version of node/NAN/v8 requires a C++11 compiler +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(_MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4530 ) +# include +# include +# pragma warning( pop ) +#else +# include +# include +#endif + +// uv helpers +#ifdef UV_VERSION_MAJOR +# ifndef UV_VERSION_PATCH +# define UV_VERSION_PATCH 0 +# endif +# define NAUV_UVVERSION ((UV_VERSION_MAJOR << 16) | \ + (UV_VERSION_MINOR << 8) | \ + (UV_VERSION_PATCH)) +#else +# define NAUV_UVVERSION 0x000b00 +#endif + +#if NAUV_UVVERSION < 0x000b0b +# ifdef WIN32 +# include +# else +# include +# endif +#endif + +namespace Nan { + +#define NAN_INLINE inline // TODO(bnoordhuis) Remove in v3.0.0. + +#if defined(__GNUC__) && \ + !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) +# define NAN_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) && \ + !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) +# define NAN_DEPRECATED __declspec(deprecated) +#else +# define NAN_DEPRECATED +#endif + +#if NAN_HAS_CPLUSPLUS_11 +# define NAN_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&) = delete; +# define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete; +# define NAN_DISALLOW_MOVE(CLASS) \ + CLASS(CLASS&&) = delete; /* NOLINT(build/c++11) */ \ + void operator=(CLASS&&) = delete; +#else +# define NAN_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&); +# define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&); +# define NAN_DISALLOW_MOVE(CLASS) +#endif + +#define NAN_DISALLOW_ASSIGN_COPY(CLASS) \ + NAN_DISALLOW_ASSIGN(CLASS) \ + NAN_DISALLOW_COPY(CLASS) + +#define NAN_DISALLOW_ASSIGN_MOVE(CLASS) \ + NAN_DISALLOW_ASSIGN(CLASS) \ + NAN_DISALLOW_MOVE(CLASS) + +#define NAN_DISALLOW_COPY_MOVE(CLASS) \ + NAN_DISALLOW_COPY(CLASS) \ + NAN_DISALLOW_MOVE(CLASS) + +#define NAN_DISALLOW_ASSIGN_COPY_MOVE(CLASS) \ + NAN_DISALLOW_ASSIGN(CLASS) \ + NAN_DISALLOW_COPY(CLASS) \ + NAN_DISALLOW_MOVE(CLASS) + +#define TYPE_CHECK(T, S) \ + while (false) { \ + *(static_cast(0)) = static_cast(0); \ + } + +//=== RegistrationFunction ===================================================== + +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + typedef v8::Handle ADDON_REGISTER_FUNCTION_ARGS_TYPE; +#else + typedef v8::Local ADDON_REGISTER_FUNCTION_ARGS_TYPE; +#endif + +#define NAN_MODULE_INIT(name) \ + void name(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target) + +//=== CallbackInfo ============================================================= + +#include "nan_callbacks.h" // NOLINT(build/include) + +//============================================================================== + +#if (NODE_MODULE_VERSION < NODE_0_12_MODULE_VERSION) +typedef v8::Script UnboundScript; +typedef v8::Script BoundScript; +#else +typedef v8::UnboundScript UnboundScript; +typedef v8::Script BoundScript; +#endif + +#if (NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION) +typedef v8::String::ExternalAsciiStringResource + ExternalOneByteStringResource; +#else +typedef v8::String::ExternalOneByteStringResource + ExternalOneByteStringResource; +#endif + +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) +template +class NonCopyablePersistentTraits : + public v8::NonCopyablePersistentTraits {}; +template +class CopyablePersistentTraits : + public v8::CopyablePersistentTraits {}; + +template +class PersistentBase : + public v8::PersistentBase {}; + +template > +class Persistent; +#else +template class NonCopyablePersistentTraits; +template class PersistentBase; +template class WeakCallbackData; +template > +class Persistent; +#endif // NODE_MODULE_VERSION + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +# include "nan_maybe_43_inl.h" // NOLINT(build/include) +#else +# include "nan_maybe_pre_43_inl.h" // NOLINT(build/include) +#endif + +#include "nan_converters.h" // NOLINT(build/include) +#include "nan_new.h" // NOLINT(build/include) + +#if NAUV_UVVERSION < 0x000b17 +#define NAUV_WORK_CB(func) \ + void func(uv_async_t *async, int) +#else +#define NAUV_WORK_CB(func) \ + void func(uv_async_t *async) +#endif + +#if NAUV_UVVERSION >= 0x000b0b + +typedef uv_key_t nauv_key_t; + +inline int nauv_key_create(nauv_key_t *key) { + return uv_key_create(key); +} + +inline void nauv_key_delete(nauv_key_t *key) { + uv_key_delete(key); +} + +inline void* nauv_key_get(nauv_key_t *key) { + return uv_key_get(key); +} + +inline void nauv_key_set(nauv_key_t *key, void *value) { + uv_key_set(key, value); +} + +#else + +/* Implement thread local storage for older versions of libuv. + * This is essentially a backport of libuv commit 5d2434bf + * written by Ben Noordhuis, adjusted for names and inline. + */ + +#ifndef WIN32 + +typedef pthread_key_t nauv_key_t; + +inline int nauv_key_create(nauv_key_t* key) { + return -pthread_key_create(key, NULL); +} + +inline void nauv_key_delete(nauv_key_t* key) { + if (pthread_key_delete(*key)) + abort(); +} + +inline void* nauv_key_get(nauv_key_t* key) { + return pthread_getspecific(*key); +} + +inline void nauv_key_set(nauv_key_t* key, void* value) { + if (pthread_setspecific(*key, value)) + abort(); +} + +#else + +typedef struct { + DWORD tls_index; +} nauv_key_t; + +inline int nauv_key_create(nauv_key_t* key) { + key->tls_index = TlsAlloc(); + if (key->tls_index == TLS_OUT_OF_INDEXES) + return UV_ENOMEM; + return 0; +} + +inline void nauv_key_delete(nauv_key_t* key) { + if (TlsFree(key->tls_index) == FALSE) + abort(); + key->tls_index = TLS_OUT_OF_INDEXES; +} + +inline void* nauv_key_get(nauv_key_t* key) { + void* value = TlsGetValue(key->tls_index); + if (value == NULL) + if (GetLastError() != ERROR_SUCCESS) + abort(); + return value; +} + +inline void nauv_key_set(nauv_key_t* key, void* value) { + if (TlsSetValue(key->tls_index, value) == FALSE) + abort(); +} + +#endif +#endif + +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION +template +v8::Local New(v8::Handle); +#endif + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + typedef v8::WeakCallbackType WeakCallbackType; +#else +struct WeakCallbackType { + enum E {kParameter, kInternalFields}; + E type; + WeakCallbackType(E other) : type(other) {} // NOLINT(runtime/explicit) + inline bool operator==(E other) { return other == this->type; } + inline bool operator!=(E other) { return !operator==(other); } +}; +#endif + +template class WeakCallbackInfo; + +#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION +# include "nan_persistent_12_inl.h" // NOLINT(build/include) +#else +# include "nan_persistent_pre_12_inl.h" // NOLINT(build/include) +#endif + +namespace imp { + static const size_t kMaxLength = 0x3fffffff; + // v8::String::REPLACE_INVALID_UTF8 was introduced + // in node.js v0.10.29 and v0.8.27. +#if NODE_MAJOR_VERSION > 0 || \ + NODE_MINOR_VERSION > 10 || \ + NODE_MINOR_VERSION == 10 && NODE_PATCH_VERSION >= 29 || \ + NODE_MINOR_VERSION == 8 && NODE_PATCH_VERSION >= 27 + static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8; +#else + static const unsigned kReplaceInvalidUtf8 = 0; +#endif +} // end of namespace imp + +//=== HandleScope ============================================================== + +class HandleScope { + v8::HandleScope scope; + + public: +#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION + inline HandleScope() : scope(v8::Isolate::GetCurrent()) {} + inline static int NumberOfHandles() { + return v8::HandleScope::NumberOfHandles(v8::Isolate::GetCurrent()); + } +#else + inline HandleScope() : scope() {} + inline static int NumberOfHandles() { + return v8::HandleScope::NumberOfHandles(); + } +#endif + + private: + // Make it hard to create heap-allocated or illegal handle scopes by + // disallowing certain operations. + HandleScope(const HandleScope &); + void operator=(const HandleScope &); + void *operator new(size_t size); + void operator delete(void *, size_t); +}; + +class EscapableHandleScope { + public: +#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION + inline EscapableHandleScope() : scope(v8::Isolate::GetCurrent()) {} + + inline static int NumberOfHandles() { + return v8::EscapableHandleScope::NumberOfHandles(v8::Isolate::GetCurrent()); + } + + template + inline v8::Local Escape(v8::Local value) { + return scope.Escape(value); + } + + private: + v8::EscapableHandleScope scope; +#else + inline EscapableHandleScope() : scope() {} + + inline static int NumberOfHandles() { + return v8::HandleScope::NumberOfHandles(); + } + + template + inline v8::Local Escape(v8::Local value) { + return scope.Close(value); + } + + private: + v8::HandleScope scope; +#endif + + private: + // Make it hard to create heap-allocated or illegal handle scopes by + // disallowing certain operations. + EscapableHandleScope(const EscapableHandleScope &); + void operator=(const EscapableHandleScope &); + void *operator new(size_t size); + void operator delete(void *, size_t); +}; + +//=== TryCatch ================================================================= + +class TryCatch { + v8::TryCatch try_catch_; + friend void FatalException(const TryCatch&); + + public: +#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION + TryCatch() : try_catch_(v8::Isolate::GetCurrent()) {} +#endif + + inline bool HasCaught() const { return try_catch_.HasCaught(); } + + inline bool CanContinue() const { return try_catch_.CanContinue(); } + + inline v8::Local ReThrow() { +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + return New(try_catch_.ReThrow()); +#else + return try_catch_.ReThrow(); +#endif + } + + inline v8::Local Exception() const { + return try_catch_.Exception(); + } + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + inline v8::MaybeLocal StackTrace() const { + return try_catch_.StackTrace(GetCurrentContext()); + } +#else + inline MaybeLocal StackTrace() const { + return MaybeLocal(try_catch_.StackTrace()); + } +#endif + + inline v8::Local Message() const { + return try_catch_.Message(); + } + + inline void Reset() { try_catch_.Reset(); } + + inline void SetVerbose(bool value) { try_catch_.SetVerbose(value); } + + inline void SetCaptureMessage(bool value) { + try_catch_.SetCaptureMessage(value); + } +}; + +//============ ================================================================= + +/* node 0.12 */ +#if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION + inline + void SetCounterFunction(v8::CounterLookupCallback cb) { + v8::Isolate::GetCurrent()->SetCounterFunction(cb); + } + + inline + void SetCreateHistogramFunction(v8::CreateHistogramCallback cb) { + v8::Isolate::GetCurrent()->SetCreateHistogramFunction(cb); + } + + inline + void SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) { + v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb); + } + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + inline bool IdleNotification(int idle_time_in_ms) { + return v8::Isolate::GetCurrent()->IdleNotificationDeadline( + idle_time_in_ms * 0.001); + } +# else + inline bool IdleNotification(int idle_time_in_ms) { + return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms); + } +#endif + + inline void LowMemoryNotification() { + v8::Isolate::GetCurrent()->LowMemoryNotification(); + } + + inline void ContextDisposedNotification() { + v8::Isolate::GetCurrent()->ContextDisposedNotification(); + } +#else + inline + void SetCounterFunction(v8::CounterLookupCallback cb) { + v8::V8::SetCounterFunction(cb); + } + + inline + void SetCreateHistogramFunction(v8::CreateHistogramCallback cb) { + v8::V8::SetCreateHistogramFunction(cb); + } + + inline + void SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) { + v8::V8::SetAddHistogramSampleFunction(cb); + } + + inline bool IdleNotification(int idle_time_in_ms) { + return v8::V8::IdleNotification(idle_time_in_ms); + } + + inline void LowMemoryNotification() { + v8::V8::LowMemoryNotification(); + } + + inline void ContextDisposedNotification() { + v8::V8::ContextDisposedNotification(); + } +#endif + +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) // Node 0.12 + inline v8::Local Undefined() { +# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + EscapableHandleScope scope; + return scope.Escape(New(v8::Undefined(v8::Isolate::GetCurrent()))); +# else + return v8::Undefined(v8::Isolate::GetCurrent()); +# endif + } + + inline v8::Local Null() { +# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + EscapableHandleScope scope; + return scope.Escape(New(v8::Null(v8::Isolate::GetCurrent()))); +# else + return v8::Null(v8::Isolate::GetCurrent()); +# endif + } + + inline v8::Local True() { +# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + EscapableHandleScope scope; + return scope.Escape(New(v8::True(v8::Isolate::GetCurrent()))); +# else + return v8::True(v8::Isolate::GetCurrent()); +# endif + } + + inline v8::Local False() { +# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + EscapableHandleScope scope; + return scope.Escape(New(v8::False(v8::Isolate::GetCurrent()))); +# else + return v8::False(v8::Isolate::GetCurrent()); +# endif + } + + inline v8::Local EmptyString() { + return v8::String::Empty(v8::Isolate::GetCurrent()); + } + + inline int AdjustExternalMemory(int bc) { + return static_cast( + v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc)); + } + + inline void SetTemplate( + v8::Local templ + , const char *name + , v8::Local value) { + templ->Set(v8::Isolate::GetCurrent(), name, value); + } + + inline void SetTemplate( + v8::Local templ + , v8::Local name + , v8::Local value + , v8::PropertyAttribute attributes) { + templ->Set(name, value, attributes); + } + + inline v8::Local GetCurrentContext() { + return v8::Isolate::GetCurrent()->GetCurrentContext(); + } + + inline void* GetInternalFieldPointer( + v8::Local object + , int index) { + return object->GetAlignedPointerFromInternalField(index); + } + + inline void SetInternalFieldPointer( + v8::Local object + , int index + , void* value) { + object->SetAlignedPointerInInternalField(index, value); + } + +# define NAN_GC_CALLBACK(name) \ + void name(v8::Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags) + +#if NODE_MODULE_VERSION <= NODE_4_0_MODULE_VERSION + typedef v8::Isolate::GCEpilogueCallback GCEpilogueCallback; + typedef v8::Isolate::GCPrologueCallback GCPrologueCallback; +#else + typedef v8::Isolate::GCCallback GCEpilogueCallback; + typedef v8::Isolate::GCCallback GCPrologueCallback; +#endif + + inline void AddGCEpilogueCallback( + GCEpilogueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::Isolate::GetCurrent()->AddGCEpilogueCallback(callback, gc_type_filter); + } + + inline void RemoveGCEpilogueCallback( + GCEpilogueCallback callback) { + v8::Isolate::GetCurrent()->RemoveGCEpilogueCallback(callback); + } + + inline void AddGCPrologueCallback( + GCPrologueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::Isolate::GetCurrent()->AddGCPrologueCallback(callback, gc_type_filter); + } + + inline void RemoveGCPrologueCallback( + GCPrologueCallback callback) { + v8::Isolate::GetCurrent()->RemoveGCPrologueCallback(callback); + } + + inline void GetHeapStatistics( + v8::HeapStatistics *heap_statistics) { + v8::Isolate::GetCurrent()->GetHeapStatistics(heap_statistics); + } + +# define X(NAME) \ + inline v8::Local NAME(const char *msg) { \ + EscapableHandleScope scope; \ + return scope.Escape(v8::Exception::NAME(New(msg).ToLocalChecked())); \ + } \ + \ + inline \ + v8::Local NAME(v8::Local msg) { \ + return v8::Exception::NAME(msg); \ + } \ + \ + inline void Throw ## NAME(const char *msg) { \ + HandleScope scope; \ + v8::Isolate::GetCurrent()->ThrowException( \ + v8::Exception::NAME(New(msg).ToLocalChecked())); \ + } \ + \ + inline void Throw ## NAME(v8::Local msg) { \ + HandleScope scope; \ + v8::Isolate::GetCurrent()->ThrowException( \ + v8::Exception::NAME(msg)); \ + } + + X(Error) + X(RangeError) + X(ReferenceError) + X(SyntaxError) + X(TypeError) + +# undef X + + inline void ThrowError(v8::Local error) { + v8::Isolate::GetCurrent()->ThrowException(error); + } + + inline MaybeLocal NewBuffer( + char *data + , size_t length +#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION + , node::Buffer::FreeCallback callback +#else + , node::smalloc::FreeCallback callback +#endif + , void *hint + ) { + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + assert(length <= imp::kMaxLength && "too large buffer"); +#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION + return node::Buffer::New( + v8::Isolate::GetCurrent(), data, length, callback, hint); +#else + return MaybeLocal(node::Buffer::New( + v8::Isolate::GetCurrent(), data, length, callback, hint)); +#endif + } + + inline MaybeLocal CopyBuffer( + const char *data + , uint32_t size + ) { + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + assert(size <= imp::kMaxLength && "too large buffer"); +#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION + return node::Buffer::Copy( + v8::Isolate::GetCurrent(), data, size); +#else + return MaybeLocal(node::Buffer::New( + v8::Isolate::GetCurrent(), data, size)); +#endif + } + + inline MaybeLocal NewBuffer(uint32_t size) { + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + assert(size <= imp::kMaxLength && "too large buffer"); +#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION + return node::Buffer::New( + v8::Isolate::GetCurrent(), size); +#else + return MaybeLocal(node::Buffer::New( + v8::Isolate::GetCurrent(), size)); +#endif + } + + inline MaybeLocal NewBuffer( + char* data + , uint32_t size + ) { + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + assert(size <= imp::kMaxLength && "too large buffer"); +#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION + return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); +#else + return MaybeLocal( + node::Buffer::Use(v8::Isolate::GetCurrent(), data, size)); +#endif + } + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + inline MaybeLocal + NewOneByteString(const uint8_t * value, int length = -1) { + return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), value, + v8::NewStringType::kNormal, length); + } + + inline MaybeLocal CompileScript( + v8::Local s + , const v8::ScriptOrigin& origin + ) { + v8::ScriptCompiler::Source source(s, origin); + return v8::ScriptCompiler::Compile(GetCurrentContext(), &source); + } + + inline MaybeLocal CompileScript( + v8::Local s + ) { + v8::ScriptCompiler::Source source(s); + return v8::ScriptCompiler::Compile(GetCurrentContext(), &source); + } + + inline MaybeLocal RunScript( + v8::Local script + ) { + return script->BindToCurrentContext()->Run(GetCurrentContext()); + } + + inline MaybeLocal RunScript( + v8::Local script + ) { + return script->Run(GetCurrentContext()); + } +#else + inline MaybeLocal + NewOneByteString(const uint8_t * value, int length = -1) { + return MaybeLocal( + v8::String::NewFromOneByte( + v8::Isolate::GetCurrent() + , value + , v8::String::kNormalString, length)); + } + + inline MaybeLocal CompileScript( + v8::Local s + , const v8::ScriptOrigin& origin + ) { + v8::ScriptCompiler::Source source(s, origin); + return MaybeLocal( + v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source)); + } + + inline MaybeLocal CompileScript( + v8::Local s + ) { + v8::ScriptCompiler::Source source(s); + return MaybeLocal( + v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source)); + } + + inline MaybeLocal RunScript( + v8::Local script + ) { + return MaybeLocal(script->BindToCurrentContext()->Run()); + } + + inline MaybeLocal RunScript( + v8::Local script + ) { + return MaybeLocal(script->Run()); + } +#endif + + inline v8::Local MakeCallback( + v8::Local target + , v8::Local func + , int argc + , v8::Local* argv) { +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + return New(node::MakeCallback( + v8::Isolate::GetCurrent(), target, func, argc, argv)); +#else + return node::MakeCallback( + v8::Isolate::GetCurrent(), target, func, argc, argv); +#endif + } + + inline v8::Local MakeCallback( + v8::Local target + , v8::Local symbol + , int argc + , v8::Local* argv) { +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + return New(node::MakeCallback( + v8::Isolate::GetCurrent(), target, symbol, argc, argv)); +#else + return node::MakeCallback( + v8::Isolate::GetCurrent(), target, symbol, argc, argv); +#endif + } + + inline v8::Local MakeCallback( + v8::Local target + , const char* method + , int argc + , v8::Local* argv) { +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + return New(node::MakeCallback( + v8::Isolate::GetCurrent(), target, method, argc, argv)); +#else + return node::MakeCallback( + v8::Isolate::GetCurrent(), target, method, argc, argv); +#endif + } + + inline void FatalException(const TryCatch& try_catch) { + node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_); + } + + inline v8::Local ErrnoException( + int errorno + , const char* syscall = NULL + , const char* message = NULL + , const char* path = NULL) { + return node::ErrnoException(v8::Isolate::GetCurrent(), errorno, syscall, + message, path); + } + + NAN_DEPRECATED inline v8::Local NanErrnoException( + int errorno + , const char* syscall = NULL + , const char* message = NULL + , const char* path = NULL) { + return ErrnoException(errorno, syscall, message, path); + } + + template + inline void SetIsolateData( + v8::Isolate *isolate + , T *data + ) { + isolate->SetData(0, data); + } + + template + inline T *GetIsolateData( + v8::Isolate *isolate + ) { + return static_cast(isolate->GetData(0)); + } + +class Utf8String { + public: + inline explicit Utf8String(v8::Local from) : + length_(0), str_(str_st_) { + if (!from.IsEmpty()) { + v8::Local string = from->ToString(); + if (!string.IsEmpty()) { + size_t len = 3 * string->Length() + 1; + assert(len <= INT_MAX); + if (len > sizeof (str_st_)) { + str_ = static_cast(malloc(len)); + assert(str_ != 0); + } + const int flags = + v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8; + length_ = string->WriteUtf8(str_, static_cast(len), 0, flags); + str_[length_] = '\0'; + } + } + } + + inline int length() const { + return length_; + } + + inline char* operator*() { return str_; } + inline const char* operator*() const { return str_; } + + inline ~Utf8String() { + if (str_ != str_st_) { + free(str_); + } + } + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String) + + int length_; + char *str_; + char str_st_[1024]; +}; + +#else // Node 0.8 and 0.10 + inline v8::Local Undefined() { + EscapableHandleScope scope; + return scope.Escape(New(v8::Undefined())); + } + + inline v8::Local Null() { + EscapableHandleScope scope; + return scope.Escape(New(v8::Null())); + } + + inline v8::Local True() { + EscapableHandleScope scope; + return scope.Escape(New(v8::True())); + } + + inline v8::Local False() { + EscapableHandleScope scope; + return scope.Escape(New(v8::False())); + } + + inline v8::Local EmptyString() { + return v8::String::Empty(); + } + + inline int AdjustExternalMemory(int bc) { + return static_cast(v8::V8::AdjustAmountOfExternalAllocatedMemory(bc)); + } + + inline void SetTemplate( + v8::Local templ + , const char *name + , v8::Local value) { + templ->Set(name, value); + } + + inline void SetTemplate( + v8::Local templ + , v8::Local name + , v8::Local value + , v8::PropertyAttribute attributes) { + templ->Set(name, value, attributes); + } + + inline v8::Local GetCurrentContext() { + return v8::Context::GetCurrent(); + } + + inline void* GetInternalFieldPointer( + v8::Local object + , int index) { + return object->GetPointerFromInternalField(index); + } + + inline void SetInternalFieldPointer( + v8::Local object + , int index + , void* value) { + object->SetPointerInInternalField(index, value); + } + +# define NAN_GC_CALLBACK(name) \ + void name(v8::GCType type, v8::GCCallbackFlags flags) + + inline void AddGCEpilogueCallback( + v8::GCEpilogueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::V8::AddGCEpilogueCallback(callback, gc_type_filter); + } + inline void RemoveGCEpilogueCallback( + v8::GCEpilogueCallback callback) { + v8::V8::RemoveGCEpilogueCallback(callback); + } + inline void AddGCPrologueCallback( + v8::GCPrologueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::V8::AddGCPrologueCallback(callback, gc_type_filter); + } + inline void RemoveGCPrologueCallback( + v8::GCPrologueCallback callback) { + v8::V8::RemoveGCPrologueCallback(callback); + } + inline void GetHeapStatistics( + v8::HeapStatistics *heap_statistics) { + v8::V8::GetHeapStatistics(heap_statistics); + } + +# define X(NAME) \ + inline v8::Local NAME(const char *msg) { \ + EscapableHandleScope scope; \ + return scope.Escape(v8::Exception::NAME(New(msg).ToLocalChecked())); \ + } \ + \ + inline \ + v8::Local NAME(v8::Local msg) { \ + return v8::Exception::NAME(msg); \ + } \ + \ + inline void Throw ## NAME(const char *msg) { \ + HandleScope scope; \ + v8::ThrowException(v8::Exception::NAME(New(msg).ToLocalChecked())); \ + } \ + \ + inline \ + void Throw ## NAME(v8::Local errmsg) { \ + v8::ThrowException(v8::Exception::NAME(errmsg)); \ + } + + X(Error) + X(RangeError) + X(ReferenceError) + X(SyntaxError) + X(TypeError) + +# undef X + + inline void ThrowError(v8::Local error) { + v8::ThrowException(error); + } + + inline MaybeLocal NewBuffer( + char *data + , size_t length + , node::Buffer::free_callback callback + , void *hint + ) { + EscapableHandleScope scope; + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + assert(length <= imp::kMaxLength && "too large buffer"); + return MaybeLocal(scope.Escape( + New(node::Buffer::New(data, length, callback, hint)->handle_))); + } + + inline MaybeLocal CopyBuffer( + const char *data + , uint32_t size + ) { + EscapableHandleScope scope; + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + assert(size <= imp::kMaxLength && "too large buffer"); +#if NODE_MODULE_VERSION >= NODE_0_10_MODULE_VERSION + return MaybeLocal( + scope.Escape(New(node::Buffer::New(data, size)->handle_))); +#else + return MaybeLocal(scope.Escape( + New(node::Buffer::New(const_cast(data), size)->handle_))); +#endif + } + + inline MaybeLocal NewBuffer(uint32_t size) { + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + EscapableHandleScope scope; + assert(size <= imp::kMaxLength && "too large buffer"); + return MaybeLocal( + scope.Escape(New(node::Buffer::New(size)->handle_))); + } + + inline void FreeData(char *data, void *hint) { + (void) hint; // unused + delete[] data; + } + + inline MaybeLocal NewBuffer( + char* data + , uint32_t size + ) { + EscapableHandleScope scope; + // arbitrary buffer lengths requires + // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION + assert(size <= imp::kMaxLength && "too large buffer"); + return MaybeLocal(scope.Escape(New( + node::Buffer::New(data, size, FreeData, NULL)->handle_))); + } + +namespace imp { +inline void +widenString(std::vector *ws, const uint8_t *s, int l) { + size_t len = static_cast(l); + if (l < 0) { + len = strlen(reinterpret_cast(s)); + } + assert(len <= INT_MAX && "string too long"); + ws->resize(len); + std::copy(s, s + len, ws->begin()); // NOLINT(build/include_what_you_use) +} +} // end of namespace imp + + inline MaybeLocal + NewOneByteString(const uint8_t * value, int length = -1) { + std::vector wideString; // NOLINT(build/include_what_you_use) + imp::widenString(&wideString, value, length); + return imp::Factory::return_t(v8::String::New( + &wideString.front(), static_cast(wideString.size()))); + } + + inline MaybeLocal CompileScript( + v8::Local s + , const v8::ScriptOrigin& origin + ) { + return MaybeLocal( + v8::Script::Compile(s, const_cast(&origin))); + } + + inline MaybeLocal CompileScript( + v8::Local s + ) { + return MaybeLocal(v8::Script::Compile(s)); + } + + inline + MaybeLocal RunScript(v8::Local script) { + return MaybeLocal(script->Run()); + } + + inline v8::Local MakeCallback( + v8::Local target + , v8::Local func + , int argc + , v8::Local* argv) { + return New(node::MakeCallback(target, func, argc, argv)); + } + + inline v8::Local MakeCallback( + v8::Local target + , v8::Local symbol + , int argc + , v8::Local* argv) { + return New(node::MakeCallback(target, symbol, argc, argv)); + } + + inline v8::Local MakeCallback( + v8::Local target + , const char* method + , int argc + , v8::Local* argv) { + return New(node::MakeCallback(target, method, argc, argv)); + } + + inline void FatalException(const TryCatch& try_catch) { + node::FatalException(const_cast(try_catch.try_catch_)); + } + + inline v8::Local ErrnoException( + int errorno + , const char* syscall = NULL + , const char* message = NULL + , const char* path = NULL) { + return node::ErrnoException(errorno, syscall, message, path); + } + + NAN_DEPRECATED inline v8::Local NanErrnoException( + int errorno + , const char* syscall = NULL + , const char* message = NULL + , const char* path = NULL) { + return ErrnoException(errorno, syscall, message, path); + } + + + template + inline void SetIsolateData( + v8::Isolate *isolate + , T *data + ) { + isolate->SetData(data); + } + + template + inline T *GetIsolateData( + v8::Isolate *isolate + ) { + return static_cast(isolate->GetData()); + } + +class Utf8String { + public: + inline explicit Utf8String(v8::Local from) : + length_(0), str_(str_st_) { + if (!from.IsEmpty()) { + v8::Local string = from->ToString(); + if (!string.IsEmpty()) { + size_t len = 3 * string->Length() + 1; + assert(len <= INT_MAX); + if (len > sizeof (str_st_)) { + str_ = static_cast(malloc(len)); + assert(str_ != 0); + } + const int flags = + v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8; + length_ = string->WriteUtf8(str_, static_cast(len), 0, flags); + str_[length_] = '\0'; + } + } + } + + inline int length() const { + return length_; + } + + inline char* operator*() { return str_; } + inline const char* operator*() const { return str_; } + + inline ~Utf8String() { + if (str_ != str_st_) { + free(str_); + } + } + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String) + + int length_; + char *str_; + char str_st_[1024]; +}; + +#endif // NODE_MODULE_VERSION + +typedef void (*FreeCallback)(char *data, void *hint); + +typedef const FunctionCallbackInfo& NAN_METHOD_ARGS_TYPE; +typedef void NAN_METHOD_RETURN_TYPE; + +typedef const PropertyCallbackInfo& NAN_GETTER_ARGS_TYPE; +typedef void NAN_GETTER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& NAN_SETTER_ARGS_TYPE; +typedef void NAN_SETTER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_PROPERTY_GETTER_ARGS_TYPE; +typedef void NAN_PROPERTY_GETTER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_PROPERTY_SETTER_ARGS_TYPE; +typedef void NAN_PROPERTY_SETTER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_PROPERTY_ENUMERATOR_ARGS_TYPE; +typedef void NAN_PROPERTY_ENUMERATOR_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_PROPERTY_DELETER_ARGS_TYPE; +typedef void NAN_PROPERTY_DELETER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_PROPERTY_QUERY_ARGS_TYPE; +typedef void NAN_PROPERTY_QUERY_RETURN_TYPE; + +typedef const PropertyCallbackInfo& NAN_INDEX_GETTER_ARGS_TYPE; +typedef void NAN_INDEX_GETTER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& NAN_INDEX_SETTER_ARGS_TYPE; +typedef void NAN_INDEX_SETTER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_INDEX_ENUMERATOR_ARGS_TYPE; +typedef void NAN_INDEX_ENUMERATOR_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_INDEX_DELETER_ARGS_TYPE; +typedef void NAN_INDEX_DELETER_RETURN_TYPE; + +typedef const PropertyCallbackInfo& + NAN_INDEX_QUERY_ARGS_TYPE; +typedef void NAN_INDEX_QUERY_RETURN_TYPE; + +#define NAN_METHOD(name) \ + Nan::NAN_METHOD_RETURN_TYPE name(Nan::NAN_METHOD_ARGS_TYPE info) +#define NAN_GETTER(name) \ + Nan::NAN_GETTER_RETURN_TYPE name( \ + v8::Local property \ + , Nan::NAN_GETTER_ARGS_TYPE info) +#define NAN_SETTER(name) \ + Nan::NAN_SETTER_RETURN_TYPE name( \ + v8::Local property \ + , v8::Local value \ + , Nan::NAN_SETTER_ARGS_TYPE info) +#define NAN_PROPERTY_GETTER(name) \ + Nan::NAN_PROPERTY_GETTER_RETURN_TYPE name( \ + v8::Local property \ + , Nan::NAN_PROPERTY_GETTER_ARGS_TYPE info) +#define NAN_PROPERTY_SETTER(name) \ + Nan::NAN_PROPERTY_SETTER_RETURN_TYPE name( \ + v8::Local property \ + , v8::Local value \ + , Nan::NAN_PROPERTY_SETTER_ARGS_TYPE info) +#define NAN_PROPERTY_ENUMERATOR(name) \ + Nan::NAN_PROPERTY_ENUMERATOR_RETURN_TYPE name( \ + Nan::NAN_PROPERTY_ENUMERATOR_ARGS_TYPE info) +#define NAN_PROPERTY_DELETER(name) \ + Nan::NAN_PROPERTY_DELETER_RETURN_TYPE name( \ + v8::Local property \ + , Nan::NAN_PROPERTY_DELETER_ARGS_TYPE info) +#define NAN_PROPERTY_QUERY(name) \ + Nan::NAN_PROPERTY_QUERY_RETURN_TYPE name( \ + v8::Local property \ + , Nan::NAN_PROPERTY_QUERY_ARGS_TYPE info) +# define NAN_INDEX_GETTER(name) \ + Nan::NAN_INDEX_GETTER_RETURN_TYPE name( \ + uint32_t index \ + , Nan::NAN_INDEX_GETTER_ARGS_TYPE info) +#define NAN_INDEX_SETTER(name) \ + Nan::NAN_INDEX_SETTER_RETURN_TYPE name( \ + uint32_t index \ + , v8::Local value \ + , Nan::NAN_INDEX_SETTER_ARGS_TYPE info) +#define NAN_INDEX_ENUMERATOR(name) \ + Nan::NAN_INDEX_ENUMERATOR_RETURN_TYPE \ + name(Nan::NAN_INDEX_ENUMERATOR_ARGS_TYPE info) +#define NAN_INDEX_DELETER(name) \ + Nan::NAN_INDEX_DELETER_RETURN_TYPE name( \ + uint32_t index \ + , Nan::NAN_INDEX_DELETER_ARGS_TYPE info) +#define NAN_INDEX_QUERY(name) \ + Nan::NAN_INDEX_QUERY_RETURN_TYPE name( \ + uint32_t index \ + , Nan::NAN_INDEX_QUERY_ARGS_TYPE info) + +class Callback { + public: + Callback() {} + + explicit Callback(const v8::Local &fn) : handle_(fn) {} + + ~Callback() { + handle_.Reset(); + } + + bool operator==(const Callback &other) const { + return handle_ == other.handle_; + } + + bool operator!=(const Callback &other) const { + return !operator==(other); + } + + inline + v8::Local operator*() const { return GetFunction(); } + + inline v8::Local operator()( + v8::Local target + , int argc = 0 + , v8::Local argv[] = 0) const { + return this->Call(target, argc, argv); + } + + inline v8::Local operator()( + int argc = 0 + , v8::Local argv[] = 0) const { + return this->Call(argc, argv); + } + + // TODO(kkoopa): remove + inline void SetFunction(const v8::Local &fn) { + Reset(fn); + } + + inline void Reset(const v8::Local &fn) { + handle_.Reset(fn); + } + + inline void Reset() { + handle_.Reset(); + } + + inline v8::Local GetFunction() const { + return New(handle_); + } + + inline bool IsEmpty() const { + return handle_.IsEmpty(); + } + + inline v8::Local + Call(v8::Local target + , int argc + , v8::Local argv[]) const { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + return Call_(isolate, target, argc, argv); +#else + return Call_(target, argc, argv); +#endif + } + + inline v8::Local + Call(int argc, v8::Local argv[]) const { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + return Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv); +#else + return Call_(v8::Context::GetCurrent()->Global(), argc, argv); +#endif + } + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(Callback) + Persistent handle_; + +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + v8::Local Call_(v8::Isolate *isolate + , v8::Local target + , int argc + , v8::Local argv[]) const { + EscapableHandleScope scope; + + v8::Local callback = New(handle_); +# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION + return scope.Escape(New(node::MakeCallback( + isolate + , target + , callback + , argc + , argv + ))); +# else + return scope.Escape(node::MakeCallback( + isolate + , target + , callback + , argc + , argv + )); +# endif + } +#else + v8::Local Call_(v8::Local target + , int argc + , v8::Local argv[]) const { + EscapableHandleScope scope; + + v8::Local callback = New(handle_); + return scope.Escape(New(node::MakeCallback( + target + , callback + , argc + , argv + ))); + } +#endif +}; + +/* abstract */ class AsyncWorker { + public: + explicit AsyncWorker(Callback *callback_) + : callback(callback_), errmsg_(NULL) { + request.data = this; + + HandleScope scope; + v8::Local obj = New(); + persistentHandle.Reset(obj); + } + + virtual ~AsyncWorker() { + HandleScope scope; + + if (!persistentHandle.IsEmpty()) + persistentHandle.Reset(); + delete callback; + delete[] errmsg_; + } + + virtual void WorkComplete() { + HandleScope scope; + + if (errmsg_ == NULL) + HandleOKCallback(); + else + HandleErrorCallback(); + delete callback; + callback = NULL; + } + + inline void SaveToPersistent( + const char *key, const v8::Local &value) { + HandleScope scope; + New(persistentHandle)->Set(New(key).ToLocalChecked(), value); + } + + inline void SaveToPersistent( + const v8::Local &key, const v8::Local &value) { + HandleScope scope; + New(persistentHandle)->Set(key, value); + } + + inline void SaveToPersistent( + uint32_t index, const v8::Local &value) { + HandleScope scope; + New(persistentHandle)->Set(index, value); + } + + inline v8::Local GetFromPersistent(const char *key) const { + EscapableHandleScope scope; + return scope.Escape( + New(persistentHandle)->Get(New(key).ToLocalChecked())); + } + + inline v8::Local + GetFromPersistent(const v8::Local &key) const { + EscapableHandleScope scope; + return scope.Escape(New(persistentHandle)->Get(key)); + } + + inline v8::Local GetFromPersistent(uint32_t index) const { + EscapableHandleScope scope; + return scope.Escape(New(persistentHandle)->Get(index)); + } + + virtual void Execute() = 0; + + uv_work_t request; + + virtual void Destroy() { + delete this; + } + + protected: + Persistent persistentHandle; + Callback *callback; + + virtual void HandleOKCallback() { + callback->Call(0, NULL); + } + + virtual void HandleErrorCallback() { + HandleScope scope; + + v8::Local argv[] = { + v8::Exception::Error(New(ErrorMessage()).ToLocalChecked()) + }; + callback->Call(1, argv); + } + + void SetErrorMessage(const char *msg) { + delete[] errmsg_; + + size_t size = strlen(msg) + 1; + errmsg_ = new char[size]; + memcpy(errmsg_, msg, size); + } + + const char* ErrorMessage() const { + return errmsg_; + } + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(AsyncWorker) + char *errmsg_; +}; + + +template +/* abstract */ class AsyncProgressWorkerBase : public AsyncWorker { + public: + explicit AsyncProgressWorkerBase(Callback *callback_) + : AsyncWorker(callback_), asyncdata_(NULL), asyncsize_(0) { + async = new uv_async_t; + uv_async_init( + uv_default_loop() + , async + , AsyncProgress_ + ); + async->data = this; + + uv_mutex_init(&async_lock); + } + + virtual ~AsyncProgressWorkerBase() { + uv_mutex_destroy(&async_lock); + + delete[] asyncdata_; + } + + void WorkProgress() { + uv_mutex_lock(&async_lock); + T *data = asyncdata_; + size_t size = asyncsize_; + asyncdata_ = NULL; + uv_mutex_unlock(&async_lock); + + // Don't send progress events after we've already completed. + if (callback) { + HandleProgressCallback(data, size); + } + delete[] data; + } + + class ExecutionProgress { + friend class AsyncProgressWorkerBase; + public: + void Signal() const { + uv_async_send(that_->async); + } + + void Send(const T* data, size_t size) const { + that_->SendProgress_(data, size); + } + + private: + explicit ExecutionProgress(AsyncProgressWorkerBase *that) : that_(that) {} + NAN_DISALLOW_ASSIGN_COPY_MOVE(ExecutionProgress) + AsyncProgressWorkerBase* const that_; + }; + + virtual void Execute(const ExecutionProgress& progress) = 0; + virtual void HandleProgressCallback(const T *data, size_t size) = 0; + + virtual void Destroy() { + uv_close(reinterpret_cast(async), AsyncClose_); + } + + private: + void Execute() /*final override*/ { + ExecutionProgress progress(this); + Execute(progress); + } + + void SendProgress_(const T *data, size_t size) { + T *new_data = new T[size]; + { + T *it = new_data; + std::copy(data, data + size, it); + } + + uv_mutex_lock(&async_lock); + T *old_data = asyncdata_; + asyncdata_ = new_data; + asyncsize_ = size; + uv_mutex_unlock(&async_lock); + + delete[] old_data; + uv_async_send(async); + } + + inline static NAUV_WORK_CB(AsyncProgress_) { + AsyncProgressWorkerBase *worker = + static_cast(async->data); + worker->WorkProgress(); + } + + inline static void AsyncClose_(uv_handle_t* handle) { + AsyncProgressWorkerBase *worker = + static_cast(handle->data); + delete reinterpret_cast(handle); + delete worker; + } + + uv_async_t *async; + uv_mutex_t async_lock; + T *asyncdata_; + size_t asyncsize_; +}; + +// This ensures compatibility to the previous un-templated AsyncProgressWorker +// class definition. +typedef AsyncProgressWorkerBase AsyncProgressWorker; + +inline void AsyncExecute (uv_work_t* req) { + AsyncWorker *worker = static_cast(req->data); + worker->Execute(); +} + +inline void AsyncExecuteComplete (uv_work_t* req) { + AsyncWorker* worker = static_cast(req->data); + worker->WorkComplete(); + worker->Destroy(); +} + +inline void AsyncQueueWorker (AsyncWorker* worker) { + uv_queue_work( + uv_default_loop() + , &worker->request + , AsyncExecute + , reinterpret_cast(AsyncExecuteComplete) + ); +} + +namespace imp { + +inline +ExternalOneByteStringResource const* +GetExternalResource(v8::Local str) { +#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION + return str->GetExternalAsciiStringResource(); +#else + return str->GetExternalOneByteStringResource(); +#endif +} + +inline +bool +IsExternal(v8::Local str) { +#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION + return str->IsExternalAscii(); +#else + return str->IsExternalOneByte(); +#endif +} + +} // end of namespace imp + +enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER}; + +#if NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION +# include "nan_string_bytes.h" // NOLINT(build/include) +#endif + +inline v8::Local Encode( + const void *buf, size_t len, enum Encoding encoding = BINARY) { +#if (NODE_MODULE_VERSION >= ATOM_0_21_MODULE_VERSION) + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + node::encoding node_enc = static_cast(encoding); + + if (encoding == UCS2) { + return node::Encode( + isolate + , reinterpret_cast(buf) + , len / 2); + } else { + return node::Encode( + isolate + , reinterpret_cast(buf) + , len + , node_enc); + } +#elif (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + return node::Encode( + v8::Isolate::GetCurrent() + , buf, len + , static_cast(encoding)); +#else +# if NODE_MODULE_VERSION >= NODE_0_10_MODULE_VERSION + return node::Encode(buf, len, static_cast(encoding)); +# else + return imp::Encode(reinterpret_cast(buf), len, encoding); +# endif +#endif +} + +inline ssize_t DecodeBytes( + v8::Local val, enum Encoding encoding = BINARY) { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + return node::DecodeBytes( + v8::Isolate::GetCurrent() + , val + , static_cast(encoding)); +#else +# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION) + if (encoding == BUFFER) { + return node::DecodeBytes(val, node::BINARY); + } +# endif + return node::DecodeBytes(val, static_cast(encoding)); +#endif +} + +inline ssize_t DecodeWrite( + char *buf + , size_t len + , v8::Local val + , enum Encoding encoding = BINARY) { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + return node::DecodeWrite( + v8::Isolate::GetCurrent() + , buf + , len + , val + , static_cast(encoding)); +#else +# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION) + if (encoding == BUFFER) { + return node::DecodeWrite(buf, len, val, node::BINARY); + } +# endif + return node::DecodeWrite( + buf + , len + , val + , static_cast(encoding)); +#endif +} + +inline void SetPrototypeTemplate( + v8::Local templ + , const char *name + , v8::Local value +) { + SetTemplate(templ->PrototypeTemplate(), name, value); +} + +inline void SetPrototypeTemplate( + v8::Local templ + , v8::Local name + , v8::Local value + , v8::PropertyAttribute attributes +) { + SetTemplate(templ->PrototypeTemplate(), name, value, attributes); +} + +inline void SetInstanceTemplate( + v8::Local templ + , const char *name + , v8::Local value +) { + SetTemplate(templ->InstanceTemplate(), name, value); +} + +inline void SetInstanceTemplate( + v8::Local templ + , v8::Local name + , v8::Local value + , v8::PropertyAttribute attributes +) { + SetTemplate(templ->InstanceTemplate(), name, value, attributes); +} + +namespace imp { + +// Note(@agnat): Helper to distinguish different receiver types. The first +// version deals with receivers derived from v8::Template. The second version +// handles everything else. The final argument only serves as discriminator and +// is unused. +template +inline +void +SetMethodAux(T recv, + v8::Local name, + v8::Local tpl, + v8::Template *) { + recv->Set(name, tpl); +} + +template +inline +void +SetMethodAux(T recv, + v8::Local name, + v8::Local tpl, + ...) { + recv->Set(name, GetFunction(tpl).ToLocalChecked()); +} + +} // end of namespace imp + +template class HandleType> +inline void SetMethod( + HandleType recv + , const char *name + , FunctionCallback callback) { + HandleScope scope; + v8::Local t = New(callback); + v8::Local fn_name = New(name).ToLocalChecked(); + t->SetClassName(fn_name); + // Note(@agnat): Pass an empty T* as discriminator. See note on + // SetMethodAux(...) above + imp::SetMethodAux(recv, fn_name, t, static_cast(0)); +} + +inline void SetPrototypeMethod( + v8::Local recv + , const char* name, FunctionCallback callback) { + HandleScope scope; + v8::Local t = New( + callback + , v8::Local() + , New(recv)); + v8::Local fn_name = New(name).ToLocalChecked(); + recv->PrototypeTemplate()->Set(fn_name, t); + t->SetClassName(fn_name); +} + +//=== Accessors and Such ======================================================= + +inline void SetAccessor( + v8::Local tpl + , v8::Local name + , GetterCallback getter + , SetterCallback setter = 0 + , v8::Local data = v8::Local() + , v8::AccessControl settings = v8::DEFAULT + , v8::PropertyAttribute attribute = v8::None + , imp::Sig signature = imp::Sig()) { + HandleScope scope; + + imp::NativeGetter getter_ = + imp::GetterCallbackWrapper; + imp::NativeSetter setter_ = + setter ? imp::SetterCallbackWrapper : 0; + + v8::Local otpl = New(); + otpl->SetInternalFieldCount(imp::kAccessorFieldCount); + v8::Local obj = NewInstance(otpl).ToLocalChecked(); + + obj->SetInternalField( + imp::kGetterIndex + , New(reinterpret_cast(getter))); + + if (setter != 0) { + obj->SetInternalField( + imp::kSetterIndex + , New(reinterpret_cast(setter))); + } + + if (!data.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, data); + } + + tpl->SetAccessor( + name + , getter_ + , setter_ + , obj + , settings + , attribute + , signature); +} + +inline bool SetAccessor( + v8::Local obj + , v8::Local name + , GetterCallback getter + , SetterCallback setter = 0 + , v8::Local data = v8::Local() + , v8::AccessControl settings = v8::DEFAULT + , v8::PropertyAttribute attribute = v8::None) { + EscapableHandleScope scope; + + imp::NativeGetter getter_ = + imp::GetterCallbackWrapper; + imp::NativeSetter setter_ = + setter ? imp::SetterCallbackWrapper : 0; + + v8::Local otpl = New(); + otpl->SetInternalFieldCount(imp::kAccessorFieldCount); + v8::Local dataobj = NewInstance(otpl).ToLocalChecked(); + + dataobj->SetInternalField( + imp::kGetterIndex + , New(reinterpret_cast(getter))); + + if (!data.IsEmpty()) { + dataobj->SetInternalField(imp::kDataIndex, data); + } + + if (setter) { + dataobj->SetInternalField( + imp::kSetterIndex + , New(reinterpret_cast(setter))); + } + +#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION) + return obj->SetAccessor( + GetCurrentContext() + , name + , getter_ + , setter_ + , dataobj + , settings + , attribute).FromMaybe(false); +#else + return obj->SetAccessor( + name + , getter_ + , setter_ + , dataobj + , settings + , attribute); +#endif +} + +inline void SetNamedPropertyHandler( + v8::Local tpl + , PropertyGetterCallback getter + , PropertySetterCallback setter = 0 + , PropertyQueryCallback query = 0 + , PropertyDeleterCallback deleter = 0 + , PropertyEnumeratorCallback enumerator = 0 + , v8::Local data = v8::Local()) { + HandleScope scope; + + imp::NativePropertyGetter getter_ = + imp::PropertyGetterCallbackWrapper; + imp::NativePropertySetter setter_ = + setter ? imp::PropertySetterCallbackWrapper : 0; + imp::NativePropertyQuery query_ = + query ? imp::PropertyQueryCallbackWrapper : 0; + imp::NativePropertyDeleter *deleter_ = + deleter ? imp::PropertyDeleterCallbackWrapper : 0; + imp::NativePropertyEnumerator enumerator_ = + enumerator ? imp::PropertyEnumeratorCallbackWrapper : 0; + + v8::Local otpl = New(); + otpl->SetInternalFieldCount(imp::kPropertyFieldCount); + v8::Local obj = NewInstance(otpl).ToLocalChecked(); + obj->SetInternalField( + imp::kPropertyGetterIndex + , New(reinterpret_cast(getter))); + + if (setter) { + obj->SetInternalField( + imp::kPropertySetterIndex + , New(reinterpret_cast(setter))); + } + + if (query) { + obj->SetInternalField( + imp::kPropertyQueryIndex + , New(reinterpret_cast(query))); + } + + if (deleter) { + obj->SetInternalField( + imp::kPropertyDeleterIndex + , New(reinterpret_cast(deleter))); + } + + if (enumerator) { + obj->SetInternalField( + imp::kPropertyEnumeratorIndex + , New(reinterpret_cast(enumerator))); + } + + if (!data.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, data); + } + +#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION + tpl->SetHandler(v8::NamedPropertyHandlerConfiguration( + getter_, setter_, query_, deleter_, enumerator_, obj)); +#else + tpl->SetNamedPropertyHandler( + getter_ + , setter_ + , query_ + , deleter_ + , enumerator_ + , obj); +#endif +} + +inline void SetIndexedPropertyHandler( + v8::Local tpl + , IndexGetterCallback getter + , IndexSetterCallback setter = 0 + , IndexQueryCallback query = 0 + , IndexDeleterCallback deleter = 0 + , IndexEnumeratorCallback enumerator = 0 + , v8::Local data = v8::Local()) { + HandleScope scope; + + imp::NativeIndexGetter getter_ = + imp::IndexGetterCallbackWrapper; + imp::NativeIndexSetter setter_ = + setter ? imp::IndexSetterCallbackWrapper : 0; + imp::NativeIndexQuery query_ = + query ? imp::IndexQueryCallbackWrapper : 0; + imp::NativeIndexDeleter deleter_ = + deleter ? imp::IndexDeleterCallbackWrapper : 0; + imp::NativeIndexEnumerator enumerator_ = + enumerator ? imp::IndexEnumeratorCallbackWrapper : 0; + + v8::Local otpl = New(); + otpl->SetInternalFieldCount(imp::kIndexPropertyFieldCount); + v8::Local obj = NewInstance(otpl).ToLocalChecked(); + obj->SetInternalField( + imp::kIndexPropertyGetterIndex + , New(reinterpret_cast(getter))); + + if (setter) { + obj->SetInternalField( + imp::kIndexPropertySetterIndex + , New(reinterpret_cast(setter))); + } + + if (query) { + obj->SetInternalField( + imp::kIndexPropertyQueryIndex + , New(reinterpret_cast(query))); + } + + if (deleter) { + obj->SetInternalField( + imp::kIndexPropertyDeleterIndex + , New(reinterpret_cast(deleter))); + } + + if (enumerator) { + obj->SetInternalField( + imp::kIndexPropertyEnumeratorIndex + , New(reinterpret_cast(enumerator))); + } + + if (!data.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, data); + } + +#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION + tpl->SetHandler(v8::IndexedPropertyHandlerConfiguration( + getter_, setter_, query_, deleter_, enumerator_, obj)); +#else + tpl->SetIndexedPropertyHandler( + getter_ + , setter_ + , query_ + , deleter_ + , enumerator_ + , obj); +#endif +} + +inline void SetCallHandler( + v8::Local tpl + , FunctionCallback callback + , v8::Local data = v8::Local()) { + HandleScope scope; + + v8::Local otpl = New(); + otpl->SetInternalFieldCount(imp::kFunctionFieldCount); + v8::Local obj = NewInstance(otpl).ToLocalChecked(); + + obj->SetInternalField( + imp::kFunctionIndex + , New(reinterpret_cast(callback))); + + if (!data.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, data); + } + + tpl->SetCallHandler(imp::FunctionCallbackWrapper, obj); +} + + +inline void SetCallAsFunctionHandler( + v8::Local tpl, + FunctionCallback callback, + v8::Local data = v8::Local()) { + HandleScope scope; + + v8::Local otpl = New(); + otpl->SetInternalFieldCount(imp::kFunctionFieldCount); + v8::Local obj = NewInstance(otpl).ToLocalChecked(); + + obj->SetInternalField( + imp::kFunctionIndex + , New(reinterpret_cast(callback))); + + if (!data.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, data); + } + + tpl->SetCallAsFunctionHandler(imp::FunctionCallbackWrapper, obj); +} + +//=== Weak Persistent Handling ================================================= + +#include "nan_weak.h" // NOLINT(build/include) + +//=== ObjectWrap =============================================================== + +#include "nan_object_wrap.h" // NOLINT(build/include) + +//=== Export ================================================================== + +inline +void +Export(ADDON_REGISTER_FUNCTION_ARGS_TYPE target, const char *name, + FunctionCallback f) { + Set(target, New(name).ToLocalChecked(), + GetFunction(New(f)).ToLocalChecked()); +} + +//=== Tap Reverse Binding ===================================================== + +struct Tap { + explicit Tap(v8::Local t) : t_() { + t_.Reset(To(t).ToLocalChecked()); + } + + ~Tap() { t_.Reset(); } // not sure if neccessary + + inline void plan(int i) { + v8::Local arg = New(i); + MakeCallback(New(t_), "plan", 1, &arg); + } + + inline void ok(bool isOk, const char *msg = NULL) { + v8::Local args[2]; + args[0] = New(isOk); + if (msg) args[1] = New(msg).ToLocalChecked(); + MakeCallback(New(t_), "ok", msg ? 2 : 1, args); + } + + inline void pass(const char * msg = NULL) { + v8::Local hmsg; + if (msg) hmsg = New(msg).ToLocalChecked(); + MakeCallback(New(t_), "pass", msg ? 1 : 0, &hmsg); + } + + private: + Persistent t_; +}; + +#define NAN_STRINGIZE2(x) #x +#define NAN_STRINGIZE(x) NAN_STRINGIZE2(x) +#define NAN_TEST_EXPRESSION(expression) \ + ( expression ), __FILE__ ":" NAN_STRINGIZE(__LINE__) ": " #expression + +#define NAN_EXPORT(target, function) Export(target, #function, function) + +#undef TYPE_CHECK + +//=== Generic Maybefication =================================================== + +namespace imp { + +template struct Maybefier; + +template struct Maybefier > { + static MaybeLocal convert(v8::Local v) { + return MaybeLocal(v); + } +}; + +template struct Maybefier > { + static MaybeLocal convert(MaybeLocal v) { + return v; + } +}; + +} // end of namespace imp + +template class MaybeMaybe> +MaybeLocal +MakeMaybe(MaybeMaybe v) { + return imp::Maybefier >::convert(v); +} + +//=== TypedArrayContents ======================================================= + +#include "nan_typedarray_contents.h" // NOLINT(build/include) + +} // end of namespace Nan + +#endif // NAN_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h new file mode 100644 index 00000000000..851509fdef5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h @@ -0,0 +1,88 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_CALLBACKS_H_ +#define NAN_CALLBACKS_H_ + +template class FunctionCallbackInfo; +template class PropertyCallbackInfo; +template class Global; + +typedef void(*FunctionCallback)(const FunctionCallbackInfo&); +typedef void(*GetterCallback) + (v8::Local, const PropertyCallbackInfo&); +typedef void(*SetterCallback)( + v8::Local, + v8::Local, + const PropertyCallbackInfo&); +typedef void(*PropertyGetterCallback)( + v8::Local, + const PropertyCallbackInfo&); +typedef void(*PropertySetterCallback)( + v8::Local, + v8::Local, + const PropertyCallbackInfo&); +typedef void(*PropertyEnumeratorCallback) + (const PropertyCallbackInfo&); +typedef void(*PropertyDeleterCallback)( + v8::Local, + const PropertyCallbackInfo&); +typedef void(*PropertyQueryCallback)( + v8::Local, + const PropertyCallbackInfo&); +typedef void(*IndexGetterCallback)( + uint32_t, + const PropertyCallbackInfo&); +typedef void(*IndexSetterCallback)( + uint32_t, + v8::Local, + const PropertyCallbackInfo&); +typedef void(*IndexEnumeratorCallback) + (const PropertyCallbackInfo&); +typedef void(*IndexDeleterCallback)( + uint32_t, + const PropertyCallbackInfo&); +typedef void(*IndexQueryCallback)( + uint32_t, + const PropertyCallbackInfo&); + +namespace imp { +typedef v8::Local Sig; + +static const int kDataIndex = 0; + +static const int kFunctionIndex = 1; +static const int kFunctionFieldCount = 2; + +static const int kGetterIndex = 1; +static const int kSetterIndex = 2; +static const int kAccessorFieldCount = 3; + +static const int kPropertyGetterIndex = 1; +static const int kPropertySetterIndex = 2; +static const int kPropertyEnumeratorIndex = 3; +static const int kPropertyDeleterIndex = 4; +static const int kPropertyQueryIndex = 5; +static const int kPropertyFieldCount = 6; + +static const int kIndexPropertyGetterIndex = 1; +static const int kIndexPropertySetterIndex = 2; +static const int kIndexPropertyEnumeratorIndex = 3; +static const int kIndexPropertyDeleterIndex = 4; +static const int kIndexPropertyQueryIndex = 5; +static const int kIndexPropertyFieldCount = 6; + +} // end of namespace imp + +#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION +# include "nan_callbacks_12_inl.h" // NOLINT(build/include) +#else +# include "nan_callbacks_pre_12_inl.h" // NOLINT(build/include) +#endif + +#endif // NAN_CALLBACKS_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h new file mode 100644 index 00000000000..bea12c71fb3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h @@ -0,0 +1,512 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_CALLBACKS_12_INL_H_ +#define NAN_CALLBACKS_12_INL_H_ + +template +class ReturnValue { + v8::ReturnValue value_; + + public: + template + explicit inline ReturnValue(const v8::ReturnValue &value) : + value_(value) {} + template + explicit inline ReturnValue(const ReturnValue& that) + : value_(that.value_) { + TYPE_CHECK(T, S); + } + + // Handle setters + template inline void Set(const v8::Local &handle) { + TYPE_CHECK(T, S); + value_.Set(handle); + } + + template inline void Set(const Global &handle) { + TYPE_CHECK(T, S); +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && \ + (V8_MINOR_VERSION > 5 || (V8_MINOR_VERSION == 5 && \ + defined(V8_BUILD_NUMBER) && V8_BUILD_NUMBER >= 8)))) + value_.Set(handle); +#else + value_.Set(*reinterpret_cast*>(&handle)); + const_cast &>(handle).Reset(); +#endif + } + + // Fast primitive setters + inline void Set(bool value) { + TYPE_CHECK(T, v8::Boolean); + value_.Set(value); + } + + inline void Set(double i) { + TYPE_CHECK(T, v8::Number); + value_.Set(i); + } + + inline void Set(int32_t i) { + TYPE_CHECK(T, v8::Integer); + value_.Set(i); + } + + inline void Set(uint32_t i) { + TYPE_CHECK(T, v8::Integer); + value_.Set(i); + } + + // Fast JS primitive setters + inline void SetNull() { + TYPE_CHECK(T, v8::Primitive); + value_.SetNull(); + } + + inline void SetUndefined() { + TYPE_CHECK(T, v8::Primitive); + value_.SetUndefined(); + } + + inline void SetEmptyString() { + TYPE_CHECK(T, v8::String); + value_.SetEmptyString(); + } + + // Convenience getter for isolate + inline v8::Isolate *GetIsolate() const { + return value_.GetIsolate(); + } + + // Pointer setter: Uncompilable to prevent inadvertent misuse. + template + inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); } +}; + +template +class FunctionCallbackInfo { + const v8::FunctionCallbackInfo &info_; + const v8::Local data_; + + public: + explicit inline FunctionCallbackInfo( + const v8::FunctionCallbackInfo &info + , v8::Local data) : + info_(info) + , data_(data) {} + + inline ReturnValue GetReturnValue() const { + return ReturnValue(info_.GetReturnValue()); + } + + inline v8::Local Callee() const { return info_.Callee(); } + inline v8::Local Data() const { return data_; } + inline v8::Local Holder() const { return info_.Holder(); } + inline bool IsConstructCall() const { return info_.IsConstructCall(); } + inline int Length() const { return info_.Length(); } + inline v8::Local operator[](int i) const { return info_[i]; } + inline v8::Local This() const { return info_.This(); } + inline v8::Isolate *GetIsolate() const { return info_.GetIsolate(); } + + + protected: + static const int kHolderIndex = 0; + static const int kIsolateIndex = 1; + static const int kReturnValueDefaultValueIndex = 2; + static const int kReturnValueIndex = 3; + static const int kDataIndex = 4; + static const int kCalleeIndex = 5; + static const int kContextSaveIndex = 6; + static const int kArgsLength = 7; + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo) +}; + +template +class PropertyCallbackInfo { + const v8::PropertyCallbackInfo &info_; + const v8::Local data_; + + public: + explicit inline PropertyCallbackInfo( + const v8::PropertyCallbackInfo &info + , const v8::Local data) : + info_(info) + , data_(data) {} + + inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); } + inline v8::Local Data() const { return data_; } + inline v8::Local This() const { return info_.This(); } + inline v8::Local Holder() const { return info_.Holder(); } + inline ReturnValue GetReturnValue() const { + return ReturnValue(info_.GetReturnValue()); + } + + protected: + static const int kHolderIndex = 0; + static const int kIsolateIndex = 1; + static const int kReturnValueDefaultValueIndex = 2; + static const int kReturnValueIndex = 3; + static const int kDataIndex = 4; + static const int kThisIndex = 5; + static const int kArgsLength = 6; + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfo) +}; + +namespace imp { +static +void FunctionCallbackWrapper(const v8::FunctionCallbackInfo &info) { + v8::Local obj = info.Data().As(); + FunctionCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kFunctionIndex).As()->Value())); + FunctionCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + callback(cbinfo); +} + +typedef void (*NativeFunction)(const v8::FunctionCallbackInfo &); + +#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION +static +void GetterCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + GetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kGetterIndex).As()->Value())); + callback(property.As(), cbinfo); +} + +typedef void (*NativeGetter) + (v8::Local, const v8::PropertyCallbackInfo &); + +static +void SetterCallbackWrapper( + v8::Local property + , v8::Local value + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + SetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kSetterIndex).As()->Value())); + callback(property.As(), value, cbinfo); +} + +typedef void (*NativeSetter)( + v8::Local + , v8::Local + , const v8::PropertyCallbackInfo &); +#else +static +void GetterCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + GetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kGetterIndex).As()->Value())); + callback(property, cbinfo); +} + +typedef void (*NativeGetter) + (v8::Local, const v8::PropertyCallbackInfo &); + +static +void SetterCallbackWrapper( + v8::Local property + , v8::Local value + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + SetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kSetterIndex).As()->Value())); + callback(property, value, cbinfo); +} + +typedef void (*NativeSetter)( + v8::Local + , v8::Local + , const v8::PropertyCallbackInfo &); +#endif + +#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION +static +void PropertyGetterCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyGetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyGetterIndex) + .As()->Value())); + callback(property.As(), cbinfo); +} + +typedef void (*NativePropertyGetter) + (v8::Local, const v8::PropertyCallbackInfo &); + +static +void PropertySetterCallbackWrapper( + v8::Local property + , v8::Local value + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertySetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertySetterIndex) + .As()->Value())); + callback(property.As(), value, cbinfo); +} + +typedef void (*NativePropertySetter)( + v8::Local + , v8::Local + , const v8::PropertyCallbackInfo &); + +static +void PropertyEnumeratorCallbackWrapper( + const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyEnumeratorCallback callback = + reinterpret_cast(reinterpret_cast( + obj->GetInternalField(kPropertyEnumeratorIndex) + .As()->Value())); + callback(cbinfo); +} + +typedef void (*NativePropertyEnumerator) + (const v8::PropertyCallbackInfo &); + +static +void PropertyDeleterCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyDeleterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyDeleterIndex) + .As()->Value())); + callback(property.As(), cbinfo); +} + +typedef void (NativePropertyDeleter) + (v8::Local, const v8::PropertyCallbackInfo &); + +static +void PropertyQueryCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyQueryCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyQueryIndex) + .As()->Value())); + callback(property.As(), cbinfo); +} + +typedef void (*NativePropertyQuery) + (v8::Local, const v8::PropertyCallbackInfo &); +#else +static +void PropertyGetterCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyGetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyGetterIndex) + .As()->Value())); + callback(property, cbinfo); +} + +typedef void (*NativePropertyGetter) + (v8::Local, const v8::PropertyCallbackInfo &); + +static +void PropertySetterCallbackWrapper( + v8::Local property + , v8::Local value + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertySetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertySetterIndex) + .As()->Value())); + callback(property, value, cbinfo); +} + +typedef void (*NativePropertySetter)( + v8::Local + , v8::Local + , const v8::PropertyCallbackInfo &); + +static +void PropertyEnumeratorCallbackWrapper( + const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyEnumeratorCallback callback = + reinterpret_cast(reinterpret_cast( + obj->GetInternalField(kPropertyEnumeratorIndex) + .As()->Value())); + callback(cbinfo); +} + +typedef void (*NativePropertyEnumerator) + (const v8::PropertyCallbackInfo &); + +static +void PropertyDeleterCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyDeleterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyDeleterIndex) + .As()->Value())); + callback(property, cbinfo); +} + +typedef void (NativePropertyDeleter) + (v8::Local, const v8::PropertyCallbackInfo &); + +static +void PropertyQueryCallbackWrapper( + v8::Local property + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyQueryCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyQueryIndex) + .As()->Value())); + callback(property, cbinfo); +} + +typedef void (*NativePropertyQuery) + (v8::Local, const v8::PropertyCallbackInfo &); +#endif + +static +void IndexGetterCallbackWrapper( + uint32_t index, const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexGetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertyGetterIndex) + .As()->Value())); + callback(index, cbinfo); +} + +typedef void (*NativeIndexGetter) + (uint32_t, const v8::PropertyCallbackInfo &); + +static +void IndexSetterCallbackWrapper( + uint32_t index + , v8::Local value + , const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexSetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertySetterIndex) + .As()->Value())); + callback(index, value, cbinfo); +} + +typedef void (*NativeIndexSetter)( + uint32_t + , v8::Local + , const v8::PropertyCallbackInfo &); + +static +void IndexEnumeratorCallbackWrapper( + const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexEnumeratorCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField( + kIndexPropertyEnumeratorIndex).As()->Value())); + callback(cbinfo); +} + +typedef void (*NativeIndexEnumerator) + (const v8::PropertyCallbackInfo &); + +static +void IndexDeleterCallbackWrapper( + uint32_t index, const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexDeleterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertyDeleterIndex) + .As()->Value())); + callback(index, cbinfo); +} + +typedef void (*NativeIndexDeleter) + (uint32_t, const v8::PropertyCallbackInfo &); + +static +void IndexQueryCallbackWrapper( + uint32_t index, const v8::PropertyCallbackInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexQueryCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertyQueryIndex) + .As()->Value())); + callback(index, cbinfo); +} + +typedef void (*NativeIndexQuery) + (uint32_t, const v8::PropertyCallbackInfo &); +} // end of namespace imp + +#endif // NAN_CALLBACKS_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h new file mode 100644 index 00000000000..5e2b8e2b2a3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h @@ -0,0 +1,506 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_CALLBACKS_PRE_12_INL_H_ +#define NAN_CALLBACKS_PRE_12_INL_H_ + +namespace imp { +template class ReturnValueImp; +} // end of namespace imp + +template +class ReturnValue { + v8::Isolate *isolate_; + v8::Persistent *value_; + friend class imp::ReturnValueImp; + + public: + template + explicit inline ReturnValue(v8::Isolate *isolate, v8::Persistent *p) : + isolate_(isolate), value_(p) {} + template + explicit inline ReturnValue(const ReturnValue& that) + : isolate_(that.isolate_), value_(that.value_) { + TYPE_CHECK(T, S); + } + + // Handle setters + template inline void Set(const v8::Local &handle) { + TYPE_CHECK(T, S); + value_->Dispose(); + *value_ = v8::Persistent::New(handle); + } + + template inline void Set(const Global &handle) { + TYPE_CHECK(T, S); + value_->Dispose(); + *value_ = v8::Persistent::New(handle.persistent); + const_cast &>(handle).Reset(); + } + + // Fast primitive setters + inline void Set(bool value) { + TYPE_CHECK(T, v8::Boolean); + value_->Dispose(); + *value_ = v8::Persistent::New(v8::Boolean::New(value)); + } + + inline void Set(double i) { + TYPE_CHECK(T, v8::Number); + value_->Dispose(); + *value_ = v8::Persistent::New(v8::Number::New(i)); + } + + inline void Set(int32_t i) { + TYPE_CHECK(T, v8::Integer); + value_->Dispose(); + *value_ = v8::Persistent::New(v8::Int32::New(i)); + } + + inline void Set(uint32_t i) { + TYPE_CHECK(T, v8::Integer); + value_->Dispose(); + *value_ = v8::Persistent::New(v8::Uint32::NewFromUnsigned(i)); + } + + // Fast JS primitive setters + inline void SetNull() { + TYPE_CHECK(T, v8::Primitive); + value_->Dispose(); + *value_ = v8::Persistent::New(v8::Null()); + } + + inline void SetUndefined() { + TYPE_CHECK(T, v8::Primitive); + value_->Dispose(); + *value_ = v8::Persistent::New(v8::Undefined()); + } + + inline void SetEmptyString() { + TYPE_CHECK(T, v8::String); + value_->Dispose(); + *value_ = v8::Persistent::New(v8::String::Empty()); + } + + // Convenience getter for isolate + inline v8::Isolate *GetIsolate() const { + return isolate_; + } + + // Pointer setter: Uncompilable to prevent inadvertent misuse. + template + inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); } +}; + +template +class FunctionCallbackInfo { + const v8::Arguments &args_; + v8::Local data_; + ReturnValue return_value_; + v8::Persistent retval_; + + public: + explicit inline FunctionCallbackInfo( + const v8::Arguments &args + , v8::Local data) : + args_(args) + , data_(data) + , return_value_(args.GetIsolate(), &retval_) + , retval_(v8::Persistent::New(v8::Undefined())) {} + + inline ~FunctionCallbackInfo() { + retval_.Dispose(); + retval_.Clear(); + } + + inline ReturnValue GetReturnValue() const { + return ReturnValue(return_value_); + } + + inline v8::Local Callee() const { return args_.Callee(); } + inline v8::Local Data() const { return data_; } + inline v8::Local Holder() const { return args_.Holder(); } + inline bool IsConstructCall() const { return args_.IsConstructCall(); } + inline int Length() const { return args_.Length(); } + inline v8::Local operator[](int i) const { return args_[i]; } + inline v8::Local This() const { return args_.This(); } + inline v8::Isolate *GetIsolate() const { return args_.GetIsolate(); } + + + protected: + static const int kHolderIndex = 0; + static const int kIsolateIndex = 1; + static const int kReturnValueDefaultValueIndex = 2; + static const int kReturnValueIndex = 3; + static const int kDataIndex = 4; + static const int kCalleeIndex = 5; + static const int kContextSaveIndex = 6; + static const int kArgsLength = 7; + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo) +}; + +template +class PropertyCallbackInfoBase { + const v8::AccessorInfo &info_; + const v8::Local data_; + + public: + explicit inline PropertyCallbackInfoBase( + const v8::AccessorInfo &info + , const v8::Local data) : + info_(info) + , data_(data) {} + + inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); } + inline v8::Local Data() const { return data_; } + inline v8::Local This() const { return info_.This(); } + inline v8::Local Holder() const { return info_.Holder(); } + + protected: + static const int kHolderIndex = 0; + static const int kIsolateIndex = 1; + static const int kReturnValueDefaultValueIndex = 2; + static const int kReturnValueIndex = 3; + static const int kDataIndex = 4; + static const int kThisIndex = 5; + static const int kArgsLength = 6; + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfoBase) +}; + +template +class PropertyCallbackInfo : public PropertyCallbackInfoBase { + ReturnValue return_value_; + v8::Persistent retval_; + + public: + explicit inline PropertyCallbackInfo( + const v8::AccessorInfo &info + , const v8::Local data) : + PropertyCallbackInfoBase(info, data) + , return_value_(info.GetIsolate(), &retval_) + , retval_(v8::Persistent::New(v8::Undefined())) {} + + inline ~PropertyCallbackInfo() { + retval_.Dispose(); + retval_.Clear(); + } + + inline ReturnValue GetReturnValue() const { return return_value_; } +}; + +template<> +class PropertyCallbackInfo : + public PropertyCallbackInfoBase { + ReturnValue return_value_; + v8::Persistent retval_; + + public: + explicit inline PropertyCallbackInfo( + const v8::AccessorInfo &info + , const v8::Local data) : + PropertyCallbackInfoBase(info, data) + , return_value_(info.GetIsolate(), &retval_) + , retval_(v8::Persistent::New(v8::Local())) {} + + inline ~PropertyCallbackInfo() { + retval_.Dispose(); + retval_.Clear(); + } + + inline ReturnValue GetReturnValue() const { + return return_value_; + } +}; + +template<> +class PropertyCallbackInfo : + public PropertyCallbackInfoBase { + ReturnValue return_value_; + v8::Persistent retval_; + + public: + explicit inline PropertyCallbackInfo( + const v8::AccessorInfo &info + , const v8::Local data) : + PropertyCallbackInfoBase(info, data) + , return_value_(info.GetIsolate(), &retval_) + , retval_(v8::Persistent::New(v8::Local())) {} + + inline ~PropertyCallbackInfo() { + retval_.Dispose(); + retval_.Clear(); + } + + inline ReturnValue GetReturnValue() const { + return return_value_; + } +}; + +template<> +class PropertyCallbackInfo : + public PropertyCallbackInfoBase { + ReturnValue return_value_; + v8::Persistent retval_; + + public: + explicit inline PropertyCallbackInfo( + const v8::AccessorInfo &info + , const v8::Local data) : + PropertyCallbackInfoBase(info, data) + , return_value_(info.GetIsolate(), &retval_) + , retval_(v8::Persistent::New(v8::Local())) {} + + inline ~PropertyCallbackInfo() { + retval_.Dispose(); + retval_.Clear(); + } + + inline ReturnValue GetReturnValue() const { + return return_value_; + } +}; + +namespace imp { +template +class ReturnValueImp : public ReturnValue { + public: + explicit ReturnValueImp(ReturnValue that) : + ReturnValue(that) {} + inline v8::Handle Value() { + return *ReturnValue::value_; + } +}; + +static +v8::Handle FunctionCallbackWrapper(const v8::Arguments &args) { + v8::Local obj = args.Data().As(); + FunctionCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kFunctionIndex).As()->Value())); + FunctionCallbackInfo + cbinfo(args, obj->GetInternalField(kDataIndex)); + callback(cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativeFunction)(const v8::Arguments &); + +static +v8::Handle GetterCallbackWrapper( + v8::Local property, const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + GetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kGetterIndex).As()->Value())); + callback(property, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativeGetter) + (v8::Local, const v8::AccessorInfo &); + +static +void SetterCallbackWrapper( + v8::Local property + , v8::Local value + , const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + SetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kSetterIndex).As()->Value())); + callback(property, value, cbinfo); +} + +typedef void (*NativeSetter) + (v8::Local, v8::Local, const v8::AccessorInfo &); + +static +v8::Handle PropertyGetterCallbackWrapper( + v8::Local property, const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyGetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyGetterIndex) + .As()->Value())); + callback(property, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativePropertyGetter) + (v8::Local, const v8::AccessorInfo &); + +static +v8::Handle PropertySetterCallbackWrapper( + v8::Local property + , v8::Local value + , const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertySetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertySetterIndex) + .As()->Value())); + callback(property, value, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativePropertySetter) + (v8::Local, v8::Local, const v8::AccessorInfo &); + +static +v8::Handle PropertyEnumeratorCallbackWrapper( + const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyEnumeratorCallback callback = + reinterpret_cast(reinterpret_cast( + obj->GetInternalField(kPropertyEnumeratorIndex) + .As()->Value())); + callback(cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativePropertyEnumerator) + (const v8::AccessorInfo &); + +static +v8::Handle PropertyDeleterCallbackWrapper( + v8::Local property + , const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyDeleterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyDeleterIndex) + .As()->Value())); + callback(property, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (NativePropertyDeleter) + (v8::Local, const v8::AccessorInfo &); + +static +v8::Handle PropertyQueryCallbackWrapper( + v8::Local property, const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + PropertyQueryCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kPropertyQueryIndex) + .As()->Value())); + callback(property, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativePropertyQuery) + (v8::Local, const v8::AccessorInfo &); + +static +v8::Handle IndexGetterCallbackWrapper( + uint32_t index, const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexGetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertyGetterIndex) + .As()->Value())); + callback(index, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativeIndexGetter) + (uint32_t, const v8::AccessorInfo &); + +static +v8::Handle IndexSetterCallbackWrapper( + uint32_t index + , v8::Local value + , const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexSetterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertySetterIndex) + .As()->Value())); + callback(index, value, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativeIndexSetter) + (uint32_t, v8::Local, const v8::AccessorInfo &); + +static +v8::Handle IndexEnumeratorCallbackWrapper( + const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexEnumeratorCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertyEnumeratorIndex) + .As()->Value())); + callback(cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativeIndexEnumerator) + (const v8::AccessorInfo &); + +static +v8::Handle IndexDeleterCallbackWrapper( + uint32_t index, const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexDeleterCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertyDeleterIndex) + .As()->Value())); + callback(index, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativeIndexDeleter) + (uint32_t, const v8::AccessorInfo &); + +static +v8::Handle IndexQueryCallbackWrapper( + uint32_t index, const v8::AccessorInfo &info) { + v8::Local obj = info.Data().As(); + PropertyCallbackInfo + cbinfo(info, obj->GetInternalField(kDataIndex)); + IndexQueryCallback callback = reinterpret_cast( + reinterpret_cast( + obj->GetInternalField(kIndexPropertyQueryIndex) + .As()->Value())); + callback(index, cbinfo); + return ReturnValueImp(cbinfo.GetReturnValue()).Value(); +} + +typedef v8::Handle (*NativeIndexQuery) + (uint32_t, const v8::AccessorInfo &); +} // end of namespace imp + +#endif // NAN_CALLBACKS_PRE_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h new file mode 100644 index 00000000000..7386c3beaa5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h @@ -0,0 +1,64 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_CONVERTERS_H_ +#define NAN_CONVERTERS_H_ + +namespace imp { +template struct ToFactoryBase { + typedef MaybeLocal return_t; +}; +template struct ValueFactoryBase { typedef Maybe return_t; }; + +template struct ToFactory; + +#define X(TYPE) \ + template<> \ + struct ToFactory : ToFactoryBase { \ + static inline return_t convert(v8::Local val); \ + }; + +X(Boolean) +X(Number) +X(String) +X(Object) +X(Integer) +X(Uint32) +X(Int32) + +#undef X + +#define X(TYPE) \ + template<> \ + struct ToFactory : ValueFactoryBase { \ + static inline return_t convert(v8::Local val); \ + }; + +X(bool) +X(double) +X(int64_t) +X(uint32_t) +X(int32_t) + +#undef X +} // end of namespace imp + +template +inline +typename imp::ToFactory::return_t To(v8::Local val) { + return imp::ToFactory::convert(val); +} + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +# include "nan_converters_43_inl.h" +#else +# include "nan_converters_pre_43_inl.h" +#endif + +#endif // NAN_CONVERTERS_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h new file mode 100644 index 00000000000..e2eb032fd64 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h @@ -0,0 +1,42 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_CONVERTERS_43_INL_H_ +#define NAN_CONVERTERS_43_INL_H_ + +#define X(TYPE) \ +imp::ToFactory::return_t \ +imp::ToFactory::convert(v8::Local val) { \ + return val->To ## TYPE(GetCurrentContext()); \ +} + +X(Boolean) +X(Number) +X(String) +X(Object) +X(Integer) +X(Uint32) +X(Int32) + +#undef X + +#define X(TYPE, NAME) \ +imp::ToFactory::return_t \ +imp::ToFactory::convert(v8::Local val) { \ + return val->NAME ## Value(GetCurrentContext()); \ +} + +X(bool, Boolean) +X(double, Number) +X(int64_t, Integer) +X(uint32_t, Uint32) +X(int32_t, Int32) + +#undef X + +#endif // NAN_CONVERTERS_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h new file mode 100644 index 00000000000..177a74a2af5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h @@ -0,0 +1,42 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_CONVERTERS_PRE_43_INL_H_ +#define NAN_CONVERTERS_PRE_43_INL_H_ + +#define X(TYPE) \ +imp::ToFactory::return_t \ +imp::ToFactory::convert(v8::Local val) { \ + return MaybeLocal(val->To ## TYPE()); \ +} + +X(Boolean) +X(Number) +X(String) +X(Object) +X(Integer) +X(Uint32) +X(Int32) + +#undef X + +#define X(TYPE, NAME) \ +imp::ToFactory::return_t \ +imp::ToFactory::convert(v8::Local val) { \ + return Just(val->NAME ##Value()); \ +} + +X(bool, Boolean) +X(double, Number) +X(int64_t, Integer) +X(uint32_t, Uint32) +X(int32_t, Int32) + +#undef X + +#endif // NAN_CONVERTERS_PRE_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h new file mode 100644 index 00000000000..be50fc67c46 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h @@ -0,0 +1,409 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_IMPLEMENTATION_12_INL_H_ +#define NAN_IMPLEMENTATION_12_INL_H_ +//============================================================================== +// node v0.11 implementation +//============================================================================== + +namespace imp { + +//=== Array ==================================================================== + +Factory::return_t +Factory::New() { + return v8::Array::New(v8::Isolate::GetCurrent()); +} + +Factory::return_t +Factory::New(int length) { + return v8::Array::New(v8::Isolate::GetCurrent(), length); +} + +//=== Boolean ================================================================== + +Factory::return_t +Factory::New(bool value) { + return v8::Boolean::New(v8::Isolate::GetCurrent(), value); +} + +//=== Boolean Object =========================================================== + +Factory::return_t +Factory::New(bool value) { +#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION) + return v8::BooleanObject::New( + v8::Isolate::GetCurrent(), value).As(); +#else + return v8::BooleanObject::New(value).As(); +#endif +} + +//=== Context ================================================================== + +Factory::return_t +Factory::New( v8::ExtensionConfiguration* extensions + , v8::Local tmpl + , v8::Local obj) { + return v8::Context::New(v8::Isolate::GetCurrent(), extensions, tmpl, obj); +} + +//=== Date ===================================================================== + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +Factory::return_t +Factory::New(double value) { + v8::Local ret; + if (v8::Date::New(GetCurrentContext(), value). + ToLocal(reinterpret_cast*>(&ret))) { + return v8::MaybeLocal(ret); + } else { + return v8::MaybeLocal(ret); + } +} +#else +Factory::return_t +Factory::New(double value) { + return Factory::return_t( + v8::Date::New(v8::Isolate::GetCurrent(), value).As()); +} +#endif + +//=== External ================================================================= + +Factory::return_t +Factory::New(void * value) { + return v8::External::New(v8::Isolate::GetCurrent(), value); +} + +//=== Function ================================================================= + +Factory::return_t +Factory::New( FunctionCallback callback + , v8::Local data) { + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + v8::EscapableHandleScope scope(isolate); + v8::Local tpl = v8::ObjectTemplate::New(isolate); + tpl->SetInternalFieldCount(imp::kFunctionFieldCount); + v8::Local obj = NewInstance(tpl).ToLocalChecked(); + + obj->SetInternalField( + imp::kFunctionIndex + , v8::External::New(isolate, reinterpret_cast(callback))); + + v8::Local val = v8::Local::New(isolate, data); + + if (!val.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, val); + } + + return scope.Escape(v8::Function::New( isolate + , imp::FunctionCallbackWrapper + , obj)); +} + +//=== Function Template ======================================================== + +Factory::return_t +Factory::New( FunctionCallback callback + , v8::Local data + , v8::Local signature) { + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + if (callback) { + v8::EscapableHandleScope scope(isolate); + v8::Local tpl = v8::ObjectTemplate::New(isolate); + tpl->SetInternalFieldCount(imp::kFunctionFieldCount); + v8::Local obj = NewInstance(tpl).ToLocalChecked(); + + obj->SetInternalField( + imp::kFunctionIndex + , v8::External::New(isolate, reinterpret_cast(callback))); + v8::Local val = v8::Local::New(isolate, data); + + if (!val.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, val); + } + + return scope.Escape(v8::FunctionTemplate::New( isolate + , imp::FunctionCallbackWrapper + , obj + , signature)); + } else { + return v8::FunctionTemplate::New(isolate, 0, data, signature); + } +} + +//=== Number =================================================================== + +Factory::return_t +Factory::New(double value) { + return v8::Number::New(v8::Isolate::GetCurrent(), value); +} + +//=== Number Object ============================================================ + +Factory::return_t +Factory::New(double value) { + return v8::NumberObject::New( v8::Isolate::GetCurrent() + , value).As(); +} + +//=== Integer, Int32 and Uint32 ================================================ + +template +typename IntegerFactory::return_t +IntegerFactory::New(int32_t value) { + return To(T::New(v8::Isolate::GetCurrent(), value)); +} + +template +typename IntegerFactory::return_t +IntegerFactory::New(uint32_t value) { + return To(T::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); +} + +Factory::return_t +Factory::New(int32_t value) { + return To( + v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); +} + +Factory::return_t +Factory::New(uint32_t value) { + return To( + v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); +} + +//=== Object =================================================================== + +Factory::return_t +Factory::New() { + return v8::Object::New(v8::Isolate::GetCurrent()); +} + +//=== Object Template ========================================================== + +Factory::return_t +Factory::New() { + return v8::ObjectTemplate::New(v8::Isolate::GetCurrent()); +} + +//=== RegExp =================================================================== + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +Factory::return_t +Factory::New( + v8::Local pattern + , v8::RegExp::Flags flags) { + return v8::RegExp::New(GetCurrentContext(), pattern, flags); +} +#else +Factory::return_t +Factory::New( + v8::Local pattern + , v8::RegExp::Flags flags) { + return Factory::return_t(v8::RegExp::New(pattern, flags)); +} +#endif + +//=== Script =================================================================== + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +Factory::return_t +Factory::New( v8::Local source) { + v8::ScriptCompiler::Source src(source); + return v8::ScriptCompiler::Compile(GetCurrentContext(), &src); +} + +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + v8::ScriptCompiler::Source src(source, origin); + return v8::ScriptCompiler::Compile(GetCurrentContext(), &src); +} +#else +Factory::return_t +Factory::New( v8::Local source) { + v8::ScriptCompiler::Source src(source); + return Factory::return_t( + v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src)); +} + +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + v8::ScriptCompiler::Source src(source, origin); + return Factory::return_t( + v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src)); +} +#endif + +//=== Signature ================================================================ + +Factory::return_t +Factory::New(Factory::FTH receiver) { + return v8::Signature::New(v8::Isolate::GetCurrent(), receiver); +} + +//=== String =================================================================== + +Factory::return_t +Factory::New() { + return Factory::return_t( + v8::String::Empty(v8::Isolate::GetCurrent())); +} + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +Factory::return_t +Factory::New(const char * value, int length) { + return v8::String::NewFromUtf8( + v8::Isolate::GetCurrent(), value, v8::NewStringType::kNormal, length); +} + +Factory::return_t +Factory::New(std::string const& value) { + assert(value.size() <= INT_MAX && "string too long"); + return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), + value.data(), v8::NewStringType::kNormal, static_cast(value.size())); +} + +Factory::return_t +Factory::New(const uint16_t * value, int length) { + return v8::String::NewFromTwoByte(v8::Isolate::GetCurrent(), value, + v8::NewStringType::kNormal, length); +} + +Factory::return_t +Factory::New(v8::String::ExternalStringResource * value) { + return v8::String::NewExternalTwoByte(v8::Isolate::GetCurrent(), value); +} + +Factory::return_t +Factory::New(ExternalOneByteStringResource * value) { + return v8::String::NewExternalOneByte(v8::Isolate::GetCurrent(), value); +} +#else +Factory::return_t +Factory::New(const char * value, int length) { + return Factory::return_t( + v8::String::NewFromUtf8( + v8::Isolate::GetCurrent() + , value + , v8::String::kNormalString + , length)); +} + +Factory::return_t +Factory::New( + std::string const& value) /* NOLINT(build/include_what_you_use) */ { + assert(value.size() <= INT_MAX && "string too long"); + return Factory::return_t( + v8::String::NewFromUtf8( + v8::Isolate::GetCurrent() + , value.data() + , v8::String::kNormalString + , static_cast(value.size()))); +} + +Factory::return_t +Factory::New(const uint16_t * value, int length) { + return Factory::return_t( + v8::String::NewFromTwoByte( + v8::Isolate::GetCurrent() + , value + , v8::String::kNormalString + , length)); +} + +Factory::return_t +Factory::New(v8::String::ExternalStringResource * value) { + return Factory::return_t( + v8::String::NewExternal(v8::Isolate::GetCurrent(), value)); +} + +Factory::return_t +Factory::New(ExternalOneByteStringResource * value) { + return Factory::return_t( + v8::String::NewExternal(v8::Isolate::GetCurrent(), value)); +} +#endif + +//=== String Object ============================================================ + +Factory::return_t +Factory::New(v8::Local value) { + return v8::StringObject::New(value).As(); +} + +//=== Unbound Script =========================================================== + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +Factory::return_t +Factory::New(v8::Local source) { + v8::ScriptCompiler::Source src(source); + return v8::ScriptCompiler::CompileUnboundScript( + v8::Isolate::GetCurrent(), &src); +} + +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + v8::ScriptCompiler::Source src(source, origin); + return v8::ScriptCompiler::CompileUnboundScript( + v8::Isolate::GetCurrent(), &src); +} +#else +Factory::return_t +Factory::New(v8::Local source) { + v8::ScriptCompiler::Source src(source); + return Factory::return_t( + v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src)); +} + +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + v8::ScriptCompiler::Source src(source, origin); + return Factory::return_t( + v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src)); +} +#endif + +} // end of namespace imp + +//=== Presistents and Handles ================================================== + +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION +template +inline v8::Local New(v8::Handle h) { + return v8::Local::New(v8::Isolate::GetCurrent(), h); +} +#endif + +template +inline v8::Local New(v8::Persistent const& p) { + return v8::Local::New(v8::Isolate::GetCurrent(), p); +} + +template +inline v8::Local New(Persistent const& p) { + return v8::Local::New(v8::Isolate::GetCurrent(), p); +} + +template +inline v8::Local New(Global const& p) { + return v8::Local::New(v8::Isolate::GetCurrent(), p); +} + +#endif // NAN_IMPLEMENTATION_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h new file mode 100644 index 00000000000..f6642eece57 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h @@ -0,0 +1,264 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_IMPLEMENTATION_PRE_12_INL_H_ +#define NAN_IMPLEMENTATION_PRE_12_INL_H_ + +//============================================================================== +// node v0.10 implementation +//============================================================================== + +namespace imp { + +//=== Array ==================================================================== + +Factory::return_t +Factory::New() { + return v8::Array::New(); +} + +Factory::return_t +Factory::New(int length) { + return v8::Array::New(length); +} + +//=== Boolean ================================================================== + +Factory::return_t +Factory::New(bool value) { + return v8::Boolean::New(value)->ToBoolean(); +} + +//=== Boolean Object =========================================================== + +Factory::return_t +Factory::New(bool value) { + return v8::BooleanObject::New(value).As(); +} + +//=== Context ================================================================== + +Factory::return_t +Factory::New( v8::ExtensionConfiguration* extensions + , v8::Local tmpl + , v8::Local obj) { + v8::Persistent ctx = v8::Context::New(extensions, tmpl, obj); + v8::Local lctx = v8::Local::New(ctx); + ctx.Dispose(); + return lctx; +} + +//=== Date ===================================================================== + +Factory::return_t +Factory::New(double value) { + return Factory::return_t(v8::Date::New(value).As()); +} + +//=== External ================================================================= + +Factory::return_t +Factory::New(void * value) { + return v8::External::New(value); +} + +//=== Function ================================================================= + +Factory::return_t +Factory::New( FunctionCallback callback + , v8::Local data) { + return Factory::New( callback + , data + , v8::Local() + )->GetFunction(); +} + + +//=== FunctionTemplate ========================================================= + +Factory::return_t +Factory::New( FunctionCallback callback + , v8::Local data + , v8::Local signature) { + if (callback) { + v8::HandleScope scope; + + v8::Local tpl = v8::ObjectTemplate::New(); + tpl->SetInternalFieldCount(imp::kFunctionFieldCount); + v8::Local obj = tpl->NewInstance(); + + obj->SetInternalField( + imp::kFunctionIndex + , v8::External::New(reinterpret_cast(callback))); + + v8::Local val = v8::Local::New(data); + + if (!val.IsEmpty()) { + obj->SetInternalField(imp::kDataIndex, val); + } + + // Note(agnat): Emulate length argument here. Unfortunately, I couldn't find + // a way. Have at it though... + return scope.Close( + v8::FunctionTemplate::New(imp::FunctionCallbackWrapper + , obj + , signature)); + } else { + return v8::FunctionTemplate::New(0, data, signature); + } +} + +//=== Number =================================================================== + +Factory::return_t +Factory::New(double value) { + return v8::Number::New(value); +} + +//=== Number Object ============================================================ + +Factory::return_t +Factory::New(double value) { + return v8::NumberObject::New(value).As(); +} + +//=== Integer, Int32 and Uint32 ================================================ + +template +typename IntegerFactory::return_t +IntegerFactory::New(int32_t value) { + return To(T::New(value)); +} + +template +typename IntegerFactory::return_t +IntegerFactory::New(uint32_t value) { + return To(T::NewFromUnsigned(value)); +} + +Factory::return_t +Factory::New(int32_t value) { + return To(v8::Uint32::NewFromUnsigned(value)); +} + +Factory::return_t +Factory::New(uint32_t value) { + return To(v8::Uint32::NewFromUnsigned(value)); +} + + +//=== Object =================================================================== + +Factory::return_t +Factory::New() { + return v8::Object::New(); +} + +//=== Object Template ========================================================== + +Factory::return_t +Factory::New() { + return v8::ObjectTemplate::New(); +} + +//=== RegExp =================================================================== + +Factory::return_t +Factory::New( + v8::Local pattern + , v8::RegExp::Flags flags) { + return Factory::return_t(v8::RegExp::New(pattern, flags)); +} + +//=== Script =================================================================== + +Factory::return_t +Factory::New( v8::Local source) { + return Factory::return_t(v8::Script::New(source)); +} +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + return Factory::return_t( + v8::Script::New(source, const_cast(&origin))); +} + +//=== Signature ================================================================ + +Factory::return_t +Factory::New(Factory::FTH receiver) { + return v8::Signature::New(receiver); +} + +//=== String =================================================================== + +Factory::return_t +Factory::New() { + return Factory::return_t(v8::String::Empty()); +} + +Factory::return_t +Factory::New(const char * value, int length) { + return Factory::return_t(v8::String::New(value, length)); +} + +Factory::return_t +Factory::New( + std::string const& value) /* NOLINT(build/include_what_you_use) */ { + assert(value.size() <= INT_MAX && "string too long"); + return Factory::return_t( + v8::String::New( value.data(), static_cast(value.size()))); +} + +Factory::return_t +Factory::New(const uint16_t * value, int length) { + return Factory::return_t(v8::String::New(value, length)); +} + +Factory::return_t +Factory::New(v8::String::ExternalStringResource * value) { + return Factory::return_t(v8::String::NewExternal(value)); +} + +Factory::return_t +Factory::New(v8::String::ExternalAsciiStringResource * value) { + return Factory::return_t(v8::String::NewExternal(value)); +} + +//=== String Object ============================================================ + +Factory::return_t +Factory::New(v8::Local value) { + return v8::StringObject::New(value).As(); +} + +} // end of namespace imp + +//=== Presistents and Handles ================================================== + +template +inline v8::Local New(v8::Handle h) { + return v8::Local::New(h); +} + +template +inline v8::Local New(v8::Persistent const& p) { + return v8::Local::New(p); +} + +template +inline v8::Local New(Persistent const& p) { + return v8::Local::New(p.persistent); +} + +template +inline v8::Local New(Global const& p) { + return v8::Local::New(p.persistent); +} + +#endif // NAN_IMPLEMENTATION_PRE_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h new file mode 100644 index 00000000000..a8b432d5709 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h @@ -0,0 +1,245 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_MAYBE_43_INL_H_ +#define NAN_MAYBE_43_INL_H_ + +template +using MaybeLocal = v8::MaybeLocal; + +template +using Maybe = v8::Maybe; + +template +inline Maybe Nothing() { + return v8::Nothing(); +} + +template +inline Maybe Just(const T& t) { + return v8::Just(t); +} + +v8::Local GetCurrentContext(); + +inline +MaybeLocal ToDetailString(v8::Local val) { + return val->ToDetailString(GetCurrentContext()); +} + +inline +MaybeLocal ToArrayIndex(v8::Local val) { + return val->ToArrayIndex(GetCurrentContext()); +} + +inline +Maybe Equals(v8::Local a, v8::Local(b)) { + return a->Equals(GetCurrentContext(), b); +} + +inline +MaybeLocal NewInstance(v8::Local h) { + return h->NewInstance(GetCurrentContext()); +} + +inline +MaybeLocal NewInstance( + v8::Local h + , int argc + , v8::Local argv[]) { + return h->NewInstance(GetCurrentContext(), argc, argv); +} + +inline +MaybeLocal NewInstance(v8::Local h) { + return h->NewInstance(GetCurrentContext()); +} + + +inline MaybeLocal GetFunction( + v8::Local t) { + return t->GetFunction(GetCurrentContext()); +} + +inline Maybe Set( + v8::Local obj + , v8::Local key + , v8::Local value) { + return obj->Set(GetCurrentContext(), key, value); +} + +inline Maybe Set( + v8::Local obj + , uint32_t index + , v8::Local value) { + return obj->Set(GetCurrentContext(), index, value); +} + +inline Maybe ForceSet( + v8::Local obj + , v8::Local key + , v8::Local value + , v8::PropertyAttribute attribs = v8::None) { + return obj->ForceSet(GetCurrentContext(), key, value, attribs); +} + +inline MaybeLocal Get( + v8::Local obj + , v8::Local key) { + return obj->Get(GetCurrentContext(), key); +} + +inline +MaybeLocal Get(v8::Local obj, uint32_t index) { + return obj->Get(GetCurrentContext(), index); +} + +inline v8::PropertyAttribute GetPropertyAttributes( + v8::Local obj + , v8::Local key) { + return obj->GetPropertyAttributes(GetCurrentContext(), key).FromJust(); +} + +inline Maybe Has( + v8::Local obj + , v8::Local key) { + return obj->Has(GetCurrentContext(), key); +} + +inline Maybe Has(v8::Local obj, uint32_t index) { + return obj->Has(GetCurrentContext(), index); +} + +inline Maybe Delete( + v8::Local obj + , v8::Local key) { + return obj->Delete(GetCurrentContext(), key); +} + +inline +Maybe Delete(v8::Local obj, uint32_t index) { + return obj->Delete(GetCurrentContext(), index); +} + +inline +MaybeLocal GetPropertyNames(v8::Local obj) { + return obj->GetPropertyNames(GetCurrentContext()); +} + +inline +MaybeLocal GetOwnPropertyNames(v8::Local obj) { + return obj->GetOwnPropertyNames(GetCurrentContext()); +} + +inline Maybe SetPrototype( + v8::Local obj + , v8::Local prototype) { + return obj->SetPrototype(GetCurrentContext(), prototype); +} + +inline MaybeLocal ObjectProtoToString( + v8::Local obj) { + return obj->ObjectProtoToString(GetCurrentContext()); +} + +inline Maybe HasOwnProperty( + v8::Local obj + , v8::Local key) { + return obj->HasOwnProperty(GetCurrentContext(), key); +} + +inline Maybe HasRealNamedProperty( + v8::Local obj + , v8::Local key) { + return obj->HasRealNamedProperty(GetCurrentContext(), key); +} + +inline Maybe HasRealIndexedProperty( + v8::Local obj + , uint32_t index) { + return obj->HasRealIndexedProperty(GetCurrentContext(), index); +} + +inline Maybe HasRealNamedCallbackProperty( + v8::Local obj + , v8::Local key) { + return obj->HasRealNamedCallbackProperty(GetCurrentContext(), key); +} + +inline MaybeLocal GetRealNamedPropertyInPrototypeChain( + v8::Local obj + , v8::Local key) { + return obj->GetRealNamedPropertyInPrototypeChain(GetCurrentContext(), key); +} + +inline MaybeLocal GetRealNamedProperty( + v8::Local obj + , v8::Local key) { + return obj->GetRealNamedProperty(GetCurrentContext(), key); +} + +inline MaybeLocal CallAsFunction( + v8::Local obj + , v8::Local recv + , int argc + , v8::Local argv[]) { + return obj->CallAsFunction(GetCurrentContext(), recv, argc, argv); +} + +inline MaybeLocal CallAsConstructor( + v8::Local obj + , int argc, v8::Local argv[]) { + return obj->CallAsConstructor(GetCurrentContext(), argc, argv); +} + +inline +MaybeLocal GetSourceLine(v8::Local msg) { + return msg->GetSourceLine(GetCurrentContext()); +} + +inline Maybe GetLineNumber(v8::Local msg) { + return msg->GetLineNumber(GetCurrentContext()); +} + +inline Maybe GetStartColumn(v8::Local msg) { + return msg->GetStartColumn(GetCurrentContext()); +} + +inline Maybe GetEndColumn(v8::Local msg) { + return msg->GetEndColumn(GetCurrentContext()); +} + +inline MaybeLocal CloneElementAt( + v8::Local array + , uint32_t index) { +#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION) + v8::EscapableHandleScope handle_scope(v8::Isolate::GetCurrent()); + v8::Local context = GetCurrentContext(); + v8::Local elem; + if (!array->Get(context, index).ToLocal(&elem)) { + return MaybeLocal(); + } + v8::Local obj; + if (!elem->ToObject(context).ToLocal(&obj)) { + return MaybeLocal(); + } + return MaybeLocal(handle_scope.Escape(obj->Clone())); +#else + return array->CloneElementAt(GetCurrentContext(), index); +#endif +} + +inline MaybeLocal Call( + v8::Local fun + , v8::Local recv + , int argc + , v8::Local argv[]) { + return fun->Call(GetCurrentContext(), recv, argc, argv); +} + +#endif // NAN_MAYBE_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h new file mode 100644 index 00000000000..c53868752ef --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h @@ -0,0 +1,303 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_MAYBE_PRE_43_INL_H_ +#define NAN_MAYBE_PRE_43_INL_H_ + +template +class MaybeLocal { + public: + inline MaybeLocal() : val_(v8::Local()) {} + + template +# if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION + inline MaybeLocal(v8::Local that) : val_(that) {} +# else + inline MaybeLocal(v8::Local that) : + val_(*reinterpret_cast*>(&that)) {} +# endif + + inline bool IsEmpty() const { return val_.IsEmpty(); } + + template + inline bool ToLocal(v8::Local *out) const { + *out = val_; + return !IsEmpty(); + } + + inline v8::Local ToLocalChecked() const { +#if defined(V8_ENABLE_CHECKS) + assert(!IsEmpty() && "ToLocalChecked is Empty"); +#endif // V8_ENABLE_CHECKS + return val_; + } + + template + inline v8::Local FromMaybe(v8::Local default_value) const { + return IsEmpty() ? default_value : val_; + } + + private: + v8::Local val_; +}; + +template +class Maybe { + public: + inline bool IsNothing() const { return !has_value_; } + inline bool IsJust() const { return has_value_; } + + inline T FromJust() const { +#if defined(V8_ENABLE_CHECKS) + assert(IsJust() && "FromJust is Nothing"); +#endif // V8_ENABLE_CHECKS + return value_; + } + + inline T FromMaybe(const T& default_value) const { + return has_value_ ? value_ : default_value; + } + + inline bool operator==(const Maybe &other) const { + return (IsJust() == other.IsJust()) && + (!IsJust() || FromJust() == other.FromJust()); + } + + inline bool operator!=(const Maybe &other) const { + return !operator==(other); + } + + private: + Maybe() : has_value_(false) {} + explicit Maybe(const T& t) : has_value_(true), value_(t) {} + bool has_value_; + T value_; + + template + friend Maybe Nothing(); + template + friend Maybe Just(const U& u); +}; + +template +inline Maybe Nothing() { + return Maybe(); +} + +template +inline Maybe Just(const T& t) { + return Maybe(t); +} + +inline +MaybeLocal ToDetailString(v8::Handle val) { + return MaybeLocal(val->ToDetailString()); +} + +inline +MaybeLocal ToArrayIndex(v8::Handle val) { + return MaybeLocal(val->ToArrayIndex()); +} + +inline +Maybe Equals(v8::Handle a, v8::Handle(b)) { + return Just(a->Equals(b)); +} + +inline +MaybeLocal NewInstance(v8::Handle h) { + return MaybeLocal(h->NewInstance()); +} + +inline +MaybeLocal NewInstance( + v8::Local h + , int argc + , v8::Local argv[]) { + return MaybeLocal(h->NewInstance(argc, argv)); +} + +inline +MaybeLocal NewInstance(v8::Handle h) { + return MaybeLocal(h->NewInstance()); +} + +inline +MaybeLocal GetFunction(v8::Handle t) { + return MaybeLocal(t->GetFunction()); +} + +inline Maybe Set( + v8::Handle obj + , v8::Handle key + , v8::Handle value) { + return Just(obj->Set(key, value)); +} + +inline Maybe Set( + v8::Handle obj + , uint32_t index + , v8::Handle value) { + return Just(obj->Set(index, value)); +} + +inline Maybe ForceSet( + v8::Handle obj + , v8::Handle key + , v8::Handle value + , v8::PropertyAttribute attribs = v8::None) { + return Just(obj->ForceSet(key, value, attribs)); +} + +inline MaybeLocal Get( + v8::Handle obj + , v8::Handle key) { + return MaybeLocal(obj->Get(key)); +} + +inline MaybeLocal Get( + v8::Handle obj + , uint32_t index) { + return MaybeLocal(obj->Get(index)); +} + +inline Maybe GetPropertyAttributes( + v8::Handle obj + , v8::Handle key) { + return Just(obj->GetPropertyAttributes(key)); +} + +inline Maybe Has( + v8::Handle obj + , v8::Handle key) { + return Just(obj->Has(key)); +} + +inline Maybe Has( + v8::Handle obj + , uint32_t index) { + return Just(obj->Has(index)); +} + +inline Maybe Delete( + v8::Handle obj + , v8::Handle key) { + return Just(obj->Delete(key)); +} + +inline Maybe Delete( + v8::Handle obj + , uint32_t index) { + return Just(obj->Delete(index)); +} + +inline +MaybeLocal GetPropertyNames(v8::Handle obj) { + return MaybeLocal(obj->GetPropertyNames()); +} + +inline +MaybeLocal GetOwnPropertyNames(v8::Handle obj) { + return MaybeLocal(obj->GetOwnPropertyNames()); +} + +inline Maybe SetPrototype( + v8::Handle obj + , v8::Handle prototype) { + return Just(obj->SetPrototype(prototype)); +} + +inline MaybeLocal ObjectProtoToString( + v8::Handle obj) { + return MaybeLocal(obj->ObjectProtoToString()); +} + +inline Maybe HasOwnProperty( + v8::Handle obj + , v8::Handle key) { + return Just(obj->HasOwnProperty(key)); +} + +inline Maybe HasRealNamedProperty( + v8::Handle obj + , v8::Handle key) { + return Just(obj->HasRealNamedProperty(key)); +} + +inline Maybe HasRealIndexedProperty( + v8::Handle obj + , uint32_t index) { + return Just(obj->HasRealIndexedProperty(index)); +} + +inline Maybe HasRealNamedCallbackProperty( + v8::Handle obj + , v8::Handle key) { + return Just(obj->HasRealNamedCallbackProperty(key)); +} + +inline MaybeLocal GetRealNamedPropertyInPrototypeChain( + v8::Handle obj + , v8::Handle key) { + return MaybeLocal( + obj->GetRealNamedPropertyInPrototypeChain(key)); +} + +inline MaybeLocal GetRealNamedProperty( + v8::Handle obj + , v8::Handle key) { + return MaybeLocal(obj->GetRealNamedProperty(key)); +} + +inline MaybeLocal CallAsFunction( + v8::Handle obj + , v8::Handle recv + , int argc + , v8::Handle argv[]) { + return MaybeLocal(obj->CallAsFunction(recv, argc, argv)); +} + +inline MaybeLocal CallAsConstructor( + v8::Handle obj + , int argc + , v8::Local argv[]) { + return MaybeLocal(obj->CallAsConstructor(argc, argv)); +} + +inline +MaybeLocal GetSourceLine(v8::Handle msg) { + return MaybeLocal(msg->GetSourceLine()); +} + +inline Maybe GetLineNumber(v8::Handle msg) { + return Just(msg->GetLineNumber()); +} + +inline Maybe GetStartColumn(v8::Handle msg) { + return Just(msg->GetStartColumn()); +} + +inline Maybe GetEndColumn(v8::Handle msg) { + return Just(msg->GetEndColumn()); +} + +inline MaybeLocal CloneElementAt( + v8::Handle array + , uint32_t index) { + return MaybeLocal(array->CloneElementAt(index)); +} + +inline MaybeLocal Call( + v8::Local fun + , v8::Local recv + , int argc + , v8::Local argv[]) { + return MaybeLocal(fun->Call(recv, argc, argv)); +} + +#endif // NAN_MAYBE_PRE_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h new file mode 100644 index 00000000000..6c7d19fc12f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h @@ -0,0 +1,340 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_NEW_H_ +#define NAN_NEW_H_ + +namespace imp { // scnr + +// TODO(agnat): Generalize +template v8::Local To(v8::Local i); + +template <> +inline +v8::Local +To(v8::Local i) { + return Nan::To(i).ToLocalChecked(); +} + +template <> +inline +v8::Local +To(v8::Local i) { + return Nan::To(i).ToLocalChecked(); +} + +template <> +inline +v8::Local +To(v8::Local i) { + return Nan::To(i).ToLocalChecked(); +} + +template struct FactoryBase { + typedef v8::Local return_t; +}; + +template struct MaybeFactoryBase { + typedef MaybeLocal return_t; +}; + +template struct Factory; + +template <> +struct Factory : FactoryBase { + static inline return_t New(); + static inline return_t New(int length); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(bool value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(bool value); +}; + +template <> +struct Factory : FactoryBase { + static inline + return_t + New( v8::ExtensionConfiguration* extensions = NULL + , v8::Local tmpl = v8::Local() + , v8::Local obj = v8::Local()); +}; + +template <> +struct Factory : MaybeFactoryBase { + static inline return_t New(double value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(void *value); +}; + +template <> +struct Factory : FactoryBase { + static inline + return_t + New( FunctionCallback callback + , v8::Local data = v8::Local()); +}; + +template <> +struct Factory : FactoryBase { + static inline + return_t + New( FunctionCallback callback = NULL + , v8::Local data = v8::Local() + , v8::Local signature = v8::Local()); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(double value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(double value); +}; + +template +struct IntegerFactory : FactoryBase { + typedef typename FactoryBase::return_t return_t; + static inline return_t New(int32_t value); + static inline return_t New(uint32_t value); +}; + +template <> +struct Factory : IntegerFactory {}; + +template <> +struct Factory : IntegerFactory {}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(int32_t value); + static inline return_t New(uint32_t value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(); +}; + +template <> +struct Factory : MaybeFactoryBase { + static inline return_t New( + v8::Local pattern, v8::RegExp::Flags flags); +}; + +template <> +struct Factory : MaybeFactoryBase { + static inline return_t New( v8::Local source); + static inline return_t New( v8::Local source + , v8::ScriptOrigin const& origin); +}; + +template <> +struct Factory : FactoryBase { + typedef v8::Local FTH; + static inline return_t New(FTH receiver = FTH()); +}; + +template <> +struct Factory : MaybeFactoryBase { + static inline return_t New(); + static inline return_t New(const char *value, int length = -1); + static inline return_t New(const uint16_t *value, int length = -1); + static inline return_t New(std::string const& value); + + static inline return_t New(v8::String::ExternalStringResource * value); + static inline return_t New(ExternalOneByteStringResource * value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(v8::Local value); +}; + +} // end of namespace imp + +#if (NODE_MODULE_VERSION >= 12) + +namespace imp { + +template <> +struct Factory : MaybeFactoryBase { + static inline return_t New( v8::Local source); + static inline return_t New( v8::Local source + , v8::ScriptOrigin const& origin); +}; + +} // end of namespace imp + +# include "nan_implementation_12_inl.h" + +#else // NODE_MODULE_VERSION >= 12 + +# include "nan_implementation_pre_12_inl.h" + +#endif + +//=== API ====================================================================== + +template +typename imp::Factory::return_t +New() { + return imp::Factory::New(); +} + +template +typename imp::Factory::return_t +New(A0 arg0) { + return imp::Factory::New(arg0); +} + +template +typename imp::Factory::return_t +New(A0 arg0, A1 arg1) { + return imp::Factory::New(arg0, arg1); +} + +template +typename imp::Factory::return_t +New(A0 arg0, A1 arg1, A2 arg2) { + return imp::Factory::New(arg0, arg1, arg2); +} + +template +typename imp::Factory::return_t +New(A0 arg0, A1 arg1, A2 arg2, A3 arg3) { + return imp::Factory::New(arg0, arg1, arg2, arg3); +} + +// Note(agnat): When passing overloaded function pointers to template functions +// as generic arguments the compiler needs help in picking the right overload. +// These two functions handle New and New with +// all argument variations. + +// v8::Function and v8::FunctionTemplate with one or two arguments +template +typename imp::Factory::return_t +New( FunctionCallback callback + , v8::Local data = v8::Local()) { + return imp::Factory::New(callback, data); +} + +// v8::Function and v8::FunctionTemplate with three arguments +template +typename imp::Factory::return_t +New( FunctionCallback callback + , v8::Local data = v8::Local() + , A2 a2 = A2()) { + return imp::Factory::New(callback, data, a2); +} + +// Convenience + +#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION +template inline v8::Local New(v8::Handle h); +#endif + +#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION +template + inline v8::Local New(v8::Persistent const& p); +#else +template inline v8::Local New(v8::Persistent const& p); +#endif +template +inline v8::Local New(Persistent const& p); +template +inline v8::Local New(Global const& p); + +inline +imp::Factory::return_t +New(bool value) { + return New(value); +} + +inline +imp::Factory::return_t +New(int32_t value) { + return New(value); +} + +inline +imp::Factory::return_t +New(uint32_t value) { + return New(value); +} + +inline +imp::Factory::return_t +New(double value) { + return New(value); +} + +inline +imp::Factory::return_t +New(std::string const& value) { // NOLINT(build/include_what_you_use) + return New(value); +} + +inline +imp::Factory::return_t +New(const char * value, int length) { + return New(value, length); +} + +inline +imp::Factory::return_t +New(const uint16_t * value, int length) { + return New(value, length); +} + +inline +imp::Factory::return_t +New(const char * value) { + return New(value); +} + +inline +imp::Factory::return_t +New(const uint16_t * value) { + return New(value); +} + +inline +imp::Factory::return_t +New(v8::String::ExternalStringResource * value) { + return New(value); +} + +inline +imp::Factory::return_t +New(ExternalOneByteStringResource * value) { + return New(value); +} + +inline +imp::Factory::return_t +New(v8::Local pattern, v8::RegExp::Flags flags) { + return New(pattern, flags); +} + +#endif // NAN_NEW_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h new file mode 100644 index 00000000000..f1cc156bf19 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h @@ -0,0 +1,155 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_OBJECT_WRAP_H_ +#define NAN_OBJECT_WRAP_H_ + +class ObjectWrap { + public: + ObjectWrap() { + refs_ = 0; + } + + + virtual ~ObjectWrap() { + if (persistent().IsEmpty()) { + return; + } + + assert(persistent().IsNearDeath()); + persistent().ClearWeak(); + persistent().Reset(); + } + + + template + static inline T* Unwrap(v8::Local object) { + assert(!object.IsEmpty()); + assert(object->InternalFieldCount() > 0); + // Cast to ObjectWrap before casting to T. A direct cast from void + // to T won't work right when T has more than one base class. + void* ptr = GetInternalFieldPointer(object, 0); + ObjectWrap* wrap = static_cast(ptr); + return static_cast(wrap); + } + + + inline v8::Local handle() const { + return New(handle_); + } + + + inline Persistent& persistent() { + return handle_; + } + + + protected: + inline void Wrap(v8::Local object) { + assert(persistent().IsEmpty()); + assert(object->InternalFieldCount() > 0); + SetInternalFieldPointer(object, 0, this); + persistent().Reset(object); + MakeWeak(); + } + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + + inline void MakeWeak() { + persistent().v8::PersistentBase::SetWeak( + this, WeakCallback, v8::WeakCallbackType::kParameter); + persistent().MarkIndependent(); + } + +#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION + + inline void MakeWeak() { + persistent().v8::PersistentBase::SetWeak(this, WeakCallback); + persistent().MarkIndependent(); + } + +#else + + inline void MakeWeak() { + persistent().persistent.MakeWeak(this, WeakCallback); + persistent().MarkIndependent(); + } + +#endif + + /* Ref() marks the object as being attached to an event loop. + * Refed objects will not be garbage collected, even if + * all references are lost. + */ + virtual void Ref() { + assert(!persistent().IsEmpty()); + persistent().ClearWeak(); + refs_++; + } + + /* Unref() marks an object as detached from the event loop. This is its + * default state. When an object with a "weak" reference changes from + * attached to detached state it will be freed. Be careful not to access + * the object after making this call as it might be gone! + * (A "weak reference" means an object that only has a + * persistant handle.) + * + * DO NOT CALL THIS FROM DESTRUCTOR + */ + virtual void Unref() { + assert(!persistent().IsEmpty()); + assert(!persistent().IsWeak()); + assert(refs_ > 0); + if (--refs_ == 0) + MakeWeak(); + } + + int refs_; // ro + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(ObjectWrap) +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + + static void + WeakCallback(v8::WeakCallbackInfo const& info) { + ObjectWrap* wrap = info.GetParameter(); + assert(wrap->refs_ == 0); + assert(wrap->handle_.IsNearDeath()); + wrap->handle_.Reset(); + delete wrap; + } + +#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION + + static void + WeakCallback(v8::WeakCallbackData const& data) { + ObjectWrap* wrap = data.GetParameter(); + assert(wrap->refs_ == 0); + assert(wrap->handle_.IsNearDeath()); + wrap->handle_.Reset(); + delete wrap; + } + +#else + + static void WeakCallback(v8::Persistent value, void *data) { + ObjectWrap *wrap = static_cast(data); + assert(wrap->refs_ == 0); + assert(wrap->handle_.IsNearDeath()); + wrap->handle_.Reset(); + delete wrap; + } + +#endif + Persistent handle_; +}; + + +#endif // NAN_OBJECT_WRAP_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h new file mode 100644 index 00000000000..eb4ff109f60 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h @@ -0,0 +1,129 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_PERSISTENT_12_INL_H_ +#define NAN_PERSISTENT_12_INL_H_ + +template class Persistent : + public v8::Persistent { + public: + inline Persistent() : v8::Persistent() {} + + template inline Persistent(v8::Local that) : + v8::Persistent(v8::Isolate::GetCurrent(), that) {} + + template + inline Persistent(const v8::Persistent &that) : + v8::Persistent(v8::Isolate::GetCurrent(), that) {} + + inline void Reset() { v8::PersistentBase::Reset(); } + + template + inline void Reset(const v8::Local &other) { + v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); + } + + template + inline void Reset(const v8::PersistentBase &other) { + v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); + } + + template + inline void SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type); + + private: + inline T *operator*() const { return *PersistentBase::persistent; } + + template + inline void Copy(const Persistent &that) { + TYPE_CHECK(T, S); + + this->Reset(); + + if (!that.IsEmpty()) { + this->Reset(that); + M::Copy(that, this); + } + } +}; + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +template +class Global : public v8::Global { + public: + inline Global() : v8::Global() {} + + template inline Global(v8::Local that) : + v8::Global(v8::Isolate::GetCurrent(), that) {} + + template + inline Global(const v8::PersistentBase &that) : + v8::Global(v8::Isolate::GetCurrent(), that) {} + + inline void Reset() { v8::PersistentBase::Reset(); } + + template + inline void Reset(const v8::Local &other) { + v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); + } + + template + inline void Reset(const v8::PersistentBase &other) { + v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); + } + + template + inline void SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type) { + reinterpret_cast*>(this)->SetWeak( + parameter, callback, type); + } +}; +#else +template +class Global : public v8::UniquePersistent { + public: + inline Global() : v8::UniquePersistent() {} + + template inline Global(v8::Local that) : + v8::UniquePersistent(v8::Isolate::GetCurrent(), that) {} + + template + inline Global(const v8::PersistentBase &that) : + v8::UniquePersistent(v8::Isolate::GetCurrent(), that) {} + + inline void Reset() { v8::PersistentBase::Reset(); } + + template + inline void Reset(const v8::Local &other) { + v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); + } + + template + inline void Reset(const v8::PersistentBase &other) { + v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); + } + + template + inline void SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type) { + reinterpret_cast*>(this)->SetWeak( + parameter, callback, type); + } +}; +#endif + +#endif // NAN_PERSISTENT_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h new file mode 100644 index 00000000000..0d427edb182 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h @@ -0,0 +1,242 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_PERSISTENT_PRE_12_INL_H_ +#define NAN_PERSISTENT_PRE_12_INL_H_ + +template +class PersistentBase { + v8::Persistent persistent; + template + friend v8::Local New(const PersistentBase &p); + template + friend v8::Local New(const Persistent &p); + template + friend v8::Local New(const Global &p); + template friend class ReturnValue; + + public: + inline PersistentBase() : + persistent() {} + + inline void Reset() { + persistent.Dispose(); + persistent.Clear(); + } + + template + inline void Reset(const v8::Local &other) { + TYPE_CHECK(T, S); + + if (!persistent.IsEmpty()) { + persistent.Dispose(); + } + + if (other.IsEmpty()) { + persistent.Clear(); + } else { + persistent = v8::Persistent::New(other); + } + } + + template + inline void Reset(const PersistentBase &other) { + TYPE_CHECK(T, S); + + if (!persistent.IsEmpty()) { + persistent.Dispose(); + } + + if (other.IsEmpty()) { + persistent.Clear(); + } else { + persistent = v8::Persistent::New(other.persistent); + } + } + + inline bool IsEmpty() const { return persistent.IsEmpty(); } + + inline void Empty() { persistent.Clear(); } + + template + inline bool operator==(const PersistentBase &that) const { + return this->persistent == that.persistent; + } + + template + inline bool operator==(const v8::Local &that) const { + return this->persistent == that; + } + + template + inline bool operator!=(const PersistentBase &that) const { + return !operator==(that); + } + + template + inline bool operator!=(const v8::Local &that) const { + return !operator==(that); + } + + template + inline void SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type); + + inline void ClearWeak() { persistent.ClearWeak(); } + + inline void MarkIndependent() { persistent.MarkIndependent(); } + + inline bool IsIndependent() const { return persistent.IsIndependent(); } + + inline bool IsNearDeath() const { return persistent.IsNearDeath(); } + + inline bool IsWeak() const { return persistent.IsWeak(); } + + private: + inline explicit PersistentBase(v8::Persistent that) : + persistent(that) { } + inline explicit PersistentBase(T *val) : persistent(val) {} + template friend class Persistent; + template friend class Global; + friend class ObjectWrap; +}; + +template +class NonCopyablePersistentTraits { + public: + typedef Persistent > + NonCopyablePersistent; + static const bool kResetInDestructor = false; + template + inline static void Copy(const Persistent &source, + NonCopyablePersistent *dest) { + Uncompilable(); + } + + template inline static void Uncompilable() { + TYPE_CHECK(O, v8::Primitive); + } +}; + +template +struct CopyablePersistentTraits { + typedef Persistent > CopyablePersistent; + static const bool kResetInDestructor = true; + template + static inline void Copy(const Persistent &source, + CopyablePersistent *dest) {} +}; + +template class Persistent : + public PersistentBase { + public: + inline Persistent() {} + + template inline Persistent(v8::Handle that) + : PersistentBase(v8::Persistent::New(that)) { + TYPE_CHECK(T, S); + } + + inline Persistent(const Persistent &that) : PersistentBase() { + Copy(that); + } + + template + inline Persistent(const Persistent &that) : + PersistentBase() { + Copy(that); + } + + inline Persistent &operator=(const Persistent &that) { + Copy(that); + return *this; + } + + template + inline Persistent &operator=(const Persistent &that) { + Copy(that); + return *this; + } + + inline ~Persistent() { + if (M::kResetInDestructor) this->Reset(); + } + + private: + inline T *operator*() const { return *PersistentBase::persistent; } + + template + inline void Copy(const Persistent &that) { + TYPE_CHECK(T, S); + + this->Reset(); + + if (!that.IsEmpty()) { + this->persistent = v8::Persistent::New(that.persistent); + M::Copy(that, this); + } + } +}; + +template +class Global : public PersistentBase { + struct RValue { + inline explicit RValue(Global* obj) : object(obj) {} + Global* object; + }; + + public: + inline Global() : PersistentBase(0) { } + + template + inline Global(v8::Local that) + : PersistentBase(v8::Persistent::New(that)) { + TYPE_CHECK(T, S); + } + + template + inline Global(const PersistentBase &that) + : PersistentBase(that) { + TYPE_CHECK(T, S); + } + /** + * Move constructor. + */ + inline Global(RValue rvalue) + : PersistentBase(rvalue.object->persistent) { + rvalue.object->Reset(); + } + inline ~Global() { this->Reset(); } + /** + * Move via assignment. + */ + template + inline Global &operator=(Global rhs) { + TYPE_CHECK(T, S); + this->Reset(rhs.persistent); + rhs.Reset(); + return *this; + } + /** + * Cast operator for moves. + */ + inline operator RValue() { return RValue(this); } + /** + * Pass allows returning uniques from functions, etc. + */ + Global Pass() { return Global(RValue(this)); } + + private: + Global(Global &); + void operator=(Global &); + template friend class ReturnValue; +}; + +#endif // NAN_PERSISTENT_PRE_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h new file mode 100644 index 00000000000..a2e6437d12b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h @@ -0,0 +1,305 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +#ifndef NAN_STRING_BYTES_H_ +#define NAN_STRING_BYTES_H_ + +// Decodes a v8::Local or Buffer to a raw char* + +namespace imp { + +using v8::Local; +using v8::Object; +using v8::String; +using v8::Value; + + +//// Base 64 //// + +#define base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) + + + +//// HEX //// + +static bool contains_non_ascii_slow(const char* buf, size_t len) { + for (size_t i = 0; i < len; ++i) { + if (buf[i] & 0x80) return true; + } + return false; +} + + +static bool contains_non_ascii(const char* src, size_t len) { + if (len < 16) { + return contains_non_ascii_slow(src, len); + } + + const unsigned bytes_per_word = sizeof(void*); + const unsigned align_mask = bytes_per_word - 1; + const unsigned unaligned = reinterpret_cast(src) & align_mask; + + if (unaligned > 0) { + const unsigned n = bytes_per_word - unaligned; + if (contains_non_ascii_slow(src, n)) return true; + src += n; + len -= n; + } + + +#if defined(__x86_64__) || defined(_WIN64) + const uintptr_t mask = 0x8080808080808080ll; +#else + const uintptr_t mask = 0x80808080l; +#endif + + const uintptr_t* srcw = reinterpret_cast(src); + + for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) { + if (srcw[i] & mask) return true; + } + + const unsigned remainder = len & align_mask; + if (remainder > 0) { + const size_t offset = len - remainder; + if (contains_non_ascii_slow(src + offset, remainder)) return true; + } + + return false; +} + + +static void force_ascii_slow(const char* src, char* dst, size_t len) { + for (size_t i = 0; i < len; ++i) { + dst[i] = src[i] & 0x7f; + } +} + + +static void force_ascii(const char* src, char* dst, size_t len) { + if (len < 16) { + force_ascii_slow(src, dst, len); + return; + } + + const unsigned bytes_per_word = sizeof(void*); + const unsigned align_mask = bytes_per_word - 1; + const unsigned src_unalign = reinterpret_cast(src) & align_mask; + const unsigned dst_unalign = reinterpret_cast(dst) & align_mask; + + if (src_unalign > 0) { + if (src_unalign == dst_unalign) { + const unsigned unalign = bytes_per_word - src_unalign; + force_ascii_slow(src, dst, unalign); + src += unalign; + dst += unalign; + len -= src_unalign; + } else { + force_ascii_slow(src, dst, len); + return; + } + } + +#if defined(__x86_64__) || defined(_WIN64) + const uintptr_t mask = ~0x8080808080808080ll; +#else + const uintptr_t mask = ~0x80808080l; +#endif + + const uintptr_t* srcw = reinterpret_cast(src); + uintptr_t* dstw = reinterpret_cast(dst); + + for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) { + dstw[i] = srcw[i] & mask; + } + + const unsigned remainder = len & align_mask; + if (remainder > 0) { + const size_t offset = len - remainder; + force_ascii_slow(src + offset, dst + offset, remainder); + } +} + + +static size_t base64_encode(const char* src, + size_t slen, + char* dst, + size_t dlen) { + // We know how much we'll write, just make sure that there's space. + assert(dlen >= base64_encoded_size(slen) && + "not enough space provided for base64 encode"); + + dlen = base64_encoded_size(slen); + + unsigned a; + unsigned b; + unsigned c; + unsigned i; + unsigned k; + unsigned n; + + static const char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; + + i = 0; + k = 0; + n = slen / 3 * 3; + + while (i < n) { + a = src[i + 0] & 0xff; + b = src[i + 1] & 0xff; + c = src[i + 2] & 0xff; + + dst[k + 0] = table[a >> 2]; + dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; + dst[k + 2] = table[((b & 0x0f) << 2) | (c >> 6)]; + dst[k + 3] = table[c & 0x3f]; + + i += 3; + k += 4; + } + + if (n != slen) { + switch (slen - n) { + case 1: + a = src[i + 0] & 0xff; + dst[k + 0] = table[a >> 2]; + dst[k + 1] = table[(a & 3) << 4]; + dst[k + 2] = '='; + dst[k + 3] = '='; + break; + + case 2: + a = src[i + 0] & 0xff; + b = src[i + 1] & 0xff; + dst[k + 0] = table[a >> 2]; + dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; + dst[k + 2] = table[(b & 0x0f) << 2]; + dst[k + 3] = '='; + break; + } + } + + return dlen; +} + + +static size_t hex_encode(const char* src, size_t slen, char* dst, size_t dlen) { + // We know how much we'll write, just make sure that there's space. + assert(dlen >= slen * 2 && + "not enough space provided for hex encode"); + + dlen = slen * 2; + for (uint32_t i = 0, k = 0; k < dlen; i += 1, k += 2) { + static const char hex[] = "0123456789abcdef"; + uint8_t val = static_cast(src[i]); + dst[k + 0] = hex[val >> 4]; + dst[k + 1] = hex[val & 15]; + } + + return dlen; +} + + + +static Local Encode(const char* buf, + size_t buflen, + enum Encoding encoding) { + assert(buflen <= node::Buffer::kMaxLength); + if (!buflen && encoding != BUFFER) + return New("").ToLocalChecked(); + + Local val; + switch (encoding) { + case BUFFER: + return CopyBuffer(buf, buflen).ToLocalChecked(); + + case ASCII: + if (contains_non_ascii(buf, buflen)) { + char* out = new char[buflen]; + force_ascii(buf, out, buflen); + val = New(out, buflen).ToLocalChecked(); + delete[] out; + } else { + val = New(buf, buflen).ToLocalChecked(); + } + break; + + case UTF8: + val = New(buf, buflen).ToLocalChecked(); + break; + + case BINARY: { + // TODO(isaacs) use ExternalTwoByteString? + const unsigned char *cbuf = reinterpret_cast(buf); + uint16_t * twobytebuf = new uint16_t[buflen]; + for (size_t i = 0; i < buflen; i++) { + // XXX is the following line platform independent? + twobytebuf[i] = cbuf[i]; + } + val = New(twobytebuf, buflen).ToLocalChecked(); + delete[] twobytebuf; + break; + } + + case BASE64: { + size_t dlen = base64_encoded_size(buflen); + char* dst = new char[dlen]; + + size_t written = base64_encode(buf, buflen, dst, dlen); + assert(written == dlen); + + val = New(dst, dlen).ToLocalChecked(); + delete[] dst; + break; + } + + case UCS2: { + const uint16_t* data = reinterpret_cast(buf); + val = New(data, buflen / 2).ToLocalChecked(); + break; + } + + case HEX: { + size_t dlen = buflen * 2; + char* dst = new char[dlen]; + size_t written = hex_encode(buf, buflen, dst, dlen); + assert(written == dlen); + + val = New(dst, dlen).ToLocalChecked(); + delete[] dst; + break; + } + + default: + assert(0 && "unknown encoding"); + break; + } + + return val; +} + +#undef base64_encoded_size + +} // end of namespace imp + +#endif // NAN_STRING_BYTES_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h new file mode 100644 index 00000000000..b7159619ac0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h @@ -0,0 +1,87 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_TYPEDARRAY_CONTENTS_H_ +#define NAN_TYPEDARRAY_CONTENTS_H_ + +template +class TypedArrayContents { + public: + inline explicit TypedArrayContents(v8::Local from) : + length_(0), data_(NULL) { + + size_t length = 0; + void* data = NULL; + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + + if (from->IsArrayBufferView()) { + v8::Local array = + v8::Local::Cast(from); + + const size_t byte_length = array->ByteLength(); + const ptrdiff_t byte_offset = array->ByteOffset(); + v8::Local buffer = array->Buffer(); + + length = byte_length / sizeof(T); + data = static_cast(buffer->GetContents().Data()) + byte_offset; + } + +#else + + if (from->IsObject() && !from->IsNull()) { + v8::Local array = v8::Local::Cast(from); + + MaybeLocal buffer = Get(array, + New("buffer").ToLocalChecked()); + MaybeLocal byte_length = Get(array, + New("byteLength").ToLocalChecked()); + MaybeLocal byte_offset = Get(array, + New("byteOffset").ToLocalChecked()); + + if (!buffer.IsEmpty() && + !byte_length.IsEmpty() && byte_length.ToLocalChecked()->IsUint32() && + !byte_offset.IsEmpty() && byte_offset.ToLocalChecked()->IsUint32()) { + data = array->GetIndexedPropertiesExternalArrayData(); + if(data) { + length = byte_length.ToLocalChecked()->Uint32Value() / sizeof(T); + } + } + } + +#endif + +#if defined(_MSC_VER) && _MSC_VER >= 1900 || __cplusplus >= 201103L + assert(reinterpret_cast(data) % alignof (T) == 0); +#elif defined(_MSC_VER) && _MSC_VER >= 1600 || defined(__GNUC__) + assert(reinterpret_cast(data) % __alignof(T) == 0); +#else + assert(reinterpret_cast(data) % sizeof (T) == 0); +#endif + + length_ = length; + data_ = static_cast(data); + } + + inline size_t length() const { return length_; } + inline T* operator*() { return data_; } + inline const T* operator*() const { return data_; } + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(TypedArrayContents) + + //Disable heap allocation + void *operator new(size_t size); + void operator delete(void *, size_t); + + size_t length_; + T* data_; +}; + +#endif // NAN_TYPEDARRAY_CONTENTS_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h new file mode 100644 index 00000000000..93f6fe86aba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h @@ -0,0 +1,432 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_WEAK_H_ +#define NAN_WEAK_H_ + +static const int kInternalFieldsInWeakCallback = 2; +static const int kNoInternalFieldIndex = -1; + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +# define NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ \ + v8::WeakCallbackInfo > const& +# define NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ \ + NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ +# define NAN_WEAK_PARAMETER_CALLBACK_SIG_ NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ +# define NAN_WEAK_TWOFIELD_CALLBACK_SIG_ NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ +#elif NODE_MODULE_VERSION > IOJS_1_1_MODULE_VERSION +# define NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ \ + v8::PhantomCallbackData > const& +# define NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ \ + NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ +# define NAN_WEAK_PARAMETER_CALLBACK_SIG_ NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ +# define NAN_WEAK_TWOFIELD_CALLBACK_SIG_ NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ +#elif NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION +# define NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ \ + v8::PhantomCallbackData > const& +# define NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ \ + v8::InternalFieldsCallbackData, void> const& +# define NAN_WEAK_PARAMETER_CALLBACK_SIG_ NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ +# define NAN_WEAK_TWOFIELD_CALLBACK_SIG_ NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ +#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION +# define NAN_WEAK_CALLBACK_DATA_TYPE_ \ + v8::WeakCallbackData > const& +# define NAN_WEAK_CALLBACK_SIG_ NAN_WEAK_CALLBACK_DATA_TYPE_ +#else +# define NAN_WEAK_CALLBACK_DATA_TYPE_ void * +# define NAN_WEAK_CALLBACK_SIG_ \ + v8::Persistent, NAN_WEAK_CALLBACK_DATA_TYPE_ +#endif + +template +class WeakCallbackInfo { + public: + typedef void (*Callback)(const WeakCallbackInfo& data); + WeakCallbackInfo( + Persistent *persistent + , Callback callback + , void *parameter + , void *field1 = 0 + , void *field2 = 0) : + callback_(callback), isolate_(0), parameter_(parameter) { + std::memcpy(&persistent_, persistent, sizeof (v8::Persistent)); + internal_fields_[0] = field1; + internal_fields_[1] = field2; + } + inline v8::Isolate *GetIsolate() const { return isolate_; } + inline T *GetParameter() const { return static_cast(parameter_); } + inline void *GetInternalField(int index) const { + assert((index == 0 || index == 1) && "internal field index out of bounds"); + if (index == 0) { + return internal_fields_[0]; + } else { + return internal_fields_[1]; + } + } + + private: + NAN_DISALLOW_ASSIGN_COPY_MOVE(WeakCallbackInfo) + Callback callback_; + v8::Isolate *isolate_; + void *parameter_; + void *internal_fields_[kInternalFieldsInWeakCallback]; + v8::Persistent persistent_; + template friend class Persistent; + template friend class PersistentBase; +#if NODE_MODULE_VERSION <= NODE_0_12_MODULE_VERSION +# if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION + template + static void invoke(NAN_WEAK_CALLBACK_SIG_ data); + template + static WeakCallbackInfo *unwrap(NAN_WEAK_CALLBACK_DATA_TYPE_ data); +# else + static void invoke(NAN_WEAK_CALLBACK_SIG_ data); + static WeakCallbackInfo *unwrap(NAN_WEAK_CALLBACK_DATA_TYPE_ data); +# endif +#else +# if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + template + static void invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data); + template + static void invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data); +# else + static void invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data); + static void invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data); +# endif + static WeakCallbackInfo *unwrapparameter( + NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ data); + static WeakCallbackInfo *unwraptwofield( + NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ data); +#endif +}; + + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + +template +template +void +WeakCallbackInfo::invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data) { + WeakCallbackInfo *cbinfo = unwrapparameter(data); + if (isFirstPass) { + cbinfo->persistent_.Reset(); + data.SetSecondPassCallback(invokeparameter); + } else { + cbinfo->callback_(*cbinfo); + delete cbinfo; + } +} + +template +template +void +WeakCallbackInfo::invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data) { + WeakCallbackInfo *cbinfo = unwraptwofield(data); + if (isFirstPass) { + cbinfo->persistent_.Reset(); + data.SetSecondPassCallback(invoketwofield); + } else { + cbinfo->callback_(*cbinfo); + delete cbinfo; + } +} + +template +WeakCallbackInfo *WeakCallbackInfo::unwrapparameter( + NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ data) { + WeakCallbackInfo *cbinfo = + static_cast*>(data.GetParameter()); + cbinfo->isolate_ = data.GetIsolate(); + return cbinfo; +} + +template +WeakCallbackInfo *WeakCallbackInfo::unwraptwofield( + NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ data) { + WeakCallbackInfo *cbinfo = + static_cast*>(data.GetInternalField(0)); + cbinfo->isolate_ = data.GetIsolate(); + return cbinfo; +} + +#undef NAN_WEAK_PARAMETER_CALLBACK_SIG_ +#undef NAN_WEAK_TWOFIELD_CALLBACK_SIG_ +#undef NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ +#undef NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ +# elif NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION + +template +void +WeakCallbackInfo::invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data) { + WeakCallbackInfo *cbinfo = unwrapparameter(data); + cbinfo->persistent_.Reset(); + cbinfo->callback_(*cbinfo); + delete cbinfo; +} + +template +void +WeakCallbackInfo::invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data) { + WeakCallbackInfo *cbinfo = unwraptwofield(data); + cbinfo->persistent_.Reset(); + cbinfo->callback_(*cbinfo); + delete cbinfo; +} + +template +WeakCallbackInfo *WeakCallbackInfo::unwrapparameter( + NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ data) { + WeakCallbackInfo *cbinfo = + static_cast*>(data.GetParameter()); + cbinfo->isolate_ = data.GetIsolate(); + return cbinfo; +} + +template +WeakCallbackInfo *WeakCallbackInfo::unwraptwofield( + NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ data) { + WeakCallbackInfo *cbinfo = + static_cast*>(data.GetInternalField1()); + cbinfo->isolate_ = data.GetIsolate(); + return cbinfo; +} + +#undef NAN_WEAK_PARAMETER_CALLBACK_SIG_ +#undef NAN_WEAK_TWOFIELD_CALLBACK_SIG_ +#undef NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ +#undef NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ +#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION + +template +template +void WeakCallbackInfo::invoke(NAN_WEAK_CALLBACK_SIG_ data) { + WeakCallbackInfo *cbinfo = unwrap(data); + cbinfo->persistent_.Reset(); + cbinfo->callback_(*cbinfo); + delete cbinfo; +} + +template +template +WeakCallbackInfo *WeakCallbackInfo::unwrap( + NAN_WEAK_CALLBACK_DATA_TYPE_ data) { + void *parameter = data.GetParameter(); + WeakCallbackInfo *cbinfo = + static_cast*>(parameter); + cbinfo->isolate_ = data.GetIsolate(); + return cbinfo; +} + +#undef NAN_WEAK_CALLBACK_SIG_ +#undef NAN_WEAK_CALLBACK_DATA_TYPE_ +#else + +template +void WeakCallbackInfo::invoke(NAN_WEAK_CALLBACK_SIG_ data) { + WeakCallbackInfo *cbinfo = unwrap(data); + cbinfo->persistent_.Dispose(); + cbinfo->persistent_.Clear(); + cbinfo->callback_(*cbinfo); + delete cbinfo; +} + +template +WeakCallbackInfo *WeakCallbackInfo::unwrap( + NAN_WEAK_CALLBACK_DATA_TYPE_ data) { + WeakCallbackInfo *cbinfo = + static_cast*>(data); + cbinfo->isolate_ = v8::Isolate::GetCurrent(); + return cbinfo; +} + +#undef NAN_WEAK_CALLBACK_SIG_ +#undef NAN_WEAK_CALLBACK_DATA_TYPE_ +#endif + +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) +template +template +inline void Persistent::SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type) { + WeakCallbackInfo

*wcbd; + if (type == WeakCallbackType::kParameter) { + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , parameter); + v8::PersistentBase::SetWeak( + wcbd + , WeakCallbackInfo

::template invokeparameter + , type); + } else { + v8::Local* self = reinterpret_cast*>(this); + assert((*self)->IsObject()); + int count = (*self)->InternalFieldCount(); + void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; + for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { + internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); + } + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , 0 + , internal_fields[0] + , internal_fields[1]); + (*self)->SetAlignedPointerInInternalField(0, wcbd); + v8::PersistentBase::SetWeak( + static_cast*>(0) + , WeakCallbackInfo

::template invoketwofield + , type); + } +} +#elif NODE_MODULE_VERSION > IOJS_1_1_MODULE_VERSION +template +template +inline void Persistent::SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type) { + WeakCallbackInfo

*wcbd; + if (type == WeakCallbackType::kParameter) { + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , parameter); + v8::PersistentBase::SetPhantom( + wcbd + , WeakCallbackInfo

::invokeparameter); + } else { + v8::Local* self = reinterpret_cast*>(this); + assert((*self)->IsObject()); + int count = (*self)->InternalFieldCount(); + void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; + for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { + internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); + } + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , 0 + , internal_fields[0] + , internal_fields[1]); + (*self)->SetAlignedPointerInInternalField(0, wcbd); + v8::PersistentBase::SetPhantom( + static_cast*>(0) + , WeakCallbackInfo

::invoketwofield + , 0 + , count > 1 ? 1 : kNoInternalFieldIndex); + } +} +#elif NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION +template +template +inline void Persistent::SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type) { + WeakCallbackInfo

*wcbd; + if (type == WeakCallbackType::kParameter) { + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , parameter); + v8::PersistentBase::SetPhantom( + wcbd + , WeakCallbackInfo

::invokeparameter); + } else { + v8::Local* self = reinterpret_cast*>(this); + assert((*self)->IsObject()); + int count = (*self)->InternalFieldCount(); + void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; + for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { + internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); + } + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , 0 + , internal_fields[0] + , internal_fields[1]); + (*self)->SetAlignedPointerInInternalField(0, wcbd); + v8::PersistentBase::SetPhantom( + WeakCallbackInfo

::invoketwofield + , 0 + , count > 1 ? 1 : kNoInternalFieldIndex); + } +} +#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION +template +template +inline void Persistent::SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type) { + WeakCallbackInfo

*wcbd; + if (type == WeakCallbackType::kParameter) { + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , parameter); + v8::PersistentBase::SetWeak(wcbd, WeakCallbackInfo

::invoke); + } else { + v8::Local* self = reinterpret_cast*>(this); + assert((*self)->IsObject()); + int count = (*self)->InternalFieldCount(); + void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; + for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { + internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); + } + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , 0 + , internal_fields[0] + , internal_fields[1]); + v8::PersistentBase::SetWeak(wcbd, WeakCallbackInfo

::invoke); + } +} +#else +template +template +inline void PersistentBase::SetWeak( + P *parameter + , typename WeakCallbackInfo

::Callback callback + , WeakCallbackType type) { + WeakCallbackInfo

*wcbd; + if (type == WeakCallbackType::kParameter) { + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , parameter); + persistent.MakeWeak(wcbd, WeakCallbackInfo

::invoke); + } else { + v8::Local* self = reinterpret_cast*>(this); + assert((*self)->IsObject()); + int count = (*self)->InternalFieldCount(); + void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; + for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { + internal_fields[i] = (*self)->GetPointerFromInternalField(i); + } + wcbd = new WeakCallbackInfo

( + reinterpret_cast*>(this) + , callback + , 0 + , internal_fields[0] + , internal_fields[1]); + persistent.MakeWeak(wcbd, WeakCallbackInfo

::invoke); + } +} +#endif + +#endif // NAN_WEAK_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/package.json b/src/filesystem/impls/appshell/node/node_modules/nan/package.json new file mode 100644 index 00000000000..8cd0a1c99cf --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + "nan@^2.3.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fsevents" + ] + ], + "_from": "nan@>=2.3.0 <3.0.0", + "_id": "nan@2.4.0", + "_inCache": true, + "_installable": true, + "_location": "/nan", + "_nodeVersion": "5.0.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/nan-2.4.0.tgz_1468158679820_0.6951719264034182" + }, + "_npmUser": { + "email": "bbyholm@abo.fi", + "name": "kkoopa" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "nan", + "raw": "nan@^2.3.0", + "rawSpec": "^2.3.0", + "scope": null, + "spec": ">=2.3.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fsevents" + ], + "_resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz", + "_shasum": "fb3c59d45fe4effe215f0b890f8adf6eb32d2232", + "_shrinkwrap": null, + "_spec": "nan@^2.3.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fsevents", + "bugs": { + "url": "https://github.com/nodejs/nan/issues" + }, + "contributors": [ + { + "email": "r@va.gg", + "name": "Rod Vagg", + "url": "https://github.com/rvagg" + }, + { + "email": "bbyholm@abo.fi", + "name": "Benjamin Byholm", + "url": "https://github.com/kkoopa/" + }, + { + "email": "trev.norris@gmail.com", + "name": "Trevor Norris", + "url": "https://github.com/trevnorris" + }, + { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich", + "url": "https://github.com/TooTallNate" + }, + { + "email": "brett19@gmail.com", + "name": "Brett Lawson", + "url": "https://github.com/brett19" + }, + { + "email": "info@bnoordhuis.nl", + "name": "Ben Noordhuis", + "url": "https://github.com/bnoordhuis" + }, + { + "email": "david@artcom.de", + "name": "David Siegel", + "url": "https://github.com/agnat" + } + ], + "dependencies": {}, + "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 6 compatibility", + "devDependencies": { + "bindings": "~1.2.1", + "commander": "^2.8.1", + "glob": "^5.0.14", + "node-gyp": "~3.0.1", + "readable-stream": "^2.1.4", + "tap": "~0.7.1", + "xtend": "~4.0.0" + }, + "directories": {}, + "dist": { + "shasum": "fb3c59d45fe4effe215f0b890f8adf6eb32d2232", + "tarball": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz" + }, + "homepage": "https://github.com/nodejs/nan#readme", + "license": "MIT", + "main": "include_dirs.js", + "maintainers": [ + { + "email": "rod@vagg.org", + "name": "rvagg" + }, + { + "email": "bbyholm@abo.fi", + "name": "kkoopa" + } + ], + "name": "nan", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/nan.git" + }, + "scripts": { + "docs": "doc/.build.sh", + "rebuild-tests": "node-gyp rebuild --msvs_version=2013 --directory test", + "test": "tap --gc --stderr test/js/*-test.js" + }, + "version": "2.4.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js b/src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js new file mode 100755 index 00000000000..b7498e438cc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js @@ -0,0 +1,412 @@ +#!/usr/bin/env node +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2016 NAN contributors + * + * MIT License + ********************************************************************/ + +var commander = require('commander'), + fs = require('fs'), + glob = require('glob'), + groups = [], + total = 0, + warning1 = '/* ERROR: Rewrite using Buffer */\n', + warning2 = '\\/\\* ERROR\\: Rewrite using Buffer \\*\\/\\n', + length, + i; + +fs.readFile(__dirname + '/package.json', 'utf8', function (err, data) { + if (err) { + throw err; + } + + commander + .version(JSON.parse(data).version) + .usage('[options] ') + .parse(process.argv); + + if (!process.argv.slice(2).length) { + commander.outputHelp(); + } +}); + +/* construct strings representing regular expressions + each expression contains a unique group allowing for identification of the match + the index of this key group, relative to the regular expression in question, + is indicated by the first array member */ + +/* simple substistutions, key group is the entire match, 0 */ +groups.push([0, [ + '_NAN_', + 'NODE_SET_METHOD', + 'NODE_SET_PROTOTYPE_METHOD', + 'NanAsciiString', + 'NanEscapeScope', + 'NanReturnValue', + 'NanUcs2String'].join('|')]); + +/* substitutions of parameterless macros, key group is 1 */ +groups.push([1, ['(', [ + 'NanEscapableScope', + 'NanReturnNull', + 'NanReturnUndefined', + 'NanScope'].join('|'), ')\\(\\)'].join('')]); + +/* replace TryCatch with NanTryCatch once, gobbling possible namespace, key group 2 */ +groups.push([2, '(?:(?:v8\\:\\:)?|(Nan)?)(TryCatch)']); + +/* NanNew("string") will likely not fail a ToLocalChecked(), key group 1 */ +groups.push([1, ['(NanNew)', '(\\("[^\\"]*"[^\\)]*\\))(?!\\.ToLocalChecked\\(\\))'].join('')]); + +/* Removed v8 APIs, warn that the code needs rewriting using node::Buffer, key group 2 */ +groups.push([2, ['(', warning2, ')?', '^.*?(', [ + 'GetIndexedPropertiesExternalArrayDataLength', + 'GetIndexedPropertiesExternalArrayData', + 'GetIndexedPropertiesExternalArrayDataType', + 'GetIndexedPropertiesPixelData', + 'GetIndexedPropertiesPixelDataLength', + 'HasIndexedPropertiesInExternalArrayData', + 'HasIndexedPropertiesInPixelData', + 'SetIndexedPropertiesToExternalArrayData', + 'SetIndexedPropertiesToPixelData'].join('|'), ')'].join('')]); + +/* No need for NanScope in V8-exposed methods, key group 2 */ +groups.push([2, ['((', [ + 'NAN_METHOD', + 'NAN_GETTER', + 'NAN_SETTER', + 'NAN_PROPERTY_GETTER', + 'NAN_PROPERTY_SETTER', + 'NAN_PROPERTY_ENUMERATOR', + 'NAN_PROPERTY_DELETER', + 'NAN_PROPERTY_QUERY', + 'NAN_INDEX_GETTER', + 'NAN_INDEX_SETTER', + 'NAN_INDEX_ENUMERATOR', + 'NAN_INDEX_DELETER', + 'NAN_INDEX_QUERY'].join('|'), ')\\([^\\)]*\\)\\s*\\{)\\s*NanScope\\(\\)\\s*;'].join('')]); + +/* v8::Value::ToXXXXXXX returns v8::MaybeLocal, key group 3 */ +groups.push([3, ['([\\s\\(\\)])([^\\s\\(\\)]+)->(', [ + 'Boolean', + 'Number', + 'String', + 'Object', + 'Integer', + 'Uint32', + 'Int32'].join('|'), ')\\('].join('')]); + +/* v8::Value::XXXXXXXValue returns v8::Maybe, key group 3 */ +groups.push([3, ['([\\s\\(\\)])([^\\s\\(\\)]+)->((?:', [ + 'Boolean', + 'Number', + 'Integer', + 'Uint32', + 'Int32'].join('|'), ')Value)\\('].join('')]); + +/* NAN_WEAK_CALLBACK macro was removed, write out callback definition, key group 1 */ +groups.push([1, '(NAN_WEAK_CALLBACK)\\(([^\\s\\)]+)\\)']); + +/* node::ObjectWrap and v8::Persistent have been replaced with Nan implementations, key group 1 */ +groups.push([1, ['(', [ + 'NanDisposePersistent', + 'NanObjectWrapHandle'].join('|'), ')\\s*\\(\\s*([^\\s\\)]+)'].join('')]); + +/* Since NanPersistent there is no need for NanMakeWeakPersistent, key group 1 */ +groups.push([1, '(NanMakeWeakPersistent)\\s*\\(\\s*([^\\s,]+)\\s*,\\s*']); + +/* Many methods of v8::Object and others now return v8::MaybeLocal, key group 3 */ +groups.push([3, ['([\\s])([^\\s]+)->(', [ + 'GetEndColumn', + 'GetFunction', + 'GetLineNumber', + 'NewInstance', + 'GetPropertyNames', + 'GetOwnPropertyNames', + 'GetSourceLine', + 'GetStartColumn', + 'ObjectProtoToString', + 'ToArrayIndex', + 'ToDetailString', + 'CallAsConstructor', + 'CallAsFunction', + 'CloneElementAt', + 'Delete', + 'ForceSet', + 'Get', + 'GetPropertyAttributes', + 'GetRealNamedProperty', + 'GetRealNamedPropertyInPrototypeChain', + 'Has', + 'HasOwnProperty', + 'HasRealIndexedProperty', + 'HasRealNamedCallbackProperty', + 'HasRealNamedProperty', + 'Set', + 'SetAccessor', + 'SetIndexedPropertyHandler', + 'SetNamedPropertyHandler', + 'SetPrototype'].join('|'), ')\\('].join('')]); + +/* You should get an error if any of these fail anyways, + or handle the error better, it is indicated either way, key group 2 */ +groups.push([2, ['NanNew(<(?:v8\\:\\:)?(', ['Date', 'String', 'RegExp'].join('|'), ')>)(\\([^\\)]*\\))(?!\\.ToLocalChecked\\(\\))'].join('')]); + +/* v8::Value::Equals now returns a v8::Maybe, key group 3 */ +groups.push([3, '([\\s\\(\\)])([^\\s\\(\\)]+)->(Equals)\\(([^\\s\\)]+)']); + +/* NanPersistent makes this unnecessary, key group 1 */ +groups.push([1, '(NanAssignPersistent)(?:]+>)?\\(([^,]+),\\s*']); + +/* args has been renamed to info, key group 2 */ +groups.push([2, '(\\W)(args)(\\W)']) + +/* node::ObjectWrap was replaced with NanObjectWrap, key group 2 */ +groups.push([2, '(\\W)(?:node\\:\\:)?(ObjectWrap)(\\W)']); + +/* v8::Persistent was replaced with NanPersistent, key group 2 */ +groups.push([2, '(\\W)(?:v8\\:\\:)?(Persistent)(\\W)']); + +/* counts the number of capturing groups in a well-formed regular expression, + ignoring non-capturing groups and escaped parentheses */ +function groupcount(s) { + var positive = s.match(/\((?!\?)/g), + negative = s.match(/\\\(/g); + return (positive ? positive.length : 0) - (negative ? negative.length : 0); +} + +/* compute the absolute position of each key group in the joined master RegExp */ +for (i = 1, length = groups.length; i < length; i++) { + total += groupcount(groups[i - 1][1]); + groups[i][0] += total; +} + +/* create the master RegExp, whis is the union of all the groups' expressions */ +master = new RegExp(groups.map(function (a) { return a[1]; }).join('|'), 'gm'); + +/* replacement function for String.replace, receives 21 arguments */ +function replace() { + /* simple expressions */ + switch (arguments[groups[0][0]]) { + case '_NAN_': + return 'NAN_'; + case 'NODE_SET_METHOD': + return 'NanSetMethod'; + case 'NODE_SET_PROTOTYPE_METHOD': + return 'NanSetPrototypeMethod'; + case 'NanAsciiString': + return 'NanUtf8String'; + case 'NanEscapeScope': + return 'scope.Escape'; + case 'NanReturnNull': + return 'info.GetReturnValue().SetNull'; + case 'NanReturnValue': + return 'info.GetReturnValue().Set'; + case 'NanUcs2String': + return 'v8::String::Value'; + default: + } + + /* macros without arguments */ + switch (arguments[groups[1][0]]) { + case 'NanEscapableScope': + return 'NanEscapableScope scope' + case 'NanReturnUndefined': + return 'return'; + case 'NanScope': + return 'NanScope scope'; + default: + } + + /* TryCatch, emulate negative backref */ + if (arguments[groups[2][0]] === 'TryCatch') { + return arguments[groups[2][0] - 1] ? arguments[0] : 'NanTryCatch'; + } + + /* NanNew("foo") --> NanNew("foo").ToLocalChecked() */ + if (arguments[groups[3][0]] === 'NanNew') { + return [arguments[0], '.ToLocalChecked()'].join(''); + } + + /* insert warning for removed functions as comment on new line above */ + switch (arguments[groups[4][0]]) { + case 'GetIndexedPropertiesExternalArrayData': + case 'GetIndexedPropertiesExternalArrayDataLength': + case 'GetIndexedPropertiesExternalArrayDataType': + case 'GetIndexedPropertiesPixelData': + case 'GetIndexedPropertiesPixelDataLength': + case 'HasIndexedPropertiesInExternalArrayData': + case 'HasIndexedPropertiesInPixelData': + case 'SetIndexedPropertiesToExternalArrayData': + case 'SetIndexedPropertiesToPixelData': + return arguments[groups[4][0] - 1] ? arguments[0] : [warning1, arguments[0]].join(''); + default: + } + + /* remove unnecessary NanScope() */ + switch (arguments[groups[5][0]]) { + case 'NAN_GETTER': + case 'NAN_METHOD': + case 'NAN_SETTER': + case 'NAN_INDEX_DELETER': + case 'NAN_INDEX_ENUMERATOR': + case 'NAN_INDEX_GETTER': + case 'NAN_INDEX_QUERY': + case 'NAN_INDEX_SETTER': + case 'NAN_PROPERTY_DELETER': + case 'NAN_PROPERTY_ENUMERATOR': + case 'NAN_PROPERTY_GETTER': + case 'NAN_PROPERTY_QUERY': + case 'NAN_PROPERTY_SETTER': + return arguments[groups[5][0] - 1]; + default: + } + + /* Value converstion */ + switch (arguments[groups[6][0]]) { + case 'Boolean': + case 'Int32': + case 'Integer': + case 'Number': + case 'Object': + case 'String': + case 'Uint32': + return [arguments[groups[6][0] - 2], 'NanTo(', arguments[groups[6][0] - 1]].join(''); + default: + } + + /* other value conversion */ + switch (arguments[groups[7][0]]) { + case 'BooleanValue': + return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); + case 'Int32Value': + return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); + case 'IntegerValue': + return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); + case 'Uint32Value': + return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); + default: + } + + /* NAN_WEAK_CALLBACK */ + if (arguments[groups[8][0]] === 'NAN_WEAK_CALLBACK') { + return ['template\nvoid ', + arguments[groups[8][0] + 1], '(const NanWeakCallbackInfo &data)'].join(''); + } + + /* use methods on NAN classes instead */ + switch (arguments[groups[9][0]]) { + case 'NanDisposePersistent': + return [arguments[groups[9][0] + 1], '.Reset('].join(''); + case 'NanObjectWrapHandle': + return [arguments[groups[9][0] + 1], '->handle('].join(''); + default: + } + + /* use method on NanPersistent instead */ + if (arguments[groups[10][0]] === 'NanMakeWeakPersistent') { + return arguments[groups[10][0] + 1] + '.SetWeak('; + } + + /* These return Maybes, the upper ones take no arguments */ + switch (arguments[groups[11][0]]) { + case 'GetEndColumn': + case 'GetFunction': + case 'GetLineNumber': + case 'GetOwnPropertyNames': + case 'GetPropertyNames': + case 'GetSourceLine': + case 'GetStartColumn': + case 'NewInstance': + case 'ObjectProtoToString': + case 'ToArrayIndex': + case 'ToDetailString': + return [arguments[groups[11][0] - 2], 'Nan', arguments[groups[11][0]], '(', arguments[groups[11][0] - 1]].join(''); + case 'CallAsConstructor': + case 'CallAsFunction': + case 'CloneElementAt': + case 'Delete': + case 'ForceSet': + case 'Get': + case 'GetPropertyAttributes': + case 'GetRealNamedProperty': + case 'GetRealNamedPropertyInPrototypeChain': + case 'Has': + case 'HasOwnProperty': + case 'HasRealIndexedProperty': + case 'HasRealNamedCallbackProperty': + case 'HasRealNamedProperty': + case 'Set': + case 'SetAccessor': + case 'SetIndexedPropertyHandler': + case 'SetNamedPropertyHandler': + case 'SetPrototype': + return [arguments[groups[11][0] - 2], 'Nan', arguments[groups[11][0]], '(', arguments[groups[11][0] - 1], ', '].join(''); + default: + } + + /* Automatic ToLocalChecked(), take it or leave it */ + switch (arguments[groups[12][0]]) { + case 'Date': + case 'String': + case 'RegExp': + return ['NanNew', arguments[groups[12][0] - 1], arguments[groups[12][0] + 1], '.ToLocalChecked()'].join(''); + default: + } + + /* NanEquals is now required for uniformity */ + if (arguments[groups[13][0]] === 'Equals') { + return [arguments[groups[13][0] - 1], 'NanEquals(', arguments[groups[13][0] - 1], ', ', arguments[groups[13][0] + 1]].join(''); + } + + /* use method on replacement class instead */ + if (arguments[groups[14][0]] === 'NanAssignPersistent') { + return [arguments[groups[14][0] + 1], '.Reset('].join(''); + } + + /* args --> info */ + if (arguments[groups[15][0]] === 'args') { + return [arguments[groups[15][0] - 1], 'info', arguments[groups[15][0] + 1]].join(''); + } + + /* ObjectWrap --> NanObjectWrap */ + if (arguments[groups[16][0]] === 'ObjectWrap') { + return [arguments[groups[16][0] - 1], 'NanObjectWrap', arguments[groups[16][0] + 1]].join(''); + } + + /* Persistent --> NanPersistent */ + if (arguments[groups[17][0]] === 'Persistent') { + return [arguments[groups[17][0] - 1], 'NanPersistent', arguments[groups[17][0] + 1]].join(''); + } + + /* This should not happen. A switch is probably missing a case if it does. */ + throw 'Unhandled match: ' + arguments[0]; +} + +/* reads a file, runs replacement and writes it back */ +function processFile(file) { + fs.readFile(file, {encoding: 'utf8'}, function (err, data) { + if (err) { + throw err; + } + + /* run replacement twice, might need more runs */ + fs.writeFile(file, data.replace(master, replace).replace(master, replace), function (err) { + if (err) { + throw err; + } + }); + }); +} + +/* process file names from command line and process the identified files */ +for (i = 2, length = process.argv.length; i < length; i++) { + glob(process.argv[i], function (err, matches) { + if (err) { + throw err; + } + matches.forEach(processFile); + }); +} diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md b/src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md new file mode 100644 index 00000000000..7f07e4b8256 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md @@ -0,0 +1,14 @@ +1to2 naively converts source code files from NAN 1 to NAN 2. There will be erroneous conversions, +false positives and missed opportunities. The input files are rewritten in place. Make sure that +you have backups. You will have to manually review the changes afterwards and do some touchups. + +```sh +$ tools/1to2.js + + Usage: 1to2 [options] + + Options: + + -h, --help output usage information + -V, --version output the version number +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json b/src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json new file mode 100644 index 00000000000..2dcdd789394 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json @@ -0,0 +1,19 @@ +{ + "name": "1to2", + "version": "1.0.0", + "description": "NAN 1 -> 2 Migration Script", + "main": "1to2.js", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/nan.git" + }, + "contributors": [ + "Benjamin Byholm (https://github.com/kkoopa/)", + "Mathias Küsel (https://github.com/mathiask88/)" + ], + "dependencies": { + "glob": "~5.0.10", + "commander": "~2.8.1" + }, + "license": "MIT" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE b/src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE new file mode 100644 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md b/src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md new file mode 100644 index 00000000000..e75d4bd0a68 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md @@ -0,0 +1,75 @@ +# normalize-path [![NPM version](https://badge.fury.io/js/normalize-path.svg)](http://badge.fury.io/js/normalize-path) [![Build Status](https://travis-ci.org/jonschlinkert/normalize-path.svg)](https://travis-ci.org/jonschlinkert/normalize-path) + +> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i normalize-path --save +``` + +## Usage + +```js +var normalize = require('normalize-path'); + +normalize('\\foo\\bar\\baz\\'); +//=> '/foo/bar/baz' + +normalize('./foo/bar/baz/'); +//=> './foo/bar/baz' +``` + +Pass `false` as the last argument to **not** strip trailing slashes: + +```js +normalize('./foo/bar/baz/', false); +//=> './foo/bar/baz/' + +normalize('foo\\bar\\baz\\', false); +//=> 'foo/bar/baz/' +``` + +## Related + +Other useful libraries for working with paths in node.js: + +* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path) +* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://www.npmjs.com/package/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with) +* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute) +* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative) +* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath) +* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with) +* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments) +* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g … [more](https://www.npmjs.com/package/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext) +* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/normalize-path/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 17, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js b/src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js new file mode 100644 index 00000000000..137f6015b1d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js @@ -0,0 +1,17 @@ +/*! + * normalize-path + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License + */ + +module.exports = function normalizePath(str, stripTrailing) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + str = str.replace(/[\\\/]+/g, '/'); + if (stripTrailing !== false) { + str = str.replace(/\/$/, ''); + } + return str; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json b/src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json new file mode 100644 index 00000000000..8bebc75b8f4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + "normalize-path@^2.0.1", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "normalize-path@>=2.0.1 <3.0.0", + "_id": "normalize-path@2.0.1", + "_inCache": true, + "_installable": true, + "_location": "/normalize-path", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "normalize-path", + "raw": "normalize-path@^2.0.1", + "rawSpec": "^2.0.1", + "scope": null, + "spec": ">=2.0.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz", + "_shasum": "47886ac1662760d4261b7d979d241709d3ce3f7a", + "_shrinkwrap": null, + "_spec": "normalize-path@^2.0.1", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/normalize-path/issues" + }, + "dependencies": {}, + "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes.", + "devDependencies": { + "benchmarked": "^0.1.1", + "minimist": "^1.2.0", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "47886ac1662760d4261b7d979d241709d3ce3f7a", + "tarball": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "ca536e0e8755d3ed04f3ba4d21cc9e122e0f749f", + "homepage": "https://github.com/jonschlinkert/normalize-path", + "keywords": [ + "backslash", + "file", + "filepath", + "fix", + "forward", + "fp", + "fs", + "normalize", + "path", + "slash", + "slashes", + "trailing", + "unix", + "urix" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + }, + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "normalize-path", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/normalize-path.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "description": "Other useful libraries for working with paths in node.js:", + "list": [ + "rewrite-ext", + "contains-path", + "ends-with", + "path-ends-with", + "path-segments", + "is-absolute", + "is-relative", + "parse-filepath", + "unixify" + ] + } + }, + "version": "2.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE b/src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE new file mode 100644 index 00000000000..fa30c4cb3e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/README.md b/src/filesystem/impls/appshell/node/node_modules/object.omit/README.md new file mode 100644 index 00000000000..39251833961 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/object.omit/README.md @@ -0,0 +1,104 @@ +# object.omit [![NPM version](https://badge.fury.io/js/object.omit.svg)](http://badge.fury.io/js/object.omit) + +> Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument. + +## Install + +```sh +$ npm i object.omit --save-dev +``` + +## Usage + +```js +var omit = require('object.omit'); +``` + +Pass a string `key` to omit: + +```js +omit({a: 'a', b: 'b', c: 'c'}, 'a') +//=> { b: 'b', c: 'c' } +``` + +Pass an array of `keys` to omit: + +```js +omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c']) +//=> { b: 'b' } +``` + +Returns the object if no keys are passed: + +```js +omit({a: 'a', b: 'b', c: 'c'}) +//=> {a: 'a', b: 'b', c: 'c'} +``` + +Returns an empty object if no value is passed. + +```js +omit() +//=> {} +``` + +### Filter function + +An optional filter function may be passed as the last argument, with or without keys passed on the arguments: + +**filter on keys** + +```js +var res = omit({a: 'a', b: 'b', c: 'c'}, function (val, key) { + return key === 'a'; +}); +//=> {a: 'a'} +``` + +**filter on values** + +```js +var fn = function() {}; +var obj = {a: 'a', b: 'b', c: fn}; + +var res = omit(obj, ['a'], function (val, key) { + return typeof val !== 'function'; +}); +//=> {b: 'b'} +``` + +### Other awesome javascript/node.js utils + +* [object.filter](https://github.com/jonschlinkert/object.filter): Create a new object filtered to have only properties for which the callback returns true. +* [object.pick](https://github.com/jonschlinkert/object.pick): Returns a filtered copy of an object with only the specified keys, like `pick` from… [more](https://github.com/jonschlinkert/object.pick) +* [object.pluck](https://github.com/jonschlinkert/object.pluck): Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with… [more](https://github.com/jonschlinkert/object.pluck) +* [object.reduce](https://github.com/jonschlinkert/object.reduce): Reduces an object to a value that is the accumulated result of running each property… [more](https://github.com/jonschlinkert/object.reduce) +* [object.defaults](https://github.com/jonschlinkert/object.defaults): Like `extend` but only copies missing properties/values to the target object. + +## Runing tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/object.omit/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2014-2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/index.js b/src/filesystem/impls/appshell/node/node_modules/object.omit/index.js new file mode 100644 index 00000000000..576a578f88d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/object.omit/index.js @@ -0,0 +1,40 @@ +/*! + * object.omit + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isObject = require('is-extendable'); +var forOwn = require('for-own'); + +module.exports = function omit(obj, keys) { + if (!isObject(obj)) return {}; + + var keys = [].concat.apply([], [].slice.call(arguments, 1)); + var last = keys[keys.length - 1]; + var res = {}, fn; + + if (typeof last === 'function') { + fn = keys.pop(); + } + + var isFunction = typeof fn === 'function'; + if (!keys.length && !isFunction) { + return obj; + } + + forOwn(obj, function (value, key) { + if (keys.indexOf(key) === -1) { + + if (!isFunction) { + res[key] = value; + } else if (fn(value, key, obj)) { + res[key] = value; + } + } + }); + return res; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/package.json b/src/filesystem/impls/appshell/node/node_modules/object.omit/package.json new file mode 100644 index 00000000000..526e7926b79 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/object.omit/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + "object.omit@^2.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "object.omit@>=2.0.0 <3.0.0", + "_id": "object.omit@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/object.omit", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "object.omit", + "raw": "object.omit@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz", + "_shasum": "868597333d54e60662940bb458605dd6ae12fe94", + "_shrinkwrap": null, + "_spec": "object.omit@^2.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/object.omit/issues" + }, + "dependencies": { + "for-own": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "description": "Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "868597333d54e60662940bb458605dd6ae12fe94", + "tarball": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "6e222f2cf39634faa26f642b06af4eb2050b5e75", + "homepage": "https://github.com/jonschlinkert/object.omit", + "keywords": [ + "clear", + "delete", + "key", + "value", + "object", + "omit", + "property", + "remove" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "object.omit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/object.omit.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "object.filter", + "object.pick", + "object.pluck", + "object.reduce", + "object.defaults" + ] + } + }, + "version": "2.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE b/src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE new file mode 100644 index 00000000000..65f90aca8c2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md b/src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md new file mode 100644 index 00000000000..000ccd99cb4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md @@ -0,0 +1,115 @@ +# parse-glob [![NPM version](https://badge.fury.io/js/parse-glob.svg)](http://badge.fury.io/js/parse-glob) [![Build Status](https://travis-ci.org/jonschlinkert/parse-glob.svg)](https://travis-ci.org/jonschlinkert/parse-glob) + +> Parse a glob pattern into an object of tokens. + +**Changes from v1.0.0 to v3.0.4** + +* all path-related properties are now on the `path` object +* all boolean properties are now on the `is` object +* adds `base` property + +See the [properties](#properties) section for details. + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i parse-glob --save +``` + +* parses 1,000+ glob patterns in 29ms (2.3 GHz Intel Core i7) +* Extensive [unit tests](./test.js) (more than 1,000 lines), covering wildcards, globstars, character classes, brace patterns, extglobs, dotfiles and other complex patterns. + +See the tests for [hundreds of examples](./test.js). + +## Usage + +```js +var parseGlob = require('parse-glob'); +``` + +**Example** + +```js +parseGlob('a/b/c/**/*.{yml,json}'); +``` + +**Returns:** + +```js +{ orig: 'a/b/c/**/*.{yml,json}', + is: + { glob: true, + negated: false, + extglob: false, + braces: true, + brackets: false, + globstar: true, + dotfile: false, + dotdir: false }, + glob: '**/*.{yml,json}', + base: 'a/b/c', + path: + { dirname: 'a/b/c/**/', + basename: '*.{yml,json}', + filename: '*', + extname: '.{yml,json}', + ext: '{yml,json}' } } +``` + +## Properties + +The object returned by parseGlob has the following properties: + +* `orig`: a copy of the original, unmodified glob pattern +* `is`: an object with boolean information about the glob: + - `glob`: true if the pattern actually a glob pattern + - `negated`: true if it's a negation pattern (`!**/foo.js`) + - `extglob`: true if it has extglobs (`@(foo|bar)`) + - `braces`: true if it has braces (`{1..2}` or `.{txt,md}`) + - `brackets`: true if it has POSIX brackets (`[[:alpha:]]`) + - `globstar`: true if the pattern has a globstar (double star, `**`) + - `dotfile`: true if the pattern should match dotfiles + - `dotdir`: true if the pattern should match dot-directories (like `.git`) +* `glob`: the glob pattern part of the string, if any +* `base`: the non-glob part of the string, if any +* `path`: file path segments + - `dirname`: directory + - `basename`: file name with extension + - `filename`: file name without extension + - `extname`: file extension with dot + - `ext`: file extension without dot + +## Related +* [glob-base](https://www.npmjs.com/package/glob-base): Returns an object with the (non-glob) base path and the actual pattern. | [homepage](https://github.com/jonschlinkert/glob-base) +* [glob-parent](https://www.npmjs.com/package/glob-parent): Strips glob magic from a string to provide the parent path | [homepage](https://github.com/es128/glob-parent) +* [glob-path-regex](https://www.npmjs.com/package/glob-path-regex): Regular expression for matching the parts of glob pattern. | [homepage](https://github.com/regexps/glob-path-regex) +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern. | [homepage](https://github.com/jonschlinkert/is-glob) +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/parse-glob/issues/new). + +## Tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2014-2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js b/src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js new file mode 100644 index 00000000000..4ab691afc7d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js @@ -0,0 +1,156 @@ +/*! + * parse-glob + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var isGlob = require('is-glob'); +var findBase = require('glob-base'); +var extglob = require('is-extglob'); +var dotfile = require('is-dotfile'); + +/** + * Expose `cache` + */ + +var cache = module.exports.cache = {}; + +/** + * Parse a glob pattern into tokens. + * + * When no paths or '**' are in the glob, we use a + * different strategy for parsing the filename, since + * file names can contain braces and other difficult + * patterns. such as: + * + * - `*.{a,b}` + * - `(**|*.js)` + */ + +module.exports = function parseGlob(glob) { + if (cache.hasOwnProperty(glob)) { + return cache[glob]; + } + + var tok = {}; + tok.orig = glob; + tok.is = {}; + + // unescape dots and slashes in braces/brackets + glob = escape(glob); + + var parsed = findBase(glob); + tok.is.glob = parsed.isGlob; + + tok.glob = parsed.glob; + tok.base = parsed.base; + var segs = /([^\/]*)$/.exec(glob); + + tok.path = {}; + tok.path.dirname = ''; + tok.path.basename = segs[1] || ''; + tok.path.dirname = glob.split(tok.path.basename).join('') || ''; + var basename = (tok.path.basename || '').split('.') || ''; + tok.path.filename = basename[0] || ''; + tok.path.extname = basename.slice(1).join('.') || ''; + tok.path.ext = ''; + + if (isGlob(tok.path.dirname) && !tok.path.basename) { + if (!/\/$/.test(tok.glob)) { + tok.path.basename = tok.glob; + } + tok.path.dirname = tok.base; + } + + if (glob.indexOf('/') === -1 && !tok.is.globstar) { + tok.path.dirname = ''; + tok.path.basename = tok.orig; + } + + var dot = tok.path.basename.indexOf('.'); + if (dot !== -1) { + tok.path.filename = tok.path.basename.slice(0, dot); + tok.path.extname = tok.path.basename.slice(dot); + } + + if (tok.path.extname.charAt(0) === '.') { + var exts = tok.path.extname.split('.'); + tok.path.ext = exts[exts.length - 1]; + } + + // unescape dots and slashes in braces/brackets + tok.glob = unescape(tok.glob); + tok.path.dirname = unescape(tok.path.dirname); + tok.path.basename = unescape(tok.path.basename); + tok.path.filename = unescape(tok.path.filename); + tok.path.extname = unescape(tok.path.extname); + + // Booleans + var is = (glob && tok.is.glob); + tok.is.negated = glob && glob.charAt(0) === '!'; + tok.is.extglob = glob && extglob(glob); + tok.is.braces = has(is, glob, '{'); + tok.is.brackets = has(is, glob, '[:'); + tok.is.globstar = has(is, glob, '**'); + tok.is.dotfile = dotfile(tok.path.basename) || dotfile(tok.path.filename); + tok.is.dotdir = dotdir(tok.path.dirname); + return (cache[glob] = tok); +} + +/** + * Returns true if the glob matches dot-directories. + * + * @param {Object} `tok` The tokens object + * @param {Object} `path` The path object + * @return {Object} + */ + +function dotdir(base) { + if (base.indexOf('/.') !== -1) { + return true; + } + if (base.charAt(0) === '.' && base.charAt(1) !== '/') { + return true; + } + return false; +} + +/** + * Returns true if the pattern has the given `ch`aracter(s) + * + * @param {Object} `glob` The glob pattern. + * @param {Object} `ch` The character to test for + * @return {Object} + */ + +function has(is, glob, ch) { + return is && glob.indexOf(ch) !== -1; +} + +/** + * Escape/unescape utils + */ + +function escape(str) { + var re = /\{([^{}]*?)}|\(([^()]*?)\)|\[([^\[\]]*?)\]/g; + return str.replace(re, function (outter, braces, parens, brackets) { + var inner = braces || parens || brackets; + if (!inner) { return outter; } + return outter.split(inner).join(esc(inner)); + }); +} + +function esc(str) { + str = str.split('/').join('__SLASH__'); + str = str.split('.').join('__DOT__'); + return str; +} + +function unescape(str) { + str = str.split('__SLASH__').join('/'); + str = str.split('__DOT__').join('.'); + return str; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json b/src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json new file mode 100644 index 00000000000..fef76859f5b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + "parse-glob@^3.0.4", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "parse-glob@>=3.0.4 <4.0.0", + "_id": "parse-glob@3.0.4", + "_inCache": true, + "_installable": true, + "_location": "/parse-glob", + "_nodeVersion": "0.12.4", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "name": "parse-glob", + "raw": "parse-glob@^3.0.4", + "rawSpec": "^3.0.4", + "scope": null, + "spec": ">=3.0.4 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "_shasum": "b2c376cfb11f35513badd173ef0bb6e3a388391c", + "_shrinkwrap": null, + "_spec": "parse-glob@^3.0.4", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/parse-glob/issues" + }, + "dependencies": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "description": "Parse a glob pattern into an object of tokens.", + "devDependencies": { + "browserify": "^9.0.3", + "lodash": "^3.3.1", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "b2c376cfb11f35513badd173ef0bb6e3a388391c", + "tarball": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "9bfccb63acdeb3b1ed62035b3adef0e5081d8fc6", + "homepage": "https://github.com/jonschlinkert/parse-glob", + "keywords": [ + "glob", + "match", + "bash", + "expand", + "expansion", + "expression", + "file", + "files", + "filter", + "find", + "glob", + "globbing", + "globs", + "globstar", + "match", + "matcher", + "matches", + "matching", + "path", + "pattern", + "patterns", + "regex", + "regexp", + "regular", + "shell", + "wildcard" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "parse-glob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/parse-glob.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js", + "test": "mocha" + }, + "version": "3.0.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js new file mode 100644 index 00000000000..19f103f908a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +}; + +function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; + + // UNC paths are always absolute + return !!result[2] || isUnc; +}; + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license new file mode 100644 index 00000000000..654d0bfe943 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json new file mode 100644 index 00000000000..5544235057e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "path-is-absolute@^1.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] + ], + "_from": "path-is-absolute@>=1.0.0 <2.0.0", + "_id": "path-is-absolute@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/path-is-absolute", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "path-is-absolute", + "raw": "path-is-absolute@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "_shrinkwrap": null, + "_spec": "path-is-absolute@^1.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "dependencies": {}, + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", + "homepage": "https://github.com/sindresorhus/path-is-absolute", + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "path-is-absolute", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md new file mode 100644 index 00000000000..cdf94f4309a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md @@ -0,0 +1,51 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +var pathIsAbsolute = require('path-is-absolute'); + +// Linux +pathIsAbsolute('/home/foo'); +//=> true + +// Windows +pathIsAbsolute('C:/Users/'); +//=> true + +// Any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +The Posix specific version. + +### pathIsAbsolute.win32(path) + +The Windows specific version. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes b/src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes new file mode 100644 index 00000000000..759c2c5afdc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes @@ -0,0 +1,14 @@ +# Enforce Unix newlines +*.* text eol=lf +*.css text eol=lf +*.html text eol=lf +*.js text eol=lf +*.json text eol=lf +*.less text eol=lf +*.md text eol=lf +*.yml text eol=lf + +*.jpg binary +*.gif binary +*.png binary +*.jpeg binary \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc b/src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc new file mode 100644 index 00000000000..e72045d2b3d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc @@ -0,0 +1,24 @@ +{ + "asi": false, + "boss": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "esnext": true, + "immed": true, + "latedef": true, + "laxcomma": false, + "newcap": true, + "noarg": true, + "node": true, + "sub": true, + "undef": true, + "unused": true, + "globals": { + "define": true, + "before": true, + "after": true, + "describe": true, + "it": true + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore b/src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore new file mode 100644 index 00000000000..1a2e47f0da0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore @@ -0,0 +1,53 @@ +# Numerous always-ignore extensions +*.csv +*.dat +*.diff +*.err +*.gz +*.log +*.orig +*.out +*.pid +*.rar +*.rej +*.seed +*.swo +*.swp +*.vi +*.yo-rc.json +*.zip +*~ +.ruby-version +lib-cov +npm-debug.log + +# Always-ignore dirs +/bower_components/ +/node_modules/ +/temp/ +/tmp/ +/vendor/ +_gh_pages + +# OS or Editor folders +*.esproj +*.komodoproject +.komodotools +*.sublime-* +._* +.cache +.DS_Store +.idea +.project +.settings +.tmproj +nbproject +Thumbs.db + +# grunt-html-validation +validation-status.json +validation-report.json + +# misc +TODO.md +benchmark \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml new file mode 100644 index 00000000000..ff74a054e07 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - '0.10' \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md b/src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md new file mode 100644 index 00000000000..72344a9eb30 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md @@ -0,0 +1,59 @@ +# {%= name %} {%= badge("fury") %} + +> {%= description %} + +Useful for protecting tokens, like templates in HTML, from being mutated when the string is transformed in some way, like from a formatter/beautifier. + +**Example without `preserve`** + +Let's say you want to use [js-beautify] on a string of html with Lo-Dash/Underscore templates, such as: `

  • <%= name %>
`: + +js-beautify will render the template unusable (and apply incorrect formatting because of the unfamiliar syntax from the Lo-Dash template): + +```html +
    +
  • + <%=n ame %> +
  • +
+``` + +**Example with `preserve`** + +Correct. + +```html +
    +
  • <%= name %>
  • +
+``` + +For the record, this is just a random example, I've had very few issues with js-beautify in general. But with or without js-beautify, this kind of token mangling does happen sometimes when you use formatters, beautifiers or similar tools. + +## Install +{%= include("install-npm", {save: true}) %} + +## Run tests + +```bash +npm test +``` + +## API +{%= apidocs("index.js") %} + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %}) + +## Author +{%= include("author") %} + +## License +{%= copyright() %} +{%= license() %} + +*** + +{%= include("footer") %} + +[js-beautify]: https://github.com/beautify-web/js-beautify \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE b/src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE new file mode 100644 index 00000000000..5a9956a75dd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE @@ -0,0 +1,24 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/README.md b/src/filesystem/impls/appshell/node/node_modules/preserve/README.md new file mode 100644 index 00000000000..75000b93349 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/README.md @@ -0,0 +1,90 @@ +# preserve [![NPM version](https://badge.fury.io/js/preserve.svg)](http://badge.fury.io/js/preserve) + +> Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string. + +Useful for protecting tokens, like templates in HTML, from being mutated when the string is transformed in some way, like from a formatter/beautifier. + +**Example without `preserve`** + +Let's say you want to use [js-beautify] on a string of html with Lo-Dash/Underscore templates, such as: `
  • <%= name %>
`: + +js-beautify will render the template unusable (and apply incorrect formatting because of the unfamiliar syntax from the Lo-Dash template): + +```html +
    +
  • + <%=n ame %> +
  • +
+``` + +**Example with `preserve`** + +Correct. + +```html +
    +
  • <%= name %>
  • +
+``` + +For the record, this is just a random example, I've had very few issues with js-beautify in general. But with or without js-beautify, this kind of token mangling does happen sometimes when you use formatters, beautifiers or similar tools. + +## Install +## Install with [npm](npmjs.org) + +```bash +npm i preserve --save +``` + +## Run tests + +```bash +npm test +``` + +## API +### [.before](index.js#L23) + +Replace tokens in `str` with a temporary, heuristic placeholder. + +* `str` **{String}** +* `returns` **{String}**: String with placeholders. + +```js +tokens.before('{a\\,b}'); +//=> '{__ID1__}' +``` + +### [.after](index.js#L44) + +Replace placeholders in `str` with original tokens. + +* `str` **{String}**: String with placeholders +* `returns` **{String}** `str`: String with original tokens. + +```js +tokens.after('{__ID1__}'); +//=> '{a\\,b}' +``` + + +## Contributing +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/preserve/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2015-2015, Jon Schlinkert. +Released under the MIT license + +*** + +_This file was generated by [verb](https://github.com/assemble/verb) on January 10, 2015._ + +[js-beautify]: https://github.com/beautify-web/js-beautify \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/index.js b/src/filesystem/impls/appshell/node/node_modules/preserve/index.js new file mode 100644 index 00000000000..a6c5d481d45 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/index.js @@ -0,0 +1,54 @@ +/*! + * preserve + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +/** + * Replace tokens in `str` with a temporary, heuristic placeholder. + * + * ```js + * tokens.before('{a\\,b}'); + * //=> '{__ID1__}' + * ``` + * + * @param {String} `str` + * @return {String} String with placeholders. + * @api public + */ + +exports.before = function before(str, re) { + return str.replace(re, function (match) { + var id = randomize(); + cache[id] = match; + return '__ID' + id + '__'; + }); +}; + +/** + * Replace placeholders in `str` with original tokens. + * + * ```js + * tokens.after('{__ID1__}'); + * //=> '{a\\,b}' + * ``` + * + * @param {String} `str` String with placeholders + * @return {String} `str` String with original tokens. + * @api public + */ + +exports.after = function after(str) { + return str.replace(/__ID(.{5})__/g, function (_, id) { + return cache[id]; + }); +}; + +function randomize() { + return Math.random().toString().slice(2, 7); +} + +var cache = {}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/package.json b/src/filesystem/impls/appshell/node/node_modules/preserve/package.json new file mode 100644 index 00000000000..f20c0591bde --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "preserve@^0.2.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces" + ] + ], + "_from": "preserve@>=0.2.0 <0.3.0", + "_id": "preserve@0.2.0", + "_inCache": true, + "_installable": true, + "_location": "/preserve", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "1.4.23", + "_phantomChildren": {}, + "_requested": { + "name": "preserve", + "raw": "preserve@^0.2.0", + "rawSpec": "^0.2.0", + "scope": null, + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/braces" + ], + "_resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "_shasum": "815ed1f6ebc65926f865b310c0713bcb3315ce4b", + "_shrinkwrap": null, + "_spec": "preserve@^0.2.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/preserve/issues" + }, + "dependencies": {}, + "description": "Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string.", + "devDependencies": { + "benchmarked": "^0.1.3", + "chalk": "^0.5.1", + "js-beautify": "^1.5.4", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "815ed1f6ebc65926f865b310c0713bcb3315ce4b", + "tarball": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "gitHead": "1bf405d35e4aea06a2ee83db2d34dc54abc0a1f9", + "homepage": "https://github.com/jonschlinkert/preserve", + "keywords": [ + "escape", + "format", + "placeholder", + "placeholders", + "prettify", + "regex", + "replace", + "template", + "templates", + "token", + "tokens" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/preserve/blob/master/LICENSE-MIT" + }, + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "preserve", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/preserve.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "0.2.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/test.js b/src/filesystem/impls/appshell/node/node_modules/preserve/test.js new file mode 100644 index 00000000000..9bf174f121c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/preserve/test.js @@ -0,0 +1,48 @@ +/*! + * preserve + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License + */ + +'use strict'; + +var should = require('should'); +var tokens = require('./'); + +var re = /<%=\s*[^>]+%>/g; +var pretty = function(str) { + return require('js-beautify').html(str, { + indent_char: ' ', + indent_size: 2, + }); +}; + +describe('preserve tokens', function () { + var testRe = /__ID.{5}__\n__ID.{5}__\n__ID.{5}__/; + var re = /<%=\s*[^>]+%>/g; + + it('should (e.g. shouldn\'t, but will) mangle tokens in the given string', function () { + var html = pretty('
  • <%= name %>
'); + html.should.equal('
    \n
  • \n <%=n ame %>\n
  • \n
'); + }); + + it('should preserve tokens in the given string', function () { + var html = tokens.after(pretty(tokens.before('
  • <%= name %>
', re))); + html.should.equal('
    \n
  • <%= name %>
  • \n
'); + }); + + describe('.before()', function () { + it('should replace matches with placeholder tokens:', function () { + tokens.before('<%= a %>\n<%= b %>\n<%= c %>', re).should.match(testRe); + }); + }); + + describe('tokens.after()', function () { + it('should replace placeholder tokens with original values:', function () { + var before = tokens.before('<%= a %>\n<%= b %>\n<%= c %>', re); + before.should.match(testRe); + tokens.after(before).should.equal('<%= a %>\n<%= b %>\n<%= c %>'); + }); + }); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml new file mode 100644 index 00000000000..36201b10017 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.11" + - "0.12" + - "1.7.1" + - 1 + - 2 + - 3 + - 4 + - 5 diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js new file mode 100644 index 00000000000..a4f40f845fa --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js @@ -0,0 +1,43 @@ +'use strict'; + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = nextTick; +} else { + module.exports = process.nextTick; +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md new file mode 100644 index 00000000000..c67e3532b54 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md @@ -0,0 +1,19 @@ +# Copyright (c) 2015 Calvin Metcalf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.** diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json new file mode 100644 index 00000000000..8d87a648309 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json @@ -0,0 +1,75 @@ +{ + "_args": [ + [ + "process-nextick-args@~1.0.6", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream" + ] + ], + "_from": "process-nextick-args@>=1.0.6 <1.1.0", + "_id": "process-nextick-args@1.0.7", + "_inCache": true, + "_installable": true, + "_location": "/process-nextick-args", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" + }, + "_npmUser": { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + }, + "_npmVersion": "3.8.6", + "_phantomChildren": {}, + "_requested": { + "name": "process-nextick-args", + "raw": "process-nextick-args@~1.0.6", + "rawSpec": "~1.0.6", + "scope": null, + "spec": ">=1.0.6 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", + "_shrinkwrap": null, + "_spec": "process-nextick-args@~1.0.6", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream", + "author": "", + "bugs": { + "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" + }, + "dependencies": {}, + "description": "process.nextTick but always with args", + "devDependencies": { + "tap": "~0.2.6" + }, + "directories": {}, + "dist": { + "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", + "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", + "homepage": "https://github.com/calvinmetcalf/process-nextick-args", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + } + ], + "name": "process-nextick-args", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.7" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md new file mode 100644 index 00000000000..78e7cfaeb7a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md @@ -0,0 +1,18 @@ +process-nextick-args +===== + +[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) + +```bash +npm install --save process-nextick-args +``` + +Always be able to pass arguments to process.nextTick, no matter the platform + +```js +var nextTick = require('process-nextick-args'); + +nextTick(function (a, b, c) { + console.log(a, b, c); +}, 'step', 3, 'profit'); +``` diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js new file mode 100644 index 00000000000..ef15721584a --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js @@ -0,0 +1,24 @@ +var test = require("tap").test; +var nextTick = require('./'); + +test('should work', function (t) { + t.plan(5); + nextTick(function (a) { + t.ok(a); + nextTick(function (thing) { + t.equals(thing, 7); + }, 7); + }, true); + nextTick(function (a, b, c) { + t.equals(a, 'step'); + t.equals(b, 3); + t.equals(c, 'profit'); + }, 'step', 3, 'profit'); +}); + +test('correct number of arguments', function (t) { + t.plan(1); + nextTick(function () { + t.equals(2, arguments.length, 'correct number'); + }, 1, 2); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE b/src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE new file mode 100755 index 00000000000..6d53705b125 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/README.md b/src/filesystem/impls/appshell/node/node_modules/randomatic/README.md new file mode 100644 index 00000000000..28b1ae03131 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/randomatic/README.md @@ -0,0 +1,132 @@ +# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg)](https://www.npmjs.com/package/randomatic) + +> Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i randomatic --save +``` + +Install with [bower](http://bower.io/) + +```sh +$ bower install randomatic --save +``` + +## Usage + +```js +var randomize = require('randomatic'); +``` + +## API + +```js +randomize(pattern, length, options); +``` + +* `pattern` **{String}**: The pattern to use for randomizing +* `length` **{Object}**: The length of the string to generate + +### pattern + +> The pattern to use for randomizing + +Patterns can contain any combination of the below characters, specified in any order. + +**Example:** + +To generate a 10-character randomized string using all available characters: + +```js +randomize('*', 10); +//=> + +randomize('Aa0!', 10); +//=> +``` + +* `a`: Lowercase alpha characters (`abcdefghijklmnopqrstuvwxyz'`) +* `A`: Uppercase alpha characters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ'`) +* `0`: Numeric characters (`0123456789'`) +* `!`: Special characters (`~!@#$%^&()_+-={}[];\',.`) +* `*`: All characters (all of the above combined) +* `?`: Custom characters (pass a string of custom characters to the options) + +### length + +> the length of the string to generate + +**Examples:** + +* `randomize('A', 5)` will generate a 5-character, uppercase, alphabetical, randomized string, e.g. `KDJWJ`. +* `randomize('0', 2)` will generate a 2-digit random number +* `randomize('0', 3)` will generate a 3-digit random number +* `randomize('0', 12)` will generate a 12-digit random number +* `randomize('A0', 16)` will generate a 16-character, alpha-numeric randomized string + +If `length` is left undefined, the length of the pattern in the first parameter will be used. For example: + ++ `randomize('00')` will generate a 2-digit random number +* `randomize('000')` will generate a 3-digit random number +* `randomize('0000')` will generate a 4-digit random number... +* `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string... + +These are just examples, [see the tests](./test.js) for more use cases and examples. + +## options + +#### chars + +Type: `String` + +Default: `undefined` + +Define a custom string to be randomized. + +**Example:** + +* `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`. +* `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`. + +## Usage Examples + +* `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc. +* `randomize('AAAA')` is equivelant to `randomize('A', 4)` +* `randomize('AAA0')` and `randomize('AA00')` and `randomize('A0A0')` are equivelant to `randomize('A0', 4)` +* `randomize('aa')`: results in double-digit, randomized, lower-case letters (`abcdefghijklmnopqrstuvwxyz`) +* `randomize('AAA')`: results in triple-digit, randomized, upper-case letters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ`) +* `randomize('0', 6)`: results in six-digit, randomized nubmers (`0123456789`) +* `randomize('!', 5)`: results in single-digit randomized, _valid_ non-letter characters (`~!@#$%^&()_+-={}[];\',.`) +* `randomize('A!a0', 9)`: results in nine-digit, randomized characters (any of the above) + +_The order in which the characters are defined is insignificant._ + +## Related + +* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left) +* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right) +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/randomatic/issues/new). + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the MIT license. + +*** + +_This file was generated by [verb](https://github.com/verbose/verb) on December 10, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/index.js b/src/filesystem/impls/appshell/node/node_modules/randomatic/index.js new file mode 100644 index 00000000000..85dbe21ca98 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/randomatic/index.js @@ -0,0 +1,83 @@ +/*! + * randomatic + * + * This was originally inspired by + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License (MIT) + */ + +'use strict'; + +var isNumber = require('is-number'); +var typeOf = require('kind-of'); + +/** + * Expose `randomatic` + */ + +module.exports = randomatic; + +/** + * Available mask characters + */ + +var type = { + lower: 'abcdefghijklmnopqrstuvwxyz', + upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + number: '0123456789', + special: '~!@#$%^&()_+-={}[];\',.' +}; + +type.all = type.lower + type.upper + type.number; + +/** + * Generate random character sequences of a specified `length`, + * based on the given `pattern`. + * + * @param {String} `pattern` The pattern to use for generating the random string. + * @param {String} `length` The length of the string to generate. + * @param {String} `options` + * @return {String} + * @api public + */ + +function randomatic(pattern, length, options) { + if (typeof pattern === 'undefined') { + throw new Error('randomatic expects a string or number.'); + } + + var custom = false; + if (arguments.length === 1) { + if (typeof pattern === 'string') { + length = pattern.length; + + } else if (isNumber(pattern)) { + options = {}; length = pattern; pattern = '*'; + } + } + + if (typeOf(length) === 'object' && length.hasOwnProperty('chars')) { + options = length; + pattern = options.chars; + length = pattern.length; + custom = true; + } + + var opts = options || {}; + var mask = ''; + var res = ''; + + // Characters to be used + if (pattern.indexOf('?') !== -1) mask += opts.chars; + if (pattern.indexOf('a') !== -1) mask += type.lower; + if (pattern.indexOf('A') !== -1) mask += type.upper; + if (pattern.indexOf('0') !== -1) mask += type.number; + if (pattern.indexOf('!') !== -1) mask += type.special; + if (pattern.indexOf('*') !== -1) mask += type.all; + if (custom) mask += pattern; + + while (length--) { + res += mask.charAt(parseInt(Math.random() * mask.length, 10)); + } + return res; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/package.json b/src/filesystem/impls/appshell/node/node_modules/randomatic/package.json new file mode 100644 index 00000000000..5794197712b --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/randomatic/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + "randomatic@^1.1.3", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" + ] + ], + "_from": "randomatic@>=1.1.3 <2.0.0", + "_id": "randomatic@1.1.5", + "_inCache": true, + "_installable": true, + "_location": "/randomatic", + "_nodeVersion": "5.0.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.3.6", + "_phantomChildren": {}, + "_requested": { + "name": "randomatic", + "raw": "randomatic@^1.1.3", + "rawSpec": "^1.1.3", + "scope": null, + "spec": ">=1.1.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz", + "_shasum": "5e9ef5f2d573c67bd2b8124ae90b5156e457840b", + "_shrinkwrap": null, + "_spec": "randomatic@^1.1.3", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/randomatic/issues" + }, + "dependencies": { + "is-number": "^2.0.2", + "kind-of": "^3.0.2" + }, + "description": "Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.1.4", + "glob": "^5.0.15", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "5e9ef5f2d573c67bd2b8124ae90b5156e457840b", + "tarball": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "8d74759d683a580412484e95ec5f1b87d93fd50c", + "homepage": "https://github.com/jonschlinkert/randomatic", + "keywords": [ + "alpha", + "alpha-numeric", + "alphanumeric", + "characters", + "chars", + "numeric", + "rand", + "random", + "randomize", + "randomized" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "randomatic", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/randomatic.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "repeat-string", + "pad-left", + "pad-right" + ] + } + }, + "version": "1.1.5" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore b/src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000000..265ff739e07 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore @@ -0,0 +1,8 @@ +build/ +test/ +examples/ +fs.js +zlib.js +.zuul.yml +.nyc_output +coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml new file mode 100644 index 00000000000..ae0156a9bbb --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml @@ -0,0 +1,54 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - npm install -g npm +notifications: + email: false +matrix: + fast_finish: true + allow_failures: + - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" + - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" + include: + - node_js: '0.8' + env: TASK=test + - node_js: '0.10' + env: TASK=test + - node_js: '0.11' + env: TASK=test + - node_js: '0.12' + env: TASK=test + - node_js: 1 + env: TASK=test + - node_js: 2 + env: TASK=test + - node_js: 3 + env: TASK=test + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 5 + env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest +script: "npm run $TASK" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE b/src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000000..e3d4e695a4c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md b/src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md new file mode 100644 index 00000000000..2233732a9ba --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md @@ -0,0 +1,36 @@ +# readable-stream + +***Node-core v6.1.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core, including [documentation](doc/stream.md). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams WG Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md b/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md new file mode 100644 index 00000000000..c907ca0e7b7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md @@ -0,0 +1,1772 @@ +# Stream + + Stability: 2 - Stable + +A stream is an abstract interface implemented by various objects in +Node.js. For example a [request to an HTTP server][http-incoming-message] is a +stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All +streams are instances of [`EventEmitter`][]. + +You can load the Stream base classes by doing `require('stream')`. +There are base classes provided for [Readable][] streams, [Writable][] +streams, [Duplex][] streams, and [Transform][] streams. + +This document is split up into 3 sections: + +1. The first section explains the parts of the API that you need to be + aware of to use streams in your programs. +2. The second section explains the parts of the API that you need to + use if you implement your own custom streams yourself. The API is designed to + make this easy for you to do. +3. The third section goes into more depth about how streams work, + including some of the internal mechanisms and functions that you + should probably not modify unless you definitely know what you are + doing. + + +## API for Stream Consumers + + + +Streams can be either [Readable][], [Writable][], or both ([Duplex][]). + +All streams are EventEmitters, but they also have other custom methods +and properties depending on whether they are Readable, Writable, or +Duplex. + +If a stream is both Readable and Writable, then it implements all of +the methods and events. So, a [Duplex][] or [Transform][] stream is +fully described by this API, though their implementation may be +somewhat different. + +It is not necessary to implement Stream interfaces in order to consume +streams in your programs. If you **are** implementing streaming +interfaces in your own program, please also refer to +[API for Stream Implementors][]. + +Almost all Node.js programs, no matter how simple, use Streams in some +way. Here is an example of using Streams in an Node.js program: + +```js +const http = require('http'); + +var server = http.createServer( (req, res) => { + // req is an http.IncomingMessage, which is a Readable Stream + // res is an http.ServerResponse, which is a Writable Stream + + var body = ''; + // we want to get the data as utf8 strings + // If you don't set an encoding, then you'll get Buffer objects + req.setEncoding('utf8'); + + // Readable streams emit 'data' events once a listener is added + req.on('data', (chunk) => { + body += chunk; + }); + + // the end event tells you that you have entire body + req.on('end', () => { + try { + var data = JSON.parse(body); + } catch (er) { + // uh oh! bad json! + res.statusCode = 400; + return res.end(`error: ${er.message}`); + } + + // write back something interesting to the user: + res.write(typeof data); + res.end(); + }); +}); + +server.listen(1337); + +// $ curl localhost:1337 -d '{}' +// object +// $ curl localhost:1337 -d '"foo"' +// string +// $ curl localhost:1337 -d 'not json' +// error: Unexpected token o +``` + +### Class: stream.Duplex + +Duplex streams are streams that implement both the [Readable][] and +[Writable][] interfaces. + +Examples of Duplex streams include: + +* [TCP sockets][] +* [zlib streams][zlib] +* [crypto streams][crypto] + +### Class: stream.Readable + + + +The Readable stream interface is the abstraction for a *source* of +data that you are reading from. In other words, data comes *out* of a +Readable stream. + +A Readable stream will not start emitting data until you indicate that +you are ready to receive it. + +Readable streams have two "modes": a **flowing mode** and a **paused +mode**. When in flowing mode, data is read from the underlying system +and provided to your program as fast as possible. In paused mode, you +must explicitly call [`stream.read()`][stream-read] to get chunks of data out. +Streams start out in paused mode. + +**Note**: If no data event handlers are attached, and there are no +[`stream.pipe()`][] destinations, and the stream is switched into flowing +mode, then data will be lost. + +You can switch to flowing mode by doing any of the following: + +* Adding a [`'data'`][] event handler to listen for data. +* Calling the [`stream.resume()`][stream-resume] method to explicitly open the + flow. +* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. + +You can switch back to paused mode by doing either of the following: + +* If there are no pipe destinations, by calling the + [`stream.pause()`][stream-pause] method. +* If there are pipe destinations, by removing any [`'data'`][] event + handlers, and removing all pipe destinations by calling the + [`stream.unpipe()`][] method. + +Note that, for backwards compatibility reasons, removing [`'data'`][] +event handlers will **not** automatically pause the stream. Also, if +there are piped destinations, then calling [`stream.pause()`][stream-pause] will +not guarantee that the stream will *remain* paused once those +destinations drain and ask for more data. + +Examples of readable streams include: + +* [HTTP responses, on the client][http-incoming-message] +* [HTTP requests, on the server][http-incoming-message] +* [fs read streams][] +* [zlib streams][zlib] +* [crypto streams][crypto] +* [TCP sockets][] +* [child process stdout and stderr][] +* [`process.stdin`][] + +#### Event: 'close' + +Emitted when the stream and any of its underlying resources (a file +descriptor, for example) have been closed. The event indicates that +no more events will be emitted, and no further computation will occur. + +Not all streams will emit the `'close'` event as the `'close'` event is +optional. + +#### Event: 'data' + +* `chunk` {Buffer|String} The chunk of data. + +Attaching a `'data'` event listener to a stream that has not been +explicitly paused will switch the stream into flowing mode. Data will +then be passed as soon as it is available. + +If you just want to get all the data out of the stream as fast as +possible, this is the best way to do so. + +```js +var readable = getReadableStreamSomehow(); +readable.on('data', (chunk) => { + console.log('got %d bytes of data', chunk.length); +}); +``` + +#### Event: 'end' + +This event fires when there will be no more data to read. + +Note that the `'end'` event **will not fire** unless the data is +completely consumed. This can be done by switching into flowing mode, +or by calling [`stream.read()`][stream-read] repeatedly until you get to the +end. + +```js +var readable = getReadableStreamSomehow(); +readable.on('data', (chunk) => { + console.log('got %d bytes of data', chunk.length); +}); +readable.on('end', () => { + console.log('there will be no more data.'); +}); +``` + +#### Event: 'error' + +* {Error} + +Emitted if there was an error receiving data. + +#### Event: 'readable' + +When a chunk of data can be read from the stream, it will emit a +`'readable'` event. + +In some cases, listening for a `'readable'` event will cause some data +to be read into the internal buffer from the underlying system, if it +hadn't already. + +```javascript +var readable = getReadableStreamSomehow(); +readable.on('readable', () => { + // there is some data to read now +}); +``` + +Once the internal buffer is drained, a `'readable'` event will fire +again when more data is available. + +The `'readable'` event is not emitted in the "flowing" mode with the +sole exception of the last one, on end-of-stream. + +The `'readable'` event indicates that the stream has new information: +either new data is available or the end of the stream has been reached. +In the former case, [`stream.read()`][stream-read] will return that data. In the +latter case, [`stream.read()`][stream-read] will return null. For instance, in +the following example, `foo.txt` is an empty file: + +```js +const fs = require('fs'); +var rr = fs.createReadStream('foo.txt'); +rr.on('readable', () => { + console.log('readable:', rr.read()); +}); +rr.on('end', () => { + console.log('end'); +}); +``` + +The output of running this script is: + +``` +$ node test.js +readable: null +end +``` + +#### readable.isPaused() + +* Return: {Boolean} + +This method returns whether or not the `readable` has been **explicitly** +paused by client code (using [`stream.pause()`][stream-pause] without a +corresponding [`stream.resume()`][stream-resume]). + +```js +var readable = new stream.Readable + +readable.isPaused() // === false +readable.pause() +readable.isPaused() // === true +readable.resume() +readable.isPaused() // === false +``` + +#### readable.pause() + +* Return: `this` + +This method will cause a stream in flowing mode to stop emitting +[`'data'`][] events, switching out of flowing mode. Any data that becomes +available will remain in the internal buffer. + +```js +var readable = getReadableStreamSomehow(); +readable.on('data', (chunk) => { + console.log('got %d bytes of data', chunk.length); + readable.pause(); + console.log('there will be no more data for 1 second'); + setTimeout(() => { + console.log('now data will start flowing again'); + readable.resume(); + }, 1000); +}); +``` + +#### readable.pipe(destination[, options]) + +* `destination` {stream.Writable} The destination for writing data +* `options` {Object} Pipe options + * `end` {Boolean} End the writer when the reader ends. Default = `true` + +This method pulls all the data out of a readable stream, and writes it +to the supplied destination, automatically managing the flow so that +the destination is not overwhelmed by a fast readable stream. + +Multiple destinations can be piped to safely. + +```js +var readable = getReadableStreamSomehow(); +var writable = fs.createWriteStream('file.txt'); +// All the data from readable goes into 'file.txt' +readable.pipe(writable); +``` + +This function returns the destination stream, so you can set up pipe +chains like so: + +```js +var r = fs.createReadStream('file.txt'); +var z = zlib.createGzip(); +var w = fs.createWriteStream('file.txt.gz'); +r.pipe(z).pipe(w); +``` + +For example, emulating the Unix `cat` command: + +```js +process.stdin.pipe(process.stdout); +``` + +By default [`stream.end()`][stream-end] is called on the destination when the +source stream emits [`'end'`][], so that `destination` is no longer writable. +Pass `{ end: false }` as `options` to keep the destination stream open. + +This keeps `writer` open so that "Goodbye" can be written at the +end. + +```js +reader.pipe(writer, { end: false }); +reader.on('end', () => { + writer.end('Goodbye\n'); +}); +``` + +Note that [`process.stderr`][] and [`process.stdout`][] are never closed until +the process exits, regardless of the specified options. + +#### readable.read([size]) + +* `size` {Number} Optional argument to specify how much data to read. +* Return {String|Buffer|Null} + +The `read()` method pulls some data out of the internal buffer and +returns it. If there is no data available, then it will return +`null`. + +If you pass in a `size` argument, then it will return that many +bytes. If `size` bytes are not available, then it will return `null`, +unless we've ended, in which case it will return the data remaining +in the buffer. + +If you do not specify a `size` argument, then it will return all the +data in the internal buffer. + +This method should only be called in paused mode. In flowing mode, +this method is called automatically until the internal buffer is +drained. + +```js +var readable = getReadableStreamSomehow(); +readable.on('readable', () => { + var chunk; + while (null !== (chunk = readable.read())) { + console.log('got %d bytes of data', chunk.length); + } +}); +``` + +If this method returns a data chunk, then it will also trigger the +emission of a [`'data'`][] event. + +Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] +event has been triggered will return `null`. No runtime error will be raised. + +#### readable.resume() + +* Return: `this` + +This method will cause the readable stream to resume emitting [`'data'`][] +events. + +This method will switch the stream into flowing mode. If you do *not* +want to consume the data from a stream, but you *do* want to get to +its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open +the flow of data. + +```js +var readable = getReadableStreamSomehow(); +readable.resume(); +readable.on('end', () => { + console.log('got to the end, but did not read anything'); +}); +``` + +#### readable.setEncoding(encoding) + +* `encoding` {String} The encoding to use. +* Return: `this` + +Call this function to cause the stream to return strings of the specified +encoding instead of Buffer objects. For example, if you do +`readable.setEncoding('utf8')`, then the output data will be interpreted as +UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, +then the data will be encoded in hexadecimal string format. + +This properly handles multi-byte characters that would otherwise be +potentially mangled if you simply pulled the Buffers directly and +called [`buf.toString(encoding)`][] on them. If you want to read the data +as strings, always use this method. + +Also you can disable any encoding at all with `readable.setEncoding(null)`. +This approach is very useful if you deal with binary data or with large +multi-byte strings spread out over multiple chunks. + +```js +var readable = getReadableStreamSomehow(); +readable.setEncoding('utf8'); +readable.on('data', (chunk) => { + assert.equal(typeof chunk, 'string'); + console.log('got %d characters of string data', chunk.length); +}); +``` + +#### readable.unpipe([destination]) + +* `destination` {stream.Writable} Optional specific stream to unpipe + +This method will remove the hooks set up for a previous [`stream.pipe()`][] +call. + +If the destination is not specified, then all pipes are removed. + +If the destination is specified, but no pipe is set up for it, then +this is a no-op. + +```js +var readable = getReadableStreamSomehow(); +var writable = fs.createWriteStream('file.txt'); +// All the data from readable goes into 'file.txt', +// but only for the first second +readable.pipe(writable); +setTimeout(() => { + console.log('stop writing to file.txt'); + readable.unpipe(writable); + console.log('manually close the file stream'); + writable.end(); +}, 1000); +``` + +#### readable.unshift(chunk) + +* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue + +This is useful in certain cases where a stream is being consumed by a +parser, which needs to "un-consume" some data that it has +optimistically pulled out of the source, so that the stream can be +passed on to some other party. + +Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event +has been triggered; a runtime error will be raised. + +If you find that you must often call `stream.unshift(chunk)` in your +programs, consider implementing a [Transform][] stream instead. (See [API +for Stream Implementors][].) + +```js +// Pull off a header delimited by \n\n +// use unshift() if we get too much +// Call the callback with (error, header, stream) +const StringDecoder = require('string_decoder').StringDecoder; +function parseHeader(stream, callback) { + stream.on('error', callback); + stream.on('readable', onReadable); + var decoder = new StringDecoder('utf8'); + var header = ''; + function onReadable() { + var chunk; + while (null !== (chunk = stream.read())) { + var str = decoder.write(chunk); + if (str.match(/\n\n/)) { + // found the header boundary + var split = str.split(/\n\n/); + header += split.shift(); + var remaining = split.join('\n\n'); + var buf = Buffer.from(remaining, 'utf8'); + if (buf.length) + stream.unshift(buf); + stream.removeListener('error', callback); + stream.removeListener('readable', onReadable); + // now the body of the message can be read from the stream. + callback(null, header, stream); + } else { + // still reading the header. + header += str; + } + } + } +} +``` + +Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` +will not end the reading process by resetting the internal reading state of the +stream. This can cause unexpected results if `unshift()` is called during a +read (i.e. from within a [`stream._read()`][stream-_read] implementation on a +custom stream). Following the call to `unshift()` with an immediate +[`stream.push('')`][stream-push] will reset the reading state appropriately, +however it is best to simply avoid calling `unshift()` while in the process of +performing a read. + +#### readable.wrap(stream) + +* `stream` {Stream} An "old style" readable stream + +Versions of Node.js prior to v0.10 had streams that did not implement the +entire Streams API as it is today. (See [Compatibility][] for +more information.) + +If you are using an older Node.js library that emits [`'data'`][] events and +has a [`stream.pause()`][stream-pause] method that is advisory only, then you +can use the `wrap()` method to create a [Readable][] stream that uses the old +stream as its data source. + +You will very rarely ever need to call this function, but it exists +as a convenience for interacting with old Node.js programs and libraries. + +For example: + +```js +const OldReader = require('./old-api-module.js').OldReader; +const Readable = require('stream').Readable; +const oreader = new OldReader; +const myReader = new Readable().wrap(oreader); + +myReader.on('readable', () => { + myReader.read(); // etc. +}); +``` + +### Class: stream.Transform + +Transform streams are [Duplex][] streams where the output is in some way +computed from the input. They implement both the [Readable][] and +[Writable][] interfaces. + +Examples of Transform streams include: + +* [zlib streams][zlib] +* [crypto streams][crypto] + +### Class: stream.Writable + + + +The Writable stream interface is an abstraction for a *destination* +that you are writing data *to*. + +Examples of writable streams include: + +* [HTTP requests, on the client][] +* [HTTP responses, on the server][] +* [fs write streams][] +* [zlib streams][zlib] +* [crypto streams][crypto] +* [TCP sockets][] +* [child process stdin][] +* [`process.stdout`][], [`process.stderr`][] + +#### Event: 'close' + +Emitted when the stream and any of its underlying resources (a file descriptor, +for example) have been closed. The event indicates that no more events will be +emitted, and no further computation will occur. + +Not all streams will emit the `'close'` event as the `'close'` event is +optional. + +#### Event: 'drain' + +If a [`stream.write(chunk)`][stream-write] call returns `false`, then the +`'drain'` event will indicate when it is appropriate to begin writing more data +to the stream. + +```js +// Write the data to the supplied writable stream one million times. +// Be attentive to back-pressure. +function writeOneMillionTimes(writer, data, encoding, callback) { + var i = 1000000; + write(); + function write() { + var ok = true; + do { + i -= 1; + if (i === 0) { + // last time! + writer.write(data, encoding, callback); + } else { + // see if we should continue, or wait + // don't pass the callback, because we're not done yet. + ok = writer.write(data, encoding); + } + } while (i > 0 && ok); + if (i > 0) { + // had to stop early! + // write some more once it drains + writer.once('drain', write); + } + } +} +``` + +#### Event: 'error' + +* {Error} + +Emitted if there was an error when writing or piping data. + +#### Event: 'finish' + +When the [`stream.end()`][stream-end] method has been called, and all data has +been flushed to the underlying system, this event is emitted. + +```javascript +var writer = getWritableStreamSomehow(); +for (var i = 0; i < 100; i ++) { + writer.write('hello, #${i}!\n'); +} +writer.end('this is the end\n'); +writer.on('finish', () => { + console.error('all writes are now complete.'); +}); +``` + +#### Event: 'pipe' + +* `src` {stream.Readable} source stream that is piping to this writable + +This is emitted whenever the [`stream.pipe()`][] method is called on a readable +stream, adding this writable to its set of destinations. + +```js +var writer = getWritableStreamSomehow(); +var reader = getReadableStreamSomehow(); +writer.on('pipe', (src) => { + console.error('something is piping into the writer'); + assert.equal(src, reader); +}); +reader.pipe(writer); +``` + +#### Event: 'unpipe' + +* `src` {[Readable][] Stream} The source stream that + [unpiped][`stream.unpipe()`] this writable + +This is emitted whenever the [`stream.unpipe()`][] method is called on a +readable stream, removing this writable from its set of destinations. + +```js +var writer = getWritableStreamSomehow(); +var reader = getReadableStreamSomehow(); +writer.on('unpipe', (src) => { + console.error('something has stopped piping into the writer'); + assert.equal(src, reader); +}); +reader.pipe(writer); +reader.unpipe(writer); +``` + +#### writable.cork() + +Forces buffering of all writes. + +Buffered data will be flushed either at [`stream.uncork()`][] or at +[`stream.end()`][stream-end] call. + +#### writable.end([chunk][, encoding][, callback]) + +* `chunk` {String|Buffer} Optional data to write +* `encoding` {String} The encoding, if `chunk` is a String +* `callback` {Function} Optional callback for when the stream is finished + +Call this method when no more data will be written to the stream. If supplied, +the callback is attached as a listener on the [`'finish'`][] event. + +Calling [`stream.write()`][stream-write] after calling +[`stream.end()`][stream-end] will raise an error. + +```js +// write 'hello, ' and then end with 'world!' +var file = fs.createWriteStream('example.txt'); +file.write('hello, '); +file.end('world!'); +// writing more now is not allowed! +``` + +#### writable.setDefaultEncoding(encoding) + +* `encoding` {String} The new default encoding +* Return: `this` + +Sets the default encoding for a writable stream. + +#### writable.uncork() + +Flush all data, buffered since [`stream.cork()`][] call. + +#### writable.write(chunk[, encoding][, callback]) + +* `chunk` {String|Buffer} The data to write +* `encoding` {String} The encoding, if `chunk` is a String +* `callback` {Function} Callback for when this chunk of data is flushed +* Returns: {Boolean} `true` if the data was handled completely. + +This method writes some data to the underlying system, and calls the +supplied callback once the data has been fully handled. If an error +occurs, the callback may or may not be called with the error as its +first argument. To detect write errors, listen for the `'error'` event. + +The return value indicates if you should continue writing right now. +If the data had to be buffered internally, then it will return +`false`. Otherwise, it will return `true`. + +This return value is strictly advisory. You MAY continue to write, +even if it returns `false`. However, writes will be buffered in +memory, so it is best not to do this excessively. Instead, wait for +the [`'drain'`][] event before writing more data. + + +## API for Stream Implementors + + + +To implement any sort of stream, the pattern is the same: + +1. Extend the appropriate parent class in your own subclass. (The + [`util.inherits()`][] method is particularly helpful for this.) +2. Call the appropriate parent class constructor in your constructor, + to be sure that the internal mechanisms are set up properly. +3. Implement one or more specific methods, as detailed below. + +The class to extend and the method(s) to implement depend on the sort +of stream class you are writing: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Use-case

+
+

Class

+
+

Method(s) to implement

+
+

Reading only

+
+

[Readable](#stream_class_stream_readable_1)

+
+

[_read][stream-_read]

+
+

Writing only

+
+

[Writable](#stream_class_stream_writable_1)

+
+

[_write][stream-_write], [_writev][stream-_writev]

+
+

Reading and writing

+
+

[Duplex](#stream_class_stream_duplex_1)

+
+

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

+
+

Operate on written data, then read the result

+
+

[Transform](#stream_class_stream_transform_1)

+
+

[_transform][stream-_transform], [_flush][stream-_flush]

+
+ +In your implementation code, it is very important to never call the methods +described in [API for Stream Consumers][]. Otherwise, you can potentially cause +adverse side effects in programs that consume your streaming interfaces. + +### Class: stream.Duplex + + + +A "duplex" stream is one that is both Readable and Writable, such as a TCP +socket connection. + +Note that `stream.Duplex` is an abstract class designed to be extended +with an underlying implementation of the [`stream._read(size)`][stream-_read] +and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you +would with a Readable or Writable stream class. + +Since JavaScript doesn't have multiple prototypal inheritance, this class +prototypally inherits from Readable, and then parasitically from Writable. It is +thus up to the user to implement both the low-level +[`stream._read(n)`][stream-_read] method as well as the low-level +[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension +duplex classes. + +#### new stream.Duplex(options) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then + the stream will automatically end the readable side when the + writable side ends and vice versa. + * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` + for readable side of the stream. Has no effect if `objectMode` + is `true`. + * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` + for writable side of the stream. Has no effect if `objectMode` + is `true`. + +In classes that extend the Duplex class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### Class: stream.PassThrough + +This is a trivial implementation of a [Transform][] stream that simply +passes the input bytes across to the output. Its purpose is mainly +for examples and testing, but there are occasionally use cases where +it can come in handy as a building block for novel sorts of streams. + +### Class: stream.Readable + + + +`stream.Readable` is an abstract class designed to be extended with an +underlying implementation of the [`stream._read(size)`][stream-_read] method. + +Please see [API for Stream Consumers][] for how to consume +streams in your programs. What follows is an explanation of how to +implement Readable streams in your programs. + +#### new stream.Readable([options]) + +* `options` {Object} + * `highWaterMark` {Number} The maximum number of bytes to store in + the internal buffer before ceasing to read from the underlying + resource. Default = `16384` (16kb), or `16` for `objectMode` streams + * `encoding` {String} If specified, then buffers will be decoded to + strings using the specified encoding. Default = `null` + * `objectMode` {Boolean} Whether this stream should behave + as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns + a single value instead of a Buffer of size n. Default = `false` + * `read` {Function} Implementation for the [`stream._read()`][stream-_read] + method. + +In classes that extend the Readable class, make sure to call the +Readable constructor so that the buffering settings can be properly +initialized. + +#### readable.\_read(size) + +* `size` {Number} Number of bytes to read asynchronously + +Note: **Implement this method, but do NOT call it directly.** + +This method is prefixed with an underscore because it is internal to the +class that defines it and should only be called by the internal Readable +class methods. All Readable stream implementations must provide a \_read +method to fetch data from the underlying resource. + +When `_read()` is called, if data is available from the resource, the `_read()` +implementation should start pushing that data into the read queue by calling +[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from +the resource and pushing data until push returns `false`, at which point it +should stop reading from the resource. Only when `_read()` is called again after +it has stopped should it start reading more data from the resource and pushing +that data onto the queue. + +Note: once the `_read()` method is called, it will not be called again until +the [`stream.push()`][stream-push] method is called. + +The `size` argument is advisory. Implementations where a "read" is a +single call that returns data can use this to know how much data to +fetch. Implementations where that is not relevant, such as TCP or +TLS, may ignore this argument, and simply provide data whenever it +becomes available. There is no need, for example to "wait" until +`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. + +#### readable.push(chunk[, encoding]) + + +* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue +* `encoding` {String} Encoding of String chunks. Must be a valid + Buffer encoding, such as `'utf8'` or `'ascii'` +* return {Boolean} Whether or not more pushes should be performed + +Note: **This method should be called by Readable implementors, NOT +by consumers of Readable streams.** + +If a value other than null is passed, The `push()` method adds a chunk of data +into the queue for subsequent stream processors to consume. If `null` is +passed, it signals the end of the stream (EOF), after which no more data +can be written. + +The data added with `push()` can be pulled out by calling the +[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. + +This API is designed to be as flexible as possible. For example, +you may be wrapping a lower-level source which has some sort of +pause/resume mechanism, and a data callback. In those cases, you +could wrap the low-level source object by doing something like this: + +```js +// source is an object with readStop() and readStart() methods, +// and an `ondata` member that gets called when it has data, and +// an `onend` member that gets called when the data is over. + +util.inherits(SourceWrapper, Readable); + +function SourceWrapper(options) { + Readable.call(this, options); + + this._source = getLowlevelSourceObject(); + + // Every time there's data, we push it into the internal buffer. + this._source.ondata = (chunk) => { + // if push() returns false, then we need to stop reading from source + if (!this.push(chunk)) + this._source.readStop(); + }; + + // When the source ends, we push the EOF-signaling `null` chunk + this._source.onend = () => { + this.push(null); + }; +} + +// _read will be called when the stream wants to pull more data in +// the advisory size argument is ignored in this case. +SourceWrapper.prototype._read = function(size) { + this._source.readStart(); +}; +``` + +#### Example: A Counting Stream + + + +This is a basic example of a Readable stream. It emits the numerals +from 1 to 1,000,000 in ascending order, and then ends. + +```js +const Readable = require('stream').Readable; +const util = require('util'); +util.inherits(Counter, Readable); + +function Counter(opt) { + Readable.call(this, opt); + this._max = 1000000; + this._index = 1; +} + +Counter.prototype._read = function() { + var i = this._index++; + if (i > this._max) + this.push(null); + else { + var str = '' + i; + var buf = Buffer.from(str, 'ascii'); + this.push(buf); + } +}; +``` + +#### Example: SimpleProtocol v1 (Sub-optimal) + +This is similar to the `parseHeader` function described +[here](#stream_readable_unshift_chunk), but implemented as a custom stream. +Also, note that this implementation does not convert the incoming data to a +string. + +However, this would be better implemented as a [Transform][] stream. See +[SimpleProtocol v2][] for a better implementation. + +```js +// A parser for a simple data protocol. +// The "header" is a JSON object, followed by 2 \n characters, and +// then a message body. +// +// NOTE: This can be done more simply as a Transform stream! +// Using Readable directly for this is sub-optimal. See the +// alternative example below under the Transform section. + +const Readable = require('stream').Readable; +const util = require('util'); + +util.inherits(SimpleProtocol, Readable); + +function SimpleProtocol(source, options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(source, options); + + Readable.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + + // source is a readable stream, such as a socket or file + this._source = source; + + source.on('end', () => { + this.push(null); + }); + + // give it a kick whenever the source is readable + // read(0) will not consume any bytes + source.on('readable', () => { + this.read(0); + }); + + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype._read = function(n) { + if (!this._inBody) { + var chunk = this._source.read(); + + // if the source doesn't have data, we don't have data yet. + if (chunk === null) + return this.push(''); + + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + this.push(''); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // now, because we got some extra data, unshift the rest + // back into the read queue so that our consumer will see it. + var b = chunk.slice(split); + this.unshift(b); + // calling unshift by itself does not reset the reading state + // of the stream; since we're inside _read, doing an additional + // push('') will reset the state appropriately. + this.push(''); + + // and let them know that we are done parsing the header. + this.emit('header', this.header); + } + } else { + // from there on, just provide the data to our consumer. + // careful not to push(null), since that would indicate EOF. + var chunk = this._source.read(); + if (chunk) this.push(chunk); + } +}; + +// Usage: +// var parser = new SimpleProtocol(source); +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + +### Class: stream.Transform + +A "transform" stream is a duplex stream where the output is causally +connected in some way to the input, such as a [zlib][] stream or a +[crypto][] stream. + +There is no requirement that the output be the same size as the input, +the same number of chunks, or arrive at the same time. For example, a +Hash stream will only ever have a single chunk of output which is +provided when the input is ended. A zlib stream will produce output +that is either much smaller or much larger than its input. + +Rather than implement the [`stream._read()`][stream-_read] and +[`stream._write()`][stream-_write] methods, Transform classes must implement the +[`stream._transform()`][stream-_transform] method, and may optionally +also implement the [`stream._flush()`][stream-_flush] method. (See below.) + +#### new stream.Transform([options]) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `transform` {Function} Implementation for the + [`stream._transform()`][stream-_transform] method. + * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] + method. + +In classes that extend the Transform class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +#### Events: 'finish' and 'end' + +The [`'finish'`][] and [`'end'`][] events are from the parent Writable +and Readable classes respectively. The `'finish'` event is fired after +[`stream.end()`][stream-end] is called and all chunks have been processed by +[`stream._transform()`][stream-_transform], `'end'` is fired after all data has +been output which is after the callback in [`stream._flush()`][stream-_flush] +has been called. + +#### transform.\_flush(callback) + +* `callback` {Function} Call this function (optionally with an error + argument) when you are done flushing any remaining data. + +Note: **This function MUST NOT be called directly.** It MAY be implemented +by child classes, and if so, will be called by the internal Transform +class methods only. + +In some cases, your transform operation may need to emit a bit more +data at the end of the stream. For example, a `Zlib` compression +stream will store up some internal state so that it can optimally +compress the output. At the end, however, it needs to do the best it +can with what is left, so that the data will be complete. + +In those cases, you can implement a `_flush()` method, which will be +called at the very end, after all the written data is consumed, but +before emitting [`'end'`][] to signal the end of the readable side. Just +like with [`stream._transform()`][stream-_transform], call +`transform.push(chunk)` zero or more times, as appropriate, and call `callback` +when the flush operation is complete. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +#### transform.\_transform(chunk, encoding, callback) + +* `chunk` {Buffer|String} The chunk to be transformed. Will **always** + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. If chunk is a buffer, then this is the special + value - 'buffer', ignore it in this case. +* `callback` {Function} Call this function (optionally with an error + argument and data) when you are done processing the supplied chunk. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Transform +class methods only. + +All Transform stream implementations must provide a `_transform()` +method to accept input and produce output. + +`_transform()` should do whatever has to be done in this specific +Transform class, to handle the bytes being written, and pass them off +to the readable portion of the interface. Do asynchronous I/O, +process things, and so on. + +Call `transform.push(outputChunk)` 0 or more times to generate output +from this input chunk, depending on how much data you want to output +as a result of this chunk. + +Call the callback function only when the current chunk is completely +consumed. Note that there may or may not be output as a result of any +particular input chunk. If you supply a second argument to the callback +it will be passed to the push method. In other words the following are +equivalent: + +```js +transform.prototype._transform = function (data, encoding, callback) { + this.push(data); + callback(); +}; + +transform.prototype._transform = function (data, encoding, callback) { + callback(null, data); +}; +``` + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +#### Example: `SimpleProtocol` parser v2 + +The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple +protocol parser can be implemented simply by using the higher level +[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol +v1` examples. + +In this example, rather than providing the input as an argument, it +would be piped into the parser, which is a more idiomatic Node.js stream +approach. + +```javascript +const util = require('util'); +const Transform = require('stream').Transform; +util.inherits(SimpleProtocol, Transform); + +function SimpleProtocol(options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Transform.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype._transform = function(chunk, encoding, done) { + if (!this._inBody) { + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // and let them know that we are done parsing the header. + this.emit('header', this.header); + + // now, because we got some extra data, emit this first. + this.push(chunk.slice(split)); + } + } else { + // from there on, just provide the data to our consumer as-is. + this.push(chunk); + } + done(); +}; + +// Usage: +// var parser = new SimpleProtocol(); +// source.pipe(parser) +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + +### Class: stream.Writable + + + +`stream.Writable` is an abstract class designed to be extended with an +underlying implementation of the +[`stream._write(chunk, encoding, callback)`][stream-_write] method. + +Please see [API for Stream Consumers][] for how to consume +writable streams in your programs. What follows is an explanation of +how to implement Writable streams in your programs. + +#### new stream.Writable([options]) + +* `options` {Object} + * `highWaterMark` {Number} Buffer level when + [`stream.write()`][stream-write] starts returning `false`. Default = `16384` + (16kb), or `16` for `objectMode` streams. + * `decodeStrings` {Boolean} Whether or not to decode strings into + Buffers before passing them to [`stream._write()`][stream-_write]. + Default = `true` + * `objectMode` {Boolean} Whether or not the + [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can + write arbitrary data instead of only `Buffer` / `String` data. + Default = `false` + * `write` {Function} Implementation for the + [`stream._write()`][stream-_write] method. + * `writev` {Function} Implementation for the + [`stream._writev()`][stream-_writev] method. + +In classes that extend the Writable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +#### writable.\_write(chunk, encoding, callback) + +* `chunk` {Buffer|String} The chunk to be written. Will **always** + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. If chunk is a buffer, then this is the special + value - 'buffer', ignore it in this case. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +All Writable stream implementations must provide a +[`stream._write()`][stream-_write] method to send data to the underlying +resource. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Writable +class methods only. + +Call the callback using the standard `callback(error)` pattern to +signal that the write completed successfully or with an error. + +If the `decodeStrings` flag is set in the constructor options, then +`chunk` may be a string rather than a Buffer, and `encoding` will +indicate the sort of string that it is. This is to support +implementations that have an optimized handling for certain string +data encodings. If you do not explicitly set the `decodeStrings` +option to `false`, then you can safely ignore the `encoding` argument, +and assume that `chunk` will always be a Buffer. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +#### writable.\_writev(chunks, callback) + +* `chunks` {Array} The chunks to be written. Each chunk has following + format: `{ chunk: ..., encoding: ... }`. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunks. + +Note: **This function MUST NOT be called directly.** It may be +implemented by child classes, and called by the internal Writable +class methods only. + +This function is completely optional to implement. In most cases it is +unnecessary. If implemented, it will be called with all the chunks +that are buffered in the write queue. + + +## Simplified Constructor API + + + +In simple cases there is now the added benefit of being able to construct a +stream without inheritance. + +This can be done by passing the appropriate methods as constructor options: + +Examples: + +### Duplex + +```js +var duplex = new stream.Duplex({ + read: function(n) { + // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); + }, + write: function(chunk, encoding, next) { + // sets this._write under the hood + + // An optional error can be passed as the first argument + next() + } +}); + +// or + +var duplex = new stream.Duplex({ + read: function(n) { + // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); + }, + writev: function(chunks, next) { + // sets this._writev under the hood + + // An optional error can be passed as the first argument + next() + } +}); +``` + +### Readable + +```js +var readable = new stream.Readable({ + read: function(n) { + // sets this._read under the hood + + // push data onto the read queue, passing null + // will signal the end of the stream (EOF) + this.push(chunk); + } +}); +``` + +### Transform + +```js +var transform = new stream.Transform({ + transform: function(chunk, encoding, next) { + // sets this._transform under the hood + + // generate output as many times as needed + // this.push(chunk); + + // call when the current chunk is consumed + next(); + }, + flush: function(done) { + // sets this._flush under the hood + + // generate output as many times as needed + // this.push(chunk); + + done(); + } +}); +``` + +### Writable + +```js +var writable = new stream.Writable({ + write: function(chunk, encoding, next) { + // sets this._write under the hood + + // An optional error can be passed as the first argument + next() + } +}); + +// or + +var writable = new stream.Writable({ + writev: function(chunks, next) { + // sets this._writev under the hood + + // An optional error can be passed as the first argument + next() + } +}); +``` + +## Streams: Under the Hood + + + +### Buffering + + + +Both Writable and Readable streams will buffer data on an internal +object which can be retrieved from `_writableState.getBuffer()` or +`_readableState.buffer`, respectively. + +The amount of data that will potentially be buffered depends on the +`highWaterMark` option which is passed into the constructor. + +Buffering in Readable streams happens when the implementation calls +[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not +call [`stream.read()`][stream-read], then the data will sit in the internal +queue until it is consumed. + +Buffering in Writable streams happens when the user calls +[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. + +The purpose of streams, especially with the [`stream.pipe()`][] method, is to +limit the buffering of data to acceptable levels, so that sources and +destinations of varying speed will not overwhelm the available memory. + +### Compatibility with Older Node.js Versions + + + +In versions of Node.js prior to v0.10, the Readable stream interface was +simpler, but also less powerful and less useful. + +* Rather than waiting for you to call the [`stream.read()`][stream-read] method, + [`'data'`][] events would start emitting immediately. If you needed to do + some I/O to decide how to handle data, then you had to store the chunks + in some kind of buffer so that they would not be lost. +* The [`stream.pause()`][stream-pause] method was advisory, rather than + guaranteed. This meant that you still had to be prepared to receive + [`'data'`][] events even when the stream was in a paused state. + +In Node.js v0.10, the [Readable][] class was added. +For backwards compatibility with older Node.js programs, Readable streams +switch into "flowing mode" when a [`'data'`][] event handler is added, or +when the [`stream.resume()`][stream-resume] method is called. The effect is +that, even if you are not using the new [`stream.read()`][stream-read] method +and [`'readable'`][] event, you no longer have to worry about losing +[`'data'`][] chunks. + +Most programs will continue to function normally. However, this +introduces an edge case in the following conditions: + +* No [`'data'`][] event handler is added. +* The [`stream.resume()`][stream-resume] method is never called. +* The stream is not piped to any writable destination. + +For example, consider the following code: + +```js +// WARNING! BROKEN! +net.createServer((socket) => { + + // we add an 'end' method, but never consume the data + socket.on('end', () => { + // It will never get here. + socket.end('I got your message (but didnt read it)\n'); + }); + +}).listen(1337); +``` + +In versions of Node.js prior to v0.10, the incoming message data would be +simply discarded. However, in Node.js v0.10 and beyond, +the socket will remain paused forever. + +The workaround in this situation is to call the +[`stream.resume()`][stream-resume] method to start the flow of data: + +```js +// Workaround +net.createServer((socket) => { + + socket.on('end', () => { + socket.end('I got your message (but didnt read it)\n'); + }); + + // start the flow of data, discarding it. + socket.resume(); + +}).listen(1337); +``` + +In addition to new Readable streams switching into flowing mode, +pre-v0.10 style streams can be wrapped in a Readable class using the +[`stream.wrap()`][] method. + + +### Object Mode + + + +Normally, Streams operate on Strings and Buffers exclusively. + +Streams that are in **object mode** can emit generic JavaScript values +other than Buffers and Strings. + +A Readable stream in object mode will always return a single item from +a call to [`stream.read(size)`][stream-read], regardless of what the size +argument is. + +A Writable stream in object mode will always ignore the `encoding` +argument to [`stream.write(data, encoding)`][stream-write]. + +The special value `null` still retains its special value for object +mode streams. That is, for object mode readable streams, `null` as a +return value from [`stream.read()`][stream-read] indicates that there is no more +data, and [`stream.push(null)`][stream-push] will signal the end of stream data +(`EOF`). + +No streams in Node.js core are object mode streams. This pattern is only +used by userland streaming libraries. + +You should set `objectMode` in your stream child class constructor on +the options object. Setting `objectMode` mid-stream is not safe. + +For Duplex streams `objectMode` can be set exclusively for readable or +writable side with `readableObjectMode` and `writableObjectMode` +respectively. These options can be used to implement parsers and +serializers with Transform streams. + +```js +const util = require('util'); +const StringDecoder = require('string_decoder').StringDecoder; +const Transform = require('stream').Transform; +util.inherits(JSONParseStream, Transform); + +// Gets \n-delimited JSON string data, and emits the parsed objects +function JSONParseStream() { + if (!(this instanceof JSONParseStream)) + return new JSONParseStream(); + + Transform.call(this, { readableObjectMode : true }); + + this._buffer = ''; + this._decoder = new StringDecoder('utf8'); +} + +JSONParseStream.prototype._transform = function(chunk, encoding, cb) { + this._buffer += this._decoder.write(chunk); + // split on newlines + var lines = this._buffer.split(/\r?\n/); + // keep the last partial line buffered + this._buffer = lines.pop(); + for (var l = 0; l < lines.length; l++) { + var line = lines[l]; + try { + var obj = JSON.parse(line); + } catch (er) { + this.emit('error', er); + return; + } + // push the parsed object out to the readable consumer + this.push(obj); + } + cb(); +}; + +JSONParseStream.prototype._flush = function(cb) { + // Just handle any leftover + var rem = this._buffer.trim(); + if (rem) { + try { + var obj = JSON.parse(rem); + } catch (er) { + this.emit('error', er); + return; + } + // push the parsed object out to the readable consumer + this.push(obj); + } + cb(); +}; +``` + +### `stream.read(0)` + +There are some cases where you want to trigger a refresh of the +underlying readable stream mechanisms, without actually consuming any +data. In that case, you can call `stream.read(0)`, which will always +return null. + +If the internal read buffer is below the `highWaterMark`, and the +stream is not currently reading, then calling `stream.read(0)` will trigger +a low-level [`stream._read()`][stream-_read] call. + +There is almost never a need to do this. However, you will see some +cases in Node.js's internals where this is done, particularly in the +Readable stream class internals. + +### `stream.push('')` + +Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an +interesting side effect. Because it *is* a call to +[`stream.push()`][stream-push], it will end the `reading` process. However, it +does *not* add any data to the readable buffer, so there's nothing for +a user to consume. + +Very rarely, there are cases where you have no data to provide now, +but the consumer of your stream (or, perhaps, another bit of your own +code) will know when to check again, by calling [`stream.read(0)`][stream-read]. +In those cases, you *may* call `stream.push('')`. + +So far, the only use case for this functionality is in the +[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you +find that you have to use `stream.push('')`, please consider another +approach, because it almost certainly indicates that something is +horribly wrong. + +[`'data'`]: #stream_event_data +[`'drain'`]: #stream_event_drain +[`'end'`]: #stream_event_end +[`'finish'`]: #stream_event_finish +[`'readable'`]: #stream_event_readable +[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.1.0/api/buffer.html#buffer_buf_tostring_encoding_start_end +[`EventEmitter`]: https://nodejs.org/docs/v6.1.0/api/events.html#events_class_eventemitter +[`process.stderr`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stderr +[`process.stdin`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdin +[`process.stdout`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdout +[`stream.cork()`]: #stream_writable_cork +[`stream.pipe()`]: #stream_readable_pipe_destination_options +[`stream.uncork()`]: #stream_writable_uncork +[`stream.unpipe()`]: #stream_readable_unpipe_destination +[`stream.wrap()`]: #stream_readable_wrap_stream +[`tls.CryptoStream`]: https://nodejs.org/docs/v6.1.0/api/tls.html#tls_class_cryptostream +[`util.inherits()`]: https://nodejs.org/docs/v6.1.0/api/util.html#util_util_inherits_constructor_superconstructor +[API for Stream Consumers]: #stream_api_for_stream_consumers +[API for Stream Implementors]: #stream_api_for_stream_implementors +[child process stdin]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdin +[child process stdout and stderr]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdout +[Compatibility]: #stream_compatibility_with_older_node_js_versions +[crypto]: crypto.html +[Duplex]: #stream_class_stream_duplex +[fs read streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_readstream +[fs write streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_writestream +[HTTP requests, on the client]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_clientrequest +[HTTP responses, on the server]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_serverresponse +[http-incoming-message]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_incomingmessage +[Object mode]: #stream_object_mode +[Readable]: #stream_class_stream_readable +[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 +[stream-_flush]: #stream_transform_flush_callback +[stream-_read]: #stream_readable_read_size_1 +[stream-_transform]: #stream_transform_transform_chunk_encoding_callback +[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 +[stream-_writev]: #stream_writable_writev_chunks_callback +[stream-end]: #stream_writable_end_chunk_encoding_callback +[stream-pause]: #stream_readable_pause +[stream-push]: #stream_readable_push_chunk_encoding +[stream-read]: #stream_readable_read_size +[stream-resume]: #stream_readable_resume +[stream-write]: #stream_writable_write_chunk_encoding_callback +[TCP sockets]: https://nodejs.org/docs/v6.1.0/api/net.html#net_class_net_socket +[Transform]: #stream_class_stream_transform +[Writable]: #stream_class_stream_writable +[zlib]: zlib.html diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 00000000000..83275f192e4 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000000..ca807af8762 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000000..736693b8400 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,75 @@ +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +var keys = objectKeys(Writable.prototype); +for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + processNextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000000..d06f71f1868 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,26 @@ +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000000..79914fa684c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,893 @@ +'use strict'; + +module.exports = Readable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var isArray = require('isarray'); +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream; +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var StringDecoder; + +util.inherits(Readable, Stream); + +var hasPrependListener = typeof EE.prototype.prependListener === 'function'; + +function prependListener(emitter, event, fn) { + if (hasPrependListener) return emitter.prependListener(event, fn); + + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. This is here + // only because this code needs to continue to work with older versions + // of Node.js that do not include the prependListener() method. The goal + // is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +var Duplex; +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +var Duplex; +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options && typeof options.read === 'function') this._read = options.read; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + + if (!state.objectMode && typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = bufferShim.from(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var _e = new Error('stream.unshift() after end event'); + stream.emit('error', _e); + } else { + var skipAdd; + if (state.decoder && !addToFront && !encoding) { + chunk = state.decoder.write(chunk); + skipAdd = !state.objectMode && chunk.length === 0; + } + + if (!addToFront) state.reading = false; + + // Don't add to the buffer if we've decoded to an empty string chunk and + // we're not in object mode + if (!skipAdd) { + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) return 0; + + if (state.objectMode) return n === 0 ? 0 : 1; + + if (n === null || isNaN(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; + } + + if (n <= 0) return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else { + return state.length; + } + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + var state = this._readableState; + var nOrig = n; + + if (typeof n !== 'number' || n > 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } + + if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (doRead && !state.reading) n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended && state.length === 0) endReadable(this); + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + processNextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + if (false === ret) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var _i = 0; _i < len; _i++) { + dests[_i].emit('unpipe', this); + }return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + // If listening to data, and it has not explicitly been paused, + // then call resume to start the flow of data on the next tick. + if (ev === 'data' && false !== this._readableState.flowing) { + this.resume(); + } + + if (ev === 'readable' && !this._readableState.endEmitted) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + processNextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + processNextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + if (state.flowing) { + do { + var chunk = stream.read(); + } while (null !== chunk && state.flowing); + } +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function (ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) return null; + + if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var _buf = list[0]; + var cpy = Math.min(n - c, _buf.length); + + if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy); + + if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + processNextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000000..dbc996ede62 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,180 @@ +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function TransformState(stream) { + this.afterTransform = function (er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; + this.writeencoding = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) stream.push(data); + + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + this.once('prefinish', function () { + if (typeof this._flush === 'function') this._flush(function (er) { + done(stream, er); + });else done(stream); + }); +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('Not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +function done(stream, er) { + if (er) return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) throw new Error('Calling transform done when ws.length != 0'); + + if (ts.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000000..ed5efcbd203 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,526 @@ +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +module.exports = Writable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream; +(function () { + try { + Stream = require('st' + 'ream'); + } catch (_) {} finally { + if (!Stream) Stream = require('events').EventEmitter; + } +})(); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +util.inherits(Writable, Stream); + +function nop() {} + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +var Duplex; +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~ ~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function writableStateGetBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }); + } catch (_) {} +})(); + +var Duplex; +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + processNextTick(cb, er); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + // Always throw error if a null is written + // if we are not in object mode then throw + // if it is not a buffer, string, or undefined. + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + processNextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = bufferShim.from(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + + if (Buffer.isBuffer(chunk)) encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) processNextTick(cb, er);else cb(er); + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + while (entry) { + buffer[count] = entry; + entry = entry.next; + count += 1; + } + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequestCount = 0; + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else { + prefinish(stream, state); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) processNextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + + this.finish = function (err) { + var entry = _this.entry; + _this.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = _this; + } else { + state.corkedRequestsFree = _this; + } + }; +} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json b/src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json new file mode 100644 index 00000000000..4612dcfa1de --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + "readable-stream@^2.0.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" + ] + ], + "_from": "readable-stream@>=2.0.2 <3.0.0", + "_id": "readable-stream@2.1.4", + "_inCache": true, + "_installable": true, + "_location": "/readable-stream", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/readable-stream-2.1.4.tgz_1463679605032_0.6917394688352942" + }, + "_npmUser": { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + }, + "_npmVersion": "3.8.6", + "_phantomChildren": {}, + "_requested": { + "name": "readable-stream", + "raw": "readable-stream@^2.0.2", + "rawSpec": "^2.0.2", + "scope": null, + "spec": ">=2.0.2 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/readdirp" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz", + "_shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", + "_shrinkwrap": null, + "_spec": "readable-stream@^2.0.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", + "browser": { + "util": false + }, + "bugs": { + "url": "https://github.com/nodejs/readable-stream/issues" + }, + "dependencies": { + "buffer-shims": "^1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, + "description": "Streams3, a user-land copy of the stream library from Node.js", + "devDependencies": { + "assert": "~1.4.0", + "nyc": "^6.4.0", + "tap": "~0.7.1", + "tape": "~4.5.1", + "zuul": "~3.9.0", + "zuul-ngrok": "^4.0.0" + }, + "directories": {}, + "dist": { + "shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" + }, + "gitHead": "7752832fba237929388dea6c96911a0a6379abfc", + "homepage": "https://github.com/nodejs/readable-stream#readme", + "keywords": [ + "readable", + "stream", + "pipe" + ], + "license": "MIT", + "main": "readable.js", + "maintainers": [ + { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + }, + { + "email": "rod@vagg.org", + "name": "rvagg" + }, + { + "email": "calvin.metcalf@gmail.com", + "name": "cwmma" + } + ], + "name": "readable-stream", + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream.git" + }, + "scripts": { + "browser": "npm run write-zuul && zuul -- test/browser.js", + "cover": "nyc npm test", + "local": "zuul --local -- test/browser.js", + "report": "nyc report --reporter=lcov", + "test": "tap test/parallel/*.js test/ours/*.js", + "write-zuul": "printf \"ui: tape\ntunnel: ngrok\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + }, + "version": "2.1.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000000..27e8d8a5516 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js new file mode 100644 index 00000000000..be2688a071d --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js @@ -0,0 +1,16 @@ +var Stream = (function (){ + try { + return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify + } catch(_){} +}()); +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = Stream || exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); + +if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js new file mode 100644 index 00000000000..5d482f0780e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js new file mode 100644 index 00000000000..e1e9efdf3c1 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore b/src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore new file mode 100644 index 00000000000..7dccd970766 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore @@ -0,0 +1,15 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +node_modules +npm-debug.log \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml new file mode 100644 index 00000000000..0cdb6c36056 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.10" + - "0.12" + - "4.4" + - "6.2" diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE new file mode 100644 index 00000000000..8a63b80ba66 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE @@ -0,0 +1,20 @@ +This software is released under the MIT license: + +Copyright (c) 2012-2015 Thorsten Lorenz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/README.md b/src/filesystem/impls/appshell/node/node_modules/readdirp/README.md new file mode 100644 index 00000000000..b0c1626ac2f --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/README.md @@ -0,0 +1,233 @@ +# readdirp [![Build Status](https://secure.travis-ci.org/thlorenz/readdirp.png)](http://travis-ci.org/thlorenz/readdirp) + +[![NPM](https://nodei.co/npm/readdirp.png?downloads=true&stars=true)](https://nodei.co/npm/readdirp/) + +Recursive version of [fs.readdir](http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback). Exposes a **stream api**. + +```javascript +var readdirp = require('readdirp') + , path = require('path') + , es = require('event-stream'); + +// print out all JavaScript files along with their size + +var stream = readdirp({ root: path.join(__dirname), fileFilter: '*.js' }); +stream + .on('warn', function (err) { + console.error('non-fatal error', err); + // optionally call stream.destroy() here in order to abort and cause 'close' to be emitted + }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(es.mapSync(function (entry) { + return { path: entry.path, size: entry.stat.size }; + })) + .pipe(es.stringify()) + .pipe(process.stdout); +``` + +Meant to be one of the recursive versions of [fs](http://nodejs.org/docs/latest/api/fs.html) functions, e.g., like [mkdirp](https://github.com/substack/node-mkdirp). + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Installation](#installation) +- [API](#api) + - [entry stream](#entry-stream) + - [options](#options) + - [entry info](#entry-info) + - [Filters](#filters) + - [Callback API](#callback-api) + - [allProcessed ](#allprocessed) + - [fileProcessed](#fileprocessed) +- [More Examples](#more-examples) + - [stream api](#stream-api) + - [stream api pipe](#stream-api-pipe) + - [grep](#grep) + - [using callback api](#using-callback-api) + - [tests](#tests) + + +# Installation + + npm install readdirp + +# API + +***var entryStream = readdirp (options)*** + +Reads given root recursively and returns a `stream` of [entry info](#entry-info)s. + +## entry stream + +Behaves as follows: + +- `emit('data')` passes an [entry info](#entry-info) whenever one is found +- `emit('warn')` passes a non-fatal `Error` that prevents a file/directory from being processed (i.e., if it is + inaccessible to the user) +- `emit('error')` passes a fatal `Error` which also ends the stream (i.e., when illegal options where passed) +- `emit('end')` called when all entries were found and no more will be emitted (i.e., we are done) +- `emit('close')` called when the stream is destroyed via `stream.destroy()` (which could be useful if you want to + manually abort even on a non fatal error) - at that point the stream is no longer `readable` and no more entries, + warning or errors are emitted +- to learn more about streams, consult the very detailed + [nodejs streams documentation](http://nodejs.org/api/stream.html) or the + [stream-handbook](https://github.com/substack/stream-handbook) + + +## options + +- **root**: path in which to start reading and recursing into subdirectories + +- **fileFilter**: filter to include/exclude files found (see [Filters](#filters) for more) + +- **directoryFilter**: filter to include/exclude directories found and to recurse into (see [Filters](#filters) for more) + +- **depth**: depth at which to stop recursing even if more subdirectories are found + +- **entryType**: determines if data events on the stream should be emitted for `'files'`, `'directories'`, `'both'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. Defaults to `'files'`. + +- **lstat**: if `true`, readdirp uses `fs.lstat` instead of `fs.stat` in order to stat files and includes symlink entries in the stream along with files. + +## entry info + +Has the following properties: + +- **parentDir** : directory in which entry was found (relative to given root) +- **fullParentDir** : full path to parent directory +- **name** : name of the file/directory +- **path** : path to the file/directory (relative to given root) +- **fullPath** : full path to the file/directory found +- **stat** : built in [stat object](http://nodejs.org/docs/v0.4.9/api/fs.html#fs.Stats) +- **Example**: (assuming root was `/User/dev/readdirp`) + + parentDir : 'test/bed/root_dir1', + fullParentDir : '/User/dev/readdirp/test/bed/root_dir1', + name : 'root_dir1_subdir1', + path : 'test/bed/root_dir1/root_dir1_subdir1', + fullPath : '/User/dev/readdirp/test/bed/root_dir1/root_dir1_subdir1', + stat : [ ... ] + +## Filters + +There are three different ways to specify filters for files and directories respectively. + +- **function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + +- **glob string**: a string (e.g., `*.js`) which is matched using [minimatch](https://github.com/isaacs/minimatch), so go there for more + information. + + Globstars (`**`) are not supported since specifiying a recursive pattern for an already recursive function doesn't make sense. + + Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + +- **array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + + `[ '*.json', '*.js' ]` includes all JavaScript and Json files. + + + `[ '!.git', '!node_modules' ]` includes all directories except the '.git' and 'node_modules'. + +Directories that do not pass a filter will not be recursed into. + +## Callback API + +Although the stream api is recommended, readdirp also exposes a callback based api. + +***readdirp (options, callback1 [, callback2])*** + +If callback2 is given, callback1 functions as the **fileProcessed** callback, and callback2 as the **allProcessed** callback. + +If only callback1 is given, it functions as the **allProcessed** callback. + +### allProcessed + +- function with err and res parameters, e.g., `function (err, res) { ... }` +- **err**: array of errors that occurred during the operation, **res may still be present, even if errors occurred** +- **res**: collection of file/directory [entry infos](#entry-info) + +### fileProcessed + +- function with [entry info](#entry-info) parameter e.g., `function (entryInfo) { ... }` + + +# More Examples + +`on('error', ..)`, `on('warn', ..)` and `on('end', ..)` handling omitted for brevity + +```javascript +var readdirp = require('readdirp'); + +// Glob file filter +readdirp({ root: './test/bed', fileFilter: '*.js' }) + .on('data', function (entry) { + // do something with each JavaScript file entry + }); + +// Combined glob file filters +readdirp({ root: './test/bed', fileFilter: [ '*.js', '*.json' ] }) + .on('data', function (entry) { + // do something with each JavaScript and Json file entry + }); + +// Combined negated directory filters +readdirp({ root: './test/bed', directoryFilter: [ '!.git', '!*modules' ] }) + .on('data', function (entry) { + // do something with each file entry found outside '.git' or any modules directory + }); + +// Function directory filter +readdirp({ root: './test/bed', directoryFilter: function (di) { return di.name.length === 9; } }) + .on('data', function (entry) { + // do something with each file entry found inside directories whose name has length 9 + }); + +// Limiting depth +readdirp({ root: './test/bed', depth: 1 }) + .on('data', function (entry) { + // do something with each file entry found up to 1 subdirectory deep + }); + +// callback api +readdirp( + { root: '.' } + , function(fileInfo) { + // do something with file entry here + } + , function (err, res) { + // all done, move on or do final step for all file entries here + } +); +``` + +Try more examples by following [instructions](https://github.com/thlorenz/readdirp/blob/master/examples/Readme.md) +on how to get going. + +## stream api + +[stream-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api.js) + +Demonstrates error and data handling by listening to events emitted from the readdirp stream. + +## stream api pipe + +[stream-api-pipe.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api-pipe.js) + +Demonstrates error handling by listening to events emitted from the readdirp stream and how to pipe the data stream into +another destination stream. + +## grep + +[grep.js](https://github.com/thlorenz/readdirp/blob/master/examples/grep.js) + +Very naive implementation of grep, for demonstration purposes only. + +## using callback api + +[callback-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/callback-api.js) + +Shows how to pass callbacks in order to handle errors and/or data. + +## tests + +The [readdirp tests](https://github.com/thlorenz/readdirp/blob/master/test/readdirp.js) also will give you a good idea on +how things work. + diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md new file mode 100644 index 00000000000..55fc4611bc7 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md @@ -0,0 +1,37 @@ +# readdirp examples + +## How to run the examples + +Assuming you installed readdirp (`npm install readdirp`), you can do the following: + +1. `npm explore readdirp` +2. `cd examples` +3. `npm install` + +At that point you can run the examples with node, i.e., `node grep`. + +## stream api + +[stream-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api.js) + +Demonstrates error and data handling by listening to events emitted from the readdirp stream. + +## stream api pipe + +[stream-api-pipe.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api-pipe.js) + +Demonstrates error handling by listening to events emitted from the readdirp stream and how to pipe the data stream into +another destination stream. + +## grep + +[grep.js](https://github.com/thlorenz/readdirp/blob/master/examples/grep.js) + +Very naive implementation of grep, for demonstration purposes only. + +## using callback api + +[callback-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/callback-api.js) + +Shows how to pass callbacks in order to handle errors and/or data. + diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js new file mode 100644 index 00000000000..39bd2d79806 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js @@ -0,0 +1,10 @@ +var readdirp = require('..'); + +readdirp({ root: '.', fileFilter: '*.js' }, function (errors, res) { + if (errors) { + errors.forEach(function (err) { + console.error('Error: ', err); + }); + } + console.log('all javascript files', res); +}); diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js new file mode 100644 index 00000000000..01d5f2954ca --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js @@ -0,0 +1,71 @@ +'use strict'; +var readdirp = require('..') + , util = require('util') + , fs = require('fs') + , path = require('path') + , es = require('event-stream') + ; + +function findLinesMatching (searchTerm) { + + return es.through(function (entry) { + var lineno = 0 + , matchingLines = [] + , fileStream = this; + + function filter () { + return es.mapSync(function (line) { + lineno++; + return ~line.indexOf(searchTerm) ? lineno + ': ' + line : undefined; + }); + } + + function aggregate () { + return es.through( + function write (data) { + matchingLines.push(data); + } + , function end () { + + // drop files that had no matches + if (matchingLines.length) { + var result = { file: entry, lines: matchingLines }; + + // pass result on to file stream + fileStream.emit('data', result); + } + this.emit('end'); + } + ); + } + + fs.createReadStream(entry.fullPath, { encoding: 'utf-8' }) + + // handle file contents line by line + .pipe(es.split('\n')) + + // keep only the lines that matched the term + .pipe(filter()) + + // aggregate all matching lines and delegate control back to the file stream + .pipe(aggregate()) + ; + }); +} + +console.log('grepping for "arguments"'); + +// create a stream of all javascript files found in this and all sub directories +readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) + + // find all lines matching the term for each file (if none found, that file is ignored) + .pipe(findLinesMatching('arguments')) + + // format the results and output + .pipe( + es.mapSync(function (res) { + return '\n\n' + res.file.path + '\n\t' + res.lines.join('\n\t'); + }) + ) + .pipe(process.stdout) + ; diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json new file mode 100644 index 00000000000..2d9b3411973 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json @@ -0,0 +1,9 @@ +{ + "name": "readdirp-examples", + "version": "0.0.0", + "description": "Examples for readdirp.", + "dependencies": { + "tap-stream": "~0.1.0", + "event-stream": "~3.0.7" + } +} diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js new file mode 100644 index 00000000000..4003be8d3a3 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js @@ -0,0 +1,19 @@ +var readdirp = require('..') + , path = require('path') + , through = require('through2') + +// print out all JavaScript files along with their size +readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) + .on('warn', function (err) { console.error('non-fatal error', err); }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(through.obj(function (entry, _, cb) { + this.push({ path: entry.path, size: entry.stat.size }); + cb(); + })) + .pipe(through.obj( + function (res, _, cb) { + this.push(JSON.stringify(res) + '\n'); + cb(); + }) + ) + .pipe(process.stdout); diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js new file mode 100644 index 00000000000..0f7b327eb06 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js @@ -0,0 +1,15 @@ +var readdirp = require('..') + , path = require('path'); + +readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) + .on('warn', function (err) { + console.error('something went wrong when processing an entry', err); + }) + .on('error', function (err) { + console.error('something went fatally wrong and the stream was aborted', err); + }) + .on('data', function (entry) { + console.log('%s is ready for processing', entry.path); + // process entry here + }); + diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/package.json b/src/filesystem/impls/appshell/node/node_modules/readdirp/package.json new file mode 100644 index 00000000000..7c00f77bc77 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "readdirp@^2.0.0", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" + ] + ], + "_from": "readdirp@>=2.0.0 <3.0.0", + "_id": "readdirp@2.1.0", + "_inCache": true, + "_installable": true, + "_location": "/readdirp", + "_nodeVersion": "4.4.6", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/readdirp-2.1.0.tgz_1467053820730_0.8782131769694388" + }, + "_npmUser": { + "email": "thlorenz@gmx.de", + "name": "thlorenz" + }, + "_npmVersion": "2.15.6", + "_phantomChildren": {}, + "_requested": { + "name": "readdirp", + "raw": "readdirp@^2.0.0", + "rawSpec": "^2.0.0", + "scope": null, + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/chokidar" + ], + "_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "_shasum": "4ed0ad060df3073300c48440373f72d1cc642d78", + "_shrinkwrap": null, + "_spec": "readdirp@^2.0.0", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", + "author": { + "email": "thlorenz@gmx.de", + "name": "Thorsten Lorenz", + "url": "thlorenz.com" + }, + "bugs": { + "url": "https://github.com/thlorenz/readdirp/issues" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + }, + "description": "Recursive version of fs.readdir with streaming api.", + "devDependencies": { + "nave": "^0.5.1", + "proxyquire": "^1.7.9", + "tap": "1.3.2", + "through2": "^2.0.0" + }, + "directories": {}, + "dist": { + "shasum": "4ed0ad060df3073300c48440373f72d1cc642d78", + "tarball": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "5a3751f86a1c2bbbb8e3a42685d4191992631e6c", + "homepage": "https://github.com/thlorenz/readdirp", + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "license": "MIT", + "main": "readdirp.js", + "maintainers": [ + { + "email": "thlorenz@gmx.de", + "name": "thlorenz" + } + ], + "name": "readdirp", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/readdirp.git" + }, + "scripts": { + "test": "if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi", + "test-0.10": "nave use 0.10 npm run test-main", + "test-0.12": "nave use 0.12 npm run test-main", + "test-4": "nave use 4.4 npm run test-main", + "test-6": "nave use 6.2 npm run test-main", + "test-all": "npm run test-main && npm run test-0.10 && npm run test-0.12 && npm run test-4 && npm run test-6", + "test-main": "(cd test && set -e; for t in ./*.js; do node $t; done)" + }, + "version": "2.1.0" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js new file mode 100644 index 00000000000..b6b21e41838 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js @@ -0,0 +1,300 @@ +'use strict'; + +var fs = require('graceful-fs') + , path = require('path') + , minimatch = require('minimatch') + , toString = Object.prototype.toString + , si = require('set-immediate-shim') + ; + + +// Standard helpers +function isFunction (obj) { + return toString.call(obj) === '[object Function]'; +} + +function isString (obj) { + return toString.call(obj) === '[object String]'; +} + +function isRegExp (obj) { + return toString.call(obj) === '[object RegExp]'; +} + +function isUndefined (obj) { + return obj === void 0; +} + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param { Object } opts Options to specify root (start directory), filters and recursion depth + * @param { function } callback1 When callback2 is given calls back for each processed file - function (fileInfo) { ... }, + * when callback2 is not given, it behaves like explained in callback2 + * @param { function } callback2 Calls back once all files have been processed with an array of errors and file infos + * function (err, fileInfos) { ... } + */ +function readdir(opts, callback1, callback2) { + var stream + , handleError + , handleFatalError + , pending = 0 + , errors = [] + , readdirResult = { + directories: [] + , files: [] + } + , fileProcessed + , allProcessed + , realRoot + , aborted = false + , paused = false + ; + + // If no callbacks were given we will use a streaming interface + if (isUndefined(callback1)) { + var api = require('./stream-api')(); + stream = api.stream; + callback1 = api.processEntry; + callback2 = api.done; + handleError = api.handleError; + handleFatalError = api.handleFatalError; + + stream.on('close', function () { aborted = true; }); + stream.on('pause', function () { paused = true; }); + stream.on('resume', function () { paused = false; }); + } else { + handleError = function (err) { errors.push(err); }; + handleFatalError = function (err) { + handleError(err); + allProcessed(errors, null); + }; + } + + if (isUndefined(opts)){ + handleFatalError(new Error ( + 'Need to pass at least one argument: opts! \n' + + 'https://github.com/thlorenz/readdirp#options' + ) + ); + return stream; + } + + opts.root = opts.root || '.'; + opts.fileFilter = opts.fileFilter || function() { return true; }; + opts.directoryFilter = opts.directoryFilter || function() { return true; }; + opts.depth = typeof opts.depth === 'undefined' ? 999999999 : opts.depth; + opts.entryType = opts.entryType || 'files'; + + var statfn = opts.lstat === true ? fs.lstat.bind(fs) : fs.stat.bind(fs); + + if (isUndefined(callback2)) { + fileProcessed = function() { }; + allProcessed = callback1; + } else { + fileProcessed = callback1; + allProcessed = callback2; + } + + function normalizeFilter (filter) { + + if (isUndefined(filter)) return undefined; + + function isNegated (filters) { + + function negated(f) { + return f.indexOf('!') === 0; + } + + var some = filters.some(negated); + if (!some) { + return false; + } else { + if (filters.every(negated)) { + return true; + } else { + // if we detect illegal filters, bail out immediately + throw new Error( + 'Cannot mix negated with non negated glob filters: ' + filters + '\n' + + 'https://github.com/thlorenz/readdirp#filters' + ); + } + } + } + + // Turn all filters into a function + if (isFunction(filter)) { + + return filter; + + } else if (isString(filter)) { + + return function (entryInfo) { + return minimatch(entryInfo.name, filter.trim()); + }; + + } else if (filter && Array.isArray(filter)) { + + if (filter) filter = filter.map(function (f) { + return f.trim(); + }); + + return isNegated(filter) ? + // use AND to concat multiple negated filters + function (entryInfo) { + return filter.every(function (f) { + return minimatch(entryInfo.name, f); + }); + } + : + // use OR to concat multiple inclusive filters + function (entryInfo) { + return filter.some(function (f) { + return minimatch(entryInfo.name, f); + }); + }; + } + } + + function processDir(currentDir, entries, callProcessed) { + if (aborted) return; + var total = entries.length + , processed = 0 + , entryInfos = [] + ; + + fs.realpath(currentDir, function(err, realCurrentDir) { + if (aborted) return; + if (err) { + handleError(err); + callProcessed(entryInfos); + return; + } + + var relDir = path.relative(realRoot, realCurrentDir); + + if (entries.length === 0) { + callProcessed([]); + } else { + entries.forEach(function (entry) { + + var fullPath = path.join(realCurrentDir, entry) + , relPath = path.join(relDir, entry); + + statfn(fullPath, function (err, stat) { + if (err) { + handleError(err); + } else { + entryInfos.push({ + name : entry + , path : relPath // relative to root + , fullPath : fullPath + + , parentDir : relDir // relative to root + , fullParentDir : realCurrentDir + + , stat : stat + }); + } + processed++; + if (processed === total) callProcessed(entryInfos); + }); + }); + } + }); + } + + function readdirRec(currentDir, depth, callCurrentDirProcessed) { + var args = arguments; + if (aborted) return; + if (paused) { + si(function () { + readdirRec.apply(null, args); + }) + return; + } + + fs.readdir(currentDir, function (err, entries) { + if (err) { + handleError(err); + callCurrentDirProcessed(); + return; + } + + processDir(currentDir, entries, function(entryInfos) { + + var subdirs = entryInfos + .filter(function (ei) { return ei.stat.isDirectory() && opts.directoryFilter(ei); }); + + subdirs.forEach(function (di) { + if(opts.entryType === 'directories' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(di); + } + readdirResult.directories.push(di); + }); + + entryInfos + .filter(function(ei) { + var isCorrectType = opts.entryType === 'all' ? + !ei.stat.isDirectory() : ei.stat.isFile() || ei.stat.isSymbolicLink(); + return isCorrectType && opts.fileFilter(ei); + }) + .forEach(function (fi) { + if(opts.entryType === 'files' || opts.entryType === 'both' || opts.entryType === 'all') { + fileProcessed(fi); + } + readdirResult.files.push(fi); + }); + + var pendingSubdirs = subdirs.length; + + // Be done if no more subfolders exist or we reached the maximum desired depth + if(pendingSubdirs === 0 || depth === opts.depth) { + callCurrentDirProcessed(); + } else { + // recurse into subdirs, keeping track of which ones are done + // and call back once all are processed + subdirs.forEach(function (subdir) { + readdirRec(subdir.fullPath, depth + 1, function () { + pendingSubdirs = pendingSubdirs - 1; + if(pendingSubdirs === 0) { + callCurrentDirProcessed(); + } + }); + }); + } + }); + }); + } + + // Validate and normalize filters + try { + opts.fileFilter = normalizeFilter(opts.fileFilter); + opts.directoryFilter = normalizeFilter(opts.directoryFilter); + } catch (err) { + // if we detect illegal filters, bail out immediately + handleFatalError(err); + return stream; + } + + // If filters were valid get on with the show + fs.realpath(opts.root, function(err, res) { + if (err) { + handleFatalError(err); + return stream; + } + + realRoot = res; + readdirRec(opts.root, 0, function () { + // All errors are collected into the errors array + if (errors.length > 0) { + allProcessed(errors, readdirResult); + } else { + allProcessed(null, readdirResult); + } + }); + }); + + return stream; +} + +module.exports = readdir; diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js new file mode 100644 index 00000000000..91c68084711 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js @@ -0,0 +1,99 @@ +'use strict'; + +var si = require('set-immediate-shim'); +var stream = require('readable-stream'); +var util = require('util'); + +var Readable = stream.Readable; + +module.exports = ReaddirpReadable; + +util.inherits(ReaddirpReadable, Readable); + +function ReaddirpReadable (opts) { + if (!(this instanceof ReaddirpReadable)) return new ReaddirpReadable(opts); + + opts = opts || {}; + + opts.objectMode = true; + Readable.call(this, opts); + + // backpressure not implemented at this point + this.highWaterMark = Infinity; + + this._destroyed = false; + this._paused = false; + this._warnings = []; + this._errors = []; + + this._pauseResumeErrors(); +} + +var proto = ReaddirpReadable.prototype; + +proto._pauseResumeErrors = function () { + var self = this; + self.on('pause', function () { self._paused = true }); + self.on('resume', function () { + if (self._destroyed) return; + self._paused = false; + + self._warnings.forEach(function (err) { self.emit('warn', err) }); + self._warnings.length = 0; + + self._errors.forEach(function (err) { self.emit('error', err) }); + self._errors.length = 0; + }) +} + +// called for each entry +proto._processEntry = function (entry) { + if (this._destroyed) return; + this.push(entry); +} + +proto._read = function () { } + +proto.destroy = function () { + // when stream is destroyed it will emit nothing further, not even errors or warnings + this.push(null); + this.readable = false; + this._destroyed = true; + this.emit('close'); +} + +proto._done = function () { + this.push(null); +} + +// we emit errors and warnings async since we may handle errors like invalid args +// within the initial event loop before any event listeners subscribed +proto._handleError = function (err) { + var self = this; + si(function () { + if (self._paused) return self._warnings.push(err); + if (!self._destroyed) self.emit('warn', err); + }); +} + +proto._handleFatalError = function (err) { + var self = this; + si(function () { + if (self._paused) return self._errors.push(err); + if (!self._destroyed) self.emit('error', err); + }); +} + +function createStreamAPI () { + var stream = new ReaddirpReadable(); + + return { + stream : stream + , processEntry : stream._processEntry.bind(stream) + , done : stream._done.bind(stream) + , handleError : stream._handleError.bind(stream) + , handleFatalError : stream._handleFatalError.bind(stream) + }; +} + +module.exports = createStreamAPI; diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file1.ext1 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file2.ext2 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file2.ext2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file3.ext3 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file3.ext3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js new file mode 100644 index 00000000000..c43d132d343 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js @@ -0,0 +1,338 @@ +/*jshint asi:true */ + +var debug //= true; +var test = debug ? function () {} : require('tap').test +var test_ = !debug ? function () {} : require('tap').test + , path = require('path') + , fs = require('fs') + , util = require('util') + , TransformStream = require('readable-stream').Transform + , through = require('through2') + , proxyquire = require('proxyquire') + , streamapi = require('../stream-api') + , readdirp = require('..') + , root = path.join(__dirname, 'bed') + , totalDirs = 6 + , totalFiles = 12 + , ext1Files = 4 + , ext2Files = 3 + , ext3Files = 2 + ; + +// see test/readdirp.js for test bed layout + +function opts (extend) { + var o = { root: root }; + + if (extend) { + for (var prop in extend) { + o[prop] = extend[prop]; + } + } + return o; +} + +function capture () { + var result = { entries: [], errors: [], ended: false } + , dst = new TransformStream({ objectMode: true }); + + dst._transform = function (entry, _, cb) { + result.entries.push(entry); + cb(); + } + + dst._flush = function (cb) { + result.ended = true; + this.push(result); + cb(); + } + + return dst; +} + +test('\nintegrated', function (t) { + t.test('\n# reading root without filter', function (t) { + t.plan(2); + + readdirp(opts()) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, totalFiles, 'emits all files'); + t.ok(result.ended, 'ends stream'); + t.end(); + cb(); + } + )); + }) + + t.test('\n# normal: ["*.ext1", "*.ext3"]', function (t) { + t.plan(2); + + readdirp(opts( { fileFilter: [ '*.ext1', '*.ext3' ] } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); + t.ok(result.ended, 'ends stream'); + t.end(); + cb(); + } + )) + }) + + t.test('\n# files only', function (t) { + t.plan(2); + + readdirp(opts( { entryType: 'files' } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, totalFiles, 'returned files'); + t.ok(result.ended, 'ends stream'); + t.end(); + cb(); + } + )) + }) + + t.test('\n# directories only', function (t) { + t.plan(2); + + readdirp(opts( { entryType: 'directories' } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, totalDirs, 'returned directories'); + t.ok(result.ended, 'ends stream'); + t.end(); + cb(); + } + )) + }) + + t.test('\n# both directories + files', function (t) { + t.plan(2); + + readdirp(opts( { entryType: 'both' } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, totalDirs + totalFiles, 'returned everything'); + t.ok(result.ended, 'ends stream'); + t.end(); + cb(); + } + )) + }) + + t.test('\n# directory filter with directories only', function (t) { + t.plan(2); + + readdirp(opts( { entryType: 'directories', directoryFilter: [ 'root_dir1', '*dir1_subdir1' ] } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, 2, 'two directories'); + t.ok(result.ended, 'ends stream'); + t.end(); + cb(); + } + )) + }) + + t.test('\n# directory and file filters with both entries', function (t) { + t.plan(2); + + readdirp(opts( { entryType: 'both', directoryFilter: [ 'root_dir1', '*dir1_subdir1' ], fileFilter: [ '!*.ext1' ] } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, 6, '2 directories and 4 files'); + t.ok(result.ended, 'ends stream'); + t.end(); + cb(); + } + )) + }) + + t.test('\n# negated: ["!*.ext1", "!*.ext3"]', function (t) { + t.plan(2); + + readdirp(opts( { fileFilter: [ '!*.ext1', '!*.ext3' ] } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through.obj( + function (result, _ , cb) { + t.equals(result.entries.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); + t.ok(result.ended, 'ends stream'); + t.end(); + } + )) + }) + + t.test('\n# no options given', function (t) { + t.plan(1); + readdirp() + .on('error', function (err) { + t.similar(err.toString() , /Need to pass at least one argument/ , 'emits meaningful error'); + t.end(); + }) + }) + + t.test('\n# mixed: ["*.ext1", "!*.ext3"]', function (t) { + t.plan(1); + + readdirp(opts( { fileFilter: [ '*.ext1', '!*.ext3' ] } )) + .on('error', function (err) { + t.similar(err.toString() , /Cannot mix negated with non negated glob filters/ , 'emits meaningful error'); + t.end(); + }) + }) +}) + + +test('\napi separately', function (t) { + + t.test('\n# handleError', function (t) { + t.plan(1); + + var api = streamapi() + , warning = new Error('some file caused problems'); + + api.stream + .on('warn', function (err) { + t.equals(err, warning, 'warns with the handled error'); + }) + api.handleError(warning); + }) + + t.test('\n# when stream is paused and then resumed', function (t) { + t.plan(6); + var api = streamapi() + , resumed = false + , fatalError = new Error('fatal!') + , nonfatalError = new Error('nonfatal!') + , processedData = 'some data' + ; + + api.stream + .on('warn', function (err) { + t.equals(err, nonfatalError, 'emits the buffered warning'); + t.ok(resumed, 'emits warning only after it was resumed'); + }) + .on('error', function (err) { + t.equals(err, fatalError, 'emits the buffered fatal error'); + t.ok(resumed, 'emits errors only after it was resumed'); + }) + .on('data', function (data) { + t.equals(data, processedData, 'emits the buffered data'); + t.ok(resumed, 'emits data only after it was resumed'); + }) + .pause() + + api.processEntry(processedData); + api.handleError(nonfatalError); + api.handleFatalError(fatalError); + + setTimeout(function () { + resumed = true; + api.stream.resume(); + }, 1) + }) + + t.test('\n# when a stream is paused it stops walking the fs', function (t) { + var resumed = false, + mockedAPI = streamapi(); + + mockedAPI.processEntry = function (entry) { + if (!resumed) t.notOk(true, 'should not emit while paused') + t.ok(entry, 'emitted while resumed') + }.bind(mockedAPI.stream) + + function wrapper () { + return mockedAPI + } + + var readdirp = proxyquire('../readdirp', {'./stream-api': wrapper}) + , stream = readdirp(opts()) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .on('end', function () { + t.end() + }) + .pause(); + + setTimeout(function () { + resumed = true; + stream.resume(); + }, 5) + }) + + t.test('\n# when a stream is destroyed, it emits "closed", but no longer emits "data", "warn" and "error"', function (t) { + var api = streamapi() + , fatalError = new Error('fatal!') + , nonfatalError = new Error('nonfatal!') + , processedData = 'some data' + , plan = 0; + + t.plan(6) + var stream = api.stream + .on('warn', function (err) { + t.ok(!stream._destroyed, 'emits warning until destroyed'); + }) + .on('error', function (err) { + t.ok(!stream._destroyed, 'emits errors until destroyed'); + }) + .on('data', function (data) { + t.ok(!stream._destroyed, 'emits data until destroyed'); + }) + .on('close', function () { + t.ok(stream._destroyed, 'emits close when stream is destroyed'); + }) + + + api.processEntry(processedData); + api.handleError(nonfatalError); + api.handleFatalError(fatalError); + + setTimeout(function () { + stream.destroy() + + t.notOk(stream.readable, 'stream is no longer readable after it is destroyed') + + api.processEntry(processedData); + api.handleError(nonfatalError); + api.handleFatalError(fatalError); + + process.nextTick(function () { + t.pass('emits no more data, warn or error events after it was destroyed') + t.end(); + }) + }, 10) + }) +}) diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js new file mode 100644 index 00000000000..812afbbb998 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js @@ -0,0 +1,289 @@ +/*jshint asi:true */ + +var test = require('tap').test + , path = require('path') + , fs = require('fs') + , util = require('util') + , net = require('net') + , readdirp = require('../readdirp.js') + , root = path.join(__dirname, '../test/bed') + , totalDirs = 6 + , totalFiles = 12 + , ext1Files = 4 + , ext2Files = 3 + , ext3Files = 2 + , rootDir2Files = 2 + , nameHasLength9Dirs = 2 + , depth1Files = 8 + , depth0Files = 3 + ; + +/* +Structure of test bed: + . + ├── root_dir1 + │   ├── root_dir1_file1.ext1 + │   ├── root_dir1_file2.ext2 + │   ├── root_dir1_file3.ext3 + │   ├── root_dir1_subdir1 + │   │   └── root1_dir1_subdir1_file1.ext1 + │   └── root_dir1_subdir2 + │   └── .gitignore + ├── root_dir2 + │   ├── root_dir2_file1.ext1 + │   ├── root_dir2_file2.ext2 + │   ├── root_dir2_subdir1 + │   │   └── .gitignore + │   └── root_dir2_subdir2 + │   └── .gitignore + ├── root_file1.ext1 + ├── root_file2.ext2 + └── root_file3.ext3 + + 6 directories, 13 files +*/ + +// console.log('\033[2J'); // clear console + +function opts (extend) { + var o = { root: root }; + + if (extend) { + for (var prop in extend) { + o[prop] = extend[prop]; + } + } + return o; +} + +test('\nreading root without filter', function (t) { + t.plan(2); + readdirp(opts(), function (err, res) { + t.equals(res.directories.length, totalDirs, 'all directories'); + t.equals(res.files.length, totalFiles, 'all files'); + t.end(); + }) +}) + +test('\nreading root without filter using lstat', function (t) { + t.plan(2); + readdirp(opts({ lstat: true }), function (err, res) { + t.equals(res.directories.length, totalDirs, 'all directories'); + t.equals(res.files.length, totalFiles, 'all files'); + t.end(); + }) +}) + +test('\nreading root with symlinks using lstat', function (t) { + t.plan(2); + fs.symlinkSync(path.join(root, 'root_dir1'), path.join(root, 'dirlink')); + fs.symlinkSync(path.join(root, 'root_file1.ext1'), path.join(root, 'link.ext1')); + readdirp(opts({ lstat: true }), function (err, res) { + t.equals(res.directories.length, totalDirs, 'all directories'); + t.equals(res.files.length, totalFiles + 2, 'all files + symlinks'); + fs.unlinkSync(path.join(root, 'dirlink')); + fs.unlinkSync(path.join(root, 'link.ext1')); + t.end(); + }) +}) + +test('\nreading non-standard fds', function (t) { + t.plan(2); + var server = net.createServer().listen(path.join(root, 'test.sock'), function(){ + readdirp(opts({ entryType: 'all' }), function (err, res) { + t.equals(res.files.length, totalFiles + 1, 'all files + socket'); + readdirp(opts({ entryType: 'both' }), function (err, res) { + t.equals(res.files.length, totalFiles, 'all regular files only'); + server.close(); + t.end(); + }) + }) + }); +}) + +test('\nreading root using glob filter', function (t) { + // normal + t.test('\n# "*.ext1"', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: '*.ext1' } ), function (err, res) { + t.equals(res.files.length, ext1Files, 'all ext1 files'); + t.end(); + }) + }) + t.test('\n# ["*.ext1", "*.ext3"]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ '*.ext1', '*.ext3' ] } ), function (err, res) { + t.equals(res.files.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); + t.end(); + }) + }) + t.test('\n# "root_dir1"', function (t) { + t.plan(1); + readdirp(opts( { directoryFilter: 'root_dir1' }), function (err, res) { + t.equals(res.directories.length, 1, 'one directory'); + t.end(); + }) + }) + t.test('\n# ["root_dir1", "*dir1_subdir1"]', function (t) { + t.plan(1); + readdirp(opts( { directoryFilter: [ 'root_dir1', '*dir1_subdir1' ]}), function (err, res) { + t.equals(res.directories.length, 2, 'two directories'); + t.end(); + }) + }) + + t.test('\n# negated: "!*.ext1"', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: '!*.ext1' } ), function (err, res) { + t.equals(res.files.length, totalFiles - ext1Files, 'all but ext1 files'); + t.end(); + }) + }) + t.test('\n# negated: ["!*.ext1", "!*.ext3"]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ '!*.ext1', '!*.ext3' ] } ), function (err, res) { + t.equals(res.files.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); + t.end(); + }) + }) + + t.test('\n# mixed: ["*.ext1", "!*.ext3"]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ '*.ext1', '!*.ext3' ] } ), function (err, res) { + t.similar(err[0].toString(), /Cannot mix negated with non negated glob filters/, 'returns meaningfull error'); + t.end(); + }) + }) + + t.test('\n# leading and trailing spaces: [" *.ext1", "*.ext3 "]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ ' *.ext1', '*.ext3 ' ] } ), function (err, res) { + t.equals(res.files.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); + t.end(); + }) + }) + t.test('\n# leading and trailing spaces: [" !*.ext1", " !*.ext3 "]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ ' !*.ext1', ' !*.ext3' ] } ), function (err, res) { + t.equals(res.files.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); + t.end(); + }) + }) + + t.test('\n# ** glob pattern', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: '**/*.ext1' } ), function (err, res) { + t.equals(res.files.length, ext1Files, 'ignores ** in **/*.ext1 -> only *.ext1 files'); + t.end(); + }) + }) +}) + +test('\n\nreading root using function filter', function (t) { + t.test('\n# file filter -> "contains root_dir2"', function (t) { + t.plan(1); + readdirp( + opts( { fileFilter: function (fi) { return fi.name.indexOf('root_dir2') >= 0; } }) + , function (err, res) { + t.equals(res.files.length, rootDir2Files, 'all rootDir2Files'); + t.end(); + } + ) + }) + + t.test('\n# directory filter -> "name has length 9"', function (t) { + t.plan(1); + readdirp( + opts( { directoryFilter: function (di) { return di.name.length === 9; } }) + , function (err, res) { + t.equals(res.directories.length, nameHasLength9Dirs, 'all all dirs with name length 9'); + t.end(); + } + ) + }) +}) + +test('\nreading root specifying maximum depth', function (t) { + t.test('\n# depth 1', function (t) { + t.plan(1); + readdirp(opts( { depth: 1 } ), function (err, res) { + t.equals(res.files.length, depth1Files, 'does not return files at depth 2'); + }) + }) +}) + +test('\nreading root with no recursion', function (t) { + t.test('\n# depth 0', function (t) { + t.plan(1); + readdirp(opts( { depth: 0 } ), function (err, res) { + t.equals(res.files.length, depth0Files, 'does not return files at depth 0'); + }) + }) +}) + +test('\nprogress callbacks', function (t) { + t.plan(2); + + var pluckName = function(fi) { return fi.name; } + , processedFiles = []; + + readdirp( + opts() + , function(fi) { + processedFiles.push(fi); + } + , function (err, res) { + t.equals(processedFiles.length, res.files.length, 'calls back for each file processed'); + t.deepEquals(processedFiles.map(pluckName).sort(),res.files.map(pluckName).sort(), 'same file names'); + t.end(); + } + ) +}) + +test('resolving of name, full and relative paths', function (t) { + var expected = { + name : 'root_dir1_file1.ext1' + , parentDirName : 'root_dir1' + , path : 'root_dir1/root_dir1_file1.ext1' + , fullPath : 'test/bed/root_dir1/root_dir1_file1.ext1' + } + , opts = [ + { root: './bed' , prefix: '' } + , { root: './bed/' , prefix: '' } + , { root: 'bed' , prefix: '' } + , { root: 'bed/' , prefix: '' } + , { root: '../test/bed/' , prefix: '' } + , { root: '.' , prefix: 'bed' } + ] + t.plan(opts.length); + + opts.forEach(function (op) { + op.fileFilter = 'root_dir1_file1.ext1'; + + t.test('\n' + util.inspect(op), function (t) { + t.plan(4); + + readdirp (op, function(err, res) { + t.equals(res.files[0].name, expected.name, 'correct name'); + t.equals(res.files[0].path, path.join(op.prefix, expected.path), 'correct path'); + }) + + fs.realpath(op.root, function(err, fullRoot) { + readdirp (op, function(err, res) { + t.equals( + res.files[0].fullParentDir + , path.join(fullRoot, op.prefix, expected.parentDirName) + , 'correct parentDir' + ); + t.equals( + res.files[0].fullPath + , path.join(fullRoot, op.prefix, expected.parentDirName, expected.name) + , 'correct fullPath' + ); + }) + }) + }) + }) +}) + + diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE b/src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE new file mode 100644 index 00000000000..1e49edf81fe --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md b/src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md new file mode 100644 index 00000000000..ab19174fb62 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md @@ -0,0 +1,160 @@ +# regex-cache [![NPM version](https://img.shields.io/npm/v/regex-cache.svg?style=flat)](https://www.npmjs.com/package/regex-cache) [![NPM downloads](https://img.shields.io/npm/dm/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/regex-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/regex-cache) + +> Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in suprising performance improvements. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install regex-cache --save +``` + +* Read [what this does](#what-this-does). +* See [the benchmarks](#benchmarks) + +## Usage + +Wrap a function like this: + +```js +var cache = require('regex-cache'); +var someRegex = cache(require('some-regex-lib')); +``` + +**Caching a regex** + +If you want to cache a regex after calling `new RegExp()`, or you're requiring a module that returns a regex, wrap it with a function first: + +```js +var cache = require('regex-cache'); + +function yourRegex(str, opts) { + // do stuff to str and opts + return new RegExp(str, opts.flags); +} + +var regex = cache(yourRegex); +``` + +## Recommendations + +### Use this when... + +* **No options are passed** to the function that creates the regex. Regardless of how big or small the regex is, when zero options are passed, caching will be faster than not. +* **A few options are passed**, and the values are primitives. The limited benchmarks I did show that caching is beneficial when up to 8 or 9 options are passed. + +### Do not use this when... + +* **The values of options are not primitives**. When non-primitives must be compared for equality, the time to compare the options is most likely as long or longer than the time to just create a new regex. + +### Example benchmarks + +Performance results, with and without regex-cache: + +```bash +# no args passed (defaults) + with-cache x 8,699,231 ops/sec ±0.86% (93 runs sampled) + without-cache x 2,777,551 ops/sec ±0.63% (95 runs sampled) + +# string and six options passed + with-cache x 1,885,934 ops/sec ±0.80% (93 runs sampled) + without-cache x 1,256,893 ops/sec ±0.65% (97 runs sampled) + +# string only + with-cache x 7,723,256 ops/sec ±0.87% (92 runs sampled) + without-cache x 2,303,060 ops/sec ±0.47% (99 runs sampled) + +# one option passed + with-cache x 4,179,877 ops/sec ±0.53% (100 runs sampled) + without-cache x 2,198,422 ops/sec ±0.47% (95 runs sampled) + +# two options passed + with-cache x 3,256,222 ops/sec ±0.51% (99 runs sampled) + without-cache x 2,121,401 ops/sec ±0.79% (97 runs sampled) + +# six options passed + with-cache x 1,816,018 ops/sec ±1.08% (96 runs sampled) + without-cache x 1,157,176 ops/sec ±0.53% (100 runs sampled) + +# +# diminishing returns happen about here +# + +# ten options passed + with-cache x 1,210,598 ops/sec ±0.56% (92 runs sampled) + without-cache x 1,665,588 ops/sec ±1.07% (100 runs sampled) + +# twelve options passed + with-cache x 1,042,096 ops/sec ±0.68% (92 runs sampled) + without-cache x 1,389,414 ops/sec ±0.68% (97 runs sampled) + +# twenty options passed + with-cache x 661,125 ops/sec ±0.80% (93 runs sampled) + without-cache x 1,208,757 ops/sec ±0.65% (97 runs sampled) + +# +# when non-primitive values are compared +# + +# single value on the options is an object + with-cache x 1,398,313 ops/sec ±1.05% (95 runs sampled) + without-cache x 2,228,281 ops/sec ±0.56% (99 runs sampled) +``` + +## Run benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm run benchmarks +``` + +## What this does + +If you're using `new RegExp('foo')` instead of a regex literal, it's probably because you need to dyamically generate a regex based on user options or some other potentially changing factors. + +When your function creates a string based on user inputs and passes it to the `RegExp` constructor, regex-cache caches the results. The next time the function is called if the key of a cached regex matches the user input (or no input was given), the cached regex is returned, avoiding unnecessary runtime compilation. + +Using the RegExp constructor offers a lot of flexibility, but the runtime compilation comes at a price - it's slow. Not specifically because of the call to the RegExp constructor, but **because you have to build up the string before `new RegExp()` is even called**. +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/regex-cache/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v, on April 01, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js b/src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js new file mode 100644 index 00000000000..13d20226a81 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js @@ -0,0 +1,69 @@ +/*! + * regex-cache + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +var isPrimitive = require('is-primitive'); +var equal = require('is-equal-shallow'); +var basic = {}; +var cache = {}; + +/** + * Expose `regexCache` + */ + +module.exports = regexCache; + +/** + * Memoize the results of a call to the new RegExp constructor. + * + * @param {Function} fn [description] + * @param {String} str [description] + * @param {Options} options [description] + * @param {Boolean} nocompare [description] + * @return {RegExp} + */ + +function regexCache(fn, str, opts) { + var key = '_default_', regex, cached; + + if (!str && !opts) { + if (typeof fn !== 'function') { + return fn; + } + return basic[key] || (basic[key] = fn(str)); + } + + var isString = typeof str === 'string'; + if (isString) { + if (!opts) { + return basic[str] || (basic[str] = fn(str)); + } + key = str; + } else { + opts = str; + } + + cached = cache[key]; + if (cached && equal(cached.opts, opts)) { + return cached.regex; + } + + memo(key, opts, (regex = fn(str, opts))); + return regex; +} + +function memo(key, opts, regex) { + cache[key] = {regex: regex, opts: opts}; +} + +/** + * Expose `cache` + */ + +module.exports.cache = cache; +module.exports.basic = basic; diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json b/src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json new file mode 100644 index 00000000000..51a6eef3b68 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + "regex-cache@^0.4.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" + ] + ], + "_from": "regex-cache@>=0.4.2 <0.5.0", + "_id": "regex-cache@0.4.3", + "_inCache": true, + "_installable": true, + "_location": "/regex-cache", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/regex-cache-0.4.3.tgz_1459536604904_0.22530420310795307" + }, + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "name": "regex-cache", + "raw": "regex-cache@^0.4.2", + "rawSpec": "^0.4.2", + "scope": null, + "spec": ">=0.4.2 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "_shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145", + "_shrinkwrap": null, + "_spec": "regex-cache@^0.4.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/regex-cache/issues" + }, + "dependencies": { + "is-equal-shallow": "^0.1.3", + "is-primitive": "^2.0.0" + }, + "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in suprising performance improvements.", + "devDependencies": { + "benchmarked": "^0.1.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.7", + "micromatch": "^2.3.7", + "should": "^8.3.0" + }, + "directories": {}, + "dist": { + "shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145", + "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "06ce46bda29a19064a968bd5d2d5596440be05ca", + "homepage": "https://github.com/jonschlinkert/regex-cache", + "keywords": [ + "cache", + "expression", + "regex", + "regexp", + "regular", + "regular expression", + "store", + "to-regex" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + } + ], + "name": "regex-cache", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/regex-cache.git" + }, + "scripts": { + "benchmarks": "node benchmark", + "test": "mocha" + }, + "verb": { + "layout": "default", + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "run": true, + "tasks": [ + "readme" + ], + "toc": false + }, + "version": "0.4.3" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE b/src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE new file mode 100644 index 00000000000..33754daecd9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md b/src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md new file mode 100644 index 00000000000..008e20ead40 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md @@ -0,0 +1,71 @@ +# repeat-element [![NPM version](https://badge.fury.io/js/repeat-element.svg)](http://badge.fury.io/js/repeat-element) + +> Create an array by repeating the given value n times. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```bash +npm i repeat-element --save +``` + +## Usage + +```js +var repeat = require('repeat-element'); + +repeat('a', 5); +//=> ['a', 'a', 'a', 'a', 'a'] + +repeat('a', 1); +//=> ['a'] + +repeat('a', 0); +//=> [] + +repeat(null, 5) +//» [ null, null, null, null, null ] + +repeat({some: 'object'}, 5) +//» [ { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' }, +// { some: 'object' } ] + +repeat(5, 5) +//» [ 5, 5, 5, 5, 5 ] +``` + +## Related projects + +[repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. + +## Running tests + +Install dev dependencies: + +```bash +npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/repeat-element/issues) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright (c) 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 06, 2015._ diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js b/src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js new file mode 100644 index 00000000000..0ad45ab46d5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js @@ -0,0 +1,18 @@ +/*! + * repeat-element + * + * Copyright (c) 2015 Jon Schlinkert. + * Licensed under the MIT license. + */ + +'use strict'; + +module.exports = function repeat(ele, num) { + var arr = new Array(num); + + for (var i = 0; i < num; i++) { + arr[i] = ele; + } + + return arr; +}; diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json b/src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json new file mode 100644 index 00000000000..87f8bb68037 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "repeat-element@^1.1.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces" + ] + ], + "_from": "repeat-element@>=1.1.2 <2.0.0", + "_id": "repeat-element@1.1.2", + "_inCache": true, + "_installable": true, + "_location": "/repeat-element", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "repeat-element", + "raw": "repeat-element@^1.1.2", + "rawSpec": "^1.1.2", + "scope": null, + "spec": ">=1.1.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/braces", + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "_shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", + "_shrinkwrap": null, + "_spec": "repeat-element@^1.1.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-element/issues" + }, + "dependencies": {}, + "description": "Create an array by repeating the given value n times.", + "devDependencies": { + "benchmarked": "^0.1.4", + "chalk": "^1.0.0", + "glob": "^5.0.5", + "minimist": "^1.1.1", + "mocha": "^2.2.4" + }, + "directories": {}, + "dist": { + "shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", + "tarball": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7a6b21d58eafcc44fc8de133c70a8398ee9fdd8d", + "homepage": "https://github.com/jonschlinkert/repeat-element", + "keywords": [ + "array", + "element", + "repeat", + "string" + ], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/repeat-element/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + } + ], + "name": "repeat-element", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/repeat-element.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.1.2" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE b/src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE new file mode 100644 index 00000000000..39245ac1c60 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md b/src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md new file mode 100644 index 00000000000..975c2be6ae0 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md @@ -0,0 +1,118 @@ +# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg)](https://www.npmjs.com/package/repeat-string) [![Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg)](https://travis-ci.org/jonschlinkert/repeat-string) + +> Repeat the given string n times. Fastest implementation for repeating a string. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install repeat-string --save +``` + +## Usage + +### [repeat](index.js#L41) + +Repeat the given `string` the specified `number` of times. + +**Example:** + +**Params** + +* `string` **{String}**: The string to repeat +* `number` **{Number}**: The number of times to repeat the string +* `returns` **{String}**: Repeated string + +**Example** + +```js +var repeat = require('repeat-string'); +repeat('A', 5); +//=> AAAAA +``` + +## Benchmarks + +Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): + +```sh +#1: 5 + native x 10,484,023 ops/sec ±1.24% (89 runs sampled) + repeat-string x 16,189,255 ops/sec ±1.05% (91 runs sampled) + repeating x 9,051,715 ops/sec ±1.18% (90 runs sampled) + +#2: 50 + native x 7,975,566 ops/sec ±1.29% (91 runs sampled) + repeat-string x 15,317,972 ops/sec ±1.16% (87 runs sampled) + repeating x 6,279,112 ops/sec ±1.29% (89 runs sampled) + +#3: 250 + native x 6,212,752 ops/sec ±1.33% (91 runs sampled) + repeat-string x 14,565,168 ops/sec ±0.83% (93 runs sampled) + repeating x 5,787,124 ops/sec ±1.25% (92 runs sampled) + +#4: 2000 + native x 4,912,163 ops/sec ±1.27% (91 runs sampled) + repeat-string x 17,129,748 ops/sec ±1.01% (91 runs sampled) + repeating x 4,613,043 ops/sec ±1.37% (91 runs sampled) + +#5: 20000 + native x 4,506,624 ops/sec ±1.33% (90 runs sampled) + repeat-string x 14,877,672 ops/sec ±1.00% (93 runs sampled) + repeating x 4,305,756 ops/sec ±1.36% (89 runs sampled) +``` + +**Run the benchmarks** + +Install dev dependencies: + +```sh +npm i -d && node benchmark +``` + +## Related projects + +[repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/repeat-string/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016 [Jon Schlinkert](http://github.com/jonschlinkert) +Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 29, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js b/src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js new file mode 100644 index 00000000000..496c6db2615 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js @@ -0,0 +1,68 @@ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +module.exports = repeat; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat(str, num) { + if (typeof str !== 'string') { + throw new TypeError('repeat-string expects a string.'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } + + while (max > res.length && num > 0) { + if (num & 1) { + res += str; + } + + num >>= 1; + if (!num) break; + str += str; + } + + return res.substr(0, max); +} + diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json b/src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json new file mode 100644 index 00000000000..86f982ae7cc --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + "repeat-string@^1.5.2", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" + ] + ], + "_from": "repeat-string@>=1.5.2 <2.0.0", + "_id": "repeat-string@1.5.4", + "_inCache": true, + "_installable": true, + "_location": "/repeat-string", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-5-east.internal.npmjs.com", + "tmp": "tmp/repeat-string-1.5.4.tgz_1456747759357_0.14794702967628837" + }, + "_npmUser": { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "name": "repeat-string", + "raw": "repeat-string@^1.5.2", + "rawSpec": "^1.5.2", + "scope": null, + "spec": ">=1.5.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fill-range" + ], + "_resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz", + "_shasum": "64ec0c91e0f4b475f90d5b643651e3e6e5b6c2d5", + "_shrinkwrap": null, + "_spec": "repeat-string@^1.5.2", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", + "author": { + "name": "Jon Schlinkert", + "url": "http://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/repeat-string/issues" + }, + "dependencies": {}, + "description": "Repeat the given string n times. Fastest implementation for repeating a string.", + "devDependencies": { + "benchmarked": "^0.1.5", + "chalk": "^1.1.1", + "glob": "^7.0.0", + "gulp-format-md": "^0.1.7", + "mocha": "*", + "repeating": "^2.0.0", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "64ec0c91e0f4b475f90d5b643651e3e6e5b6c2d5", + "tarball": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "index.js" + ], + "gitHead": "53b4ac32e4cfa5bf339aed73544fe86b0f3e9190", + "homepage": "https://github.com/jonschlinkert/repeat-string", + "keywords": [ + "fast", + "fastest", + "fill", + "left", + "left-pad", + "multiple", + "pad", + "padding", + "repeat", + "repeating", + "repetition", + "right", + "right-pad", + "string", + "times" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "github@sellside.com", + "name": "jonschlinkert" + }, + { + "email": "brian.woodward@gmail.com", + "name": "doowb" + } + ], + "name": "repeat-string", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/repeat-string.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "reflinks": [ + "verb" + ], + "related": { + "list": [ + "repeat-element" + ] + }, + "tasks": [ + "readme" + ], + "toc": false + }, + "version": "1.5.4" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js new file mode 100644 index 00000000000..e690485ca03 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js @@ -0,0 +1,7 @@ +'use strict'; +module.exports = typeof setImmediate === 'function' ? setImmediate : + function setImmediate() { + var args = [].slice.apply(arguments); + args.splice(1, 0, 0); + setTimeout.apply(null, args); + }; diff --git a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json new file mode 100644 index 00000000000..7d8ae5a68ab --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + "set-immediate-shim@^1.0.1", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" + ] + ], + "_from": "set-immediate-shim@>=1.0.1 <2.0.0", + "_id": "set-immediate-shim@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/set-immediate-shim", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "name": "set-immediate-shim", + "raw": "set-immediate-shim@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/readdirp" + ], + "_resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "_shasum": "4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61", + "_shrinkwrap": null, + "_spec": "set-immediate-shim@^1.0.1", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/set-immediate-shim/issues" + }, + "dependencies": {}, + "description": "Simple setImmediate shim", + "devDependencies": { + "ava": "0.0.4", + "require-uncached": "^1.0.2" + }, + "directories": {}, + "dist": { + "shasum": "4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61", + "tarball": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "4c50df7ade5a368e106fee82351ee0a378c990f7", + "homepage": "https://github.com/sindresorhus/set-immediate-shim", + "keywords": [ + "setImmediate", + "immediate", + "setTimeout", + "timeout", + "shim", + "polyfill", + "ponyfill" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "set-immediate-shim", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/set-immediate-shim.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md new file mode 100644 index 00000000000..4ec864fa238 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md @@ -0,0 +1,31 @@ +# set-immediate-shim [![Build Status](https://travis-ci.org/sindresorhus/set-immediate-shim.svg?branch=master)](https://travis-ci.org/sindresorhus/set-immediate-shim) + +> Simple [`setImmediate`](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) shim + + +## Install + +``` +$ npm install --save set-immediate-shim +``` + + +## Usage + +```js +var setImmediateShim = require('set-immediate-shim'); + +setImmediateShim(function () { + console.log('2'); +}); + +console.log('1'); + +//=> 1 +//=> 2 +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore b/src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore new file mode 100644 index 00000000000..206320cc1d2 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore @@ -0,0 +1,2 @@ +build +test diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE b/src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000000..6de584a48f5 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE @@ -0,0 +1,20 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md b/src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md new file mode 100644 index 00000000000..4d2aa001501 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md @@ -0,0 +1,7 @@ +**string_decoder.js** (`require('string_decoder')`) from Node.js core + +Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. + +Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** + +The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js b/src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js new file mode 100644 index 00000000000..b00e54fb790 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js @@ -0,0 +1,221 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). + this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. + this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. + this.charLength = 0; +}; + + +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var available = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; + } + break; + } + + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; +} + +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json b/src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json new file mode 100644 index 00000000000..3df0ef34504 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json @@ -0,0 +1,79 @@ +{ + "_args": [ + [ + "string_decoder@~0.10.x", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream" + ] + ], + "_from": "string_decoder@>=0.10.0 <0.11.0", + "_id": "string_decoder@0.10.31", + "_inCache": true, + "_installable": true, + "_location": "/string_decoder", + "_npmUser": { + "email": "rod@vagg.org", + "name": "rvagg" + }, + "_npmVersion": "1.4.23", + "_phantomChildren": {}, + "_requested": { + "name": "string_decoder", + "raw": "string_decoder@~0.10.x", + "rawSpec": "~0.10.x", + "scope": null, + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_shrinkwrap": null, + "_spec": "string_decoder@~0.10.x", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "dependencies": {}, + "description": "The string_decoder module from Node core", + "devDependencies": { + "tap": "~0.4.8" + }, + "directories": {}, + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "email": "mail@substack.net", + "name": "substack" + }, + { + "email": "rod@vagg.org", + "name": "rvagg" + } + ], + "name": "string_decoder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "version": "0.10.31" +} diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md new file mode 100644 index 00000000000..acc8675372e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE new file mode 100644 index 00000000000..6a60e8c225c --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md new file mode 100644 index 00000000000..75622fa7c25 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js new file mode 100644 index 00000000000..549ae2f065e --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js new file mode 100644 index 00000000000..5e6fcff5ddd --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json new file mode 100644 index 00000000000..78f727bc233 --- /dev/null +++ b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "util-deprecate@~1.0.1", + "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream" + ] + ], + "_from": "util-deprecate@>=1.0.1 <1.1.0", + "_id": "util-deprecate@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/util-deprecate", + "_nodeVersion": "4.1.2", + "_npmUser": { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "name": "util-deprecate", + "raw": "util-deprecate@~1.0.1", + "rawSpec": "~1.0.1", + "scope": null, + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "_shrinkwrap": null, + "_spec": "util-deprecate@~1.0.1", + "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream", + "author": { + "email": "nathan@tootallnate.net", + "name": "Nathan Rajlich", + "url": "http://n8.io/" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "dependencies": {}, + "description": "The Node.js `util.deprecate()` function with browser support", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", + "homepage": "https://github.com/TooTallNate/util-deprecate", + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "license": "MIT", + "main": "node.js", + "maintainers": [ + { + "email": "nathan@tootallnate.net", + "name": "tootallnate" + } + ], + "name": "util-deprecate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.2" +} diff --git a/src/filesystem/impls/appshell/node/package.json b/src/filesystem/impls/appshell/node/package.json new file mode 100644 index 00000000000..4227bd1da13 --- /dev/null +++ b/src/filesystem/impls/appshell/node/package.json @@ -0,0 +1,6 @@ +{ + "name": "brackets-files-watcher", + "dependencies": { + "chokidar": "1.6.0" + } +} diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index a0ee7f9e182..0803d663e69 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -787,5 +787,6 @@ define({ "DEFAULT_PREFERENCES_JSON_DEFAULT" : "Default", "DESCRIPTION_PURE_CODING_SURFACE" : "true to enable code only mode and hide all other UI elements in {APP_NAME}", "DESCRIPTION_INDENT_LINE_COMMENT" : "true to enable indenting of line comments", - "DESCRIPTION_RECENT_FILES_NAV" : "Enable/disable navigation in recent files" + "DESCRIPTION_RECENT_FILES_NAV" : "Enable/disable navigation in recent files", + "DESCRIPTION_FILE_WATCHERS_IGNORED" : "Array of path to ignore during file watching" }); From c0aa471225738056eb01149602ffe590ea2519a9 Mon Sep 17 00:00:00 2001 From: ficristo Date: Thu, 4 Feb 2016 14:20:16 +0100 Subject: [PATCH 02/37] Add 'depth' parameter Remove depth, add ignore --- src/filesystem/impls/appshell/node/FileWatcherDomain.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index cceb94a4cbe..86e3bce2ace 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -78,8 +78,9 @@ function watchPath(path) { persistent: true, ignoreInitial: true, ignorePermissionErrors: true, - followSymlinks: true - // ignored: "?" // TODO: maybe unwatch file/folder filtered in the current search + followSymlinks: true, + // TODO: configurable? And maybe unwatch file/folder filtered in the current search + ignored: ["**/node_modules/**"] }); watcher.on("all", function (event, filename, stats) { From 61888e6c59d7680bd6e7ed5abdbde2931c3a8b2c Mon Sep 17 00:00:00 2001 From: ficristo Date: Sun, 7 Feb 2016 11:06:29 +0100 Subject: [PATCH 03/37] Add some logs --- src/filesystem/impls/appshell/node/FileWatcherDomain.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 86e3bce2ace..82f4e429723 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -74,13 +74,15 @@ function watchPath(path) { } try { + console.log("Start watcher at: " + path); + var watcher = chokidar.watch(path, { persistent: true, ignoreInitial: true, ignorePermissionErrors: true, followSymlinks: true, // TODO: configurable? And maybe unwatch file/folder filtered in the current search - ignored: ["**/node_modules/**"] + ignored: ["**/node_modules/**", "**/.git/**", "**/.svn/**"] }); watcher.on("all", function (event, filename, stats) { @@ -108,6 +110,7 @@ function watchPath(path) { return; } + console.log([parent, type, name]); _domainManager.emitEvent("fileWatcher", "change", [parent, type, name]); }); From 2e3210b7cf3435ddf03d5f92e8ac3958bd44b5dd Mon Sep 17 00:00:00 2001 From: ficristo Date: Mon, 18 Apr 2016 21:00:06 +0200 Subject: [PATCH 04/37] Use the stats from chokidar --- .../impls/appshell/AppshellFileSystem.js | 21 ++++++++----------- .../impls/appshell/node/FileWatcherDomain.js | 7 ++++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 7fd9a47e5e2..5bb25faa05b 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -78,10 +78,12 @@ define(function (require, exports, module) { * Enqueue a file change event for eventual reporting back to the FileSystem. * * @param {string} changedPath The path that was changed - * @param {boolean} needsStats Whether or not the eventual change event should include stats + * @param {object} stats Stats coming from the underlying watcher, + * iff false the eventual change event should not include stats * @private */ - function _enqueueChange(changedPath, needsStats) { + function _enqueueChange(changedPath, stats) { + var needsStats = stats !== false; _pendingChanges[changedPath] = _pendingChanges[changedPath] || needsStats; if (!_changeTimeout) { @@ -90,14 +92,7 @@ define(function (require, exports, module) { Object.keys(_pendingChanges).forEach(function (path) { var needsStats = _pendingChanges[path]; if (needsStats) { - exports.stat(path, function (err, stats) { - if (err) { - // warning has been removed due to spamming the console - see #7332 - // console.warn("Unable to stat changed path: ", path, err); - return; - } - _changeCallback(path, stats); - }); + _changeCallback(path, stats); } else { _changeCallback(path); } @@ -119,15 +114,17 @@ define(function (require, exports, module) { * @param {string=} filename The name of the file that changed. * @private */ - function _fileWatcherChange(evt, path, event, filename) { + function _fileWatcherChange(evt, path, event, filename, stats) { var change; + stats.mtime = new Date(stats.mtime); + if (event === "change") { // Only register change events if filename is passed if (filename) { // an existing file was modified; stats are needed change = path + filename; - _enqueueChange(change, true); + _enqueueChange(change, stats); } } else if (event === "rename") { // a new file was created; no stats are needed diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 82f4e429723..c67de1f11f3 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -110,8 +110,8 @@ function watchPath(path) { return; } - console.log([parent, type, name]); - _domainManager.emitEvent("fileWatcher", "change", [parent, type, name]); + console.log([parent, type, name, stats]); + _domainManager.emitEvent("fileWatcher", "change", [parent, type, name, stats]); }); _watcherMap[path] = watcher; @@ -184,7 +184,8 @@ function init(domainManager) { [ {name: "path", type: "string"}, {name: "event", type: "string"}, - {name: "filename", type: "string"} + {name: "filename", type: "string"}, + {name: "stats", type: "object"} ] ); From adfd64d47fb0ef30c670877f95446ca8e8d16cab Mon Sep 17 00:00:00 2001 From: ficristo Date: Sat, 14 May 2016 18:34:58 +0200 Subject: [PATCH 05/37] Prepared preferences for the paths to ignore during watching --- src/filesystem/FileSystem.js | 19 ++++++++++++++++--- .../impls/appshell/AppshellFileSystem.js | 5 +++-- .../impls/appshell/node/FileWatcherDomain.js | 12 ++++++++++-- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index d8cf0b5aeba..da8921551b2 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -96,6 +96,18 @@ define(function (require, exports, module) { WatchedRoot = require("filesystem/WatchedRoot"), EventDispatcher = require("utils/EventDispatcher"); +// var PreferencesManager = require("preferences/PreferencesManager"), +// Strings = require("strings"); +// +// var ignored = [ +// "**/node_modules/**", +// "**/.git/**", +// "**/.svn/**" +// ]; +// this._preferencesManager.definePreference("fileWatchers.ignored", "array", ignored, { +// description: Strings.DESCRIPTION_FILE_WATCHERS_IGNORED +// }); + /** * The FileSystem is not usable until init() signals its callback. * @constructor @@ -261,7 +273,8 @@ define(function (require, exports, module) { FileSystem.prototype._watchOrUnwatchEntry = function (entry, watchedRoot, callback, shouldWatch) { var impl = this._impl, recursiveWatch = impl.recursiveWatch, - commandName = shouldWatch ? "watchPath" : "unwatchPath"; + commandName = shouldWatch ? "watchPath" : "unwatchPath", + ignored = undefined;// PreferencesManager.get("fileWatchers.ignored"); if (recursiveWatch) { // The impl can watch the entire subtree with one call on the root (we also fall into this case for @@ -273,7 +286,7 @@ define(function (require, exports, module) { } else { // The impl will handle finding all subdirectories to watch. this._enqueueWatchRequest(function (requestCb) { - impl[commandName].call(impl, entry.fullPath, requestCb); + impl[commandName].call(impl, entry.fullPath, ignored, requestCb); }.bind(this), callback); } } else if (shouldWatch) { @@ -314,7 +327,7 @@ define(function (require, exports, module) { }; entriesToWatch.forEach(function (entry) { - impl.watchPath(entry.fullPath, watchCallback); + impl.watchPath(entry.fullPath, ignored, watchCallback); }); }); }, callback); diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 5bb25faa05b..8fcadafb7ee 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -517,9 +517,10 @@ define(function (require, exports, module) { * when the recursiveWatch property of this module is true. * * @param {string} path + * @param {array} ignored * @param {function(?string)=} callback */ - function watchPath(path, callback) { + function watchPath(path, ignored, callback) { if (_isRunningOnWindowsXP) { callback(FileSystemError.NOT_SUPPORTED); return; @@ -533,7 +534,7 @@ define(function (require, exports, module) { } return; } - _nodeDomain.exec("watchPath", path) + _nodeDomain.exec("watchPath", path, ignored) .then(callback, callback); }); } diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index c67de1f11f3..65f821082d5 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -67,14 +67,18 @@ function unwatchPath(path) { /** * Watch a file or directory. * @param {string} path File or directory to watch. + * @param {array} ignored List of File or directory to NOT watch. */ -function watchPath(path) { +function watchPath(path, ignored) { if (_watcherMap.hasOwnProperty(path)) { return; } try { console.log("Start watcher at: " + path); + + ignored = ignored || ["**/node_modules/**", "**/.git/**", "**/.svn/**"]; + console.log("ignored: " + ignored); var watcher = chokidar.watch(path, { persistent: true, @@ -82,7 +86,7 @@ function watchPath(path) { ignorePermissionErrors: true, followSymlinks: true, // TODO: configurable? And maybe unwatch file/folder filtered in the current search - ignored: ["**/node_modules/**", "**/.git/**", "**/.svn/**"] + ignored: ignored }); watcher.on("all", function (event, filename, stats) { @@ -157,6 +161,10 @@ function init(domainManager) { name: "path", type: "string", description: "absolute filesystem path of the file or directory to watch" + }, { + name: "ignored", + type: "array", + description: "list of path to ignore" }] ); domainManager.registerCommand( From 68f6c3711efad280e1e2d140164171edd6a92b24 Mon Sep 17 00:00:00 2001 From: ficristo Date: Wed, 3 Aug 2016 19:32:19 +0200 Subject: [PATCH 06/37] Make tests pass --- test/spec/MockFileSystemImpl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/MockFileSystemImpl.js b/test/spec/MockFileSystemImpl.js index 734dc61c3de..e7409ad17eb 100644 --- a/test/spec/MockFileSystemImpl.js +++ b/test/spec/MockFileSystemImpl.js @@ -185,14 +185,14 @@ define(function (require, exports, module) { _offlineCallback = offlineCallback; } - function watchPath(path, callback) { + function watchPath(path, ignored, callback) { var cb = _getCallback("watchPath", path, callback); _model.watchPath(path); cb(null); } - function unwatchPath(path, callback) { + function unwatchPath(path, ignored, callback) { var cb = _getCallback("unwatchPath", path, callback); _model.unwatchPath(path); cb(null); From a34d92662fe79b4545a0488b0c08bffa0e015331 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 4 Aug 2016 09:38:48 +1000 Subject: [PATCH 07/37] do not commit node_modules to the project --- package.json | 3 + .../node/node_modules/anymatch/LICENSE | 15 - .../node/node_modules/anymatch/README.md | 91 - .../node/node_modules/anymatch/index.js | 64 - .../node/node_modules/anymatch/package.json | 95 - .../node/node_modules/arr-diff/LICENSE | 21 - .../node/node_modules/arr-diff/README.md | 74 - .../node/node_modules/arr-diff/index.js | 58 - .../node/node_modules/arr-diff/package.json | 111 - .../node/node_modules/arr-flatten/LICENSE | 21 - .../node/node_modules/arr-flatten/README.md | 73 - .../node/node_modules/arr-flatten/index.js | 27 - .../node_modules/arr-flatten/package.json | 100 - .../node/node_modules/array-unique/LICENSE | 21 - .../node/node_modules/array-unique/README.md | 51 - .../node/node_modules/array-unique/index.js | 28 - .../node_modules/array-unique/package.json | 86 - .../node/node_modules/arrify/index.js | 8 - .../appshell/node/node_modules/arrify/license | 21 - .../node/node_modules/arrify/package.json | 89 - .../node/node_modules/arrify/readme.md | 36 - .../node/node_modules/async-each/.npmignore | 25 - .../node/node_modules/async-each/CHANGELOG.md | 23 - .../node/node_modules/async-each/README.md | 64 - .../node/node_modules/async-each/bower.json | 22 - .../node_modules/async-each/component.json | 18 - .../node/node_modules/async-each/index.js | 38 - .../node/node_modules/async-each/package.json | 89 - .../node/node_modules/async-each/test.js | 13 - .../node_modules/balanced-match/.npmignore | 5 - .../node_modules/balanced-match/LICENSE.md | 21 - .../node_modules/balanced-match/README.md | 91 - .../node/node_modules/balanced-match/index.js | 58 - .../node_modules/balanced-match/package.json | 102 - .../binary-extensions/binary-extensions.json | 238 - .../node_modules/binary-extensions/license | 21 - .../binary-extensions/package.json | 108 - .../node_modules/binary-extensions/readme.md | 33 - .../node_modules/brace-expansion/README.md | 122 - .../node_modules/brace-expansion/index.js | 201 - .../node_modules/brace-expansion/package.json | 104 - .../appshell/node/node_modules/braces/LICENSE | 21 - .../node/node_modules/braces/README.md | 248 - .../node/node_modules/braces/index.js | 399 - .../node/node_modules/braces/package.json | 149 - .../node/node_modules/buffer-shims/index.js | 108 - .../node/node_modules/buffer-shims/license.md | 19 - .../node_modules/buffer-shims/package.json | 77 - .../node/node_modules/buffer-shims/readme.md | 21 - .../node/node_modules/chokidar/CHANGELOG.md | 268 - .../node/node_modules/chokidar/README.md | 287 - .../node/node_modules/chokidar/index.js | 710 -- .../chokidar/lib/fsevents-handler.js | 396 - .../chokidar/lib/nodefs-handler.js | 481 -- .../node/node_modules/chokidar/package.json | 114 - .../node/node_modules/concat-map/.travis.yml | 4 - .../node/node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/example/map.js | 6 - .../node/node_modules/concat-map/index.js | 13 - .../node/node_modules/concat-map/package.json | 109 - .../node/node_modules/concat-map/test/map.js | 39 - .../node/node_modules/core-util-is/LICENSE | 19 - .../node/node_modules/core-util-is/README.md | 3 - .../node_modules/core-util-is/float.patch | 604 -- .../node_modules/core-util-is/lib/util.js | 107 - .../node_modules/core-util-is/package.json | 86 - .../node/node_modules/core-util-is/test.js | 68 - .../node/node_modules/expand-brackets/LICENSE | 21 - .../node_modules/expand-brackets/README.md | 107 - .../node_modules/expand-brackets/index.js | 163 - .../node_modules/expand-brackets/package.json | 128 - .../node/node_modules/expand-range/LICENSE | 24 - .../node/node_modules/expand-range/README.md | 145 - .../node/node_modules/expand-range/index.js | 43 - .../node_modules/expand-range/package.json | 135 - .../node/node_modules/extglob/LICENSE | 21 - .../node/node_modules/extglob/README.md | 88 - .../node/node_modules/extglob/index.js | 178 - .../node/node_modules/extglob/package.json | 108 - .../node_modules/filename-regex/README.md | 51 - .../node/node_modules/filename-regex/index.js | 10 - .../node_modules/filename-regex/package.json | 92 - .../node/node_modules/fill-range/LICENSE | 21 - .../node/node_modules/fill-range/README.md | 290 - .../node/node_modules/fill-range/index.js | 408 - .../node/node_modules/fill-range/package.json | 123 - .../appshell/node/node_modules/for-in/LICENSE | 21 - .../node/node_modules/for-in/README.md | 74 - .../node/node_modules/for-in/index.js | 16 - .../node/node_modules/for-in/package.json | 119 - .../node/node_modules/for-own/LICENSE | 21 - .../node/node_modules/for-own/README.md | 52 - .../node/node_modules/for-own/index.js | 19 - .../node/node_modules/for-own/package.json | 120 - .../node/node_modules/fsevents/.npmignore | 1 - .../node/node_modules/fsevents/.travis.yml | 102 - .../node/node_modules/fsevents/LICENSE | 22 - .../node/node_modules/fsevents/Readme.md | 78 - .../node/node_modules/fsevents/binding.gyp | 29 - .../node_modules/fsevents/build/.target.mk | 49 - .../node/node_modules/fsevents/build/Makefile | 352 - .../build/action_after_build.target.mk | 32 - .../fsevents/build/binding.Makefile | 6 - .../node_modules/fsevents/build/fse.target.mk | 169 - .../node_modules/fsevents/build/gyp-mac-tool | 612 -- .../node/node_modules/fsevents/fsevents.cc | 102 - .../node/node_modules/fsevents/fsevents.js | 105 - .../Release/node-v11-darwin-x64/fse.node | Bin 33384 -> 0 bytes .../Release/node-v46-darwin-x64/fse.node | Bin 34672 -> 0 bytes .../Release/node-v47-darwin-x64/fse.node | Bin 34672 -> 0 bytes .../fsevents/node_modules/.bin/har-validator | 1 - .../fsevents/node_modules/.bin/mkdirp | 1 - .../fsevents/node_modules/.bin/node-pre-gyp | 1 - .../fsevents/node_modules/.bin/nopt | 1 - .../fsevents/node_modules/.bin/rc | 1 - .../fsevents/node_modules/.bin/rimraf | 1 - .../fsevents/node_modules/.bin/semver | 1 - .../fsevents/node_modules/.bin/sshpk-conv | 1 - .../fsevents/node_modules/.bin/sshpk-sign | 1 - .../fsevents/node_modules/.bin/sshpk-verify | 1 - .../node_modules/.bin/strip-json-comments | 1 - .../fsevents/node_modules/.bin/uuid | 1 - .../fsevents/node_modules/abbrev/LICENSE | 15 - .../fsevents/node_modules/abbrev/README.md | 23 - .../fsevents/node_modules/abbrev/abbrev.js | 62 - .../fsevents/node_modules/abbrev/package.json | 81 - .../fsevents/node_modules/ansi-regex/index.js | 4 - .../fsevents/node_modules/ansi-regex/license | 21 - .../node_modules/ansi-regex/package.json | 113 - .../node_modules/ansi-regex/readme.md | 31 - .../node_modules/ansi-styles/index.js | 65 - .../fsevents/node_modules/ansi-styles/license | 21 - .../node_modules/ansi-styles/package.json | 106 - .../node_modules/ansi-styles/readme.md | 86 - .../fsevents/node_modules/aproba/LICENSE | 14 - .../fsevents/node_modules/aproba/README.md | 59 - .../fsevents/node_modules/aproba/index.js | 62 - .../fsevents/node_modules/aproba/package.json | 88 - .../node_modules/are-we-there-yet/.npmignore | 5 - .../node_modules/are-we-there-yet/CHANGES.md | 19 - .../node_modules/are-we-there-yet/LICENSE | 5 - .../node_modules/are-we-there-yet/README.md | 194 - .../node_modules/are-we-there-yet/index.js | 4 - .../are-we-there-yet/package.json | 82 - .../are-we-there-yet/test/lib/test-event.js | 29 - .../are-we-there-yet/test/tracker.js | 57 - .../are-we-there-yet/test/trackergroup.js | 96 - .../are-we-there-yet/test/trackerstream.js | 51 - .../are-we-there-yet/tracker-base.js | 11 - .../are-we-there-yet/tracker-group.js | 107 - .../are-we-there-yet/tracker-stream.js | 35 - .../node_modules/are-we-there-yet/tracker.js | 30 - .../fsevents/node_modules/asn1/.npmignore | 2 - .../fsevents/node_modules/asn1/.travis.yml | 4 - .../fsevents/node_modules/asn1/LICENSE | 19 - .../fsevents/node_modules/asn1/README.md | 50 - .../node_modules/asn1/lib/ber/errors.js | 13 - .../node_modules/asn1/lib/ber/index.js | 27 - .../node_modules/asn1/lib/ber/reader.js | 261 - .../node_modules/asn1/lib/ber/types.js | 36 - .../node_modules/asn1/lib/ber/writer.js | 316 - .../fsevents/node_modules/asn1/lib/index.js | 20 - .../fsevents/node_modules/asn1/package.json | 90 - .../node_modules/asn1/tst/ber/reader.test.js | 208 - .../node_modules/asn1/tst/ber/writer.test.js | 370 - .../fsevents/node_modules/assert-plus/AUTHORS | 6 - .../node_modules/assert-plus/CHANGES.md | 8 - .../node_modules/assert-plus/README.md | 155 - .../node_modules/assert-plus/assert.js | 206 - .../node_modules/assert-plus/package.json | 107 - .../fsevents/node_modules/async/CHANGELOG.md | 125 - .../fsevents/node_modules/async/LICENSE | 19 - .../fsevents/node_modules/async/README.md | 1877 ----- .../fsevents/node_modules/async/dist/async.js | 1265 ---- .../node_modules/async/dist/async.min.js | 2 - .../fsevents/node_modules/async/lib/async.js | 1265 ---- .../fsevents/node_modules/async/package.json | 149 - .../fsevents/node_modules/aws-sign2/LICENSE | 55 - .../fsevents/node_modules/aws-sign2/README.md | 4 - .../fsevents/node_modules/aws-sign2/index.js | 212 - .../node_modules/aws-sign2/package.json | 73 - .../fsevents/node_modules/aws4/.npmignore | 4 - .../fsevents/node_modules/aws4/.tern-port | 1 - .../fsevents/node_modules/aws4/.travis.yml | 5 - .../fsevents/node_modules/aws4/LICENSE | 19 - .../fsevents/node_modules/aws4/README.md | 514 -- .../fsevents/node_modules/aws4/aws4.js | 318 - .../fsevents/node_modules/aws4/lru.js | 96 - .../fsevents/node_modules/aws4/package.json | 132 - .../node_modules/balanced-match/.npmignore | 5 - .../node_modules/balanced-match/LICENSE.md | 21 - .../node_modules/balanced-match/README.md | 91 - .../node_modules/balanced-match/index.js | 58 - .../node_modules/balanced-match/package.json | 102 - .../fsevents/node_modules/bl/.jshintrc | 59 - .../fsevents/node_modules/bl/.npmignore | 1 - .../fsevents/node_modules/bl/.travis.yml | 13 - .../fsevents/node_modules/bl/LICENSE.md | 13 - .../fsevents/node_modules/bl/README.md | 200 - .../fsevents/node_modules/bl/bl.js | 243 - .../node_modules/readable-stream/.npmignore | 5 - .../node_modules/readable-stream/.travis.yml | 52 - .../bl/node_modules/readable-stream/.zuul.yml | 1 - .../bl/node_modules/readable-stream/LICENSE | 18 - .../bl/node_modules/readable-stream/README.md | 36 - .../readable-stream/doc/stream.markdown | 1760 ----- .../doc/wg-meetings/2015-01-30.md | 60 - .../bl/node_modules/readable-stream/duplex.js | 1 - .../readable-stream/lib/_stream_duplex.js | 75 - .../lib/_stream_passthrough.js | 26 - .../readable-stream/lib/_stream_readable.js | 880 --- .../readable-stream/lib/_stream_transform.js | 180 - .../readable-stream/lib/_stream_writable.js | 516 -- .../node_modules/readable-stream/package.json | 105 - .../readable-stream/passthrough.js | 1 - .../node_modules/readable-stream/readable.js | 12 - .../node_modules/readable-stream/transform.js | 1 - .../node_modules/readable-stream/writable.js | 1 - .../fsevents/node_modules/bl/package.json | 96 - .../fsevents/node_modules/bl/test/test.js | 640 -- .../node_modules/block-stream/LICENCE | 25 - .../node_modules/block-stream/LICENSE | 15 - .../node_modules/block-stream/README.md | 14 - .../node_modules/block-stream/block-stream.js | 209 - .../node_modules/block-stream/package.json | 87 - .../fsevents/node_modules/boom/.npmignore | 18 - .../fsevents/node_modules/boom/.travis.yml | 8 - .../node_modules/boom/CONTRIBUTING.md | 1 - .../fsevents/node_modules/boom/LICENSE | 28 - .../fsevents/node_modules/boom/README.md | 652 -- .../node_modules/boom/images/boom.png | Bin 29479 -> 0 bytes .../fsevents/node_modules/boom/lib/index.js | 318 - .../fsevents/node_modules/boom/package.json | 90 - .../fsevents/node_modules/boom/test/index.js | 654 -- .../node_modules/brace-expansion/README.md | 122 - .../node_modules/brace-expansion/index.js | 191 - .../node_modules/brace-expansion/package.json | 104 - .../node_modules/buffer-shims/index.js | 108 - .../node_modules/buffer-shims/license.md | 19 - .../node_modules/buffer-shims/package.json | 77 - .../node_modules/buffer-shims/readme.md | 21 - .../fsevents/node_modules/caseless/LICENSE | 28 - .../fsevents/node_modules/caseless/README.md | 45 - .../fsevents/node_modules/caseless/index.js | 66 - .../node_modules/caseless/package.json | 88 - .../fsevents/node_modules/caseless/test.js | 40 - .../fsevents/node_modules/chalk/index.js | 116 - .../fsevents/node_modules/chalk/license | 21 - .../fsevents/node_modules/chalk/package.json | 132 - .../fsevents/node_modules/chalk/readme.md | 213 - .../node_modules/code-point-at/index.js | 33 - .../node_modules/code-point-at/license | 21 - .../node_modules/code-point-at/package.json | 96 - .../node_modules/code-point-at/readme.md | 34 - .../node_modules/combined-stream/License | 19 - .../node_modules/combined-stream/Readme.md | 138 - .../combined-stream/lib/combined_stream.js | 188 - .../node_modules/combined-stream/package.json | 93 - .../node_modules/commander/History.md | 261 - .../fsevents/node_modules/commander/LICENSE | 22 - .../fsevents/node_modules/commander/Readme.md | 351 - .../fsevents/node_modules/commander/index.js | 1110 --- .../node_modules/commander/package.json | 96 - .../node_modules/concat-map/.travis.yml | 4 - .../fsevents/node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/example/map.js | 6 - .../fsevents/node_modules/concat-map/index.js | 13 - .../node_modules/concat-map/package.json | 109 - .../node_modules/concat-map/test/map.js | 39 - .../console-control-strings/LICENSE | 13 - .../console-control-strings/README.md | 145 - .../console-control-strings/index.js | 125 - .../console-control-strings/package.json | 88 - .../node_modules/core-util-is/LICENSE | 19 - .../node_modules/core-util-is/README.md | 3 - .../node_modules/core-util-is/float.patch | 604 -- .../node_modules/core-util-is/lib/util.js | 107 - .../node_modules/core-util-is/package.json | 87 - .../node_modules/core-util-is/test.js | 68 - .../node_modules/cryptiles/.npmignore | 18 - .../node_modules/cryptiles/.travis.yml | 8 - .../fsevents/node_modules/cryptiles/LICENSE | 28 - .../fsevents/node_modules/cryptiles/README.md | 16 - .../node_modules/cryptiles/lib/index.js | 68 - .../node_modules/cryptiles/package.json | 86 - .../node_modules/cryptiles/test/index.js | 102 - .../fsevents/node_modules/dashdash/README.md | 574 -- .../dashdash/etc/dashdash.bash_completion.in | 388 - .../node_modules/dashdash/lib/dashdash.js | 1055 --- .../dashdash/node_modules/assert-plus/AUTHORS | 6 - .../node_modules/assert-plus/CHANGES.md | 14 - .../node_modules/assert-plus/README.md | 162 - .../node_modules/assert-plus/assert.js | 211 - .../node_modules/assert-plus/package.json | 107 - .../node_modules/dashdash/package.json | 116 - .../fsevents/node_modules/debug/.jshintrc | 3 - .../fsevents/node_modules/debug/.npmignore | 6 - .../fsevents/node_modules/debug/History.md | 195 - .../fsevents/node_modules/debug/Makefile | 36 - .../fsevents/node_modules/debug/Readme.md | 188 - .../fsevents/node_modules/debug/bower.json | 28 - .../fsevents/node_modules/debug/browser.js | 168 - .../node_modules/debug/component.json | 19 - .../fsevents/node_modules/debug/debug.js | 197 - .../fsevents/node_modules/debug/node.js | 209 - .../fsevents/node_modules/debug/package.json | 98 - .../node_modules/deep-extend/CHANGELOG.md | 21 - .../fsevents/node_modules/deep-extend/LICENSE | 20 - .../node_modules/deep-extend/README.md | 90 - .../node_modules/deep-extend/index.js | 1 - .../deep-extend/lib/deep-extend.js | 144 - .../node_modules/deep-extend/package.json | 112 - .../node_modules/delayed-stream/.npmignore | 1 - .../node_modules/delayed-stream/License | 19 - .../node_modules/delayed-stream/Makefile | 7 - .../node_modules/delayed-stream/Readme.md | 141 - .../delayed-stream/lib/delayed_stream.js | 107 - .../node_modules/delayed-stream/package.json | 89 - .../node_modules/delegates/.npmignore | 1 - .../node_modules/delegates/History.md | 22 - .../fsevents/node_modules/delegates/License | 20 - .../fsevents/node_modules/delegates/Makefile | 8 - .../fsevents/node_modules/delegates/Readme.md | 94 - .../fsevents/node_modules/delegates/index.js | 121 - .../node_modules/delegates/package.json | 76 - .../node_modules/delegates/test/index.js | 94 - .../fsevents/node_modules/ecc-jsbn/.npmignore | 15 - .../fsevents/node_modules/ecc-jsbn/LICENSE | 21 - .../fsevents/node_modules/ecc-jsbn/README.md | 8 - .../fsevents/node_modules/ecc-jsbn/index.js | 57 - .../node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 - .../fsevents/node_modules/ecc-jsbn/lib/ec.js | 561 -- .../fsevents/node_modules/ecc-jsbn/lib/sec.js | 170 - .../node_modules/ecc-jsbn/package.json | 82 - .../fsevents/node_modules/ecc-jsbn/test.js | 14 - .../escape-string-regexp/index.js | 11 - .../node_modules/escape-string-regexp/license | 21 - .../escape-string-regexp/package.json | 101 - .../escape-string-regexp/readme.md | 27 - .../fsevents/node_modules/extend/.eslintrc | 192 - .../fsevents/node_modules/extend/.jscs.json | 104 - .../fsevents/node_modules/extend/.npmignore | 1 - .../fsevents/node_modules/extend/.travis.yml | 44 - .../fsevents/node_modules/extend/CHANGELOG.md | 69 - .../fsevents/node_modules/extend/LICENSE | 23 - .../fsevents/node_modules/extend/README.md | 62 - .../node_modules/extend/component.json | 32 - .../fsevents/node_modules/extend/index.js | 86 - .../fsevents/node_modules/extend/package.json | 98 - .../node_modules/extsprintf/.gitmodules | 6 - .../fsevents/node_modules/extsprintf/LICENSE | 19 - .../fsevents/node_modules/extsprintf/Makefile | 23 - .../node_modules/extsprintf/Makefile.deps | 39 - .../node_modules/extsprintf/Makefile.targ | 285 - .../node_modules/extsprintf/README.md | 39 - .../extsprintf/examples/simple.js | 2 - .../node_modules/extsprintf/jsl.node.conf | 137 - .../node_modules/extsprintf/lib/extsprintf.js | 166 - .../node_modules/extsprintf/package.json | 66 - .../node_modules/forever-agent/LICENSE | 55 - .../node_modules/forever-agent/README.md | 4 - .../node_modules/forever-agent/index.js | 138 - .../node_modules/forever-agent/package.json | 80 - .../node_modules/form-data/.dockerignore | 7 - .../node_modules/form-data/.editorconfig | 10 - .../node_modules/form-data/.eslintignore | 1 - .../fsevents/node_modules/form-data/.eslintrc | 64 - .../fsevents/node_modules/form-data/License | 19 - .../fsevents/node_modules/form-data/README.md | 218 - .../node_modules/form-data/lib/browser.js | 2 - .../node_modules/form-data/lib/form_data.js | 411 - .../node_modules/form-data/lib/populate.js | 9 - .../node_modules/form-data/package.json | 129 - .../node_modules/form-data/wercker.yml | 36 - .../fsevents/node_modules/fs.realpath/LICENSE | 43 - .../node_modules/fs.realpath/README.md | 33 - .../node_modules/fs.realpath/index.js | 66 - .../fsevents/node_modules/fs.realpath/old.js | 303 - .../node_modules/fs.realpath/package.json | 86 - .../node_modules/fstream-ignore/LICENSE | 15 - .../node_modules/fstream-ignore/README.md | 22 - .../node_modules/fstream-ignore/ignore.js | 275 - .../node_modules/fstream-ignore/package.json | 96 - .../fsevents/node_modules/fstream/.npmignore | 5 - .../fsevents/node_modules/fstream/.travis.yml | 9 - .../fsevents/node_modules/fstream/LICENSE | 15 - .../fsevents/node_modules/fstream/README.md | 76 - .../fstream/examples/filter-pipe.js | 134 - .../node_modules/fstream/examples/pipe.js | 118 - .../node_modules/fstream/examples/reader.js | 68 - .../fstream/examples/symlink-write.js | 27 - .../fsevents/node_modules/fstream/fstream.js | 35 - .../node_modules/fstream/lib/abstract.js | 85 - .../node_modules/fstream/lib/collect.js | 70 - .../node_modules/fstream/lib/dir-reader.js | 252 - .../node_modules/fstream/lib/dir-writer.js | 174 - .../node_modules/fstream/lib/file-reader.js | 150 - .../node_modules/fstream/lib/file-writer.js | 107 - .../node_modules/fstream/lib/get-type.js | 33 - .../node_modules/fstream/lib/link-reader.js | 53 - .../node_modules/fstream/lib/link-writer.js | 95 - .../node_modules/fstream/lib/proxy-reader.js | 95 - .../node_modules/fstream/lib/proxy-writer.js | 111 - .../node_modules/fstream/lib/reader.js | 255 - .../node_modules/fstream/lib/socket-reader.js | 36 - .../node_modules/fstream/lib/writer.js | 390 - .../node_modules/fstream/package.json | 102 - .../fsevents/node_modules/gauge/CHANGELOG.md | 131 - .../fsevents/node_modules/gauge/LICENSE | 13 - .../fsevents/node_modules/gauge/README.md | 395 - .../fsevents/node_modules/gauge/base-theme.js | 14 - .../fsevents/node_modules/gauge/error.js | 24 - .../fsevents/node_modules/gauge/has-color.js | 12 - .../fsevents/node_modules/gauge/index.js | 226 - .../fsevents/node_modules/gauge/package.json | 118 - .../fsevents/node_modules/gauge/plumbing.js | 47 - .../fsevents/node_modules/gauge/process.js | 3 - .../node_modules/gauge/progress-bar.js | 35 - .../node_modules/gauge/render-template.js | 181 - .../node_modules/gauge/set-immediate.js | 7 - .../node_modules/gauge/set-interval.js | 3 - .../fsevents/node_modules/gauge/spin.js | 5 - .../node_modules/gauge/template-item.js | 73 - .../fsevents/node_modules/gauge/theme-set.js | 115 - .../fsevents/node_modules/gauge/themes.js | 54 - .../node_modules/gauge/wide-truncate.js | 25 - .../node_modules/generate-function/.npmignore | 1 - .../generate-function/.travis.yml | 3 - .../node_modules/generate-function/README.md | 72 - .../node_modules/generate-function/example.js | 27 - .../node_modules/generate-function/index.js | 61 - .../generate-function/package.json | 79 - .../node_modules/generate-function/test.js | 33 - .../generate-object-property/.npmignore | 1 - .../generate-object-property/.travis.yml | 3 - .../generate-object-property/LICENSE | 21 - .../generate-object-property/README.md | 19 - .../generate-object-property/index.js | 12 - .../generate-object-property/package.json | 76 - .../generate-object-property/test.js | 12 - .../fsevents/node_modules/getpass/.npmignore | 8 - .../fsevents/node_modules/getpass/.travis.yml | 9 - .../fsevents/node_modules/getpass/LICENSE | 18 - .../fsevents/node_modules/getpass/README.md | 32 - .../node_modules/getpass/lib/index.js | 123 - .../getpass/node_modules/assert-plus/AUTHORS | 6 - .../node_modules/assert-plus/CHANGES.md | 14 - .../node_modules/assert-plus/README.md | 162 - .../node_modules/assert-plus/assert.js | 211 - .../node_modules/assert-plus/package.json | 107 - .../node_modules/getpass/package.json | 82 - .../fsevents/node_modules/glob/LICENSE | 15 - .../fsevents/node_modules/glob/README.md | 365 - .../fsevents/node_modules/glob/changelog.md | 67 - .../fsevents/node_modules/glob/common.js | 235 - .../fsevents/node_modules/glob/glob.js | 783 -- .../fsevents/node_modules/glob/package.json | 103 - .../fsevents/node_modules/glob/sync.js | 468 -- .../fsevents/node_modules/graceful-fs/LICENSE | 15 - .../node_modules/graceful-fs/README.md | 133 - .../fsevents/node_modules/graceful-fs/fs.js | 21 - .../node_modules/graceful-fs/graceful-fs.js | 253 - .../graceful-fs/legacy-streams.js | 118 - .../node_modules/graceful-fs/package.json | 103 - .../node_modules/graceful-fs/polyfills.js | 252 - .../node_modules/graceful-readlink/.npmignore | 3 - .../graceful-readlink/.travis.yml | 5 - .../node_modules/graceful-readlink/LICENSE | 22 - .../node_modules/graceful-readlink/README.md | 17 - .../node_modules/graceful-readlink/index.js | 12 - .../graceful-readlink/package.json | 75 - .../node_modules/har-validator/LICENSE | 13 - .../node_modules/har-validator/README.md | 309 - .../har-validator/bin/har-validator | 56 - .../node_modules/har-validator/lib/async.js | 14 - .../node_modules/har-validator/lib/error.js | 10 - .../node_modules/har-validator/lib/index.js | 22 - .../node_modules/har-validator/lib/runner.js | 29 - .../har-validator/lib/schemas/cache.json | 13 - .../har-validator/lib/schemas/cacheEntry.json | 31 - .../har-validator/lib/schemas/content.json | 27 - .../har-validator/lib/schemas/cookie.json | 34 - .../har-validator/lib/schemas/creator.json | 18 - .../har-validator/lib/schemas/entry.json | 51 - .../har-validator/lib/schemas/har.json | 11 - .../har-validator/lib/schemas/index.js | 49 - .../har-validator/lib/schemas/log.json | 34 - .../har-validator/lib/schemas/page.json | 30 - .../lib/schemas/pageTimings.json | 16 - .../har-validator/lib/schemas/postData.json | 41 - .../har-validator/lib/schemas/record.json | 18 - .../har-validator/lib/schemas/request.json | 55 - .../har-validator/lib/schemas/response.json | 52 - .../har-validator/lib/schemas/timings.json | 40 - .../node_modules/har-validator/package.json | 112 - .../fsevents/node_modules/has-ansi/index.js | 4 - .../fsevents/node_modules/has-ansi/license | 21 - .../node_modules/has-ansi/package.json | 110 - .../fsevents/node_modules/has-ansi/readme.md | 36 - .../fsevents/node_modules/has-color/index.js | 32 - .../node_modules/has-color/package.json | 97 - .../fsevents/node_modules/has-color/readme.md | 30 - .../fsevents/node_modules/has-unicode/LICENSE | 14 - .../node_modules/has-unicode/README.md | 43 - .../node_modules/has-unicode/index.js | 16 - .../node_modules/has-unicode/package.json | 86 - .../fsevents/node_modules/hawk/.npmignore | 20 - .../fsevents/node_modules/hawk/.travis.yml | 5 - .../fsevents/node_modules/hawk/LICENSE | 28 - .../fsevents/node_modules/hawk/README.md | 634 -- .../fsevents/node_modules/hawk/bower.json | 24 - .../fsevents/node_modules/hawk/component.json | 19 - .../fsevents/node_modules/hawk/dist/client.js | 343 - .../node_modules/hawk/example/usage.js | 78 - .../node_modules/hawk/images/hawk.png | Bin 6945 -> 0 bytes .../node_modules/hawk/images/logo.png | Bin 71732 -> 0 bytes .../fsevents/node_modules/hawk/lib/browser.js | 637 -- .../fsevents/node_modules/hawk/lib/client.js | 369 - .../fsevents/node_modules/hawk/lib/crypto.js | 126 - .../fsevents/node_modules/hawk/lib/index.js | 15 - .../fsevents/node_modules/hawk/lib/server.js | 548 -- .../fsevents/node_modules/hawk/lib/utils.js | 184 - .../fsevents/node_modules/hawk/package.json | 93 - .../node_modules/hawk/test/browser.js | 1492 ---- .../fsevents/node_modules/hawk/test/client.js | 440 -- .../fsevents/node_modules/hawk/test/crypto.js | 70 - .../fsevents/node_modules/hawk/test/index.js | 378 - .../fsevents/node_modules/hawk/test/readme.js | 95 - .../fsevents/node_modules/hawk/test/server.js | 1329 ---- .../fsevents/node_modules/hawk/test/uri.js | 838 --- .../fsevents/node_modules/hawk/test/utils.js | 149 - .../fsevents/node_modules/hoek/.npmignore | 18 - .../fsevents/node_modules/hoek/.travis.yml | 7 - .../node_modules/hoek/CONTRIBUTING.md | 1 - .../fsevents/node_modules/hoek/LICENSE | 31 - .../fsevents/node_modules/hoek/README.md | 584 -- .../node_modules/hoek/images/hoek.png | Bin 37939 -> 0 bytes .../fsevents/node_modules/hoek/lib/escape.js | 132 - .../fsevents/node_modules/hoek/lib/index.js | 993 --- .../fsevents/node_modules/hoek/package.json | 88 - .../node_modules/hoek/test/escaper.js | 88 - .../fsevents/node_modules/hoek/test/index.js | 2513 ------- .../node_modules/hoek/test/modules/ignore.txt | 0 .../node_modules/hoek/test/modules/test1.js | 1 - .../node_modules/hoek/test/modules/test2.js | 1 - .../node_modules/hoek/test/modules/test3.js | 1 - .../http-signature/.dir-locals.el | 6 - .../node_modules/http-signature/.npmignore | 7 - .../node_modules/http-signature/CHANGES.md | 46 - .../node_modules/http-signature/LICENSE | 18 - .../node_modules/http-signature/README.md | 79 - .../http-signature/http_signing.md | 363 - .../node_modules/http-signature/lib/index.js | 29 - .../node_modules/http-signature/lib/parser.js | 318 - .../node_modules/http-signature/lib/signer.js | 399 - .../node_modules/http-signature/lib/utils.js | 112 - .../node_modules/http-signature/lib/verify.js | 88 - .../node_modules/http-signature/package.json | 108 - .../fsevents/node_modules/inflight/LICENSE | 15 - .../fsevents/node_modules/inflight/README.md | 37 - .../node_modules/inflight/inflight.js | 44 - .../node_modules/inflight/package.json | 97 - .../fsevents/node_modules/inherits/LICENSE | 16 - .../fsevents/node_modules/inherits/README.md | 42 - .../node_modules/inherits/inherits.js | 1 - .../node_modules/inherits/inherits_browser.js | 23 - .../node_modules/inherits/package.json | 83 - .../fsevents/node_modules/inherits/test.js | 25 - .../fsevents/node_modules/ini/LICENSE | 15 - .../fsevents/node_modules/ini/README.md | 102 - .../fsevents/node_modules/ini/ini.js | 190 - .../fsevents/node_modules/ini/package.json | 81 - .../is-fullwidth-code-point/index.js | 46 - .../is-fullwidth-code-point/license | 21 - .../is-fullwidth-code-point/package.json | 100 - .../is-fullwidth-code-point/readme.md | 39 - .../node_modules/is-my-json-valid/.npmignore | 2 - .../node_modules/is-my-json-valid/.travis.yml | 3 - .../node_modules/is-my-json-valid/LICENSE | 21 - .../node_modules/is-my-json-valid/README.md | 173 - .../node_modules/is-my-json-valid/example.js | 18 - .../node_modules/is-my-json-valid/formats.js | 14 - .../node_modules/is-my-json-valid/index.js | 584 -- .../is-my-json-valid/package.json | 100 - .../node_modules/is-my-json-valid/require.js | 12 - .../is-my-json-valid/test/fixtures/cosmic.js | 84 - .../json-schema-draft4/additionalItems.json | 82 - .../additionalProperties.json | 88 - .../test/json-schema-draft4/allOf.json | 112 - .../test/json-schema-draft4/anyOf.json | 68 - .../test/json-schema-draft4/bignum.json | 107 - .../test/json-schema-draft4/default.json | 49 - .../test/json-schema-draft4/definitions.json | 32 - .../test/json-schema-draft4/dependencies.json | 113 - .../test/json-schema-draft4/enum.json | 72 - .../test/json-schema-draft4/format.json | 143 - .../test/json-schema-draft4/items.json | 46 - .../test/json-schema-draft4/maxItems.json | 28 - .../test/json-schema-draft4/maxLength.json | 28 - .../json-schema-draft4/maxProperties.json | 28 - .../test/json-schema-draft4/maximum.json | 42 - .../test/json-schema-draft4/minItems.json | 28 - .../test/json-schema-draft4/minLength.json | 28 - .../json-schema-draft4/minProperties.json | 28 - .../test/json-schema-draft4/minimum.json | 42 - .../test/json-schema-draft4/multipleOf.json | 96 - .../test/json-schema-draft4/not.json | 96 - .../json-schema-draft4/nullAndFormat.json | 18 - .../json-schema-draft4/nullAndObject.json | 18 - .../test/json-schema-draft4/oneOf.json | 68 - .../test/json-schema-draft4/pattern.json | 23 - .../json-schema-draft4/patternProperties.json | 110 - .../test/json-schema-draft4/properties.json | 92 - .../test/json-schema-draft4/ref.json | 128 - .../test/json-schema-draft4/refRemote.json | 74 - .../test/json-schema-draft4/required.json | 39 - .../test/json-schema-draft4/type.json | 330 - .../test/json-schema-draft4/uniqueItems.json | 79 - .../is-my-json-valid/test/json-schema.js | 23 - .../is-my-json-valid/test/misc.js | 447 -- .../node_modules/is-property/.npmignore | 17 - .../fsevents/node_modules/is-property/LICENSE | 22 - .../node_modules/is-property/README.md | 28 - .../node_modules/is-property/is-property.js | 5 - .../node_modules/is-property/package.json | 84 - .../node_modules/is-typedarray/LICENSE.md | 18 - .../node_modules/is-typedarray/README.md | 16 - .../node_modules/is-typedarray/index.js | 41 - .../node_modules/is-typedarray/package.json | 82 - .../node_modules/is-typedarray/test.js | 34 - .../fsevents/node_modules/isarray/.npmignore | 1 - .../fsevents/node_modules/isarray/.travis.yml | 4 - .../fsevents/node_modules/isarray/Makefile | 6 - .../fsevents/node_modules/isarray/README.md | 60 - .../node_modules/isarray/component.json | 19 - .../fsevents/node_modules/isarray/index.js | 5 - .../node_modules/isarray/package.json | 97 - .../fsevents/node_modules/isarray/test.js | 20 - .../fsevents/node_modules/isstream/.jshintrc | 59 - .../fsevents/node_modules/isstream/.npmignore | 1 - .../node_modules/isstream/.travis.yml | 12 - .../fsevents/node_modules/isstream/LICENSE.md | 11 - .../fsevents/node_modules/isstream/README.md | 66 - .../node_modules/isstream/isstream.js | 27 - .../node_modules/isstream/package.json | 85 - .../fsevents/node_modules/isstream/test.js | 168 - .../node_modules/jodid25519/.npmignore | 11 - .../node_modules/jodid25519/.travis.yml | 7 - .../node_modules/jodid25519/AUTHORS.md | 3 - .../fsevents/node_modules/jodid25519/LICENSE | 23 - .../node_modules/jodid25519/README.md | 51 - .../fsevents/node_modules/jodid25519/almond.0 | 42 - .../fsevents/node_modules/jodid25519/almond.1 | 13 - .../fsevents/node_modules/jodid25519/index.js | 35 - .../node_modules/jodid25519/jsdoc.json | 19 - .../node_modules/jodid25519/lib/core.js | 481 -- .../node_modules/jodid25519/lib/curve255.js | 221 - .../node_modules/jodid25519/lib/dh.js | 111 - .../node_modules/jodid25519/lib/eddsa.js | 573 -- .../node_modules/jodid25519/lib/utils.js | 198 - .../node_modules/jodid25519/package.json | 96 - .../fsevents/node_modules/jsbn/.npmignore | 2 - .../fsevents/node_modules/jsbn/LICENSE | 40 - .../fsevents/node_modules/jsbn/README.md | 175 - .../fsevents/node_modules/jsbn/example.html | 12 - .../fsevents/node_modules/jsbn/example.js | 3 - .../fsevents/node_modules/jsbn/index.js | 1358 ---- .../fsevents/node_modules/jsbn/package.json | 79 - .../node_modules/json-schema/README.md | 5 - .../json-schema/draft-00/hyper-schema | 68 - .../json-schema/draft-00/json-ref | 26 - .../node_modules/json-schema/draft-00/links | 33 - .../node_modules/json-schema/draft-00/schema | 155 - .../json-schema/draft-01/hyper-schema | 68 - .../json-schema/draft-01/json-ref | 26 - .../node_modules/json-schema/draft-01/links | 33 - .../node_modules/json-schema/draft-01/schema | 155 - .../json-schema/draft-02/hyper-schema | 68 - .../json-schema/draft-02/json-ref | 26 - .../node_modules/json-schema/draft-02/links | 35 - .../node_modules/json-schema/draft-02/schema | 166 - .../json-schema/draft-03/examples/address | 20 - .../json-schema/draft-03/examples/calendar | 53 - .../json-schema/draft-03/examples/card | 105 - .../json-schema/draft-03/examples/geo | 8 - .../json-schema/draft-03/examples/interfaces | 23 - .../json-schema/draft-03/hyper-schema | 60 - .../json-schema/draft-03/json-ref | 26 - .../node_modules/json-schema/draft-03/links | 35 - .../node_modules/json-schema/draft-03/schema | 174 - .../json-schema/draft-04/hyper-schema | 60 - .../node_modules/json-schema/draft-04/links | 41 - .../node_modules/json-schema/draft-04/schema | 189 - .../json-schema/draft-zyp-json-schema-03.xml | 1120 --- .../json-schema/draft-zyp-json-schema-04.xml | 1072 --- .../node_modules/json-schema/lib/links.js | 52 - .../node_modules/json-schema/lib/validate.js | 260 - .../node_modules/json-schema/package.json | 86 - .../node_modules/json-schema/test/tests.js | 95 - .../json-stringify-safe/.npmignore | 1 - .../json-stringify-safe/CHANGELOG.md | 14 - .../node_modules/json-stringify-safe/LICENSE | 15 - .../node_modules/json-stringify-safe/Makefile | 35 - .../json-stringify-safe/README.md | 52 - .../json-stringify-safe/package.json | 94 - .../json-stringify-safe/stringify.js | 27 - .../json-stringify-safe/test/mocha.opts | 2 - .../test/stringify_test.js | 246 - .../node_modules/jsonpointer/.travis.yml | 10 - .../node_modules/jsonpointer/README.md | 32 - .../node_modules/jsonpointer/jsonpointer.js | 76 - .../node_modules/jsonpointer/package.json | 91 - .../fsevents/node_modules/jsonpointer/test.js | 98 - .../fsevents/node_modules/jsprim/CHANGES.md | 35 - .../fsevents/node_modules/jsprim/LICENSE | 19 - .../fsevents/node_modules/jsprim/README.md | 237 - .../node_modules/jsprim/lib/jsprim.js | 488 -- .../fsevents/node_modules/jsprim/package.json | 77 - .../fsevents/node_modules/mime-db/HISTORY.md | 341 - .../fsevents/node_modules/mime-db/LICENSE | 22 - .../fsevents/node_modules/mime-db/README.md | 82 - .../fsevents/node_modules/mime-db/db.json | 6627 ----------------- .../fsevents/node_modules/mime-db/index.js | 11 - .../node_modules/mime-db/package.json | 125 - .../node_modules/mime-types/HISTORY.md | 197 - .../fsevents/node_modules/mime-types/LICENSE | 23 - .../node_modules/mime-types/README.md | 103 - .../fsevents/node_modules/mime-types/index.js | 188 - .../node_modules/mime-types/package.json | 115 - .../fsevents/node_modules/minimatch/LICENSE | 15 - .../fsevents/node_modules/minimatch/README.md | 209 - .../node_modules/minimatch/minimatch.js | 924 --- .../node_modules/minimatch/package.json | 90 - .../node_modules/minimist/.travis.yml | 4 - .../fsevents/node_modules/minimist/LICENSE | 18 - .../node_modules/minimist/example/parse.js | 2 - .../fsevents/node_modules/minimist/index.js | 187 - .../node_modules/minimist/package.json | 93 - .../node_modules/minimist/readme.markdown | 73 - .../node_modules/minimist/test/dash.js | 24 - .../minimist/test/default_bool.js | 20 - .../node_modules/minimist/test/dotted.js | 16 - .../node_modules/minimist/test/long.js | 31 - .../node_modules/minimist/test/parse.js | 318 - .../minimist/test/parse_modified.js | 9 - .../node_modules/minimist/test/short.js | 67 - .../node_modules/minimist/test/whitespace.js | 8 - .../fsevents/node_modules/mkdirp/.travis.yml | 8 - .../fsevents/node_modules/mkdirp/LICENSE | 21 - .../fsevents/node_modules/mkdirp/bin/cmd.js | 33 - .../node_modules/mkdirp/bin/usage.txt | 12 - .../node_modules/mkdirp/examples/pow.js | 6 - .../fsevents/node_modules/mkdirp/index.js | 98 - .../fsevents/node_modules/mkdirp/package.json | 86 - .../node_modules/mkdirp/readme.markdown | 100 - .../node_modules/mkdirp/test/chmod.js | 41 - .../node_modules/mkdirp/test/clobber.js | 38 - .../node_modules/mkdirp/test/mkdirp.js | 28 - .../node_modules/mkdirp/test/opts_fs.js | 29 - .../node_modules/mkdirp/test/opts_fs_sync.js | 27 - .../fsevents/node_modules/mkdirp/test/perm.js | 32 - .../node_modules/mkdirp/test/perm_sync.js | 36 - .../fsevents/node_modules/mkdirp/test/race.js | 37 - .../fsevents/node_modules/mkdirp/test/rel.js | 32 - .../node_modules/mkdirp/test/return.js | 25 - .../node_modules/mkdirp/test/return_sync.js | 24 - .../fsevents/node_modules/mkdirp/test/root.js | 19 - .../fsevents/node_modules/mkdirp/test/sync.js | 32 - .../node_modules/mkdirp/test/umask.js | 28 - .../node_modules/mkdirp/test/umask_sync.js | 32 - .../fsevents/node_modules/ms/.npmignore | 5 - .../fsevents/node_modules/ms/History.md | 66 - .../fsevents/node_modules/ms/LICENSE | 20 - .../fsevents/node_modules/ms/README.md | 35 - .../fsevents/node_modules/ms/index.js | 125 - .../fsevents/node_modules/ms/package.json | 74 - .../node_modules/node-pre-gyp/CHANGELOG.md | 323 - .../node_modules/node-pre-gyp/LICENSE | 27 - .../node_modules/node-pre-gyp/appveyor.yml | 30 - .../node-pre-gyp/bin/node-pre-gyp | 131 - .../node-pre-gyp/bin/node-pre-gyp.cmd | 2 - .../node_modules/node-pre-gyp/lib/build.js | 43 - .../node_modules/node-pre-gyp/lib/clean.js | 23 - .../node-pre-gyp/lib/configure.js | 48 - .../node_modules/node-pre-gyp/lib/info.js | 40 - .../node_modules/node-pre-gyp/lib/install.js | 215 - .../node-pre-gyp/lib/node-pre-gyp.js | 192 - .../node_modules/node-pre-gyp/lib/package.js | 46 - .../node-pre-gyp/lib/pre-binding.js | 25 - .../node_modules/node-pre-gyp/lib/publish.js | 77 - .../node_modules/node-pre-gyp/lib/rebuild.js | 13 - .../node-pre-gyp/lib/reinstall.js | 13 - .../node_modules/node-pre-gyp/lib/reveal.js | 31 - .../node-pre-gyp/lib/testbinary.js | 73 - .../node-pre-gyp/lib/testpackage.js | 49 - .../node-pre-gyp/lib/unpublish.js | 41 - .../node-pre-gyp/lib/util/abi_crosswalk.json | 1274 ---- .../node-pre-gyp/lib/util/compile.js | 87 - .../node-pre-gyp/lib/util/handle_gyp_opts.js | 94 - .../lib/util/nw-pre-gyp/index.html | 26 - .../lib/util/nw-pre-gyp/package.json | 9 - .../node-pre-gyp/lib/util/s3_setup.js | 27 - .../node-pre-gyp/lib/util/versioning.js | 308 - .../node_modules/node-pre-gyp/package.json | 129 - .../node_modules/node-uuid/.npmignore | 4 - .../node_modules/node-uuid/LICENSE.md | 21 - .../fsevents/node_modules/node-uuid/README.md | 254 - .../node-uuid/benchmark/README.md | 53 - .../node-uuid/benchmark/bench.gnu | 174 - .../node_modules/node-uuid/benchmark/bench.sh | 34 - .../node-uuid/benchmark/benchmark-native.c | 34 - .../node-uuid/benchmark/benchmark.js | 84 - .../fsevents/node_modules/node-uuid/bin/uuid | 26 - .../node_modules/node-uuid/bower.json | 23 - .../node_modules/node-uuid/component.json | 25 - .../node_modules/node-uuid/package.json | 105 - .../node_modules/node-uuid/test/compare_v1.js | 63 - .../node_modules/node-uuid/test/test.html | 17 - .../node_modules/node-uuid/test/test.js | 231 - .../fsevents/node_modules/node-uuid/uuid.js | 272 - .../fsevents/node_modules/nopt/.npmignore | 1 - .../fsevents/node_modules/nopt/.travis.yml | 9 - .../fsevents/node_modules/nopt/LICENSE | 15 - .../fsevents/node_modules/nopt/README.md | 211 - .../fsevents/node_modules/nopt/bin/nopt.js | 54 - .../node_modules/nopt/examples/my-program.js | 30 - .../fsevents/node_modules/nopt/lib/nopt.js | 415 -- .../fsevents/node_modules/nopt/package.json | 88 - .../fsevents/node_modules/nopt/test/basic.js | 273 - .../fsevents/node_modules/npmlog/CHANGELOG.md | 36 - .../fsevents/node_modules/npmlog/LICENSE | 15 - .../fsevents/node_modules/npmlog/README.md | 210 - .../fsevents/node_modules/npmlog/log.js | 298 - .../fsevents/node_modules/npmlog/package.json | 100 - .../node_modules/number-is-nan/index.js | 4 - .../node_modules/number-is-nan/license | 21 - .../node_modules/number-is-nan/package.json | 94 - .../node_modules/number-is-nan/readme.md | 30 - .../fsevents/node_modules/oauth-sign/LICENSE | 55 - .../node_modules/oauth-sign/README.md | 4 - .../fsevents/node_modules/oauth-sign/index.js | 136 - .../node_modules/oauth-sign/package.json | 90 - .../node_modules/object-assign/index.js | 83 - .../node_modules/object-assign/license | 21 - .../node_modules/object-assign/package.json | 106 - .../node_modules/object-assign/readme.md | 56 - .../fsevents/node_modules/once/LICENSE | 15 - .../fsevents/node_modules/once/README.md | 51 - .../fsevents/node_modules/once/once.js | 21 - .../fsevents/node_modules/once/package.json | 90 - .../node_modules/path-is-absolute/index.js | 20 - .../node_modules/path-is-absolute/license | 21 - .../path-is-absolute/package.json | 97 - .../node_modules/path-is-absolute/readme.md | 51 - .../node_modules/pinkie-promise/index.js | 3 - .../node_modules/pinkie-promise/license | 21 - .../node_modules/pinkie-promise/package.json | 94 - .../node_modules/pinkie-promise/readme.md | 28 - .../fsevents/node_modules/pinkie/index.js | 292 - .../fsevents/node_modules/pinkie/license | 21 - .../fsevents/node_modules/pinkie/package.json | 92 - .../fsevents/node_modules/pinkie/readme.md | 83 - .../process-nextick-args/.travis.yml | 12 - .../process-nextick-args/index.js | 43 - .../process-nextick-args/license.md | 19 - .../process-nextick-args/package.json | 76 - .../process-nextick-args/readme.md | 18 - .../node_modules/process-nextick-args/test.js | 24 - .../fsevents/node_modules/qs/.eslintignore | 1 - .../fsevents/node_modules/qs/.eslintrc | 19 - .../fsevents/node_modules/qs/.jscs.json | 176 - .../fsevents/node_modules/qs/CHANGELOG.md | 120 - .../fsevents/node_modules/qs/CONTRIBUTING.md | 1 - .../fsevents/node_modules/qs/LICENSE | 28 - .../fsevents/node_modules/qs/dist/qs.js | 487 -- .../fsevents/node_modules/qs/lib/index.js | 9 - .../fsevents/node_modules/qs/lib/parse.js | 167 - .../fsevents/node_modules/qs/lib/stringify.js | 137 - .../fsevents/node_modules/qs/lib/utils.js | 164 - .../fsevents/node_modules/qs/package.json | 111 - .../fsevents/node_modules/qs/test/index.js | 5 - .../fsevents/node_modules/qs/test/parse.js | 423 -- .../node_modules/qs/test/stringify.js | 305 - .../fsevents/node_modules/qs/test/utils.js | 9 - .../fsevents/node_modules/rc/.npmignore | 3 - .../fsevents/node_modules/rc/LICENSE.APACHE2 | 15 - .../fsevents/node_modules/rc/LICENSE.BSD | 26 - .../fsevents/node_modules/rc/LICENSE.MIT | 24 - .../fsevents/node_modules/rc/README.md | 149 - .../fsevents/node_modules/rc/browser.js | 7 - .../fsevents/node_modules/rc/index.js | 60 - .../fsevents/node_modules/rc/lib/utils.js | 103 - .../rc/node_modules/minimist/.travis.yml | 8 - .../rc/node_modules/minimist/LICENSE | 18 - .../rc/node_modules/minimist/example/parse.js | 2 - .../rc/node_modules/minimist/index.js | 236 - .../rc/node_modules/minimist/package.json | 97 - .../rc/node_modules/minimist/readme.markdown | 91 - .../rc/node_modules/minimist/test/all_bool.js | 32 - .../rc/node_modules/minimist/test/bool.js | 166 - .../rc/node_modules/minimist/test/dash.js | 31 - .../minimist/test/default_bool.js | 35 - .../rc/node_modules/minimist/test/dotted.js | 22 - .../rc/node_modules/minimist/test/kv_short.js | 16 - .../rc/node_modules/minimist/test/long.js | 31 - .../rc/node_modules/minimist/test/num.js | 36 - .../rc/node_modules/minimist/test/parse.js | 197 - .../minimist/test/parse_modified.js | 9 - .../rc/node_modules/minimist/test/short.js | 67 - .../node_modules/minimist/test/stop_early.js | 15 - .../rc/node_modules/minimist/test/unknown.js | 102 - .../node_modules/minimist/test/whitespace.js | 8 - .../fsevents/node_modules/rc/package.json | 88 - .../fsevents/node_modules/rc/test/ini.js | 16 - .../node_modules/rc/test/nested-env-vars.js | 40 - .../fsevents/node_modules/rc/test/test.js | 59 - .../node_modules/readable-stream/.npmignore | 8 - .../node_modules/readable-stream/.travis.yml | 54 - .../node_modules/readable-stream/LICENSE | 18 - .../node_modules/readable-stream/README.md | 36 - .../readable-stream/doc/stream.md | 1772 ----- .../doc/wg-meetings/2015-01-30.md | 60 - .../node_modules/readable-stream/duplex.js | 1 - .../readable-stream/lib/_stream_duplex.js | 75 - .../lib/_stream_passthrough.js | 26 - .../readable-stream/lib/_stream_readable.js | 893 --- .../readable-stream/lib/_stream_transform.js | 180 - .../readable-stream/lib/_stream_writable.js | 526 -- .../node_modules/readable-stream/package.json | 118 - .../readable-stream/passthrough.js | 1 - .../node_modules/readable-stream/readable.js | 16 - .../node_modules/readable-stream/transform.js | 1 - .../node_modules/readable-stream/writable.js | 1 - .../fsevents/node_modules/request/.eslintrc | 45 - .../fsevents/node_modules/request/.npmignore | 6 - .../fsevents/node_modules/request/.travis.yml | 21 - .../node_modules/request/CHANGELOG.md | 631 -- .../node_modules/request/CONTRIBUTING.md | 81 - .../fsevents/node_modules/request/LICENSE | 55 - .../fsevents/node_modules/request/README.md | 1097 --- .../fsevents/node_modules/request/codecov.yml | 2 - .../fsevents/node_modules/request/index.js | 157 - .../fsevents/node_modules/request/lib/auth.js | 168 - .../node_modules/request/lib/cookies.js | 39 - .../request/lib/getProxyFromURI.js | 79 - .../fsevents/node_modules/request/lib/har.js | 215 - .../node_modules/request/lib/helpers.js | 74 - .../node_modules/request/lib/multipart.js | 112 - .../node_modules/request/lib/oauth.js | 147 - .../node_modules/request/lib/querystring.js | 51 - .../node_modules/request/lib/redirect.js | 153 - .../node_modules/request/lib/tunnel.js | 176 - .../node_modules/request/package.json | 144 - .../fsevents/node_modules/request/request.js | 1434 ---- .../fsevents/node_modules/rimraf/LICENSE | 15 - .../fsevents/node_modules/rimraf/README.md | 101 - .../fsevents/node_modules/rimraf/bin.js | 40 - .../fsevents/node_modules/rimraf/package.json | 93 - .../fsevents/node_modules/rimraf/rimraf.js | 343 - .../fsevents/node_modules/semver/LICENSE | 15 - .../fsevents/node_modules/semver/README.md | 346 - .../fsevents/node_modules/semver/bin/semver | 133 - .../fsevents/node_modules/semver/package.json | 86 - .../fsevents/node_modules/semver/range.bnf | 16 - .../fsevents/node_modules/semver/semver.js | 1194 --- .../node_modules/set-blocking/CHANGELOG.md | 26 - .../node_modules/set-blocking/LICENSE.txt | 14 - .../node_modules/set-blocking/README.md | 31 - .../node_modules/set-blocking/index.js | 7 - .../node_modules/set-blocking/package.json | 98 - .../node_modules/signal-exit/CHANGELOG.md | 17 - .../node_modules/signal-exit/LICENSE.txt | 14 - .../node_modules/signal-exit/README.md | 40 - .../node_modules/signal-exit/index.js | 148 - .../node_modules/signal-exit/package.json | 98 - .../node_modules/signal-exit/signals.js | 52 - .../fsevents/node_modules/sntp/.npmignore | 18 - .../fsevents/node_modules/sntp/.travis.yml | 5 - .../fsevents/node_modules/sntp/LICENSE | 28 - .../fsevents/node_modules/sntp/Makefile | 9 - .../fsevents/node_modules/sntp/README.md | 68 - .../node_modules/sntp/examples/offset.js | 16 - .../node_modules/sntp/examples/time.js | 25 - .../fsevents/node_modules/sntp/index.js | 1 - .../fsevents/node_modules/sntp/lib/index.js | 412 - .../fsevents/node_modules/sntp/package.json | 90 - .../fsevents/node_modules/sntp/test/index.js | 435 -- .../fsevents/node_modules/sshpk/.npmignore | 9 - .../fsevents/node_modules/sshpk/.travis.yml | 11 - .../fsevents/node_modules/sshpk/LICENSE | 18 - .../fsevents/node_modules/sshpk/README.md | 455 -- .../node_modules/sshpk/bin/sshpk-conv | 195 - .../node_modules/sshpk/bin/sshpk-sign | 191 - .../node_modules/sshpk/bin/sshpk-verify | 166 - .../fsevents/node_modules/sshpk/lib/algs.js | 168 - .../fsevents/node_modules/sshpk/lib/dhe.js | 311 - .../node_modules/sshpk/lib/ed-compat.js | 96 - .../fsevents/node_modules/sshpk/lib/errors.js | 71 - .../node_modules/sshpk/lib/fingerprint.js | 140 - .../node_modules/sshpk/lib/formats/auto.js | 73 - .../node_modules/sshpk/lib/formats/pem.js | 186 - .../node_modules/sshpk/lib/formats/pkcs1.js | 320 - .../node_modules/sshpk/lib/formats/pkcs8.js | 510 -- .../node_modules/sshpk/lib/formats/rfc4253.js | 146 - .../sshpk/lib/formats/ssh-private.js | 138 - .../node_modules/sshpk/lib/formats/ssh.js | 114 - .../fsevents/node_modules/sshpk/lib/index.js | 26 - .../fsevents/node_modules/sshpk/lib/key.js | 269 - .../node_modules/sshpk/lib/private-key.js | 231 - .../node_modules/sshpk/lib/signature.js | 237 - .../node_modules/sshpk/lib/ssh-buffer.js | 124 - .../fsevents/node_modules/sshpk/lib/utils.js | 246 - .../node_modules/sshpk/man/man1/sshpk-conv.1 | 135 - .../node_modules/sshpk/man/man1/sshpk-sign.1 | 81 - .../sshpk/man/man1/sshpk-verify.1 | 68 - .../sshpk/node_modules/assert-plus/AUTHORS | 6 - .../sshpk/node_modules/assert-plus/CHANGES.md | 14 - .../sshpk/node_modules/assert-plus/README.md | 162 - .../sshpk/node_modules/assert-plus/assert.js | 211 - .../node_modules/assert-plus/package.json | 107 - .../fsevents/node_modules/sshpk/package.json | 125 - .../node_modules/string-width/index.js | 32 - .../node_modules/string-width/license | 21 - .../node_modules/string-width/package.json | 111 - .../node_modules/string-width/readme.md | 41 - .../node_modules/string_decoder/.npmignore | 2 - .../node_modules/string_decoder/LICENSE | 20 - .../node_modules/string_decoder/README.md | 7 - .../node_modules/string_decoder/index.js | 221 - .../node_modules/string_decoder/package.json | 80 - .../node_modules/stringstream/.npmignore | 15 - .../node_modules/stringstream/.travis.yml | 4 - .../node_modules/stringstream/LICENSE.txt | 22 - .../node_modules/stringstream/README.md | 38 - .../node_modules/stringstream/example.js | 27 - .../node_modules/stringstream/package.json | 77 - .../node_modules/stringstream/stringstream.js | 102 - .../fsevents/node_modules/strip-ansi/index.js | 6 - .../fsevents/node_modules/strip-ansi/license | 21 - .../node_modules/strip-ansi/package.json | 117 - .../node_modules/strip-ansi/readme.md | 33 - .../node_modules/strip-json-comments/cli.js | 41 - .../node_modules/strip-json-comments/license | 21 - .../strip-json-comments/package.json | 104 - .../strip-json-comments/readme.md | 80 - .../strip-json-comments.js | 73 - .../node_modules/supports-color/index.js | 50 - .../node_modules/supports-color/license | 21 - .../node_modules/supports-color/package.json | 105 - .../node_modules/supports-color/readme.md | 36 - .../fsevents/node_modules/tar-pack/.npmignore | 14 - .../node_modules/tar-pack/.travis.yml | 7 - .../fsevents/node_modules/tar-pack/LICENSE | 23 - .../fsevents/node_modules/tar-pack/README.md | 81 - .../fsevents/node_modules/tar-pack/index.js | 240 - .../node_modules/tar-pack/package.json | 92 - .../tar-pack/test/fixtures/packed-file.txt | 1 - .../tar-pack/test/fixtures/packed.tar | Bin 3584 -> 0 bytes .../tar-pack/test/fixtures/packed.tar.gz | Bin 152 -> 0 bytes .../tar-pack/test/fixtures/to-pack/bar.txt | 1 - .../tar-pack/test/fixtures/to-pack/foo.txt | 1 - .../node_modules/tar-pack/test/index.js | 67 - .../fsevents/node_modules/tar/.npmignore | 5 - .../fsevents/node_modules/tar/.travis.yml | 4 - .../fsevents/node_modules/tar/LICENSE | 12 - .../fsevents/node_modules/tar/README.md | 50 - .../node_modules/tar/examples/extracter.js | 19 - .../node_modules/tar/examples/packer.js | 24 - .../node_modules/tar/examples/reader.js | 36 - .../node_modules/tar/lib/buffer-entry.js | 30 - .../node_modules/tar/lib/entry-writer.js | 169 - .../fsevents/node_modules/tar/lib/entry.js | 220 - .../tar/lib/extended-header-writer.js | 191 - .../node_modules/tar/lib/extended-header.js | 140 - .../fsevents/node_modules/tar/lib/extract.js | 94 - .../tar/lib/global-header-writer.js | 14 - .../fsevents/node_modules/tar/lib/header.js | 385 - .../fsevents/node_modules/tar/lib/pack.js | 236 - .../fsevents/node_modules/tar/lib/parse.js | 275 - .../fsevents/node_modules/tar/package.json | 95 - .../fsevents/node_modules/tar/tar.js | 173 - .../tar/test/00-setup-fixtures.js | 53 - .../tar/test/cb-never-called-1.0.1.tgz | Bin 4096 -> 0 bytes .../tar/test/dir-normalization.js | 177 - .../tar/test/dir-normalization.tar | Bin 4608 -> 0 bytes .../node_modules/tar/test/error-on-broken.js | 33 - .../node_modules/tar/test/extract-move.js | 132 - .../fsevents/node_modules/tar/test/extract.js | 367 - .../node_modules/tar/test/fixtures.tgz | Bin 19352 -> 0 bytes .../fsevents/node_modules/tar/test/header.js | 183 - .../tar/test/pack-no-proprietary.js | 886 --- .../fsevents/node_modules/tar/test/pack.js | 952 --- .../node_modules/tar/test/parse-discard.js | 29 - .../fsevents/node_modules/tar/test/parse.js | 359 - .../node_modules/tar/test/zz-cleanup.js | 20 - .../node_modules/tough-cookie/LICENSE | 27 - .../node_modules/tough-cookie/README.md | 492 -- .../node_modules/tough-cookie/lib/cookie.js | 1342 ---- .../node_modules/tough-cookie/lib/memstore.js | 170 - .../tough-cookie/lib/pathMatch.js | 61 - .../tough-cookie/lib/permuteDomain.js | 56 - .../tough-cookie/lib/pubsuffix.js | 98 - .../node_modules/tough-cookie/lib/store.js | 71 - .../node_modules/tough-cookie/package.json | 120 - .../node_modules/tunnel-agent/LICENSE | 55 - .../node_modules/tunnel-agent/README.md | 4 - .../node_modules/tunnel-agent/index.js | 243 - .../node_modules/tunnel-agent/package.json | 92 - .../node_modules/tweetnacl/.npmignore | 4 - .../node_modules/tweetnacl/CHANGELOG.md | 128 - .../fsevents/node_modules/tweetnacl/README.md | 463 -- .../node_modules/tweetnacl/nacl-fast.js | 2418 ------ .../node_modules/tweetnacl/nacl-fast.min.js | 2 - .../fsevents/node_modules/tweetnacl/nacl.js | 1205 --- .../node_modules/tweetnacl/nacl.min.js | 1 - .../node_modules/tweetnacl/package.json | 120 - .../fsevents/node_modules/uid-number/LICENSE | 15 - .../node_modules/uid-number/README.md | 17 - .../node_modules/uid-number/get-uid-gid.js | 24 - .../node_modules/uid-number/package.json | 74 - .../node_modules/uid-number/uid-number.js | 59 - .../node_modules/util-deprecate/History.md | 16 - .../node_modules/util-deprecate/LICENSE | 24 - .../node_modules/util-deprecate/README.md | 53 - .../node_modules/util-deprecate/browser.js | 67 - .../node_modules/util-deprecate/node.js | 6 - .../node_modules/util-deprecate/package.json | 82 - .../fsevents/node_modules/verror/.gitmodules | 0 .../fsevents/node_modules/verror/.npmignore | 1 - .../fsevents/node_modules/verror/LICENSE | 19 - .../fsevents/node_modules/verror/Makefile | 35 - .../node_modules/verror/Makefile.targ | 285 - .../fsevents/node_modules/verror/README.md | 120 - .../verror/examples/levels-verror.js | 36 - .../verror/examples/levels-werror.js | 34 - .../node_modules/verror/examples/varargs.js | 6 - .../node_modules/verror/examples/verror.js | 13 - .../node_modules/verror/examples/werror.js | 14 - .../node_modules/verror/jsl.node.conf | 139 - .../node_modules/verror/lib/verror.js | 157 - .../fsevents/node_modules/verror/package.json | 70 - .../node_modules/verror/tests/tst.inherit.js | 100 - .../node_modules/verror/tests/tst.verror.js | 156 - .../node_modules/verror/tests/tst.werror.js | 179 - .../node_modules/wide-align/.npmignore | 5 - .../fsevents/node_modules/wide-align/LICENSE | 14 - .../node_modules/wide-align/README.md | 47 - .../fsevents/node_modules/wide-align/align.js | 65 - .../node_modules/wide-align/package.json | 85 - .../node_modules/wide-align/test/align.js | 37 - .../fsevents/node_modules/wrappy/LICENSE | 15 - .../fsevents/node_modules/wrappy/README.md | 36 - .../fsevents/node_modules/wrappy/package.json | 89 - .../fsevents/node_modules/wrappy/wrappy.js | 33 - .../fsevents/node_modules/xtend/.jshintrc | 30 - .../fsevents/node_modules/xtend/.npmignore | 1 - .../fsevents/node_modules/xtend/LICENCE | 19 - .../fsevents/node_modules/xtend/Makefile | 4 - .../fsevents/node_modules/xtend/README.md | 32 - .../fsevents/node_modules/xtend/immutable.js | 19 - .../fsevents/node_modules/xtend/mutable.js | 17 - .../fsevents/node_modules/xtend/package.json | 109 - .../fsevents/node_modules/xtend/test.js | 83 - .../node/node_modules/fsevents/package.json | 119 - .../node/node_modules/fsevents/src/async.cc | 43 - .../node_modules/fsevents/src/constants.cc | 110 - .../node/node_modules/fsevents/src/locking.cc | 27 - .../node/node_modules/fsevents/src/methods.cc | 42 - .../node/node_modules/fsevents/src/storage.cc | 27 - .../node/node_modules/fsevents/src/thread.cc | 72 - .../node/node_modules/glob-base/LICENSE | 21 - .../node/node_modules/glob-base/README.md | 158 - .../node/node_modules/glob-base/index.js | 51 - .../node/node_modules/glob-base/package.json | 108 - .../node/node_modules/glob-parent/.npmignore | 4 - .../node/node_modules/glob-parent/.travis.yml | 8 - .../node/node_modules/glob-parent/LICENSE | 15 - .../node/node_modules/glob-parent/README.md | 43 - .../node/node_modules/glob-parent/index.js | 10 - .../node_modules/glob-parent/package.json | 86 - .../node/node_modules/glob-parent/test.js | 28 - .../node/node_modules/graceful-fs/LICENSE | 15 - .../node/node_modules/graceful-fs/README.md | 133 - .../node/node_modules/graceful-fs/fs.js | 21 - .../node_modules/graceful-fs/graceful-fs.js | 253 - .../graceful-fs/legacy-streams.js | 118 - .../node_modules/graceful-fs/package.json | 103 - .../node_modules/graceful-fs/polyfills.js | 275 - .../node/node_modules/inherits/LICENSE | 16 - .../node/node_modules/inherits/README.md | 42 - .../node/node_modules/inherits/inherits.js | 1 - .../node_modules/inherits/inherits_browser.js | 23 - .../node/node_modules/inherits/package.json | 78 - .../node/node_modules/inherits/test.js | 25 - .../node/node_modules/is-binary-path/index.js | 12 - .../node/node_modules/is-binary-path/license | 21 - .../node_modules/is-binary-path/package.json | 102 - .../node_modules/is-binary-path/readme.md | 34 - .../node/node_modules/is-buffer/.travis.yml | 7 - .../node/node_modules/is-buffer/.zuul.yml | 16 - .../node/node_modules/is-buffer/LICENSE | 21 - .../node/node_modules/is-buffer/README.md | 49 - .../node/node_modules/is-buffer/index.js | 17 - .../node/node_modules/is-buffer/package.json | 116 - .../node/node_modules/is-buffer/test/basic.js | 20 - .../node/node_modules/is-dotfile/LICENSE | 21 - .../node/node_modules/is-dotfile/README.md | 74 - .../node/node_modules/is-dotfile/index.js | 15 - .../node/node_modules/is-dotfile/package.json | 108 - .../node_modules/is-equal-shallow/LICENSE | 21 - .../node_modules/is-equal-shallow/README.md | 90 - .../node_modules/is-equal-shallow/index.js | 27 - .../is-equal-shallow/package.json | 112 - .../node/node_modules/is-extendable/LICENSE | 21 - .../node/node_modules/is-extendable/README.md | 72 - .../node/node_modules/is-extendable/index.js | 13 - .../node_modules/is-extendable/package.json | 106 - .../node/node_modules/is-extglob/LICENSE | 21 - .../node/node_modules/is-extglob/README.md | 75 - .../node/node_modules/is-extglob/index.js | 11 - .../node/node_modules/is-extglob/package.json | 102 - .../node/node_modules/is-glob/LICENSE | 21 - .../node/node_modules/is-glob/README.md | 105 - .../node/node_modules/is-glob/index.js | 14 - .../node/node_modules/is-glob/package.json | 119 - .../node/node_modules/is-number/LICENSE | 21 - .../node/node_modules/is-number/README.md | 103 - .../node/node_modules/is-number/index.js | 19 - .../node/node_modules/is-number/package.json | 118 - .../node_modules/is-posix-bracket/LICENSE | 21 - .../node_modules/is-posix-bracket/README.md | 88 - .../node_modules/is-posix-bracket/index.js | 10 - .../is-posix-bracket/package.json | 123 - .../node/node_modules/is-primitive/LICENSE | 21 - .../node/node_modules/is-primitive/README.md | 57 - .../node/node_modules/is-primitive/index.js | 13 - .../node_modules/is-primitive/package.json | 96 - .../node/node_modules/isarray/.npmignore | 1 - .../node/node_modules/isarray/.travis.yml | 4 - .../node/node_modules/isarray/Makefile | 6 - .../node/node_modules/isarray/README.md | 60 - .../node/node_modules/isarray/component.json | 19 - .../node/node_modules/isarray/index.js | 5 - .../node/node_modules/isarray/package.json | 97 - .../node/node_modules/isarray/test.js | 20 - .../node/node_modules/isobject/LICENSE | 21 - .../node/node_modules/isobject/README.md | 112 - .../node/node_modules/isobject/index.js | 14 - .../node/node_modules/isobject/package.json | 129 - .../node/node_modules/kind-of/LICENSE | 21 - .../node/node_modules/kind-of/README.md | 247 - .../node/node_modules/kind-of/index.js | 113 - .../node/node_modules/kind-of/package.json | 148 - .../node/node_modules/micromatch/LICENSE | 21 - .../node/node_modules/micromatch/README.md | 689 -- .../node/node_modules/micromatch/index.js | 431 -- .../node/node_modules/micromatch/lib/chars.js | 67 - .../node_modules/micromatch/lib/expand.js | 304 - .../node/node_modules/micromatch/lib/glob.js | 193 - .../node/node_modules/micromatch/lib/utils.js | 149 - .../node/node_modules/micromatch/package.json | 180 - .../node/node_modules/minimatch/LICENSE | 15 - .../node/node_modules/minimatch/README.md | 209 - .../node/node_modules/minimatch/minimatch.js | 924 --- .../node/node_modules/minimatch/package.json | 89 - .../node/node_modules/nan/CHANGELOG.md | 430 -- .../appshell/node/node_modules/nan/LICENSE.md | 13 - .../appshell/node/node_modules/nan/README.md | 403 - .../node/node_modules/nan/doc/asyncworker.md | 103 - .../node/node_modules/nan/doc/buffers.md | 54 - .../node/node_modules/nan/doc/callback.md | 56 - .../node/node_modules/nan/doc/converters.md | 41 - .../node/node_modules/nan/doc/errors.md | 226 - .../node/node_modules/nan/doc/maybe_types.md | 512 -- .../node/node_modules/nan/doc/methods.md | 659 -- .../appshell/node/node_modules/nan/doc/new.md | 147 - .../node/node_modules/nan/doc/node_misc.md | 63 - .../node_modules/nan/doc/object_wrappers.md | 263 - .../node/node_modules/nan/doc/persistent.md | 295 - .../node/node_modules/nan/doc/scopes.md | 73 - .../node/node_modules/nan/doc/script.md | 38 - .../node/node_modules/nan/doc/string_bytes.md | 62 - .../node/node_modules/nan/doc/v8_internals.md | 199 - .../node/node_modules/nan/doc/v8_misc.md | 85 - .../node/node_modules/nan/include_dirs.js | 1 - .../appshell/node/node_modules/nan/nan.h | 2274 ------ .../node/node_modules/nan/nan_callbacks.h | 88 - .../node_modules/nan/nan_callbacks_12_inl.h | 512 -- .../nan/nan_callbacks_pre_12_inl.h | 506 -- .../node/node_modules/nan/nan_converters.h | 64 - .../node_modules/nan/nan_converters_43_inl.h | 42 - .../nan/nan_converters_pre_43_inl.h | 42 - .../nan/nan_implementation_12_inl.h | 409 - .../nan/nan_implementation_pre_12_inl.h | 264 - .../node/node_modules/nan/nan_maybe_43_inl.h | 245 - .../node_modules/nan/nan_maybe_pre_43_inl.h | 303 - .../appshell/node/node_modules/nan/nan_new.h | 340 - .../node/node_modules/nan/nan_object_wrap.h | 155 - .../node_modules/nan/nan_persistent_12_inl.h | 129 - .../nan/nan_persistent_pre_12_inl.h | 242 - .../node/node_modules/nan/nan_string_bytes.h | 305 - .../nan/nan_typedarray_contents.h | 87 - .../appshell/node/node_modules/nan/nan_weak.h | 432 -- .../node/node_modules/nan/package.json | 122 - .../node/node_modules/nan/tools/1to2.js | 412 - .../node/node_modules/nan/tools/README.md | 14 - .../node/node_modules/nan/tools/package.json | 19 - .../node/node_modules/normalize-path/LICENSE | 21 - .../node_modules/normalize-path/README.md | 75 - .../node/node_modules/normalize-path/index.js | 17 - .../node_modules/normalize-path/package.json | 118 - .../node/node_modules/object.omit/LICENSE | 21 - .../node/node_modules/object.omit/README.md | 104 - .../node/node_modules/object.omit/index.js | 40 - .../node_modules/object.omit/package.json | 105 - .../node/node_modules/parse-glob/LICENSE | 21 - .../node/node_modules/parse-glob/README.md | 115 - .../node/node_modules/parse-glob/index.js | 156 - .../node/node_modules/parse-glob/package.json | 116 - .../node_modules/path-is-absolute/index.js | 20 - .../node_modules/path-is-absolute/license | 21 - .../path-is-absolute/package.json | 97 - .../node_modules/path-is-absolute/readme.md | 51 - .../node/node_modules/preserve/.gitattributes | 14 - .../node/node_modules/preserve/.jshintrc | 24 - .../node/node_modules/preserve/.npmignore | 53 - .../node/node_modules/preserve/.travis.yml | 3 - .../node/node_modules/preserve/.verb.md | 59 - .../node/node_modules/preserve/LICENSE | 24 - .../node/node_modules/preserve/README.md | 90 - .../node/node_modules/preserve/index.js | 54 - .../node/node_modules/preserve/package.json | 96 - .../node/node_modules/preserve/test.js | 48 - .../process-nextick-args/.travis.yml | 12 - .../process-nextick-args/index.js | 43 - .../process-nextick-args/license.md | 19 - .../process-nextick-args/package.json | 75 - .../process-nextick-args/readme.md | 18 - .../node_modules/process-nextick-args/test.js | 24 - .../node/node_modules/randomatic/LICENSE | 21 - .../node/node_modules/randomatic/README.md | 132 - .../node/node_modules/randomatic/index.js | 83 - .../node/node_modules/randomatic/package.json | 108 - .../node_modules/readable-stream/.npmignore | 8 - .../node_modules/readable-stream/.travis.yml | 54 - .../node/node_modules/readable-stream/LICENSE | 18 - .../node_modules/readable-stream/README.md | 36 - .../readable-stream/doc/stream.md | 1772 ----- .../doc/wg-meetings/2015-01-30.md | 60 - .../node_modules/readable-stream/duplex.js | 1 - .../readable-stream/lib/_stream_duplex.js | 75 - .../lib/_stream_passthrough.js | 26 - .../readable-stream/lib/_stream_readable.js | 893 --- .../readable-stream/lib/_stream_transform.js | 180 - .../readable-stream/lib/_stream_writable.js | 526 -- .../node_modules/readable-stream/package.json | 117 - .../readable-stream/passthrough.js | 1 - .../node_modules/readable-stream/readable.js | 16 - .../node_modules/readable-stream/transform.js | 1 - .../node_modules/readable-stream/writable.js | 1 - .../node/node_modules/readdirp/.npmignore | 15 - .../node/node_modules/readdirp/.travis.yml | 6 - .../node/node_modules/readdirp/LICENSE | 20 - .../node/node_modules/readdirp/README.md | 233 - .../node_modules/readdirp/examples/Readme.md | 37 - .../readdirp/examples/callback-api.js | 10 - .../node_modules/readdirp/examples/grep.js | 71 - .../readdirp/examples/package.json | 9 - .../readdirp/examples/stream-api-pipe.js | 19 - .../readdirp/examples/stream-api.js | 15 - .../node/node_modules/readdirp/package.json | 106 - .../node/node_modules/readdirp/readdirp.js | 300 - .../node/node_modules/readdirp/stream-api.js | 99 - .../test/bed/root_dir1/root_dir1_file1.ext1 | 0 .../test/bed/root_dir1/root_dir1_file2.ext2 | 0 .../test/bed/root_dir1/root_dir1_file3.ext3 | 0 .../root1_dir1_subdir1_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file1.ext1 | 0 .../test/bed/root_dir2/root_dir2_file2.ext2 | 0 .../readdirp/test/bed/root_file1.ext1 | 0 .../readdirp/test/bed/root_file2.ext2 | 0 .../readdirp/test/bed/root_file3.ext3 | 0 .../readdirp/test/readdirp-stream.js | 338 - .../node_modules/readdirp/test/readdirp.js | 289 - .../node/node_modules/regex-cache/LICENSE | 21 - .../node/node_modules/regex-cache/README.md | 160 - .../node/node_modules/regex-cache/index.js | 69 - .../node_modules/regex-cache/package.json | 123 - .../node/node_modules/repeat-element/LICENSE | 21 - .../node_modules/repeat-element/README.md | 71 - .../node/node_modules/repeat-element/index.js | 18 - .../node_modules/repeat-element/package.json | 94 - .../node/node_modules/repeat-string/LICENSE | 21 - .../node/node_modules/repeat-string/README.md | 118 - .../node/node_modules/repeat-string/index.js | 68 - .../node_modules/repeat-string/package.json | 129 - .../node_modules/set-immediate-shim/index.js | 7 - .../set-immediate-shim/package.json | 89 - .../node_modules/set-immediate-shim/readme.md | 31 - .../node_modules/string_decoder/.npmignore | 2 - .../node/node_modules/string_decoder/LICENSE | 20 - .../node_modules/string_decoder/README.md | 7 - .../node/node_modules/string_decoder/index.js | 221 - .../node_modules/string_decoder/package.json | 79 - .../node_modules/util-deprecate/History.md | 16 - .../node/node_modules/util-deprecate/LICENSE | 24 - .../node_modules/util-deprecate/README.md | 53 - .../node_modules/util-deprecate/browser.js | 67 - .../node/node_modules/util-deprecate/node.js | 6 - .../node_modules/util-deprecate/package.json | 81 - .../impls/appshell/node/package.json | 6 - 1413 files changed, 3 insertions(+), 169809 deletions(-) delete mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/anymatch/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE delete mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE delete mode 100755 src/filesystem/impls/appshell/node/node_modules/array-unique/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/array-unique/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/array-unique/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/arrify/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/bower.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/component.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/async-each/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/LICENSE.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/balanced-match/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/binary-extensions.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/binary-extensions/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/brace-expansion/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/brace-expansion/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/brace-expansion/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/braces/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/license.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/buffer-shims/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/lib/fsevents-handler.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/lib/nodefs-handler.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/chokidar/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/README.markdown delete mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/example/map.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/concat-map/test/map.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/float.patch delete mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/lib/util.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/core-util-is/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-brackets/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/expand-range/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/extglob/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/filename-regex/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/filename-regex/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/filename-regex/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fill-range/LICENSE delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fill-range/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fill-range/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fill-range/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-in/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/for-own/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/Readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/binding.gyp delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/.target.mk delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/action_after_build.target.mk delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/binding.Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/build/fse.target.mk delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/build/gyp-mac-tool delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/fsevents.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/fsevents.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/lib/binding/Release/node-v11-darwin-x64/fse.node delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/har-validator delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/mkdirp delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/node-pre-gyp delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/nopt delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/rc delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/rimraf delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/semver delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/sshpk-conv delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/sshpk-sign delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/sshpk-verify delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/strip-json-comments delete mode 120000 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/.bin/uuid delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/abbrev.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/abbrev/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-regex/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ansi-styles/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aproba/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/CHANGES.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/lib/test-event.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/tracker.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/trackergroup.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/test/trackerstream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker-base.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker-group.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker-stream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/are-we-there-yet/tracker.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/errors.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/types.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/ber/writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/tst/ber/reader.test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/asn1/tst/ber/writer.test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/AUTHORS delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/CHANGES.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/assert.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/assert-plus/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.min.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/lib/async.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws-sign2/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/.tern-port delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/aws4.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/lru.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/aws4/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/LICENSE.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/balanced-match/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/.jshintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/LICENSE.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/bl.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/.zuul.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/doc/stream.markdown delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/duplex.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/passthrough.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/readable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/transform.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/node_modules/readable-stream/writable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/bl/test/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/LICENCE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/block-stream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/block-stream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/.npmignore delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/CONTRIBUTING.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/LICENSE delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/images/boom.png delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/boom/test/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/brace-expansion/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/brace-expansion/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/brace-expansion/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/license.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/buffer-shims/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/caseless/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/chalk/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/code-point-at/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/License delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/Readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/lib/combined_stream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/combined-stream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/History.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/Readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/commander/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/README.markdown delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/example/map.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/concat-map/test/map.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/console-control-strings/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/float.patch delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/lib/util.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/core-util-is/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/.npmignore delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/.travis.yml delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/cryptiles/test/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/etc/dashdash.bash_completion.in delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/lib/dashdash.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/AUTHORS delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/CHANGES.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/assert.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/dashdash/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/.jshintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/History.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/Readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/bower.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/browser.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/component.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/debug.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/node.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/debug/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/lib/deep-extend.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/deep-extend/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/License delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/Readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/lib/delayed_stream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delayed-stream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/History.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/License delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/Readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/delegates/test/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/lib/LICENSE-jsbn delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/lib/ec.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/lib/sec.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ecc-jsbn/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/escape-string-regexp/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.eslintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.jscs.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/component.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extend/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/.gitmodules delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/Makefile.deps delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/Makefile.targ delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/examples/simple.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/jsl.node.conf delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/lib/extsprintf.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/extsprintf/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/forever-agent/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.dockerignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.editorconfig delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.eslintignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/.eslintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/License delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/lib/browser.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/lib/form_data.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/lib/populate.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/form-data/wercker.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/old.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fs.realpath/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/ignore.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream-ignore/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/filter-pipe.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/pipe.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/examples/symlink-write.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/fstream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/abstract.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/collect.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/dir-reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/dir-writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/file-reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/file-writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/get-type.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/link-reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/link-writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/proxy-reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/proxy-writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/socket-reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/lib/writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/fstream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/base-theme.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/error.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/has-color.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/plumbing.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/process.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/progress-bar.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/render-template.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/set-immediate.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/set-interval.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/spin.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/template-item.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/theme-set.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/themes.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/gauge/wide-truncate.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/example.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-function/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/generate-object-property/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/AUTHORS delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/CHANGES.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/assert.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/getpass/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/changelog.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/common.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/glob.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/glob/sync.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/fs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/graceful-fs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/legacy-streams.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-fs/polyfills.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/graceful-readlink/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/bin/har-validator delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/async.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/error.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/runner.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/cache.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/cacheEntry.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/content.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/cookie.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/creator.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/entry.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/har.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/log.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/page.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/pageTimings.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/postData.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/record.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/request.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/response.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/lib/schemas/timings.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/har-validator/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-ansi/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-color/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-color/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-color/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/has-unicode/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/.npmignore delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/.travis.yml delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/LICENSE delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/bower.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/component.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/dist/client.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/example/usage.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/images/hawk.png delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/images/logo.png delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/browser.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/client.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/crypto.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/index.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/server.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/lib/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/browser.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/client.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/crypto.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/index.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/readme.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/server.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/uri.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hawk/test/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/CONTRIBUTING.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/images/hoek.png delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/lib/escape.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/escaper.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/modules/ignore.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/modules/test1.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/modules/test2.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/hoek/test/modules/test3.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/.dir-locals.el delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/CHANGES.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/http_signing.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/parser.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/signer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/lib/verify.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/http-signature/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/inflight.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inflight/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/inherits.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/inherits_browser.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/inherits/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/ini.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ini/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-fullwidth-code-point/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/example.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/formats.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/require.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/fixtures/cosmic.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/default.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/format.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/items.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/not.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndObject.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/required.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/type.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/json-schema.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-my-json-valid/test/misc.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/is-property.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-property/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/LICENSE.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/is-typedarray/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/component.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isarray/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/.jshintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/LICENSE.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/isstream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/isstream/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/AUTHORS.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/almond.0 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/almond.1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/jsdoc.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/core.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/curve255.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/dh.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/eddsa.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/lib/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jodid25519/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.html delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar.gz delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/buffer-entry.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry-writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/cb-never-called-1.0.1.tgz delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.tar delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/fixtures.tgz delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/memstore.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/pubsuffix.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.gitmodules delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-base/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/inherits/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-glob/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-number/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/Makefile delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/component.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isarray/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/isobject/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/kind-of/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/README.md delete mode 100755 src/filesystem/impls/appshell/node/node_modules/micromatch/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/micromatch/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/minimatch/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/package.json delete mode 100755 src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/object.omit/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license delete mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/preserve/test.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js delete mode 100755 src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/randomatic/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/randomatic/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/randomatic/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file1.ext1 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file2.ext2 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file3.ext3 delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore delete mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json delete mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE delete mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md delete mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js delete mode 100644 src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json delete mode 100644 src/filesystem/impls/appshell/node/package.json diff --git a/package.json b/package.json index 67c16bbfd09..ffa7253ee90 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "branch": "", "SHA": "" }, + "dependencies": { + "chokidar": "1.6.0" + }, "devDependencies": { "grunt": "0.4.5", "jasmine-node": "1.11.0", diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE deleted file mode 100644 index bc424705fb9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/anymatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2014 Elan Shanker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/README.md b/src/filesystem/impls/appshell/node/node_modules/anymatch/README.md deleted file mode 100644 index 0a632921348..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/anymatch/README.md +++ /dev/null @@ -1,91 +0,0 @@ -anymatch [![Build Status](https://travis-ci.org/es128/anymatch.svg?branch=master)](https://travis-ci.org/es128/anymatch) [![Coverage Status](https://img.shields.io/coveralls/es128/anymatch.svg?branch=master)](https://coveralls.io/r/es128/anymatch?branch=master) -====== -Javascript module to match a string against a regular expression, glob, string, -or function that takes the string as an argument and returns a truthy or falsy -value. The matcher can also be an array of any or all of these. Useful for -allowing a very flexible user-defined config to define things like file paths. - -[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) -[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) - -Usage ------ -```sh -npm install anymatch --save -``` - -#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) -* __matchers__: (_Array|String|RegExp|Function_) -String to be directly matched, string with glob patterns, regular expression -test, function that takes the testString as an argument and returns a truthy -value if it should be matched, or an array of any number and mix of these types. -* __testString__: (_String|Array_) The string to test against the matchers. If -passed as an array, the first element of the array will be used as the -`testString` for non-function matchers, while the entire array will be applied -as the arguments for function matchers. -* __returnIndex__: (_Boolean [optional]_) If true, return the array index of -the first matcher that that testString matched, or -1 if no match, instead of a -boolean result. -* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a -subset out of the array of provided matchers to test against. Can be useful -with bound matcher functions (see below). When used with `returnIndex = true` -preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. -includes array members up to, but not including endIndex). - -```js -var anymatch = require('anymatch'); - -var matchers = [ - 'path/to/file.js', - 'path/anyjs/**/*.js', - /foo.js$/, - function (string) { - return string.indexOf('bar') !== -1 && string.length > 10 - } -]; - -anymatch(matchers, 'path/to/file.js'); // true -anymatch(matchers, 'path/anyjs/baz.js'); // true -anymatch(matchers, 'path/to/foo.js'); // true -anymatch(matchers, 'path/to/bar.js'); // true -anymatch(matchers, 'bar.js'); // false - -// returnIndex = true -anymatch(matchers, 'foo.js', true); // 2 -anymatch(matchers, 'path/anyjs/foo.js', true); // 1 - -// skip matchers -anymatch(matchers, 'path/to/file.js', false, 1); // false -anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 -anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 -``` - -#### anymatch (matchers) -You can also pass in only your matcher(s) to get a curried function that has -already been bound to the provided matching criteria. This can be used as an -`Array.prototype.filter` callback. - -```js -var matcher = anymatch(matchers); - -matcher('path/to/file.js'); // true -matcher('path/anyjs/baz.js', true); // 1 -matcher('path/anyjs/baz.js', true, 2); // -1 - -['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] -``` - -Change Log ----------- -[See release notes page on GitHub](https://github.com/es128/anymatch/releases) - -NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) -for glob pattern matching. The glob matching behavior should be functionally -equivalent to the commonly used [minimatch](https://github.com/isaacs/minimatch) -library (aside from some fixed bugs and greater performance), so a major -version bump wasn't merited. Issues with glob pattern matching should be -reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). - -License -------- -[ISC](https://raw.github.com/es128/anymatch/master/LICENSE) diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/index.js b/src/filesystem/impls/appshell/node/node_modules/anymatch/index.js deleted file mode 100644 index fd70ba07ead..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/anymatch/index.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -var arrify = require('arrify'); -var micromatch = require('micromatch'); -var path = require('path'); - -var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { - criteria = arrify(criteria); - value = arrify(value); - if (arguments.length === 1) { - return anymatch.bind(null, criteria.map(function(criterion) { - return typeof criterion === 'string' && criterion[0] !== '!' ? - micromatch.matcher(criterion) : criterion; - })); - } - startIndex = startIndex || 0; - var string = value[0]; - var altString; - var matched = false; - var matchIndex = -1; - function testCriteria (criterion, index) { - var result; - switch (toString.call(criterion)) { - case '[object String]': - result = string === criterion || altString && altString === criterion; - result = result || micromatch.isMatch(string, criterion); - break; - case '[object RegExp]': - result = criterion.test(string) || altString && criterion.test(altString); - break; - case '[object Function]': - result = criterion.apply(null, value); - break; - default: - result = false; - } - if (result) { - matchIndex = index + startIndex; - } - return result; - } - var crit = criteria; - var negGlobs = crit.reduce(function(arr, criterion, index) { - if (typeof criterion === 'string' && criterion[0] === '!') { - if (crit === criteria) { - // make a copy before modifying - crit = crit.slice(); - } - crit[index] = null; - arr.push(criterion.substr(1)); - } - return arr; - }, []); - if (!negGlobs.length || !micromatch.any(string, negGlobs)) { - if (path.sep === '\\' && typeof string === 'string') { - altString = string.split('\\').join('/'); - altString = altString === string ? null : altString; - } - matched = crit.slice(startIndex, endIndex).some(testCriteria); - } - return returnIndex === true ? matchIndex : matched; -}; - -module.exports = anymatch; diff --git a/src/filesystem/impls/appshell/node/node_modules/anymatch/package.json b/src/filesystem/impls/appshell/node/node_modules/anymatch/package.json deleted file mode 100644 index 70697cbb086..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/anymatch/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "anymatch@^1.3.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "anymatch@>=1.3.0 <2.0.0", - "_id": "anymatch@1.3.0", - "_inCache": true, - "_installable": true, - "_location": "/anymatch", - "_nodeVersion": "1.6.2", - "_npmUser": { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - }, - "_npmVersion": "2.7.3", - "_phantomChildren": {}, - "_requested": { - "name": "anymatch", - "raw": "anymatch@^1.3.0", - "rawSpec": "^1.3.0", - "scope": null, - "spec": ">=1.3.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar" - ], - "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", - "_shasum": "a3e52fa39168c825ff57b0248126ce5a8ff95507", - "_shrinkwrap": null, - "_spec": "anymatch@^1.3.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "author": { - "name": "Elan Shanker", - "url": "http://github.com/es128" - }, - "bugs": { - "url": "https://github.com/es128/anymatch/issues" - }, - "dependencies": { - "arrify": "^1.0.0", - "micromatch": "^2.1.5" - }, - "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.13", - "mocha": "^2.2.4" - }, - "directories": {}, - "dist": { - "shasum": "a3e52fa39168c825ff57b0248126ce5a8ff95507", - "tarball": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz" - }, - "files": [ - "index.js" - ], - "gitHead": "253d2ad42f644ed18557f561312a7f8426daca84", - "homepage": "https://github.com/es128/anymatch", - "keywords": [ - "match", - "any", - "string", - "file", - "fs", - "list", - "glob", - "regex", - "regexp", - "regular", - "expression", - "function" - ], - "license": "ISC", - "maintainers": [ - { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - } - ], - "name": "anymatch", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/anymatch.git" - }, - "scripts": { - "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" - }, - "version": "1.3.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE b/src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE deleted file mode 100755 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-diff/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md b/src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md deleted file mode 100644 index 7705c6cd528..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-diff/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg)](https://www.npmjs.com/package/arr-diff) [![Build Status](https://img.shields.io/travis/jonschlinkert/base.svg)](https://travis-ci.org/jonschlinkert/base) - -> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i arr-diff --save -``` -Install with [bower](http://bower.io/) - -```sh -$ bower install arr-diff --save -``` - -## API - -### [diff](index.js#L33) - -Return the difference between the first array and additional arrays. - -**Params** - -* `a` **{Array}** -* `b` **{Array}** -* `returns` **{Array}** - -**Example** - -```js -var diff = require('arr-diff'); - -var a = ['a', 'b', 'c', 'd']; -var b = ['b', 'c']; - -console.log(diff(a, b)) -//=> ['a', 'd'] -``` - -## Related projects - -* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) -* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter) -* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection) - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new). - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) -Released under the MIT license. - -*** - -_This file was generated by [verb](https://github.com/verbose/verb) on Sat Dec 05 2015 23:24:53 GMT-0500 (EST)._ diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js b/src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js deleted file mode 100644 index bc7200d8e89..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-diff/index.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - * arr-diff - * - * Copyright (c) 2014 Jon Schlinkert, contributors. - * Licensed under the MIT License - */ - -'use strict'; - -var flatten = require('arr-flatten'); -var slice = [].slice; - -/** - * Return the difference between the first array and - * additional arrays. - * - * ```js - * var diff = require('{%= name %}'); - * - * var a = ['a', 'b', 'c', 'd']; - * var b = ['b', 'c']; - * - * console.log(diff(a, b)) - * //=> ['a', 'd'] - * ``` - * - * @param {Array} `a` - * @param {Array} `b` - * @return {Array} - * @api public - */ - -function diff(arr, arrays) { - var argsLen = arguments.length; - var len = arr.length, i = -1; - var res = [], arrays; - - if (argsLen === 1) { - return arr; - } - - if (argsLen > 2) { - arrays = flatten(slice.call(arguments, 1)); - } - - while (++i < len) { - if (!~arrays.indexOf(arr[i])) { - res.push(arr[i]); - } - } - return res; -} - -/** - * Expose `diff` - */ - -module.exports = diff; diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json b/src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json deleted file mode 100644 index 9ca375261b3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-diff/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - "arr-diff@^2.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "arr-diff@>=2.0.0 <3.0.0", - "_id": "arr-diff@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/arr-diff", - "_nodeVersion": "5.0.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "arr-diff", - "raw": "arr-diff@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "_shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", - "_shrinkwrap": null, - "_spec": "arr-diff@^2.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/arr-diff/issues" - }, - "dependencies": { - "arr-flatten": "^1.0.1" - }, - "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", - "devDependencies": { - "array-differ": "^1.0.0", - "array-slice": "^0.2.3", - "benchmarked": "^0.1.4", - "chalk": "^1.1.1", - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "8f3b827f955a8bd669697e4a4256ac3ceae356cf", - "tarball": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "b89f54eb88ca51afd0e0ea6be9a4a63e5ccecf27", - "homepage": "https://github.com/jonschlinkert/arr-diff", - "keywords": [ - "arr", - "array", - "diff", - "differ", - "difference" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - }, - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "paul@paulmillr.com", - "name": "paulmillr" - } - ], - "name": "arr-diff", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/arr-diff.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "arr-flatten", - "array-filter", - "array-intersection" - ] - } - }, - "version": "2.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE deleted file mode 100755 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md deleted file mode 100755 index bd696e660b5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# arr-flatten [![NPM version](https://badge.fury.io/js/arr-flatten.svg)](http://badge.fury.io/js/arr-flatten) [![Build Status](https://travis-ci.org/jonschlinkert/arr-flatten.svg)](https://travis-ci.org/jonschlinkert/arr-flatten) - -> Recursively flatten an array or arrays. This is the fastest implementation of array flatten. - -Why another flatten utility? I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. - -## Run benchmarks - -```bash -npm run benchmarks -``` - -Benchmark results comparing this library to [array-flatten]: - -```bash -#1: large.js - arr-flatten.js x 487,030 ops/sec ±0.67% (92 runs sampled) - array-flatten.js x 347,020 ops/sec ±0.57% (98 runs sampled) - -#2: medium.js - arr-flatten.js x 1,914,516 ops/sec ±0.76% (94 runs sampled) - array-flatten.js x 1,391,661 ops/sec ±0.63% (96 runs sampled) - -#3: small.js - arr-flatten.js x 5,158,980 ops/sec ±0.85% (94 runs sampled) - array-flatten.js x 3,683,173 ops/sec ±0.79% (97 runs sampled) -``` - -## Run tests - -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Install with [npm](npmjs.org) - -```bash -npm i arr-flatten --save -``` -### Install with [bower](https://github.com/bower/bower) - -```bash -bower install arr-flatten --save -``` - - -## Usage - -```js -var flatten = require('arr-flatten'); - -flatten(['a', ['b', ['c']], 'd', ['e']]); -//=> ['a', 'b', 'c', 'd', 'e'] -``` - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2014-2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 11, 2015._ - -[array-flatten]: https://github.com/blakeembrey/array-flatten \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js deleted file mode 100755 index f74e48c2978..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/*! - * arr-flatten - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -module.exports = function flatten(arr) { - return flat(arr, []); -}; - -function flat(arr, res) { - var len = arr.length; - var i = -1; - - while (len--) { - var cur = arr[++i]; - if (Array.isArray(cur)) { - flat(cur, res); - } else { - res.push(cur); - } - } - return res; -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json b/src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json deleted file mode 100644 index 29ab89ee9d2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arr-flatten/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - "arr-flatten@^1.0.1", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/arr-diff" - ] - ], - "_from": "arr-flatten@>=1.0.1 <2.0.0", - "_id": "arr-flatten@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/arr-flatten", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "arr-flatten", - "raw": "arr-flatten@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/arr-diff" - ], - "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz", - "_shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b", - "_shrinkwrap": null, - "_spec": "arr-flatten@^1.0.1", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/arr-diff", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/arr-flatten/issues" - }, - "dependencies": {}, - "description": "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.", - "devDependencies": { - "array-flatten": "^1.0.2", - "array-slice": "^0.2.2", - "benchmarked": "^0.1.3", - "chalk": "^0.5.1", - "glob": "^4.3.5", - "kind-of": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "e5ffe54d45e19f32f216e91eb99c8ce892bb604b", - "tarball": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "7b3706eaa0093d8f5ba65af8ed590b6fcb3fe7cf", - "homepage": "https://github.com/jonschlinkert/arr-flatten", - "keywords": [ - "arr", - "array", - "elements", - "flat", - "flatten", - "nested", - "recurse", - "recursive", - "recursively" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/arr-flatten/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "arr-flatten", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/arr-flatten.git" - }, - "scripts": { - "benchmarks": "node benchmark", - "test": "mocha" - }, - "version": "1.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE b/src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE deleted file mode 100755 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/array-unique/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/README.md b/src/filesystem/impls/appshell/node/node_modules/array-unique/README.md deleted file mode 100755 index 2e287743ae9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/array-unique/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique) - -> Return an array free of duplicate values. Fastest ES5 implementation. - -## Install with [npm](npmjs.org) - -```bash -npm i array-unique --save -``` - -## Usage - -```js -var unique = require('array-unique'); - -unique(['a', 'b', 'c', 'c']); -//=> ['a', 'b', 'c'] -``` - -## Related -* [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. -* [arr-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons. -* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. -* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements. -* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map. -* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection. - -## Run tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-unique/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/index.js b/src/filesystem/impls/appshell/node/node_modules/array-unique/index.js deleted file mode 100755 index 7fa75af90a2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/array-unique/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/*! - * array-unique - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -module.exports = function unique(arr) { - if (!Array.isArray(arr)) { - throw new TypeError('array-unique expects an array.'); - } - - var len = arr.length; - var i = -1; - - while (i++ < len) { - var j = i + 1; - - for (; j < arr.length; ++j) { - if (arr[i] === arr[j]) { - arr.splice(j--, 1); - } - } - } - return arr; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/array-unique/package.json b/src/filesystem/impls/appshell/node/node_modules/array-unique/package.json deleted file mode 100644 index 85537835437..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/array-unique/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_args": [ - [ - "array-unique@^0.2.1", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "array-unique@>=0.2.1 <0.3.0", - "_id": "array-unique@0.2.1", - "_inCache": true, - "_installable": true, - "_location": "/array-unique", - "_nodeVersion": "1.6.2", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.7.1", - "_phantomChildren": {}, - "_requested": { - "name": "array-unique", - "raw": "array-unique@^0.2.1", - "rawSpec": "^0.2.1", - "scope": null, - "spec": ">=0.2.1 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "_shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", - "_shrinkwrap": null, - "_spec": "array-unique@^0.2.1", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/array-unique/issues" - }, - "dependencies": {}, - "description": "Return an array free of duplicate values. Fastest ES5 implementation.", - "devDependencies": { - "array-uniq": "^1.0.2", - "benchmarked": "^0.1.3", - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "a1d97ccafcbc2625cc70fadceb36a50c58b01a53", - "tarball": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "36fde8e586fb7cf880b8b3aa6515df889e64ed85", - "homepage": "https://github.com/jonschlinkert/array-unique", - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/array-unique/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "array-unique", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/array-unique.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.2.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/index.js b/src/filesystem/impls/appshell/node/node_modules/arrify/index.js deleted file mode 100644 index 2a2fdeeb1dc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arrify/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = function (val) { - if (val === null || val === undefined) { - return []; - } - - return Array.isArray(val) ? val : [val]; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/license b/src/filesystem/impls/appshell/node/node_modules/arrify/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arrify/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/package.json b/src/filesystem/impls/appshell/node/node_modules/arrify/package.json deleted file mode 100644 index cdba4785acb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arrify/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "arrify@^1.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch" - ] - ], - "_from": "arrify@>=1.0.0 <2.0.0", - "_id": "arrify@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/arrify", - "_nodeVersion": "4.2.1", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "3.5.2", - "_phantomChildren": {}, - "_requested": { - "name": "arrify", - "raw": "arrify@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/anymatch" - ], - "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "_shasum": "898508da2226f380df904728456849c1501a4b0d", - "_shrinkwrap": null, - "_spec": "arrify@^1.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/arrify/issues" - }, - "dependencies": {}, - "description": "Convert a value to an array", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "898508da2226f380df904728456849c1501a4b0d", - "tarball": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "087edee1a58d5adaac6cae5a107886121ef43783", - "homepage": "https://github.com/sindresorhus/arrify#readme", - "keywords": [ - "array", - "arr", - "arrify", - "arrayify", - "convert", - "value" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "arrify", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/arrify.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/arrify/readme.md b/src/filesystem/impls/appshell/node/node_modules/arrify/readme.md deleted file mode 100644 index 183d07576f1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/arrify/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) - -> Convert a value to an array - - -## Install - -``` -$ npm install --save arrify -``` - - -## Usage - -```js -const arrify = require('arrify'); - -arrify('unicorn'); -//=> ['unicorn'] - -arrify(['unicorn']); -//=> ['unicorn'] - -arrify(null); -//=> [] - -arrify(undefined); -//=> [] -``` - -*Supplying `null` or `undefined` results in an empty array.* - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore b/src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore deleted file mode 100644 index b2971ef95be..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/async-each/.npmignore +++ /dev/null @@ -1,25 +0,0 @@ -# Numerous always-ignore extensions -*.diff -*.err -*.orig -*.log -*~ - -# OS or Editor folders -.DS_Store -.cache -Icon? - -# Folders to ignore -.hg -.svn - -# Node.js package manager -/node_modules -/npm-debug.log - -# Other stuff -*.pyc -/tmp - -# Project stuff diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md deleted file mode 100644 index bee25486054..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/async-each/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -# async-each 1.0.0 (26 November 2015) -* Bumped version to 1.0.0 (no functional changes) - -# async-each 0.1.6 (5 November 2014) -* Add license to package.json - -# async-each 0.1.5 (22 October 2014) -* Clean up package.json to fix npm warning about `repo` - -# async-each 0.1.4 (12 November 2013) -* Fixed AMD definition. - -# async-each 0.1.3 (25 July 2013) -* Fixed double wrapping of errors. - -# async-each 0.1.2 (7 July 2013) -* Fixed behaviour on empty arrays. - -# async-each 0.1.1 (14 June 2013) -* Wrapped function in closure, enabled strict mode. - -# async-each 0.1.0 (14 June 2013) -* Initial release. diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/README.md b/src/filesystem/impls/appshell/node/node_modules/async-each/README.md deleted file mode 100644 index c27fcf4f37f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/async-each/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# async-each - -No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach function for JavaScript. - -We don't need junky 30K async libs. Really. - -For browsers and node.js. - -## Installation -* Just include async-each before your scripts. -* `npm install async-each` if you’re using node.js. -* `component install paulmillr/async-each` if you’re using [component(1)](https://github.com/component/component). -* `bower install async-each` if you’re using [Twitter Bower](http://bower.io). - -## Usage - -* `each(array, iterator, callback);` — `Array`, `Function`, `(optional) Function` -* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments. -* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`. - -Node.js: - -```javascript -var each = require('async-each'); -each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) { - if (error) console.error(error); - console.log('Contents for a, b and c:', contents); -}); -``` - -Browser: - -```javascript -// component(1) -var each = require('async-each'); -each(list, fn, callback); - -// Default: -window.asyncEach(list, fn, callback); -``` - -## License - -The MIT License (MIT) - -Copyright (c) 2013 Paul Miller [paulmillr.com](http://paulmillr.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/bower.json b/src/filesystem/impls/appshell/node/node_modules/async-each/bower.json deleted file mode 100644 index cdaca940e4a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/async-each/bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "async-each", - "repo": "paulmillr/async-each", - "description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.", - "version": "1.0.0", - "keywords": [ - "async", "forEach", "each", "map", - "asynchronous", - "iteration", "iterate", - "loop", "parallel", - "concurrent", "array", - "flow", "control flow" - ], - "main": "index.js", - "dependencies": {}, - "development": {}, - "ignore": [ - "**/.*", - "node_modules", - "bower_components" - ] -} diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/component.json b/src/filesystem/impls/appshell/node/node_modules/async-each/component.json deleted file mode 100644 index 40fc3565a4a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/async-each/component.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "async-each", - "repo": "paulmillr/async-each", - "description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.", - "version": "1.0.0", - "keywords": [ - "async", "forEach", "each", "map", - "asynchronous", - "iteration", "iterate", - "loop", "parallel", - "concurrent", "array", - "flow", "control flow" - ], - "main": "index.js", - "scripts": ["index.js"], - "dependencies": {}, - "development": {} -} diff --git a/src/filesystem/impls/appshell/node/node_modules/async-each/index.js b/src/filesystem/impls/appshell/node/node_modules/async-each/index.js deleted file mode 100644 index 1c51c958884..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/async-each/index.js +++ /dev/null @@ -1,38 +0,0 @@ -// async-each MIT license (by Paul Miller from http://paulmillr.com). -(function(globals) { - 'use strict'; - var each = function(items, next, callback) { - if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument'); - if (typeof next !== 'function') throw new TypeError('each() expects function as second argument'); - if (typeof callback !== 'function') callback = Function.prototype; // no-op - - if (items.length === 0) return callback(undefined, items); - - var transformed = new Array(items.length); - var count = 0; - var returned = false; - - items.forEach(function(item, index) { - next(item, function(error, transformedItem) { - if (returned) return; - if (error) { - returned = true; - return callback(error); - } - transformed[index] = transformedItem; - count += 1; - if (count === items.length) return callback(undefined, transformed); - }); - }); - }; - - if (typeof define !== 'undefined' && define.amd) { - define([], function() { - return each; - }); // RequireJS - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = each; // CommonJS - } else { - globals.asyncEach = each; // - -``` - -## Documentation - -Some functions are also available in the following forms: -* `Series` - the same as `` but runs only a single async operation at a time -* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time - -### Collections - -* [`each`](#each), `eachSeries`, `eachLimit` -* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit` -* [`map`](#map), `mapSeries`, `mapLimit` -* [`filter`](#filter), `filterSeries`, `filterLimit` -* [`reject`](#reject), `rejectSeries`, `rejectLimit` -* [`reduce`](#reduce), [`reduceRight`](#reduceRight) -* [`detect`](#detect), `detectSeries`, `detectLimit` -* [`sortBy`](#sortBy) -* [`some`](#some), `someLimit` -* [`every`](#every), `everyLimit` -* [`concat`](#concat), `concatSeries` - -### Control Flow - -* [`series`](#seriestasks-callback) -* [`parallel`](#parallel), `parallelLimit` -* [`whilst`](#whilst), [`doWhilst`](#doWhilst) -* [`until`](#until), [`doUntil`](#doUntil) -* [`during`](#during), [`doDuring`](#doDuring) -* [`forever`](#forever) -* [`waterfall`](#waterfall) -* [`compose`](#compose) -* [`seq`](#seq) -* [`applyEach`](#applyEach), `applyEachSeries` -* [`queue`](#queue), [`priorityQueue`](#priorityQueue) -* [`cargo`](#cargo) -* [`auto`](#auto) -* [`retry`](#retry) -* [`iterator`](#iterator) -* [`times`](#times), `timesSeries`, `timesLimit` - -### Utils - -* [`apply`](#apply) -* [`nextTick`](#nextTick) -* [`memoize`](#memoize) -* [`unmemoize`](#unmemoize) -* [`ensureAsync`](#ensureAsync) -* [`constant`](#constant) -* [`asyncify`](#asyncify) -* [`wrapSync`](#wrapSync) -* [`log`](#log) -* [`dir`](#dir) -* [`noConflict`](#noConflict) - -## Collections - - - -### each(arr, iterator, [callback]) - -Applies the function `iterator` to each item in `arr`, in parallel. -The `iterator` is called with an item from the list, and a callback for when it -has finished. If the `iterator` passes an error to its `callback`, the main -`callback` (for the `each` function) is immediately called with the error. - -Note, that since this function applies `iterator` to each item in parallel, -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err)` which must be called once it has - completed. If no error has occurred, the `callback` should be run without - arguments or with an explicit `null` argument. The array index is not passed - to the iterator. If you need the index, use [`forEachOf`](#forEachOf). -* `callback(err)` - *Optional* A callback which is called when all `iterator` functions - have finished, or an error occurs. - -__Examples__ - - -```js -// assuming openFiles is an array of file names and saveFile is a function -// to save the modified contents of that file: - -async.each(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - -```js -// assuming openFiles is an array of file names - -async.each(openFiles, function(file, callback) { - - // Perform operation on file here. - console.log('Processing file ' + file); - - if( file.length > 32 ) { - console.log('This file name is too long'); - callback('File name too long'); - } else { - // Do work to process file here - console.log('File processed'); - callback(); - } -}, function(err){ - // if any of the file processing produced an error, err would equal that error - if( err ) { - // One of the iterations produced an error. - // All processing will now stop. - console.log('A file failed to process'); - } else { - console.log('All files have been processed successfully'); - } -}); -``` - -__Related__ - -* eachSeries(arr, iterator, [callback]) -* eachLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - - - -### forEachOf(obj, iterator, [callback]) - -Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator. - -__Arguments__ - -* `obj` - An object or array to iterate over. -* `iterator(item, key, callback)` - A function to apply to each item in `obj`. -The `key` is the item's key, or index in the case of an array. The iterator is -passed a `callback(err)` which must be called once it has completed. If no -error has occurred, the callback should be run without arguments or with an -explicit `null` argument. -* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs. - -__Example__ - -```js -var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; -var configs = {}; - -async.forEachOf(obj, function (value, key, callback) { - fs.readFile(__dirname + value, "utf8", function (err, data) { - if (err) return callback(err); - try { - configs[key] = JSON.parse(data); - } catch (e) { - return callback(e); - } - callback(); - }) -}, function (err) { - if (err) console.error(err.message); - // configs is now a map of JSON data - doSomethingWith(configs); -}) -``` - -__Related__ - -* forEachOfSeries(obj, iterator, [callback]) -* forEachOfLimit(obj, limit, iterator, [callback]) - ---------------------------------------- - - -### map(arr, iterator, [callback]) - -Produces a new array of values by mapping each value in `arr` through -the `iterator` function. The `iterator` is called with an item from `arr` and a -callback for when it has finished processing. Each of these callback takes 2 arguments: -an `error`, and the transformed item from `arr`. If `iterator` passes an error to its -callback, the main `callback` (for the `map` function) is immediately called with the error. - -Note, that since this function applies the `iterator` to each item in parallel, -there is no guarantee that the `iterator` functions will complete in order. -However, the results array will be in the same order as the original `arr`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, transformed)` which must be called once - it has completed with an error (which can be `null`) and a transformed item. -* `callback(err, results)` - *Optional* A callback which is called when all `iterator` - functions have finished, or an error occurs. Results is an array of the - transformed items from the `arr`. - -__Example__ - -```js -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - -__Related__ -* mapSeries(arr, iterator, [callback]) -* mapLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - - -### filter(arr, iterator, [callback]) - -__Alias:__ `select` - -Returns a new array of all the values in `arr` which pass an async truth test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The `iterator` is passed a `callback(truthValue)`, which must be called with a - boolean argument once it has completed. -* `callback(results)` - *Optional* A callback which is called after all the `iterator` - functions have finished. - -__Example__ - -```js -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); -``` - -__Related__ - -* filterSeries(arr, iterator, [callback]) -* filterLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### reject(arr, iterator, [callback]) - -The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. - -__Related__ - -* rejectSeries(arr, iterator, [callback]) -* rejectLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### reduce(arr, memo, iterator, [callback]) - -__Aliases:__ `inject`, `foldl` - -Reduces `arr` into a single value using an async `iterator` to return -each successive step. `memo` is the initial state of the reduction. -This function only operates in series. - -For performance reasons, it may make sense to split a call to this function into -a parallel map, and then use the normal `Array.prototype.reduce` on the results. -This function is for situations where each step in the reduction needs to be async; -if you can get the data before reducing it, then it's probably a good idea to do so. - -__Arguments__ - -* `arr` - An array to iterate over. -* `memo` - The initial state of the reduction. -* `iterator(memo, item, callback)` - A function applied to each item in the - array to produce the next step in the reduction. The `iterator` is passed a - `callback(err, reduction)` which accepts an optional error as its first - argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main `callback` is - immediately called with the error. -* `callback(err, result)` - *Optional* A callback which is called after all the `iterator` - functions have finished. Result is the reduced value. - -__Example__ - -```js -async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); -}, function(err, result){ - // result is now equal to the last value of memo, which is 6 -}); -``` - ---------------------------------------- - - -### reduceRight(arr, memo, iterator, [callback]) - -__Alias:__ `foldr` - -Same as [`reduce`](#reduce), only operates on `arr` in reverse order. - - ---------------------------------------- - - -### detect(arr, iterator, [callback]) - -Returns the first value in `arr` that passes an async truth test. The -`iterator` is applied in parallel, meaning the first iterator to return `true` will -fire the detect `callback` with that result. That means the result might not be -the first item in the original `arr` (in terms of order) that passes the test. - -If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in `arr`. - The iterator is passed a `callback(truthValue)` which must be called with a - boolean argument once it has completed. **Note: this callback does not take an error as its first argument.** -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `true`, or after all the `iterator` functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value `undefined` if none passed. **Note: this callback does not take an error as its first argument.** - -__Example__ - -```js -async.detect(['file1','file2','file3'], fs.exists, function(result){ - // result now equals the first file in the list that exists -}); -``` - -__Related__ - -* detectSeries(arr, iterator, [callback]) -* detectLimit(arr, limit, iterator, [callback]) - ---------------------------------------- - - -### sortBy(arr, iterator, [callback]) - -Sorts a list by the results of running each `arr` value through an async `iterator`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, sortValue)` which must be called once it - has completed with an error (which can be `null`) and a value to use as the sort - criteria. -* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is the items from - the original `arr` sorted by the values returned by the `iterator` calls. - -__Example__ - -```js -async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); -}, function(err, results){ - // results is now the original array of files sorted by - // modified date -}); -``` - -__Sort Order__ - -By modifying the callback parameter the sorting order can be influenced: - -```js -//ascending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x); -}, function(err,result){ - //result callback -} ); - -//descending order -async.sortBy([1,9,3,5], function(x, callback){ - callback(null, x*-1); //<- x*-1 instead of x, turns the order around -}, function(err,result){ - //result callback -} ); -``` - ---------------------------------------- - - -### some(arr, iterator, [callback]) - -__Alias:__ `any` - -Returns `true` if at least one element in the `arr` satisfies an async test. -_The callback for each iterator call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. Once any iterator -call returns `true`, the main `callback` is immediately called. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a `callback(truthValue)`` which must be - called with a boolean argument once it has completed. -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `true`, or after all the iterator functions have finished. Result will be - either `true` or `false` depending on the values of the async tests. - - **Note: the callbacks do not take an error as their first argument.** -__Example__ - -```js -async.some(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then at least one of the files exists -}); -``` - -__Related__ - -* someLimit(arr, limit, iterator, callback) - ---------------------------------------- - - -### every(arr, iterator, [callback]) - -__Alias:__ `all` - -Returns `true` if every element in `arr` satisfies an async test. -_The callback for each `iterator` call only accepts a single argument of `true` or -`false`; it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like `fs.exists`. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A truth test to apply to each item in the array - in parallel. The iterator is passed a `callback(truthValue)` which must be - called with a boolean argument once it has completed. -* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns - `false`, or after all the iterator functions have finished. Result will be - either `true` or `false` depending on the values of the async tests. - - **Note: the callbacks do not take an error as their first argument.** - -__Example__ - -```js -async.every(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then every file exists -}); -``` - -__Related__ - -* everyLimit(arr, limit, iterator, callback) - ---------------------------------------- - - -### concat(arr, iterator, [callback]) - -Applies `iterator` to each item in `arr`, concatenating the results. Returns the -concatenated list. The `iterator`s are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of `arr` passed to the `iterator` function. - -__Arguments__ - -* `arr` - An array to iterate over. -* `iterator(item, callback)` - A function to apply to each item in `arr`. - The iterator is passed a `callback(err, results)` which must be called once it - has completed with an error (which can be `null`) and an array of results. -* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` - functions have finished, or an error occurs. Results is an array containing - the concatenated results of the `iterator` function. - -__Example__ - -```js -async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories -}); -``` - -__Related__ - -* concatSeries(arr, iterator, [callback]) - - -## Control Flow - - -### series(tasks, [callback]) - -Run the functions in the `tasks` array in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run, and `callback` is immediately called with the value of the error. -Otherwise, `callback` receives an array of results when `tasks` have completed. - -It is also possible to use an object instead of an array. Each property will be -run as a function, and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`series`](#series). - -**Note** that while many implementations preserve the order of object properties, the -[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) -explicitly states that - -> The mechanics and order of enumerating the properties is not specified. - -So if you rely on the order in which your series of functions are executed, and want -this to work on all platforms, consider using an array. - -__Arguments__ - -* `tasks` - An array or object containing functions to run, each function is passed - a `callback(err, result)` it must call on completion with an error `err` (which can - be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the `task` callbacks. - -__Example__ - -```js -async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - } -], -// optional callback -function(err, results){ - // results is now equal to ['one', 'two'] -}); - - -// an example using an object instead of an array -async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equal to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - - -### parallel(tasks, [callback]) - -Run the `tasks` array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main `callback` is immediately called with the value of the error. -Once the `tasks` have completed, the results are passed to the final `callback` as an -array. - -**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final `callback` as an object -instead of an array. This can be a more readable way of handling results from -[`parallel`](#parallel). - - -__Arguments__ - -* `tasks` - An array or object containing functions to run. Each function is passed - a `callback(err, result)` which it must call on completion with an error `err` - (which can be `null`) and an optional `result` value. -* `callback(err, results)` - An optional callback to run once all the functions - have completed successfully. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - } -], -// optional callback -function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. -}); - - -// an example using an object instead of an array -async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equals to: {one: 1, two: 2} -}); -``` - -__Related__ - -* parallelLimit(tasks, limit, [callback]) - ---------------------------------------- - - -### whilst(test, fn, callback) - -Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, -or an error occurs. - -__Arguments__ - -* `test()` - synchronous truth test to perform before each execution of `fn`. -* `fn(callback)` - A function which is called each time `test` passes. The function is - passed a `callback(err)`, which must be called once it has completed with an - optional `err` argument. -* `callback(err, [results])` - A callback which is called after the test - function has failed and repeated execution of `fn` has stopped. `callback` - will be passed an error and any arguments passed to the final `fn`'s callback. - -__Example__ - -```js -var count = 0; - -async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(function () { - callback(null, count); - }, 1000); - }, - function (err, n) { - // 5 seconds have passed, n = 5 - } -); -``` - ---------------------------------------- - - -### doWhilst(fn, test, callback) - -The post-check version of [`whilst`](#whilst). To reflect the difference in -the order of operations, the arguments `test` and `fn` are switched. - -`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - ---------------------------------------- - - -### until(test, fn, callback) - -Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, -or an error occurs. `callback` will be passed an error and any arguments passed -to the final `fn`'s callback. - -The inverse of [`whilst`](#whilst). - ---------------------------------------- - - -### doUntil(fn, test, callback) - -Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. - ---------------------------------------- - - -### during(test, fn, callback) - -Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error. - -__Example__ - -```js -var count = 0; - -async.during( - function (callback) { - return callback(null, count < 5); - }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - - -### doDuring(fn, test, callback) - -The post-check version of [`during`](#during). To reflect the difference in -the order of operations, the arguments `test` and `fn` are switched. - -Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function. - ---------------------------------------- - - -### forever(fn, [errback]) - -Calls the asynchronous function `fn` with a callback parameter that allows it to -call itself again, in series, indefinitely. - -If an error is passed to the callback then `errback` is called with the -error, and execution stops, otherwise it will never be called. - -```js -async.forever( - function(next) { - // next is suitable for passing to things that need a callback(err [, whatever]); - // it will result in this function being called again. - }, - function(err) { - // if next is called with a value in its first parameter, it will appear - // in here as 'err', and execution will stop. - } -); -``` - ---------------------------------------- - - -### waterfall(tasks, [callback]) - -Runs the `tasks` array of functions in series, each passing their results to the next in -the array. However, if any of the `tasks` pass an error to their own callback, the -next function is not executed, and the main `callback` is immediately called with -the error. - -__Arguments__ - -* `tasks` - An array of functions to run, each function is passed a - `callback(err, result1, result2, ...)` it must call on completion. The first - argument is an error (which can be `null`) and any further arguments will be - passed as arguments in order to the next task. -* `callback(err, [results])` - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - -```js -async.waterfall([ - function(callback) { - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); - }, - function(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); - } -], function (err, result) { - // result now equals 'done' -}); -``` -Or, with named functions: - -```js -async.waterfall([ - myFirstFunction, - mySecondFunction, - myLastFunction, -], function (err, result) { - // result now equals 'done' -}); -function myFirstFunction(callback) { - callback(null, 'one', 'two'); -} -function mySecondFunction(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); -} -function myLastFunction(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); -} -``` - -Or, if you need to pass any argument to the first function: - -```js -async.waterfall([ - async.apply(myFirstFunction, 'zero'), - mySecondFunction, - myLastFunction, -], function (err, result) { - // result now equals 'done' -}); -function myFirstFunction(arg1, callback) { - // arg1 now equals 'zero' - callback(null, 'one', 'two'); -} -function mySecondFunction(arg1, arg2, callback) { - // arg1 now equals 'one' and arg2 now equals 'two' - callback(null, 'three'); -} -function myLastFunction(arg1, callback) { - // arg1 now equals 'three' - callback(null, 'done'); -} -``` - ---------------------------------------- - -### compose(fn1, fn2...) - -Creates a function which is a composition of the passed asynchronous -functions. Each function consumes the return value of the function that -follows. Composing functions `f()`, `g()`, and `h()` would produce the result of -`f(g(h()))`, only this version uses callbacks to obtain the return values. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* `functions...` - the asynchronous functions to compose - - -__Example__ - -```js -function add1(n, callback) { - setTimeout(function () { - callback(null, n + 1); - }, 10); -} - -function mul3(n, callback) { - setTimeout(function () { - callback(null, n * 3); - }, 10); -} - -var add1mul3 = async.compose(mul3, add1); - -add1mul3(4, function (err, result) { - // result now equals 15 -}); -``` - ---------------------------------------- - -### seq(fn1, fn2...) - -Version of the compose function that is more natural to read. -Each function consumes the return value of the previous function. -It is the equivalent of [`compose`](#compose) with the arguments reversed. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* `functions...` - the asynchronous functions to compose - - -__Example__ - -```js -// Requires lodash (or underscore), express3 and dresende's orm2. -// Part of an app, that fetches cats of the logged user. -// This example uses `seq` function to avoid overnesting and error -// handling clutter. -app.get('/cats', function(request, response) { - var User = request.models.User; - async.seq( - _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) - function(user, fn) { - user.getCats(fn); // 'getCats' has signature (callback(err, data)) - } - )(req.session.user_id, function (err, cats) { - if (err) { - console.error(err); - response.json({ status: 'error', message: err.message }); - } else { - response.json({ status: 'ok', message: 'Cats found', data: cats }); - } - }); -}); -``` - ---------------------------------------- - -### applyEach(fns, args..., callback) - -Applies the provided arguments to each function in the array, calling -`callback` after all functions have completed. If you only provide the first -argument, then it will return a function which lets you pass in the -arguments as if it were a single function call. - -__Arguments__ - -* `fns` - the asynchronous functions to all call with the same arguments -* `args...` - any number of separate arguments to pass to the function -* `callback` - the final argument should be the callback, called when all - functions have completed processing - - -__Example__ - -```js -async.applyEach([enableSearch, updateSchema], 'bucket', callback); - -// partial application example: -async.each( - buckets, - async.applyEach([enableSearch, updateSchema]), - callback -); -``` - -__Related__ - -* applyEachSeries(tasks, args..., [callback]) - ---------------------------------------- - - -### queue(worker, [concurrency]) - -Creates a `queue` object with the specified `concurrency`. Tasks added to the -`queue` are processed in parallel (up to the `concurrency` limit). If all -`worker`s are in progress, the task is queued until one becomes available. -Once a `worker` completes a `task`, that `task`'s callback is called. - -__Arguments__ - -* `worker(task, callback)` - An asynchronous function for processing a queued - task, which must call its `callback(err)` argument when finished, with an - optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`. -* `concurrency` - An `integer` for determining how many `worker` functions should be - run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown. - -__Queue objects__ - -The `queue` object returned by this function has the following properties and -methods: - -* `length()` - a function returning the number of items waiting to be processed. -* `started` - a function returning whether or not any items have been pushed and processed by the queue -* `running()` - a function returning the number of items currently being processed. -* `workersList()` - a function returning the array of items currently being processed. -* `idle()` - a function returning false if there are items waiting or being processed, or true if not. -* `concurrency` - an integer for determining how many `worker` functions should be - run in parallel. This property can be changed after a `queue` is created to - alter the concurrency on-the-fly. -* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once - the `worker` has finished processing the task. Instead of a single task, a `tasks` array - can be submitted. The respective callback is used for every task in the list. -* `unshift(task, [callback])` - add a new task to the front of the `queue`. -* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, - and further tasks will be queued. -* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. -* `paused` - a boolean for determining whether the queue is in a paused state -* `pause()` - a function that pauses the processing of tasks until `resume()` is called. -* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. -* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. - -__Example__ - -```js -// create a queue object with concurrency 2 - -var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); -}, 2); - - -// assign a callback -q.drain = function() { - console.log('all items have been processed'); -} - -// add some items to the queue - -q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); - -// add some items to the queue (batch-wise) - -q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing item'); -}); - -// add some items to the front of the queue - -q.unshift({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -``` - - ---------------------------------------- - - -### priorityQueue(worker, concurrency) - -The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: - -* `push(task, priority, [callback])` - `priority` should be a number. If an array of - `tasks` is given, all tasks will be assigned the same priority. -* The `unshift` method was removed. - ---------------------------------------- - - -### cargo(worker, [payload]) - -Creates a `cargo` object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the `payload` limit). If the -`worker` is in progress, the task is queued until it becomes available. Once -the `worker` has completed some tasks, each callback of those tasks is called. -Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work. - -While [queue](#queue) passes only one task to one of a group of workers -at a time, cargo passes an array of tasks to a single worker, repeating -when the worker is finished. - -__Arguments__ - -* `worker(tasks, callback)` - An asynchronous function for processing an array of - queued tasks, which must call its `callback(err)` argument when finished, with - an optional `err` argument. -* `payload` - An optional `integer` for determining how many tasks should be - processed per round; if omitted, the default is unlimited. - -__Cargo objects__ - -The `cargo` object returned by this function has the following properties and -methods: - -* `length()` - A function returning the number of items waiting to be processed. -* `payload` - An `integer` for determining how many tasks should be - process per round. This property can be changed after a `cargo` is created to - alter the payload on-the-fly. -* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called - once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` - can be submitted. The respective callback is used for every task in the list. -* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. -* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. -* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. -* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue) - -__Example__ - -```js -// create a cargo object with payload 2 - -var cargo = async.cargo(function (tasks, callback) { - for(var i=0; i -### auto(tasks, [concurrency], [callback]) - -Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied. - -If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far. - -Note, all functions are called with a `results` object as a second argument, -so it is unsafe to pass functions in the `tasks` object which cannot handle the -extra argument. - -For example, this snippet of code: - -```js -async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8') -}, callback); -``` - -will have the effect of calling `readFile` with the results object as the last -argument, which will fail: - -```js -fs.readFile('data.txt', 'utf-8', cb, {}); -``` - -Instead, wrap the call to `readFile` in a function which does not forward the -`results` object: - -```js -async.auto({ - readData: function(cb, results){ - fs.readFile('data.txt', 'utf-8', cb); - } -}, callback); -``` - -__Arguments__ - -* `tasks` - An object. Each of its properties is either a function or an array of - requirements, with the function itself the last item in the array. The object's key - of a property serves as the name of the task defined by that property, - i.e. can be used when specifying requirements for other tasks. - The function receives two arguments: (1) a `callback(err, result)` which must be - called when finished, passing an `error` (which can be `null`) and the result of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions. -* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible. -* `callback(err, results)` - An optional callback which is called when all the - tasks have been completed. It receives the `err` argument if any `tasks` - pass an error to their callback. Results are always returned; however, if - an error occurs, no further `tasks` will be performed, and the results - object will only contain partial results. - - -__Example__ - -```js -async.auto({ - get_data: function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - make_folder: function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - }, - write_file: ['get_data', 'make_folder', function(callback, results){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, 'filename'); - }], - email_link: ['write_file', function(callback, results){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - callback(null, {'file':results.write_file, 'email':'user@example.com'}); - }] -}, function(err, results) { - console.log('err = ', err); - console.log('results = ', results); -}); -``` - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - -```js -async.parallel([ - function(callback){ - console.log('in get_data'); - // async code to get some data - callback(null, 'data', 'converted to array'); - }, - function(callback){ - console.log('in make_folder'); - // async code to create a directory to store a file in - // this is run at the same time as getting the data - callback(null, 'folder'); - } -], -function(err, results){ - async.series([ - function(callback){ - console.log('in write_file', JSON.stringify(results)); - // once there is some data and the directory exists, - // write the data to a file in the directory - results.push('filename'); - callback(null); - }, - function(callback){ - console.log('in email_link', JSON.stringify(results)); - // once the file is written let's email a link to it... - callback(null, {'file':results.pop(), 'email':'user@example.com'}); - } - ]); -}); -``` - -For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding -new tasks much easier (and the code more readable). - - ---------------------------------------- - - -### retry([opts = {times: 5, interval: 0}| 5], task, [callback]) - -Attempts to get a successful response from `task` no more than `times` times before -returning an error. If the task is successful, the `callback` will be passed the result -of the successful task. If all attempts fail, the callback will be passed the error and -result (if any) of the final attempt. - -__Arguments__ - -* `opts` - Can be either an object with `times` and `interval` or a number. - * `times` - The number of attempts to make before giving up. The default is `5`. - * `interval` - The time to wait between retries, in milliseconds. The default is `0`. - * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. -* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` - which must be called when finished, passing `err` (which can be `null`) and the `result` of - the function's execution, and (2) a `results` object, containing the results of - the previously executed functions (if nested inside another control flow). -* `callback(err, results)` - An optional callback which is called when the - task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. - -The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below: - -```js -// try calling apiMethod 3 times -async.retry(3, apiMethod, function(err, result) { - // do something with the result -}); -``` - -```js -// try calling apiMethod 3 times, waiting 200 ms between each retry -async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - // do something with the result -}); -``` - -```js -// try calling apiMethod the default 5 times no delay between each retry -async.retry(apiMethod, function(err, result) { - // do something with the result -}); -``` - -It can also be embedded within other control flow functions to retry individual methods -that are not as reliable, like this: - -```js -async.auto({ - users: api.getUsers.bind(api), - payments: async.retry(3, api.getPayments.bind(api)) -}, function(err, results) { - // do something with the results -}); -``` - - ---------------------------------------- - - -### iterator(tasks) - -Creates an iterator function which calls the next function in the `tasks` array, -returning a continuation to call the next one after that. It's also possible to -“peek” at the next iterator with `iterator.next()`. - -This function is used internally by the `async` module, but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* `tasks` - An array of functions to run. - -__Example__ - -```js -var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } -]); - -node> var iterator2 = iterator(); -'one' -node> var iterator3 = iterator2(); -'two' -node> iterator3(); -'three' -node> var nextfn = iterator2.next(); -node> nextfn(); -'three' -``` - ---------------------------------------- - - -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied. - -Useful as a shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - -```js -// using apply - -async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), -]); - - -// the same process without using apply - -async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - } -]); -``` - -It's possible to pass any number of additional arguments when calling the -continuation: - -```js -node> var fn = async.apply(sys.puts, 'one'); -node> fn('two', 'three'); -one -two -three -``` - ---------------------------------------- - - -### nextTick(callback), setImmediate(callback) - -Calls `callback` on a later loop around the event loop. In Node.js this just -calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` -if available, otherwise `setTimeout(callback, 0)`, which means other higher priority -events may precede the execution of `callback`. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* `callback` - The function to call on a later loop around the event loop. - -__Example__ - -```js -var call_order = []; -async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two'] -}); -call_order.push('one') -``` - - -### times(n, iterator, [callback]) - -Calls the `iterator` function `n` times, and accumulates results in the same manner -you would use with [`map`](#map). - -__Arguments__ - -* `n` - The number of times to run the function. -* `iterator` - The function to call `n` times. -* `callback` - see [`map`](#map) - -__Example__ - -```js -// Pretend this is some complicated async factory -var createUser = function(id, callback) { - callback(null, { - id: 'user' + id - }) -} -// generate 5 users -async.times(5, function(n, next){ - createUser(n, function(err, user) { - next(err, user) - }) -}, function(err, users) { - // we should now have 5 users -}); -``` - -__Related__ - -* timesSeries(n, iterator, [callback]) -* timesLimit(n, limit, iterator, [callback]) - - -## Utils - - -### memoize(fn, [hasher]) - -Caches the results of an `async` function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. - -The cache of results is exposed as the `memo` property of the function returned -by `memoize`. - -__Arguments__ - -* `fn` - The function to proxy and cache results from. -* `hasher` - An optional function for generating a custom hash for storing - results. It has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - -```js -var slow_fn = function (name, callback) { - // do something - callback(null, result); -}; -var fn = async.memoize(slow_fn); - -// fn can now be used as if it were slow_fn -fn('some name', function () { - // callback -}); -``` - - -### unmemoize(fn) - -Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized -form. Handy for testing. - -__Arguments__ - -* `fn` - the memoized function - ---------------------------------------- - - -### ensureAsync(fn) - -Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained. - -__Arguments__ - -* `fn` - an async function, one that expects a node-style callback as its last argument - -Returns a wrapped function with the exact same call signature as the function passed in. - -__Example__ - -```js -function sometimesAsync(arg, callback) { - if (cache[arg]) { - return callback(null, cache[arg]); // this would be synchronous!! - } else { - doSomeIO(arg, callback); // this IO would be asynchronous - } -} - -// this has a risk of stack overflows if many results are cached in a row -async.mapSeries(args, sometimesAsync, done); - -// this will defer sometimesAsync's callback if necessary, -// preventing stack overflows -async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - -``` - ---------------------------------------- - - -### constant(values...) - -Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`. - -__Example__ - -```js -async.waterfall([ - async.constant(42), - function (value, next) { - // value === 42 - }, - //... -], callback); - -async.waterfall([ - async.constant(filename, "utf8"), - fs.readFile, - function (fileData, next) { - //... - } - //... -], callback); - -async.auto({ - hostname: async.constant("https://server.net/"), - port: findFreePort, - launchServer: ["hostname", "port", function (cb, options) { - startServer(options, cb); - }], - //... -}, callback); - -``` - ---------------------------------------- - - - -### asyncify(func) - -__Alias:__ `wrapSync` - -Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback. - -__Example__ - -```js -async.waterfall([ - async.apply(fs.readFile, filename, "utf8"), - async.asyncify(JSON.parse), - function (data, next) { - // data is the result of parsing the text. - // If there was a parsing error, it would have been caught. - } -], callback) -``` - -If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example: - -```js -async.waterfall([ - async.apply(fs.readFile, filename, "utf8"), - async.asyncify(function (contents) { - return db.model.create(contents); - }), - function (model, next) { - // `model` is the instantiated model object. - // If there was an error, this function would be skipped. - } -], callback) -``` - -This also means you can asyncify ES2016 `async` functions. - -```js -var q = async.queue(async.asyncify(async function (file) { - var intermediateStep = await processFile(file); - return await somePromise(intermediateStep) -})); - -q.push(files); -``` - ---------------------------------------- - - -### log(function, arguments) - -Logs the result of an `async` function to the `console`. Only works in Node.js or -in browsers that support `console.log` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.log` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); -}; -``` -```js -node> async.log(hello, 'world'); -'hello world' -``` - ---------------------------------------- - - -### dir(function, arguments) - -Logs the result of an `async` function to the `console` using `console.dir` to -display the properties of the resulting object. Only works in Node.js or -in browsers that support `console.dir` and `console.error` (such as FF and Chrome). -If multiple arguments are returned from the async function, `console.dir` is -called on each argument in order. - -__Arguments__ - -* `function` - The function you want to eventually apply all arguments to. -* `arguments...` - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); -}; -``` -```js -node> async.dir(hello, 'world'); -{hello: 'world'} -``` - ---------------------------------------- - - -### noConflict() - -Changes the value of `async` back to its original value, returning a reference to the -`async` object. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js deleted file mode 100644 index 31e7620fb6f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/async/dist/async.js +++ /dev/null @@ -1,1265 +0,0 @@ -/*! - * async - * https://github.com/caolan/async - * - * Copyright 2010-2014 Caolan McMahon - * Released under the MIT license - */ -(function () { - - var async = {}; - function noop() {} - function identity(v) { - return v; - } - function toBool(v) { - return !!v; - } - function notId(v) { - return !v; - } - - // global on the server, window in the browser - var previous_async; - - // Establish the root object, `window` (`self`) in the browser, `global` - // on the server, or `this` in some virtual machines. We use `self` - // instead of `window` for `WebWorker` support. - var root = typeof self === 'object' && self.self === self && self || - typeof global === 'object' && global.global === global && global || - this; - - if (root != null) { - previous_async = root.async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - function only_once(fn) { - return function() { - if (fn === null) throw new Error("Callback was already called."); - fn.apply(this, arguments); - fn = null; - }; - } - - function _once(fn) { - return function() { - if (fn === null) return; - fn.apply(this, arguments); - fn = null; - }; - } - - //// cross-browser compatiblity functions //// - - var _toString = Object.prototype.toString; - - var _isArray = Array.isArray || function (obj) { - return _toString.call(obj) === '[object Array]'; - }; - - // Ported from underscore.js isObject - var _isObject = function(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - }; - - function _isArrayLike(arr) { - return _isArray(arr) || ( - // has a positive integer length property - typeof arr.length === "number" && - arr.length >= 0 && - arr.length % 1 === 0 - ); - } - - function _arrayEach(arr, iterator) { - var index = -1, - length = arr.length; - - while (++index < length) { - iterator(arr[index], index, arr); - } - } - - function _map(arr, iterator) { - var index = -1, - length = arr.length, - result = Array(length); - - while (++index < length) { - result[index] = iterator(arr[index], index, arr); - } - return result; - } - - function _range(count) { - return _map(Array(count), function (v, i) { return i; }); - } - - function _reduce(arr, iterator, memo) { - _arrayEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - } - - function _forEachOf(object, iterator) { - _arrayEach(_keys(object), function (key) { - iterator(object[key], key); - }); - } - - function _indexOf(arr, item) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === item) return i; - } - return -1; - } - - var _keys = Object.keys || function (obj) { - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - function _keyIterator(coll) { - var i = -1; - var len; - var keys; - if (_isArrayLike(coll)) { - len = coll.length; - return function next() { - i++; - return i < len ? i : null; - }; - } else { - keys = _keys(coll); - len = keys.length; - return function next() { - i++; - return i < len ? keys[i] : null; - }; - } - } - - // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) - // This accumulates the arguments passed into an array, after a given index. - // From underscore.js (https://github.com/jashkenas/underscore/pull/2140). - function _restParam(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0); - var rest = Array(length); - for (var index = 0; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - } - // Currently unused but handle cases outside of the switch statement: - // var args = Array(startIndex + 1); - // for (index = 0; index < startIndex; index++) { - // args[index] = arguments[index]; - // } - // args[startIndex] = rest; - // return func.apply(this, args); - }; - } - - function _withoutIndex(iterator) { - return function (value, index, callback) { - return iterator(value, callback); - }; - } - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - - // capture the global reference to guard against fakeTimer mocks - var _setImmediate = typeof setImmediate === 'function' && setImmediate; - - var _delay = _setImmediate ? function(fn) { - // not a direct alias for IE10 compatibility - _setImmediate(fn); - } : function(fn) { - setTimeout(fn, 0); - }; - - if (typeof process === 'object' && typeof process.nextTick === 'function') { - async.nextTick = process.nextTick; - } else { - async.nextTick = _delay; - } - async.setImmediate = _setImmediate ? _delay : async.nextTick; - - - async.forEach = - async.each = function (arr, iterator, callback) { - return async.eachOf(arr, _withoutIndex(iterator), callback); - }; - - async.forEachSeries = - async.eachSeries = function (arr, iterator, callback) { - return async.eachOfSeries(arr, _withoutIndex(iterator), callback); - }; - - - async.forEachLimit = - async.eachLimit = function (arr, limit, iterator, callback) { - return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback); - }; - - async.forEachOf = - async.eachOf = function (object, iterator, callback) { - callback = _once(callback || noop); - object = object || []; - - var iter = _keyIterator(object); - var key, completed = 0; - - while ((key = iter()) != null) { - completed += 1; - iterator(object[key], key, only_once(done)); - } - - if (completed === 0) callback(null); - - function done(err) { - completed--; - if (err) { - callback(err); - } - // Check key is null in case iterator isn't exhausted - // and done resolved synchronously. - else if (key === null && completed <= 0) { - callback(null); - } - } - }; - - async.forEachOfSeries = - async.eachOfSeries = function (obj, iterator, callback) { - callback = _once(callback || noop); - obj = obj || []; - var nextKey = _keyIterator(obj); - var key = nextKey(); - function iterate() { - var sync = true; - if (key === null) { - return callback(null); - } - iterator(obj[key], key, only_once(function (err) { - if (err) { - callback(err); - } - else { - key = nextKey(); - if (key === null) { - return callback(null); - } else { - if (sync) { - async.setImmediate(iterate); - } else { - iterate(); - } - } - } - })); - sync = false; - } - iterate(); - }; - - - - async.forEachOfLimit = - async.eachOfLimit = function (obj, limit, iterator, callback) { - _eachOfLimit(limit)(obj, iterator, callback); - }; - - function _eachOfLimit(limit) { - - return function (obj, iterator, callback) { - callback = _once(callback || noop); - obj = obj || []; - var nextKey = _keyIterator(obj); - if (limit <= 0) { - return callback(null); - } - var done = false; - var running = 0; - var errored = false; - - (function replenish () { - if (done && running <= 0) { - return callback(null); - } - - while (running < limit && !errored) { - var key = nextKey(); - if (key === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iterator(obj[key], key, only_once(function (err) { - running -= 1; - if (err) { - callback(err); - errored = true; - } - else { - replenish(); - } - })); - } - })(); - }; - } - - - function doParallel(fn) { - return function (obj, iterator, callback) { - return fn(async.eachOf, obj, iterator, callback); - }; - } - function doParallelLimit(fn) { - return function (obj, limit, iterator, callback) { - return fn(_eachOfLimit(limit), obj, iterator, callback); - }; - } - function doSeries(fn) { - return function (obj, iterator, callback) { - return fn(async.eachOfSeries, obj, iterator, callback); - }; - } - - function _asyncMap(eachfn, arr, iterator, callback) { - callback = _once(callback || noop); - arr = arr || []; - var results = _isArrayLike(arr) ? [] : {}; - eachfn(arr, function (value, index, callback) { - iterator(value, function (err, v) { - results[index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = doParallelLimit(_asyncMap); - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.inject = - async.foldl = - async.reduce = function (arr, memo, iterator, callback) { - async.eachOfSeries(arr, function (x, i, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - - async.foldr = - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, identity).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - - async.transform = function (arr, memo, iterator, callback) { - if (arguments.length === 3) { - callback = iterator; - iterator = memo; - memo = _isArray(arr) ? [] : {}; - } - - async.eachOf(arr, function(v, k, cb) { - iterator(memo, v, k, cb); - }, function(err) { - callback(err, memo); - }); - }; - - function _filter(eachfn, arr, iterator, callback) { - var results = []; - eachfn(arr, function (x, index, callback) { - iterator(x, function (v) { - if (v) { - results.push({index: index, value: x}); - } - callback(); - }); - }, function () { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - } - - async.select = - async.filter = doParallel(_filter); - - async.selectLimit = - async.filterLimit = doParallelLimit(_filter); - - async.selectSeries = - async.filterSeries = doSeries(_filter); - - function _reject(eachfn, arr, iterator, callback) { - _filter(eachfn, arr, function(value, cb) { - iterator(value, function(v) { - cb(!v); - }); - }, callback); - } - async.reject = doParallel(_reject); - async.rejectLimit = doParallelLimit(_reject); - async.rejectSeries = doSeries(_reject); - - function _createTester(eachfn, check, getResult) { - return function(arr, limit, iterator, cb) { - function done() { - if (cb) cb(getResult(false, void 0)); - } - function iteratee(x, _, callback) { - if (!cb) return callback(); - iterator(x, function (v) { - if (cb && check(v)) { - cb(getResult(true, x)); - cb = iterator = false; - } - callback(); - }); - } - if (arguments.length > 3) { - eachfn(arr, limit, iteratee, done); - } else { - cb = iterator; - iterator = limit; - eachfn(arr, iteratee, done); - } - }; - } - - async.any = - async.some = _createTester(async.eachOf, toBool, identity); - - async.someLimit = _createTester(async.eachOfLimit, toBool, identity); - - async.all = - async.every = _createTester(async.eachOf, notId, notId); - - async.everyLimit = _createTester(async.eachOfLimit, notId, notId); - - function _findGetResult(v, x) { - return x; - } - async.detect = _createTester(async.eachOf, identity, _findGetResult); - async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult); - async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult); - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - callback(null, _map(results.sort(comparator), function (x) { - return x.value; - })); - } - - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } - }; - - async.auto = function (tasks, concurrency, callback) { - if (typeof arguments[1] === 'function') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = _once(callback || noop); - var keys = _keys(tasks); - var remainingTasks = keys.length; - if (!remainingTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = remainingTasks; - } - - var results = {}; - var runningTasks = 0; - - var hasError = false; - - var listeners = []; - function addListener(fn) { - listeners.unshift(fn); - } - function removeListener(fn) { - var idx = _indexOf(listeners, fn); - if (idx >= 0) listeners.splice(idx, 1); - } - function taskComplete() { - remainingTasks--; - _arrayEach(listeners.slice(0), function (fn) { - fn(); - }); - } - - addListener(function () { - if (!remainingTasks) { - callback(null, results); - } - }); - - _arrayEach(keys, function (k) { - if (hasError) return; - var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; - var taskCallback = _restParam(function(err, args) { - runningTasks--; - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _forEachOf(results, function(val, rkey) { - safeResults[rkey] = val; - }); - safeResults[k] = args; - hasError = true; - - callback(err, safeResults); - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }); - var requires = task.slice(0, task.length - 1); - // prevent dead-locks - var len = requires.length; - var dep; - while (len--) { - if (!(dep = tasks[requires[len]])) { - throw new Error('Has nonexistent dependency in ' + requires.join(', ')); - } - if (_isArray(dep) && _indexOf(dep, k) >= 0) { - throw new Error('Has cyclic dependencies'); - } - } - function ready() { - return runningTasks < concurrency && _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - } - if (ready()) { - runningTasks++; - task[task.length - 1](taskCallback, results); - } - else { - addListener(listener); - } - function listener() { - if (ready()) { - runningTasks++; - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - } - }); - }; - - - - async.retry = function(times, task, callback) { - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var attempts = []; - - var opts = { - times: DEFAULT_TIMES, - interval: DEFAULT_INTERVAL - }; - - function parseTimes(acc, t){ - if(typeof t === 'number'){ - acc.times = parseInt(t, 10) || DEFAULT_TIMES; - } else if(typeof t === 'object'){ - acc.times = parseInt(t.times, 10) || DEFAULT_TIMES; - acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL; - } else { - throw new Error('Unsupported argument type for \'times\': ' + typeof t); - } - } - - var length = arguments.length; - if (length < 1 || length > 3) { - throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)'); - } else if (length <= 2 && typeof times === 'function') { - callback = task; - task = times; - } - if (typeof times !== 'function') { - parseTimes(opts, times); - } - opts.callback = callback; - opts.task = task; - - function wrappedTask(wrappedCallback, wrappedResults) { - function retryAttempt(task, finalAttempt) { - return function(seriesCallback) { - task(function(err, result){ - seriesCallback(!err || finalAttempt, {err: err, result: result}); - }, wrappedResults); - }; - } - - function retryInterval(interval){ - return function(seriesCallback){ - setTimeout(function(){ - seriesCallback(null); - }, interval); - }; - } - - while (opts.times) { - - var finalAttempt = !(opts.times-=1); - attempts.push(retryAttempt(opts.task, finalAttempt)); - if(!finalAttempt && opts.interval > 0){ - attempts.push(retryInterval(opts.interval)); - } - } - - async.series(attempts, function(done, data){ - data = data[data.length - 1]; - (wrappedCallback || opts.callback)(data.err, data.result); - }); - } - - // If a callback is passed, run this as a controll flow - return opts.callback ? wrappedTask() : wrappedTask; - }; - - async.waterfall = function (tasks, callback) { - callback = _once(callback || noop); - if (!_isArray(tasks)) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - function wrapIterator(iterator) { - return _restParam(function (err, args) { - if (err) { - callback.apply(null, [err].concat(args)); - } - else { - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - ensureAsync(iterator).apply(null, args); - } - }); - } - wrapIterator(async.iterator(tasks))(); - }; - - function _parallel(eachfn, tasks, callback) { - callback = callback || noop; - var results = _isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, function (task, key, callback) { - task(_restParam(function (err, args) { - if (args.length <= 1) { - args = args[0]; - } - results[key] = args; - callback(err); - })); - }, function (err) { - callback(err, results); - }); - } - - async.parallel = function (tasks, callback) { - _parallel(async.eachOf, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel(_eachOfLimit(limit), tasks, callback); - }; - - async.series = function(tasks, callback) { - _parallel(async.eachOfSeries, tasks, callback); - }; - - async.iterator = function (tasks) { - function makeCallback(index) { - function fn() { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - } - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - } - return makeCallback(0); - }; - - async.apply = _restParam(function (fn, args) { - return _restParam(function (callArgs) { - return fn.apply( - null, args.concat(callArgs) - ); - }); - }); - - function _concat(eachfn, arr, fn, callback) { - var result = []; - eachfn(arr, function (x, index, cb) { - fn(x, function (err, y) { - result = result.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, result); - }); - } - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - callback = callback || noop; - if (test()) { - var next = _restParam(function(err, args) { - if (err) { - callback(err); - } else if (test.apply(this, args)) { - iterator(next); - } else { - callback.apply(null, [null].concat(args)); - } - }); - iterator(next); - } else { - callback(null); - } - }; - - async.doWhilst = function (iterator, test, callback) { - var calls = 0; - return async.whilst(function() { - return ++calls <= 1 || test.apply(this, arguments); - }, iterator, callback); - }; - - async.until = function (test, iterator, callback) { - return async.whilst(function() { - return !test.apply(this, arguments); - }, iterator, callback); - }; - - async.doUntil = function (iterator, test, callback) { - return async.doWhilst(iterator, function() { - return !test.apply(this, arguments); - }, callback); - }; - - async.during = function (test, iterator, callback) { - callback = callback || noop; - - var next = _restParam(function(err, args) { - if (err) { - callback(err); - } else { - args.push(check); - test.apply(this, args); - } - }); - - var check = function(err, truth) { - if (err) { - callback(err); - } else if (truth) { - iterator(next); - } else { - callback(null); - } - }; - - test(check); - }; - - async.doDuring = function (iterator, test, callback) { - var calls = 0; - async.during(function(next) { - if (calls++ < 1) { - next(null, true); - } else { - test.apply(this, arguments); - } - }, iterator, callback); - }; - - function _queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new Error('Concurrency must not be zero'); - } - function _insert(q, data, pos, callback) { - if (callback != null && typeof callback !== "function") { - throw new Error("task callback must be a function"); - } - q.started = true; - if (!_isArray(data)) { - data = [data]; - } - if(data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - q.drain(); - }); - } - _arrayEach(data, function(task) { - var item = { - data: task, - callback: callback || noop - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.tasks.length === q.concurrency) { - q.saturated(); - } - }); - async.setImmediate(q.process); - } - function _next(q, tasks) { - return function(){ - workers -= 1; - - var removed = false; - var args = arguments; - _arrayEach(tasks, function (task) { - _arrayEach(workersList, function (worker, index) { - if (worker === task && !removed) { - workersList.splice(index, 1); - removed = true; - } - }); - - task.callback.apply(task, args); - }); - if (q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - } - - var workers = 0; - var workersList = []; - var q = { - tasks: [], - concurrency: concurrency, - payload: payload, - saturated: noop, - empty: noop, - drain: noop, - started: false, - paused: false, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - kill: function () { - q.drain = noop; - q.tasks = []; - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - while(!q.paused && workers < q.concurrency && q.tasks.length){ - - var tasks = q.payload ? - q.tasks.splice(0, q.payload) : - q.tasks.splice(0, q.tasks.length); - - var data = _map(tasks, function (task) { - return task.data; - }); - - if (q.tasks.length === 0) { - q.empty(); - } - workers += 1; - workersList.push(tasks[0]); - var cb = only_once(_next(q, tasks)); - worker(data, cb); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - }, - workersList: function () { - return workersList; - }, - idle: function() { - return q.tasks.length + workers === 0; - }, - pause: function () { - q.paused = true; - }, - resume: function () { - if (q.paused === false) { return; } - q.paused = false; - var resumeCount = Math.min(q.concurrency, q.tasks.length); - // Need to call q.process once per concurrent - // worker to preserve full concurrency after pause - for (var w = 1; w <= resumeCount; w++) { - async.setImmediate(q.process); - } - } - }; - return q; - } - - async.queue = function (worker, concurrency) { - var q = _queue(function (items, cb) { - worker(items[0], cb); - }, concurrency, 1); - - return q; - }; - - async.priorityQueue = function (worker, concurrency) { - - function _compareTasks(a, b){ - return a.priority - b.priority; - } - - function _binarySearch(sequence, item, compare) { - var beg = -1, - end = sequence.length - 1; - while (beg < end) { - var mid = beg + ((end - beg + 1) >>> 1); - if (compare(item, sequence[mid]) >= 0) { - beg = mid; - } else { - end = mid - 1; - } - } - return beg; - } - - function _insert(q, data, priority, callback) { - if (callback != null && typeof callback !== "function") { - throw new Error("task callback must be a function"); - } - q.started = true; - if (!_isArray(data)) { - data = [data]; - } - if(data.length === 0) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - q.drain(); - }); - } - _arrayEach(data, function(task) { - var item = { - data: task, - priority: priority, - callback: typeof callback === 'function' ? callback : noop - }; - - q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); - - if (q.tasks.length === q.concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - // Start with a normal queue - var q = async.queue(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function (data, priority, callback) { - _insert(q, data, priority, callback); - }; - - // Remove unshift function - delete q.unshift; - - return q; - }; - - async.cargo = function (worker, payload) { - return _queue(worker, 1, payload); - }; - - function _console_fn(name) { - return _restParam(function (fn, args) { - fn.apply(null, args.concat([_restParam(function (err, args) { - if (typeof console === 'object') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _arrayEach(args, function (x) { - console[name](x); - }); - } - } - })])); - }); - } - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - var has = Object.prototype.hasOwnProperty; - hasher = hasher || identity; - var memoized = _restParam(function memoized(args) { - var callback = args.pop(); - var key = hasher.apply(null, args); - if (has.call(memo, key)) { - async.setImmediate(function () { - callback.apply(null, memo[key]); - }); - } - else if (has.call(queues, key)) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([_restParam(function (args) { - memo[key] = args; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, args); - } - })])); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - function _times(mapper) { - return function (count, iterator, callback) { - mapper(_range(count), iterator, callback); - }; - } - - async.times = _times(async.map); - async.timesSeries = _times(async.mapSeries); - async.timesLimit = function (count, limit, iterator, callback) { - return async.mapLimit(_range(count), limit, iterator, callback); - }; - - async.seq = function (/* functions... */) { - var fns = arguments; - return _restParam(function (args) { - var that = this; - - var callback = args[args.length - 1]; - if (typeof callback == 'function') { - args.pop(); - } else { - callback = noop; - } - - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([_restParam(function (err, nextargs) { - cb(err, nextargs); - })])); - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }); - }; - - async.compose = function (/* functions... */) { - return async.seq.apply(null, Array.prototype.reverse.call(arguments)); - }; - - - function _applyEach(eachfn) { - return _restParam(function(fns, args) { - var go = _restParam(function(args) { - var that = this; - var callback = args.pop(); - return eachfn(fns, function (fn, _, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }); - if (args.length) { - return go.apply(this, args); - } - else { - return go; - } - }); - } - - async.applyEach = _applyEach(async.eachOf); - async.applyEachSeries = _applyEach(async.eachOfSeries); - - - async.forever = function (fn, callback) { - var done = only_once(callback || noop); - var task = ensureAsync(fn); - function next(err) { - if (err) { - return done(err); - } - task(next); - } - next(); - }; - - function ensureAsync(fn) { - return _restParam(function (args) { - var callback = args.pop(); - args.push(function () { - var innerArgs = arguments; - if (sync) { - async.setImmediate(function () { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - }); - var sync = true; - fn.apply(this, args); - sync = false; - }); - } - - async.ensureAsync = ensureAsync; - - async.constant = _restParam(function(values) { - var args = [null].concat(values); - return function (callback) { - return callback.apply(this, args); - }; - }); - - async.wrapSync = - async.asyncify = function asyncify(func) { - return _restParam(function (args) { - var callback = args.pop(); - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (_isObject(result) && typeof result.then === "function") { - result.then(function(value) { - callback(null, value); - })["catch"](function(err) { - callback(err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); - }; - - // Node.js - if (typeof module === 'object' && module.exports) { - module.exports = async; - } - // AMD / RequireJS - else if (typeof define === 'function' && define.amd) { - define([], function () { - return async; - }); - } - // included directly via '); - expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e'); - done(); - }); - - it('encodes \' characters', function (done) { - - var encoded = Hoek.escapeJavaScript('something(\'param\')'); - expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29'); - done(); - }); - - it('encodes large unicode characters with the correct padding', function (done) { - - var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('\\u0500\\u1000'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeJavaScript(null); - expect(encoded).to.equal(''); - done(); - }); -}); - -describe('escapeHtml()', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeHtml(''); - expect(encoded).to.equal('<script>alert(1)</script>'); - done(); - }); - - it('encodes < and > as named characters', function (done) { - - var encoded = Hoek.escapeHtml(' - - \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js deleted file mode 100644 index 664c1b455bd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/example.js +++ /dev/null @@ -1,3 +0,0 @@ -var BigInteger = require('./'); -var a = new BigInteger('91823918239182398123'); -console.log(a.bitLength()); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js deleted file mode 100644 index e32fe13d860..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/index.js +++ /dev/null @@ -1,1358 +0,0 @@ -(function(){ - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - var inBrowser = typeof navigator !== "undefined"; - if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+this.DV; - else this.t = 0; - } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); - } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; - } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); - } - } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // Copyright (c) 2005-2009 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Extended JavaScript BN functions, required for RSA private ops. - - // Version 1.1: new BigInteger("0", 10) returns "proper" zero - // Version 1.2: square() API, isProbablePrime fix - - // (public) - function bnClone() { var r = nbi(); this.copyTo(r); return r; } - - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>24; } - - // (public) return value as short (assumes DB>=16) - function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } - - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } - - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } - - // (protected) alternate constructor - function bnpFromNumber(a,b,c) { - if("number" == typeof b) { - // new BigInteger(int,int,RNG) - if(a < 2) this.fromInt(1); - else { - this.fromNumber(a,c); - if(!this.testBit(a-1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); - if(this.isEven()) this.dAddOffset(1,0); // force odd - while(!this.isProbablePrime(b)) { - this.dAddOffset(2,0); - if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); - } - } - } - else { - // new BigInteger(int,RNG) - var x = new Array(), t = a&7; - x.length = (a>>3)+1; - b.nextBytes(x); - if(t > 0) x[0] &= ((1< 0) { - if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) - r[k++] = d|(this.s<<(this.DB-p)); - while(i >= 0) { - if(p < 8) { - d = (this[i]&((1<>(p+=this.DB-8); - } - else { - d = (this[i]>>(p-=8))&0xff; - if(p <= 0) { p += this.DB; --i; } - } - if((d&0x80) != 0) d |= -256; - if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; - if(k > 0 || d != this.s) r[k++] = d; - } - } - return r; - } - - function bnEquals(a) { return(this.compareTo(a)==0); } - function bnMin(a) { return(this.compareTo(a)<0)?this:a; } - function bnMax(a) { return(this.compareTo(a)>0)?this:a; } - - // (protected) r = this op a (bitwise) - function bnpBitwiseTo(a,op,r) { - var i, f, m = Math.min(a.t,this.t); - for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); - if(a.t < this.t) { - f = a.s&this.DM; - for(i = m; i < this.t; ++i) r[i] = op(this[i],f); - r.t = this.t; - } - else { - f = this.s&this.DM; - for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); - r.t = a.t; - } - r.s = op(this.s,a.s); - r.clamp(); - } - - // (public) this & a - function op_and(x,y) { return x&y; } - function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } - - // (public) this | a - function op_or(x,y) { return x|y; } - function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } - - // (public) this ^ a - function op_xor(x,y) { return x^y; } - function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } - - // (public) this & ~a - function op_andnot(x,y) { return x&~y; } - function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } - - // (public) ~this - function bnNot() { - var r = nbi(); - for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; - r.t = this.t; - r.s = ~this.s; - return r; - } - - // (public) this << n - function bnShiftLeft(n) { - var r = nbi(); - if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); - return r; - } - - // (public) this >> n - function bnShiftRight(n) { - var r = nbi(); - if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); - return r; - } - - // return index of lowest 1-bit in x, x < 2^31 - function lbit(x) { - if(x == 0) return -1; - var r = 0; - if((x&0xffff) == 0) { x >>= 16; r += 16; } - if((x&0xff) == 0) { x >>= 8; r += 8; } - if((x&0xf) == 0) { x >>= 4; r += 4; } - if((x&3) == 0) { x >>= 2; r += 2; } - if((x&1) == 0) ++r; - return r; - } - - // (public) returns index of lowest 1-bit (or -1 if none) - function bnGetLowestSetBit() { - for(var i = 0; i < this.t; ++i) - if(this[i] != 0) return i*this.DB+lbit(this[i]); - if(this.s < 0) return this.t*this.DB; - return -1; - } - - // return number of 1 bits in x - function cbit(x) { - var r = 0; - while(x != 0) { x &= x-1; ++r; } - return r; - } - - // (public) return number of set bits - function bnBitCount() { - var r = 0, x = this.s&this.DM; - for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); - return r; - } - - // (public) true iff nth bit is set - function bnTestBit(n) { - var j = Math.floor(n/this.DB); - if(j >= this.t) return(this.s!=0); - return((this[j]&(1<<(n%this.DB)))!=0); - } - - // (protected) this op (1<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } - - // (public) this + a - function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } - - // (public) this - a - function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } - - // (public) this * a - function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } - - // (public) this^2 - function bnSquare() { var r = nbi(); this.squareTo(r); return r; } - - // (public) this / a - function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } - - // (public) this % a - function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } - - // (public) [this/a,this%a] - function bnDivideAndRemainder(a) { - var q = nbi(), r = nbi(); - this.divRemTo(a,q,r); - return new Array(q,r); - } - - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } - - // A "null" reducer - function NullExp() {} - function nNop(x) { return x; } - function nMulTo(x,y,r) { x.multiplyTo(y,r); } - function nSqrTo(x,r) { x.squareTo(r); } - - NullExp.prototype.convert = nNop; - NullExp.prototype.revert = nNop; - NullExp.prototype.mulTo = nMulTo; - NullExp.prototype.sqrTo = nSqrTo; - - // (public) this^e - function bnPow(e) { return this.exp(e,new NullExp()); } - - // (protected) r = lower n words of "this * a", a.t <= n - // "this" should be the larger one if appropriate. - function bnpMultiplyLowerTo(a,n,r) { - var i = Math.min(this.t+a.t,n); - r.s = 0; // assumes a,this >= 0 - r.t = i; - while(i > 0) r[--i] = 0; - var j; - for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); - for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); - r.clamp(); - } - - // (protected) r = "this * a" without lower n words, n > 0 - // "this" should be the larger one if appropriate. - function bnpMultiplyUpperTo(a,n,r) { - --n; - var i = r.t = this.t+a.t-n; - r.s = 0; // assumes a,this >= 0 - while(--i >= 0) r[i] = 0; - for(i = Math.max(n-this.t,0); i < a.t; ++i) - r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); - r.clamp(); - r.drShiftTo(1,r); - } - - // Barrett modular reduction - function Barrett(m) { - // setup Barrett - this.r2 = nbi(); - this.q3 = nbi(); - BigInteger.ONE.dlShiftTo(2*m.t,this.r2); - this.mu = this.r2.divide(m); - this.m = m; - } - - function barrettConvert(x) { - if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); - else if(x.compareTo(this.m) < 0) return x; - else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } - } - - function barrettRevert(x) { return x; } - - // x = x mod m (HAC 14.42) - function barrettReduce(x) { - x.drShiftTo(this.m.t-1,this.r2); - if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } - this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); - this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); - while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); - x.subTo(this.r2,x); - while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = x^2 mod m; x != r - function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = x*y mod m; x,y != r - function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Barrett.prototype.convert = barrettConvert; - Barrett.prototype.revert = barrettRevert; - Barrett.prototype.reduce = barrettReduce; - Barrett.prototype.mulTo = barrettMulTo; - Barrett.prototype.sqrTo = barrettSqrTo; - - // (public) this^e % m (HAC 14.85) - function bnModPow(e,m) { - var i = e.bitLength(), k, r = nbv(1), z; - if(i <= 0) return r; - else if(i < 18) k = 1; - else if(i < 48) k = 3; - else if(i < 144) k = 4; - else if(i < 768) k = 5; - else k = 6; - if(i < 8) - z = new Classic(m); - else if(m.isEven()) - z = new Barrett(m); - else - z = new Montgomery(m); - - // precomputation - var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { - var g2 = nbi(); - z.sqrTo(g[1],g2); - while(n <= km) { - g[n] = nbi(); - z.mulTo(g2,g[n-2],g[n]); - n += 2; - } - } - - var j = e.t-1, w, is1 = true, r2 = nbi(), t; - i = nbits(e[j])-1; - while(j >= 0) { - if(i >= k1) w = (e[j]>>(i-k1))&km; - else { - w = (e[j]&((1<<(i+1))-1))<<(k1-i); - if(j > 0) w |= e[j-1]>>(this.DB+i-k1); - } - - n = k; - while((w&1) == 0) { w >>= 1; --n; } - if((i -= n) < 0) { i += this.DB; --j; } - if(is1) { // ret == 1, don't bother squaring or multiplying it - g[w].copyTo(r); - is1 = false; - } - else { - while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } - if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } - z.mulTo(r2,g[w],r); - } - - while(j >= 0 && (e[j]&(1< 0) { - x.rShiftTo(g,x); - y.rShiftTo(g,y); - } - while(x.signum() > 0) { - if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); - if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); - if(x.compareTo(y) >= 0) { - x.subTo(y,x); - x.rShiftTo(1,x); - } - else { - y.subTo(x,y); - y.rShiftTo(1,y); - } - } - if(g > 0) y.lShiftTo(g,y); - return y; - } - - // (protected) this % n, n < 2^26 - function bnpModInt(n) { - if(n <= 0) return 0; - var d = this.DV%n, r = (this.s<0)?n-1:0; - if(this.t > 0) - if(d == 0) r = this[0]%n; - else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; - return r; - } - - // (public) 1/this % m (HAC 14.61) - function bnModInverse(m) { - var ac = m.isEven(); - if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; - var u = m.clone(), v = this.clone(); - var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); - while(u.signum() != 0) { - while(u.isEven()) { - u.rShiftTo(1,u); - if(ac) { - if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } - a.rShiftTo(1,a); - } - else if(!b.isEven()) b.subTo(m,b); - b.rShiftTo(1,b); - } - while(v.isEven()) { - v.rShiftTo(1,v); - if(ac) { - if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } - c.rShiftTo(1,c); - } - else if(!d.isEven()) d.subTo(m,d); - d.rShiftTo(1,d); - } - if(u.compareTo(v) >= 0) { - u.subTo(v,u); - if(ac) a.subTo(c,a); - b.subTo(d,b); - } - else { - v.subTo(u,v); - if(ac) c.subTo(a,c); - d.subTo(b,d); - } - } - if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; - if(d.compareTo(m) >= 0) return d.subtract(m); - if(d.signum() < 0) d.addTo(m,d); else return d; - if(d.signum() < 0) return d.add(m); else return d; - } - - var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; - var lplim = (1<<26)/lowprimes[lowprimes.length-1]; - - // (public) test primality with certainty >= 1-.5^t - function bnIsProbablePrime(t) { - var i, x = this.abs(); - if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { - for(i = 0; i < lowprimes.length; ++i) - if(x[0] == lowprimes[i]) return true; - return false; - } - if(x.isEven()) return false; - i = 1; - while(i < lowprimes.length) { - var m = lowprimes[i], j = i+1; - while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; - m = x.modInt(m); - while(i < j) if(m%lowprimes[i++] == 0) return false; - } - return x.millerRabin(t); - } - - // (protected) true if probably prime (HAC 4.24, Miller-Rabin) - function bnpMillerRabin(t) { - var n1 = this.subtract(BigInteger.ONE); - var k = n1.getLowestSetBit(); - if(k <= 0) return false; - var r = n1.shiftRight(k); - t = (t+1)>>1; - if(t > lowprimes.length) t = lowprimes.length; - var a = nbi(); - for(var i = 0; i < t; ++i) { - //Pick bases at random, instead of starting at 2 - a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); - var y = a.modPow(r,this); - if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { - var j = 1; - while(j++ < k && y.compareTo(n1) != 0) { - y = y.modPowInt(2,this); - if(y.compareTo(BigInteger.ONE) == 0) return false; - } - if(y.compareTo(n1) != 0) return false; - } - } - return true; - } - - // protected - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.fromNumber = bnpFromNumber; - BigInteger.prototype.bitwiseTo = bnpBitwiseTo; - BigInteger.prototype.changeBit = bnpChangeBit; - BigInteger.prototype.addTo = bnpAddTo; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; - BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; - BigInteger.prototype.modInt = bnpModInt; - BigInteger.prototype.millerRabin = bnpMillerRabin; - - // public - BigInteger.prototype.clone = bnClone; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.byteValue = bnByteValue; - BigInteger.prototype.shortValue = bnShortValue; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.toByteArray = bnToByteArray; - BigInteger.prototype.equals = bnEquals; - BigInteger.prototype.min = bnMin; - BigInteger.prototype.max = bnMax; - BigInteger.prototype.and = bnAnd; - BigInteger.prototype.or = bnOr; - BigInteger.prototype.xor = bnXor; - BigInteger.prototype.andNot = bnAndNot; - BigInteger.prototype.not = bnNot; - BigInteger.prototype.shiftLeft = bnShiftLeft; - BigInteger.prototype.shiftRight = bnShiftRight; - BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; - BigInteger.prototype.bitCount = bnBitCount; - BigInteger.prototype.testBit = bnTestBit; - BigInteger.prototype.setBit = bnSetBit; - BigInteger.prototype.clearBit = bnClearBit; - BigInteger.prototype.flipBit = bnFlipBit; - BigInteger.prototype.add = bnAdd; - BigInteger.prototype.subtract = bnSubtract; - BigInteger.prototype.multiply = bnMultiply; - BigInteger.prototype.divide = bnDivide; - BigInteger.prototype.remainder = bnRemainder; - BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; - BigInteger.prototype.modPow = bnModPow; - BigInteger.prototype.modInverse = bnModInverse; - BigInteger.prototype.pow = bnPow; - BigInteger.prototype.gcd = bnGCD; - BigInteger.prototype.isProbablePrime = bnIsProbablePrime; - - // JSBN-specific extension - BigInteger.prototype.square = bnSquare; - - // Expose the Barrett function - BigInteger.prototype.Barrett = Barrett - - // BigInteger interfaces not implemented in jsbn: - - // BigInteger(int signum, byte[] magnitude) - // double doubleValue() - // float floatValue() - // int hashCode() - // long longValue() - // static BigInteger valueOf(long val) - - // Random number generator - requires a PRNG backend, e.g. prng4.js - - // For best results, put code like - // - // in your main HTML document. - - var rng_state; - var rng_pool; - var rng_pptr; - - // Mix in a 32-bit integer into the pool - function rng_seed_int(x) { - rng_pool[rng_pptr++] ^= x & 255; - rng_pool[rng_pptr++] ^= (x >> 8) & 255; - rng_pool[rng_pptr++] ^= (x >> 16) & 255; - rng_pool[rng_pptr++] ^= (x >> 24) & 255; - if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; - } - - // Mix in the current time (w/milliseconds) into the pool - function rng_seed_time() { - rng_seed_int(new Date().getTime()); - } - - // Initialize the pool with junk if needed. - if(rng_pool == null) { - rng_pool = new Array(); - rng_pptr = 0; - var t; - if(typeof window !== "undefined" && window.crypto) { - if (window.crypto.getRandomValues) { - // Use webcrypto if available - var ua = new Uint8Array(32); - window.crypto.getRandomValues(ua); - for(t = 0; t < 32; ++t) - rng_pool[rng_pptr++] = ua[t]; - } - else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { - // Extract entropy (256 bits) from NS4 RNG if available - var z = window.crypto.random(32); - for(t = 0; t < z.length; ++t) - rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; - } - } - while(rng_pptr < rng_psize) { // extract some randomness from Math.random() - t = Math.floor(65536 * Math.random()); - rng_pool[rng_pptr++] = t >>> 8; - rng_pool[rng_pptr++] = t & 255; - } - rng_pptr = 0; - rng_seed_time(); - //rng_seed_int(window.screenX); - //rng_seed_int(window.screenY); - } - - function rng_get_byte() { - if(rng_state == null) { - rng_seed_time(); - rng_state = prng_newstate(); - rng_state.init(rng_pool); - for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) - rng_pool[rng_pptr] = 0; - rng_pptr = 0; - //rng_pool = null; - } - // TODO: allow reseeding after first request - return rng_state.next(); - } - - function rng_get_bytes(ba) { - var i; - for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); - } - - function SecureRandom() {} - - SecureRandom.prototype.nextBytes = rng_get_bytes; - - // prng4.js - uses Arcfour as a PRNG - - function Arcfour() { - this.i = 0; - this.j = 0; - this.S = new Array(); - } - - // Initialize arcfour context from key, an array of ints, each from [0..255] - function ARC4init(key) { - var i, j, t; - for(i = 0; i < 256; ++i) - this.S[i] = i; - j = 0; - for(i = 0; i < 256; ++i) { - j = (j + this.S[i] + key[i % key.length]) & 255; - t = this.S[i]; - this.S[i] = this.S[j]; - this.S[j] = t; - } - this.i = 0; - this.j = 0; - } - - function ARC4next() { - var t; - this.i = (this.i + 1) & 255; - this.j = (this.j + this.S[this.i]) & 255; - t = this.S[this.i]; - this.S[this.i] = this.S[this.j]; - this.S[this.j] = t; - return this.S[(t + this.S[this.i]) & 255]; - } - - Arcfour.prototype.init = ARC4init; - Arcfour.prototype.next = ARC4next; - - // Plug in your RNG constructor here - function prng_newstate() { - return new Arcfour(); - } - - // Pool size must be a multiple of 4 and greater than 32. - // An array of bytes the size of the pool will be passed to init() - var rng_psize = 256; - - if (typeof exports !== 'undefined') { - exports = module.exports = { - BigInteger: BigInteger, - SecureRandom: SecureRandom, - }; - } else { - this.BigInteger = BigInteger; - this.SecureRandom = SecureRandom; - } - -}).call(this); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json deleted file mode 100644 index 8466b518794..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsbn/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_args": [ - [ - "jsbn@~0.1.0", - "/Users/eshanker/Code/fsevents/node_modules/sshpk" - ] - ], - "_from": "jsbn@>=0.1.0 <0.2.0", - "_id": "jsbn@0.1.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/jsbn", - "_nodeVersion": "0.12.2", - "_npmUser": { - "email": "andyperlitch@gmail.com", - "name": "andyperlitch" - }, - "_npmVersion": "2.7.4", - "_phantomChildren": {}, - "_requested": { - "name": "jsbn", - "raw": "jsbn@~0.1.0", - "rawSpec": "~0.1.0", - "scope": null, - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/ecc-jsbn", - "/fsevents/jodid25519", - "/fsevents/sshpk" - ], - "_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", - "_shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd", - "_shrinkwrap": null, - "_spec": "jsbn@~0.1.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/sshpk", - "author": { - "name": "Tom Wu" - }, - "bugs": { - "url": "https://github.com/andyperlitch/jsbn/issues" - }, - "dependencies": {}, - "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd", - "tarball": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz" - }, - "gitHead": "148a967b112806e63ddeeed78ee7938eef74c84a", - "homepage": "https://github.com/andyperlitch/jsbn", - "keywords": [ - "big", - "biginteger", - "bignumber", - "integer" - ], - "license": "BSD", - "main": "index.js", - "maintainers": [ - { - "email": "andyperlitch@gmail.com", - "name": "andyperlitch" - } - ], - "name": "jsbn", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/andyperlitch/jsbn.git" - }, - "scripts": { - "test": "mocha test.js" - }, - "version": "0.1.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md deleted file mode 100644 index 4de0124476e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/README.md +++ /dev/null @@ -1,5 +0,0 @@ -JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator). - -Code is licensed under the AFL or BSD license as part of the Persevere -project which is administered under the Dojo foundation, -and all contributions require a Dojo CLA. \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema deleted file mode 100644 index de80b918b67..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/hyper-schema +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-00/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "dot-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref deleted file mode 100644 index 3a872a71c97..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links deleted file mode 100644 index 8a5e7807250..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/links +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema deleted file mode 100644 index 9aa2fbc57a4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-00/schema +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1 - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "maxDecimal" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema deleted file mode 100644 index 3f6c6cc2c01..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/hyper-schema +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-01/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "dot-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref deleted file mode 100644 index 4d26174ef17..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links deleted file mode 100644 index 52430a5d94a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/links +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema deleted file mode 100644 index 7a208e680e6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-01/schema +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1 - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "maxDecimal" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema deleted file mode 100644 index 4ec1b756913..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/hyper-schema +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-02/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "slash-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "slash-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref deleted file mode 100644 index 6526c394556..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links deleted file mode 100644 index 1b176178a2c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/links +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema deleted file mode 100644 index 61b8de15483..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-02/schema +++ /dev/null @@ -1,166 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "uniqueItems" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1, - "uniqueItems" : true - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "minimumCanEqual" : false, - "optional" : true, - "default" : 1 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address deleted file mode 100644 index 074d34e82b2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/address +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description" : "An Address following the convention of http://microformats.org/wiki/hcard", - "type" : "object", - "properties" : { - "post-office-box" : { "type" : "string" }, - "extended-address" : { "type" : "string" }, - "street-address" : { "type":"string" }, - "locality" : { "type" : "string", "required" : true }, - "region" : { "type" : "string", "required" : true }, - "postal-code" : { "type" : "string" }, - "country-name" : { "type" : "string", "required" : true } - }, - "dependencies" : { - "post-office-box" : "street-address", - "extended-address" : "street-address", - "street-address" : "region", - "locality" : "region", - "region" : "country-name" - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar deleted file mode 100644 index 463cfb314b6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/calendar +++ /dev/null @@ -1,53 +0,0 @@ -{ - "description" : "A representation of an event", - "type" : "object", - "properties" : { - "dtstart" : { - "format" : "date-time", - "type" : "string", - "description" : "Event starting time", - "required":true - }, - "summary" : { - "type":"string", - "required":true - }, - "location" : { - "type" : "string" - }, - "url" : { - "type" : "string", - "format" : "url" - }, - "dtend" : { - "format" : "date-time", - "type" : "string", - "description" : "Event ending time" - }, - "duration" : { - "format" : "date", - "type" : "string", - "description" : "Event duration" - }, - "rdate" : { - "format" : "date-time", - "type" : "string", - "description" : "Recurrence date" - }, - "rrule" : { - "type" : "string", - "description" : "Recurrence rule" - }, - "category" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "geo" : { "$ref" : "http://json-schema.org/draft-03/geo" } - } -} - - - - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card deleted file mode 100644 index 89287a40d3f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/card +++ /dev/null @@ -1,105 +0,0 @@ -{ - "description":"A representation of a person, company, organization, or place", - "type":"object", - "properties":{ - "fn":{ - "description":"Formatted Name", - "type":"string" - }, - "familyName":{ - "type":"string", - "required":true - }, - "givenName":{ - "type":"string", - "required":true - }, - "additionalName":{ - "type":"array", - "items":{ - "type":"string" - } - }, - "honorificPrefix":{ - "type":"array", - "items":{ - "type":"string" - } - }, - "honorificSuffix":{ - "type":"array", - "items":{ - "type":"string" - } - }, - "nickname":{ - "type":"string" - }, - "url":{ - "type":"string", - "format":"url" - }, - "email":{ - "type":"object", - "properties":{ - "type":{ - "type":"string" - }, - "value":{ - "type":"string", - "format":"email" - } - } - }, - "tel":{ - "type":"object", - "properties":{ - "type":{ - "type":"string" - }, - "value":{ - "type":"string", - "format":"phone" - } - } - }, - "adr":{"$ref" : "http://json-schema.org/address"}, - "geo":{"$ref" : "http://json-schema.org/geo"}, - "tz":{ - "type":"string" - }, - "photo":{ - "format":"image", - "type":"string" - }, - "logo":{ - "format":"image", - "type":"string" - }, - "sound":{ - "format":"attachment", - "type":"string" - }, - "bday":{ - "type":"string", - "format":"date" - }, - "title":{ - "type":"string" - }, - "role":{ - "type":"string" - }, - "org":{ - "type":"object", - "properties":{ - "organizationName":{ - "type":"string" - }, - "organizationUnit":{ - "type":"string" - } - } - } - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo deleted file mode 100644 index 73ac7e538f2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/geo +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description" : "A geographical coordinate", - "type" : "object", - "properties" : { - "latitude" : { "type" : "number" }, - "longitude" : { "type" : "number" } - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces deleted file mode 100644 index 288a19856b7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/examples/interfaces +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends":"http://json-schema.org/hyper-schema", - "description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax", - "properties":{ - "methods":{ - "type":"object", - "description":"This defines the set of methods available to the class instances", - "additionalProperties":{ - "type":"object", - "description":"The definition of the method", - "properties":{ - "parameters":{ - "type":"array", - "description":"The set of parameters that should be passed to the method when it is called", - "items":{"$ref":"#"}, - "required": true - }, - "returns":{"$ref":"#"} - } - } - } - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema deleted file mode 100644 index 623055c3599..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/hyper-schema +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"}, - "id" : "http://json-schema.org/draft-03/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-03/links#"} - }, - - "fragmentResolution" : { - "type" : "string", - "default" : "slash-delimited" - }, - - "root" : { - "type" : "boolean", - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "default" : false - }, - - "contentEncoding" : { - "type" : "string" - }, - - "pathStart" : { - "type" : "string", - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "format" : "media-type" - } - }, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "slash-delimited" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref deleted file mode 100644 index 7e491a8e882..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/json-ref +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "id" : "http://json-schema.org/draft-03/json-ref#", - - "additionalItems" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links deleted file mode 100644 index 6b0a85a6295..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/links +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "id" : "http://json-schema.org/draft-03/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string", - "required" : true, - "format" : "link-description-object-template" - }, - - "rel" : { - "type" : "string", - "required" : true - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET" - }, - - "enctype" : { - "type" : "string", - "requires" : "method" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} - } - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema deleted file mode 100644 index 55ae47d808c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-03/schema +++ /dev/null @@ -1,174 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/schema#", - "id" : "http://json-schema.org/draft-03/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "patternProperties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalItems" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "required" : { - "type" : "boolean", - "default" : false - }, - - "dependencies" : { - "type" : "object", - "additionalProperties" : { - "type" : ["string", "array", {"$ref" : "#"}], - "items" : { - "type" : "string" - } - }, - "default" : {} - }, - - "minimum" : { - "type" : "number" - }, - - "maximum" : { - "type" : "number" - }, - - "exclusiveMinimum" : { - "type" : "boolean", - "default" : false - }, - - "exclusiveMaximum" : { - "type" : "boolean", - "default" : false - }, - - "minItems" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "default" : false - }, - - "pattern" : { - "type" : "string", - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer" - }, - - "enum" : { - "type" : "array", - "minItems" : 1, - "uniqueItems" : true - }, - - "default" : { - "type" : "any" - }, - - "title" : { - "type" : "string" - }, - - "description" : { - "type" : "string" - }, - - "format" : { - "type" : "string" - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "exclusiveMinimum" : true, - "default" : 1 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "id" : { - "type" : "string", - "format" : "uri" - }, - - "$ref" : { - "type" : "string", - "format" : "uri" - }, - - "$schema" : { - "type" : "string", - "format" : "uri" - } - }, - - "dependencies" : { - "exclusiveMinimum" : "minimum", - "exclusiveMaximum" : "maximum" - }, - - "default" : {} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema deleted file mode 100644 index f96d1ac6a58..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/hyper-schema +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-04/hyper-schema#", - "extends" : {"$ref" : "http://json-schema.org/draft-04/schema#"}, - "id" : "http://json-schema.org/draft-04/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-04/links#"} - }, - - "fragmentResolution" : { - "type" : "string", - "default" : "json-pointer" - }, - - "root" : { - "type" : "boolean", - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "default" : false - }, - - "contentEncoding" : { - "type" : "string" - }, - - "pathStart" : { - "type" : "string", - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "format" : "media-type" - } - }, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "json-pointer" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links deleted file mode 100644 index de272cc4513..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/links +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-04/hyper-schema#", - "id" : "http://json-schema.org/draft-04/links#", - "type" : "object", - - "properties" : { - "rel" : { - "type" : "string" - }, - - "href" : { - "type" : "string" - }, - - "template" : { - "type" : "string" - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET" - }, - - "enctype" : { - "type" : "string" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} - } - }, - - "required" : ["rel", "href"], - - "dependencies" : { - "enctype" : "method" - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema deleted file mode 100644 index 598951e57d2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-04/schema +++ /dev/null @@ -1,189 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-04/schema#", - "id" : "http://json-schema.org/draft-04/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : [ - { - "id" : "#simple-type", - "type" : "string", - "enum" : ["object", "array", "string", "number", "boolean", "null", "any"] - }, - "array" - ], - "items" : { - "type" : [ - {"$ref" : "#simple-type"}, - {"$ref" : "#"} - ] - }, - "uniqueItems" : true, - "default" : "any" - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "enum" : { - "type" : "array", - "minItems" : 1, - "uniqueItems" : true - }, - - "minimum" : { - "type" : "number" - }, - - "maximum" : { - "type" : "number" - }, - - "exclusiveMinimum" : { - "type" : "boolean", - "default" : false - }, - - "exclusiveMaximum" : { - "type" : "boolean", - "default" : false - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "exclusiveMinimum" : true, - "default" : 1 - }, - - "minLength" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer" - }, - - "pattern" : { - "type" : "string" - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalItems" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "minItems" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "default" : false - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "patternProperties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "minProperties" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxProperties" : { - "type" : "integer", - "minimum" : 0 - }, - - "required" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - - "dependencies" : { - "type" : "object", - "additionalProperties" : { - "type" : ["string", "array", {"$ref" : "#"}], - "items" : { - "type" : "string" - } - }, - "default" : {} - }, - - "id" : { - "type" : "string" - }, - - "$ref" : { - "type" : "string" - }, - - "$schema" : { - "type" : "string" - }, - - "title" : { - "type" : "string" - }, - - "description" : { - "type" : "string" - }, - - "default" : { - "type" : "any" - } - }, - - "dependencies" : { - "exclusiveMinimum" : "minimum", - "exclusiveMaximum" : "maximum" - }, - - "default" : {} -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml deleted file mode 100644 index c28f40dcd6e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-03.xml +++ /dev/null @@ -1,1120 +0,0 @@ - - - - - - - - - - - - - - - -]> - - - - - - - - - A JSON Media Type for Describing the Structure and Meaning of JSON Documents - - - SitePen (USA) -
- - 530 Lytton Avenue - Palo Alto, CA 94301 - USA - - +1 650 968 8787 - kris@sitepen.com -
-
- - -
- - - Calgary, AB - Canada - - gary.court@gmail.com -
-
- - - Internet Engineering Task Force - JSON - Schema - JavaScript - Object - Notation - Hyper Schema - Hypermedia - - - - JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", - a JSON based format for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - - -
- - -
- - JSON (JavaScript Object Notation) Schema is a JSON media type for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - -
- -
- - - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", - "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be - interpreted as described in RFC 2119. - -
- - - -
- - JSON Schema defines the media type "application/schema+json" for - describing the structure of other - JSON documents. JSON Schema is JSON-based and includes facilities - for describing the structure of JSON documents in terms of - allowable values, descriptions, and interpreting relations with other resources. - - - JSON Schema format is organized into several separate definitions. The first - definition is the core schema specification. This definition is primary - concerned with describing a JSON structure and specifying valid elements - in the structure. The second definition is the Hyper Schema specification - which is intended define elements in a structure that can be interpreted as - hyperlinks. - Hyper Schema builds on JSON Schema to describe the hyperlink structure of - other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate - JSON documents based on their schemas. - - - Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on - property values, as well as define the meaning of the property values - for the purpose of describing a resource and determining hyperlinks - within the representation. - -
- An example JSON Schema that describes products might look like: - - - - - This schema defines the properties of the instance JSON documents, - the required properties (id, name, and price), as well as an optional - property (tags). This also defines the link relations of the instance - JSON documents. - -
- -
- - For this specification, schema will be used to denote a JSON Schema - definition, and an instance refers to a JSON value that the schema - will be describing and validating. - -
- -
- - The JSON Schema media type does not attempt to dictate the structure of JSON - representations that contain data, but rather provides a separate format - for flexibly communicating how a JSON representation should be - interpreted and validated, such that user agents can properly understand - acceptable structures and extrapolate hyperlink information - with the JSON document. It is acknowledged that JSON documents come - in a variety of structures, and JSON is unique in that the structure - of stored data structures often prescribes a non-ambiguous definite - JSON representation. Attempting to force a specific structure is generally - not viable, and therefore JSON Schema allows for a great flexibility - in the structure of the JSON data that it describes. - - - This specification is protocol agnostic. - The underlying protocol (such as HTTP) should sufficiently define the - semantics of the client-server interface, the retrieval of resource - representations linked to by JSON representations, and modification of - those resources. The goal of this - format is to sufficiently describe JSON structures such that one can - utilize existing information available in existing JSON - representations from a large variety of services that leverage a representational state transfer - architecture using existing protocols. - -
-
- -
- - JSON Schema instances are correlated to their schema by the "describedby" - relation, where the schema is defined to be the target of the relation. - Instance representations may be of the "application/json" media type or - any other subtype. Consequently, dictating how an instance - representation should specify the relation to the schema is beyond the normative scope - of this document (since this document specifically defines the JSON - Schema media type, and no other), but it is recommended that instances - specify their schema so that user agents can interpret the instance - representation and messages may retain the self-descriptive - characteristic, avoiding the need for out-of-band information about - instance data. Two approaches are recommended for declaring the - relation to the schema that describes the meaning of a JSON instance's (or collection - of instances) structure. A MIME type parameter named - "profile" or a relation of "describedby" (which could be defined by a Link header) may be used: - -
- - - -
- - or if the content is being transferred by a protocol (such as HTTP) that - provides headers, a Link header can be used: - -
- -; rel="describedby" -]]> - -
- - Instances MAY specify multiple schemas, to indicate all the schemas that - are applicable to the data, and the data SHOULD be valid by all the schemas. - The instance data MAY have multiple schemas - that it is defined by (the instance data SHOULD be valid for those schemas). - Or if the document is a collection of instances, the collection MAY contain - instances from different schemas. When collections contain heterogeneous - instances, the "pathStart" attribute MAY be specified in the - schema to disambiguate which schema should be applied for each item in the - collection. However, ultimately, the mechanism for referencing a schema is up to the - media type of the instance documents (if they choose to specify that schemas - can be referenced). -
- -
- - JSON Schemas can themselves be described using JSON Schemas. - A self-describing JSON Schema for the core JSON Schema can - be found at http://json-schema.org/schema for the latest version or - http://json-schema.org/draft-03/schema for the draft-03 version. The hyper schema - self-description can be found at http://json-schema.org/hyper-schema - or http://json-schema.org/draft-03/hyper-schema. All schemas - used within a protocol with media type definitions - SHOULD include a MIME parameter that refers to the self-descriptive - hyper schema or another schema that extends this hyper schema: - -
- - - -
-
-
-
- -
- - A JSON Schema is a JSON Object that defines various attributes - (including usage and valid values) of a JSON value. JSON - Schema has recursive capabilities; there are a number of elements - in the structure that allow for nested JSON Schemas. - - -
- An example JSON Schema definition could look like: - - - -
- - - A JSON Schema object may have any of the following properties, called schema - attributes (all attributes are optional): - - -
- - This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. - This attribute can take one of two forms: - - - - A string indicating a primitive or simple type. The following are acceptable string values: - - - Value MUST be a string. - Value MUST be a number, floating point numbers are allowed. - Value MUST be an integer, no floating point numbers are allowed. This is a subset of the number type. - Value MUST be a boolean. - Value MUST be an object. - Value MUST be an array. - Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own). - Value MAY be of any type including null. - - - If the property is not defined or is not in this list, then any type of value is acceptable. - Other type values MAY be used for custom purposes, but minimal validators of the specification - implementation can allow any instance value on unknown type values. - - - - An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema. - The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array. - - - - -
- For example, a schema that defines if an instance can be a string or a number would be: - - -
-
- -
- This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order. -
- -
- This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. -
- -
- This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties. -
- -
- This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array. - When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. - When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute using the same rules as "additionalProperties" for objects. -
- -
- This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items. -
- -
- This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional. -
- -
- This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). - - The dependency value can take one of two forms: - - - - If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. - If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. - - - If the dependency value is a schema, then the instance object MUST be valid against the schema. - - - -
- -
- This attribute defines the minimum value of the instance property when the type of the instance value is a number. -
- -
- This attribute defines the maximum value of the instance property when the type of the instance value is a number. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. -
- -
- This attribute defines the minimum number of values in an array when the array is the instance value. -
- -
- This attribute defines the maximum number of values in an array when the array is the instance value. -
- -
- This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). - - Two instance are consider equal if they are both of the same type and: - - - are null; or - are booleans/numbers/strings and have the same value; or - are arrays, contains the same number of items, and each item in the array is equal to the corresponding item in the other array; or - are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. - - -
- -
- When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 -
- -
- When the instance value is a string, this defines the minimum length of the string. -
- -
- When the instance value is a string, this defines the maximum length of the string. -
- -
- This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". -
- -
- This attribute defines the default value of the instance when the instance is undefined. -
- -
- This attribute is a string that provides a short description of the instance property. -
- -
- This attribute is a string that provides a full description of the of purpose the instance property. -
- -
- This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format. - - - The following formats are predefined: - - - This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp. - This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part. - This SHOULD be a time in the format of hh:mm:ss. It is recommended that you use the "date-time" format instead of "time" unless you need to transfer only the time part. - This SHOULD be the difference, measured in milliseconds, between the specified time and midnight, 00:00 of January 1, 1970 UTC. The value SHOULD be a number (integer or float). - A regular expression, following the regular expression specification from ECMA 262/Perl 5. - This is a CSS color (like "#FF0000" or "red"), based on CSS 2.1. - This is a CSS style definition (like "color: red; background-color:#FFF"), based on CSS 2.1. - This SHOULD be a phone number (format MAY follow E.123). - This value SHOULD be a URI. - This SHOULD be an email address. - This SHOULD be an ip version 4 address. - This SHOULD be an ip version 6 address. - This SHOULD be a host-name. - - - - Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format. -
- -
- This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. -
- -
- This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. -
- -
- The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. - - Conceptually, the behavior of extends can be seen as validating an - instance against all constraints in the extending schema as well as - the extended schema(s). More optimized implementations that merge - schemas are possible, but are not required. Some examples of using "extends": - -
- - - -
- -
- - - -
-
-
- -
- - This attribute defines the current URI of this schema (this attribute is - effectively a "self" link). This URI MAY be relative or absolute. If - the URI is relative it is resolved against the current URI of the parent - schema it is contained in. If this schema is not contained in any - parent schema, the current URI of the parent schema is held to be the - URI under which this schema was addressed. If id is missing, the current URI of a schema is - defined to be that of the parent schema. The current URI of the schema - is also used to construct relative references such as for $ref. - -
- -
- - This attribute defines a URI of a schema that contains the full representation of this schema. - When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. - This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. - -
- -
- - This attribute defines a URI of a JSON Schema that is the schema of the current schema. - When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. - - - - A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. - Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. - -
-
- -
- - The following attributes are specified in addition to those - attributes that already provided by the core schema with the specific - purpose of informing user agents of relations between resources based - on JSON data. Just as with JSON - schema attributes, all the attributes in hyper schemas are optional. - Therefore, an empty object is a valid (non-informative) schema, and - essentially describes plain JSON (no constraints on the structures). - Addition of attributes provides additive information for user agents. - - -
- - The value of the links property MUST be an array, where each item - in the array is a link description object which describes the link - relations of the instances. - - -
- - A link description object is used to describe link relations. In - the context of a schema, it defines the link relations of the - instances of the schema, and can be parameterized by the instance - values. The link description format can be used on its own in - regular (non-schema documents), and use of this format can - be declared by referencing the normative link description - schema as the the schema for the data structure that uses the - links. The URI of the normative link description schema is: - http://json-schema.org/links (latest version) or - http://json-schema.org/draft-03/links (draft-03 version). - - -
- - The value of the "href" link description property - indicates the target URI of the related resource. The value - of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 - and MAY be a relative URI. The base URI to be used for relative resolution - SHOULD be the URI used to retrieve the instance object (not the schema) - when used within a schema. Also, when links are used within a schema, the URI - SHOULD be parametrized by the property values of the instance - object, if property values exist for the corresponding variables - in the template (otherwise they MAY be provided from alternate sources, like user input). - - - - Instance property values SHOULD be substituted into the URIs where - matching braces ('{', '}') are found surrounding zero or more characters, - creating an expanded URI. Instance property value substitutions are resolved - by using the text between the braces to denote the property name - from the instance to get the value to substitute. - -
- For example, if an href value is defined: - - - - Then it would be resolved by replace the value of the "id" property value from the instance object. -
- -
- If the value of the "id" property was "45", the expanded URI would be: - - - -
- - If matching braces are found with the string "@" (no quotes) between the braces, then the - actual instance value SHOULD be used to replace the braces, rather than a property value. - This should only be used in situations where the instance is a scalar (string, - boolean, or number), and not for objects or arrays. -
-
- -
- - The value of the "rel" property indicates the name of the - relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. - - - - Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: - - - - If the relation value is "self", when this property is encountered in - the instance object, the object represents a resource and the instance object is - treated as a full representation of the target resource identified by - the specified URI. - - - - This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. - - - - This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. - - - - This relation indicates that the target of the link - SHOULD be treated as the root or the body of the representation for the - purposes of user agent interaction or fragment resolution. All other - properties of the instance objects can be regarded as meta-data - descriptions for the data. - - - - - - The following relations are applicable for schemas (the schema as the "from" resource in the relation): - - - This indicates the target resource that represents collection of instances of a schema. - This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). - - - - -
- For example, if a schema is defined: - - - -
- -
- And if a collection of instance resource's JSON representation was retrieved: - - - -
- - This would indicate that for the first item in the collection, its own - (self) URI would resolve to "/Resource/thing" and the first item's "up" - relation SHOULD be resolved to the resource at "/Resource/parent". - The "children" collection would be located at "/Resource/?upId=thing". -
-
- -
- This property value is a schema that defines the expected structure of the JSON representation of the target of the link. -
- -
- - The following properties also apply to link definition objects, and - provide functionality analogous to HTML forms, in providing a - means for submitting extra (often user supplied) information to send to a server. - - -
- - This attribute defines which method can be used to access the target resource. - In an HTTP environment, this would be "GET" or "POST" (other HTTP methods - such as "PUT" and "DELETE" have semantics that are clearly implied by - accessed resources, and do not need to be defined here). - This defaults to "GET". - -
- -
- - If present, this property indicates a query media type format that the server - supports for querying or posting to the collection of instances at the target - resource. The query can be - suffixed to the target URI to query the collection with - property-based constraints on the resources that SHOULD be returned from - the server or used to post data to the resource (depending on the method). - -
- For example, with the following schema: - - - - This indicates that the client can query the server for instances that have a specific name. -
- -
- For example: - - - -
- - If no enctype or method is specified, only the single URI specified by - the href property is defined. If the method is POST, "application/json" is - the default media type. -
-
- -
- - This attribute contains a schema which defines the acceptable structure of the submitted - request (for a GET request, this schema would define the properties for the query string - and for a POST request, this would define the body). - -
-
-
-
- -
- - This property indicates the fragment resolution protocol to use for - resolving fragment identifiers in URIs within the instance - representations. This applies to the instance object URIs and all - children of the instance object's URIs. The default fragment resolution - protocol is "slash-delimited", which is defined below. Other fragment - resolution protocols MAY be used, but are not defined in this document. - - - - The fragment identifier is based on RFC 2396, Sec 5, and defines the - mechanism for resolving references to entities within a document. - - -
- - With the slash-delimited fragment resolution protocol, the fragment - identifier is interpreted as a series of property reference tokens that start with and - are delimited by the "/" character (\x2F). Each property reference token - is a series of unreserved or escaped URI characters. Each property - reference token SHOULD be interpreted, starting from the beginning of - the fragment identifier, as a path reference in the target JSON - structure. The final target value of the fragment can be determined by - starting with the root of the JSON structure from the representation of - the resource identified by the pre-fragment URI. If the target is a JSON - object, then the new target is the value of the property with the name - identified by the next property reference token in the fragment. If the - target is a JSON array, then the target is determined by finding the - item in array the array with the index defined by the next property - reference token (which MUST be a number). The target is successively - updated for each property reference token, until the entire fragment has - been traversed. - - - - Property names SHOULD be URI-encoded. In particular, any "/" in a - property name MUST be encoded to avoid being interpreted as a property - delimiter. - - - -
- For example, for the following JSON representation: - - - -
- -
- The following fragment identifiers would be resolved: - - - -
-
-
- -
- - The dot-delimited fragment resolution protocol is the same as - slash-delimited fragment resolution protocol except that the "." character - (\x2E) is used as the delimiter between property names (instead of "/") and - the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment - identifiers for referencing the value of the foo propery. - -
-
- -
- This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. -
- -
- If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. -
- -
- - This attribute is a URI that defines what the instance's URI MUST start with in order to validate. - The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, - and is relative to the instance's URI. - - - - When multiple schemas have been referenced for an instance, the user agent - can determine if this schema is applicable for a particular instance by - determining if the URI of the instance begins with the the value of the "pathStart" - attribute. If the URI of the instance does not start with this URI, - or if another schema specifies a starting URI that is longer and also matches the - instance, this schema SHOULD NOT be applied to the instance. Any schema - that does not have a pathStart attribute SHOULD be considered applicable - to all the instances for which it is referenced. - -
- -
- This attribute defines the media type of the instance representations that this schema is defining. -
-
- -
- - This specification is a sub-type of the JSON format, and - consequently the security considerations are generally the same as RFC 4627. - However, an additional issue is that when link relation of "self" - is used to denote a full representation of an object, the user agent - SHOULD NOT consider the representation to be the authoritative representation - of the resource denoted by the target URI if the target URI is not - equivalent to or a sub-path of the the URI used to request the resource - representation which contains the target URI with the "self" link. - -
- For example, if a hyper schema was defined: - - - -
- -
- And a resource was requested from somesite.com: - - - -
- -
- With a response of: - - - -
-
-
- -
- The proposed MIME media type for JSON Schema is "application/schema+json". - Type name: application - Subtype name: schema+json - Required parameters: profile - - The value of the profile parameter SHOULD be a URI (relative or absolute) that - refers to the schema used to define the structure of this structure (the - meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema, - but it is allowable to use other schemas that extend the hyper schema's meta- - schema. - - Optional parameters: pretty - The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. - -
- - This registry is maintained by IANA per RFC 4287 and this specification adds - four values: "full", "create", "instances", "root". New - assignments are subject to IESG Approval, as outlined in RFC 5226. - Requests should be made by email to IANA, which will then forward the - request to the IESG, requesting approval. - -
-
-
- - - - - &rfc2045; - &rfc2119; - &rfc2396; - &rfc3339; - &rfc3986; - &rfc4287; - - - &rfc2616; - &rfc4627; - &rfc5226; - &iddiscovery; - &uritemplate; - &linkheader; - &html401; - &css21; - - -
- - - - - Added example and verbiage to "extends" attribute. - Defined slash-delimited to use a leading slash. - Made "root" a relation instead of an attribute. - Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). - Added more explanation of nullability. - Removed "alternate" attribute. - Upper cased many normative usages of must, may, and should. - Replaced the link submission "properties" attribute to "schema" attribute. - Replaced "optional" attribute with "required" attribute. - Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. - Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. - Replaced "requires" attribute with "dependencies" attribute. - Moved "contentEncoding" attribute to hyper schema. - Added "additionalItems" attribute. - Added "id" attribute. - Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. - Added "patternProperties" attribute. - Schema URIs are now namespace versioned. - Added "$ref" and "$schema" attributes. - - - - - - Replaced "maxDecimal" attribute with "divisibleBy" attribute. - Added slash-delimited fragment resolution protocol and made it the default. - Added language about using links outside of schemas by referencing its normative URI. - Added "uniqueItems" attribute. - Added "targetSchema" attribute to link description object. - - - - - - Fixed category and updates from template. - - - - - - Initial draft. - - - - -
- -
- - - Should we give a preference to MIME headers over Link headers (or only use one)? - Should "root" be a MIME parameter? - Should "format" be renamed to "mediaType" or "contentType" to reflect the usage MIME media types that are allowed? - How should dates be handled? - - -
-
-
diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml deleted file mode 100644 index f9c1ea5a0c0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/draft-zyp-json-schema-04.xml +++ /dev/null @@ -1,1072 +0,0 @@ - - - - - - - - - - - - - - -]> - - - - - - - - - A JSON Media Type for Describing the Structure and Meaning of JSON Documents - - - SitePen (USA) -
- - 530 Lytton Avenue - Palo Alto, CA 94301 - USA - - +1 650 968 8787 - kris@sitepen.com -
-
- - -
- - - Calgary, AB - Canada - - gary.court@gmail.com -
-
- - - Internet Engineering Task Force - JSON - Schema - JavaScript - Object - Notation - Hyper Schema - Hypermedia - - - - JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", - a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - - -
- - -
- - JSON (JavaScript Object Notation) Schema is a JSON media type for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. - -
- -
- - - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", - "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be - interpreted as described in RFC 2119. - - - - The terms "JSON", "JSON text", "JSON value", "member", "element", "object", - "array", "number", "string", "boolean", "true", "false", and "null" in this - document are to be interpreted as defined in RFC 4627. - - - - This specification also uses the following defined terms: - - - A JSON Schema object. - Equivalent to "JSON value" as defined in RFC 4627. - Equivalent to "member" as defined in RFC 4627. - Equivalent to "element" as defined in RFC 4627. - A property of a JSON Schema object. - - -
- -
- - JSON Schema defines the media type "application/schema+json" for - describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities - for describing the structure of JSON in terms of - allowable values, descriptions, and interpreting relations with other resources. - - - This document is organized into several separate definitions. The first - definition is the core schema specification. This definition is primary - concerned with describing a JSON structure and specifying valid elements - in the structure. The second definition is the Hyper Schema specification - which is intended to define elements in a structure that can be interpreted as - hyperlinks. - Hyper Schema builds on JSON Schema to describe the hyperlink structure of - JSON values. This allows user agents to be able to successfully navigate - documents containing JSON based on their schemas. - - - Cumulatively JSON Schema acts as meta-JSON that can be used to define the - required type and constraints on JSON values, as well as define the meaning - of the JSON values for the purpose of describing a resource and determining - hyperlinks within the representation. - -
- An example JSON Schema that describes products might look like: - - - - - This schema defines the properties of the instance, - the required properties (id, name, and price), as well as an optional - property (tags). This also defines the link relations of the instance. - -
- -
- - The JSON Schema media type does not attempt to dictate the structure of JSON - values that contain data, but rather provides a separate format - for flexibly communicating how a JSON value should be - interpreted and validated, such that user agents can properly understand - acceptable structures and extrapolate hyperlink information - from the JSON. It is acknowledged that JSON values come - in a variety of structures, and JSON is unique in that the structure - of stored data structures often prescribes a non-ambiguous definite - JSON representation. Attempting to force a specific structure is generally - not viable, and therefore JSON Schema allows for a great flexibility - in the structure of the JSON data that it describes. - - - This specification is protocol agnostic. - The underlying protocol (such as HTTP) should sufficiently define the - semantics of the client-server interface, the retrieval of resource - representations linked to by JSON representations, and modification of - those resources. The goal of this - format is to sufficiently describe JSON structures such that one can - utilize existing information available in existing JSON - representations from a large variety of services that leverage a representational state transfer - architecture using existing protocols. - -
-
- -
- - JSON values are correlated to their schema by the "describedby" - relation, where the schema is the target of the relation. - JSON values MUST be of the "application/json" media type or - any other subtype. Consequently, dictating how a JSON value should - specify the relation to the schema is beyond the normative scope - of this document since this document specifically defines the JSON - Schema media type, and no other. It is RECOMMNENDED that JSON values - specify their schema so that user agents can interpret the instance - and retain the self-descriptive characteristics. This avoides the need for out-of-band information about - instance data. Two approaches are recommended for declaring the - relation to the schema that describes the meaning of a JSON instance's (or collection - of instances) structure. A MIME type parameter named - "profile" or a relation of "describedby" (which could be specified by a Link header) may be used: - -
- - - -
- - or if the content is being transferred by a protocol (such as HTTP) that - provides headers, a Link header can be used: - -
- -; rel="describedby" -]]> - -
- - Instances MAY specify multiple schemas, to indicate all the schemas that - are applicable to the data, and the data SHOULD be valid by all the schemas. - The instance data MAY have multiple schemas - that it is described by (the instance data SHOULD be valid for those schemas). - Or if the document is a collection of instances, the collection MAY contain - instances from different schemas. The mechanism for referencing a schema is - determined by the media type of the instance (if it provides a method for - referencing schemas). -
- -
- - JSON Schemas can themselves be described using JSON Schemas. - A self-describing JSON Schema for the core JSON Schema can - be found at http://json-schema.org/schema for the latest version or - http://json-schema.org/draft-04/schema for the draft-04 version. The hyper schema - self-description can be found at http://json-schema.org/hyper-schema - or http://json-schema.org/draft-04/hyper-schema. All schemas - used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive - hyper schema or another schema that extends this hyper schema: - -
- - - -
-
-
-
- -
- - A JSON Schema is a JSON object that defines various attributes - (including usage and valid values) of a JSON value. JSON - Schema has recursive capabilities; there are a number of elements - in the structure that allow for nested JSON Schemas. - - -
- An example JSON Schema could look like: - - - -
- - - A JSON Schema object MAY have any of the following optional properties: - - - - - -
- - This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. - This attribute can take one of two forms: - - - - A string indicating a primitive or simple type. The string MUST be one of the following values: - - - Instance MUST be an object. - Instance MUST be an array. - Instance MUST be a string. - Instance MUST be a number, including floating point numbers. - Instance MUST be the JSON literal "true" or "false". - Instance MUST be the JSON literal "null". Note that without this type, null values are not allowed. - Instance MAY be of any type, including null. - - - - - An array of one or more simple or schema types. - The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array. - - - - If this attribute is not specified, then all value types are accepted. - - -
- For example, a schema that defines if an instance can be a string or a number would be: - - -
-
- -
- - This attribute is an object with properties that specify the schemas for the properties of the instance object. - In this attribute's object, each property value MUST be a schema. - When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute. - Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success. - -
- -
- - This attribute is an object that defines the schema for a set of property names of an object instance. - The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. - If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. - -
- -
- This attribute specifies how any instance property that is not explicitly defined by either the "properties" or "patternProperties" attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean. - If a schema is provided, then all additional properties MUST be valid according to the schema. - If false is provided, then no additional properties are allowed. - The default value is an empty schema, which allows any value for additional properties. -
- -
- This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas. - When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. - When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute the same way as "additionalProperties" for objects is. -
- -
- This attribute specifies how any item in the array instance that is not explicitly defined by "items" (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean. - If a schema is provided: - - If the "items" attribute is unspecified, then all items in the array instance must be valid against this schema. - If the "items" attribute is a schema, then this attribute is ignored. - If the "items" attribute is an array (during tuple typing), then any additional items MUST be valid against this schema. - - - If false is provided, then any additional items in the array are not allowed. - The default value is an empty schema, which allows any value for additional items. -
- -
- This attribute is an array of strings that defines all the property names that must exist on the object instance. -
- -
- This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). - - The dependency value can take one of two forms: - - - - If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. - If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. - - - If the dependency value is a schema, then the instance object MUST be valid against the schema. - - - -
- -
- This attribute defines the minimum value of the instance property when the type of the instance value is a number. -
- -
- This attribute defines the maximum value of the instance property when the type of the instance value is a number. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. -
- -
- This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. -
- -
- This attribute defines the minimum number of values in an array when the array is the instance value. -
- -
- This attribute defines the maximum number of values in an array when the array is the instance value. -
- -
- This attribute defines the minimum number of properties required on an object instance. -
- -
- This attribute defines the maximum number of properties the object instance can have. -
- -
- This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). - - Two instance are consider equal if they are both of the same type and: - - - are null; or - are booleans/numbers/strings and have the same value; or - are arrays, contains the same number of items, and each item in the array is equal to the item at the corresponding index in the other array; or - are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. - - -
- -
- When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 -
- -
- When the instance value is a string, this defines the minimum length of the string. -
- -
- When the instance value is a string, this defines the maximum length of the string. -
- -
- This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". -
- -
- This attribute defines the default value of the instance when the instance is undefined. -
- -
- This attribute is a string that provides a short description of the instance property. -
- -
- This attribute is a string that provides a full description of the of purpose the instance property. -
- -
- This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. -
- -
- This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. -
- -
- The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. - - Conceptually, the behavior of extends can be seen as validating an - instance against all constraints in the extending schema as well as - the extended schema(s). More optimized implementations that merge - schemas are possible, but are not required. Some examples of using "extends": - -
- - - -
- -
- - - -
-
-
- -
- - This attribute defines the current URI of this schema (this attribute is - effectively a "self" link). This URI MAY be relative or absolute. If - the URI is relative it is resolved against the current URI of the parent - schema it is contained in. If this schema is not contained in any - parent schema, the current URI of the parent schema is held to be the - URI under which this schema was addressed. If id is missing, the current URI of a schema is - defined to be that of the parent schema. The current URI of the schema - is also used to construct relative references such as for $ref. - -
- -
- - This attribute defines a URI of a schema that contains the full representation of this schema. - When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. - This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. - -
- -
- - This attribute defines a URI of a JSON Schema that is the schema of the current schema. - When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. - - - - A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. - Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. - -
-
- -
- - The following attributes are specified in addition to those - attributes that already provided by the core schema with the specific - purpose of informing user agents of relations between resources based - on JSON data. Just as with JSON - schema attributes, all the attributes in hyper schemas are optional. - Therefore, an empty object is a valid (non-informative) schema, and - essentially describes plain JSON (no constraints on the structures). - Addition of attributes provides additive information for user agents. - - -
- - The value of the links property MUST be an array, where each item - in the array is a link description object which describes the link - relations of the instances. - - - - -
- - A link description object is used to describe link relations. In - the context of a schema, it defines the link relations of the - instances of the schema, and can be parameterized by the instance - values. The link description format can be used without JSON Schema, - and use of this format can - be declared by referencing the normative link description - schema as the the schema for the data structure that uses the - links. The URI of the normative link description schema is: - http://json-schema.org/links (latest version) or - http://json-schema.org/draft-04/links (draft-04 version). - - -
- - The value of the "href" link description property - indicates the target URI of the related resource. The value - of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 - and MAY be a relative URI. The base URI to be used for relative resolution - SHOULD be the URI used to retrieve the instance object (not the schema) - when used within a schema. Also, when links are used within a schema, the URI - SHOULD be parametrized by the property values of the instance - object, if property values exist for the corresponding variables - in the template (otherwise they MAY be provided from alternate sources, like user input). - - - - Instance property values SHOULD be substituted into the URIs where - matching braces ('{', '}') are found surrounding zero or more characters, - creating an expanded URI. Instance property value substitutions are resolved - by using the text between the braces to denote the property name - from the instance to get the value to substitute. - -
- For example, if an href value is defined: - - - - Then it would be resolved by replace the value of the "id" property value from the instance object. -
- -
- If the value of the "id" property was "45", the expanded URI would be: - - - -
- - If matching braces are found with the string "@" (no quotes) between the braces, then the - actual instance value SHOULD be used to replace the braces, rather than a property value. - This should only be used in situations where the instance is a scalar (string, - boolean, or number), and not for objects or arrays. -
-
- -
- - The value of the "rel" property indicates the name of the - relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. - - - - Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: - - - - If the relation value is "self", when this property is encountered in - the instance object, the object represents a resource and the instance object is - treated as a full representation of the target resource identified by - the specified URI. - - - - This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. - - - - This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. - - - - This relation indicates that the target of the link - SHOULD be treated as the root or the body of the representation for the - purposes of user agent interaction or fragment resolution. All other - properties of the instance objects can be regarded as meta-data - descriptions for the data. - - - - - - The following relations are applicable for schemas (the schema as the "from" resource in the relation): - - - This indicates the target resource that represents collection of instances of a schema. - This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). - - - - -
- For example, if a schema is defined: - - - -
- -
- And if a collection of instance resource's JSON representation was retrieved: - - - -
- - This would indicate that for the first item in the collection, its own - (self) URI would resolve to "/Resource/thing" and the first item's "up" - relation SHOULD be resolved to the resource at "/Resource/parent". - The "children" collection would be located at "/Resource/?upId=thing". -
-
- -
- This property value is a string that defines the templating language used in the "href" attribute. If no templating language is defined, then the default Link Description Object templating langauge is used. -
- -
- This property value is a schema that defines the expected structure of the JSON representation of the target of the link. -
- -
- - The following properties also apply to link definition objects, and - provide functionality analogous to HTML forms, in providing a - means for submitting extra (often user supplied) information to send to a server. - - -
- - This attribute defines which method can be used to access the target resource. - In an HTTP environment, this would be "GET" or "POST" (other HTTP methods - such as "PUT" and "DELETE" have semantics that are clearly implied by - accessed resources, and do not need to be defined here). - This defaults to "GET". - -
- -
- - If present, this property indicates a query media type format that the server - supports for querying or posting to the collection of instances at the target - resource. The query can be - suffixed to the target URI to query the collection with - property-based constraints on the resources that SHOULD be returned from - the server or used to post data to the resource (depending on the method). - -
- For example, with the following schema: - - - - This indicates that the client can query the server for instances that have a specific name. -
- -
- For example: - - - -
- - If no enctype or method is specified, only the single URI specified by - the href property is defined. If the method is POST, "application/json" is - the default media type. -
-
- -
- - This attribute contains a schema which defines the acceptable structure of the submitted - request (for a GET request, this schema would define the properties for the query string - and for a POST request, this would define the body). - -
-
-
-
- -
- - This property indicates the fragment resolution protocol to use for - resolving fragment identifiers in URIs within the instance - representations. This applies to the instance object URIs and all - children of the instance object's URIs. The default fragment resolution - protocol is "json-pointer", which is defined below. Other fragment - resolution protocols MAY be used, but are not defined in this document. - - - - The fragment identifier is based on RFC 3986, Sec 5, and defines the - mechanism for resolving references to entities within a document. - - -
- The "json-pointer" fragment resolution protocol uses a JSON Pointer to resolve fragment identifiers in URIs within instance representations. -
-
- - - -
- This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. -
- -
- If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. -
- -
- - This attribute is a URI that defines what the instance's URI MUST start with in order to validate. - The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, - and is relative to the instance's URI. - - - - When multiple schemas have been referenced for an instance, the user agent - can determine if this schema is applicable for a particular instance by - determining if the URI of the instance begins with the the value of the "pathStart" - attribute. If the URI of the instance does not start with this URI, - or if another schema specifies a starting URI that is longer and also matches the - instance, this schema SHOULD NOT be applied to the instance. Any schema - that does not have a pathStart attribute SHOULD be considered applicable - to all the instances for which it is referenced. - -
- -
- This attribute defines the media type of the instance representations that this schema is defining. -
-
- -
- - This specification is a sub-type of the JSON format, and - consequently the security considerations are generally the same as RFC 4627. - However, an additional issue is that when link relation of "self" - is used to denote a full representation of an object, the user agent - SHOULD NOT consider the representation to be the authoritative representation - of the resource denoted by the target URI if the target URI is not - equivalent to or a sub-path of the the URI used to request the resource - representation which contains the target URI with the "self" link. - -
- For example, if a hyper schema was defined: - - - -
- -
- And a resource was requested from somesite.com: - - - -
- -
- With a response of: - - - -
-
-
- -
- The proposed MIME media type for JSON Schema is "application/schema+json". - Type name: application - Subtype name: schema+json - Required parameters: profile - - The value of the profile parameter SHOULD be a URI (relative or absolute) that - refers to the schema used to define the structure of this structure (the - meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema, - but it is allowable to use other schemas that extend the hyper schema's meta- - schema. - - Optional parameters: pretty - The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. - -
- - This registry is maintained by IANA per RFC 4287 and this specification adds - four values: "full", "create", "instances", "root". New - assignments are subject to IESG Approval, as outlined in RFC 5226. - Requests should be made by email to IANA, which will then forward the - request to the IESG, requesting approval. - -
-
-
- - - - - &rfc2045; - &rfc2119; - &rfc3339; - &rfc3986; - &rfc4287; - - - JSON Pointer - - ForgeRock US, Inc. - - - SitePen (USA) - - - - - - - &rfc2616; - &rfc4627; - &rfc5226; - &iddiscovery; - &uritemplate; - &linkheader; - &html401; - &css21; - - -
- - - - - Changed "required" attribute to an array of strings. - Removed "format" attribute. - Added "minProperties" and "maxProperties" attributes. - Replaced "slash-delimited" fragment resolution with "json-pointer". - Added "template" LDO attribute. - Removed irrelevant "Open Issues" section. - Merged Conventions and Terminology sections. - Defined terms used in specification. - Removed "integer" type in favor of {"type":"number", "divisibleBy":1}. - Restricted "type" to only the core JSON types. - Improved wording of many sections. - - - - - - Added example and verbiage to "extends" attribute. - Defined slash-delimited to use a leading slash. - Made "root" a relation instead of an attribute. - Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). - Added more explanation of nullability. - Removed "alternate" attribute. - Upper cased many normative usages of must, may, and should. - Replaced the link submission "properties" attribute to "schema" attribute. - Replaced "optional" attribute with "required" attribute. - Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. - Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. - Replaced "requires" attribute with "dependencies" attribute. - Moved "contentEncoding" attribute to hyper schema. - Added "additionalItems" attribute. - Added "id" attribute. - Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. - Added "patternProperties" attribute. - Schema URIs are now namespace versioned. - Added "$ref" and "$schema" attributes. - - - - - - Replaced "maxDecimal" attribute with "divisibleBy" attribute. - Added slash-delimited fragment resolution protocol and made it the default. - Added language about using links outside of schemas by referencing its normative URI. - Added "uniqueItems" attribute. - Added "targetSchema" attribute to link description object. - - - - - - Fixed category and updates from template. - - - - - - Initial draft. - - - - -
-
-
diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js deleted file mode 100644 index 5b1bbbfdd61..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/links.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * JSON Schema link handler - * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) - * Licensed under the MIT (MIT-LICENSE.txt) license. - */ -({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}). -define([], function(){ -var exports = {}; -exports.cacheLinks = true; -exports.getLink = function(relation, instance, schema){ - // gets the URI of the link for the given relation based on the instance and schema - // for example: - // getLink( - // "brother", - // {"brother_id":33}, - // {links:[{rel:"brother", href:"Brother/{brother_id}"}]}) -> - // "Brother/33" - var links = schema.__linkTemplates; - if(!links){ - links = {}; - var schemaLinks = schema.links; - if(schemaLinks && schemaLinks instanceof Array){ - schemaLinks.forEach(function(link){ - /* // TODO: allow for multiple same-name relations - if(links[link.rel]){ - if(!(links[link.rel] instanceof Array)){ - links[link.rel] = [links[link.rel]]; - } - }*/ - links[link.rel] = link.href; - }); - } - if(exports.cacheLinks){ - schema.__linkTemplates = links; - } - } - var linkTemplate = links[relation]; - return linkTemplate && exports.substitute(linkTemplate, instance); -}; - -exports.substitute = function(linkTemplate, instance){ - return linkTemplate.replace(/\{([^\}]*)\}/g, function(t, property){ - var value = instance[decodeURIComponent(property)]; - if(value instanceof Array){ - // the value is an array, it should produce a URI like /Table/(4,5,8) and store.get() should handle that as an array of values - return '(' + value.join(',') + ')'; - } - return value; - }); -}; -return exports; -}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js deleted file mode 100644 index 97cbbf6fa34..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/lib/validate.js +++ /dev/null @@ -1,260 +0,0 @@ -/** - * JSONSchema Validator - Validates JavaScript objects using JSON Schemas - * (http://www.json.com/json-schema-proposal/) - * - * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) - * Licensed under the MIT (MIT-LICENSE.txt) license. -To use the validator call the validate function with an instance object and an optional schema object. -If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), -that schema will be used to validate and the schema parameter is not necessary (if both exist, -both validations will occur). -The validate method will return an array of validation errors. If there are no errors, then an -empty list will be returned. A validation error will have two properties: -"property" which indicates which property had the error -"message" which indicates what the error was - */ -({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}). -define([], function(){ -var exports = validate; -// setup primitive classes to be JSON Schema types -exports.Integer = {type:"integer"}; -var primitiveConstructors = { - String: String, - Boolean: Boolean, - Number: Number, - Object: Object, - Array: Array, - Date: Date -} -exports.validate = validate; -function validate(/*Any*/instance,/*Object*/schema) { - // Summary: - // To use the validator call JSONSchema.validate with an instance object and an optional schema object. - // If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), - // that schema will be used to validate and the schema parameter is not necessary (if both exist, - // both validations will occur). - // The validate method will return an object with two properties: - // valid: A boolean indicating if the instance is valid by the schema - // errors: An array of validation errors. If there are no errors, then an - // empty list will be returned. A validation error will have two properties: - // property: which indicates which property had the error - // message: which indicates what the error was - // - return validate(instance, schema, {changing: false});//, coerce: false, existingOnly: false}); - }; -exports.checkPropertyChange = function(/*Any*/value,/*Object*/schema, /*String*/property) { - // Summary: - // The checkPropertyChange method will check to see if an value can legally be in property with the given schema - // This is slightly different than the validate method in that it will fail if the schema is readonly and it will - // not check for self-validation, it is assumed that the passed in value is already internally valid. - // The checkPropertyChange method will return the same object type as validate, see JSONSchema.validate for - // information. - // - return validate(value, schema, {changing: property || "property"}); - }; -var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*Object*/options) { - - if (!options) options = {}; - var _changing = options.changing; - - function getType(schema){ - return schema.type || (primitiveConstructors[schema.name] == schema && schema.name.toLowerCase()); - } - var errors = []; - // validate a value against a property definition - function checkProp(value, schema, path,i){ - - var l; - path += path ? typeof i == 'number' ? '[' + i + ']' : typeof i == 'undefined' ? '' : '.' + i : i; - function addError(message){ - errors.push({property:path,message:message}); - } - - if((typeof schema != 'object' || schema instanceof Array) && (path || typeof schema != 'function') && !(schema && getType(schema))){ - if(typeof schema == 'function'){ - if(!(value instanceof schema)){ - addError("is not an instance of the class/constructor " + schema.name); - } - }else if(schema){ - addError("Invalid schema/property definition " + schema); - } - return null; - } - if(_changing && schema.readonly){ - addError("is a readonly field, it can not be changed"); - } - if(schema['extends']){ // if it extends another schema, it must pass that schema as well - checkProp(value,schema['extends'],path,i); - } - // validate a value against a type definition - function checkType(type,value){ - if(type){ - if(typeof type == 'string' && type != 'any' && - (type == 'null' ? value !== null : typeof value != type) && - !(value instanceof Array && type == 'array') && - !(value instanceof Date && type == 'date') && - !(type == 'integer' && value%1===0)){ - return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}]; - } - if(type instanceof Array){ - var unionErrors=[]; - for(var j = 0; j < type.length; j++){ // a union type - if(!(unionErrors=checkType(type[j],value)).length){ - break; - } - } - if(unionErrors.length){ - return unionErrors; - } - }else if(typeof type == 'object'){ - var priorErrors = errors; - errors = []; - checkProp(value,type,path); - var theseErrors = errors; - errors = priorErrors; - return theseErrors; - } - } - return []; - } - if(value === undefined){ - if(schema.required){ - addError("is missing and it is required"); - } - }else{ - errors = errors.concat(checkType(getType(schema),value)); - if(schema.disallow && !checkType(schema.disallow,value).length){ - addError(" disallowed value was matched"); - } - if(value !== null){ - if(value instanceof Array){ - if(schema.items){ - var itemsIsArray = schema.items instanceof Array; - var propDef = schema.items; - for (i = 0, l = value.length; i < l; i += 1) { - if (itemsIsArray) - propDef = schema.items[i]; - if (options.coerce) - value[i] = options.coerce(value[i], propDef); - errors.concat(checkProp(value[i],propDef,path,i)); - } - } - if(schema.minItems && value.length < schema.minItems){ - addError("There must be a minimum of " + schema.minItems + " in the array"); - } - if(schema.maxItems && value.length > schema.maxItems){ - addError("There must be a maximum of " + schema.maxItems + " in the array"); - } - }else if(schema.properties || schema.additionalProperties){ - errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties)); - } - if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){ - addError("does not match the regex pattern " + schema.pattern); - } - if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){ - addError("may only be " + schema.maxLength + " characters long"); - } - if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){ - addError("must be at least " + schema.minLength + " characters long"); - } - if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum && - schema.minimum > value){ - addError("must have a minimum value of " + schema.minimum); - } - if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum && - schema.maximum < value){ - addError("must have a maximum value of " + schema.maximum); - } - if(schema['enum']){ - var enumer = schema['enum']; - l = enumer.length; - var found; - for(var j = 0; j < l; j++){ - if(enumer[j]===value){ - found=1; - break; - } - } - if(!found){ - addError("does not have a value in the enumeration " + enumer.join(", ")); - } - } - if(typeof schema.maxDecimal == 'number' && - (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){ - addError("may only have " + schema.maxDecimal + " digits of decimal places"); - } - } - } - return null; - } - // validate an object against a schema - function checkObj(instance,objTypeDef,path,additionalProp){ - - if(typeof objTypeDef =='object'){ - if(typeof instance != 'object' || instance instanceof Array){ - errors.push({property:path,message:"an object is required"}); - } - - for(var i in objTypeDef){ - if(objTypeDef.hasOwnProperty(i)){ - var value = instance[i]; - // skip _not_ specified properties - if (value === undefined && options.existingOnly) continue; - var propDef = objTypeDef[i]; - // set default - if(value === undefined && propDef["default"]){ - value = instance[i] = propDef["default"]; - } - if(options.coerce && i in instance){ - value = instance[i] = options.coerce(value, propDef); - } - checkProp(value,propDef,path,i); - } - } - } - for(i in instance){ - if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){ - if (options.filter) { - delete instance[i]; - continue; - } else { - errors.push({property:path,message:(typeof value) + "The property " + i + - " is not defined in the schema and the schema does not allow additional properties"}); - } - } - var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires; - if(requires && !(requires in instance)){ - errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"}); - } - value = instance[i]; - if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){ - if(options.coerce){ - value = instance[i] = options.coerce(value, additionalProp); - } - checkProp(value,additionalProp,path,i); - } - if(!_changing && value && value.$schema){ - errors = errors.concat(checkProp(value,value.$schema,path,i)); - } - } - return errors; - } - if(schema){ - checkProp(instance,schema,'',_changing || ''); - } - if(!_changing && instance && instance.$schema){ - checkProp(instance,instance.$schema,'',''); - } - return {valid:!errors.length,errors:errors}; -}; -exports.mustBeValid = function(result){ - // summary: - // This checks to ensure that the result is valid and will throw an appropriate error message if it is not - // result: the result returned from checkPropertyChange or validate - if(!result.valid){ - throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n")); - } -} - -return exports; -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json deleted file mode 100644 index d91ec378f04..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_args": [ - [ - "json-schema@0.2.2", - "/Users/eshanker/Code/fsevents/node_modules/jsprim" - ] - ], - "_from": "json-schema@0.2.2", - "_id": "json-schema@0.2.2", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/json-schema", - "_npmUser": { - "email": "kriszyp@gmail.com", - "name": "kriszyp" - }, - "_npmVersion": "1.1.59", - "_phantomChildren": {}, - "_requested": { - "name": "json-schema", - "raw": "json-schema@0.2.2", - "rawSpec": "0.2.2", - "scope": null, - "spec": "0.2.2", - "type": "version" - }, - "_requiredBy": [ - "/fsevents/jsprim" - ], - "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz", - "_shasum": "50354f19f603917c695f70b85afa77c3b0f23506", - "_shrinkwrap": null, - "_spec": "json-schema@0.2.2", - "_where": "/Users/eshanker/Code/fsevents/node_modules/jsprim", - "author": { - "name": "Kris Zyp" - }, - "bugs": { - "url": "https://github.com/kriszyp/json-schema/issues" - }, - "dependencies": {}, - "description": "JSON Schema validation and specifications", - "devDependencies": { - "vows": "*" - }, - "directories": { - "lib": "./lib" - }, - "dist": { - "shasum": "50354f19f603917c695f70b85afa77c3b0f23506", - "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz" - }, - "homepage": "https://github.com/kriszyp/json-schema#readme", - "keywords": [ - "json", - "schema" - ], - "licenses": [ - { - "type": "AFLv2.1", - "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43" - }, - { - "type": "BSD", - "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13" - } - ], - "main": "./lib/validate.js", - "maintainers": [ - { - "email": "kriszyp@gmail.com", - "name": "kriszyp" - } - ], - "name": "json-schema", - "optionalDependencies": {}, - "readme": "JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator).\r\n\r\nCode is licensed under the AFL or BSD license as part of the Persevere \r\nproject which is administered under the Dojo foundation,\r\nand all contributions require a Dojo CLA.", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/kriszyp/json-schema.git" - }, - "scripts": { - "test": "echo TESTS DISABLED vows --spec test/*.js" - }, - "version": "0.2.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js deleted file mode 100644 index 40eeda5d9fb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-schema/test/tests.js +++ /dev/null @@ -1,95 +0,0 @@ -var assert = require('assert'); -var vows = require('vows'); -var path = require('path'); -var fs = require('fs'); - -var validate = require('../lib/validate').validate; - - -var revision = 'draft-03'; -var schemaRoot = path.join(__dirname, '..', revision); -var schemaNames = ['schema', 'hyper-schema', 'links', 'json-ref' ]; -var schemas = {}; - -schemaNames.forEach(function(name) { - var file = path.join(schemaRoot, name); - schemas[name] = loadSchema(file); -}); - -schemaNames.forEach(function(name) { - var s, n = name+'-nsd', f = path.join(schemaRoot, name); - schemas[n] = loadSchema(f); - s = schemas[n]; - delete s['$schema']; -}); - -function loadSchema(path) { - var data = fs.readFileSync(path, 'utf-8'); - var schema = JSON.parse(data); - return schema; -} - -function resultIsValid() { - return function(result) { - assert.isObject(result); - //assert.isBoolean(result.valid); - assert.equal(typeof(result.valid), 'boolean'); - assert.isArray(result.errors); - for (var i = 0; i < result.errors.length; i++) { - assert.notEqual(result.errors[i], null, 'errors['+i+'] is null'); - } - } -} - -function assertValidates(doc, schema) { - var context = {}; - - context[': validate('+doc+', '+schema+')'] = { - topic: validate(schemas[doc], schemas[schema]), - 'returns valid result': resultIsValid(), - 'with valid=true': function(result) { assert.equal(result.valid, true); }, - 'and no errors': function(result) { - // XXX work-around for bug in vows: [null] chokes it - if (result.errors[0] == null) assert.fail('(errors contains null)'); - assert.length(result.errors, 0); - } - }; - - return context; -} - -function assertSelfValidates(doc) { - var context = {}; - - context[': validate('+doc+')'] = { - topic: validate(schemas[doc]), - 'returns valid result': resultIsValid(), - 'with valid=true': function(result) { assert.equal(result.valid, true); }, - 'and no errors': function(result) { assert.length(result.errors, 0); } - }; - - return context; -} - -var suite = vows.describe('JSON Schema').addBatch({ - 'Core-NSD self-validates': assertSelfValidates('schema-nsd'), - 'Core-NSD/Core-NSD': assertValidates('schema-nsd', 'schema-nsd'), - 'Core-NSD/Core': assertValidates('schema-nsd', 'schema'), - - 'Core self-validates': assertSelfValidates('schema'), - 'Core/Core': assertValidates('schema', 'schema'), - - 'Hyper-NSD self-validates': assertSelfValidates('hyper-schema-nsd'), - 'Hyper self-validates': assertSelfValidates('hyper-schema'), - 'Hyper/Hyper': assertValidates('hyper-schema', 'hyper-schema'), - 'Hyper/Core': assertValidates('hyper-schema', 'schema'), - - 'Links-NSD self-validates': assertSelfValidates('links-nsd'), - 'Links self-validates': assertSelfValidates('links'), - 'Links/Hyper': assertValidates('links', 'hyper-schema'), - 'Links/Core': assertValidates('links', 'schema'), - - 'Json-Ref self-validates': assertSelfValidates('json-ref'), - 'Json-Ref/Hyper': assertValidates('json-ref', 'hyper-schema'), - 'Json-Ref/Core': assertValidates('json-ref', 'schema') -}).export(module); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore deleted file mode 100644 index 17d6b3677f0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/*.tgz diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md deleted file mode 100644 index 42bcb60af47..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/CHANGELOG.md +++ /dev/null @@ -1,14 +0,0 @@ -## Unreleased -- Fixes stringify to only take ancestors into account when checking - circularity. - It previously assumed every visited object was circular which led to [false - positives][issue9]. - Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. -- Fixes calling the `replacer` function in the proper context (`thisArg`). -- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). -- Speeds serializing by a factor of - Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching - only the ancestors for a circular references speeds up things considerably. - -[must]: https://github.com/moll/js-must -[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile deleted file mode 100644 index 36088c723a3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -NODE_OPTS = -TEST_OPTS = - -love: - @echo "Feel like makin' love." - -test: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) - -spec: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) - -autotest: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) - -autospec: - @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) - -pack: - @file=$$(npm pack); echo "$$file"; tar tf "$$file" - -publish: - npm publish - -tag: - git tag "v$$(node -e 'console.log(require("./package").version)')" - -clean: - rm -f *.tgz - npm prune --production - -.PHONY: love -.PHONY: test spec autotest autospec -.PHONY: pack publish tag -.PHONY: clean diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md deleted file mode 100644 index a11f302a330..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# json-stringify-safe - -Like JSON.stringify, but doesn't throw on circular references. - -## Usage - -Takes the same arguments as `JSON.stringify`. - -```javascript -var stringify = require('json-stringify-safe'); -var circularObj = {}; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; -console.log(stringify(circularObj, null, 2)); -``` - -Output: - -```json -{ - "circularRef": "[Circular]", - "list": [ - "[Circular]", - "[Circular]" - ] -} -``` - -## Details - -``` -stringify(obj, serializer, indent, decycler) -``` - -The first three arguments are the same as to JSON.stringify. The last -is an argument that's only used when the object has been seen already. - -The default `decycler` function returns the string `'[Circular]'`. -If, for example, you pass in `function(k,v){}` (return nothing) then it -will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, -then cyclical objects will always be represented as `{"foo":"bar"}` in -the result. - -``` -stringify.getSerialize(serializer, decycler) -``` - -Returns a serializer that can be used elsewhere. This is the actual -function that's passed to JSON.stringify. - -**Note** that the function returned from `getSerialize` is stateful for now, so -do **not** use it more than once. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json deleted file mode 100644 index 2c219c0ccbb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - "json-stringify-safe@~5.0.1", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "json-stringify-safe@>=5.0.1 <5.1.0", - "_id": "json-stringify-safe@5.0.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/json-stringify-safe", - "_nodeVersion": "2.0.1", - "_npmUser": { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - "_npmVersion": "2.10.0", - "_phantomChildren": {}, - "_requested": { - "name": "json-stringify-safe", - "raw": "json-stringify-safe@~5.0.1", - "rawSpec": "~5.0.1", - "scope": null, - "spec": ">=5.0.1 <5.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", - "_shrinkwrap": null, - "_spec": "json-stringify-safe@~5.0.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/json-stringify-safe/issues" - }, - "contributors": [ - { - "email": "andri@dot.ee", - "name": "Andri Möll", - "url": "http://themoll.com" - } - ], - "dependencies": {}, - "description": "Like JSON.stringify, but doesn't blow up on circular refs.", - "devDependencies": { - "mocha": ">= 2.1.0 < 3", - "must": ">= 0.12 < 0.13", - "sinon": ">= 1.12.2 < 2" - }, - "directories": {}, - "dist": { - "shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", - "tarball": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - }, - "gitHead": "3890dceab3ad14f8701e38ca74f38276abc76de5", - "homepage": "https://github.com/isaacs/json-stringify-safe", - "keywords": [ - "circular", - "json", - "safe", - "stringify" - ], - "license": "ISC", - "main": "stringify.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - }, - { - "email": "andri@dot.ee", - "name": "moll" - } - ], - "name": "json-stringify-safe", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/json-stringify-safe.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "5.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js deleted file mode 100644 index 124a452181a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/stringify.js +++ /dev/null @@ -1,27 +0,0 @@ -exports = module.exports = stringify -exports.getSerialize = serializer - -function stringify(obj, replacer, spaces, cycleReplacer) { - return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) -} - -function serializer(replacer, cycleReplacer) { - var stack = [], keys = [] - - if (cycleReplacer == null) cycleReplacer = function(key, value) { - if (stack[0] === value) return "[Circular ~]" - return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" - } - - return function(key, value) { - if (stack.length > 0) { - var thisPos = stack.indexOf(this) - ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) - ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) - if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) - } - else stack.push(value) - - return replacer == null ? value : replacer.call(this, key, value) - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts deleted file mode 100644 index 2544e5861e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/mocha.opts +++ /dev/null @@ -1,2 +0,0 @@ ---recursive ---require must diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js deleted file mode 100644 index 5b325831768..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/json-stringify-safe/test/stringify_test.js +++ /dev/null @@ -1,246 +0,0 @@ -var Sinon = require("sinon") -var stringify = require("..") -function jsonify(obj) { return JSON.stringify(obj, null, 2) } - -describe("Stringify", function() { - it("must stringify circular objects", function() { - var obj = {name: "Alice"} - obj.self = obj - var json = stringify(obj, null, 2) - json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) - }) - - it("must stringify circular objects with intermediaries", function() { - var obj = {name: "Alice"} - obj.identity = {self: obj} - var json = stringify(obj, null, 2) - json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}})) - }) - - it("must stringify circular objects deeper", function() { - var obj = {name: "Alice", child: {name: "Bob"}} - obj.child.self = obj.child - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", - child: {name: "Bob", self: "[Circular ~.child]"} - })) - }) - - it("must stringify circular objects deeper with intermediaries", function() { - var obj = {name: "Alice", child: {name: "Bob"}} - obj.child.identity = {self: obj.child} - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", - child: {name: "Bob", identity: {self: "[Circular ~.child]"}} - })) - }) - - it("must stringify circular objects in an array", function() { - var obj = {name: "Alice"} - obj.self = [obj, obj] - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", self: ["[Circular ~]", "[Circular ~]"] - })) - }) - - it("must stringify circular objects deeper in an array", function() { - var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]} - obj.children[0].self = obj.children[0] - obj.children[1].self = obj.children[1] - - stringify(obj, null, 2).must.eql(jsonify({ - name: "Alice", - children: [ - {name: "Bob", self: "[Circular ~.children.0]"}, - {name: "Eve", self: "[Circular ~.children.1]"} - ] - })) - }) - - it("must stringify circular arrays", function() { - var obj = [] - obj.push(obj) - obj.push(obj) - var json = stringify(obj, null, 2) - json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"])) - }) - - it("must stringify circular arrays with intermediaries", function() { - var obj = [] - obj.push({name: "Alice", self: obj}) - obj.push({name: "Bob", self: obj}) - - stringify(obj, null, 2).must.eql(jsonify([ - {name: "Alice", self: "[Circular ~]"}, - {name: "Bob", self: "[Circular ~]"} - ])) - }) - - it("must stringify repeated objects in objects", function() { - var obj = {} - var alice = {name: "Alice"} - obj.alice1 = alice - obj.alice2 = alice - - stringify(obj, null, 2).must.eql(jsonify({ - alice1: {name: "Alice"}, - alice2: {name: "Alice"} - })) - }) - - it("must stringify repeated objects in arrays", function() { - var alice = {name: "Alice"} - var obj = [alice, alice] - var json = stringify(obj, null, 2) - json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}])) - }) - - it("must call given decycler and use its output", function() { - var obj = {} - obj.a = obj - obj.b = obj - - var decycle = Sinon.spy(function() { return decycle.callCount }) - var json = stringify(obj, null, 2, decycle) - json.must.eql(jsonify({a: 1, b: 2}, null, 2)) - - decycle.callCount.must.equal(2) - decycle.thisValues[0].must.equal(obj) - decycle.args[0][0].must.equal("a") - decycle.args[0][1].must.equal(obj) - decycle.thisValues[1].must.equal(obj) - decycle.args[1][0].must.equal("b") - decycle.args[1][1].must.equal(obj) - }) - - it("must call replacer and use its output", function() { - var obj = {name: "Alice", child: {name: "Bob"}} - - var replacer = Sinon.spy(bangString) - var json = stringify(obj, replacer, 2) - json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}})) - - replacer.callCount.must.equal(4) - replacer.args[0][0].must.equal("") - replacer.args[0][1].must.equal(obj) - replacer.thisValues[1].must.equal(obj) - replacer.args[1][0].must.equal("name") - replacer.args[1][1].must.equal("Alice") - replacer.thisValues[2].must.equal(obj) - replacer.args[2][0].must.equal("child") - replacer.args[2][1].must.equal(obj.child) - replacer.thisValues[3].must.equal(obj.child) - replacer.args[3][0].must.equal("name") - replacer.args[3][1].must.equal("Bob") - }) - - it("must call replacer after describing circular references", function() { - var obj = {name: "Alice"} - obj.self = obj - - var replacer = Sinon.spy(bangString) - var json = stringify(obj, replacer, 2) - json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"})) - - replacer.callCount.must.equal(3) - replacer.args[0][0].must.equal("") - replacer.args[0][1].must.equal(obj) - replacer.thisValues[1].must.equal(obj) - replacer.args[1][0].must.equal("name") - replacer.args[1][1].must.equal("Alice") - replacer.thisValues[2].must.equal(obj) - replacer.args[2][0].must.equal("self") - replacer.args[2][1].must.equal("[Circular ~]") - }) - - it("must call given decycler and use its output for nested objects", - function() { - var obj = {} - obj.a = obj - obj.b = {self: obj} - - var decycle = Sinon.spy(function() { return decycle.callCount }) - var json = stringify(obj, null, 2, decycle) - json.must.eql(jsonify({a: 1, b: {self: 2}})) - - decycle.callCount.must.equal(2) - decycle.args[0][0].must.equal("a") - decycle.args[0][1].must.equal(obj) - decycle.args[1][0].must.equal("self") - decycle.args[1][1].must.equal(obj) - }) - - it("must use decycler's output when it returned null", function() { - var obj = {a: "b"} - obj.self = obj - obj.selves = [obj, obj] - - function decycle() { return null } - stringify(obj, null, 2, decycle).must.eql(jsonify({ - a: "b", - self: null, - selves: [null, null] - })) - }) - - it("must use decycler's output when it returned undefined", function() { - var obj = {a: "b"} - obj.self = obj - obj.selves = [obj, obj] - - function decycle() {} - stringify(obj, null, 2, decycle).must.eql(jsonify({ - a: "b", - selves: [null, null] - })) - }) - - it("must throw given a decycler that returns a cycle", function() { - var obj = {} - obj.self = obj - var err - function identity(key, value) { return value } - try { stringify(obj, null, 2, identity) } catch (ex) { err = ex } - err.must.be.an.instanceof(TypeError) - }) - - describe(".getSerialize", function() { - it("must stringify circular objects", function() { - var obj = {a: "b"} - obj.circularRef = obj - obj.list = [obj, obj] - - var json = JSON.stringify(obj, stringify.getSerialize(), 2) - json.must.eql(jsonify({ - "a": "b", - "circularRef": "[Circular ~]", - "list": ["[Circular ~]", "[Circular ~]"] - })) - }) - - // This is the behavior as of Mar 3, 2015. - // The serializer function keeps state inside the returned function and - // so far I'm not sure how to not do that. JSON.stringify's replacer is not - // called _after_ serialization. - xit("must return a function that could be called twice", function() { - var obj = {name: "Alice"} - obj.self = obj - - var json - var serializer = stringify.getSerialize() - - json = JSON.stringify(obj, serializer, 2) - json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) - - json = JSON.stringify(obj, serializer, 2) - json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) - }) - }) -}) - -function bangString(key, value) { - return typeof value == "string" ? value + "!" : value -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml deleted file mode 100644 index 9338bf14703..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: "node_js" -node_js: - - 0.6 - - 0.8 - - 0.10 - - 0.11 - - 0.12 - - iojs-v1.0 - - iojs-v2.0 - - iojs diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md deleted file mode 100644 index e096dfa5d62..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# JSON Pointer for nodejs - -This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08). - -## Usage - - var jsonpointer = require("jsonpointer"); - var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; - var one = jsonpointer.get(obj, "/foo"); - var two = jsonpointer.get(obj, "/bar/baz"); - var three = jsonpointer.get(obj, "/qux/0"); - var four = jsonpointer.get(obj, "/qux/1"); - var five = jsonpointer.get(obj, "/qux/2"); - var notfound = jsonpointer.get(obj, "/quo"); // returns null - - jsonpointer.set(obj, "/foo", 6); // obj.foo = 6; - -## Testing - - $ node test.js - All tests pass. - $ - -[![Build Status](https://travis-ci.org/janl/node-jsonpointer.png?branch=master)](https://travis-ci.org/janl/node-jsonpointer) - -## Author - -(c) 2011 Jan Lehnardt - -## License - -MIT License. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js deleted file mode 100644 index 006f85ef3a5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/jsonpointer.js +++ /dev/null @@ -1,76 +0,0 @@ -var untilde = function(str) { - return str.replace(/~./g, function(m) { - switch (m) { - case "~0": - return "~"; - case "~1": - return "/"; - } - throw new Error("Invalid tilde escape: " + m); - }); -} - -var traverse = function(obj, pointer, value) { - // assert(isArray(pointer)) - var part = untilde(pointer.shift()); - if(!obj.hasOwnProperty(part)) { - return null; - } - if(pointer.length !== 0) { // keep traversin! - return traverse(obj[part], pointer, value); - } - // we're done - if(typeof value === "undefined") { - // just reading - return obj[part]; - } - // set new value, return old value - var old_value = obj[part]; - if(value === null) { - delete obj[part]; - } else { - obj[part] = value; - } - return old_value; -} - -var validate_input = function(obj, pointer) { - if(typeof obj !== "object") { - throw new Error("Invalid input object."); - } - - if(pointer === "") { - return []; - } - - if(!pointer) { - throw new Error("Invalid JSON pointer."); - } - - pointer = pointer.split("/"); - var first = pointer.shift(); - if (first !== "") { - throw new Error("Invalid JSON pointer."); - } - - return pointer; -} - -var get = function(obj, pointer) { - pointer = validate_input(obj, pointer); - if (pointer.length === 0) { - return obj; - } - return traverse(obj, pointer); -} - -var set = function(obj, pointer, value) { - pointer = validate_input(obj, pointer); - if (pointer.length === 0) { - throw new Error("Invalid JSON pointer for set.") - } - return traverse(obj, pointer, value); -} - -exports.get = get -exports.set = set diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json deleted file mode 100644 index ab09a08392f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_args": [ - [ - "jsonpointer@2.0.0", - "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid" - ] - ], - "_from": "jsonpointer@2.0.0", - "_id": "jsonpointer@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/jsonpointer", - "_nodeVersion": "0.10.36", - "_npmUser": { - "email": "marc.brookman@gmail.com", - "name": "marcbachmann" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "jsonpointer", - "raw": "jsonpointer@2.0.0", - "rawSpec": "2.0.0", - "scope": null, - "spec": "2.0.0", - "type": "version" - }, - "_requiredBy": [ - "/fsevents/is-my-json-valid" - ], - "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", - "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", - "_shrinkwrap": null, - "_spec": "jsonpointer@2.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid", - "author": { - "email": "jan@apache.org", - "name": "Jan Lehnardt" - }, - "bugs": { - "url": "http://github.com/janl/node-jsonpointer/issues" - }, - "contributors": [ - { - "email": "joe-github@cursive.net", - "name": "Joe Hildebrand" - } - ], - "dependencies": {}, - "description": "Simple JSON Addressing.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", - "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" - }, - "engines": { - "node": ">=0.6.0" - }, - "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8", - "homepage": "https://github.com/janl/node-jsonpointer#readme", - "license": "MIT", - "main": "./jsonpointer", - "maintainers": [ - { - "email": "jan@apache.org", - "name": "jan" - }, - { - "email": "marc.brookman@gmail.com", - "name": "marcbachmann" - } - ], - "name": "jsonpointer", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/janl/node-jsonpointer.git" - }, - "scripts": { - "test": "node test.js" - }, - "tags": [ - "simple", - "util", - "util", - "utility" - ], - "version": "2.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js deleted file mode 100644 index 1c67d7f7efc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsonpointer/test.js +++ /dev/null @@ -1,98 +0,0 @@ -var assert = require("assert"); -var jsonpointer = require("./jsonpointer"); - -var obj = { - a: 1, - b: { - c: 2 - }, - d: { - e: [{a:3}, {b:4}, {c:5}] - } -}; - -assert.equal(jsonpointer.get(obj, "/a"), 1); -assert.equal(jsonpointer.get(obj, "/b/c"), 2); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 5); - -// set returns old value -assert.equal(jsonpointer.set(obj, "/a", 2), 1); -assert.equal(jsonpointer.set(obj, "/b/c", 3), 2); -assert.equal(jsonpointer.set(obj, "/d/e/0/a", 4), 3); -assert.equal(jsonpointer.set(obj, "/d/e/1/b", 5), 4); -assert.equal(jsonpointer.set(obj, "/d/e/2/c", 6), 5); - -assert.equal(jsonpointer.get(obj, "/a"), 2); -assert.equal(jsonpointer.get(obj, "/b/c"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 5); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 6); - -assert.equal(jsonpointer.get(obj, ""), obj); -assert.throws(function(){ jsonpointer.get(obj, "a"); }, validateError); -assert.throws(function(){ jsonpointer.get(obj, "a/"); }, validateError); - -function validateError(err) { - if ( (err instanceof Error) && /Invalid JSON pointer/.test(err.message) ) { - return true; - } -} - -var complexKeys = { - "a/b": { - c: 1 - }, - d: { - "e/f": 2 - }, - "~1": 3, - "01": 4 -} - -assert.equal(jsonpointer.get(complexKeys, "/a~1b/c"), 1); -assert.equal(jsonpointer.get(complexKeys, "/d/e~1f"), 2); -assert.equal(jsonpointer.get(complexKeys, "/~01"), 3); -assert.equal(jsonpointer.get(complexKeys, "/01"), 4); -assert.equal(jsonpointer.get(complexKeys, "/a/b/c"), null); -assert.equal(jsonpointer.get(complexKeys, "/~1"), null); - -// draft-ietf-appsawg-json-pointer-08 has special array rules -var ary = [ "zero", "one", "two" ]; -assert.equal(jsonpointer.get(ary, "/01"), null); - -//assert.equal(jsonpointer.set(ary, "/-", "three"), null); -//assert.equal(ary[3], "three"); - -// Examples from the draft: -var example = { - "foo": ["bar", "baz"], - "": 0, - "a/b": 1, - "c%d": 2, - "e^f": 3, - "g|h": 4, - "i\\j": 5, - "k\"l": 6, - " ": 7, - "m~n": 8 -}; - -assert.equal(jsonpointer.get(example, ""), example); -var ans = jsonpointer.get(example, "/foo"); -assert.equal(ans.length, 2); -assert.equal(ans[0], "bar"); -assert.equal(ans[1], "baz"); -assert.equal(jsonpointer.get(example, "/foo/0"), "bar"); -assert.equal(jsonpointer.get(example, "/"), 0); -assert.equal(jsonpointer.get(example, "/a~1b"), 1); -assert.equal(jsonpointer.get(example, "/c%d"), 2); -assert.equal(jsonpointer.get(example, "/e^f"), 3); -assert.equal(jsonpointer.get(example, "/g|h"), 4); -assert.equal(jsonpointer.get(example, "/i\\j"), 5); -assert.equal(jsonpointer.get(example, "/k\"l"), 6); -assert.equal(jsonpointer.get(example, "/ "), 7); -assert.equal(jsonpointer.get(example, "/m~0n"), 8); - -console.log("All tests pass."); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md deleted file mode 100644 index ab3a66417a6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/CHANGES.md +++ /dev/null @@ -1,35 +0,0 @@ -# Changelog - -## not yet released - -None yet. - -## v1.3.0 (2016-06-22) - -* #14 add safer version of hasOwnProperty() -* #15 forEachKey() should ignore inherited properties - -## v1.2.2 (2015-10-15) - -* #11 NPM package shouldn't include any code that does `require('JSV')` -* #12 jsl.node.conf missing definition for "module" - -## v1.2.1 (2015-10-14) - -* #8 odd date parsing behaviour - -## v1.2.0 (2015-10-13) - -* #9 want function for returning RFC1123 dates - -## v1.1.0 (2015-09-02) - -* #6 a new suite of hrtime manipulation routines: `hrtimeAdd()`, - `hrtimeAccum()`, `hrtimeNanosec()`, `hrtimeMicrosec()` and - `hrtimeMillisec()`. - -## v1.0.0 (2015-09-01) - -First tracked release. Includes everything in previous releases, plus: - -* #4 want function for merging objects diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE deleted file mode 100644 index cbc0bb3ba3b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012, Joyent, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md deleted file mode 100644 index 7303642e016..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/README.md +++ /dev/null @@ -1,237 +0,0 @@ -# jsprim: utilities for primitive JavaScript types - -This module provides miscellaneous facilities for working with strings, -numbers, dates, and objects and arrays of these basic types. - - -### deepCopy(obj) - -Creates a deep copy of a primitive type, object, or array of primitive types. - - -### deepEqual(obj1, obj2) - -Returns whether two objects are equal. - - -### isEmpty(obj) - -Returns true if the given object has no properties and false otherwise. This -is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)). - -### hasKey(obj, key) - -Returns true if the given object has an enumerable, non-inherited property -called `key`. [For information on enumerability and ownership of properties, see -the MDN -documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) - -### forEachKey(obj, callback) - -Like Array.forEach, but iterates enumerable, owned properties of an object -rather than elements of an array. Equivalent to: - - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - callback(key, obj[key]); - } - } - - -### flattenObject(obj, depth) - -Flattens an object up to a given level of nesting, returning an array of arrays -of length "depth + 1", where the first "depth" elements correspond to flattened -columns and the last element contains the remaining object . For example: - - flattenObject({ - 'I': { - 'A': { - 'i': { - 'datum1': [ 1, 2 ], - 'datum2': [ 3, 4 ] - }, - 'ii': { - 'datum1': [ 3, 4 ] - } - }, - 'B': { - 'i': { - 'datum1': [ 5, 6 ] - }, - 'ii': { - 'datum1': [ 7, 8 ], - 'datum2': [ 3, 4 ], - }, - 'iii': { - } - } - }, - 'II': { - 'A': { - 'i': { - 'datum1': [ 1, 2 ], - 'datum2': [ 3, 4 ] - } - } - } - }, 3) - -becomes: - - [ - [ 'I', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ], - [ 'I', 'A', 'ii', { 'datum1': [ 3, 4 ] } ], - [ 'I', 'B', 'i', { 'datum1': [ 5, 6 ] } ], - [ 'I', 'B', 'ii', { 'datum1': [ 7, 8 ], 'datum2': [ 3, 4 ] } ], - [ 'I', 'B', 'iii', {} ], - [ 'II', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ] - ] - -This function is strict: "depth" must be a non-negative integer and "obj" must -be a non-null object with at least "depth" levels of nesting under all keys. - - -### flattenIter(obj, depth, func) - -This is similar to `flattenObject` except that instead of returning an array, -this function invokes `func(entry)` for each `entry` in the array that -`flattenObject` would return. `flattenIter(obj, depth, func)` is logically -equivalent to `flattenObject(obj, depth).forEach(func)`. Importantly, this -version never constructs the full array. Its memory usage is O(depth) rather -than O(n) (where `n` is the number of flattened elements). - -There's another difference between `flattenObject` and `flattenIter` that's -related to the special case where `depth === 0`. In this case, `flattenObject` -omits the array wrapping `obj` (which is regrettable). - - -### pluck(obj, key) - -Fetch nested property "key" from object "obj", traversing objects as needed. -For example, `pluck(obj, "foo.bar.baz")` is roughly equivalent to -`obj.foo.bar.baz`, except that: - -1. If traversal fails, the resulting value is undefined, and no error is - thrown. For example, `pluck({}, "foo.bar")` is just undefined. -2. If "obj" has property "key" directly (without traversing), the - corresponding property is returned. For example, - `pluck({ 'foo.bar': 1 }, 'foo.bar')` is 1, not undefined. This is also - true recursively, so `pluck({ 'a': { 'foo.bar': 1 } }, 'a.foo.bar')` is - also 1, not undefined. - - -### randElt(array) - -Returns an element from "array" selected uniformly at random. If "array" is -empty, throws an Error. - - -### startsWith(str, prefix) - -Returns true if the given string starts with the given prefix and false -otherwise. - - -### endsWith(str, suffix) - -Returns true if the given string ends with the given suffix and false -otherwise. - - -### iso8601(date) - -Converts a Date object to an ISO8601 date string of the form -"YYYY-MM-DDTHH:MM:SS.sssZ". This format is not customizable. - - -### parseDateTime(str) - -Parses a date expressed as a string, as either a number of milliseconds since -the epoch or any string format that Date accepts, giving preference to the -former where these two sets overlap (e.g., strings containing small numbers). - - -### hrtimeDiff(timeA, timeB) - -Given two hrtime readings (as from Node's `process.hrtime()`), where timeA is -later than timeB, compute the difference and return that as an hrtime. It is -illegal to invoke this for a pair of times where timeB is newer than timeA. - -### hrtimeAdd(timeA, timeB) - -Add two hrtime intervals (as from Node's `process.hrtime()`), returning a new -hrtime interval array. This function does not modify either input argument. - - -### hrtimeAccum(timeA, timeB) - -Add two hrtime intervals (as from Node's `process.hrtime()`), storing the -result in `timeA`. This function overwrites (and returns) the first argument -passed in. - - -### hrtimeNanosec(timeA), hrtimeMicrosec(timeA), hrtimeMillisec(timeA) - -This suite of functions converts a hrtime interval (as from Node's -`process.hrtime()`) into a scalar number of nanoseconds, microseconds or -milliseconds. Results are truncated, as with `Math.floor()`. - - -### validateJsonObject(schema, object) - -Uses JSON validation (via JSV) to validate the given object against the given -schema. On success, returns null. On failure, *returns* (does not throw) a -useful Error object. - - -### extraProperties(object, allowed) - -Check an object for unexpected properties. Accepts the object to check, and an -array of allowed property name strings. If extra properties are detected, an -array of extra property names is returned. If no properties other than those -in the allowed list are present on the object, the returned array will be of -zero length. - -### mergeObjects(provided, overrides, defaults) - -Merge properties from objects "provided", "overrides", and "defaults". The -intended use case is for functions that accept named arguments in an "args" -object, but want to provide some default values and override other values. In -that case, "provided" is what the caller specified, "overrides" are what the -function wants to override, and "defaults" contains default values. - -The function starts with the values in "defaults", overrides them with the -values in "provided", and then overrides those with the values in "overrides". -For convenience, any of these objects may be falsey, in which case they will be -ignored. The input objects are never modified, but properties in the returned -object are not deep-copied. - -For example: - - mergeObjects(undefined, { 'objectMode': true }, { 'highWaterMark': 0 }) - -returns: - - { 'objectMode': true, 'highWaterMark': 0 } - -For another example: - - mergeObjects( - { 'highWaterMark': 16, 'objectMode': 7 }, /* from caller */ - { 'objectMode': true }, /* overrides */ - { 'highWaterMark': 0 }); /* default */ - -returns: - - { 'objectMode': true, 'highWaterMark': 16 } - - -# Contributing - -Code should be "make check" clean. This target assumes that -[jsl](http://github.com/davepacheco/javascriptlint) and -[jsstyle](http://github.com/davepacheco/jsstyle) are on your path. - -New tests should generally accompany new functions and bug fixes. The tests -should pass cleanly (run tests/basic.js). diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js deleted file mode 100644 index 26c3ba1c076..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/lib/jsprim.js +++ /dev/null @@ -1,488 +0,0 @@ -/* - * lib/jsprim.js: utilities for primitive JavaScript types - */ - -var mod_assert = require('assert'); -var mod_util = require('util'); - -var mod_extsprintf = require('extsprintf'); -var mod_verror = require('verror'); -var mod_jsonschema = require('json-schema'); - -/* - * Public interface - */ -exports.deepCopy = deepCopy; -exports.deepEqual = deepEqual; -exports.isEmpty = isEmpty; -exports.hasKey = hasKey; -exports.forEachKey = forEachKey; -exports.pluck = pluck; -exports.flattenObject = flattenObject; -exports.flattenIter = flattenIter; -exports.validateJsonObject = validateJsonObjectJS; -exports.validateJsonObjectJS = validateJsonObjectJS; -exports.randElt = randElt; -exports.extraProperties = extraProperties; -exports.mergeObjects = mergeObjects; - -exports.startsWith = startsWith; -exports.endsWith = endsWith; - -exports.iso8601 = iso8601; -exports.rfc1123 = rfc1123; -exports.parseDateTime = parseDateTime; - -exports.hrtimediff = hrtimeDiff; -exports.hrtimeDiff = hrtimeDiff; -exports.hrtimeAccum = hrtimeAccum; -exports.hrtimeAdd = hrtimeAdd; -exports.hrtimeNanosec = hrtimeNanosec; -exports.hrtimeMicrosec = hrtimeMicrosec; -exports.hrtimeMillisec = hrtimeMillisec; - - -/* - * Deep copy an acyclic *basic* Javascript object. This only handles basic - * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects - * containing these. This does *not* handle instances of other classes. - */ -function deepCopy(obj) -{ - var ret, key; - var marker = '__deepCopy'; - - if (obj && obj[marker]) - throw (new Error('attempted deep copy of cyclic object')); - - if (obj && obj.constructor == Object) { - ret = {}; - obj[marker] = true; - - for (key in obj) { - if (key == marker) - continue; - - ret[key] = deepCopy(obj[key]); - } - - delete (obj[marker]); - return (ret); - } - - if (obj && obj.constructor == Array) { - ret = []; - obj[marker] = true; - - for (key = 0; key < obj.length; key++) - ret.push(deepCopy(obj[key])); - - delete (obj[marker]); - return (ret); - } - - /* - * It must be a primitive type -- just return it. - */ - return (obj); -} - -function deepEqual(obj1, obj2) -{ - if (typeof (obj1) != typeof (obj2)) - return (false); - - if (obj1 === null || obj2 === null || typeof (obj1) != 'object') - return (obj1 === obj2); - - if (obj1.constructor != obj2.constructor) - return (false); - - var k; - for (k in obj1) { - if (!obj2.hasOwnProperty(k)) - return (false); - - if (!deepEqual(obj1[k], obj2[k])) - return (false); - } - - for (k in obj2) { - if (!obj1.hasOwnProperty(k)) - return (false); - } - - return (true); -} - -function isEmpty(obj) -{ - var key; - for (key in obj) - return (false); - return (true); -} - -function hasKey(obj, key) -{ - mod_assert.equal(typeof (key), 'string'); - return (Object.prototype.hasOwnProperty.call(obj, key)); -} - -function forEachKey(obj, callback) -{ - for (var key in obj) { - if (hasKey(obj, key)) { - callback(key, obj[key]); - } - } -} - -function pluck(obj, key) -{ - mod_assert.equal(typeof (key), 'string'); - return (pluckv(obj, key)); -} - -function pluckv(obj, key) -{ - if (obj === null || typeof (obj) !== 'object') - return (undefined); - - if (obj.hasOwnProperty(key)) - return (obj[key]); - - var i = key.indexOf('.'); - if (i == -1) - return (undefined); - - var key1 = key.substr(0, i); - if (!obj.hasOwnProperty(key1)) - return (undefined); - - return (pluckv(obj[key1], key.substr(i + 1))); -} - -/* - * Invoke callback(row) for each entry in the array that would be returned by - * flattenObject(data, depth). This is just like flattenObject(data, - * depth).forEach(callback), except that the intermediate array is never - * created. - */ -function flattenIter(data, depth, callback) -{ - doFlattenIter(data, depth, [], callback); -} - -function doFlattenIter(data, depth, accum, callback) -{ - var each; - var key; - - if (depth === 0) { - each = accum.slice(0); - each.push(data); - callback(each); - return; - } - - mod_assert.ok(data !== null); - mod_assert.equal(typeof (data), 'object'); - mod_assert.equal(typeof (depth), 'number'); - mod_assert.ok(depth >= 0); - - for (key in data) { - each = accum.slice(0); - each.push(key); - doFlattenIter(data[key], depth - 1, each, callback); - } -} - -function flattenObject(data, depth) -{ - if (depth === 0) - return ([ data ]); - - mod_assert.ok(data !== null); - mod_assert.equal(typeof (data), 'object'); - mod_assert.equal(typeof (depth), 'number'); - mod_assert.ok(depth >= 0); - - var rv = []; - var key; - - for (key in data) { - flattenObject(data[key], depth - 1).forEach(function (p) { - rv.push([ key ].concat(p)); - }); - } - - return (rv); -} - -function startsWith(str, prefix) -{ - return (str.substr(0, prefix.length) == prefix); -} - -function endsWith(str, suffix) -{ - return (str.substr( - str.length - suffix.length, suffix.length) == suffix); -} - -function iso8601(d) -{ - if (typeof (d) == 'number') - d = new Date(d); - mod_assert.ok(d.constructor === Date); - return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ', - d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(), - d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), - d.getUTCMilliseconds())); -} - -var RFC1123_MONTHS = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; -var RFC1123_DAYS = [ - 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; - -function rfc1123(date) { - return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT', - RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(), - RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(), - date.getUTCHours(), date.getUTCMinutes(), - date.getUTCSeconds())); -} - -/* - * Parses a date expressed as a string, as either a number of milliseconds since - * the epoch or any string format that Date accepts, giving preference to the - * former where these two sets overlap (e.g., small numbers). - */ -function parseDateTime(str) -{ - /* - * This is irritatingly implicit, but significantly more concise than - * alternatives. The "+str" will convert a string containing only a - * number directly to a Number, or NaN for other strings. Thus, if the - * conversion succeeds, we use it (this is the milliseconds-since-epoch - * case). Otherwise, we pass the string directly to the Date - * constructor to parse. - */ - var numeric = +str; - if (!isNaN(numeric)) { - return (new Date(numeric)); - } else { - return (new Date(str)); - } -} - -function validateJsonObjectJS(schema, input) -{ - var report = mod_jsonschema.validate(input, schema); - - if (report.errors.length === 0) - return (null); - - /* Currently, we only do anything useful with the first error. */ - var error = report.errors[0]; - - /* The failed property is given by a URI with an irrelevant prefix. */ - var propname = error['property']; - var reason = error['message'].toLowerCase(); - var i, j; - - /* - * There's at least one case where the property error message is - * confusing at best. We work around this here. - */ - if ((i = reason.indexOf('the property ')) != -1 && - (j = reason.indexOf(' is not defined in the schema and the ' + - 'schema does not allow additional properties')) != -1) { - i += 'the property '.length; - if (propname === '') - propname = reason.substr(i, j - i); - else - propname = propname + '.' + reason.substr(i, j - i); - - reason = 'unsupported property'; - } - - var rv = new mod_verror.VError('property "%s": %s', propname, reason); - rv.jsv_details = error; - return (rv); -} - -function randElt(arr) -{ - mod_assert.ok(Array.isArray(arr) && arr.length > 0, - 'randElt argument must be a non-empty array'); - - return (arr[Math.floor(Math.random() * arr.length)]); -} - -function assertHrtime(a) -{ - mod_assert.ok(a[0] >= 0 && a[1] >= 0, - 'negative numbers not allowed in hrtimes'); - mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow'); -} - -/* - * Compute the time elapsed between hrtime readings A and B, where A is later - * than B. hrtime readings come from Node's process.hrtime(). There is no - * defined way to represent negative deltas, so it's illegal to diff B from A - * where the time denoted by B is later than the time denoted by A. If this - * becomes valuable, we can define a representation and extend the - * implementation to support it. - */ -function hrtimeDiff(a, b) -{ - assertHrtime(a); - assertHrtime(b); - mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]), - 'negative differences not allowed'); - - var rv = [ a[0] - b[0], 0 ]; - - if (a[1] >= b[1]) { - rv[1] = a[1] - b[1]; - } else { - rv[0]--; - rv[1] = 1e9 - (b[1] - a[1]); - } - - return (rv); -} - -/* - * Convert a hrtime reading from the array format returned by Node's - * process.hrtime() into a scalar number of nanoseconds. - */ -function hrtimeNanosec(a) -{ - assertHrtime(a); - - return (Math.floor(a[0] * 1e9 + a[1])); -} - -/* - * Convert a hrtime reading from the array format returned by Node's - * process.hrtime() into a scalar number of microseconds. - */ -function hrtimeMicrosec(a) -{ - assertHrtime(a); - - return (Math.floor(a[0] * 1e6 + a[1] / 1e3)); -} - -/* - * Convert a hrtime reading from the array format returned by Node's - * process.hrtime() into a scalar number of milliseconds. - */ -function hrtimeMillisec(a) -{ - assertHrtime(a); - - return (Math.floor(a[0] * 1e3 + a[1] / 1e6)); -} - -/* - * Add two hrtime readings A and B, overwriting A with the result of the - * addition. This function is useful for accumulating several hrtime intervals - * into a counter. Returns A. - */ -function hrtimeAccum(a, b) -{ - assertHrtime(a); - assertHrtime(b); - - /* - * Accumulate the nanosecond component. - */ - a[1] += b[1]; - if (a[1] >= 1e9) { - /* - * The nanosecond component overflowed, so carry to the seconds - * field. - */ - a[0]++; - a[1] -= 1e9; - } - - /* - * Accumulate the seconds component. - */ - a[0] += b[0]; - - return (a); -} - -/* - * Add two hrtime readings A and B, returning the result as a new hrtime array. - * Does not modify either input argument. - */ -function hrtimeAdd(a, b) -{ - assertHrtime(a); - - var rv = [ a[0], a[1] ]; - - return (hrtimeAccum(rv, b)); -} - - -/* - * Check an object for unexpected properties. Accepts the object to check, and - * an array of allowed property names (strings). Returns an array of key names - * that were found on the object, but did not appear in the list of allowed - * properties. If no properties were found, the returned array will be of - * zero length. - */ -function extraProperties(obj, allowed) -{ - mod_assert.ok(typeof (obj) === 'object' && obj !== null, - 'obj argument must be a non-null object'); - mod_assert.ok(Array.isArray(allowed), - 'allowed argument must be an array of strings'); - for (var i = 0; i < allowed.length; i++) { - mod_assert.ok(typeof (allowed[i]) === 'string', - 'allowed argument must be an array of strings'); - } - - return (Object.keys(obj).filter(function (key) { - return (allowed.indexOf(key) === -1); - })); -} - -/* - * Given three sets of properties "provided" (may be undefined), "overrides" - * (required), and "defaults" (may be undefined), construct an object containing - * the union of these sets with "overrides" overriding "provided", and - * "provided" overriding "defaults". None of the input objects are modified. - */ -function mergeObjects(provided, overrides, defaults) -{ - var rv, k; - - rv = {}; - if (defaults) { - for (k in defaults) - rv[k] = defaults[k]; - } - - if (provided) { - for (k in provided) - rv[k] = provided[k]; - } - - if (overrides) { - for (k in overrides) - rv[k] = overrides[k]; - } - - return (rv); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json deleted file mode 100644 index c3ea628d8be..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/jsprim/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_args": [ - [ - "jsprim@^1.2.2", - "/Users/eshanker/Code/fsevents/node_modules/http-signature" - ] - ], - "_from": "jsprim@>=1.2.2 <2.0.0", - "_id": "jsprim@1.3.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/jsprim", - "_nodeVersion": "0.12.7", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/jsprim-1.3.0.tgz_1466708163640_0.5282344303559512" - }, - "_npmUser": { - "email": "dap@cs.brown.edu", - "name": "dap" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "name": "jsprim", - "raw": "jsprim@^1.2.2", - "rawSpec": "^1.2.2", - "scope": null, - "spec": ">=1.2.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/http-signature" - ], - "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz", - "_shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650", - "_shrinkwrap": null, - "_spec": "jsprim@^1.2.2", - "_where": "/Users/eshanker/Code/fsevents/node_modules/http-signature", - "bugs": { - "url": "https://github.com/davepacheco/node-jsprim/issues" - }, - "dependencies": { - "extsprintf": "1.0.2", - "json-schema": "0.2.2", - "verror": "1.3.6" - }, - "description": "utilities for primitive JavaScript types", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650", - "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz" - }, - "engines": [ - "node >=0.6.0" - ], - "gitHead": "694edcb22e2291c21f6c2a23907bf02e1edbfdf4", - "homepage": "https://github.com/davepacheco/node-jsprim#readme", - "license": "MIT", - "main": "./lib/jsprim.js", - "maintainers": [ - { - "email": "dap@cs.brown.edu", - "name": "dap" - } - ], - "name": "jsprim", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/davepacheco/node-jsprim.git" - }, - "scripts": {}, - "version": "1.3.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md deleted file mode 100644 index d6705ac86d1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/HISTORY.md +++ /dev/null @@ -1,341 +0,0 @@ -1.23.0 / 2016-05-01 -=================== - - * Add `application/efi` - * Add `application/vnd.3gpp.sms+xml` - * Add `application/vnd.3lightssoftware.imagescal` - * Add `application/vnd.coreos.ignition+json` - * Add `application/vnd.desmume.movie` - * Add `application/vnd.onepager` - * Add `application/vnd.vel+json` - * Add `text/prs.prop.logic` - * Add `video/encaprtp` - * Add `video/h265` - * Add `video/iso.segment` - * Add `video/raptorfec` - * Add `video/rtploopback` - * Add `video/vnd.radgamettools.bink` - * Add `video/vnd.radgamettools.smacker` - * Add `video/vp8` - * Add extension `.3gpp` to `audio/3gpp` - -1.22.0 / 2016-02-15 -=================== - - * Add `application/ppsp-tracker+json` - * Add `application/problem+json` - * Add `application/problem+xml` - * Add `application/vnd.hdt` - * Add `application/vnd.ms-printschematicket+xml` - * Add `model/vnd.rosette.annotated-data-model` - * Add `text/slim` - * Add extension `.rng` to `application/xml` - * Fix extension of `application/dash+xml` to be `.mpd` - * Update primary extension to `.m4a` for `audio/mp4` - -1.21.0 / 2016-01-06 -=================== - - * Add `application/emergencycalldata.comment+xml` - * Add `application/emergencycalldata.deviceinfo+xml` - * Add `application/emergencycalldata.providerinfo+xml` - * Add `application/emergencycalldata.serviceinfo+xml` - * Add `application/emergencycalldata.subscriberinfo+xml` - * Add `application/vnd.filmit.zfc` - * Add `application/vnd.google-apps.document` - * Add `application/vnd.google-apps.presentation` - * Add `application/vnd.google-apps.spreadsheet` - * Add `application/vnd.mapbox-vector-tile` - * Add `application/vnd.ms-printdevicecapabilities+xml` - * Add `application/vnd.ms-windows.devicepairing` - * Add `application/vnd.ms-windows.nwprinting.oob` - * Add `application/vnd.tml` - * Add `audio/evs` - -1.20.0 / 2015-11-10 -=================== - - * Add `application/cdni` - * Add `application/csvm+json` - * Add `application/rfc+xml` - * Add `application/vnd.3gpp.access-transfer-events+xml` - * Add `application/vnd.3gpp.srvcc-ext+xml` - * Add `application/vnd.ms-windows.wsd.oob` - * Add `application/vnd.oxli.countgraph` - * Add `application/vnd.pagerduty+json` - * Add `text/x-suse-ymp` - -1.19.0 / 2015-09-17 -=================== - - * Add `application/vnd.3gpp-prose-pc3ch+xml` - * Add `application/vnd.3gpp.srvcc-info+xml` - * Add `application/vnd.apple.pkpass` - * Add `application/vnd.drive+json` - -1.18.0 / 2015-09-03 -=================== - - * Add `application/pkcs12` - * Add `application/vnd.3gpp-prose+xml` - * Add `application/vnd.3gpp.mid-call+xml` - * Add `application/vnd.3gpp.state-and-event-info+xml` - * Add `application/vnd.anki` - * Add `application/vnd.firemonkeys.cloudcell` - * Add `application/vnd.openblox.game+xml` - * Add `application/vnd.openblox.game-binary` - -1.17.0 / 2015-08-13 -=================== - - * Add `application/x-msdos-program` - * Add `audio/g711-0` - * Add `image/vnd.mozilla.apng` - * Add extension `.exe` to `application/x-msdos-program` - -1.16.0 / 2015-07-29 -=================== - - * Add `application/vnd.uri-map` - -1.15.0 / 2015-07-13 -=================== - - * Add `application/x-httpd-php` - -1.14.0 / 2015-06-25 -=================== - - * Add `application/scim+json` - * Add `application/vnd.3gpp.ussd+xml` - * Add `application/vnd.biopax.rdf+xml` - * Add `text/x-processing` - -1.13.0 / 2015-06-07 -=================== - - * Add nginx as a source - * Add `application/x-cocoa` - * Add `application/x-java-archive-diff` - * Add `application/x-makeself` - * Add `application/x-perl` - * Add `application/x-pilot` - * Add `application/x-redhat-package-manager` - * Add `application/x-sea` - * Add `audio/x-m4a` - * Add `audio/x-realaudio` - * Add `image/x-jng` - * Add `text/mathml` - -1.12.0 / 2015-06-05 -=================== - - * Add `application/bdoc` - * Add `application/vnd.hyperdrive+json` - * Add `application/x-bdoc` - * Add extension `.rtf` to `text/rtf` - -1.11.0 / 2015-05-31 -=================== - - * Add `audio/wav` - * Add `audio/wave` - * Add extension `.litcoffee` to `text/coffeescript` - * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` - * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` - -1.10.0 / 2015-05-19 -=================== - - * Add `application/vnd.balsamiq.bmpr` - * Add `application/vnd.microsoft.portable-executable` - * Add `application/x-ns-proxy-autoconfig` - -1.9.1 / 2015-04-19 -================== - - * Remove `.json` extension from `application/manifest+json` - - This is causing bugs downstream - -1.9.0 / 2015-04-19 -================== - - * Add `application/manifest+json` - * Add `application/vnd.micro+json` - * Add `image/vnd.zbrush.pcx` - * Add `image/x-ms-bmp` - -1.8.0 / 2015-03-13 -================== - - * Add `application/vnd.citationstyles.style+xml` - * Add `application/vnd.fastcopy-disk-image` - * Add `application/vnd.gov.sk.xmldatacontainer+xml` - * Add extension `.jsonld` to `application/ld+json` - -1.7.0 / 2015-02-08 -================== - - * Add `application/vnd.gerber` - * Add `application/vnd.msa-disk-image` - -1.6.1 / 2015-02-05 -================== - - * Community extensions ownership transferred from `node-mime` - -1.6.0 / 2015-01-29 -================== - - * Add `application/jose` - * Add `application/jose+json` - * Add `application/json-seq` - * Add `application/jwk+json` - * Add `application/jwk-set+json` - * Add `application/jwt` - * Add `application/rdap+json` - * Add `application/vnd.gov.sk.e-form+xml` - * Add `application/vnd.ims.imsccv1p3` - -1.5.0 / 2014-12-30 -================== - - * Add `application/vnd.oracle.resource+json` - * Fix various invalid MIME type entries - - `application/mbox+xml` - - `application/oscp-response` - - `application/vwg-multiplexed` - - `audio/g721` - -1.4.0 / 2014-12-21 -================== - - * Add `application/vnd.ims.imsccv1p2` - * Fix various invalid MIME type entries - - `application/vnd-acucobol` - - `application/vnd-curl` - - `application/vnd-dart` - - `application/vnd-dxr` - - `application/vnd-fdf` - - `application/vnd-mif` - - `application/vnd-sema` - - `application/vnd-wap-wmlc` - - `application/vnd.adobe.flash-movie` - - `application/vnd.dece-zip` - - `application/vnd.dvb_service` - - `application/vnd.micrografx-igx` - - `application/vnd.sealed-doc` - - `application/vnd.sealed-eml` - - `application/vnd.sealed-mht` - - `application/vnd.sealed-ppt` - - `application/vnd.sealed-tiff` - - `application/vnd.sealed-xls` - - `application/vnd.sealedmedia.softseal-html` - - `application/vnd.sealedmedia.softseal-pdf` - - `application/vnd.wap-slc` - - `application/vnd.wap-wbxml` - - `audio/vnd.sealedmedia.softseal-mpeg` - - `image/vnd-djvu` - - `image/vnd-svf` - - `image/vnd-wap-wbmp` - - `image/vnd.sealed-png` - - `image/vnd.sealedmedia.softseal-gif` - - `image/vnd.sealedmedia.softseal-jpg` - - `model/vnd-dwf` - - `model/vnd.parasolid.transmit-binary` - - `model/vnd.parasolid.transmit-text` - - `text/vnd-a` - - `text/vnd-curl` - - `text/vnd.wap-wml` - * Remove example template MIME types - - `application/example` - - `audio/example` - - `image/example` - - `message/example` - - `model/example` - - `multipart/example` - - `text/example` - - `video/example` - -1.3.1 / 2014-12-16 -================== - - * Fix missing extensions - - `application/json5` - - `text/hjson` - -1.3.0 / 2014-12-07 -================== - - * Add `application/a2l` - * Add `application/aml` - * Add `application/atfx` - * Add `application/atxml` - * Add `application/cdfx+xml` - * Add `application/dii` - * Add `application/json5` - * Add `application/lxf` - * Add `application/mf4` - * Add `application/vnd.apache.thrift.compact` - * Add `application/vnd.apache.thrift.json` - * Add `application/vnd.coffeescript` - * Add `application/vnd.enphase.envoy` - * Add `application/vnd.ims.imsccv1p1` - * Add `text/csv-schema` - * Add `text/hjson` - * Add `text/markdown` - * Add `text/yaml` - -1.2.0 / 2014-11-09 -================== - - * Add `application/cea` - * Add `application/dit` - * Add `application/vnd.gov.sk.e-form+zip` - * Add `application/vnd.tmd.mediaflex.api+xml` - * Type `application/epub+zip` is now IANA-registered - -1.1.2 / 2014-10-23 -================== - - * Rebuild database for `application/x-www-form-urlencoded` change - -1.1.1 / 2014-10-20 -================== - - * Mark `application/x-www-form-urlencoded` as compressible. - -1.1.0 / 2014-09-28 -================== - - * Add `application/font-woff2` - -1.0.3 / 2014-09-25 -================== - - * Fix engine requirement in package - -1.0.2 / 2014-09-25 -================== - - * Add `application/coap-group+json` - * Add `application/dcd` - * Add `application/vnd.apache.thrift.binary` - * Add `image/vnd.tencent.tap` - * Mark all JSON-derived types as compressible - * Update `text/vtt` data - -1.0.1 / 2014-08-30 -================== - - * Fix extension ordering - -1.0.0 / 2014-08-30 -================== - - * Add `application/atf` - * Add `application/merge-patch+json` - * Add `multipart/x-mixed-replace` - * Add `source: 'apache'` metadata - * Add `source: 'iana'` metadata - * Remove badly-assumed charset data diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE deleted file mode 100644 index a7ae8ee9b8a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md deleted file mode 100644 index 7662440bb9f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# mime-db - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -This is a database of all mime types. -It consists of a single, public JSON file and does not include any logic, -allowing it to remain as un-opinionated as possible with an API. -It aggregates data from the following sources: - -- http://www.iana.org/assignments/media-types/media-types.xhtml -- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types - -## Installation - -```bash -npm install mime-db -``` - -### Database Download - -If you're crazy enough to use this in the browser, you can just grab the -JSON file using [RawGit](https://rawgit.com/). It is recommended to replace -`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the -JSON format may change in the future. - -``` -https://cdn.rawgit.com/jshttp/mime-db/master/db.json -``` - -## Usage - -```js -var db = require('mime-db'); - -// grab data on .js files -var data = db['application/javascript']; -``` - -## Data Structure - -The JSON file is a map lookup for lowercased mime types. -Each mime type has the following properties: - -- `.source` - where the mime type is defined. - If not set, it's probably a custom media type. - - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) - - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) - - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) -- `.extensions[]` - known extensions associated with this mime type. -- `.compressible` - whether a file of this type can be gzipped. -- `.charset` - the default charset associated with this type, if any. - -If unknown, every property could be `undefined`. - -## Contributing - -To edit the database, only make PRs against `src/custom.json` or -`src/custom-suffix.json`. - -To update the build, run `npm run build`. - -## Adding Custom Media Types - -The best way to get new media types included in this library is to register -them with the IANA. The community registration procedure is outlined in -[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types -registered with the IANA are automatically pulled into this library. - -[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg -[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg -[npm-url]: https://npmjs.org/package/mime-db -[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg -[travis-url]: https://travis-ci.org/jshttp/mime-db -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://img.shields.io/node/v/mime-db.svg -[node-url]: http://nodejs.org/download/ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json deleted file mode 100644 index 0a5a8a7bba5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/db.json +++ /dev/null @@ -1,6627 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana" - }, - "application/3gpp-ims+xml": { - "source": "iana" - }, - "application/a2l": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana" - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "extensions": ["atomsvc"] - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana" - }, - "application/bacnet-xdd+zip": { - "source": "iana" - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/beep+xml": { - "source": "iana" - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana" - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/cbor": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana" - }, - "application/ccxml+xml": { - "source": "iana", - "extensions": ["ccxml"] - }, - "application/cdfx+xml": { - "source": "iana" - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cdni": { - "source": "iana" - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana" - }, - "application/cellml+xml": { - "source": "iana" - }, - "application/cfw": { - "source": "iana" - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana" - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/commonground": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana" - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana" - }, - "application/cstadata+xml": { - "source": "iana" - }, - "application/csvm+json": { - "source": "iana", - "compressible": true - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "extensions": ["mpd"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana" - }, - "application/dicom": { - "source": "iana" - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "extensions": ["dbk"] - }, - "application/dskpp+xml": { - "source": "iana" - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/ecmascript": { - "source": "iana", - "compressible": true, - "extensions": ["ecma"] - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/efi": { - "source": "iana" - }, - "application/emergencycalldata.comment+xml": { - "source": "iana" - }, - "application/emergencycalldata.deviceinfo+xml": { - "source": "iana" - }, - "application/emergencycalldata.providerinfo+xml": { - "source": "iana" - }, - "application/emergencycalldata.serviceinfo+xml": { - "source": "iana" - }, - "application/emergencycalldata.subscriberinfo+xml": { - "source": "iana" - }, - "application/emma+xml": { - "source": "iana", - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana" - }, - "application/encaprtp": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana" - }, - "application/epub+zip": { - "source": "iana", - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdt+xml": { - "source": "iana" - }, - "application/fits": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false, - "extensions": ["woff"] - }, - "application/font-woff2": { - "compressible": false, - "extensions": ["woff2"] - }, - "application/framework-attributes+xml": { - "source": "iana" - }, - "application/gml+xml": { - "source": "apache", - "extensions": ["gml"] - }, - "application/gpx+xml": { - "source": "apache", - "extensions": ["gpx"] - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana" - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana" - }, - "application/ibe-pkg-reply+xml": { - "source": "iana" - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana" - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "extensions": ["ink","inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana" - }, - "application/java-archive": { - "source": "apache", - "compressible": false, - "extensions": ["jar","war","ear"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js"] - }, - "application/jose": { - "source": "iana" - }, - "application/jose+json": { - "source": "iana", - "compressible": true - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json","map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json-seq": { - "source": "iana" - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/jwk+json": { - "source": "iana", - "compressible": true - }, - "application/jwk-set+json": { - "source": "iana", - "compressible": true - }, - "application/jwt": { - "source": "iana" - }, - "application/kpml-request+xml": { - "source": "iana" - }, - "application/kpml-response+xml": { - "source": "iana" - }, - "application/ld+json": { - "source": "iana", - "compressible": true, - "extensions": ["jsonld"] - }, - "application/link-format": { - "source": "iana" - }, - "application/load-control+xml": { - "source": "iana" - }, - "application/lost+xml": { - "source": "iana", - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana" - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "extensions": ["mads"] - }, - "application/manifest+json": { - "charset": "UTF-8", - "compressible": true, - "extensions": ["webmanifest"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma","nb","mb"] - }, - "application/mathml+xml": { - "source": "iana", - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana" - }, - "application/mathml-presentation+xml": { - "source": "iana" - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana" - }, - "application/mbms-deregister+xml": { - "source": "iana" - }, - "application/mbms-envelope+xml": { - "source": "iana" - }, - "application/mbms-msk+xml": { - "source": "iana" - }, - "application/mbms-msk-response+xml": { - "source": "iana" - }, - "application/mbms-protection-description+xml": { - "source": "iana" - }, - "application/mbms-reception-report+xml": { - "source": "iana" - }, - "application/mbms-register+xml": { - "source": "iana" - }, - "application/mbms-register-response+xml": { - "source": "iana" - }, - "application/mbms-schedule+xml": { - "source": "iana" - }, - "application/mbms-user-service-description+xml": { - "source": "iana" - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana" - }, - "application/media_control+xml": { - "source": "iana" - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mods+xml": { - "source": "iana", - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21","mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4s","m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana" - }, - "application/mrb-publish+xml": { - "source": "iana" - }, - "application/msc-ivr+xml": { - "source": "iana" - }, - "application/msc-mixer+xml": { - "source": "iana" - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc","dot"] - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana" - }, - "application/news-groupinfo": { - "source": "iana" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana" - }, - "application/nss": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": false, - "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/omdoc+xml": { - "source": "apache", - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc","onetoc2","onetmp","onepkg"] - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p2p-overlay+xml": { - "source": "iana" - }, - "application/parityfec": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana" - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["asc","sig"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana" - }, - "application/pidf-diff+xml": { - "source": "iana" - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs12": { - "source": "iana" - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m","p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana" - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai","eps","ps"] - }, - "application/ppsp-tracker+json": { - "source": "iana", - "compressible": true - }, - "application/problem+json": { - "source": "iana", - "compressible": true - }, - "application/problem+xml": { - "source": "iana" - }, - "application/provenance+xml": { - "source": "iana" - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.hpub+zip": { - "source": "iana" - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana" - }, - "application/pskc+xml": { - "source": "iana", - "extensions": ["pskcxml"] - }, - "application/qsig": { - "source": "iana" - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdap+json": { - "source": "iana", - "compressible": true - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf"] - }, - "application/reginfo+xml": { - "source": "iana", - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "iana" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resource-lists+xml": { - "source": "iana", - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "extensions": ["rld"] - }, - "application/rfc+xml": { - "source": "iana" - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana" - }, - "application/rls-services+xml": { - "source": "iana", - "extensions": ["rs"] - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana" - }, - "application/samlmetadata+xml": { - "source": "iana" - }, - "application/sbml+xml": { - "source": "iana", - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana" - }, - "application/scim+json": { - "source": "iana", - "compressible": true - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/sep+xml": { - "source": "iana" - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana" - }, - "application/simple-filter+xml": { - "source": "iana" - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "iana" - }, - "application/smil+xml": { - "source": "iana", - "extensions": ["smi","smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "extensions": ["srx"] - }, - "application/spirits-event+xml": { - "source": "iana" - }, - "application/sql": { - "source": "iana" - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "extensions": ["ssdl"] - }, - "application/ssml+xml": { - "source": "iana", - "extensions": ["ssml"] - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "extensions": ["tei","teicorpus"] - }, - "application/thraud+xml": { - "source": "iana", - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/ttml+xml": { - "source": "iana" - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana" - }, - "application/urc-ressheet+xml": { - "source": "iana" - }, - "application/urc-targetdesc+xml": { - "source": "iana" - }, - "application/urc-uisocketdesc+xml": { - "source": "iana" - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana" - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.3gpp-prose+xml": { - "source": "iana" - }, - "application/vnd.3gpp-prose-pc3ch+xml": { - "source": "iana" - }, - "application/vnd.3gpp.access-transfer-events+xml": { - "source": "iana" - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana" - }, - "application/vnd.3gpp.mid-call+xml": { - "source": "iana" - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp.sms+xml": { - "source": "iana" - }, - "application/vnd.3gpp.srvcc-ext+xml": { - "source": "iana" - }, - "application/vnd.3gpp.srvcc-info+xml": { - "source": "iana" - }, - "application/vnd.3gpp.state-and-event-info+xml": { - "source": "iana" - }, - "application/vnd.3gpp.ussd+xml": { - "source": "iana" - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana" - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3lightssoftware.imagescal": { - "source": "iana" - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc","acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp","fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.ah-barcode": { - "source": "iana" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anki": { - "source": "iana" - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "extensions": ["mpkg"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.apple.pkpass": { - "compressible": false, - "extensions": ["pkpass"] - }, - "application/vnd.arastra.swi": { - "source": "iana" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avistar+xml": { - "source": "iana" - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana" - }, - "application/vnd.balsamiq.bmpr": { - "source": "iana" - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.biopax.rdf+xml": { - "source": "iana" - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "extensions": ["cdxml"] - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.citationstyles.style+xml": { - "source": "iana" - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g","c4d","c4f","c4p","c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.coreos.ignition+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "extensions": ["wbs"] - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana" - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana" - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf","uvvf","uvd","uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "extensions": ["uvt","uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx","uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz","uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume-movie": { - "source": "iana" - }, - "application/vnd.desmume.movie": { - "source": "apache" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana" - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.drive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana" - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana" - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana" - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana" - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "extensions": ["es3","et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana" - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana" - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana" - }, - "application/vnd.etsi.cug+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana" - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana" - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana" - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana" - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana" - }, - "application/vnd.etsi.sci+xml": { - "source": "iana" - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana" - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana" - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.fastcopy-disk-image": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed","dataless"] - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.filmit.zfc": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.firemonkeys.cloudcell": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm","frame","maker","book"] - }, - "application/vnd.frogans.fnc": { - "source": "iana", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "iana", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.geo+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "iana" - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex","gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.gerber": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.google-apps.document": { - "compressible": false, - "extensions": ["gdoc"] - }, - "application/vnd.google-apps.presentation": { - "compressible": false, - "extensions": ["gslides"] - }, - "application/vnd.google-apps.spreadsheet": { - "compressible": false, - "extensions": ["gsheet"] - }, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+xml": { - "source": "iana" - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana" - }, - "application/vnd.gov.sk.xmldatacontainer+xml": { - "source": "iana" - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf","gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.hdt": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana", - "extensions": ["sfd-hdstx"] - }, - "application/vnd.hyperdrive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "iana" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "iana", - "extensions": ["afp","listafp","list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc","icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p3": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana" - }, - "application/vnd.informix-visionary": { - "source": "iana" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana" - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw","xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana" - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana" - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz","ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr","kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd","kwt"] - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne","knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp","skd","skt","skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las.las+xml": { - "source": "iana", - "extensions": ["lasxml"] - }, - "application/vnd.liberty-request+xml": { - "source": "iana" - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "extensions": ["lbe"] - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.mapbox-vector-tile": { - "source": "iana" - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana" - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micro+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.microsoft.portable-executable": { - "source": "iana" - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana" - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana" - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt","pps","pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printdevicecapabilities+xml": { - "source": "iana" - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache" - }, - "application/vnd.ms-printschematicket+xml": { - "source": "iana" - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp","mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-windows.devicepairing": { - "source": "iana" - }, - "application/vnd.ms-windows.nwprinting.oob": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-windows.wsd.oob": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps","wks","wcm","wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.msa-disk-image": { - "source": "iana" - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf","nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana" - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana" - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana" - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana" - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana" - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "iana", - "extensions": ["n-gage"] - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana" - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "iana", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana" - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana" - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana" - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana" - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana" - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana" - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana" - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana" - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana" - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana" - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana" - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana" - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana" - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana" - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana" - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana" - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana" - }, - "application/vnd.omads-email+xml": { - "source": "iana" - }, - "application/vnd.omads-file+xml": { - "source": "iana" - }, - "application/vnd.omads-folder+xml": { - "source": "iana" - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.onepager": { - "source": "iana" - }, - "application/vnd.openblox.game+xml": { - "source": "iana" - }, - "application/vnd.openblox.game-binary": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "apache", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "apache", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml-template": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "apache", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana" - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana" - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana" - }, - "application/vnd.oxli.countgraph": { - "source": "iana" - }, - "application/vnd.pagerduty+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb","pqa","oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos+xml": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "apache" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana" - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana" - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana" - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana" - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "extensions": ["musicxml"] - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd","twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana" - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "extensions": ["sdkm","sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw","vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana" - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus","susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis","sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana" - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap","cap","dmp"] - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana" - }, - "application/vnd.tml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd","ufdl"] - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "extensions": ["uoml"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.uri-map": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.vel+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd","vst","vss","vsw"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana" - }, - "application/vnd.wv.ssp+xml": { - "source": "iana" - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana" - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir","zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "extensions": ["vxml"] - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/watcherinfo+xml": { - "source": "iana" - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab","x32","u32","vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb","blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2","boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr","cba","cbt","cbz","cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-cocoa": { - "source": "nginx", - "extensions": ["cco"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb","udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-otf": { - "source": "apache", - "compressible": true, - "extensions": ["otf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-ttf": { - "source": "apache", - "compressible": true, - "extensions": ["ttf","ttc"] - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa","pfb","pfm","afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-httpd-php": { - "compressible": true, - "extensions": ["php"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-java-archive-diff": { - "source": "nginx", - "extensions": ["jardiff"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh","lha"] - }, - "application/x-makeself": { - "source": "nginx", - "extensions": ["run"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc","mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdos-program": { - "extensions": ["exe"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe","dll","com","bat","msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb","m13","m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf","wmz","emf","emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc","cdf"] - }, - "application/x-ns-proxy-autoconfig": { - "compressible": true, - "extensions": ["pac"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-perl": { - "source": "nginx", - "extensions": ["pl","pm"] - }, - "application/x-pilot": { - "source": "nginx", - "extensions": ["prc","pdb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12","pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b","spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-redhat-package-manager": { - "source": "nginx", - "extensions": ["rpm"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sea": { - "source": "nginx", - "extensions": ["sea"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl","tk"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo","texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "apache", - "extensions": ["der","crt","pem"] - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana" - }, - "application/xaml+xml": { - "source": "apache", - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana" - }, - "application/xcap-caps+xml": { - "source": "iana" - }, - "application/xcap-diff+xml": { - "source": "iana", - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana" - }, - "application/xcap-error+xml": { - "source": "iana" - }, - "application/xcap-ns+xml": { - "source": "iana" - }, - "application/xcon-conference-info+xml": { - "source": "iana" - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana" - }, - "application/xenc+xml": { - "source": "iana", - "extensions": ["xenc"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml","xht"] - }, - "application/xhtml-voice+xml": { - "source": "apache" - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml","xsl","xsd","rng"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana" - }, - "application/xmpp+xml": { - "source": "iana" - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "extensions": ["xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "extensions": ["mxml","xhvml","xvml","xvm"] - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yin+xml": { - "source": "iana", - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zlib": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana", - "compressible": false, - "extensions": ["3gpp"] - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana" - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au","snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/evs": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g711-0": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid","midi","kar","rmi"] - }, - "audio/mobile-xmf": { - "source": "iana" - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["m4a","mp4a"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga","ogg","spx"] - }, - "audio/opus": { - "source": "iana" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva","uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "iana" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/wav": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/wave": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif","aiff","aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-m4a": { - "source": "nginx", - "extensions": ["m4a"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram","ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-realaudio": { - "source": "nginx", - "extensions": ["ra"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/opentype": { - "compressible": true, - "extensions": ["otf"] - }, - "image/bmp": { - "source": "apache", - "compressible": true, - "extensions": ["bmp"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/fits": { - "source": "iana" - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/jp2": { - "source": "iana" - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpeg","jpg","jpe"] - }, - "image/jpm": { - "source": "iana" - }, - "image/jpx": { - "source": "iana" - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif"] - }, - "image/prs.pti": { - "source": "iana" - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg","svgz"] - }, - "image/t38": { - "source": "iana" - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tiff","tif"] - }, - "image/tiff-fx": { - "source": "iana" - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana" - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi","uvvi","uvg","uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu","djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana" - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.mozilla.apng": { - "source": "iana" - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana" - }, - "image/vnd.valve.source.texture": { - "source": "iana" - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/vnd.zbrush.pcx": { - "source": "iana" - }, - "image/webp": { - "source": "apache", - "extensions": ["webp"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh","fhc","fh4","fh5","fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-jng": { - "source": "nginx", - "extensions": ["jng"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-ms-bmp": { - "source": "nginx", - "compressible": true, - "extensions": ["bmp"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic","pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana" - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana" - }, - "message/global-delivery-status": { - "source": "iana" - }, - "message/global-disposition-notification": { - "source": "iana" - }, - "message/global-headers": { - "source": "iana" - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/news": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml","mime"] - }, - "message/s-http": { - "source": "iana" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "iana" - }, - "message/vnd.wfa.wsc": { - "source": "iana" - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs","iges"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh","mesh","silo"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana" - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana" - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana" - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana" - }, - "model/vnd.rosette.annotated-data-model": { - "source": "iana" - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana" - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl","vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db","x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana" - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv","x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d","x3dz"] - }, - "model/x3d-vrml": { - "source": "iana" - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana", - "compressible": false - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache","manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics","ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee","litcoffee"] - }, - "text/css": { - "source": "iana", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "iana" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/hjson": { - "extensions": ["hjson"] - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html","htm","shtml"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "compressible": true - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana" - }, - "text/mathml": { - "source": "nginx", - "extensions": ["mml"] - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt","text","conf","def","list","log","in","ini"] - }, - "text/provenance-notation": { - "source": "iana" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/prs.prop.logic": { - "source": "iana" - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml","sgm"] - }, - "text/slim": { - "extensions": ["slim","slm"] - }, - "text/stylus": { - "extensions": ["stylus","styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t","tr","roff","man","me","ms"] - }, - "text/turtle": { - "source": "iana", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri","uris","urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vtt": { - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s","asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c","cc","cxx","cpp","h","hh","dic"] - }, - "text/x-component": { - "source": "nginx", - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f","for","f77","f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["markdown","md","mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p","pas"] - }, - "text/x-processing": { - "compressible": true, - "extensions": ["pde"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-suse-ymp": { - "compressible": true, - "extensions": ["ymp"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml"] - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "extensions": ["yaml","yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "apache" - }, - "video/3gpp": { - "source": "apache", - "extensions": ["3gp","3gpp"] - }, - "video/3gpp-tt": { - "source": "apache" - }, - "video/3gpp2": { - "source": "apache", - "extensions": ["3g2"] - }, - "video/bmpeg": { - "source": "apache" - }, - "video/bt656": { - "source": "apache" - }, - "video/celb": { - "source": "apache" - }, - "video/dv": { - "source": "apache" - }, - "video/encaprtp": { - "source": "apache" - }, - "video/h261": { - "source": "apache", - "extensions": ["h261"] - }, - "video/h263": { - "source": "apache", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "apache" - }, - "video/h263-2000": { - "source": "apache" - }, - "video/h264": { - "source": "apache", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "apache" - }, - "video/h264-svc": { - "source": "apache" - }, - "video/h265": { - "source": "apache" - }, - "video/iso.segment": { - "source": "apache" - }, - "video/jpeg": { - "source": "apache", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "apache" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm","jpgm"] - }, - "video/mj2": { - "source": "apache", - "extensions": ["mj2","mjp2"] - }, - "video/mp1s": { - "source": "apache" - }, - "video/mp2p": { - "source": "apache" - }, - "video/mp2t": { - "source": "apache", - "extensions": ["ts"] - }, - "video/mp4": { - "source": "apache", - "compressible": false, - "extensions": ["mp4","mp4v","mpg4"] - }, - "video/mp4v-es": { - "source": "apache" - }, - "video/mpeg": { - "source": "apache", - "compressible": false, - "extensions": ["mpeg","mpg","mpe","m1v","m2v"] - }, - "video/mpeg4-generic": { - "source": "apache" - }, - "video/mpv": { - "source": "apache" - }, - "video/nv": { - "source": "apache" - }, - "video/ogg": { - "source": "apache", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "apache" - }, - "video/pointer": { - "source": "apache" - }, - "video/quicktime": { - "source": "apache", - "compressible": false, - "extensions": ["qt","mov"] - }, - "video/raptorfec": { - "source": "apache" - }, - "video/raw": { - "source": "apache" - }, - "video/rtp-enc-aescm128": { - "source": "apache" - }, - "video/rtploopback": { - "source": "apache" - }, - "video/rtx": { - "source": "apache" - }, - "video/smpte292m": { - "source": "apache" - }, - "video/ulpfec": { - "source": "apache" - }, - "video/vc1": { - "source": "apache" - }, - "video/vnd.cctv": { - "source": "apache" - }, - "video/vnd.dece.hd": { - "source": "apache", - "extensions": ["uvh","uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "apache", - "extensions": ["uvm","uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "apache" - }, - "video/vnd.dece.pd": { - "source": "apache", - "extensions": ["uvp","uvvp"] - }, - "video/vnd.dece.sd": { - "source": "apache", - "extensions": ["uvs","uvvs"] - }, - "video/vnd.dece.video": { - "source": "apache", - "extensions": ["uvv","uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "apache" - }, - "video/vnd.directv.mpeg-tts": { - "source": "apache" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "apache" - }, - "video/vnd.dvb.file": { - "source": "apache", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "apache", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "apache" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "apache" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "apache" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "apache" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "apache" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "apache" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "apache" - }, - "video/vnd.motorola.video": { - "source": "apache" - }, - "video/vnd.motorola.videop": { - "source": "apache" - }, - "video/vnd.mpegurl": { - "source": "apache", - "extensions": ["mxu","m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "apache", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "apache" - }, - "video/vnd.nokia.videovoip": { - "source": "apache" - }, - "video/vnd.objectvideo": { - "source": "apache" - }, - "video/vnd.radgamettools.bink": { - "source": "apache" - }, - "video/vnd.radgamettools.smacker": { - "source": "apache" - }, - "video/vnd.sealed.mpeg1": { - "source": "apache" - }, - "video/vnd.sealed.mpeg4": { - "source": "apache" - }, - "video/vnd.sealed.swf": { - "source": "apache" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "apache" - }, - "video/vnd.uvvu.mp4": { - "source": "apache", - "extensions": ["uvu","uvvu"] - }, - "video/vnd.vivo": { - "source": "apache", - "extensions": ["viv"] - }, - "video/vp8": { - "source": "apache" - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv","mk3d","mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf","asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js deleted file mode 100644 index 551031f690b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = require('./db.json') diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json deleted file mode 100644 index 1aa037918b9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-db/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "_args": [ - [ - "mime-db@~1.23.0", - "/Users/eshanker/Code/fsevents/node_modules/mime-types" - ] - ], - "_from": "mime-db@>=1.23.0 <1.24.0", - "_id": "mime-db@1.23.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/mime-db", - "_nodeVersion": "4.4.3", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/mime-db-1.23.0.tgz_1462163798086_0.43938886746764183" - }, - "_npmUser": { - "email": "doug@somethingdoug.com", - "name": "dougwilson" - }, - "_npmVersion": "2.15.1", - "_phantomChildren": {}, - "_requested": { - "name": "mime-db", - "raw": "mime-db@~1.23.0", - "rawSpec": "~1.23.0", - "scope": null, - "spec": ">=1.23.0 <1.24.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/mime-types" - ], - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz", - "_shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659", - "_shrinkwrap": null, - "_spec": "mime-db@~1.23.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/mime-types", - "bugs": { - "url": "https://github.com/jshttp/mime-db/issues" - }, - "contributors": [ - { - "email": "doug@somethingdoug.com", - "name": "Douglas Christopher Wilson" - }, - { - "email": "me@jongleberry.com", - "name": "Jonathan Ong", - "url": "http://jongleberry.com" - }, - { - "email": "robert@broofa.com", - "name": "Robert Kieffer", - "url": "http://github.com/broofa" - } - ], - "dependencies": {}, - "description": "Media Type Database", - "devDependencies": { - "bluebird": "3.3.5", - "co": "4.6.0", - "cogent": "1.0.1", - "csv-parse": "1.1.0", - "gnode": "0.1.2", - "istanbul": "0.4.3", - "mocha": "1.21.5", - "raw-body": "2.1.6", - "stream-to-array": "2.3.0" - }, - "directories": {}, - "dist": { - "shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659", - "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "gitHead": "ba0d99fd05b3bfdc2ebcd78f858c25cb7db6af41", - "homepage": "https://github.com/jshttp/mime-db#readme", - "keywords": [ - "charset", - "charsets", - "database", - "db", - "mime", - "type", - "types" - ], - "license": "MIT", - "maintainers": [ - { - "email": "doug@somethingdoug.com", - "name": "dougwilson" - }, - { - "email": "jonathanrichardong@gmail.com", - "name": "jongleberry" - } - ], - "name": "mime-db", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/mime-db.git" - }, - "scripts": { - "build": "node scripts/build", - "fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", - "update": "npm run fetch && npm run build" - }, - "version": "1.23.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md deleted file mode 100644 index 63bd4ea0b40..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,197 +0,0 @@ -2.1.11 / 2016-05-01 -=================== - - * deps: mime-db@~1.23.0 - - Add new mime types - -2.1.10 / 2016-02-15 -=================== - - * deps: mime-db@~1.22.0 - - Add new mime types - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - -2.1.9 / 2016-01-06 -================== - - * deps: mime-db@~1.21.0 - - Add new mime types - -2.1.8 / 2015-11-30 -================== - - * deps: mime-db@~1.20.0 - - Add new mime types - -2.1.7 / 2015-09-20 -================== - - * deps: mime-db@~1.19.0 - - Add new mime types - -2.1.6 / 2015-09-03 -================== - - * deps: mime-db@~1.18.0 - - Add new mime types - -2.1.5 / 2015-08-20 -================== - - * deps: mime-db@~1.17.0 - - Add new mime types - -2.1.4 / 2015-07-30 -================== - - * deps: mime-db@~1.16.0 - - Add new mime types - -2.1.3 / 2015-07-13 -================== - - * deps: mime-db@~1.15.0 - - Add new mime types - -2.1.2 / 2015-06-25 -================== - - * deps: mime-db@~1.14.0 - - Add new mime types - -2.1.1 / 2015-06-08 -================== - - * perf: fix deopt during mapping - -2.1.0 / 2015-06-07 -================== - - * Fix incorrectly treating extension-less file name as extension - - i.e. `'path/to/json'` will no longer return `application/json` - * Fix `.charset(type)` to accept parameters - * Fix `.charset(type)` to match case-insensitive - * Improve generation of extension to MIME mapping - * Refactor internals for readability and no argument reassignment - * Prefer `application/*` MIME types from the same source - * Prefer any type over `application/octet-stream` - * deps: mime-db@~1.13.0 - - Add nginx as a source - - Add new mime types - -2.0.14 / 2015-06-06 -=================== - - * deps: mime-db@~1.12.0 - - Add new mime types - -2.0.13 / 2015-05-31 -=================== - - * deps: mime-db@~1.11.0 - - Add new mime types - -2.0.12 / 2015-05-19 -=================== - - * deps: mime-db@~1.10.0 - - Add new mime types - -2.0.11 / 2015-05-05 -=================== - - * deps: mime-db@~1.9.1 - - Add new mime types - -2.0.10 / 2015-03-13 -=================== - - * deps: mime-db@~1.8.0 - - Add new mime types - -2.0.9 / 2015-02-09 -================== - - * deps: mime-db@~1.7.0 - - Add new mime types - - Community extensions ownership transferred from `node-mime` - -2.0.8 / 2015-01-29 -================== - - * deps: mime-db@~1.6.0 - - Add new mime types - -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Add additional compressible - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE deleted file mode 100644 index 06166077be4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md deleted file mode 100644 index e77d615d3e6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# mime-types - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -The ultimate javascript content-type utility. - -Similar to [node-mime](https://github.com/broofa/node-mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`, - so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db) -- No `.define()` functionality - -Otherwise, the API is compatible. - -## Install - -```sh -$ npm install mime-types -``` - -## Adding Types - -All mime types are based on [mime-db](https://github.com/jshttp/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/x-markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' -mime.lookup('folder/.htaccess') // false - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' - -// from a full path -mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/x-markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/mime-types.svg -[npm-url]: https://npmjs.org/package/mime-types -[node-version-image]: https://img.shields.io/node/v/mime-types.svg -[node-version-url]: https://nodejs.org/en/download/ -[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg -[travis-url]: https://travis-ci.org/jshttp/mime-types -[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types -[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg -[downloads-url]: https://npmjs.org/package/mime-types diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js deleted file mode 100644 index f7008b246d1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/index.js +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var db = require('mime-db') -var extname = require('path').extname - -/** - * Module variables. - * @private - */ - -var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/ -var textTypeRegExp = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset(type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = extractTypeRegExp.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && textTypeRegExp.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType(str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension(type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = extractTypeRegExp.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup(path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps(extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType(type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' - && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json deleted file mode 100644 index 36be737307c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mime-types/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_args": [ - [ - "mime-types@~2.1.7", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "mime-types@>=2.1.7 <2.2.0", - "_id": "mime-types@2.1.11", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/mime-types", - "_nodeVersion": "4.4.3", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/mime-types-2.1.11.tgz_1462165365027_0.7217204745393246" - }, - "_npmUser": { - "email": "doug@somethingdoug.com", - "name": "dougwilson" - }, - "_npmVersion": "2.15.1", - "_phantomChildren": {}, - "_requested": { - "name": "mime-types", - "raw": "mime-types@~2.1.7", - "rawSpec": "~2.1.7", - "scope": null, - "spec": ">=2.1.7 <2.2.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/form-data", - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz", - "_shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c", - "_shrinkwrap": null, - "_spec": "mime-types@~2.1.7", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "bugs": { - "url": "https://github.com/jshttp/mime-types/issues" - }, - "contributors": [ - { - "email": "doug@somethingdoug.com", - "name": "Douglas Christopher Wilson" - }, - { - "email": "fishrock123@rocketmail.com", - "name": "Jeremiah Senkpiel", - "url": "https://searchbeam.jit.su" - }, - { - "email": "me@jongleberry.com", - "name": "Jonathan Ong", - "url": "http://jongleberry.com" - } - ], - "dependencies": { - "mime-db": "~1.23.0" - }, - "description": "The ultimate javascript content-type utility.", - "devDependencies": { - "istanbul": "0.4.3", - "mocha": "1.21.5" - }, - "directories": {}, - "dist": { - "shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c", - "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "gitHead": "298ffcf490a5d6e60edea7bf7a69036df04846b1", - "homepage": "https://github.com/jshttp/mime-types#readme", - "keywords": [ - "mime", - "types" - ], - "license": "MIT", - "maintainers": [ - { - "email": "doug@somethingdoug.com", - "name": "dougwilson" - }, - { - "email": "fishrock123@rocketmail.com", - "name": "fishrock123" - }, - { - "email": "jonathanrichardong@gmail.com", - "name": "jongleberry" - } - ], - "name": "mime-types", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jshttp/mime-types.git" - }, - "scripts": { - "test": "mocha --reporter spec test/test.js", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" - }, - "version": "2.1.11" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md deleted file mode 100644 index ad72b8133ea..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instantiating the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js deleted file mode 100644 index 830a27246cd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,924 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } - - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json deleted file mode 100644 index adbcd931595..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimatch/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "minimatch@^3.0.2", - "/Users/eshanker/Code/fsevents/node_modules/glob" - ] - ], - "_from": "minimatch@>=3.0.2 <4.0.0", - "_id": "minimatch@3.0.2", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/minimatch", - "_nodeVersion": "4.4.4", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.9.1", - "_phantomChildren": {}, - "_requested": { - "name": "minimatch", - "raw": "minimatch@^3.0.2", - "rawSpec": "^3.0.2", - "scope": null, - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/fstream-ignore", - "/fsevents/glob" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz", - "_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", - "_shrinkwrap": null, - "_spec": "minimatch@^3.0.2", - "_where": "/Users/eshanker/Code/fsevents/node_modules/glob", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "dependencies": { - "brace-expansion": "^1.0.0" - }, - "description": "a glob matcher in javascript", - "devDependencies": { - "standard": "^3.7.2", - "tap": "^5.6.0" - }, - "directories": {}, - "dist": { - "shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", - "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "minimatch.js" - ], - "gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0", - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - } - ], - "name": "minimatch", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "posttest": "standard minimatch.js test/*.js", - "test": "tap test/*.js" - }, - "version": "3.0.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29d95..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b441..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8ee8f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js deleted file mode 100644 index 584f551a6da..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json deleted file mode 100644 index b6fcf420893..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_args": [ - [ - "minimist@0.0.8", - "/Users/eshanker/Code/fsevents/node_modules/mkdirp" - ] - ], - "_from": "minimist@0.0.8", - "_id": "minimist@0.0.8", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/minimist", - "_npmUser": { - "email": "mail@substack.net", - "name": "substack" - }, - "_npmVersion": "1.4.3", - "_phantomChildren": {}, - "_requested": { - "name": "minimist", - "raw": "minimist@0.0.8", - "rawSpec": "0.0.8", - "scope": null, - "spec": "0.0.8", - "type": "version" - }, - "_requiredBy": [ - "/fsevents/mkdirp" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "_shrinkwrap": null, - "_spec": "minimist@0.0.8", - "_where": "/Users/eshanker/Code/fsevents/node_modules/mkdirp", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "dependencies": {}, - "description": "parse argument options", - "devDependencies": { - "tap": "~0.4.0", - "tape": "~1.0.4" - }, - "directories": {}, - "dist": { - "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "tarball": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "optimist", - "parser" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "mail@substack.net", - "name": "substack" - } - ], - "name": "minimist", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "browsers": [ - "chrome/10", - "chrome/latest", - "ff/5", - "firefox/latest", - "ie/6..latest", - "opera/12", - "safari/5.1", - "safari/latest" - ], - "files": "test/*.js" - }, - "version": "0.0.8" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown deleted file mode 100644 index c25635323e1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99a9e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee40cd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349bf3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09d3b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js deleted file mode 100644 index 8a906466966..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,318 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b036ee..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2529..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58cecf..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 74c57bf15e2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb01d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js deleted file mode 100755 index d95de15ae97..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/cmd.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var mkdirp = require('../'); -var minimist = require('minimist'); -var fs = require('fs'); - -var argv = minimist(process.argv.slice(2), { - alias: { m: 'mode', h: 'help' }, - string: [ 'mode' ] -}); -if (argv.help) { - fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); - return; -} - -var paths = argv._.slice(); -var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; - -(function next () { - if (paths.length === 0) return; - var p = paths.shift(); - - if (mode === undefined) mkdirp(p, cb) - else mkdirp(p, mode, cb) - - function cb (err) { - if (err) { - console.error(err.message); - process.exit(1); - } - else next(); - } -})(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt deleted file mode 100644 index f952aa2c7a9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/bin/usage.txt +++ /dev/null @@ -1,12 +0,0 @@ -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212e6a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js deleted file mode 100644 index 6ce241b58c1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/index.js +++ /dev/null @@ -1,98 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json deleted file mode 100644 index 57cd3af808e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_args": [ - [ - "mkdirp@~0.5.0", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "mkdirp@>=0.5.0 <0.6.0", - "_id": "mkdirp@0.5.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/mkdirp", - "_nodeVersion": "2.0.0", - "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" - }, - "_npmVersion": "2.9.0", - "_phantomChildren": {}, - "_requested": { - "name": "mkdirp", - "raw": "mkdirp@~0.5.0", - "rawSpec": "~0.5.0", - "scope": null, - "spec": ">=0.5.0 <0.6.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/fstream", - "/fsevents/node-pre-gyp" - ], - "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", - "_shrinkwrap": null, - "_spec": "mkdirp@~0.5.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "dependencies": { - "minimist": "0.0.8" - }, - "description": "Recursively mkdir, like `mkdir -p`", - "devDependencies": { - "mock-fs": "2 >=2.7.0", - "tap": "1" - }, - "directories": {}, - "dist": { - "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", - "tarball": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" - }, - "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", - "homepage": "https://github.com/substack/node-mkdirp#readme", - "keywords": [ - "directory", - "mkdir" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "mail@substack.net", - "name": "substack" - } - ], - "name": "mkdirp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "0.5.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 3cc13153851..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,100 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, opts, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `opts.mode`. If `opts` is a non-object, it will be treated as -the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and -`opts.fs.stat(path, cb)`. - -## mkdirp.sync(dir, opts) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `opts.mode`. If `opts` is a non-object, it will be -treated as the `opts.mode`. - -If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -You can optionally pass in an alternate `fs` implementation by passing in -`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and -`opts.fs.statSync(path)`. - -# usage - -This package also ships with a `mkdirp` command. - -``` -usage: mkdirp [DIR1,DIR2..] {OPTIONS} - - Create each supplied directory including any necessary parent directories that - don't yet exist. - - If the directory already exists, do nothing. - -OPTIONS are: - - -m, --mode If a directory needs to be created, set the mode as an octal - permission string. - -``` - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -to get the library, or - -``` -npm install -g mkdirp -``` - -to get the command. - -# license - -MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 6a404b932f9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); -var _0744 = parseInt('0744', 8); - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = _0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = _0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 2433b9ad548..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; -var _0755 = parseInt('0755', 8); - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, _0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index eaa8921c7f1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('woo', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js deleted file mode 100644 index 97186b62e0b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs.js +++ /dev/null @@ -1,29 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var test = require('tap').test; -var mockfs = require('mock-fs'); -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('opts.fs', function (t) { - t.plan(5); - - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/beep/boop/' + [x,y,z].join('/'); - var xfs = mockfs.fs(); - - mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { - t.ifError(err); - xfs.exists(file, function (ex) { - t.ok(ex, 'created file'); - xfs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js deleted file mode 100644 index 6c370aa6e93..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/opts_fs_sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var test = require('tap').test; -var mockfs = require('mock-fs'); -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('opts.fs sync', function (t) { - t.plan(4); - - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/beep/boop/' + [x,y,z].join('/'); - var xfs = mockfs.fs(); - - mkdirp.sync(file, { fs: xfs, mode: _0755 }); - xfs.exists(file, function (ex) { - t.ok(ex, 'created file'); - xfs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js deleted file mode 100644 index fbce44b82ba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('async perm', function (t) { - t.plan(5); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', _0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index 398229fe54a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,36 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('sync perm', function (t) { - t.plan(4); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, _0755); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); - -test('sync root perm', function (t) { - t.plan(3); - - var file = '/tmp'; - mkdirp.sync(file, _0755); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js deleted file mode 100644 index b0b9e183c90..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('race', function (t) { - t.plan(10); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file); - - mk(file); - - function mk (file, cb) { - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }) - }); - } -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 4ddb34276a7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('rel', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, _0755, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - process.chdir(cwd); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }) - }) - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e5613e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d3558d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js deleted file mode 100644 index 9e7d079d9fc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,19 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; -var _0755 = parseInt('0755', 8); - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, _0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 8c8dc938c8b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('sync', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, _0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0755); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 2033c63a414..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('implicit mode from umask', function (t) { - t.plan(5); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - t.ifError(err); - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, _0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }) - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 11a76147496..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var exists = fs.exists || path.exists; -var test = require('tap').test; -var _0777 = parseInt('0777', 8); -var _0755 = parseInt('0755', 8); - -test('umask sync modes', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - exists(file, function (ex) { - t.ok(ex, 'file created'); - fs.stat(file, function (err, stat) { - t.ifError(err); - t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - }); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore deleted file mode 100644 index d1aa0ce42e1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -test -History.md -Makefile -component.json diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md deleted file mode 100644 index 32fdfc17623..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/History.md +++ /dev/null @@ -1,66 +0,0 @@ - -0.7.1 / 2015-04-20 -================== - - * prevent extraordinary long inputs (@evilpacket) - * Fixed broken readme link - -0.7.0 / 2014-11-24 -================== - - * add time abbreviations, updated tests and readme for the new units - * fix example in the readme. - * add LICENSE file - -0.6.2 / 2013-12-05 -================== - - * Adding repository section to package.json to suppress warning from NPM. - -0.6.1 / 2013-05-10 -================== - - * fix singularization [visionmedia] - -0.6.0 / 2013-03-15 -================== - - * fix minutes - -0.5.1 / 2013-02-24 -================== - - * add component namespace - -0.5.0 / 2012-11-09 -================== - - * add short formatting as default and .long option - * add .license property to component.json - * add version to component.json - -0.4.0 / 2012-10-22 -================== - - * add rounding to fix crazy decimals - -0.3.0 / 2012-09-07 -================== - - * fix `ms()` [visionmedia] - -0.2.0 / 2012-09-03 -================== - - * add component.json [visionmedia] - * add days support [visionmedia] - * add hours support [visionmedia] - * add minutes support [visionmedia] - * add seconds support [visionmedia] - * add ms string support [visionmedia] - * refactor tests to facilitate ms(number) [visionmedia] - -0.1.0 / 2012-03-07 -================== - - * Initial release diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE deleted file mode 100644 index 6c07561b62d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Guillermo Rauch - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md deleted file mode 100644 index 9b4fd03581b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# ms.js: miliseconds conversion utility - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('100') // 100 -``` - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -- Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download). -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as -a number (e.g: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of -equivalent ms is returned. - -## License - -MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js deleted file mode 100644 index 4f927716967..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/index.js +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = '' + str; - if (str.length > 10000) return; - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json deleted file mode 100644 index 5598151a933..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/ms/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_args": [ - [ - "ms@0.7.1", - "/Users/eshanker/Code/fsevents/node_modules/debug" - ] - ], - "_from": "ms@0.7.1", - "_id": "ms@0.7.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/ms", - "_nodeVersion": "0.12.2", - "_npmUser": { - "email": "rauchg@gmail.com", - "name": "rauchg" - }, - "_npmVersion": "2.7.5", - "_phantomChildren": {}, - "_requested": { - "name": "ms", - "raw": "ms@0.7.1", - "rawSpec": "0.7.1", - "scope": null, - "spec": "0.7.1", - "type": "version" - }, - "_requiredBy": [ - "/fsevents/debug" - ], - "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", - "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098", - "_shrinkwrap": null, - "_spec": "ms@0.7.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/debug", - "bugs": { - "url": "https://github.com/guille/ms.js/issues" - }, - "component": { - "scripts": { - "ms/index.js": "index.js" - } - }, - "dependencies": {}, - "description": "Tiny ms conversion utility", - "devDependencies": { - "expect.js": "*", - "mocha": "*", - "serve": "*" - }, - "directories": {}, - "dist": { - "shasum": "9cd13c03adbff25b65effde7ce864ee952017098", - "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" - }, - "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909", - "homepage": "https://github.com/guille/ms.js", - "main": "./index", - "maintainers": [ - { - "email": "rauchg@gmail.com", - "name": "rauchg" - } - ], - "name": "ms", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/guille/ms.js.git" - }, - "scripts": {}, - "version": "0.7.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md deleted file mode 100644 index 17e467c10b1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/CHANGELOG.md +++ /dev/null @@ -1,323 +0,0 @@ -# node-pre-gyp changelog - -## 0.6.29 - - - Add known node versions for v0.10.45, v0.12.14, v4.4.4, v5.11.1, and v6.1.0 - -## 0.6.28 - - - Now more verbose when remote binaries are not available. This is needed since npm is increasingly more quiet by default - and users need to know why builds are falling back to source compiles that might then error out. - -## 0.6.27 - - - Add known node version for node v6 - - Stopped bundling dependencies - - Documented method for module authors to avoid bundling node-pre-gyp - - See https://github.com/mapbox/node-pre-gyp/tree/master#configuring for details - -## 0.6.26 - - - Skip validation for nw runtime (https://github.com/mapbox/node-pre-gyp/pull/181) via @fleg - -## 0.6.25 - - - Improved support for auto-detection of electron runtime in `node-pre-gyp.find()` - - Pull request from @enlight - https://github.com/mapbox/node-pre-gyp/pull/187 - - Add known node version for 4.4.1 and 5.9.1 - -## 0.6.24 - - - Add known node version for 5.8.0, 5.9.0, and 4.4.0. - -## 0.6.23 - - - Add known node version for 0.10.43, 0.12.11, 4.3.2, and 5.7.1. - -## 0.6.22 - - - Add known node version for 4.3.1, and 5.7.0. - -## 0.6.21 - - - Add known node version for 0.10.42, 0.12.10, 4.3.0, and 5.6.0. - -## 0.6.20 - - - Add known node version for 4.2.5, 4.2.6, 5.4.0, 5.4.1,and 5.5.0. - -## 0.6.19 - - - Add known node version for 4.2.4 - -## 0.6.18 - - - Add new known node versions for 0.10.x, 0.12.x, 4.x, and 5.x - -## 0.6.17 - - - Re-tagged to fix packaging problem of `Error: Cannot find module 'isarray'` - -## 0.6.16 - - - Added known version in crosswalk for 5.1.0. - -## 0.6.15 - - - Upgraded tar-pack (https://github.com/mapbox/node-pre-gyp/issues/182) - - Support custom binary hosting mirror (https://github.com/mapbox/node-pre-gyp/pull/170) - - Added known version in crosswalk for 4.2.2. - -## 0.6.14 - - - Added node 5.x version - -## 0.6.13 - - - Added more known node 4.x versions - -## 0.6.12 - - - Added support for [Electron](http://electron.atom.io/). Just pass the `--runtime=electron` flag when building/installing. Thanks @zcbenz - -## 0.6.11 - - - Added known node and io.js versions including more 3.x and 4.x versions - -## 0.6.10 - - - Added known node and io.js versions including 3.x and 4.x versions - - Upgraded `tar` dep - -## 0.6.9 - - - Upgraded `rc` dep - - Updated known io.js version: v2.4.0 - -## 0.6.8 - - - Upgraded `semver` and `rimraf` deps - - Updated known node and io.js versions - -## 0.6.7 - - - Fixed `node_abi` versions for io.js 1.1.x -> 1.8.x (should be 43, but was stored as 42) (refs https://github.com/iojs/build/issues/94) - -## 0.6.6 - - - Updated with known io.js 2.0.0 version - -## 0.6.5 - - - Now respecting `npm_config_node_gyp` (https://github.com/npm/npm/pull/4887) - - Updated to semver@4.3.2 - - Updated known node v0.12.x versions and io.js 1.x versions. - -## 0.6.4 - - - Improved support for `io.js` (@fengmk2) - - Test coverage improvements (@mikemorris) - - Fixed support for `--dist-url` that regressed in 0.6.3 - -## 0.6.3 - - - Added support for passing raw options to node-gyp using `--` separator. Flags passed after - the `--` to `node-pre-gyp configure` will be passed directly to gyp while flags passed - after the `--` will be passed directly to make/visual studio. - - Added `node-pre-gyp configure` command to be able to call `node-gyp configure` directly - - Fix issue with require validation not working on windows 7 (@edgarsilva) - -## 0.6.2 - - - Support for io.js >= v1.0.2 - - Deferred require of `request` and `tar` to help speed up command line usage of `node-pre-gyp`. - -## 0.6.1 - - - Fixed bundled `tar` version - -## 0.6.0 - - - BREAKING: node odd releases like v0.11.x now use `major.minor.patch` for `{node_abi}` instead of `NODE_MODULE_VERSION` (#124) - - Added support for `toolset` option in versioning. By default is an empty string but `--toolset` can be passed to publish or install to select alternative binaries that target a custom toolset like C++11. For example to target Visual Studio 2014 modules like node-sqlite3 use `--toolset=v140`. - - Added support for `--no-rollback` option to request that a failed binary test does not remove the binary module leaves it in place. - - Added support for `--update-binary` option to request an existing binary be re-installed and the check for a valid local module be skipped. - - Added support for passing build options from `npm` through `node-pre-gyp` to `node-gyp`: `--nodedir`, `--disturl`, `--python`, and `--msvs_version` - -## 0.5.31 - - - Added support for deducing node_abi for node.js runtime from previous release if the series is even - - Added support for --target=0.10.33 - -## 0.5.30 - - - Repackaged with latest bundled deps - -## 0.5.29 - - - Added support for semver `build`. - - Fixed support for downloading from urls that include `+`. - -## 0.5.28 - - - Now reporting unix style paths only in reveal command - -## 0.5.27 - - - Fixed support for auto-detecting s3 bucket name when it contains `.` - @taavo - - Fixed support for installing when path contains a `'` - @halfdan - - Ported tests to mocha - -## 0.5.26 - - - Fix node-webkit support when `--target` option is not provided - -## 0.5.25 - - - Fix bundling of deps - -## 0.5.24 - - - Updated ABI crosswalk to incldue node v0.10.30 and v0.10.31 - -## 0.5.23 - - - Added `reveal` command. Pass no options to get all versioning data as json. Pass a second arg to grab a single versioned property value - - Added support for `--silent` (shortcut for `--loglevel=silent`) - -## 0.5.22 - - - Fixed node-webkit versioning name (NOTE: node-webkit support still experimental) - -## 0.5.21 - - - New package to fix `shasum check failed` error with v0.5.20 - -## 0.5.20 - - - Now versioning node-webkit binaries based on major.minor.patch - assuming no compatible ABI across versions (#90) - -## 0.5.19 - - - Updated to know about more node-webkit releases - -## 0.5.18 - - - Updated to know about more node-webkit releases - -## 0.5.17 - - - Updated to know about node v0.10.29 release - -## 0.5.16 - - - Now supporting all aws-sdk configuration parameters (http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) (#86) - -## 0.5.15 - - - Fixed installation of windows packages sub directories on unix systems (#84) - -## 0.5.14 - - - Finished support for cross building using `--target_platform` option (#82) - - Now skipping binary validation on install if target arch/platform do not match the host. - - Removed multi-arch validing for OS X since it required a FAT node.js binary - -## 0.5.13 - - - Fix problem in 0.5.12 whereby the wrong versions of mkdirp and semver where bundled. - -## 0.5.12 - - - Improved support for node-webkit (@Mithgol) - -## 0.5.11 - - - Updated target versions listing - -## 0.5.10 - - - Fixed handling of `-debug` flag passed directory to node-pre-gyp (#72) - - Added optional second arg to `node_pre_gyp.find` to customize the default versioning options used to locate the runtime binary - - Failed install due to `testbinary` check failure no longer leaves behind binary (#70) - -## 0.5.9 - - - Fixed regression in `testbinary` command causing installs to fail on windows with 0.5.7 (#60) - -## 0.5.8 - - - Started bundling deps - -## 0.5.7 - - - Fixed the `testbinary` check, which is used to determine whether to re-download or source compile, to work even in complex dependency situations (#63) - - Exposed the internal `testbinary` command in node-pre-gyp command line tool - - Fixed minor bug so that `fallback_to_build` option is always respected - -## 0.5.6 - - - Added support for versioning on the `name` value in `package.json` (#57). - - Moved to using streams for reading tarball when publishing (#52) - -## 0.5.5 - - - Improved binary validation that also now works with node-webkit (@Mithgol) - - Upgraded test apps to work with node v0.11.x - - Improved test coverage - -## 0.5.4 - - - No longer depends on external install of node-gyp for compiling builds. - -## 0.5.3 - - - Reverted fix for debian/nodejs since it broke windows (#45) - -## 0.5.2 - - - Support for debian systems where the node binary is named `nodejs` (#45) - - Added `bin/node-pre-gyp.cmd` to be able to run command on windows locally (npm creates an .npm automatically when globally installed) - - Updated abi-crosswalk with node v0.10.26 entry. - -## 0.5.1 - - - Various minor bug fixes, several improving windows support for publishing. - -## 0.5.0 - - - Changed property names in `binary` object: now required are `module_name`, `module_path`, and `host`. - - Now `module_path` supports versioning, which allows developers to opt-in to using a versioned install path (#18). - - Added `remote_path` which also supports versioning. - - Changed `remote_uri` to `host`. - -## 0.4.2 - - - Added support for `--target` flag to request cross-compile against a specific node/node-webkit version. - - Added preliminary support for node-webkit - - Fixed support for `--target_arch` option being respected in all cases. - -## 0.4.1 - - - Fixed exception when only stderr is available in binary test (@bendi / #31) - -## 0.4.0 - - - Enforce only `https:` based remote publishing access. - - Added `node-pre-gyp info` command to display listing of published binaries - - Added support for changing the directory node-pre-gyp should build in with the `-C/--directory` option. - - Added support for S3 prefixes. - -## 0.3.1 - - - Added `unpublish` command. - - Fixed module path construction in tests. - - Added ability to disable falling back to build behavior via `npm install --fallback-to-build=false` which overrides setting in a depedencies package.json `install` target. - -## 0.3.0 - - - Support for packaging all files in `module_path` directory - see `app4` for example - - Added `testpackage` command. - - Changed `clean` command to only delete `.node` not entire `build` directory since node-gyp will handle that. - - `.node` modules must be in a folder of there own since tar-pack will remove everything when it unpacks. - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE deleted file mode 100644 index 8f5fce91b08..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c), Mapbox - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of node-pre-gyp nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml deleted file mode 100644 index bdfaaafb331..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/appveyor.yml +++ /dev/null @@ -1,30 +0,0 @@ -environment: - matrix: - - nodejs_version: 0.10.36 - - nodejs_version: 4 - - nodejs_version: 5 - -platform: - - x64 - - x86 - -shallow_clone: true - -install: - - ps: Install-Product node $env:nodejs_version $env:Platform - - node --version - - npm --version - - SET PATH=%APPDATA%\npm;%PATH% - - npm update -g npm - - npm --version - - node -e "console.log(process.arch);" - - SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% - - if "%PLATFORM%" == "x64" set PATH=C:\Python27-x64;%PATH% - - if "%PLATFORM%" == "x86" SET PATH=C:\python27;%PATH% - - npm install - - npm test - - .\scripts\test.bat - -build: off -test: off -deploy: off diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp deleted file mode 100755 index 4f0e1d0b681..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/env node - -"use strict"; - -/** - * Set the title. - */ - -process.title = 'node-pre-gyp'; - -/** - * Module dependencies. - */ - -var node_pre_gyp = require('../'); -var log = require('npmlog'); - -/** - * Process and execute the selected commands. - */ - -var prog = new node_pre_gyp.Run(); -var completed = false; -prog.parseArgv(process.argv); - -if (prog.todo.length === 0) { - if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) { - console.log('v%s', prog.version); - } else { - console.log('%s', prog.usage()); - } - return process.exit(0); -} - -// if --no-color is passed -if (prog.opts && prog.opts.hasOwnProperty('color') && !prog.opts.color) { - log.disableColor(); -} - -log.info('it worked if it ends with', 'ok'); -log.verbose('cli', process.argv); -log.info('using', process.title + '@%s', prog.version); -log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch); - - -/** - * Change dir if -C/--directory was passed. - */ - -var dir = prog.opts.directory; -if (dir) { - var fs = require('fs'); - try { - var stat = fs.statSync(dir); - if (stat.isDirectory()) { - log.info('chdir', dir); - process.chdir(dir); - } else { - log.warn('chdir', dir + ' is not a directory'); - } - } catch (e) { - if (e.code === 'ENOENT') { - log.warn('chdir', dir + ' is not a directory'); - } else { - log.warn('chdir', 'error during chdir() "%s"', e.message); - } - } -} - -function run () { - var command = prog.todo.shift(); - if (!command) { - // done! - completed = true; - log.info('ok'); - return; - } - - prog.commands[command.name](command.args, function (err) { - if (err) { - log.error(command.name + ' error'); - log.error('stack', err.stack); - errorMessage(); - log.error('not ok'); - console.log(err.message); - return process.exit(1); - } - var args_array = [].slice.call(arguments, 1); - if (args_array.length) { - console.log.apply(console, args_array); - } - // now run the next command in the queue - process.nextTick(run); - }); -} - -process.on('exit', function (code) { - if (!completed && !code) { - log.error('Completion callback never invoked!'); - issueMessage(); - process.exit(6); - } -}); - -process.on('uncaughtException', function (err) { - log.error('UNCAUGHT EXCEPTION'); - log.error('stack', err.stack); - issueMessage(); - process.exit(7); -}); - -function errorMessage () { - // copied from npm's lib/util/error-handler.js - var os = require('os'); - log.error('System', os.type() + ' ' + os.release()); - log.error('command', process.argv.map(JSON.stringify).join(' ')); - log.error('cwd', process.cwd()); - log.error('node -v', process.version); - log.error(process.title+' -v', 'v' + prog.package.version); -} - -function issueMessage () { - errorMessage(); - log.error('', [ 'This is a bug in `'+process.title+'`.', - 'Try to update '+process.title+' and file an issue if it does not help:', - ' ', - ].join('\n')); -} - -// start running the given commands! -run(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd deleted file mode 100644 index 46e14b54172..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -node "%~dp0\node-pre-gyp" %* diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js deleted file mode 100644 index 1074fa3b5a7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/build.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -module.exports = exports = build; - -exports.usage = 'Attempts to compile the module by dispatching to node-gyp or nw-gyp'; - -var compile = require('./util/compile.js'); -var handle_gyp_opts = require('./util/handle_gyp_opts.js'); -var configure = require('./configure.js'); - -function do_build(gyp,argv,callback) { - handle_gyp_opts(gyp,argv,function(err,result) { - var final_args = ['build'].concat(result.gyp).concat(result.pre); - if (result.unparsed.length > 0) { - final_args = final_args. - concat(['--']). - concat(result.unparsed); - } - compile.run_gyp(final_args,result.opts,function(err) { - return callback(err); - }); - }); -} - -function build(gyp, argv, callback) { - - // Form up commands to pass to node-gyp: - // We map `node-pre-gyp build` to `node-gyp configure build` so that we do not - // trigger a clean and therefore do not pay the penalty of a full recompile - if (argv.length && (argv.indexOf('rebuild') > -1)) { - // here we map `node-pre-gyp rebuild` to `node-gyp rebuild` which internally means - // "clean + configure + build" and triggers a full recompile - compile.run_gyp(['clean'],{},function(err) { - if (err) return callback(err); - configure(gyp,argv,function(err) { - if (err) return callback(err); - return do_build(gyp,argv,callback); - }); - }); - } else { - return do_build(gyp,argv,callback); - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js deleted file mode 100644 index a1289f68a19..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/clean.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -module.exports = exports = clean; - -exports.usage = 'Removes the entire folder containing the compiled .node module'; - -var fs = require('fs'); -var rm = require('rimraf'); -var exists = require('fs').exists || require('path').exists; -var versioning = require('./util/versioning.js'); - -function clean (gyp, argv, callback) { - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - var to_delete = opts.module_path; - exists(to_delete, function(found) { - if (found) { - if (!gyp.opts.silent_clean) console.log('['+package_json.name+'] Removing "%s"', to_delete); - return rm(to_delete, callback); - } - return callback(); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js deleted file mode 100644 index 1ea56642b66..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/configure.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -module.exports = exports = configure; - -exports.usage = 'Attempts to configure node-gyp or nw-gyp build'; - -var compile = require('./util/compile.js'); -var handle_gyp_opts = require('./util/handle_gyp_opts.js'); - -function configure(gyp, argv, callback) { - handle_gyp_opts(gyp,argv,function(err,result) { - var final_args = result.gyp.concat(result.pre); - // pull select node-gyp configure options out of the npm environ - var known_gyp_args = ['dist-url','python','nodedir','msvs_version']; - known_gyp_args.forEach(function(key) { - var val = gyp.opts[key] || gyp.opts[key.replace('-','_')]; - if (val) { - final_args.push('--'+key+'='+val); - } - }); - // --ensure=false tell node-gyp to re-install node development headers - // but it is only respected by node-gyp install, so we have to call install - // as a separate step if the user passes it - if (gyp.opts.ensure === false) { - var install_args = final_args.concat(['install','--ensure=false']); - compile.run_gyp(install_args,result.opts,function(err) { - if (err) return callback(err); - if (result.unparsed.length > 0) { - final_args = final_args. - concat(['--']). - concat(result.unparsed); - } - compile.run_gyp(['configure'].concat(final_args),result.opts,function(err) { - return callback(err); - }); - }); - } else { - if (result.unparsed.length > 0) { - final_args = final_args. - concat(['--']). - concat(result.unparsed); - } - compile.run_gyp(['configure'].concat(final_args),result.opts,function(err) { - return callback(err); - }); - } - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js deleted file mode 100644 index aff9bf8327e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/info.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -module.exports = exports = unpublish; - -exports.usage = 'Lists all published binaries (requires aws-sdk)'; - -var fs = require('fs'); -var log = require('npmlog'); -var versioning = require('./util/versioning.js'); -var s3_setup = require('./util/s3_setup.js'); -var config = require('rc')("node_pre_gyp",{acl:"public-read"}); - -function unpublish(gyp, argv, callback) { - var AWS = require("aws-sdk"); - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - s3_setup.detect(opts.hosted_path,config); - AWS.config.update(config); - var s3 = new AWS.S3(); - var s3_opts = { Bucket: config.bucket, - Prefix: config.prefix - }; - s3.listObjects(s3_opts, function(err, meta){ - if (err && err.code == 'NotFound') { - return callback(new Error('['+package_json.name+'] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/'+config.prefix)); - } else if(err) { - return callback(err); - } else { - log.verbose(JSON.stringify(meta,null,1)); - if (meta && meta.Contents) { - meta.Contents.forEach(function(obj) { - console.log(obj.Key); - }); - } else { - console.error('['+package_json.name+'] No objects found at https://' + s3_opts.Bucket + '.s3.amazonaws.com/'+config.prefix ); - } - return callback(); - } - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js deleted file mode 100644 index ce2d56ffc6a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js +++ /dev/null @@ -1,215 +0,0 @@ -"use strict"; - -module.exports = exports = install; - -exports.usage = 'Attempts to install pre-built binary for module'; - -var fs = require('fs'); -var path = require('path'); -var zlib = require('zlib'); -var log = require('npmlog'); -var existsAsync = fs.exists || path.exists; -var versioning = require('./util/versioning.js'); -var testbinary = require('./testbinary.js'); -var clean = require('./clean.js'); - -function download(uri,opts,callback) { - log.http('GET', uri); - - var req = null; - var requestOpts = { - uri: uri.replace('+','%2B'), - headers: { - 'User-Agent': 'node-pre-gyp (node ' + process.version + ')' - } - }; - - var proxyUrl = opts.proxy || - process.env.http_proxy || - process.env.HTTP_PROXY || - process.env.npm_config_proxy; - if (proxyUrl) { - if (/^https?:\/\//i.test(proxyUrl)) { - log.verbose('download', 'using proxy url: "%s"', proxyUrl); - requestOpts.proxy = proxyUrl; - } else { - log.warn('download', 'ignoring invalid "proxy" config setting: "%s"', proxyUrl); - } - } - try { - req = require('request')(requestOpts); - } catch (e) { - return callback(e); - } - if (req) { - req.on('response', function (res) { - log.http(res.statusCode, uri); - }); - } - return callback(null,req); -} - -function place_binary(from,to,opts,callback) { - download(from,opts,function(err,req) { - if (err) return callback(err); - if (!req) return callback(new Error("empty req")); - var badDownload = false; - var extractCount = 0; - var gunzip = zlib.createGunzip(); - var extracter = require('tar').Extract({ path: to, strip: 1}); - - function afterTarball(err) { - if (err) return callback(err); - if (badDownload) return callback(new Error("bad download")); - if (extractCount === 0) { - return callback(new Error('There was a fatal problem while downloading/extracting the tarball')); - } - log.info('tarball', 'done parsing tarball'); - callback(); - } - - function filter_func(entry) { - // ensure directories are +x - // https://github.com/mapnik/node-mapnik/issues/262 - entry.props.mode |= (entry.props.mode >>> 2) & parseInt('0111',8); - log.info('install','unpacking ' + entry.path); - extractCount++; - } - - gunzip.on('error', callback); - extracter.on('entry', filter_func); - extracter.on('error', callback); - extracter.on('end', afterTarball); - - req.on('error', function(err) { - badDownload = true; - return callback(err); - }); - - req.on('close', function () { - if (extractCount === 0) { - return callback(new Error('Connection closed while downloading tarball file')); - } - }); - - req.on('response', function(res) { - if (res.statusCode !== 200) { - badDownload = true; - if (res.statusCode == 404) { - return callback(new Error('Pre-built binary not available for your system, looked for ' + from)); - } else { - return callback(new Error(res.statusCode + ' status code downloading tarball ' + from)); - } - } - // start unzipping and untaring - req.pipe(gunzip).pipe(extracter); - }); - }); -} - -function do_build(gyp,argv,callback) { - gyp.todo.push( { name: 'build', args: ['rebuild'] } ); - process.nextTick(callback); -} - -function print_fallback_error(err,opts,package_json) { - var fallback_message = ' (falling back to source compile with node-gyp)'; - var full_message = "Pre-built binaries not found for " + package_json.name + "@" + package_json.version; - full_message += " and " + opts.runtime + "@" + (opts.target || process.versions.node) + " (" + opts.node_abi + " ABI)"; - full_message += fallback_message; - log.error("Tried to download: " + opts.hosted_tarball); - log.error(full_message); - log.http(err.message); -} - -function install(gyp, argv, callback) { - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var source_build = gyp.opts['build-from-source'] || gyp.opts.build_from_source; - var update_binary = gyp.opts['update-binary'] || gyp.opts.update_binary; - var should_do_source_build = source_build === package_json.name || (source_build === true || source_build === 'true'); - var no_rollback = gyp.opts.hasOwnProperty('rollback') && gyp.opts.rollback === false; - if (should_do_source_build) { - log.info('build','requesting source compile'); - return do_build(gyp,argv,callback); - } else { - var fallback_to_build = gyp.opts['fallback-to-build'] || gyp.opts.fallback_to_build; - var should_do_fallback_build = fallback_to_build === package_json.name || (fallback_to_build === true || fallback_to_build === 'true'); - // but allow override from npm - if (process.env.npm_config_argv) { - var cooked = JSON.parse(process.env.npm_config_argv).cooked; - var match = cooked.indexOf("--fallback-to-build"); - if (match > -1 && cooked.length > match && cooked[match+1] == "false") { - should_do_fallback_build = false; - log.info('install','Build fallback disabled via npm flag: --fallback-to-build=false'); - } - } - var opts; - try { - opts = versioning.evaluate(package_json, gyp.opts); - } catch (err) { - return callback(err); - } - var from = opts.hosted_tarball; - var to = opts.module_path; - var binary_module = path.join(to,opts.module_name + '.node'); - if (existsAsync(binary_module,function(found) { - if (found && !update_binary) { - testbinary(gyp, argv, function(err) { - if (err) { - console.error('['+package_json.name+'] ' + err.message); - log.error("Testing local pre-built binary failed, attempting to re-download"); - place_binary(from,to,opts,function(err) { - if (err) { - if (should_do_fallback_build) { - print_fallback_error(err,opts,package_json); - return do_build(gyp,argv,callback); - } else { - return callback(err); - } - } else { - console.log('['+package_json.name+'] Success: "' + binary_module + '" is reinstalled via remote'); - return callback(); - } - }); - } else { - console.log('['+package_json.name+'] Success: "' + binary_module + '" already installed'); - console.log('Pass --update-binary to reinstall or --build-from-source to recompile'); - return callback(); - } - }); - } else { - if (!update_binary) log.info('check','checked for "' + binary_module + '" (not found)'); - place_binary(from,to,opts,function(err) { - if (err && should_do_fallback_build) { - print_fallback_error(err,opts,package_json); - return do_build(gyp,argv,callback); - } else if (err) { - return callback(err); - } else { - testbinary(gyp, argv, function(err) { - if (err) { - if (no_rollback) { - return callback(err); - } - gyp.opts.silent_clean = true; - clean(gyp, argv, function(error) { - if (error) console.log(error); - if (should_do_fallback_build) { - console.error('['+package_json.name+'] ' + err.message); - log.error("Testing pre-built binary failed, attempting to source compile"); - return do_build(gyp,argv,callback); - } else { - return callback(err); - } - }); - } else { - console.log('['+package_json.name+'] Success: "' + binary_module + '" is installed via remote'); - return callback(); - } - }); - } - }); - } - })); - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js deleted file mode 100644 index f0fff781c2e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js +++ /dev/null @@ -1,192 +0,0 @@ -"use strict"; - -/** - * Module exports. - */ - -module.exports = exports; - -/** - * Module dependencies. - */ - -var path = require('path'); -var nopt = require('nopt'); -var log = require('npmlog'); -var EE = require('events').EventEmitter; -var inherits = require('util').inherits; -var commands = [ - 'clean', - 'install', - 'reinstall', - 'build', - 'rebuild', - 'package', - 'testpackage', - 'publish', - 'unpublish', - 'info', - 'testbinary', - 'reveal', - 'configure' - ]; -var aliases = {}; - -// differentiate node-pre-gyp's logs from npm's -log.heading = 'node-pre-gyp'; - -exports.find = require('./pre-binding').find; - -function Run() { - var self = this; - - this.commands = {}; - - commands.forEach(function (command) { - self.commands[command] = function (argv, callback) { - log.verbose('command', command, argv); - return require('./' + command)(self, argv, callback); - }; - }); -} -inherits(Run, EE); -exports.Run = Run; -var proto = Run.prototype; - -/** - * Export the contents of the package.json. - */ - -proto.package = require('../package'); - -/** - * nopt configuration definitions - */ - -proto.configDefs = { - help: Boolean, // everywhere - arch: String, // 'configure' - debug: Boolean, // 'build' - directory: String, // bin - proxy: String, // 'install' - loglevel: String, // everywhere -}; - -/** - * nopt shorthands - */ - -proto.shorthands = { - release: '--no-debug', - C: '--directory', - debug: '--debug', - j: '--jobs', - silent: '--loglevel=silent', - silly: '--loglevel=silly', - verbose: '--loglevel=verbose', -}; - -/** - * expose the command aliases for the bin file to use. - */ - -proto.aliases = aliases; - -/** - * Parses the given argv array and sets the 'opts', - * 'argv' and 'command' properties. - */ - -proto.parseArgv = function parseOpts (argv) { - this.opts = nopt(this.configDefs, this.shorthands, argv); - this.argv = this.opts.argv.remain.slice(); - var commands = this.todo = []; - - // create a copy of the argv array with aliases mapped - argv = this.argv.map(function (arg) { - // is this an alias? - if (arg in this.aliases) { - arg = this.aliases[arg]; - } - return arg; - }, this); - - // process the mapped args into "command" objects ("name" and "args" props) - argv.slice().forEach(function (arg) { - if (arg in this.commands) { - var args = argv.splice(0, argv.indexOf(arg)); - argv.shift(); - if (commands.length > 0) { - commands[commands.length - 1].args = args; - } - commands.push({ name: arg, args: [] }); - } - }, this); - if (commands.length > 0) { - commands[commands.length - 1].args = argv.splice(0); - } - - // support for inheriting config env variables from npm - var npm_config_prefix = 'npm_config_'; - Object.keys(process.env).forEach(function (name) { - if (name.indexOf(npm_config_prefix) !== 0) return; - var val = process.env[name]; - if (name === npm_config_prefix + 'loglevel') { - log.level = val; - } else { - // add the user-defined options to the config - name = name.substring(npm_config_prefix.length); - // avoid npm argv clobber already present args - // which avoids problem of 'npm test' calling - // script that runs unique npm install commands - if (name === 'argv') { - if (this.opts.argv && - this.opts.argv.remain && - this.opts.argv.remain.length) { - // do nothing - } else { - this.opts[name] = val; - } - } else { - this.opts[name] = val; - } - } - }, this); - - if (this.opts.loglevel) { - log.level = this.opts.loglevel; - } - log.resume(); -}; - -/** - * Returns the usage instructions for node-pre-gyp. - */ - -proto.usage = function usage () { - var str = [ - '', - ' Usage: node-pre-gyp [options]', - '', - ' where is one of:', - commands.map(function (c) { - return ' - ' + c + ' - ' + require('./' + c).usage; - }).join('\n'), - '', - 'node-pre-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'), - 'node@' + process.versions.node - ].join('\n'); - return str; -}; - -/** - * Version number getter. - */ - -Object.defineProperty(proto, 'version', { - get: function () { - return this.package.version; - }, - enumerable: true -}); - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js deleted file mode 100644 index 3a35f653151..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/package.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -module.exports = exports = _package; - -exports.usage = 'Packs binary (and enclosing directory) into locally staged tarball'; - -var fs = require('fs'); -var path = require('path'); -var log = require('npmlog'); -var versioning = require('./util/versioning.js'); -var write = require('fs').createWriteStream; -var existsAsync = fs.exists || path.exists; -var mkdirp = require('mkdirp'); - -function _package(gyp, argv, callback) { - var pack = require('tar-pack').pack; - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - var from = opts.module_path; - var binary_module = path.join(from,opts.module_name + '.node'); - existsAsync(binary_module,function(found) { - if (!found) { - return callback(new Error("Cannot package because " + binary_module + " missing: run `node-pre-gyp rebuild` first")); - } - var tarball = opts.staged_tarball; - var filter_func = function(entry) { - // ensure directories are +x - // https://github.com/mapnik/node-mapnik/issues/262 - log.info('package','packing ' + entry.path); - return true; - }; - mkdirp(path.dirname(tarball),function(err) { - if (err) throw err; - pack(from, { filter: filter_func }) - .pipe(write(tarball)) - .on('error', function(err) { - if (err) console.error('['+package_json.name+'] ' + err.message); - return callback(err); - }) - .on('close', function() { - log.info('package','Binary staged at "' + tarball + '"'); - return callback(); - }); - }); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js deleted file mode 100644 index 326a486c9ae..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/pre-binding.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -var versioning = require('../lib/util/versioning.js'); -var existsSync = require('fs').existsSync || require('path').existsSync; -var path = require('path'); - -module.exports = exports; - -exports.usage = 'Finds the require path for the node-pre-gyp installed module'; - -exports.validate = function(package_json) { - versioning.validate_config(package_json); -}; - -exports.find = function(package_json_path,opts) { - if (!existsSync(package_json_path)) { - throw new Error("package.json does not exist at " + package_json_path); - } - var package_json = require(package_json_path); - versioning.validate_config(package_json); - opts = opts || {}; - if (!opts.module_root) opts.module_root = path.dirname(package_json_path); - var meta = versioning.evaluate(package_json,opts); - return meta.module; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js deleted file mode 100644 index d666b01317d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/publish.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; - -module.exports = exports = publish; - -exports.usage = 'Publishes pre-built binary (requires aws-sdk)'; - -var fs = require('fs'); -var path = require('path'); -var log = require('npmlog'); -var versioning = require('./util/versioning.js'); -var s3_setup = require('./util/s3_setup.js'); -var existsAsync = fs.exists || path.exists; -var url = require('url'); -var config = require('rc')("node_pre_gyp",{acl:"public-read"}); - -function publish(gyp, argv, callback) { - var AWS = require("aws-sdk"); - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - var tarball = opts.staged_tarball; - existsAsync(tarball,function(found) { - if (!found) { - return callback(new Error("Cannot publish because " + tarball + " missing: run `node-pre-gyp package` first")); - } - log.info('publish', 'Detecting s3 credentials'); - s3_setup.detect(opts.hosted_path,config); - var key_name = url.resolve(config.prefix,opts.package_name); - log.info('publish', 'Authenticating with s3'); - AWS.config.update(config); - var s3 = new AWS.S3(); - var s3_opts = { Bucket: config.bucket, - Key: key_name - }; - var remote_package = 'https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key; - log.info('publish', 'Checking for existing binary at ' + remote_package); - s3.headObject(s3_opts, function(err, meta){ - if (meta) log.info('publish', JSON.stringify(meta)); - if (err && err.code == 'NotFound') { - // we are safe to publish because - // the object does not already exist - log.info('publish', 'Preparing to put object'); - var s3_put = new AWS.S3(); - var s3_put_opts = { ACL: config.acl, - Body: fs.createReadStream(tarball), - Bucket: config.bucket, - Key: key_name - }; - log.info('publish', 'Putting object'); - try { - s3_put.putObject(s3_put_opts, function(err, resp){ - log.info('publish', 'returned from putting object'); - if(err) { - log.info('publish', 's3 putObject error: "' + err + '"'); - return callback(err); - } - if (resp) log.info('publish', 's3 putObject response: "' + JSON.stringify(resp) + '"'); - log.info('publish', 'successfully put object'); - console.log('['+package_json.name+'] published to ' + remote_package); - return callback(); - }); - } catch (err) { - log.info('publish', 's3 putObject error: "' + err + '"'); - return callback(err); - } - } else if (err) { - log.info('publish', 's3 headObject error: "' + err + '"'); - return callback(err); - } else { - log.error('publish','Cannot publish over existing version'); - log.error('publish',"Update the 'version' field in package.json and try again"); - log.error('publish','If the previous version was published in error see:'); - log.error('publish','\t node-pre-gyp unpublish'); - return callback(new Error('Failed publishing to ' + remote_package)); - } - }); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js deleted file mode 100644 index 48a7b74b470..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/rebuild.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -module.exports = exports = rebuild; - -exports.usage = 'Runs "clean" and "build" at once'; - -function rebuild (gyp, argv, callback) { - gyp.todo.unshift( - { name: 'clean', args: [] }, - { name: 'build', args: ['rebuild'] } - ); - process.nextTick(callback); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js deleted file mode 100644 index ed65d54e03c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reinstall.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -module.exports = exports = rebuild; - -exports.usage = 'Runs "clean" and "install" at once'; - -function rebuild (gyp, argv, callback) { - gyp.todo.unshift( - { name: 'clean', args: [] }, - { name: 'install', args: [] } - ); - process.nextTick(callback); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js deleted file mode 100644 index e6d00eb34b7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/reveal.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -module.exports = exports = reveal; - -exports.usage = 'Reveals data on the versioned binary'; - -var fs = require('fs'); -var versioning = require('./util/versioning.js'); - -function unix_paths(key, val) { - return val && val.replace ? val.replace(/\\/g, '/') : val; -} - -function reveal(gyp, argv, callback) { - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - var hit = false; - // if a second arg is passed look to see - // if it is a known option - //console.log(JSON.stringify(gyp.opts,null,1)) - var remain = gyp.opts.argv.remain.pop(); - if (remain && opts.hasOwnProperty(remain)) { - console.log(opts[remain].replace(/\\/g, '/')); - hit = true; - } - // otherwise return all options as json - if (!hit) { - console.log(JSON.stringify(opts,unix_paths,2)); - } - return callback(); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js deleted file mode 100644 index fbdfca4d2d7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testbinary.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -module.exports = exports = testbinary; - -exports.usage = 'Tests that the binary.node can be required'; - -var fs = require('fs'); -var path = require('path'); -var log = require('npmlog'); -var cp = require('child_process'); -var versioning = require('./util/versioning.js'); -var path = require('path'); - -function testbinary(gyp, argv, callback) { - var args = []; - var options = {}; - var shell_cmd = process.execPath; - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - // ensure on windows that / are used for require path - var binary_module = opts.module.replace(/\\/g, '/'); - var nw = (opts.runtime && opts.runtime === 'node-webkit'); - if ((process.arch != opts.target_arch) || - (process.platform != opts.target_platform)) { - var msg = "skipping validation since host platform/arch ("; - msg += process.platform+'/'+process.arch+")"; - msg += " does not match target ("; - msg += opts.target_platform+'/'+opts.target_arch+")"; - log.info('validate', msg); - return callback(); - } - if (nw) { - options.timeout = 5000; - if (process.platform === 'darwin') { - shell_cmd = 'node-webkit'; - } else if (process.platform === 'win32') { - shell_cmd = 'nw.exe'; - } else { - shell_cmd = 'nw'; - } - var modulePath = path.resolve(binary_module); - var appDir = path.join(__dirname, 'util', 'nw-pre-gyp'); - args.push(appDir); - args.push(modulePath); - log.info("validate","Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'"); - cp.execFile(shell_cmd, args, options, function(err, stdout, stderr) { - // check for normal timeout for node-webkit - if (err) { - if (err.killed === true && err.signal && err.signal.indexOf('SIG') > -1) { - return callback(); - } - var stderrLog = stderr.toString(); - log.info('stderr', stderrLog); - if( /^\s*Xlib:\s*extension\s*"RANDR"\s*missing\s*on\s*display\s*":\d+\.\d+"\.\s*$/.test(stderrLog) ){ - log.info('RANDR', 'stderr contains only RANDR error, ignored'); - return callback(); - } - return callback(err); - } - return callback(); - }); - return; - } - args.push('--eval'); - args.push("'require(\\'" + binary_module.replace(/\'/g, '\\\'') +"\\')'"); - log.info("validate","Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'"); - cp.execFile(shell_cmd, args, options, function(err, stdout, stderr) { - if (err) { - return callback(err, { stdout:stdout, stderr:stderr}); - } - return callback(); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js deleted file mode 100644 index 1d4cc607f98..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/testpackage.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -module.exports = exports = testpackage; - -exports.usage = 'Tests that the staged package is valid'; - -var fs = require('fs'); -var path = require('path'); -var log = require('npmlog'); -var existsAsync = fs.exists || path.exists; -var versioning = require('./util/versioning.js'); -var testbinary = require('./testbinary.js'); -var read = require('fs').createReadStream; -var zlib = require('zlib'); - -function testpackage(gyp, argv, callback) { - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - var tarball = opts.staged_tarball; - existsAsync(tarball, function(found) { - if (!found) { - return callback(new Error("Cannot test package because " + tarball + " missing: run `node-pre-gyp package` first")); - } - var to = opts.module_path; - var gunzip = zlib.createGunzip(); - var extracter = require('tar').Extract({ path: to, strip: 1 }); - function filter_func(entry) { - // ensure directories are +x - // https://github.com/mapnik/node-mapnik/issues/262 - entry.props.mode |= (entry.props.mode >>> 2) & parseInt('0111',8); - log.info('install','unpacking ' + entry.path); - } - gunzip.on('error', callback); - extracter.on('error', callback); - extracter.on('entry', filter_func); - extracter.on('end', function(err) { - if (err) return callback(err); - testbinary(gyp,argv,function(err) { - if (err) { - return callback(err); - } else { - console.log('['+package_json.name+'] Package appears valid'); - return callback(); - } - }); - }); - read(tarball).pipe(gunzip).pipe(extracter); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js deleted file mode 100644 index 43f8e66d297..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/unpublish.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -module.exports = exports = unpublish; - -exports.usage = 'Unpublishes pre-built binary (requires aws-sdk)'; - -var fs = require('fs'); -var log = require('npmlog'); -var versioning = require('./util/versioning.js'); -var s3_setup = require('./util/s3_setup.js'); -var url = require('url'); -var config = require('rc')("node_pre_gyp",{acl:"public-read"}); - -function unpublish(gyp, argv, callback) { - var AWS = require("aws-sdk"); - var package_json = JSON.parse(fs.readFileSync('./package.json')); - var opts = versioning.evaluate(package_json, gyp.opts); - s3_setup.detect(opts.hosted_path,config); - AWS.config.update(config); - var key_name = url.resolve(config.prefix,opts.package_name); - var s3 = new AWS.S3(); - var s3_opts = { Bucket: config.bucket, - Key: key_name - }; - s3.headObject(s3_opts, function(err, meta) { - if (err && err.code == 'NotFound') { - console.log('['+package_json.name+'] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key); - return callback(); - } else if(err) { - return callback(err); - } else { - log.info('unpublish', JSON.stringify(meta)); - s3.deleteObject(s3_opts, function(err, resp) { - if (err) return callback(err); - log.info(JSON.stringify(resp)); - console.log('['+package_json.name+'] Success: removed https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key); - return callback(); - }); - } - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json deleted file mode 100644 index e1f84e543af..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +++ /dev/null @@ -1,1274 +0,0 @@ -{ - "0.1.14": { - "node_abi": null, - "v8": "1.3" - }, - "0.1.15": { - "node_abi": null, - "v8": "1.3" - }, - "0.1.16": { - "node_abi": null, - "v8": "1.3" - }, - "0.1.17": { - "node_abi": null, - "v8": "1.3" - }, - "0.1.18": { - "node_abi": null, - "v8": "1.3" - }, - "0.1.19": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.20": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.21": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.22": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.23": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.24": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.25": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.26": { - "node_abi": null, - "v8": "2.0" - }, - "0.1.27": { - "node_abi": null, - "v8": "2.1" - }, - "0.1.28": { - "node_abi": null, - "v8": "2.1" - }, - "0.1.29": { - "node_abi": null, - "v8": "2.1" - }, - "0.1.30": { - "node_abi": null, - "v8": "2.1" - }, - "0.1.31": { - "node_abi": null, - "v8": "2.1" - }, - "0.1.32": { - "node_abi": null, - "v8": "2.1" - }, - "0.1.33": { - "node_abi": null, - "v8": "2.1" - }, - "0.1.90": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.91": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.92": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.93": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.94": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.95": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.96": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.97": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.98": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.99": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.100": { - "node_abi": null, - "v8": "2.2" - }, - "0.1.101": { - "node_abi": null, - "v8": "2.3" - }, - "0.1.102": { - "node_abi": null, - "v8": "2.3" - }, - "0.1.103": { - "node_abi": null, - "v8": "2.3" - }, - "0.1.104": { - "node_abi": null, - "v8": "2.3" - }, - "0.2.0": { - "node_abi": 1, - "v8": "2.3" - }, - "0.2.1": { - "node_abi": 1, - "v8": "2.3" - }, - "0.2.2": { - "node_abi": 1, - "v8": "2.3" - }, - "0.2.3": { - "node_abi": 1, - "v8": "2.3" - }, - "0.2.4": { - "node_abi": 1, - "v8": "2.3" - }, - "0.2.5": { - "node_abi": 1, - "v8": "2.3" - }, - "0.2.6": { - "node_abi": 1, - "v8": "2.3" - }, - "0.3.0": { - "node_abi": 1, - "v8": "2.5" - }, - "0.3.1": { - "node_abi": 1, - "v8": "2.5" - }, - "0.3.2": { - "node_abi": 1, - "v8": "3.0" - }, - "0.3.3": { - "node_abi": 1, - "v8": "3.0" - }, - "0.3.4": { - "node_abi": 1, - "v8": "3.0" - }, - "0.3.5": { - "node_abi": 1, - "v8": "3.0" - }, - "0.3.6": { - "node_abi": 1, - "v8": "3.0" - }, - "0.3.7": { - "node_abi": 1, - "v8": "3.0" - }, - "0.3.8": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.0": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.1": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.2": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.3": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.4": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.5": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.6": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.7": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.8": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.9": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.10": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.11": { - "node_abi": 1, - "v8": "3.1" - }, - "0.4.12": { - "node_abi": 1, - "v8": "3.1" - }, - "0.5.0": { - "node_abi": 1, - "v8": "3.1" - }, - "0.5.1": { - "node_abi": 1, - "v8": "3.4" - }, - "0.5.2": { - "node_abi": 1, - "v8": "3.4" - }, - "0.5.3": { - "node_abi": 1, - "v8": "3.4" - }, - "0.5.4": { - "node_abi": 1, - "v8": "3.5" - }, - "0.5.5": { - "node_abi": 1, - "v8": "3.5" - }, - "0.5.6": { - "node_abi": 1, - "v8": "3.6" - }, - "0.5.7": { - "node_abi": 1, - "v8": "3.6" - }, - "0.5.8": { - "node_abi": 1, - "v8": "3.6" - }, - "0.5.9": { - "node_abi": 1, - "v8": "3.6" - }, - "0.5.10": { - "node_abi": 1, - "v8": "3.7" - }, - "0.6.0": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.1": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.2": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.3": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.4": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.5": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.6": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.7": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.8": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.9": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.10": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.11": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.12": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.13": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.14": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.15": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.16": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.17": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.18": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.19": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.20": { - "node_abi": 1, - "v8": "3.6" - }, - "0.6.21": { - "node_abi": 1, - "v8": "3.6" - }, - "0.7.0": { - "node_abi": 1, - "v8": "3.8" - }, - "0.7.1": { - "node_abi": 1, - "v8": "3.8" - }, - "0.7.2": { - "node_abi": 1, - "v8": "3.8" - }, - "0.7.3": { - "node_abi": 1, - "v8": "3.9" - }, - "0.7.4": { - "node_abi": 1, - "v8": "3.9" - }, - "0.7.5": { - "node_abi": 1, - "v8": "3.9" - }, - "0.7.6": { - "node_abi": 1, - "v8": "3.9" - }, - "0.7.7": { - "node_abi": 1, - "v8": "3.9" - }, - "0.7.8": { - "node_abi": 1, - "v8": "3.9" - }, - "0.7.9": { - "node_abi": 1, - "v8": "3.11" - }, - "0.7.10": { - "node_abi": 1, - "v8": "3.9" - }, - "0.7.11": { - "node_abi": 1, - "v8": "3.11" - }, - "0.7.12": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.0": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.1": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.2": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.3": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.4": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.5": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.6": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.7": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.8": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.9": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.10": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.11": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.12": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.13": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.14": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.15": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.16": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.17": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.18": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.19": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.20": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.21": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.22": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.23": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.24": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.25": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.26": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.27": { - "node_abi": 1, - "v8": "3.11" - }, - "0.8.28": { - "node_abi": 1, - "v8": "3.11" - }, - "0.9.0": { - "node_abi": 1, - "v8": "3.11" - }, - "0.9.1": { - "node_abi": 10, - "v8": "3.11" - }, - "0.9.2": { - "node_abi": 10, - "v8": "3.11" - }, - "0.9.3": { - "node_abi": 10, - "v8": "3.13" - }, - "0.9.4": { - "node_abi": 10, - "v8": "3.13" - }, - "0.9.5": { - "node_abi": 10, - "v8": "3.13" - }, - "0.9.6": { - "node_abi": 10, - "v8": "3.15" - }, - "0.9.7": { - "node_abi": 10, - "v8": "3.15" - }, - "0.9.8": { - "node_abi": 10, - "v8": "3.15" - }, - "0.9.9": { - "node_abi": 11, - "v8": "3.15" - }, - "0.9.10": { - "node_abi": 11, - "v8": "3.15" - }, - "0.9.11": { - "node_abi": 11, - "v8": "3.14" - }, - "0.9.12": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.0": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.1": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.2": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.3": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.4": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.5": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.6": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.7": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.8": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.9": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.10": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.11": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.12": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.13": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.14": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.15": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.16": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.17": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.18": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.19": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.20": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.21": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.22": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.23": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.24": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.25": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.26": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.27": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.28": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.29": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.30": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.31": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.32": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.33": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.34": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.35": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.36": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.37": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.38": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.39": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.40": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.41": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.42": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.43": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.44": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.45": { - "node_abi": 11, - "v8": "3.14" - }, - "0.10.46": { - "node_abi": 11, - "v8": "3.14" - }, - "0.11.0": { - "node_abi": 12, - "v8": "3.17" - }, - "0.11.1": { - "node_abi": 12, - "v8": "3.18" - }, - "0.11.2": { - "node_abi": 12, - "v8": "3.19" - }, - "0.11.3": { - "node_abi": 12, - "v8": "3.19" - }, - "0.11.4": { - "node_abi": 12, - "v8": "3.20" - }, - "0.11.5": { - "node_abi": 12, - "v8": "3.20" - }, - "0.11.6": { - "node_abi": 12, - "v8": "3.20" - }, - "0.11.7": { - "node_abi": 12, - "v8": "3.20" - }, - "0.11.8": { - "node_abi": 13, - "v8": "3.21" - }, - "0.11.9": { - "node_abi": 13, - "v8": "3.22" - }, - "0.11.10": { - "node_abi": 13, - "v8": "3.22" - }, - "0.11.11": { - "node_abi": 14, - "v8": "3.22" - }, - "0.11.12": { - "node_abi": 14, - "v8": "3.22" - }, - "0.11.13": { - "node_abi": 14, - "v8": "3.25" - }, - "0.11.14": { - "node_abi": 14, - "v8": "3.26" - }, - "0.11.15": { - "node_abi": 14, - "v8": "3.28" - }, - "0.11.16": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.0": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.1": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.2": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.3": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.4": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.5": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.6": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.7": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.8": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.9": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.10": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.11": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.12": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.13": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.14": { - "node_abi": 14, - "v8": "3.28" - }, - "0.12.15": { - "node_abi": 14, - "v8": "3.28" - }, - "1.0.0": { - "node_abi": 42, - "v8": "3.31" - }, - "1.0.1": { - "node_abi": 42, - "v8": "3.31" - }, - "1.0.2": { - "node_abi": 42, - "v8": "3.31" - }, - "1.0.3": { - "node_abi": 42, - "v8": "4.1" - }, - "1.0.4": { - "node_abi": 42, - "v8": "4.1" - }, - "1.1.0": { - "node_abi": 43, - "v8": "4.1" - }, - "1.2.0": { - "node_abi": 43, - "v8": "4.1" - }, - "1.3.0": { - "node_abi": 43, - "v8": "4.1" - }, - "1.4.1": { - "node_abi": 43, - "v8": "4.1" - }, - "1.4.2": { - "node_abi": 43, - "v8": "4.1" - }, - "1.4.3": { - "node_abi": 43, - "v8": "4.1" - }, - "1.5.0": { - "node_abi": 43, - "v8": "4.1" - }, - "1.5.1": { - "node_abi": 43, - "v8": "4.1" - }, - "1.6.0": { - "node_abi": 43, - "v8": "4.1" - }, - "1.6.1": { - "node_abi": 43, - "v8": "4.1" - }, - "1.6.2": { - "node_abi": 43, - "v8": "4.1" - }, - "1.6.3": { - "node_abi": 43, - "v8": "4.1" - }, - "1.6.4": { - "node_abi": 43, - "v8": "4.1" - }, - "1.7.1": { - "node_abi": 43, - "v8": "4.1" - }, - "1.8.1": { - "node_abi": 43, - "v8": "4.1" - }, - "1.8.2": { - "node_abi": 43, - "v8": "4.1" - }, - "1.8.3": { - "node_abi": 43, - "v8": "4.1" - }, - "1.8.4": { - "node_abi": 43, - "v8": "4.1" - }, - "2.0.0": { - "node_abi": 44, - "v8": "4.2" - }, - "2.0.1": { - "node_abi": 44, - "v8": "4.2" - }, - "2.0.2": { - "node_abi": 44, - "v8": "4.2" - }, - "2.1.0": { - "node_abi": 44, - "v8": "4.2" - }, - "2.2.0": { - "node_abi": 44, - "v8": "4.2" - }, - "2.2.1": { - "node_abi": 44, - "v8": "4.2" - }, - "2.3.0": { - "node_abi": 44, - "v8": "4.2" - }, - "2.3.1": { - "node_abi": 44, - "v8": "4.2" - }, - "2.3.2": { - "node_abi": 44, - "v8": "4.2" - }, - "2.3.3": { - "node_abi": 44, - "v8": "4.2" - }, - "2.3.4": { - "node_abi": 44, - "v8": "4.2" - }, - "2.4.0": { - "node_abi": 44, - "v8": "4.2" - }, - "2.5.0": { - "node_abi": 44, - "v8": "4.2" - }, - "3.0.0": { - "node_abi": 45, - "v8": "4.4" - }, - "3.1.0": { - "node_abi": 45, - "v8": "4.4" - }, - "3.2.0": { - "node_abi": 45, - "v8": "4.4" - }, - "3.3.0": { - "node_abi": 45, - "v8": "4.4" - }, - "3.3.1": { - "node_abi": 45, - "v8": "4.4" - }, - "4.0.0": { - "node_abi": 46, - "v8": "4.5" - }, - "4.1.0": { - "node_abi": 46, - "v8": "4.5" - }, - "4.1.1": { - "node_abi": 46, - "v8": "4.5" - }, - "4.1.2": { - "node_abi": 46, - "v8": "4.5" - }, - "4.2.0": { - "node_abi": 46, - "v8": "4.5" - }, - "4.2.1": { - "node_abi": 46, - "v8": "4.5" - }, - "4.2.2": { - "node_abi": 46, - "v8": "4.5" - }, - "4.2.3": { - "node_abi": 46, - "v8": "4.5" - }, - "4.2.4": { - "node_abi": 46, - "v8": "4.5" - }, - "4.2.5": { - "node_abi": 46, - "v8": "4.5" - }, - "4.2.6": { - "node_abi": 46, - "v8": "4.5" - }, - "4.3.0": { - "node_abi": 46, - "v8": "4.5" - }, - "4.3.1": { - "node_abi": 46, - "v8": "4.5" - }, - "4.3.2": { - "node_abi": 46, - "v8": "4.5" - }, - "4.4.0": { - "node_abi": 46, - "v8": "4.5" - }, - "4.4.1": { - "node_abi": 46, - "v8": "4.5" - }, - "4.4.2": { - "node_abi": 46, - "v8": "4.5" - }, - "4.4.3": { - "node_abi": 46, - "v8": "4.5" - }, - "4.4.4": { - "node_abi": 46, - "v8": "4.5" - }, - "4.4.5": { - "node_abi": 46, - "v8": "4.5" - }, - "4.4.6": { - "node_abi": 46, - "v8": "4.5" - }, - "5.0.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.1.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.1.1": { - "node_abi": 47, - "v8": "4.6" - }, - "5.2.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.3.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.4.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.4.1": { - "node_abi": 47, - "v8": "4.6" - }, - "5.5.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.6.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.7.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.7.1": { - "node_abi": 47, - "v8": "4.6" - }, - "5.8.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.9.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.9.1": { - "node_abi": 47, - "v8": "4.6" - }, - "5.10.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.10.1": { - "node_abi": 47, - "v8": "4.6" - }, - "5.11.0": { - "node_abi": 47, - "v8": "4.6" - }, - "5.11.1": { - "node_abi": 47, - "v8": "4.6" - }, - "5.12.0": { - "node_abi": 47, - "v8": "4.6" - }, - "6.0.0": { - "node_abi": 48, - "v8": "5.0" - }, - "6.1.0": { - "node_abi": 48, - "v8": "5.0" - }, - "6.2.0": { - "node_abi": 48, - "v8": "5.0" - }, - "6.2.1": { - "node_abi": 48, - "v8": "5.0" - }, - "6.2.2": { - "node_abi": 48, - "v8": "5.0" - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js deleted file mode 100644 index 0dc460cbf46..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; - -module.exports = exports; - -var fs = require('fs'); -var path = require('path'); -var win = process.platform == 'win32'; -var existsSync = fs.existsSync || path.existsSync; -var cp = require('child_process'); - -// try to build up the complete path to node-gyp -/* priority: - - node-gyp on ENV:npm_config_node_gyp (https://github.com/npm/npm/pull/4887) - - node-gyp on NODE_PATH - - node-gyp inside npm on NODE_PATH (ignore on iojs) - - node-gyp inside npm beside node exe -*/ -function which_node_gyp() { - var node_gyp_bin; - if (process.env.npm_config_node_gyp) { - try { - node_gyp_bin = process.env.npm_config_node_gyp; - if (existsSync(node_gyp_bin)) { - return node_gyp_bin; - } - } catch (err) { } - } - try { - var node_gyp_main = require.resolve('node-gyp'); - node_gyp_bin = path.join(path.dirname( - path.dirname(node_gyp_main)), - 'bin/node-gyp.js'); - if (existsSync(node_gyp_bin)) { - return node_gyp_bin; - } - } catch (err) { } - if (process.execPath.indexOf('iojs') === -1) { - try { - var npm_main = require.resolve('npm'); - node_gyp_bin = path.join(path.dirname( - path.dirname(npm_main)), - 'node_modules/node-gyp/bin/node-gyp.js'); - if (existsSync(node_gyp_bin)) { - return node_gyp_bin; - } - } catch (err) { } - } - var npm_base = path.join(path.dirname( - path.dirname(process.execPath)), - 'lib/node_modules/npm/'); - node_gyp_bin = path.join(npm_base, 'node_modules/node-gyp/bin/node-gyp.js'); - if (existsSync(node_gyp_bin)) { - return node_gyp_bin; - } -} - -module.exports.run_gyp = function(args,opts,callback) { - var shell_cmd = ''; - var cmd_args = []; - if (opts.runtime && opts.runtime == 'node-webkit') { - shell_cmd = 'nw-gyp'; - if (win) shell_cmd += '.cmd'; - } else { - var node_gyp_path = which_node_gyp(); - if (node_gyp_path) { - shell_cmd = process.execPath; - cmd_args.push(node_gyp_path); - } else { - shell_cmd = 'node-gyp'; - if (win) shell_cmd += '.cmd'; - } - } - var final_args = cmd_args.concat(args); - var cmd = cp.spawn(shell_cmd, final_args, {cwd: undefined, env: process.env, stdio: [ 0, 1, 2]}); - cmd.on('error', function (err) { - if (err) { - return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + err + ")")); - } - callback(null,opts); - }); - cmd.on('close', function (code) { - if (code && code !== 0) { - return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + code + ")")); - } - callback(null,opts); - }); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js deleted file mode 100644 index 39fe1a28e09..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; - -module.exports = exports = handle_gyp_opts; - -var fs = require('fs'); -var versioning = require('./versioning.js'); - -/* - -Here we gather node-pre-gyp generated options (from versioning) and pass them along to node-gyp. - -We massage the args and options slightly to account for differences in what commands mean between -node-pre-gyp and node-gyp (e.g. see the difference between "build" and "rebuild" below) - -Keep in mind: the values inside `argv` and `gyp.opts` below are different depending on whether -node-pre-gyp is called directory, or if it is called in a `run-script` phase of npm. - -We also try to preserve any command line options that might have been passed to npm or node-pre-gyp. -But this is fairly difficult without passing way to much through. For example `gyp.opts` contains all -the process.env and npm pushes a lot of variables into process.env which node-pre-gyp inherits. So we have -to be very selective about what we pass through. - -For example: - -`npm install --build-from-source` will give: - -argv == [ 'rebuild' ] -gyp.opts.argv == { remain: [ 'install' ], - cooked: [ 'install', '--fallback-to-build' ], - original: [ 'install', '--fallback-to-build' ] } - -`./bin/node-pre-gyp build` will give: - -argv == [] -gyp.opts.argv == { remain: [ 'build' ], - cooked: [ 'build' ], - original: [ '-C', 'test/app1', 'build' ] } - -*/ - -// select set of node-pre-gyp versioning info -// to share with node-gyp -var share_with_node_gyp = [ - 'module', - 'module_name', - 'module_path', -]; - -function handle_gyp_opts(gyp, argv, callback) { - - // Collect node-pre-gyp specific variables to pass to node-gyp - var node_pre_gyp_options = []; - // generate custom node-pre-gyp versioning info - var opts = versioning.evaluate(JSON.parse(fs.readFileSync('./package.json')), gyp.opts); - share_with_node_gyp.forEach(function(key) { - var val = opts[key]; - if (val) { - node_pre_gyp_options.push('--' + key + '=' + val); - } else { - return callback(new Error("Option " + key + " required but not found by node-pre-gyp")); - } - }); - - // Collect options that follow the special -- which disables nopt parsing - var unparsed_options = []; - var double_hyphen_found = false; - gyp.opts.argv.original.forEach(function(opt) { - if (double_hyphen_found) { - unparsed_options.push(opt); - } - if (opt == '--') { - double_hyphen_found = true; - } - }); - - // We try respect and pass through remaining command - // line options (like --foo=bar) to node-gyp - var cooked = gyp.opts.argv.cooked; - var node_gyp_options = []; - cooked.forEach(function(value) { - if (value.length > 2 && value.slice(0,2) == '--') { - var key = value.slice(2); - var val = cooked[cooked.indexOf(value)+1]; - if (val && val.indexOf('--') === -1) { // handle '--foo=bar' or ['--foo','bar'] - node_gyp_options.push('--' + key + '=' + val); - } else { // pass through --foo - node_gyp_options.push(value); - } - } - }); - - var result = {'opts':opts,'gyp':node_gyp_options,'pre':node_pre_gyp_options,'unparsed':unparsed_options}; - return callback(null,result); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html deleted file mode 100644 index 244466c4c50..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - -Node-webkit-based module test - - - -

Node-webkit-based module test

- - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json deleted file mode 100644 index 71d03f8226c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ -"main": "index.html", -"name": "nw-pre-gyp-module-test", -"description": "Node-webkit-based module test.", -"version": "0.0.1", -"window": { - "show": false -} -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js deleted file mode 100644 index 5bc42e96cbf..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/s3_setup.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -module.exports = exports; - -var url = require('url'); - -var URI_REGEX="^(.*)\.(s3(?:-.*)?)\.amazonaws\.com$"; - -module.exports.detect = function(to,config) { - var uri = url.parse(to); - var hostname_matches = uri.hostname.match(URI_REGEX); - config.prefix = (!uri.pathname || uri.pathname == '/') ? '' : uri.pathname.replace('/',''); - if(!hostname_matches) { - return; - } - if (!config.bucket) { - config.bucket = hostname_matches[1]; - } - if (!config.region) { - var s3_domain = hostname_matches[2]; - if (s3_domain.slice(0,3) == 's3-' && - s3_domain.length >= 3) { - // it appears the region is explicit in the url - config.region = s3_domain.replace('s3-',''); - } - } -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js deleted file mode 100644 index 8ebbe3a361d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js +++ /dev/null @@ -1,308 +0,0 @@ -"use strict"; - -module.exports = exports; - -var path = require('path'); -var semver = require('semver'); -var url = require('url'); - -var abi_crosswalk; - -// This is used for unit testing to provide a fake -// ABI crosswalk that emulates one that is not updated -// for the current version -if (process.env.NODE_PRE_GYP_ABI_CROSSWALK) { - abi_crosswalk = require(process.env.NODE_PRE_GYP_ABI_CROSSWALK); -} else { - abi_crosswalk = require('./abi_crosswalk.json'); -} - -function get_electron_abi(runtime, target_version) { - if (!runtime) { - throw new Error("get_electron_abi requires valid runtime arg"); - } - if (typeof target_version === 'undefined') { - // erroneous CLI call - throw new Error("Empty target version is not supported if electron is the target."); - } - // Electron guarantees that patch version update won't break native modules. - var sem_ver = semver.parse(target_version); - return runtime + '-v' + sem_ver.major + '.' + sem_ver.minor; -} -module.exports.get_electron_abi = get_electron_abi; - -function get_node_webkit_abi(runtime, target_version) { - if (!runtime) { - throw new Error("get_node_webkit_abi requires valid runtime arg"); - } - if (typeof target_version === 'undefined') { - // erroneous CLI call - throw new Error("Empty target version is not supported if node-webkit is the target."); - } - return runtime + '-v' + target_version; -} -module.exports.get_node_webkit_abi = get_node_webkit_abi; - -function get_node_abi(runtime, versions) { - if (!runtime) { - throw new Error("get_node_abi requires valid runtime arg"); - } - if (!versions) { - throw new Error("get_node_abi requires valid process.versions object"); - } - var sem_ver = semver.parse(versions.node); - if (sem_ver.major === 0 && sem_ver.minor % 2) { // odd series - // https://github.com/mapbox/node-pre-gyp/issues/124 - return runtime+'-v'+versions.node; - } else { - // process.versions.modules added in >= v0.10.4 and v0.11.7 - // https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e - return versions.modules ? runtime+'-v' + (+versions.modules) : - 'v8-' + versions.v8.split('.').slice(0,2).join('.'); - } -} -module.exports.get_node_abi = get_node_abi; - -function get_runtime_abi(runtime, target_version) { - if (!runtime) { - throw new Error("get_runtime_abi requires valid runtime arg"); - } - if (runtime === 'node-webkit') { - return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']); - } else if (runtime === 'electron') { - return get_electron_abi(runtime, target_version || process.versions.electron); - } else { - if (runtime != 'node') { - throw new Error("Unknown Runtime: '" + runtime + "'"); - } - if (!target_version) { - return get_node_abi(runtime,process.versions); - } else { - var cross_obj; - // abi_crosswalk generated with ./scripts/abi_crosswalk.js - if (abi_crosswalk[target_version]) { - cross_obj = abi_crosswalk[target_version]; - } else { - var target_parts = target_version.split('.').map(function(i) { return +i; }); - if (target_parts.length != 3) { // parse failed - throw new Error("Unknown target version: " + target_version); - } - /* - The below code tries to infer the last known ABI compatible version - that we have recorded in the abi_crosswalk.json when an exact match - is not possible. The reasons for this to exist are complicated: - - - We support passing --target to be able to allow developers to package binaries for versions of node - that are not the same one as they are running. This might also be used in combination with the - --target_arch or --target_platform flags to also package binaries for alternative platforms - - When --target is passed we can't therefore determine the ABI (process.versions.modules) from the node - version that is running in memory - - So, therefore node-pre-gyp keeps an "ABI crosswalk" (lib/util/abi_crosswalk.json) to be able to look - this info up for all versions - - But we cannot easily predict what the future ABI will be for released versions - - And node-pre-gyp needs to be a `bundledDependency` in apps that depend on it in order to work correctly - by being fully available at install time. - - So, the speed of node releases and the bundled nature of node-pre-gyp mean that a new node-pre-gyp release - need to happen for every node.js/io.js/node-webkit/nw.js/atom-shell/etc release that might come online if - you want the `--target` flag to keep working for the latest version - - Which is impractical ^^ - - Hence the below code guesses about future ABI to make the need to update node-pre-gyp less demanding. - - In practice then you can have a dependency of your app like `node-sqlite3` that bundles a `node-pre-gyp` that - only knows about node v0.10.33 in the `abi_crosswalk.json` but target node v0.10.34 (which is assumed to be - ABI compatible with v0.10.33). - - TODO: use semver module instead of custom version parsing - */ - var major = target_parts[0]; - var minor = target_parts[1]; - var patch = target_parts[2]; - // io.js: yeah if node.js ever releases 1.x this will break - // but that is unlikely to happen: https://github.com/iojs/io.js/pull/253#issuecomment-69432616 - if (major === 1) { - // look for last release that is the same major version - // e.g. we assume io.js 1.x is ABI compatible with >= 1.0.0 - while (true) { - if (minor > 0) --minor; - if (patch > 0) --patch; - var new_iojs_target = '' + major + '.' + minor + '.' + patch; - if (abi_crosswalk[new_iojs_target]) { - cross_obj = abi_crosswalk[new_iojs_target]; - console.log('Warning: node-pre-gyp could not find exact match for ' + target_version); - console.log('Warning: but node-pre-gyp successfully choose ' + new_iojs_target + ' as ABI compatible target'); - break; - } - if (minor === 0 && patch === 0) { - break; - } - } - } else if (major === 0) { // node.js - if (target_parts[1] % 2 === 0) { // for stable/even node.js series - // look for the last release that is the same minor release - // e.g. we assume node 0.10.x is ABI compatible with >= 0.10.0 - while (--patch > 0) { - var new_node_target = '' + major + '.' + minor + '.' + patch; - if (abi_crosswalk[new_node_target]) { - cross_obj = abi_crosswalk[new_node_target]; - console.log('Warning: node-pre-gyp could not find exact match for ' + target_version); - console.log('Warning: but node-pre-gyp successfully choose ' + new_node_target + ' as ABI compatible target'); - break; - } - } - } - } - } - if (!cross_obj) { - throw new Error("Unsupported target version: " + target_version); - } - // emulate process.versions - var versions_obj = { - node: target_version, - v8: cross_obj.v8+'.0', - // abi_crosswalk uses 1 for node versions lacking process.versions.modules - // process.versions.modules added in >= v0.10.4 and v0.11.7 - modules: cross_obj.node_abi > 1 ? cross_obj.node_abi : undefined - }; - return get_node_abi(runtime, versions_obj); - } - } -} -module.exports.get_runtime_abi = get_runtime_abi; - -var required_parameters = [ - 'module_name', - 'module_path', - 'host' -]; - -function validate_config(package_json) { - var msg = package_json.name + ' package.json is not node-pre-gyp ready:\n'; - var missing = []; - if (!package_json.main) { - missing.push('main'); - } - if (!package_json.version) { - missing.push('version'); - } - if (!package_json.name) { - missing.push('name'); - } - if (!package_json.binary) { - missing.push('binary'); - } - var o = package_json.binary; - required_parameters.forEach(function(p) { - if (missing.indexOf('binary') > -1) { - missing.pop('binary'); - } - if (!o || o[p] === undefined) { - missing.push('binary.' + p); - } - }); - if (missing.length >= 1) { - throw new Error(msg+"package.json must declare these properties: \n" + missing.join('\n')); - } - if (o) { - // enforce https over http - var protocol = url.parse(o.host).protocol; - if (protocol === 'http:') { - throw new Error("'host' protocol ("+protocol+") is invalid - only 'https:' is accepted"); - } - } -} - -module.exports.validate_config = validate_config; - -function eval_template(template,opts) { - Object.keys(opts).forEach(function(key) { - var pattern = '{'+key+'}'; - while (template.indexOf(pattern) > -1) { - template = template.replace(pattern,opts[key]); - } - }); - return template; -} - -// url.resolve needs single trailing slash -// to behave correctly, otherwise a double slash -// may end up in the url which breaks requests -// and a lacking slash may not lead to proper joining -function fix_slashes(pathname) { - if (pathname.slice(-1) != '/') { - return pathname + '/'; - } - return pathname; -} - -// remove double slashes -// note: path.normalize will not work because -// it will convert forward to back slashes -function drop_double_slashes(pathname) { - return pathname.replace(/\/\//g,'/'); -} - -function get_process_runtime(versions) { - var runtime = 'node'; - if (versions['node-webkit']) { - runtime = 'node-webkit'; - } else if (versions.electron) { - runtime = 'electron'; - } - return runtime; -} - -module.exports.get_process_runtime = get_process_runtime; - -var default_package_name = '{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz'; -var default_remote_path = ''; - -module.exports.evaluate = function(package_json,options) { - options = options || {}; - validate_config(package_json); - var v = package_json.version; - var module_version = semver.parse(v); - var runtime = options.runtime || get_process_runtime(process.versions); - var opts = { - name: package_json.name, - configuration: Boolean(options.debug) ? 'Debug' : 'Release', - debug: options.debug, - module_name: package_json.binary.module_name, - version: module_version.version, - prerelease: module_version.prerelease.length ? module_version.prerelease.join('.') : '', - build: module_version.build.length ? module_version.build.join('.') : '', - major: module_version.major, - minor: module_version.minor, - patch: module_version.patch, - runtime: runtime, - node_abi: get_runtime_abi(runtime,options.target), - target: options.target || '', - platform: options.target_platform || process.platform, - target_platform: options.target_platform || process.platform, - arch: options.target_arch || process.arch, - target_arch: options.target_arch || process.arch, - module_main: package_json.main, - toolset : options.toolset || '' // address https://github.com/mapbox/node-pre-gyp/issues/119 - }; - // support host mirror with npm config `--{module_name}_binary_host_mirror` - // e.g.: https://github.com/node-inspector/v8-profiler/blob/master/package.json#L25 - // > npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/ - var host = process.env['npm_config_' + opts.module_name + '_binary_host_mirror'] || package_json.binary.host; - opts.host = fix_slashes(eval_template(host,opts)); - opts.module_path = eval_template(package_json.binary.module_path,opts); - // now we resolve the module_path to ensure it is absolute so that binding.gyp variables work predictably - if (options.module_root) { - // resolve relative to known module root: works for pre-binding require - opts.module_path = path.join(options.module_root,opts.module_path); - } else { - // resolve relative to current working directory: works for node-pre-gyp commands - opts.module_path = path.resolve(opts.module_path); - } - opts.module = path.join(opts.module_path,opts.module_name + '.node'); - opts.remote_path = package_json.binary.remote_path ? drop_double_slashes(fix_slashes(eval_template(package_json.binary.remote_path,opts))) : default_remote_path; - var package_name = package_json.binary.package_name ? package_json.binary.package_name : default_package_name; - opts.package_name = eval_template(package_name,opts); - opts.staged_tarball = path.join('build/stage',opts.remote_path,opts.package_name); - opts.hosted_path = url.resolve(opts.host,opts.remote_path); - opts.hosted_tarball = url.resolve(opts.hosted_path,opts.package_name); - return opts; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json deleted file mode 100644 index 6fa08e3e14b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-pre-gyp/package.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "_args": [ - [ - "node-pre-gyp@^0.6.29", - "/Users/eshanker/Code/fsevents" - ] - ], - "_from": "node-pre-gyp@>=0.6.29 <0.7.0", - "_id": "node-pre-gyp@0.6.29", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/node-pre-gyp", - "_nodeVersion": "4.4.5", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/node-pre-gyp-0.6.29.tgz_1467142616046_0.945712324930355" - }, - "_npmUser": { - "email": "dane@mapbox.com", - "name": "springmeyer" - }, - "_npmVersion": "2.15.5", - "_phantomChildren": {}, - "_requested": { - "name": "node-pre-gyp", - "raw": "node-pre-gyp@^0.6.29", - "rawSpec": "^0.6.29", - "scope": null, - "spec": ">=0.6.29 <0.7.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents" - ], - "_resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.29.tgz", - "_shasum": "b0bd13635baf7d1be7ae233c16fbcf3309acd37c", - "_shrinkwrap": null, - "_spec": "node-pre-gyp@^0.6.29", - "_where": "/Users/eshanker/Code/fsevents", - "author": { - "email": "dane@mapbox.com", - "name": "Dane Springmeyer" - }, - "bin": { - "node-pre-gyp": "./bin/node-pre-gyp" - }, - "bugs": { - "url": "https://github.com/mapbox/node-pre-gyp/issues" - }, - "dependencies": { - "mkdirp": "~0.5.0", - "nopt": "~3.0.1", - "npmlog": "~3.1.2", - "rc": "~1.1.0", - "request": "2.x", - "rimraf": "~2.5.0", - "semver": "~5.2.0", - "tar": "~2.2.0", - "tar-pack": "~3.1.0" - }, - "description": "Node.js native addon binary install tool", - "devDependencies": { - "aws-sdk": "2.x", - "jshint": "2.x", - "mocha": "2.x", - "retire": "1.x" - }, - "directories": {}, - "dist": { - "shasum": "b0bd13635baf7d1be7ae233c16fbcf3309acd37c", - "tarball": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.29.tgz" - }, - "gitHead": "3733536bf8947ee9dd18c8d46b0f964f0e41db8e", - "homepage": "https://github.com/mapbox/node-pre-gyp#readme", - "jshintConfig": { - "globalstrict": true, - "mocha": true, - "noarg": true, - "node": true, - "undef": true, - "unused": true - }, - "keywords": [ - "addon", - "binary", - "bindings", - "c", - "c++", - "module", - "native" - ], - "license": "BSD-3-Clause", - "main": "./lib/node-pre-gyp.js", - "maintainers": [ - { - "email": "dane@dbsgeo.com", - "name": "springmeyer" - }, - { - "email": "wb@bergwerk-gis.at", - "name": "bergwerkgis" - }, - { - "email": "michael.patrick.morris@gmail.com", - "name": "mikemorris" - }, - { - "email": "kkaefer@gmail.com", - "name": "kkaefer" - }, - { - "email": "young@developmentseed.org", - "name": "yhahn" - } - ], - "name": "node-pre-gyp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/mapbox/node-pre-gyp.git" - }, - "scripts": { - "prepublish": "retire -n && npm ls && jshint test/build.test.js test/s3_setup.test.js test/versioning.test.js", - "test": "jshint lib lib/util scripts bin/node-pre-gyp && mocha -R spec --timeout 500000", - "update-crosswalk": "node scripts/abi_crosswalk.js" - }, - "version": "0.6.29" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore deleted file mode 100644 index 8886139386e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.DS_Store -.nyc_output -coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index 652609b37e0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2012 Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md deleted file mode 100644 index 5cd85550877..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/README.md +++ /dev/null @@ -1,254 +0,0 @@ -# node-uuid - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). -* Cryptographically strong random # generation - * `crypto.randomBytes(n)` in node.js - * `window.crypto.getRandomValues(ta)` in [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues#Browser_Compatibility) -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) -* Comes with a Command Line Interface for generating uuids on the command line - -## Getting Started - -Install it in your browser: - -```html - -``` - -Or in node.js: - -``` -npm install node-uuid -``` - -```javascript -var uuid = require('node-uuid'); -``` - -Then create some ids ... - -```javascript -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the node-uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Command Line Interface - -To use the executable, it's probably best to install this library globally. - -`npm install -g node-uuid` - -Usage: - -``` -USAGE: uuid [version] [options] - - -options: - ---help Display this message and exit -``` - -`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied. - -### Examples - -``` -> uuid -3a91f950-dec8-4688-ba14-5b7bbfc7a563 -``` - -``` -> uuid v1 -9d0b43e0-7696-11e3-964b-250efa37a98e -``` - -``` -> uuid v4 -6790ac7c-24ac-4f98-8464-42f6d98a53ae -``` - -## Testing - -In node.js - -``` -npm test -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.6 - -* Properly detect node crypto and whatwg crypto -* Workaround phantomjs/browserify bug -* Explicit check for `window` rather implicit this-global -* Issue warning if Math.random() is being used -* "use strict"; -* A few jshint / stylistic updates (=== and such) - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0132..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe04e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb098..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6d71..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include -#include -#include -#include - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe762..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid deleted file mode 100755 index f732e9918e0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bin/uuid +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var uuid = require(path.join(__dirname, '..')); - -var arg = process.argv[2]; - -if ('--help' === arg) { - console.log('\n USAGE: uuid [version] [options]\n\n'); - console.log(' options:\n'); - console.log(' --help Display this message and exit\n'); - process.exit(0); -} - -if (null == arg) { - console.log(uuid()); - process.exit(0); -} - -if ('v1' !== arg && 'v4' !== arg) { - console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); - process.exit(1); -} - -console.log(uuid[arg]()); -process.exit(0); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json deleted file mode 100644 index c0925e1906b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "node-uuid", - "version": "1.4.7", - "homepage": "https://github.com/broofa/node-uuid", - "authors": [ - "Robert Kieffer " - ], - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "main": "uuid.js", - "keywords": [ - "uuid", - "gid", - "rfc4122" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json deleted file mode 100644 index 3ff463366e7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/component.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "node-uuid", - "repo": "broofa/node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "version": "1.4.7", - "author": "Robert Kieffer ", - "contributors": [ - { - "name": "Christoph Tavan ", - "github": "https://github.com/ctavan" - } - ], - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "dependencies": {}, - "development": {}, - "main": "uuid.js", - "scripts": [ - "uuid.js" - ], - "license": "MIT" -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json deleted file mode 100644 index 1c5bdb8ad1c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - "node-uuid@~1.4.7", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "node-uuid@>=1.4.7 <1.5.0", - "_id": "node-uuid@1.4.7", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/node-uuid", - "_nodeVersion": "5.0.0", - "_npmUser": { - "email": "coolaj86@gmail.com", - "name": "coolaj86" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "node-uuid", - "raw": "node-uuid@~1.4.7", - "rawSpec": "~1.4.7", - "scope": null, - "spec": ">=1.4.7 <1.5.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", - "_shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", - "_shrinkwrap": null, - "_spec": "node-uuid@~1.4.7", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "author": { - "email": "robert@broofa.com", - "name": "Robert Kieffer" - }, - "bin": { - "uuid": "./bin/uuid" - }, - "bugs": { - "url": "https://github.com/broofa/node-uuid/issues" - }, - "contributors": [ - { - "email": "coolaj86@gmail.com", - "name": "AJ ONeal" - }, - { - "email": "dev@tavan.de", - "name": "Christoph Tavan" - } - ], - "dependencies": {}, - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "devDependencies": { - "nyc": "^2.2.0" - }, - "directories": {}, - "dist": { - "shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", - "tarball": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz" - }, - "gitHead": "309512573ec1c60143c257157479a20f7f1f51cd", - "homepage": "https://github.com/broofa/node-uuid", - "installable": true, - "keywords": [ - "guid", - "rfc4122", - "uuid" - ], - "lib": ".", - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" - } - ], - "main": "./uuid.js", - "maintainers": [ - { - "email": "robert@broofa.com", - "name": "broofa" - }, - { - "email": "coolaj86@gmail.com", - "name": "coolaj86" - } - ], - "name": "node-uuid", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/broofa/node-uuid.git" - }, - "scripts": { - "coverage": "nyc npm test && nyc report", - "test": "node test/test.js" - }, - "url": "http://github.com/broofa/node-uuid", - "version": "1.4.7" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js deleted file mode 100644 index 05af82215fd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/compare_v1.js +++ /dev/null @@ -1,63 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../uuid'), - uuidjs = require('uuid-js'), - libuuid = require('uuid').generate, - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html deleted file mode 100644 index d80326ec5a8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js deleted file mode 100644 index 5f1113d8572..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/test/test.js +++ /dev/null @@ -1,231 +0,0 @@ -if (!this.uuid) { - // node.js - uuid = require('../uuid'); - if (!/_rb/.test(uuid._rng.toString())) { - throw new Error("should use crypto for node.js"); - } -} - -// -// x-platform log/assert shims -// - -function _log(msg, type) { - type = type || 'log'; - - if (typeof(document) != 'undefined') { - document.write('
' + msg.replace(/\n/g, '
') + '
'); - } - if (typeof(console) != 'undefined') { - var color = { - log: '\033[39m', - warn: '\033[33m', - error: '\033[31m' - }; - console[type](color[type] + msg + color.log); - } -} - -function log(msg) {_log(msg, 'log');} -function warn(msg) {_log(msg, 'warn');} -function error(msg) {_log(msg, 'error');} - -function assert(res, msg) { - if (!res) { - error('FAIL: ' + msg); - } else { - log('Pass: ' + msg); - } -} - -// -// Unit tests -// - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - ids = ids.map(function(id) { - return id.split('-').reverse().join('-'); - }).sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' -); - -// Verify throw if too many ids created -var thrown = false; -try { - uuid.v1({msecs: TIME, nsecs: 10000}); -} catch (e) { - thrown = true; -} -assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); - -// Verify clock regression bumps clockseq -var uidt = uuid.v1({msecs: TIME}); -var uidtb = uuid.v1({msecs: TIME - 1}); -assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' -); - -// Verify clock regression bumps clockseq -var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); -var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); -assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' -); - -// Verify explicit options produce expected id -var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] -}); -assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); - -// Verify adjacent ids across a msec boundary are 1 time unit apart -var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); -var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - -var before = u0.split('-')[0], after = u1.split('-')[0]; -var dt = parseInt(after, 16) - parseInt(before, 16); -assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); - -// -// Test parse/unparse -// - -id = '00112233445566778899aabbccddeeff'; -assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); -assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); - -// -// Perf tests -// - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js deleted file mode 100644 index 89c5b8fb613..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/node-uuid/uuid.js +++ /dev/null @@ -1,272 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -/*global window, require, define */ -(function(_window) { - 'use strict'; - - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - var _rng, _mathRNG, _nodeRNG, _whatwgRNG, _previousRoot; - - function setupBrowser() { - // Allow for MSIE11 msCrypto - var _crypto = _window.crypto || _window.msCrypto; - - if (!_rng && _crypto && _crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // - // Moderately fast, high quality - try { - var _rnds8 = new Uint8Array(16); - _whatwgRNG = _rng = function whatwgRNG() { - _crypto.getRandomValues(_rnds8); - return _rnds8; - }; - _rng(); - } catch(e) {} - } - - if (!_rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - _mathRNG = _rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) { r = Math.random() * 0x100000000; } - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; - if ('undefined' !== typeof console && console.warn) { - console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"); - } - } - } - - function setupNode() { - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // - // Moderately fast, high quality - if ('function' === typeof require) { - try { - var _rb = require('crypto').randomBytes; - _nodeRNG = _rng = _rb && function() {return _rb(16);}; - _rng(); - } catch(e) {} - } - } - - if (_window) { - setupBrowser(); - } else { - setupNode(); - } - - // Buffer class to use - var BufferClass = ('function' === typeof Buffer) ? Buffer : Array; - - // Maps for number <-> hex string conversion - var _byteToHex = []; - var _hexToByte = {}; - for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; - } - - // **`parse()` - Parse a UUID into it's component bytes** - function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; - } - - // **`unparse()` - Convert UUID byte array (ala parse()) into a string** - function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; - } - - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - - // random #'s we need to init node and clockseq - var _seedBytes = _rng(); - - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] - ]; - - // Per 4.2.2, randomize (14 bit) clockseq - var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - - // Previous uuid creation time - var _lastMSecs = 0, _lastNSecs = 0; - - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = (options.clockseq != null) ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = (options.msecs != null) ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = (options.nsecs != null) ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq == null) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); - } - - // **`v4()` - Generate random UUID** - - // See https://github.com/broofa/node-uuid for API details - function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) === 'string') { - buf = (options === 'binary') ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); - } - - // Export public API - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; - uuid.parse = parse; - uuid.unparse = unparse; - uuid.BufferClass = BufferClass; - uuid._rng = _rng; - uuid._mathRNG = _mathRNG; - uuid._nodeRNG = _nodeRNG; - uuid._whatwgRNG = _whatwgRNG; - - if (('undefined' !== typeof module) && module.exports) { - // Publish as node.js module - module.exports = uuid; - } else if (typeof define === 'function' && define.amd) { - // Publish as AMD module - define(function() {return uuid;}); - - - } else { - // Publish as global (in browsers) - _previousRoot = _window.uuid; - - // **`noConflict()` - (browser only) to reset global 'uuid' var** - uuid.noConflict = function() { - _window.uuid = _previousRoot; - return uuid; - }; - - _window.uuid = uuid; - } -})('undefined' !== typeof window ? window : null); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore deleted file mode 100644 index 3c3629e647f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml deleted file mode 100644 index 99f2bbf5068..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -language: node_js -node_js: - - '0.8' - - '0.10' - - '0.12' - - 'iojs' -before_install: - - npm install -g npm@latest diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md deleted file mode 100644 index f21a4b31c5d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/README.md +++ /dev/null @@ -1,211 +0,0 @@ -If you want to write an option parser, and have it be good, there are -two ways to do it. The Right Way, and the Wrong Way. - -The Wrong Way is to sit down and write an option parser. We've all done -that. - -The Right Way is to write some complex configurable program with so many -options that you hit the limit of your frustration just trying to -manage them all, and defer it with duct-tape solutions until you see -exactly to the core of the problem, and finally snap and write an -awesome option parser. - -If you want to write an option parser, don't write an option parser. -Write a package manager, or a source control system, or a service -restarter, or an operating system. You probably won't end up with a -good one of those, but if you don't give up, and you are relentless and -diligent enough in your procrastination, you may just end up with a very -nice option parser. - -## USAGE - - // my-program.js - var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many1" : [String, Array] - , "many2" : [path] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - console.log(parsed) - -This would give you support for any of the following: - -```bash -$ node my-program.js --foo "blerp" --no-flag -{ "foo" : "blerp", "flag" : false } - -$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag -{ bar: 7, foo: "Mr. Hand", flag: true } - -$ node my-program.js --foo "blerp" -f -----p -{ foo: "blerp", flag: true, pick: true } - -$ node my-program.js -fp --foofoo -{ foo: "Mr. Foo", flag: true, pick: true } - -$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. -{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } - -$ node my-program.js --blatzk -fp # unknown opts are ok. -{ blatzk: true, flag: true, pick: true } - -$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value -{ blatzk: 1000, flag: true, pick: true } - -$ node my-program.js --no-blatzk -fp # unless they start with "no-" -{ blatzk: false, flag: true, pick: true } - -$ node my-program.js --baz b/a/z # known paths are resolved. -{ baz: "/Users/isaacs/b/a/z" } - -# if Array is one of the types, then it can take many -# values, and will always be an array. The other types provided -# specify what types are allowed in the list. - -$ node my-program.js --many1 5 --many1 null --many1 foo -{ many1: ["5", "null", "foo"] } - -$ node my-program.js --many2 foo --many2 bar -{ many2: ["/path/to/foo", "path/to/bar"] } -``` - -Read the tests at the bottom of `lib/nopt.js` for more examples of -what this puppy can do. - -## Types - -The following types are supported, and defined on `nopt.typeDefs` - -* String: A normal string. No parsing is done. -* path: A file system path. Gets resolved against cwd if not absolute. -* url: A url. If it doesn't parse, it isn't accepted. -* Number: Must be numeric. -* Date: Must parse as a date. If it does, and `Date` is one of the options, - then it will return a Date object, not a string. -* Boolean: Must be either `true` or `false`. If an option is a boolean, - then it does not need a value, and its presence will imply `true` as - the value. To negate boolean flags, do `--no-whatever` or `--whatever - false` -* NaN: Means that the option is strictly not allowed. Any value will - fail. -* Stream: An object matching the "Stream" class in node. Valuable - for use when validating programmatically. (npm uses this to let you - supply any WriteStream on the `outfd` and `logfd` config options.) -* Array: If `Array` is specified as one of the types, then the value - will be parsed as a list of options. This means that multiple values - can be specified, and that the value will always be an array. - -If a type is an array of values not on this list, then those are -considered valid values. For instance, in the example above, the -`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, -and any other value will be rejected. - -When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be -interpreted as their JavaScript equivalents. - -You can also mix types and values, or multiple types, in a list. For -instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. When types are ordered, this implies a -preference, and the first type that can be used to properly interpret -the value will be used. - -To define a new type, add it to `nopt.typeDefs`. Each item in that -hash is an object with a `type` member and a `validate` method. The -`type` member is an object that matches what goes in the type list. The -`validate` method is a function that gets called with `validate(data, -key, val)`. Validate methods should assign `data[key]` to the valid -value of `val` if it can be handled properly, or return boolean -`false` if it cannot. - -You can also call `nopt.clean(data, types, typeDefs)` to clean up a -config object and remove its invalid properties. - -## Error Handling - -By default, nopt outputs a warning to standard error when invalid values for -known options are found. You can change this behavior by assigning a method -to `nopt.invalidHandler`. This method will be called with -the offending `nopt.invalidHandler(key, val, types)`. - -If no `nopt.invalidHandler` is assigned, then it will console.error -its whining. If it is assigned to boolean `false` then the warning is -suppressed. - -## Abbreviations - -Yes, they are supported. If you define options like this: - -```javascript -{ "foolhardyelephants" : Boolean -, "pileofmonkeys" : Boolean } -``` - -Then this will work: - -```bash -node program.js --foolhar --pil -node program.js --no-f --pileofmon -# etc. -``` - -## Shorthands - -Shorthands are a hash of shorter option names to a snippet of args that -they expand to. - -If multiple one-character shorthands are all combined, and the -combination does not unambiguously match any other option or shorthand, -then they will be broken up into their constituent parts. For example: - -```json -{ "s" : ["--loglevel", "silent"] -, "g" : "--global" -, "f" : "--force" -, "p" : "--parseable" -, "l" : "--long" -} -``` - -```bash -npm ls -sgflp -# just like doing this: -npm ls --loglevel silent --global --force --long --parseable -``` - -## The Rest of the args - -The config object returned by nopt is given a special member called -`argv`, which is an object with the following fields: - -* `remain`: The remaining args after all the parsing has occurred. -* `original`: The args as they originally appeared. -* `cooked`: The args after flags and shorthands are expanded. - -## Slicing - -Node programs are called with more or less the exact argv as it appears -in C land, after the v8 and node-specific options have been plucked off. -As such, `argv[0]` is always `node` and `argv[1]` is always the -JavaScript program being run. - -That's usually not very useful to you. So they're sliced off by -default. If you want them, then you can pass in `0` as the last -argument, or any other number that you'd like to slice off the start of -the list. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js deleted file mode 100755 index 3232d4c570f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/bin/nopt.js +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env node -var nopt = require("../lib/nopt") - , path = require("path") - , types = { num: Number - , bool: Boolean - , help: Boolean - , list: Array - , "num-list": [Number, Array] - , "str-list": [String, Array] - , "bool-list": [Boolean, Array] - , str: String - , clear: Boolean - , config: Boolean - , length: Number - , file: path - } - , shorthands = { s: [ "--str", "astring" ] - , b: [ "--bool" ] - , nb: [ "--no-bool" ] - , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] - , "?": ["--help"] - , h: ["--help"] - , H: ["--help"] - , n: [ "--num", "125" ] - , c: ["--config"] - , l: ["--length"] - , f: ["--file"] - } - , parsed = nopt( types - , shorthands - , process.argv - , 2 ) - -console.log("parsed", parsed) - -if (parsed.help) { - console.log("") - console.log("nopt cli tester") - console.log("") - console.log("types") - console.log(Object.keys(types).map(function M (t) { - var type = types[t] - if (Array.isArray(type)) { - return [t, type.map(function (type) { return type.name })] - } - return [t, type && type.name] - }).reduce(function (s, i) { - s[i[0]] = i[1] - return s - }, {})) - console.log("") - console.log("shorthands") - console.log(shorthands) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js deleted file mode 100755 index 142447e18e7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/examples/my-program.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -//process.env.DEBUG_NOPT = 1 - -// my-program.js -var nopt = require("../lib/nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag", "true"] - , "g" : ["--flag"] - , "s" : "--flag" - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - -console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js deleted file mode 100644 index 97707e78424..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/lib/nopt.js +++ /dev/null @@ -1,415 +0,0 @@ -// info about each config option. - -var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG - ? function () { console.error.apply(console, arguments) } - : function () {} - -var url = require("url") - , path = require("path") - , Stream = require("stream").Stream - , abbrev = require("abbrev") - -module.exports = exports = nopt -exports.clean = clean - -exports.typeDefs = - { String : { type: String, validate: validateString } - , Boolean : { type: Boolean, validate: validateBoolean } - , url : { type: url, validate: validateUrl } - , Number : { type: Number, validate: validateNumber } - , path : { type: path, validate: validatePath } - , Stream : { type: Stream, validate: validateStream } - , Date : { type: Date, validate: validateDate } - } - -function nopt (types, shorthands, args, slice) { - args = args || process.argv - types = types || {} - shorthands = shorthands || {} - if (typeof slice !== "number") slice = 2 - - debug(types, shorthands, args, slice) - - args = args.slice(slice) - var data = {} - , key - , remain = [] - , cooked = args - , original = args.slice(0) - - parse(args, data, remain, types, shorthands) - // now data is full - clean(data, types, exports.typeDefs) - data.argv = {remain:remain,cooked:cooked,original:original} - Object.defineProperty(data.argv, 'toString', { value: function () { - return this.original.map(JSON.stringify).join(" ") - }, enumerable: false }) - return data -} - -function clean (data, types, typeDefs) { - typeDefs = typeDefs || exports.typeDefs - var remove = {} - , typeDefault = [false, true, null, String, Array] - - Object.keys(data).forEach(function (k) { - if (k === "argv") return - var val = data[k] - , isArray = Array.isArray(val) - , type = types[k] - if (!isArray) val = [val] - if (!type) type = typeDefault - if (type === Array) type = typeDefault.concat(Array) - if (!Array.isArray(type)) type = [type] - - debug("val=%j", val) - debug("types=", type) - val = val.map(function (val) { - // if it's an unknown value, then parse false/true/null/numbers/dates - if (typeof val === "string") { - debug("string %j", val) - val = val.trim() - if ((val === "null" && ~type.indexOf(null)) - || (val === "true" && - (~type.indexOf(true) || ~type.indexOf(Boolean))) - || (val === "false" && - (~type.indexOf(false) || ~type.indexOf(Boolean)))) { - val = JSON.parse(val) - debug("jsonable %j", val) - } else if (~type.indexOf(Number) && !isNaN(val)) { - debug("convert to number", val) - val = +val - } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { - debug("convert to date", val) - val = new Date(val) - } - } - - if (!types.hasOwnProperty(k)) { - return val - } - - // allow `--no-blah` to set 'blah' to null if null is allowed - if (val === false && ~type.indexOf(null) && - !(~type.indexOf(false) || ~type.indexOf(Boolean))) { - val = null - } - - var d = {} - d[k] = val - debug("prevalidated val", d, val, types[k]) - if (!validate(d, k, val, types[k], typeDefs)) { - if (exports.invalidHandler) { - exports.invalidHandler(k, val, types[k], data) - } else if (exports.invalidHandler !== false) { - debug("invalid: "+k+"="+val, types[k]) - } - return remove - } - debug("validated val", d, val, types[k]) - return d[k] - }).filter(function (val) { return val !== remove }) - - if (!val.length) delete data[k] - else if (isArray) { - debug(isArray, data[k], val) - data[k] = val - } else data[k] = val[0] - - debug("k=%s val=%j", k, val, data[k]) - }) -} - -function validateString (data, k, val) { - data[k] = String(val) -} - -function validatePath (data, k, val) { - if (val === true) return false - if (val === null) return true - - val = String(val) - var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// - if (val.match(homePattern) && process.env.HOME) { - val = path.resolve(process.env.HOME, val.substr(2)) - } - data[k] = path.resolve(String(val)) - return true -} - -function validateNumber (data, k, val) { - debug("validate Number %j %j %j", k, val, isNaN(val)) - if (isNaN(val)) return false - data[k] = +val -} - -function validateDate (data, k, val) { - debug("validate Date %j %j %j", k, val, Date.parse(val)) - var s = Date.parse(val) - if (isNaN(s)) return false - data[k] = new Date(val) -} - -function validateBoolean (data, k, val) { - if (val instanceof Boolean) val = val.valueOf() - else if (typeof val === "string") { - if (!isNaN(val)) val = !!(+val) - else if (val === "null" || val === "false") val = false - else val = true - } else val = !!val - data[k] = val -} - -function validateUrl (data, k, val) { - val = url.parse(String(val)) - if (!val.host) return false - data[k] = val.href -} - -function validateStream (data, k, val) { - if (!(val instanceof Stream)) return false - data[k] = val -} - -function validate (data, k, val, type, typeDefs) { - // arrays are lists of types. - if (Array.isArray(type)) { - for (var i = 0, l = type.length; i < l; i ++) { - if (type[i] === Array) continue - if (validate(data, k, val, type[i], typeDefs)) return true - } - delete data[k] - return false - } - - // an array of anything? - if (type === Array) return true - - // NaN is poisonous. Means that something is not allowed. - if (type !== type) { - debug("Poison NaN", k, val, type) - delete data[k] - return false - } - - // explicit list of values - if (val === type) { - debug("Explicitly allowed %j", val) - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - return true - } - - // now go through the list of typeDefs, validate against each one. - var ok = false - , types = Object.keys(typeDefs) - for (var i = 0, l = types.length; i < l; i ++) { - debug("test type %j %j %j", k, val, types[i]) - var t = typeDefs[types[i]] - if (t && - ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) { - var d = {} - ok = false !== t.validate(d, k, val) - val = d[k] - if (ok) { - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - break - } - } - } - debug("OK? %j (%j %j %j)", ok, k, val, types[i]) - - if (!ok) delete data[k] - return ok -} - -function parse (args, data, remain, types, shorthands) { - debug("parse", args, data, remain) - - var key = null - , abbrevs = abbrev(Object.keys(types)) - , shortAbbr = abbrev(Object.keys(shorthands)) - - for (var i = 0; i < args.length; i ++) { - var arg = args[i] - debug("arg", arg) - - if (arg.match(/^-{2,}$/)) { - // done with keys. - // the rest are args. - remain.push.apply(remain, args.slice(i + 1)) - args[i] = "--" - break - } - var hadEq = false - if (arg.charAt(0) === "-" && arg.length > 1) { - if (arg.indexOf("=") !== -1) { - hadEq = true - var v = arg.split("=") - arg = v.shift() - v = v.join("=") - args.splice.apply(args, [i, 1].concat([arg, v])) - } - - // see if it's a shorthand - // if so, splice and back up to re-parse it. - var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) - debug("arg=%j shRes=%j", arg, shRes) - if (shRes) { - debug(arg, shRes) - args.splice.apply(args, [i, 1].concat(shRes)) - if (arg !== shRes[0]) { - i -- - continue - } - } - arg = arg.replace(/^-+/, "") - var no = null - while (arg.toLowerCase().indexOf("no-") === 0) { - no = !no - arg = arg.substr(3) - } - - if (abbrevs[arg]) arg = abbrevs[arg] - - var isArray = types[arg] === Array || - Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 - - // allow unknown things to be arrays if specified multiple times. - if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { - if (!Array.isArray(data[arg])) - data[arg] = [data[arg]] - isArray = true - } - - var val - , la = args[i + 1] - - var isBool = typeof no === 'boolean' || - types[arg] === Boolean || - Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || - (typeof types[arg] === 'undefined' && !hadEq) || - (la === "false" && - (types[arg] === null || - Array.isArray(types[arg]) && ~types[arg].indexOf(null))) - - if (isBool) { - // just set and move along - val = !no - // however, also support --bool true or --bool false - if (la === "true" || la === "false") { - val = JSON.parse(la) - la = null - if (no) val = !val - i ++ - } - - // also support "foo":[Boolean, "bar"] and "--foo bar" - if (Array.isArray(types[arg]) && la) { - if (~types[arg].indexOf(la)) { - // an explicit type - val = la - i ++ - } else if ( la === "null" && ~types[arg].indexOf(null) ) { - // null allowed - val = null - i ++ - } else if ( !la.match(/^-{2,}[^-]/) && - !isNaN(la) && - ~types[arg].indexOf(Number) ) { - // number - val = +la - i ++ - } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { - // string - val = la - i ++ - } - } - - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - continue - } - - if (types[arg] === String && la === undefined) - la = "" - - if (la && la.match(/^-{2,}$/)) { - la = undefined - i -- - } - - val = la === undefined ? true : la - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - i ++ - continue - } - remain.push(arg) - } -} - -function resolveShort (arg, shorthands, shortAbbr, abbrevs) { - // handle single-char shorthands glommed together, like - // npm ls -glp, but only if there is one dash, and only if - // all of the chars are single-char shorthands, and it's - // not a match to some other abbrev. - arg = arg.replace(/^-+/, '') - - // if it's an exact known option, then don't go any further - if (abbrevs[arg] === arg) - return null - - // if it's an exact known shortopt, same deal - if (shorthands[arg]) { - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] - } - - // first check to see if this arg is a set of single-char shorthands - var singles = shorthands.___singles - if (!singles) { - singles = Object.keys(shorthands).filter(function (s) { - return s.length === 1 - }).reduce(function (l,r) { - l[r] = true - return l - }, {}) - shorthands.___singles = singles - debug('shorthand singles', singles) - } - - var chrs = arg.split("").filter(function (c) { - return singles[c] - }) - - if (chrs.join("") === arg) return chrs.map(function (c) { - return shorthands[c] - }).reduce(function (l, r) { - return l.concat(r) - }, []) - - - // if it's an arg abbrev, and not a literal shorthand, then prefer the arg - if (abbrevs[arg] && !shorthands[arg]) - return null - - // if it's an abbr for a shorthand, then use that - if (shortAbbr[arg]) - arg = shortAbbr[arg] - - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json deleted file mode 100644 index af77afe14ec..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_args": [ - [ - "nopt@~3.0.1", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "nopt@>=3.0.1 <3.1.0", - "_id": "nopt@3.0.6", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/nopt", - "_nodeVersion": "4.2.1", - "_npmUser": { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" - }, - "_npmVersion": "2.14.10", - "_phantomChildren": {}, - "_requested": { - "name": "nopt", - "raw": "nopt@~3.0.1", - "rawSpec": "~3.0.1", - "scope": null, - "spec": ">=3.0.1 <3.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/node-pre-gyp" - ], - "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", - "_shrinkwrap": null, - "_spec": "nopt@~3.0.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bin": { - "nopt": "./bin/nopt.js" - }, - "bugs": { - "url": "https://github.com/npm/nopt/issues" - }, - "dependencies": { - "abbrev": "1" - }, - "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", - "devDependencies": { - "tap": "^1.2.0" - }, - "directories": {}, - "dist": { - "shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", - "tarball": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" - }, - "gitHead": "10a750c9bb99c1950160353459e733ac2aa18cb6", - "homepage": "https://github.com/npm/nopt#readme", - "license": "ISC", - "main": "lib/nopt.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - }, - { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" - }, - { - "email": "kat@sykosomatic.org", - "name": "zkat" - } - ], - "name": "nopt", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/nopt.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "3.0.6" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js deleted file mode 100644 index d399de92099..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/nopt/test/basic.js +++ /dev/null @@ -1,273 +0,0 @@ -var nopt = require("../") - , test = require('tap').test - - -test("passing a string results in a string", function (t) { - var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) - t.same(parsed.key, "myvalue") - t.end() -}) - -// https://github.com/npm/nopt/issues/31 -test("Empty String results in empty string, not true", function (t) { - var parsed = nopt({ empty: String }, {}, ["--empty"], 0) - t.same(parsed.empty, "") - t.end() -}) - -test("~ path is resolved to $HOME", function (t) { - var path = require("path") - if (!process.env.HOME) process.env.HOME = "/tmp" - var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) - t.same(parsed.key, path.resolve(process.env.HOME, "val")) - t.end() -}) - -// https://github.com/npm/nopt/issues/24 -test("Unknown options are not parsed as numbers", function (t) { - var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0) - t.equal(parsed['leave-as-is'], '1.20') - t.equal(parsed['parse-me'], 1.2) - t.end() -}); - -// https://github.com/npm/nopt/issues/48 -test("Check types based on name of type", function (t) { - var parsed = nopt({"parse-me": {name: "Number"}}, null, ['--parse-me=1.20'], 0) - t.equal(parsed['parse-me'], 1.2) - t.end() -}) - - -test("Missing types are not parsed", function (t) { - var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0) - //should only contain argv - t.equal(Object.keys(parsed).length, 1) - t.end() -}) - -test("Types passed without a name are not parsed", function (t) { - var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0) - //should only contain argv - t.equal(Object.keys(parsed).length, 1) - t.end() -}) - -test("other tests", function (t) { - - var util = require("util") - , Stream = require("stream") - , path = require("path") - , url = require("url") - - , shorthands = - { s : ["--loglevel", "silent"] - , d : ["--loglevel", "info"] - , dd : ["--loglevel", "verbose"] - , ddd : ["--loglevel", "silly"] - , noreg : ["--no-registry"] - , reg : ["--registry"] - , "no-reg" : ["--no-registry"] - , silent : ["--loglevel", "silent"] - , verbose : ["--loglevel", "verbose"] - , h : ["--usage"] - , H : ["--usage"] - , "?" : ["--usage"] - , help : ["--usage"] - , v : ["--version"] - , f : ["--force"] - , desc : ["--description"] - , "no-desc" : ["--no-description"] - , "local" : ["--no-global"] - , l : ["--long"] - , p : ["--parseable"] - , porcelain : ["--parseable"] - , g : ["--global"] - } - - , types = - { aoa: Array - , nullstream: [null, Stream] - , date: Date - , str: String - , browser : String - , cache : path - , color : ["always", Boolean] - , depth : Number - , description : Boolean - , dev : Boolean - , editor : path - , force : Boolean - , global : Boolean - , globalconfig : path - , group : [String, Number] - , gzipbin : String - , logfd : [Number, Stream] - , loglevel : ["silent","win","error","warn","info","verbose","silly"] - , long : Boolean - , "node-version" : [false, String] - , npaturl : url - , npat : Boolean - , "onload-script" : [false, String] - , outfd : [Number, Stream] - , parseable : Boolean - , pre: Boolean - , prefix: path - , proxy : url - , "rebuild-bundle" : Boolean - , registry : url - , searchopts : String - , searchexclude: [null, String] - , shell : path - , t: [Array, String] - , tag : String - , tar : String - , tmp : path - , "unsafe-perm" : Boolean - , usage : Boolean - , user : String - , username : String - , userconfig : path - , version : Boolean - , viewer: path - , _exit : Boolean - , path: path - } - - ; [["-v", {version:true}, []] - ,["---v", {version:true}, []] - ,["ls -s --no-reg connect -d", - {loglevel:"info",registry:null},["ls","connect"]] - ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] - ,["ls --registry blargle", {}, ["ls"]] - ,["--no-registry", {registry:null}, []] - ,["--no-color true", {color:false}, []] - ,["--no-color false", {color:true}, []] - ,["--no-color", {color:false}, []] - ,["--color false", {color:false}, []] - ,["--color --logfd 7", {logfd:7,color:true}, []] - ,["--color=true", {color:true}, []] - ,["--logfd=10", {logfd:10}, []] - ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] - ,["--tmp=tmp -tar=gtar", - {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] - ,["--logfd x", {}, []] - ,["a -true -- -no-false", {true:true},["a","-no-false"]] - ,["a -no-false", {false:false},["a"]] - ,["a -no-no-true", {true:true}, ["a"]] - ,["a -no-no-no-false", {false:false}, ["a"]] - ,["---NO-no-No-no-no-no-nO-no-no"+ - "-No-no-no-no-no-no-no-no-no"+ - "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ - "-no-body-can-do-the-boogaloo-like-I-do" - ,{"body-can-do-the-boogaloo-like-I-do":false}, []] - ,["we are -no-strangers-to-love "+ - "--you-know=the-rules --and=so-do-i "+ - "---im-thinking-of=a-full-commitment "+ - "--no-you-would-get-this-from-any-other-guy "+ - "--no-gonna-give-you-up "+ - "-no-gonna-let-you-down=true "+ - "--no-no-gonna-run-around false "+ - "--desert-you=false "+ - "--make-you-cry false "+ - "--no-tell-a-lie "+ - "--no-no-and-hurt-you false" - ,{"strangers-to-love":false - ,"you-know":"the-rules" - ,"and":"so-do-i" - ,"you-would-get-this-from-any-other-guy":false - ,"gonna-give-you-up":false - ,"gonna-let-you-down":false - ,"gonna-run-around":false - ,"desert-you":false - ,"make-you-cry":false - ,"tell-a-lie":false - ,"and-hurt-you":false - },["we", "are"]] - ,["-t one -t two -t three" - ,{t: ["one", "two", "three"]} - ,[]] - ,["-t one -t null -t three four five null" - ,{t: ["one", "null", "three"]} - ,["four", "five", "null"]] - ,["-t foo" - ,{t:["foo"]} - ,[]] - ,["--no-t" - ,{t:["false"]} - ,[]] - ,["-no-no-t" - ,{t:["true"]} - ,[]] - ,["-aoa one -aoa null -aoa 100" - ,{aoa:["one", null, '100']} - ,[]] - ,["-str 100" - ,{str:"100"} - ,[]] - ,["--color always" - ,{color:"always"} - ,[]] - ,["--no-nullstream" - ,{nullstream:null} - ,[]] - ,["--nullstream false" - ,{nullstream:null} - ,[]] - ,["--notadate=2011-01-25" - ,{notadate: "2011-01-25"} - ,[]] - ,["--date 2011-01-25" - ,{date: new Date("2011-01-25")} - ,[]] - ,["-cl 1" - ,{config: true, length: 1} - ,[] - ,{config: Boolean, length: Number, clear: Boolean} - ,{c: "--config", l: "--length"}] - ,["--acount bla" - ,{"acount":true} - ,["bla"] - ,{account: Boolean, credentials: Boolean, options: String} - ,{a:"--account", c:"--credentials",o:"--options"}] - ,["--clear" - ,{clear:true} - ,[] - ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} - ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] - ,["--file -" - ,{"file":"-"} - ,[] - ,{file:String} - ,{}] - ,["--file -" - ,{"file":true} - ,["-"] - ,{file:Boolean} - ,{}] - ,["--path" - ,{"path":null} - ,[]] - ,["--path ." - ,{"path":process.cwd()} - ,[]] - ].forEach(function (test) { - var argv = test[0].split(/\s+/) - , opts = test[1] - , rem = test[2] - , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) - , parsed = actual.argv - delete actual.argv - for (var i in opts) { - var e = JSON.stringify(opts[i]) - , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) - if (e && typeof e === "object") { - t.deepEqual(e, a) - } else { - t.equal(e, a) - } - } - t.deepEqual(rem, parsed.remain) - }) - t.end() -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md deleted file mode 100644 index f549a1f3de8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/CHANGELOG.md +++ /dev/null @@ -1,36 +0,0 @@ -### v3.1.2 - -* Update to `gauge@1.6.0` adding support for default values for template - items. - -### v3.1.1 - -* Update to `gauge@1.5.3` to fix to `1.x` compatibility when it comes to - when a progress bar is enabled. In `1.x` if you didn't have a TTY the - progress bar was never shown. In `2.x` it merely defaults to disabled, - but you can enable it explicitly if you still want progress updates. - -### v3.1.0 - -* Update to `gauge@2.5.2`: - * Updates the `signal-exit` dependency which fixes an incompatibility with - the node profiler. - * Uses externalizes its ansi code generation in `console-control-strings` -* Make the default progress bar include the last line printed, colored as it - would be when printing to a tty. - -### v3.0.0 - -* Switch to `gauge@2.0.0`, for better performance, better look. -* Set stderr/stdout blocking if they're tty's, so that we can hide a - progress bar going to stderr and then safely print to stdout. Without - this the two can end up overlapping producing confusing and sometimes - corrupted output. - -### v2.0.0 - -* Make the `error` event non-fatal so that folks can use it as a prefix. - -### v1.0.0 - -* Add progress bar with `gauge@1.1.0` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md deleted file mode 100644 index dba35501614..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/README.md +++ /dev/null @@ -1,210 +0,0 @@ -# npmlog - -The logger util that npm uses. - -This logger is very basic. It does the logging for npm. It supports -custom levels and colored output. - -By default, logs are written to stderr. If you want to send log messages -to outputs other than streams, then you can change the `log.stream` -member, or you can just listen to the events that it emits, and do -whatever you want with them. - -# Basic Usage - -``` -var log = require('npmlog') - -// additional stuff ---------------------------+ -// message ----------+ | -// prefix ----+ | | -// level -+ | | | -// v v v v - log.info('fyi', 'I have a kitty cat: %j', myKittyCat) -``` - -## log.level - -* {String} - -The level to display logs at. Any logs at or above this level will be -displayed. The special level `silent` will prevent anything from being -displayed ever. - -## log.record - -* {Array} - -An array of all the log messages that have been entered. - -## log.maxRecordSize - -* {Number} - -The maximum number of records to keep. If log.record gets bigger than -10% over this value, then it is sliced down to 90% of this value. - -The reason for the 10% window is so that it doesn't have to resize a -large array on every log entry. - -## log.prefixStyle - -* {Object} - -A style object that specifies how prefixes are styled. (See below) - -## log.headingStyle - -* {Object} - -A style object that specifies how the heading is styled. (See below) - -## log.heading - -* {String} Default: "" - -If set, a heading that is printed at the start of every line. - -## log.stream - -* {Stream} Default: `process.stderr` - -The stream where output is written. - -## log.enableColor() - -Force colors to be used on all messages, regardless of the output -stream. - -## log.disableColor() - -Disable colors on all messages. - -## log.enableProgress() - -Enable the display of log activity spinner and progress bar - -## log.disableProgress() - -Disable the display of a progress bar - -## log.enableUnicode() - -Force the unicode theme to be used for the progress bar. - -## log.disableUnicode() - -Disable the use of unicode in the progress bar. - -## log.setGaugeTemplate(template) - -Set a template for outputting the progress bar. See the [gauge documentation] for details. - -[gauge documentation]: https://npmjs.com/package/gauge - -## log.setGaugeThemeset(themes) - -Select a themeset to pick themes from for the progress bar. See the [gauge documentation] for details. - -## log.pause() - -Stop emitting messages to the stream, but do not drop them. - -## log.resume() - -Emit all buffered messages that were written while paused. - -## log.log(level, prefix, message, ...) - -* `level` {String} The level to emit the message at -* `prefix` {String} A string prefix. Set to "" to skip. -* `message...` Arguments to `util.format` - -Emit a log message at the specified level. - -## log\[level](prefix, message, ...) - -For example, - -* log.silly(prefix, message, ...) -* log.verbose(prefix, message, ...) -* log.info(prefix, message, ...) -* log.http(prefix, message, ...) -* log.warn(prefix, message, ...) -* log.error(prefix, message, ...) - -Like `log.log(level, prefix, message, ...)`. In this way, each level is -given a shorthand, so you can do `log.info(prefix, message)`. - -## log.addLevel(level, n, style, disp) - -* `level` {String} Level indicator -* `n` {Number} The numeric level -* `style` {Object} Object with fg, bg, inverse, etc. -* `disp` {String} Optional replacement for `level` in the output. - -Sets up a new level with a shorthand function and so forth. - -Note that if the number is `Infinity`, then setting the level to that -will cause all log messages to be suppressed. If the number is -`-Infinity`, then the only way to show it is to enable all log messages. - -## log.newItem(name, todo, weight) - -* `name` {String} Optional; progress item name. -* `todo` {Number} Optional; total amount of work to be done. Default 0. -* `weight` {Number} Optional; the weight of this item relative to others. Default 1. - -This adds a new `are-we-there-yet` item tracker to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `Tracker` object. - -## log.newStream(name, todo, weight) - -This adds a new `are-we-there-yet` stream tracker to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `TrackerStream` object. - -## log.newGroup(name, weight) - -This adds a new `are-we-there-yet` tracker group to the progress tracker. The -object returned has the `log[level]` methods but is otherwise an -`are-we-there-yet` `TrackerGroup` object. - -# Events - -Events are all emitted with the message object. - -* `log` Emitted for all messages -* `log.` Emitted for all messages with the `` level. -* `` Messages with prefixes also emit their prefix as an event. - -# Style Objects - -Style objects can have the following fields: - -* `fg` {String} Color for the foreground text -* `bg` {String} Color for the background -* `bold`, `inverse`, `underline` {Boolean} Set the associated property -* `bell` {Boolean} Make a noise (This is pretty annoying, probably.) - -# Message Objects - -Every log event is emitted with a message object, and the `log.record` -list contains all of them that have been created. They have the -following fields: - -* `id` {Number} -* `level` {String} -* `prefix` {String} -* `message` {String} Result of `util.format()` -* `messageRaw` {Array} Arguments to `util.format()` - -# Blocking TTYs - -We use [`set-blocking`](https://npmjs.com/package/set-blocking) to set -stderr and stdout blocking if they are tty's and have the setBlocking call. -This is a work around for an issue in early versions of Node.js 6.x, which -made stderr and stdout non-blocking on OSX. (They are always blocking -Windows and were never blocking on Linux.) `npmlog` needs them to be blocking -so that it can allow output to stdout and stderr to be interlaced. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js deleted file mode 100644 index e5b70f1f80b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/log.js +++ /dev/null @@ -1,298 +0,0 @@ -'use strict' -var Progress = require('are-we-there-yet') -var Gauge = require('gauge') -var EE = require('events').EventEmitter -var log = exports = module.exports = new EE() -var util = require('util') - -var setBlocking = require('set-blocking') -var consoleControl = require('console-control-strings') - -setBlocking(true) -var stream = process.stderr -Object.defineProperty(log, 'stream', { - set: function (newStream) { - stream = newStream - if (this.gauge) this.gauge.setWriteTo(stream, stream) - }, - get: function () { - return stream - } -}) - -// by default, decide based on tty-ness. -var colorEnabled -log.useColor = function () { - return colorEnabled != null ? colorEnabled : stream.isTTY -} - -log.enableColor = function () { - colorEnabled = true - this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) -} -log.disableColor = function () { - colorEnabled = false - this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) -} - -// default level -log.level = 'info' - -log.gauge = new Gauge(stream, { - theme: {hasColor: log.useColor()}, - template: [ - {type: 'progressbar', length: 20}, - {type: 'activityIndicator', kerning: 1, length: 1}, - {type: 'section', default: ''}, - ':', - {type: 'logline', kerning: 1, default: ''} - ] -}) - -log.tracker = new Progress.TrackerGroup() - -// no progress bars unless asked -log.progressEnabled = false - -var unicodeEnabled - -log.enableUnicode = function () { - unicodeEnabled = true - this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) -} - -log.disableUnicode = function () { - unicodeEnabled = false - this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) -} - -log.setGaugeThemeset = function (themes) { - this.gauge.setThemeset(themes) -} - -log.setGaugeTemplate = function (template) { - this.gauge.setTemplate(template) -} - -log.enableProgress = function () { - if (this.progressEnabled) return - this.progressEnabled = true - if (this._pause) return - this.tracker.on('change', this.showProgress) - this.gauge.enable() - this.showProgress() -} - -log.disableProgress = function () { - if (!this.progressEnabled) return - this.clearProgress() - this.progressEnabled = false - this.tracker.removeListener('change', this.showProgress) - this.gauge.disable() -} - -var trackerConstructors = ['newGroup', 'newItem', 'newStream'] - -var mixinLog = function (tracker) { - // mixin the public methods from log into the tracker - // (except: conflicts and one's we handle specially) - Object.keys(log).forEach(function (P) { - if (P[0] === '_') return - if (trackerConstructors.filter(function (C) { return C === P }).length) return - if (tracker[P]) return - if (typeof log[P] !== 'function') return - var func = log[P] - tracker[P] = function () { - return func.apply(log, arguments) - } - }) - // if the new tracker is a group, make sure any subtrackers get - // mixed in too - if (tracker instanceof Progress.TrackerGroup) { - trackerConstructors.forEach(function (C) { - var func = tracker[C] - tracker[C] = function () { return mixinLog(func.apply(tracker, arguments)) } - }) - } - return tracker -} - -// Add tracker constructors to the top level log object -trackerConstructors.forEach(function (C) { - log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } -}) - -log.clearProgress = function (cb) { - if (!this.progressEnabled) return cb && process.nextTick(cb) - this.gauge.hide(cb) -} - -log.showProgress = function (name, completed) { - if (!this.progressEnabled) return - var values = {} - if (name) values.section = name - var last = log.record[log.record.length - 1] - if (last) { - values.subsection = last.prefix - var disp = log.disp[last.level] || last.level - var logline = this._format(disp, log.style[last.level]) - if (last.prefix) logline += ' ' + this._format(last.prefix, this.prefixStyle) - logline += ' ' + last.message.split(/\r?\n/)[0] - values.logline = logline - } - values.completed = completed || this.tracker.completed() - this.gauge.show(values) -}.bind(log) // bind for use in tracker's on-change listener - -// temporarily stop emitting, but don't drop -log.pause = function () { - this._paused = true -} - -log.resume = function () { - if (!this._paused) return - this._paused = false - - var b = this._buffer - this._buffer = [] - b.forEach(function (m) { - this.emitLog(m) - }, this) - if (this.progressEnabled) this.enableProgress() -} - -log._buffer = [] - -var id = 0 -log.record = [] -log.maxRecordSize = 10000 -log.log = function (lvl, prefix, message) { - var l = this.levels[lvl] - if (l === undefined) { - return this.emit('error', new Error(util.format( - 'Undefined log level: %j', lvl))) - } - - var a = new Array(arguments.length - 2) - var stack = null - for (var i = 2; i < arguments.length; i++) { - var arg = a[i - 2] = arguments[i] - - // resolve stack traces to a plain string. - if (typeof arg === 'object' && arg && - (arg instanceof Error) && arg.stack) { - arg.stack = stack = arg.stack + '' - } - } - if (stack) a.unshift(stack + '\n') - message = util.format.apply(util, a) - - var m = { id: id++, - level: lvl, - prefix: String(prefix || ''), - message: message, - messageRaw: a } - - this.emit('log', m) - this.emit('log.' + lvl, m) - if (m.prefix) this.emit(m.prefix, m) - - this.record.push(m) - var mrs = this.maxRecordSize - var n = this.record.length - mrs - if (n > mrs / 10) { - var newSize = Math.floor(mrs * 0.9) - this.record = this.record.slice(-1 * newSize) - } - - this.emitLog(m) -}.bind(log) - -log.emitLog = function (m) { - if (this._paused) { - this._buffer.push(m) - return - } - if (this.progressEnabled) this.gauge.pulse(m.prefix) - var l = this.levels[m.level] - if (l === undefined) return - if (l < this.levels[this.level]) return - if (l > 0 && !isFinite(l)) return - - var disp = log.disp[m.level] || m.level - this.clearProgress() - m.message.split(/\r?\n/).forEach(function (line) { - if (this.heading) { - this.write(this.heading, this.headingStyle) - this.write(' ') - } - this.write(disp, log.style[m.level]) - var p = m.prefix || '' - if (p) this.write(' ') - this.write(p, this.prefixStyle) - this.write(' ' + line + '\n') - }, this) - this.showProgress() -} - -log._format = function (msg, style) { - if (!stream) return - - var output = '' - if (this.useColor()) { - style = style || {} - var settings = [] - if (style.fg) settings.push(style.fg) - if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1)) - if (style.bold) settings.push('bold') - if (style.underline) settings.push('underline') - if (style.inverse) settings.push('inverse') - if (settings.length) output += consoleControl.color(settings) - if (style.beep) output += consoleControl.beep() - } - output += msg - if (this.useColor()) { - output += consoleControl.color('reset') - } - return output -} - -log.write = function (msg, style) { - if (!stream) return - - stream.write(this._format(msg, style)) -} - -log.addLevel = function (lvl, n, style, disp) { - if (!disp) disp = lvl - this.levels[lvl] = n - this.style[lvl] = style - if (!this[lvl]) { - this[lvl] = function () { - var a = new Array(arguments.length + 1) - a[0] = lvl - for (var i = 0; i < arguments.length; i++) { - a[i + 1] = arguments[i] - } - return this.log.apply(this, a) - }.bind(this) - } - this.disp[lvl] = disp -} - -log.prefixStyle = { fg: 'magenta' } -log.headingStyle = { fg: 'white', bg: 'black' } - -log.style = {} -log.levels = {} -log.disp = {} -log.addLevel('silly', -Infinity, { inverse: true }, 'sill') -log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb') -log.addLevel('info', 2000, { fg: 'green' }) -log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) -log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') -log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') -log.addLevel('silent', Infinity) - -// allow 'error' prefix -log.on('error', function () {}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json deleted file mode 100644 index 636adef6aae..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/npmlog/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - "npmlog@~3.1.2", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "npmlog@>=3.1.2 <3.2.0", - "_id": "npmlog@3.1.2", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/npmlog", - "_nodeVersion": "4.4.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/npmlog-3.1.2.tgz_1466073052641_0.36111341998912394" - }, - "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" - }, - "_npmVersion": "3.9.6", - "_phantomChildren": {}, - "_requested": { - "name": "npmlog", - "raw": "npmlog@~3.1.2", - "rawSpec": "~3.1.2", - "scope": null, - "spec": ">=3.1.2 <3.2.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/node-pre-gyp" - ], - "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz", - "_shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", - "_shrinkwrap": null, - "_spec": "npmlog@~3.1.2", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/npmlog/issues" - }, - "dependencies": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.6.0", - "set-blocking": "~2.0.0" - }, - "description": "logger for npm", - "devDependencies": { - "standard": "~7.1.2", - "tap": "~5.7.0" - }, - "directories": {}, - "dist": { - "shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", - "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz" - }, - "files": [ - "log.js" - ], - "gitHead": "444e237743fa1339cb91bea2d3f16f710be56984", - "homepage": "https://github.com/npm/npmlog#readme", - "license": "ISC", - "main": "log.js", - "maintainers": [ - { - "email": "me@re-becca.org", - "name": "iarna" - }, - { - "email": "i@izs.me", - "name": "isaacs" - }, - { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" - }, - { - "email": "kat@sykosomatic.org", - "name": "zkat" - } - ], - "name": "npmlog", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npmlog.git" - }, - "scripts": { - "test": "standard && tap test/*.js" - }, - "version": "3.1.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js deleted file mode 100644 index 79be4b9cb8c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = Number.isNaN || function (x) { - return x !== x; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json deleted file mode 100644 index 5015921bc67..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - "number-is-nan@^1.0.0", - "/Users/eshanker/Code/fsevents/node_modules/code-point-at" - ] - ], - "_from": "number-is-nan@>=1.0.0 <2.0.0", - "_id": "number-is-nan@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/number-is-nan", - "_nodeVersion": "0.12.3", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.10.0", - "_phantomChildren": {}, - "_requested": { - "name": "number-is-nan", - "raw": "number-is-nan@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/code-point-at", - "/fsevents/is-fullwidth-code-point" - ], - "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", - "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", - "_shrinkwrap": null, - "_spec": "number-is-nan@^1.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/code-point-at", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/number-is-nan/issues" - }, - "dependencies": {}, - "description": "ES6 Number.isNaN() ponyfill", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", - "tarball": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3", - "homepage": "https://github.com/sindresorhus/number-is-nan#readme", - "keywords": [ - "ecmascript", - "es2015", - "es6", - "harmony", - "is", - "nan", - "not", - "number", - "polyfill", - "ponyfill", - "shim" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "number-is-nan", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/number-is-nan.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md deleted file mode 100644 index 93d851a14f1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/number-is-nan/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) - -> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method - - -## Install - -``` -$ npm install --save number-is-nan -``` - - -## Usage - -```js -var numberIsNan = require('number-is-nan'); - -numberIsNan(NaN); -//=> true - -numberIsNan('unicorn'); -//=> false -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE deleted file mode 100644 index a4a9aee0c2f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md deleted file mode 100644 index 34c4a85d2dd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/README.md +++ /dev/null @@ -1,4 +0,0 @@ -oauth-sign -========== - -OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js deleted file mode 100644 index dadcba9709f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/index.js +++ /dev/null @@ -1,136 +0,0 @@ -var crypto = require('crypto') - , qs = require('querystring') - ; - -function sha1 (key, body) { - return crypto.createHmac('sha1', key).update(body).digest('base64') -} - -function rsa (key, body) { - return crypto.createSign("RSA-SHA1").update(body).sign(key, 'base64'); -} - -function rfc3986 (str) { - return encodeURIComponent(str) - .replace(/!/g,'%21') - .replace(/\*/g,'%2A') - .replace(/\(/g,'%28') - .replace(/\)/g,'%29') - .replace(/'/g,'%27') - ; -} - -// Maps object to bi-dimensional array -// Converts { foo: 'A', bar: [ 'b', 'B' ]} to -// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ] -function map (obj) { - var key, val, arr = [] - for (key in obj) { - val = obj[key] - if (Array.isArray(val)) - for (var i = 0; i < val.length; i++) - arr.push([key, val[i]]) - else if (typeof val === "object") - for (var prop in val) - arr.push([key + '[' + prop + ']', val[prop]]); - else - arr.push([key, val]) - } - return arr -} - -// Compare function for sort -function compare (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -function generateBase (httpMethod, base_uri, params) { - // adapted from https://dev.twitter.com/docs/auth/oauth and - // https://dev.twitter.com/docs/auth/creating-signature - - // Parameter normalization - // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2 - var normalized = map(params) - // 1. First, the name and value of each parameter are encoded - .map(function (p) { - return [ rfc3986(p[0]), rfc3986(p[1] || '') ] - }) - // 2. The parameters are sorted by name, using ascending byte value - // ordering. If two or more parameters share the same name, they - // are sorted by their value. - .sort(function (a, b) { - return compare(a[0], b[0]) || compare(a[1], b[1]) - }) - // 3. The name of each parameter is concatenated to its corresponding - // value using an "=" character (ASCII code 61) as a separator, even - // if the value is empty. - .map(function (p) { return p.join('=') }) - // 4. The sorted name/value pairs are concatenated together into a - // single string by using an "&" character (ASCII code 38) as - // separator. - .join('&') - - var base = [ - rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'), - rfc3986(base_uri), - rfc3986(normalized) - ].join('&') - - return base -} - -function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { - var base = generateBase(httpMethod, base_uri, params) - var key = [ - consumer_secret || '', - token_secret || '' - ].map(rfc3986).join('&') - - return sha1(key, base) -} - -function rsasign (httpMethod, base_uri, params, private_key, token_secret) { - var base = generateBase(httpMethod, base_uri, params) - var key = private_key || '' - - return rsa(key, base) -} - -function plaintext (consumer_secret, token_secret) { - var key = [ - consumer_secret || '', - token_secret || '' - ].map(rfc3986).join('&') - - return key -} - -function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { - var method - var skipArgs = 1 - - switch (signMethod) { - case 'RSA-SHA1': - method = rsasign - break - case 'HMAC-SHA1': - method = hmacsign - break - case 'PLAINTEXT': - method = plaintext - skipArgs = 4 - break - default: - throw new Error("Signature method not supported: " + signMethod) - } - - return method.apply(null, [].slice.call(arguments, skipArgs)) -} - -exports.hmacsign = hmacsign -exports.rsasign = rsasign -exports.plaintext = plaintext -exports.sign = sign -exports.rfc3986 = rfc3986 -exports.generateBase = generateBase - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json deleted file mode 100644 index 69bd42ccd70..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/oauth-sign/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "oauth-sign@~0.8.1", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "oauth-sign@>=0.8.1 <0.9.0", - "_id": "oauth-sign@0.8.2", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/oauth-sign", - "_nodeVersion": "5.9.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/oauth-sign-0.8.2.tgz_1462396399020_0.8175400267355144" - }, - "_npmUser": { - "email": "simeonvelichkov@gmail.com", - "name": "simov" - }, - "_npmVersion": "2.15.3", - "_phantomChildren": {}, - "_requested": { - "name": "oauth-sign", - "raw": "oauth-sign@~0.8.1", - "rawSpec": "~0.8.1", - "scope": null, - "spec": ">=0.8.1 <0.9.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "_shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", - "_shrinkwrap": null, - "_spec": "oauth-sign@~0.8.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "author": { - "email": "mikeal.rogers@gmail.com", - "name": "Mikeal Rogers", - "url": "http://www.futurealoof.com" - }, - "bugs": { - "url": "https://github.com/mikeal/oauth-sign/issues" - }, - "dependencies": {}, - "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", - "tarball": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "index.js" - ], - "gitHead": "0b034206316132f57e26970152c2fb18e71bddd5", - "homepage": "https://github.com/mikeal/oauth-sign#readme", - "license": "Apache-2.0", - "main": "index.js", - "maintainers": [ - { - "email": "mikeal.rogers@gmail.com", - "name": "mikeal" - }, - { - "email": "jnylen@gmail.com", - "name": "nylen" - }, - { - "email": "simeonvelichkov@gmail.com", - "name": "simov" - } - ], - "name": "oauth-sign", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "url": "git+https://github.com/mikeal/oauth-sign.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "0.8.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js deleted file mode 100644 index 508504840dc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/index.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; -/* eslint-disable no-unused-vars */ -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (e) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (Object.getOwnPropertySymbols) { - symbols = Object.getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json deleted file mode 100644 index dfbf5d6532e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "object-assign@^4.1.0", - "/Users/eshanker/Code/fsevents/node_modules/gauge" - ] - ], - "_from": "object-assign@>=4.1.0 <5.0.0", - "_id": "object-assign@4.1.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/object-assign", - "_nodeVersion": "4.1.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/object-assign-4.1.0.tgz_1462212593641_0.3332549517508596" - }, - "_npmUser": { - "email": "ben@benalpert.com", - "name": "spicyj" - }, - "_npmVersion": "2.14.19", - "_phantomChildren": {}, - "_requested": { - "name": "object-assign", - "raw": "object-assign@^4.1.0", - "rawSpec": "^4.1.0", - "scope": null, - "spec": ">=4.1.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/gauge" - ], - "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", - "_shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", - "_shrinkwrap": null, - "_spec": "object-assign@^4.1.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/object-assign/issues" - }, - "dependencies": {}, - "description": "ES2015 Object.assign() ponyfill", - "devDependencies": { - "lodash": "^4.8.2", - "matcha": "^0.7.0", - "mocha": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", - "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "72fe21c86911758f3342fdf41c2a57860d5829bc", - "homepage": "https://github.com/sindresorhus/object-assign#readme", - "keywords": [ - "assign", - "browser", - "ecmascript", - "es2015", - "extend", - "harmony", - "object", - "polyfill", - "ponyfill", - "prollyfill", - "properties", - "shim" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - { - "email": "ben@benalpert.com", - "name": "spicyj" - } - ], - "name": "object-assign", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/object-assign.git" - }, - "scripts": { - "bench": "matcha bench.js", - "test": "xo && mocha" - }, - "version": "4.1.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md deleted file mode 100644 index 13c097734cf..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/object-assign/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) - -> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method - - -## Install - -``` -$ npm install --save object-assign -``` - - -## Usage - -```js -const objectAssign = require('object-assign'); - -objectAssign({foo: 0}, {bar: 1}); -//=> {foo: 0, bar: 1} - -// multiple sources -objectAssign({foo: 0}, {bar: 1}, {baz: 2}); -//=> {foo: 0, bar: 1, baz: 2} - -// overwrites equal keys -objectAssign({foo: 0}, {foo: 1}, {foo: 2}); -//=> {foo: 2} - -// ignores null and undefined sources -objectAssign({foo: 0}, null, {bar: 1}, undefined); -//=> {foo: 0, bar: 1} -``` - - -## API - -### objectAssign(target, source, [source, ...]) - -Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. - - -## Resources - -- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) - - -## Related - -- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md deleted file mode 100644 index a2981ea0705..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js deleted file mode 100644 index 2e1e721bfec..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/once.js +++ /dev/null @@ -1,21 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json deleted file mode 100644 index e2d53dd50db..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/once/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "once@^1.3.0", - "/Users/eshanker/Code/fsevents/node_modules/glob" - ] - ], - "_from": "once@>=1.3.0 <2.0.0", - "_id": "once@1.3.3", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/once", - "_nodeVersion": "4.0.0", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.3.2", - "_phantomChildren": {}, - "_requested": { - "name": "once", - "raw": "once@^1.3.0", - "rawSpec": "^1.3.0", - "scope": null, - "spec": ">=1.3.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/glob", - "/fsevents/inflight", - "/fsevents/tar-pack" - ], - "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", - "_shrinkwrap": null, - "_spec": "once@^1.3.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/glob", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "dependencies": { - "wrappy": "1" - }, - "description": "Run a function exactly one time", - "devDependencies": { - "tap": "^1.2.0" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", - "tarball": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" - }, - "files": [ - "once.js" - ], - "gitHead": "2ad558657e17fafd24803217ba854762842e4178", - "homepage": "https://github.com/isaacs/once#readme", - "keywords": [ - "function", - "once", - "one", - "single" - ], - "license": "ISC", - "main": "once.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - } - ], - "name": "once", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.3.3" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js deleted file mode 100644 index 19f103f908a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -}; - -function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; - - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json deleted file mode 100644 index e34cf644e37..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "path-is-absolute@^1.0.0", - "/Users/eshanker/Code/fsevents/node_modules/glob" - ] - ], - "_from": "path-is-absolute@>=1.0.0 <2.0.0", - "_id": "path-is-absolute@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/path-is-absolute", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "path-is-absolute", - "raw": "path-is-absolute@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/glob" - ], - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", - "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "_shrinkwrap": null, - "_spec": "path-is-absolute@^1.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/glob", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "dependencies": {}, - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", - "homepage": "https://github.com/sindresorhus/path-is-absolute", - "keywords": [ - "absolute", - "built-in", - "check", - "core", - "detect", - "dir", - "file", - "is", - "is-absolute", - "isabsolute", - "path", - "paths", - "polyfill", - "ponyfill", - "shim", - "util", - "utils" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "path-is-absolute", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-is-absolute.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md deleted file mode 100644 index cdf94f4309a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/path-is-absolute/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) - -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method - - -## Install - -``` -$ npm install --save path-is-absolute -``` - - -## Usage - -```js -var pathIsAbsolute = require('path-is-absolute'); - -// Linux -pathIsAbsolute('/home/foo'); -//=> true - -// Windows -pathIsAbsolute('C:/Users/'); -//=> true - -// Any OS -pathIsAbsolute.posix('/home/foo'); -//=> true -``` - - -## API - -See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). - -### pathIsAbsolute(path) - -### pathIsAbsolute.posix(path) - -The Posix specific version. - -### pathIsAbsolute.win32(path) - -The Windows specific version. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js deleted file mode 100644 index 777377a1f77..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = typeof Promise === 'function' ? Promise : require('pinkie'); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license deleted file mode 100644 index 1aeb74fd25e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json deleted file mode 100644 index 0a9499f494d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - "pinkie-promise@^2.0.0", - "/Users/eshanker/Code/fsevents/node_modules/har-validator" - ] - ], - "_from": "pinkie-promise@>=2.0.0 <3.0.0", - "_id": "pinkie-promise@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/pinkie-promise", - "_nodeVersion": "4.4.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/pinkie-promise-2.0.1.tgz_1460309839126_0.3422858319245279" - }, - "_npmUser": { - "email": "floatdrop@gmail.com", - "name": "floatdrop" - }, - "_npmVersion": "2.14.20", - "_phantomChildren": {}, - "_requested": { - "name": "pinkie-promise", - "raw": "pinkie-promise@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/har-validator" - ], - "_resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "_shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", - "_shrinkwrap": null, - "_spec": "pinkie-promise@^2.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/har-validator", - "author": { - "email": "floatdrop@gmail.com", - "name": "Vsevolod Strukchinsky", - "url": "github.com/floatdrop" - }, - "bugs": { - "url": "https://github.com/floatdrop/pinkie-promise/issues" - }, - "dependencies": { - "pinkie": "^2.0.0" - }, - "description": "ES2015 Promise ponyfill", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "2135d6dfa7a358c069ac9b178776288228450ffa", - "tarball": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "4a936c09c34ad591a25db93f1216d242de0d6184", - "homepage": "https://github.com/floatdrop/pinkie-promise", - "keywords": [ - "es2015", - "es6", - "polyfill", - "ponyfill", - "promise", - "promises" - ], - "license": "MIT", - "maintainers": [ - { - "email": "floatdrop@gmail.com", - "name": "floatdrop" - } - ], - "name": "pinkie-promise", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/pinkie-promise.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md deleted file mode 100644 index 78477f4297d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie-promise/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# pinkie-promise [![Build Status](https://travis-ci.org/floatdrop/pinkie-promise.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie-promise) - -> [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) ponyfill - -Module exports global Promise object (if available) or [`pinkie`](http://github.com/floatdrop/pinkie) Promise polyfill. - -## Install - -``` -$ npm install --save pinkie-promise -``` - -## Usage - -```js -var Promise = require('pinkie-promise'); - -new Promise(function (resolve) { resolve('unicorns'); }); -//=> Promise { 'unicorns' } -``` - -## Related - -- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js deleted file mode 100644 index 14ce1bfe3d4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/index.js +++ /dev/null @@ -1,292 +0,0 @@ -'use strict'; - -var PENDING = 'pending'; -var SETTLED = 'settled'; -var FULFILLED = 'fulfilled'; -var REJECTED = 'rejected'; -var NOOP = function () {}; -var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function'; - -var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; -var asyncQueue = []; -var asyncTimer; - -function asyncFlush() { - // run promise callbacks - for (var i = 0; i < asyncQueue.length; i++) { - asyncQueue[i][0](asyncQueue[i][1]); - } - - // reset async asyncQueue - asyncQueue = []; - asyncTimer = false; -} - -function asyncCall(callback, arg) { - asyncQueue.push([callback, arg]); - - if (!asyncTimer) { - asyncTimer = true; - asyncSetTimer(asyncFlush, 0); - } -} - -function invokeResolver(resolver, promise) { - function resolvePromise(value) { - resolve(promise, value); - } - - function rejectPromise(reason) { - reject(promise, reason); - } - - try { - resolver(resolvePromise, rejectPromise); - } catch (e) { - rejectPromise(e); - } -} - -function invokeCallback(subscriber) { - var owner = subscriber.owner; - var settled = owner._state; - var value = owner._data; - var callback = subscriber[settled]; - var promise = subscriber.then; - - if (typeof callback === 'function') { - settled = FULFILLED; - try { - value = callback(value); - } catch (e) { - reject(promise, e); - } - } - - if (!handleThenable(promise, value)) { - if (settled === FULFILLED) { - resolve(promise, value); - } - - if (settled === REJECTED) { - reject(promise, value); - } - } -} - -function handleThenable(promise, value) { - var resolved; - - try { - if (promise === value) { - throw new TypeError('A promises callback cannot return that same promise.'); - } - - if (value && (typeof value === 'function' || typeof value === 'object')) { - // then should be retrieved only once - var then = value.then; - - if (typeof then === 'function') { - then.call(value, function (val) { - if (!resolved) { - resolved = true; - - if (value === val) { - fulfill(promise, val); - } else { - resolve(promise, val); - } - } - }, function (reason) { - if (!resolved) { - resolved = true; - - reject(promise, reason); - } - }); - - return true; - } - } - } catch (e) { - if (!resolved) { - reject(promise, e); - } - - return true; - } - - return false; -} - -function resolve(promise, value) { - if (promise === value || !handleThenable(promise, value)) { - fulfill(promise, value); - } -} - -function fulfill(promise, value) { - if (promise._state === PENDING) { - promise._state = SETTLED; - promise._data = value; - - asyncCall(publishFulfillment, promise); - } -} - -function reject(promise, reason) { - if (promise._state === PENDING) { - promise._state = SETTLED; - promise._data = reason; - - asyncCall(publishRejection, promise); - } -} - -function publish(promise) { - promise._then = promise._then.forEach(invokeCallback); -} - -function publishFulfillment(promise) { - promise._state = FULFILLED; - publish(promise); -} - -function publishRejection(promise) { - promise._state = REJECTED; - publish(promise); - if (!promise._handled && isNode) { - global.process.emit('unhandledRejection', promise._data, promise); - } -} - -function notifyRejectionHandled(promise) { - global.process.emit('rejectionHandled', promise); -} - -/** - * @class - */ -function Promise(resolver) { - if (typeof resolver !== 'function') { - throw new TypeError('Promise resolver ' + resolver + ' is not a function'); - } - - if (this instanceof Promise === false) { - throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); - } - - this._then = []; - - invokeResolver(resolver, this); -} - -Promise.prototype = { - constructor: Promise, - - _state: PENDING, - _then: null, - _data: undefined, - _handled: false, - - then: function (onFulfillment, onRejection) { - var subscriber = { - owner: this, - then: new this.constructor(NOOP), - fulfilled: onFulfillment, - rejected: onRejection - }; - - if ((onRejection || onFulfillment) && !this._handled) { - this._handled = true; - if (this._state === REJECTED && isNode) { - asyncCall(notifyRejectionHandled, this); - } - } - - if (this._state === FULFILLED || this._state === REJECTED) { - // already resolved, call callback async - asyncCall(invokeCallback, subscriber); - } else { - // subscribe - this._then.push(subscriber); - } - - return subscriber.then; - }, - - catch: function (onRejection) { - return this.then(null, onRejection); - } -}; - -Promise.all = function (promises) { - if (!Array.isArray(promises)) { - throw new TypeError('You must pass an array to Promise.all().'); - } - - return new Promise(function (resolve, reject) { - var results = []; - var remaining = 0; - - function resolver(index) { - remaining++; - return function (value) { - results[index] = value; - if (!--remaining) { - resolve(results); - } - }; - } - - for (var i = 0, promise; i < promises.length; i++) { - promise = promises[i]; - - if (promise && typeof promise.then === 'function') { - promise.then(resolver(i), reject); - } else { - results[i] = promise; - } - } - - if (!remaining) { - resolve(results); - } - }); -}; - -Promise.race = function (promises) { - if (!Array.isArray(promises)) { - throw new TypeError('You must pass an array to Promise.race().'); - } - - return new Promise(function (resolve, reject) { - for (var i = 0, promise; i < promises.length; i++) { - promise = promises[i]; - - if (promise && typeof promise.then === 'function') { - promise.then(resolve, reject); - } else { - resolve(promise); - } - } - }); -}; - -Promise.resolve = function (value) { - if (value && typeof value === 'object' && value.constructor === Promise) { - return value; - } - - return new Promise(function (resolve) { - resolve(value); - }); -}; - -Promise.reject = function (reason) { - return new Promise(function (resolve, reject) { - reject(reason); - }); -}; - -module.exports = Promise; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license deleted file mode 100644 index 1aeb74fd25e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json deleted file mode 100644 index 85defc6671e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - "pinkie@^2.0.0", - "/Users/eshanker/Code/fsevents/node_modules/pinkie-promise" - ] - ], - "_from": "pinkie@>=2.0.0 <3.0.0", - "_id": "pinkie@2.0.4", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/pinkie", - "_nodeVersion": "4.2.4", - "_npmUser": { - "email": "floatdrop@gmail.com", - "name": "floatdrop" - }, - "_npmVersion": "2.14.12", - "_phantomChildren": {}, - "_requested": { - "name": "pinkie", - "raw": "pinkie@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/pinkie-promise" - ], - "_resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "_shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", - "_shrinkwrap": null, - "_spec": "pinkie@^2.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/pinkie-promise", - "author": { - "email": "floatdrop@gmail.com", - "name": "Vsevolod Strukchinsky", - "url": "github.com/floatdrop" - }, - "bugs": { - "url": "https://github.com/floatdrop/pinkie/issues" - }, - "dependencies": {}, - "description": "Itty bitty little widdle twinkie pinkie ES2015 Promise implementation", - "devDependencies": { - "core-assert": "^0.1.1", - "coveralls": "^2.11.4", - "mocha": "*", - "nyc": "^3.2.2", - "promises-aplus-tests": "*", - "xo": "^0.10.1" - }, - "directories": {}, - "dist": { - "shasum": "72556b80cfa0d48a974e80e77248e80ed4f7f870", - "tarball": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8d4a92447a5c62bff9f89756caeb4c9c8770579b", - "homepage": "https://github.com/floatdrop/pinkie", - "keywords": [ - "es2015", - "es6", - "promise", - "promises" - ], - "license": "MIT", - "maintainers": [ - { - "email": "floatdrop@gmail.com", - "name": "floatdrop" - } - ], - "name": "pinkie", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/pinkie.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && nyc mocha" - }, - "version": "2.0.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md deleted file mode 100644 index 1565f958896..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/pinkie/readme.md +++ /dev/null @@ -1,83 +0,0 @@ -

-
- pinkie -
-
-

- -> Itty bitty little widdle twinkie pinkie [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation - -[![Build Status](https://travis-ci.org/floatdrop/pinkie.svg?branch=master)](https://travis-ci.org/floatdrop/pinkie) [![Coverage Status](https://coveralls.io/repos/floatdrop/pinkie/badge.svg?branch=master&service=github)](https://coveralls.io/github/floatdrop/pinkie?branch=master) - -There are [tons of Promise implementations](https://github.com/promises-aplus/promises-spec/blob/master/implementations.md#standalone) out there, but all of them focus on browser compatibility and are often bloated with functionality. - -This module is an exact Promise specification polyfill (like [native-promise-only](https://github.com/getify/native-promise-only)), but in Node.js land (it should be browserify-able though). - - -## Install - -``` -$ npm install --save pinkie -``` - - -## Usage - -```js -var fs = require('fs'); -var Promise = require('pinkie'); - -new Promise(function (resolve, reject) { - fs.readFile('foo.json', 'utf8', function (err, data) { - if (err) { - reject(err); - return; - } - - resolve(data); - }); -}); -//=> Promise -``` - - -### API - -`pinkie` exports bare [ES2015 Promise](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects) implementation and polyfills [Node.js rejection events](https://nodejs.org/api/process.html#process_event_unhandledrejection). In case you forgot: - -#### new Promise(executor) - -Returns new instance of `Promise`. - -##### executor - -*Required* -Type: `function` - -Function with two arguments `resolve` and `reject`. The first argument fulfills the promise, the second argument rejects it. - -#### pinkie.all(promises) - -Returns a promise that resolves when all of the promises in the `promises` Array argument have resolved. - -#### pinkie.race(promises) - -Returns a promise that resolves or rejects as soon as one of the promises in the `promises` Array resolves or rejects, with the value or reason from that promise. - -#### pinkie.reject(reason) - -Returns a Promise object that is rejected with the given `reason`. - -#### pinkie.resolve(value) - -Returns a Promise object that is resolved with the given `value`. If the `value` is a thenable (i.e. has a then method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the `value`. - - -## Related - -- [pinkie-promise](https://github.com/floatdrop/pinkie-promise) - Returns the native Promise or this module - - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml deleted file mode 100644 index 36201b10017..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" - - "0.12" - - "1.7.1" - - 1 - - 2 - - 3 - - 4 - - 5 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js deleted file mode 100644 index a4f40f845fa..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e3532b54..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json deleted file mode 100644 index cdffb2e885a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_args": [ - [ - "process-nextick-args@~1.0.6", - "/Users/eshanker/Code/fsevents/node_modules/readable-stream" - ] - ], - "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_id": "process-nextick-args@1.0.7", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/process-nextick-args", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" - }, - "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "name": "process-nextick-args", - "raw": "process-nextick-args@~1.0.6", - "rawSpec": "~1.0.6", - "scope": null, - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/bl/readable-stream", - "/fsevents/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "_shrinkwrap": null, - "_spec": "process-nextick-args@~1.0.6", - "_where": "/Users/eshanker/Code/fsevents/node_modules/readable-stream", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "dependencies": {}, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - } - ], - "name": "process-nextick-args", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.7" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md deleted file mode 100644 index 78e7cfaeb7a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var nextTick = require('process-nextick-args'); - -nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js deleted file mode 100644 index ef15721584a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/process-nextick-args/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require("tap").test; -var nextTick = require('./'); - -test('should work', function (t) { - t.plan(5); - nextTick(function (a) { - t.ok(a); - nextTick(function (thing) { - t.equals(thing, 7); - }, 7); - }, true); - nextTick(function (a, b, c) { - t.equals(a, 'step'); - t.equals(b, 3); - t.equals(c, 'profit'); - }, 'step', 3, 'profit'); -}); - -test('correct number of arguments', function (t) { - t.plan(1); - nextTick(function () { - t.equals(2, arguments.length, 'correct number'); - }, 1, 2); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore deleted file mode 100644 index 1521c8b7652..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc deleted file mode 100644 index 1faac273ff6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.eslintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "complexity": [2, 22], - "consistent-return": [1], - "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], - "indent": [2, 4], - "max-params": [2, 9], - "max-statements": [2, 36], - "no-extra-parens": [1], - "no-continue": [1], - "no-magic-numbers": 0, - "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], - "operator-linebreak": 1 - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json deleted file mode 100644 index 3d099c4b119..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md deleted file mode 100644 index e318a054a90..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CHANGELOG.md +++ /dev/null @@ -1,120 +0,0 @@ -## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) -- [New] pass Buffers to the encoder/decoder directly (#161) -- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) -- [Fix] fix compacting of nested sparse arrays (#150) - -## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) -- [New] allowDots option for `stringify` (#151) -- [Fix] "sort" option should work at a depth of 3 or more (#151) -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) -- Revert ES6 requirement and restore support for node down to v0.8. - -## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) -- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json - -## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) -- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 - -## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) -- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string - -## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) -- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional -- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify - -## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) -- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false -- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm - -## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) -- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional - -## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) -- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" - -## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) -- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties -- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost -- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing -- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object -- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option -- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. -- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 -- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 -- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign -- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute - -## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) -- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function - -## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) -- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option - -## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) -- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 -- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader - -## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) -- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object - -## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) -- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". - -## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) -- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 - -## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) -- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? -- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 -- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 - -## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) -- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number - -## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) -- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array -- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x - -## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) -- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value -- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty -- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? - -## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) -- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 -- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects - -## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) -- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present -- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays -- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge -- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? - -## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) -- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter - -## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) -- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? -- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit -- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 - -## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) -- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values - -## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) -- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters -- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block - -## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) -- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument -- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed - -## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) -- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted -- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null -- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README - -## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) -- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md deleted file mode 100644 index 892836159ba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE deleted file mode 100644 index d4569487a09..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014 Nathan LaFreniere and other contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js deleted file mode 100644 index 4cc6f30673e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/dist/qs.js +++ /dev/null @@ -1,487 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;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 require=="function"&&require;for(var o=0;o= 0 && - (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = parseObject(chain, val, options); - } else { - obj[cleanRoot] = parseObject(chain, val, options); - } - } - - return obj; -}; - -var parseKeys = function parseKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var parent = /^([^\[\]]*)/; - var child = /(\[[^\[\]]*\])/g; - - // Get the parent - - var segment = parent.exec(key); - - // Stash the parent if it exists - - var keys = []; - if (segment[1]) { - // If we aren't using plain objects, optionally prefix keys - // that would overwrite object prototype properties - if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(segment[1]); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { - if (!options.allowPrototypes) { - continue; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -module.exports = function (str, opts) { - var options = opts || {}; - - if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; - options.parseArrays = options.parseArrays !== false; - options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; - options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; - options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; - options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; - options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = Utils.merge(obj, newObj, options); - } - - return Utils.compact(obj); -}; - -},{"./utils":4}],3:[function(require,module,exports){ -'use strict'; - -var Utils = require('./utils'); - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var defaults = { - delimiter: '&', - strictNullHandling: false, - skipNulls: false, - encode: true, - encoder: Utils.encode -}; - -var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = obj.toISOString(); - } else if (obj === null) { - if (strictNullHandling) { - return encoder ? encoder(prefix) : prefix; - } - - obj = ''; - } - - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { - if (encoder) { - return [encoder(prefix) + '=' + encoder(obj)]; - } - return [prefix + '=' + String(obj)]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (Array.isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (Array.isArray(obj)) { - values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } else { - values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - } - - return values; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = opts || {}; - var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; - var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; - var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; - var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; - var sort = typeof options.sort === 'function' ? options.sort : null; - var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; - var objKeys; - var filter; - - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (Array.isArray(options.filter)) { - objKeys = filter = options.filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (options.arrayFormat in arrayPrefixGenerators) { - arrayFormat = options.arrayFormat; - } else if ('indices' in options) { - arrayFormat = options.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (sort) { - objKeys.sort(sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - - return keys.join(delimiter); -}; - -},{"./utils":4}],4:[function(require,module,exports){ -'use strict'; - -var hexTable = (function () { - var array = new Array(256); - for (var i = 0; i < 256; ++i) { - array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); - } - - return array; -}()); - -exports.arrayToObject = function (source, options) { - var obj = options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -exports.merge = function (target, source, options) { - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } else if (typeof target === 'object') { - target[source] = true; - } else { - return [target, source]; - } - - return target; - } - - if (typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = exports.arrayToObject(target, options); - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (Object.prototype.hasOwnProperty.call(acc, key)) { - acc[key] = exports.merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -exports.decode = function (str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - -exports.encode = function (str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = typeof str === 'string' ? str : String(str); - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D || // - - c === 0x2E || // . - c === 0x5F || // _ - c === 0x7E || // ~ - (c >= 0x30 && c <= 0x39) || // 0-9 - (c >= 0x41 && c <= 0x5A) || // a-z - (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -exports.compact = function (obj, references) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - var refs = references || []; - var lookup = refs.indexOf(obj); - if (lookup !== -1) { - return refs[lookup]; - } - - refs.push(obj); - - if (Array.isArray(obj)) { - var compacted = []; - - for (var i = 0; i < obj.length; ++i) { - if (obj[i] && typeof obj[i] === 'object') { - compacted.push(exports.compact(obj[i], refs)); - } else if (typeof obj[i] !== 'undefined') { - compacted.push(obj[i]); - } - } - - return compacted; - } - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - obj[key] = exports.compact(obj[key], refs); - } - - return obj; -}; - -exports.isRegExp = function (obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -exports.isBuffer = function (obj) { - if (obj === null || typeof obj === 'undefined') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -},{}]},{},[1])(1) -}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js deleted file mode 100755 index 190195902a0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var Stringify = require('./stringify'); -var Parse = require('./parse'); - -module.exports = { - stringify: Stringify, - parse: Parse -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js deleted file mode 100755 index bf70fd8de87..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/parse.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict'; - -var Utils = require('./utils'); - -var defaults = { - delimiter: '&', - depth: 5, - arrayLimit: 20, - parameterLimit: 1000, - strictNullHandling: false, - plainObjects: false, - allowPrototypes: false, - allowDots: false, - decoder: Utils.decode -}; - -var parseValues = function parseValues(str, options) { - var obj = {}; - var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit); - - for (var i = 0; i < parts.length; ++i) { - var part = parts[i]; - var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1; - - if (pos === -1) { - obj[options.decoder(part)] = ''; - - if (options.strictNullHandling) { - obj[options.decoder(part)] = null; - } - } else { - var key = options.decoder(part.slice(0, pos)); - var val = options.decoder(part.slice(pos + 1)); - - if (Object.prototype.hasOwnProperty.call(obj, key)) { - obj[key] = [].concat(obj[key]).concat(val); - } else { - obj[key] = val; - } - } - } - - return obj; -}; - -var parseObject = function parseObject(chain, val, options) { - if (!chain.length) { - return val; - } - - var root = chain.shift(); - - var obj; - if (root === '[]') { - obj = []; - obj = obj.concat(parseObject(chain, val, options)); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root; - var index = parseInt(cleanRoot, 10); - if ( - !isNaN(index) && - root !== cleanRoot && - String(index) === cleanRoot && - index >= 0 && - (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = parseObject(chain, val, options); - } else { - obj[cleanRoot] = parseObject(chain, val, options); - } - } - - return obj; -}; - -var parseKeys = function parseKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var parent = /^([^\[\]]*)/; - var child = /(\[[^\[\]]*\])/g; - - // Get the parent - - var segment = parent.exec(key); - - // Stash the parent if it exists - - var keys = []; - if (segment[1]) { - // If we aren't using plain objects, optionally prefix keys - // that would overwrite object prototype properties - if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(segment[1]); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) { - if (!options.allowPrototypes) { - continue; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -module.exports = function (str, opts) { - var options = opts || {}; - - if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; - options.parseArrays = options.parseArrays !== false; - options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; - options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; - options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; - options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; - options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = Utils.merge(obj, newObj, options); - } - - return Utils.compact(obj); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js deleted file mode 100755 index 6e1c9a263cd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/stringify.js +++ /dev/null @@ -1,137 +0,0 @@ -'use strict'; - -var Utils = require('./utils'); - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var defaults = { - delimiter: '&', - strictNullHandling: false, - skipNulls: false, - encode: true, - encoder: Utils.encode -}; - -var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = obj.toISOString(); - } else if (obj === null) { - if (strictNullHandling) { - return encoder ? encoder(prefix) : prefix; - } - - obj = ''; - } - - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || Utils.isBuffer(obj)) { - if (encoder) { - return [encoder(prefix) + '=' + encoder(obj)]; - } - return [prefix + '=' + String(obj)]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (Array.isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (Array.isArray(obj)) { - values = values.concat(stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } else { - values = values.concat(stringify(obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - } - - return values; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = opts || {}; - var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; - var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; - var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; - var encoder = encode ? (typeof options.encoder === 'function' ? options.encoder : defaults.encoder) : null; - var sort = typeof options.sort === 'function' ? options.sort : null; - var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; - var objKeys; - var filter; - - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (Array.isArray(options.filter)) { - objKeys = filter = options.filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (options.arrayFormat in arrayPrefixGenerators) { - arrayFormat = options.arrayFormat; - } else if ('indices' in options) { - arrayFormat = options.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (sort) { - objKeys.sort(sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - keys = keys.concat(stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots)); - } - - return keys.join(delimiter); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js deleted file mode 100755 index 2c5c8ee5033..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/lib/utils.js +++ /dev/null @@ -1,164 +0,0 @@ -'use strict'; - -var hexTable = (function () { - var array = new Array(256); - for (var i = 0; i < 256; ++i) { - array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); - } - - return array; -}()); - -exports.arrayToObject = function (source, options) { - var obj = options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -exports.merge = function (target, source, options) { - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } else if (typeof target === 'object') { - target[source] = true; - } else { - return [target, source]; - } - - return target; - } - - if (typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = exports.arrayToObject(target, options); - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (Object.prototype.hasOwnProperty.call(acc, key)) { - acc[key] = exports.merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -exports.decode = function (str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - -exports.encode = function (str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = typeof str === 'string' ? str : String(str); - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D || // - - c === 0x2E || // . - c === 0x5F || // _ - c === 0x7E || // ~ - (c >= 0x30 && c <= 0x39) || // 0-9 - (c >= 0x41 && c <= 0x5A) || // a-z - (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -exports.compact = function (obj, references) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - var refs = references || []; - var lookup = refs.indexOf(obj); - if (lookup !== -1) { - return refs[lookup]; - } - - refs.push(obj); - - if (Array.isArray(obj)) { - var compacted = []; - - for (var i = 0; i < obj.length; ++i) { - if (obj[i] && typeof obj[i] === 'object') { - compacted.push(exports.compact(obj[i], refs)); - } else if (typeof obj[i] !== 'undefined') { - compacted.push(obj[i]); - } - } - - return compacted; - } - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - obj[key] = exports.compact(obj[key], refs); - } - - return obj; -}; - -exports.isRegExp = function (obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -exports.isBuffer = function (obj) { - if (obj === null || typeof obj === 'undefined') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json deleted file mode 100644 index b65e7e1d2fb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - "qs@~6.2.0", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "qs@>=6.2.0 <6.3.0", - "_id": "qs@6.2.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/qs", - "_nodeVersion": "6.1.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/qs-6.2.0.tgz_1462749349998_0.03372702235355973" - }, - "_npmUser": { - "email": "ljharb@gmail.com", - "name": "ljharb" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "name": "qs", - "raw": "qs@~6.2.0", - "rawSpec": "~6.2.0", - "scope": null, - "spec": ">=6.2.0 <6.3.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz", - "_shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b", - "_shrinkwrap": null, - "_spec": "qs@~6.2.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "bugs": { - "url": "https://github.com/ljharb/qs/issues" - }, - "contributors": [ - { - "email": "ljharb@gmail.com", - "name": "Jordan Harband", - "url": "http://ljharb.codes" - } - ], - "dependencies": {}, - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "devDependencies": { - "@ljharb/eslint-config": "^4.0.0", - "browserify": "^13.0.1", - "covert": "^1.1.0", - "eslint": "^2.9.0", - "evalmd": "^0.0.17", - "iconv-lite": "^0.4.13", - "mkdirp": "^0.5.1", - "parallelshell": "^2.0.0", - "tape": "^4.5.1" - }, - "directories": {}, - "dist": { - "shasum": "3b7848c03c2dece69a9522b0fae8c4126d745f3b", - "tarball": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz" - }, - "engines": { - "node": ">=0.6" - }, - "gitHead": "d67d315b606c6bb809fedcbeebbbdb7f863852aa", - "homepage": "https://github.com/ljharb/qs", - "keywords": [ - "qs", - "querystring" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "maintainers": [ - { - "email": "eran@hammer.io", - "name": "hueniverse" - }, - { - "email": "ljharb@gmail.com", - "name": "ljharb" - }, - { - "email": "quitlahok@gmail.com", - "name": "nlf" - } - ], - "name": "qs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/qs.git" - }, - "scripts": { - "coverage": "covert test", - "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", - "lint": "eslint lib/*.js text/*.js", - "prepublish": "npm run dist", - "pretest": "parallelshell 'npm run --silent readme' 'npm run --silent lint'", - "readme": "evalmd README.md", - "test": "npm run --silent coverage", - "tests-only": "node test" - }, - "version": "6.2.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js deleted file mode 100644 index b6a7d9526a9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -require('./parse'); - -require('./stringify'); - -require('./utils'); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js deleted file mode 100755 index 1b79daf534c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/parse.js +++ /dev/null @@ -1,423 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var iconv = require('iconv-lite'); - -test('parse()', function (t) { - t.test('parses a simple string', function (st) { - st.deepEqual(qs.parse('0=foo'), { '0': 'foo' }); - st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); - st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); - st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); - st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); - st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); - st.deepEqual(qs.parse('foo'), { foo: '' }); - st.deepEqual(qs.parse('foo='), { foo: '' }); - st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); - st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); - st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); - st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); - st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); - st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); - st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); - st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { - cht: 'p3', - chd: 't:60,40', - chs: '250x100', - chl: 'Hello|World' - }); - st.end(); - }); - - t.test('allows enabling dot notation', function (st) { - st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); - st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); - t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); - t.deepEqual( - qs.parse('a[b][c][d][e][f][g][h]=i'), - { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, - 'defaults to a depth of 5' - ); - - t.test('only parses one level when depth = 1', function (st) { - st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); - st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); - st.end(); - }); - - t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); - - t.test('parses an explicit array', function (st) { - st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); - st.end(); - }); - - t.test('parses a mix of simple and explicit arrays', function (st) { - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[1]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[1]=c'), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('parses a nested array', function (st) { - st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); - st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); - st.end(); - }); - - t.test('allows to specify array indices', function (st) { - st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); - st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); - st.end(); - }); - - t.test('limits specific array indices to 20', function (st) { - st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] }); - st.deepEqual(qs.parse('a[21]=a'), { a: { '21': 'a' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); - - t.test('supports encoded = signs', function (st) { - st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); - st.end(); - }); - - t.test('is ok with url encoded strings', function (st) { - st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); - st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); - st.end(); - }); - - t.test('allows brackets in the value', function (st) { - st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); - st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); - st.end(); - }); - - t.test('allows empty values', function (st) { - st.deepEqual(qs.parse(''), {}); - st.deepEqual(qs.parse(null), {}); - st.deepEqual(qs.parse(undefined), {}); - st.end(); - }); - - t.test('transforms arrays to objects', function (st) { - st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { '0': 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); - st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c'), { a: { '0': 'b', t: 'u', c: true } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y'), { a: { '0': 'b', '1': 'c', x: 'y' } }); - st.end(); - }); - - t.test('transforms arrays to objects (dot notation)', function (st) { - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); - st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); - st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { '0': 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', '0': 'bar', '1': 'foo' } }); - st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - st.end(); - }); - - t.deepEqual(qs.parse('a[b]=c&a=d'), { a: { b: 'c', d: true } }, 'can add keys to objects'); - - t.test('correctly prunes undefined values when converting an array to an object', function (st) { - st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { '2': 'b', '99999999': 'c' } }); - st.end(); - }); - - t.test('supports malformed uri characters', function (st) { - st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); - st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); - st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); - st.end(); - }); - - t.test('doesn\'t produce empty keys', function (st) { - st.deepEqual(qs.parse('_r=1&'), { '_r': '1' }); - st.end(); - }); - - t.test('cannot access Object prototype', function (st) { - qs.parse('constructor[prototype][bad]=bad'); - qs.parse('bad[constructor][prototype][bad]=bad'); - st.equal(typeof Object.prototype.bad, 'undefined'); - st.end(); - }); - - t.test('parses arrays of objects', function (st) { - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); - st.end(); - }); - - t.test('allows for empty strings in arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true }), { a: ['b', null, 'c', ''] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true }), { a: ['b', '', 'c', null] }); - st.deepEqual(qs.parse('a[]=&a[]=b&a[]=c'), { a: ['', 'b', 'c'] }); - st.end(); - }); - - t.test('compacts sparse arrays', function (st) { - st.deepEqual(qs.parse('a[10]=1&a[2]=2'), { a: ['2', '1'] }); - st.deepEqual(qs.parse('a[1][b][2][c]=1'), { a: [{ b: [{ c: '1' }] }] }); - st.deepEqual(qs.parse('a[1][2][3][c]=1'), { a: [[[{ c: '1' }]]] }); - st.deepEqual(qs.parse('a[1][2][3][c][1]=1'), { a: [[[{ c: ['1'] }]]] }); - st.end(); - }); - - t.test('parses semi-parsed strings', function (st) { - st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); - st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); - st.end(); - }); - - t.test('parses buffers correctly', function (st) { - var b = new Buffer('test'); - st.deepEqual(qs.parse({ a: b }), { a: b }); - st.end(); - }); - - t.test('continues parsing when no parent is found', function (st) { - st.deepEqual(qs.parse('[]=&a=b'), { '0': '', a: 'b' }); - st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { '0': null, a: 'b' }); - st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); - st.end(); - }); - - t.test('does not error when parsing a very long array', function (st) { - var str = 'a[]=a'; - while (Buffer.byteLength(str) < 128 * 1024) { - str = str + '&' + str; - } - - st.doesNotThrow(function () { qs.parse(str); }); - - st.end(); - }); - - t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) { - Object.prototype.crash = ''; - Array.prototype.crash = ''; - st.doesNotThrow(qs.parse.bind(null, 'a=b')); - st.deepEqual(qs.parse('a=b'), { a: 'b' }); - st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - delete Object.prototype.crash; - delete Array.prototype.crash; - st.end(); - }); - - t.test('parses a string with an alternative string delimiter', function (st) { - st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('parses a string with an alternative RegExp delimiter', function (st) { - st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not use non-splittable objects as delimiters', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding parameter limit', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); - st.end(); - }); - - t.test('allows setting the parameter limit to Infinity', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding array limit', function (st) { - st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { '0': 'b' } }); - st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { '0': 'b', '1': 'c' } }); - st.end(); - }); - - t.test('allows disabling array parsing', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { '0': 'b', '1': 'c' } }); - st.end(); - }); - - t.test('parses an object', function (st) { - var input = { - 'user[name]': { 'pop[bob]': 3 }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses an object in dot notation', function (st) { - var input = { - 'user.name': { 'pop[bob]': 3 }, - 'user.email.': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input, { allowDots: true }); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses an object and not child values', function (st) { - var input = { - 'user[name]': { 'pop[bob]': { 'test': 3 } }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': { 'test': 3 } }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('does not blow up when Buffer global is missing', function (st) { - var tempBuffer = global.Buffer; - delete global.Buffer; - var result = qs.parse('a=b&c=d'); - global.Buffer = tempBuffer; - st.deepEqual(result, { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not crash when parsing circular references', function (st) { - var a = {}; - a.b = a; - - var parsed; - - st.doesNotThrow(function () { - parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - st.equal('bar' in parsed.foo, true); - st.equal('baz' in parsed.foo, true); - st.equal(parsed.foo.bar, 'baz'); - st.deepEqual(parsed.foo.baz, a); - st.end(); - }); - - t.test('parses plain objects correctly', function (st) { - var a = Object.create(null); - a.b = 'c'; - - st.deepEqual(qs.parse(a), { b: 'c' }); - var result = qs.parse({ a: a }); - st.equal('a' in result, true, 'result has "a" property'); - st.deepEqual(result.a, a); - st.end(); - }); - - t.test('parses dates correctly', function (st) { - var now = new Date(); - st.deepEqual(qs.parse({ a: now }), { a: now }); - st.end(); - }); - - t.test('parses regular expressions correctly', function (st) { - var re = /^test$/; - st.deepEqual(qs.parse({ a: re }), { a: re }); - st.end(); - }); - - t.test('can allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }, { prototype: false }); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }, { prototype: false }); - st.end(); - }); - - t.test('can return plain objects', function (st) { - var expected = Object.create(null); - expected.a = Object.create(null); - expected.a.b = 'c'; - expected.a.hasOwnProperty = 'd'; - st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); - st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); - var expectedArray = Object.create(null); - expectedArray.a = Object.create(null); - expectedArray.a['0'] = 'b'; - expectedArray.a.c = 'd'; - st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); - st.end(); - }); - - t.test('can parse with custom encoding', function (st) { - st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { - decoder: function (str) { - var reg = /\%([0-9A-F]{2})/ig; - var result = []; - var parts; - var last = 0; - while (parts = reg.exec(str)) { - result.push(parseInt(parts[1], 16)); - last = parts.index + parts[0].length; - } - return iconv.decode(new Buffer(result), 'shift_jis').toString(); - } - }), { 県: '大阪府' }); - st.end(); - }); - - t.test('throws error with wrong decoder', function (st) { - st.throws(function () { - qs.parse({}, { - decoder: 'string' - }); - }, new TypeError('Decoder has to be a function.')); - st.end(); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js deleted file mode 100755 index 699397e3346..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/stringify.js +++ /dev/null @@ -1,305 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var iconv = require('iconv-lite'); - -test('stringify()', function (t) { - t.test('stringifies a querystring object', function (st) { - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: 1 }), 'a=1'); - st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); - st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); - st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); - st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); - st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); - st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); - st.end(); - }); - - t.test('stringifies a nested object', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies a nested object with dots notation', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); - st.end(); - }); - - t.test('stringifies an array value', function (st) { - st.equal(qs.stringify({ a: ['b', 'c', 'd'] }), 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d'); - st.end(); - }); - - t.test('omits nulls when asked', function (st) { - st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); - st.end(); - }); - - - t.test('omits nested nulls when asked', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('omits array indices when asked', function (st) { - st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); - st.end(); - }); - - t.test('stringifies a nested array value', function (st) { - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); - st.end(); - }); - - t.test('stringifies a nested array value with dots notation', function (st) { - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { allowDots: true, encode: false }), 'a.b[0]=c&a.b[1]=d'); - st.end(); - }); - - t.test('stringifies an object inside an array', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }), 'a%5B0%5D%5Bb%5D=c'); - st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }), 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1'); - st.end(); - }); - - t.test('stringifies an array with mixed objects and primitives', function (st) { - st.equal(qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), 'a[0][b]=1&a[1]=2&a[2]=3'); - st.end(); - }); - - t.test('stringifies an object inside an array with dots notation', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }, { allowDots: true, encode: false }), 'a[0].b=c'); - st.equal(qs.stringify({ a: [{ b: { c: [1] } }] }, { allowDots: true, encode: false }), 'a[0].b.c[0]=1'); - st.end(); - }); - - t.test('does not omit object keys when indices = false', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when indices=true', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); - st.end(); - }); - - t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); - st.end(); - }); - - t.test('stringifies a complicated object', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies an empty value', function (st) { - st.equal(qs.stringify({ a: '' }), 'a='); - st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); - - st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); - st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); - - st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); - - st.end(); - }); - - t.test('stringifies an empty object', function (st) { - var obj = Object.create(null); - obj.a = 'b'; - st.equal(qs.stringify(obj), 'a=b'); - st.end(); - }); - - t.test('returns an empty string for invalid input', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(''), ''); - st.end(); - }); - - t.test('stringifies an object with an empty object as a child', function (st) { - var obj = { - a: Object.create(null) - }; - - obj.a.b = 'c'; - st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('drops keys with a value of undefined', function (st) { - st.equal(qs.stringify({ a: undefined }), ''); - - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); - st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); - st.end(); - }); - - t.test('url encodes values', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.end(); - }); - - t.test('stringifies a date', function (st) { - var now = new Date(); - var str = 'a=' + encodeURIComponent(now.toISOString()); - st.equal(qs.stringify({ a: now }), str); - st.end(); - }); - - t.test('stringifies the weird object from qs', function (st) { - st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); - st.end(); - }); - - t.test('skips properties that are part of the object prototype', function (st) { - Object.prototype.crash = 'test'; - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - delete Object.prototype.crash; - st.end(); - }); - - t.test('stringifies boolean values', function (st) { - st.equal(qs.stringify({ a: true }), 'a=true'); - st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); - st.equal(qs.stringify({ b: false }), 'b=false'); - st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies buffer values', function (st) { - st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test'); - st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test'); - st.end(); - }); - - t.test('stringifies an object using an alternative delimiter', function (st) { - st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); - st.end(); - }); - - t.test('doesn\'t blow up when Buffer global is missing', function (st) { - var tempBuffer = global.Buffer; - delete global.Buffer; - var result = qs.stringify({ a: 'b', c: 'd' }); - global.Buffer = tempBuffer; - st.equal(result, 'a=b&c=d'); - st.end(); - }); - - t.test('selects properties when filter=array', function (st) { - st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); - st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); - st.equal(qs.stringify({ a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, { filter: ['a', 'b', 0, 2] }), 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3'); - st.end(); - }); - - t.test('supports custom representations when filter=function', function (st) { - var calls = 0; - var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; - var filterFunc = function (prefix, value) { - calls++; - if (calls === 1) { - st.equal(prefix, '', 'prefix is empty'); - st.equal(value, obj); - } else if (prefix === 'c') { - return; - } else if (value instanceof Date) { - st.equal(prefix, 'e[f]'); - return value.getTime(); - } - return value; - }; - - st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); - st.equal(calls, 5); - st.end(); - }); - - t.test('can disable uri encoding', function (st) { - st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); - st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); - st.end(); - }); - - t.test('can sort the keys', function (st) { - var sort = function (a, b) { return a.localeCompare(b); }; - st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); - st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); - st.end(); - }); - - t.test('can sort the keys at depth 3 or more too', function (st) { - var sort = function (a, b) { return a.localeCompare(b); }; - st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: sort, encode: false }), 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb'); - st.equal(qs.stringify({ a: 'a', z: { zj: {zjb: 'zjb', zja: 'zja'}, zi: {zib: 'zib', zia: 'zia'} }, b: 'b' }, { sort: null, encode: false }), 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b'); - st.end(); - }); - - t.test('can stringify with custom encoding', function (st) { - st.equal(qs.stringify({ 県: '大阪府', '': ''}, { - encoder: function (str) { - if (str.length === 0) { - return ''; - } - var buf = iconv.encode(str, 'shiftjis'); - var result = []; - for (var i=0; i < buf.length; ++i) { - result.push(buf.readUInt8(i).toString(16)); - } - return '%' + result.join('%'); - } - }), '%8c%a7=%91%e5%8d%e3%95%7b&='); - st.end(); - }); - - t.test('throws error with wrong encoder', function (st) { - st.throws(function () { - qs.stringify({}, { - encoder: 'string' - }); - }, new TypeError('Encoder has to be a function.')); - st.end(); - }); - - t.test('can use custom encoder for a buffer object', { - skip: typeof Buffer === 'undefined' - }, function (st) { - st.equal(qs.stringify({ a: new Buffer([1]) }, { - encoder: function (buffer) { - if (typeof buffer === 'string') { - return buffer; - } - return String.fromCharCode(buffer.readUInt8(0) + 97); - } - }), 'a=b'); - st.end(); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js deleted file mode 100755 index 4a8d8246c99..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/qs/test/utils.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var test = require('tape'); -var utils = require('../lib/utils'); - -test('merge()', function (t) { - t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore deleted file mode 100644 index 13abef4f588..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 deleted file mode 100644 index 6366c04716f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD deleted file mode 100644 index 96bb796aa5f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.BSD +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Dominic Tarr -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT deleted file mode 100644 index 6eafbd734a6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md deleted file mode 100644 index 65a5f0687cc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# rc - -The non-configurable configuration loader for lazy people. - -## Usage - -The only option is to pass rc the name of your app, and your default configuration. - -```javascript -var conf = require('rc')(appname, { - //defaults go here. - port: 2468, - - //defaults which are objects will be merged, not replaced - views: { - engine: 'jade' - } -}); -``` - -`rc` will return your configuration options merged with the defaults you specify. -If you pass in a predefined defaults object, it will be mutated: - -```javascript -var conf = {}; -require('rc')(appname, conf); -``` - -If `rc` finds any config files for your app, the returned config object will have -a `configs` array containing their paths: - -```javascript -var appCfg = require('rc')(appname, conf); -appCfg.configs[0] // /etc/appnamerc -appCfg.configs[1] // /home/dominictarr/.config/appname -appCfg.config // same as appCfg.configs[appCfg.configs.length - 1] -``` - -## Standards - -Given your application name (`appname`), rc will look in all the obvious places for configuration. - - * command line arguments (parsed by minimist) - * environment variables prefixed with `${appname}_` - * or use "\_\_" to indicate nested properties
_(e.g. `appname_foo__bar__baz` => `foo.bar.baz`)_ - * if you passed an option `--config file` then from that file - * a local `.${appname}rc` or the first found looking in `./ ../ ../../ ../../../` etc. - * `$HOME/.${appname}rc` - * `$HOME/.${appname}/config` - * `$HOME/.config/${appname}` - * `$HOME/.config/${appname}/config` - * `/etc/${appname}rc` - * `/etc/${appname}/config` - * the defaults object you passed in. - -All configuration sources that were found will be flattened into one object, -so that sources **earlier** in this list override later ones. - - -## Configuration File Formats - -Configuration files (e.g. `.appnamerc`) may be in either [json](http://json.org/example) or [ini](http://en.wikipedia.org/wiki/INI_file) format. The example configurations below are equivalent: - - -#### Formatted as `ini` - -``` -; You can include comments in `ini` format if you want. - -dependsOn=0.10.0 - - -; `rc` has built-in support for ini sections, see? - -[commands] - www = ./commands/www - console = ./commands/repl - - -; You can even do nested sections - -[generators.options] - engine = ejs - -[generators.modules] - new = generate-new - engine = generate-backend - -``` - -#### Formatted as `json` - -```javascript -{ - // You can even comment your JSON, if you want - "dependsOn": "0.10.0", - "commands": { - "www": "./commands/www", - "console": "./commands/repl" - }, - "generators": { - "options": { - "engine": "ejs" - }, - "modules": { - "new": "generate-new", - "backend": "generate-backend" - } - } -} -``` - -Comments are stripped from JSON config via [strip-json-comments](https://github.com/sindresorhus/strip-json-comments). - -> Since ini, and env variables do not have a standard for types, your application needs be prepared for strings. - - - -## Advanced Usage - -#### Pass in your own `argv` - -You may pass in your own `argv` as the third argument to `rc`. This is in case you want to [use your own command-line opts parser](https://github.com/dominictarr/rc/pull/12). - -```javascript -require('rc')(appname, defaults, customArgvParser); -``` - -## Pass in your own parser - -If you have a special need to use a non-standard parser, -you can do so by passing in the parser as the 4th argument. -(leave the 3rd as null to get the default args parser) - -```javascript -require('rc')(appname, defaults, null, parser); -``` - -This may also be used to force a more strict format, -such as strict, valid JSON only. - -## Note on Performance - -`rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler) - - -## License - -Multi-licensed under the two-clause BSD License, MIT License, or Apache License, version 2.0 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js deleted file mode 100644 index 8c230c5cd2d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/browser.js +++ /dev/null @@ -1,7 +0,0 @@ - -// when this is loaded into the browser, -// just use the defaults... - -module.exports = function (name, defaults) { - return defaults -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js deleted file mode 100755 index 6f8f1139d7f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/index.js +++ /dev/null @@ -1,60 +0,0 @@ -#! /usr/bin/env node -var cc = require('./lib/utils') -var join = require('path').join -var deepExtend = require('deep-extend') -var etc = '/etc' -var win = process.platform === "win32" -var home = win - ? process.env.USERPROFILE - : process.env.HOME - -module.exports = function (name, defaults, argv, parse) { - if('string' !== typeof name) - throw new Error('rc(name): name *must* be string') - if(!argv) - argv = require('minimist')(process.argv.slice(2)) - defaults = ( - 'string' === typeof defaults - ? cc.json(defaults) : defaults - ) || {} - - parse = parse || cc.parse - - var env = cc.env(name + '_') - - var configs = [defaults] - var configFiles = [] - function addConfigFile (file) { - if (configFiles.indexOf(file) >= 0) return - var fileConfig = cc.file(file) - if (fileConfig) { - configs.push(parse(fileConfig)) - configFiles.push(file) - } - } - - // which files do we look at? - if (!win) - [join(etc, name, 'config'), - join(etc, name + 'rc')].forEach(addConfigFile) - if (home) - [join(home, '.config', name, 'config'), - join(home, '.config', name), - join(home, '.' + name, 'config'), - join(home, '.' + name + 'rc')].forEach(addConfigFile) - addConfigFile(cc.find('.'+name+'rc')) - if (env.config) addConfigFile(env.config) - if (argv.config) addConfigFile(argv.config) - - return deepExtend.apply(null, configs.concat([ - env, - argv, - configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined, - ])) -} - -if(!module.parent) { - console.log( - JSON.stringify(module.exports(process.argv[2]), false, 2) - ) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js deleted file mode 100644 index ae6dec0ba70..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/lib/utils.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; -var fs = require('fs') -var ini = require('ini') -var path = require('path') -var stripJsonComments = require('strip-json-comments') - -var parse = exports.parse = function (content) { - - //if it ends in .json or starts with { then it must be json. - //must be done this way, because ini accepts everything. - //can't just try and parse it and let it throw if it's not ini. - //everything is ini. even json with a syntax error. - - if(/^\s*{/.test(content)) - return JSON.parse(stripJsonComments(content)) - return ini.parse(content) - -} - -var file = exports.file = function () { - var args = [].slice.call(arguments).filter(function (arg) { return arg != null }) - - //path.join breaks if it's a not a string, so just skip this. - for(var i in args) - if('string' !== typeof args[i]) - return - - var file = path.join.apply(null, args) - var content - try { - return fs.readFileSync(file,'utf-8') - } catch (err) { - return - } -} - -var json = exports.json = function () { - var content = file.apply(null, arguments) - return content ? parse(content) : null -} - -var env = exports.env = function (prefix, env) { - env = env || process.env - var obj = {} - var l = prefix.length - for(var k in env) { - if((k.indexOf(prefix)) === 0) { - - var keypath = k.substring(l).split('__') - - // Trim empty strings from keypath array - var _emptyStringIndex - while ((_emptyStringIndex=keypath.indexOf('')) > -1) { - keypath.splice(_emptyStringIndex, 1) - } - - var cursor = obj - keypath.forEach(function _buildSubObj(_subkey,i){ - - // (check for _subkey first so we ignore empty strings) - // (check for cursor to avoid assignment to primitive objects) - if (!_subkey || typeof cursor !== 'object') - return - - // If this is the last key, just stuff the value in there - // Assigns actual value from env variable to final key - // (unless it's just an empty string- in that case use the last valid key) - if (i === keypath.length-1) - cursor[_subkey] = env[k] - - - // Build sub-object if nothing already exists at the keypath - if (cursor[_subkey] === undefined) - cursor[_subkey] = {} - - // Increment cursor used to track the object at the current depth - cursor = cursor[_subkey] - - }) - - } - - } - - return obj -} - -var find = exports.find = function () { - var rel = path.join.apply(null, [].slice.call(arguments)) - - function find(start, rel) { - var file = path.join(start, rel) - try { - fs.statSync(file) - return file - } catch (err) { - if(path.dirname(start) !== start) // root - return find(path.dirname(start), rel) - } - } - return find(process.cwd(), rel) -} - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml deleted file mode 100644 index 74c57bf15e2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b441..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8ee8f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js deleted file mode 100644 index 6a0559d5813..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/index.js +++ /dev/null @@ -1,236 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - var key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, next, arg); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next, arg) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { - setArg(letters[j], next.split('=')[1], arg); - broken = true; - break; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, args[i+1], arg); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } - else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json deleted file mode 100644 index 8bfa6581655..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "minimist@^1.2.0", - "/Users/eshanker/Code/fsevents/node_modules/rc" - ] - ], - "_from": "minimist@>=1.2.0 <2.0.0", - "_id": "minimist@1.2.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/rc/minimist", - "_nodeVersion": "2.4.0", - "_npmUser": { - "email": "substack@gmail.com", - "name": "substack" - }, - "_npmVersion": "3.2.2", - "_phantomChildren": {}, - "_requested": { - "name": "minimist", - "raw": "minimist@^1.2.0", - "rawSpec": "^1.2.0", - "scope": null, - "spec": ">=1.2.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/rc" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "_shasum": "a35008b20f41383eec1fb914f4cd5df79a264284", - "_shrinkwrap": null, - "_spec": "minimist@^1.2.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/rc", - "author": { - "email": "mail@substack.net", - "name": "James Halliday", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "dependencies": {}, - "description": "parse argument options", - "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "directories": {}, - "dist": { - "shasum": "a35008b20f41383eec1fb914f4cd5df79a264284", - "tarball": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" - }, - "gitHead": "dc624482fcfec5bc669c68cdb861f00573ed4e64", - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "optimist", - "parser" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "mail@substack.net", - "name": "substack" - } - ], - "name": "minimist", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "test": "tap test/*.js" - }, - "testling": { - "browsers": [ - "chrome/10", - "chrome/latest", - "ff/5", - "firefox/latest", - "ie/6..latest", - "opera/12", - "safari/5.1", - "safari/latest" - ], - "files": "test/*.js" - }, - "version": "1.2.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown deleted file mode 100644 index 30a74cf8c15..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,91 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -``` -> require('./')('one two three -- four five --six'.split(' '), { '--': true }) -{ _: [ 'one', 'two', 'three' ], - '--': [ 'four', 'five', '--six' ] } -``` - -Note that with `opts['--']` set, parsing for arguments still stops after the -`--`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js deleted file mode 100644 index ac835483d9a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,32 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'] - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js deleted file mode 100644 index 14b0717cefd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,166 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias array with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var alt = [ '--harp', 'derp' ]; - var opts = { - alias: { 'h': ['herp', 'harp'] }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); - -test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, true); - t.end(); -}); - -test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true - }, - boolean: ['boool'] - }); - - t.same(parsed.boool, false); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js deleted file mode 100644 index 5a4fa5be418..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); - -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 780a311270f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); - -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js deleted file mode 100644 index d8b3e856ec7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,22 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', {default: {'a.b': 11}}); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js deleted file mode 100644 index f813b305057..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/kv_short.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-b=123' ]); - t.deepEqual(argv, { b: 123, _: [] }); -}); - -test('multi short -k=v' , function (t) { - t.plan(1); - - var argv = parse([ '-a=whatever', '-b=robots' ]); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09d3b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js deleted file mode 100644 index 2cc77f4d62f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/num.js +++ /dev/null @@ -1,36 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse([ '-x', 1234, 789 ]); - t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js deleted file mode 100644 index 7b4a2a17c0d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,197 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('string and alias', function(t) { - var x = parse([ '--str', '000123' ], { - string: 's', - alias: { s: 'str' } - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse([ '-s', '000123' ], { - string: 'str', - alias: { str: 's' } - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index ab620dc5e4d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2529..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js deleted file mode 100644 index bdf9fbcb0b5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,15 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'] - }); - - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js deleted file mode 100644 index 462a36bdd7e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,102 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'true', '--derp', 'true' ]; - var regular = [ '--herp', 'true', '-d', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [] - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; - var regular = [ '--herp', 'hello', '-d', 'moon' ]; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '-h', 'hello' ]; - var regular = [ '--herp', 'hello' ]; - var opts = { - default: { 'h': 'bar' }, - alias: { 'h': 'herp' }, - unknown: unknownFn - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = [ '--bad', '--', 'good', 'arg' ]; - var opts = { - '--': true, - unknown: unknownFn - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - '_': [] - }) - t.end(); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58cecf..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json deleted file mode 100644 index 9ce00b0d56d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_args": [ - [ - "rc@~1.1.0", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "rc@>=1.1.0 <1.2.0", - "_id": "rc@1.1.6", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/rc", - "_nodeVersion": "4.2.3", - "_npmUser": { - "email": "dominic.tarr@gmail.com", - "name": "dominictarr" - }, - "_npmVersion": "3.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "rc", - "raw": "rc@~1.1.0", - "rawSpec": "~1.1.0", - "scope": null, - "spec": ">=1.1.0 <1.2.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/node-pre-gyp" - ], - "_resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", - "_shasum": "43651b76b6ae53b5c802f1151fa3fc3b059969c9", - "_shrinkwrap": null, - "_spec": "rc@~1.1.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "author": { - "email": "dominic.tarr@gmail.com", - "name": "Dominic Tarr", - "url": "dominictarr.com" - }, - "bin": { - "rc": "./index.js" - }, - "browserify": "browser.js", - "bugs": { - "url": "https://github.com/dominictarr/rc/issues" - }, - "dependencies": { - "deep-extend": "~0.4.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~1.0.4" - }, - "description": "hardwired configuration loader", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "43651b76b6ae53b5c802f1151fa3fc3b059969c9", - "tarball": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz" - }, - "gitHead": "132062de0e61881a025cc4784d9a2798409c2bf1", - "homepage": "https://github.com/dominictarr/rc#readme", - "keywords": [ - "config", - "defaults", - "rc", - "unix" - ], - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "main": "index.js", - "maintainers": [ - { - "email": "dominic.tarr@gmail.com", - "name": "dominictarr" - } - ], - "name": "rc", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/dominictarr/rc.git" - }, - "scripts": { - "test": "set -e; node test/test.js; node test/ini.js; node test/nested-env-vars.js" - }, - "version": "1.1.6" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js deleted file mode 100644 index e6857f8b382..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/ini.js +++ /dev/null @@ -1,16 +0,0 @@ -var cc =require('../lib/utils') -var INI = require('ini') -var assert = require('assert') - -function test(obj) { - - var _json, _ini - var json = cc.parse (_json = JSON.stringify(obj)) - var ini = cc.parse (_ini = INI.stringify(obj)) - console.log(_ini, _json) - assert.deepEqual(json, ini) -} - - -test({hello: true}) - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js deleted file mode 100644 index f576fb153b9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/nested-env-vars.js +++ /dev/null @@ -1,40 +0,0 @@ - -var n = 'rc'+Math.random() -var assert = require('assert') - - -// Basic usage -process.env[n+'_someOpt__a'] = 42 -process.env[n+'_someOpt__x__'] = 99 -process.env[n+'_someOpt__a__b'] = 186 -process.env[n+'_someOpt__a__b__c'] = 243 -process.env[n+'_someOpt__x__y'] = 1862 -process.env[n+'_someOpt__z'] = 186577 - -// Should ignore empty strings from orphaned '__' -process.env[n+'_someOpt__z__x__'] = 18629 -process.env[n+'_someOpt__w__w__'] = 18629 - -// Leading '__' should ignore everything up to 'z' -process.env[n+'___z__i__'] = 9999 - -var config = require('../')(n, { - option: true -}) - -console.log('\n\n------ nested-env-vars ------\n',config) - -assert.equal(config.option, true) -assert.equal(config.someOpt.a, 42) -assert.equal(config.someOpt.x, 99) -// Should not override `a` once it's been set -assert.equal(config.someOpt.a/*.b*/, 42) -// Should not override `x` once it's been set -assert.equal(config.someOpt.x/*.y*/, 99) -assert.equal(config.someOpt.z, 186577) -// Should not override `z` once it's been set -assert.equal(config.someOpt.z/*.x*/, 186577) -assert.equal(config.someOpt.w.w, 18629) -assert.equal(config.z.i, 9999) - - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js deleted file mode 100644 index 4f6335189b6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rc/test/test.js +++ /dev/null @@ -1,59 +0,0 @@ - -var n = 'rc'+Math.random() -var assert = require('assert') - -process.env[n+'_envOption'] = 42 - -var config = require('../')(n, { - option: true -}) - -console.log(config) - -assert.equal(config.option, true) -assert.equal(config.envOption, 42) - -var customArgv = require('../')(n, { - option: true -}, { // nopt-like argv - option: false, - envOption: 24, - argv: { - remain: [], - cooked: ['--no-option', '--envOption', '24'], - original: ['--no-option', '--envOption=24'] - } -}) - -console.log(customArgv) - -assert.equal(customArgv.option, false) -assert.equal(customArgv.envOption, 24) - -var fs = require('fs') -var path = require('path') -var jsonrc = path.resolve('.' + n + 'rc'); - -fs.writeFileSync(jsonrc, [ - '{', - '// json overrides default', - '"option": false,', - '/* env overrides json */', - '"envOption": 24', - '}' -].join('\n')); - -var commentedJSON = require('../')(n, { - option: true -}) - -fs.unlinkSync(jsonrc); - -console.log(commentedJSON) - -assert.equal(commentedJSON.option, false) -assert.equal(commentedJSON.envOption, 42) - -assert.equal(commentedJSON.config, jsonrc) -assert.equal(commentedJSON.configs.length, 1) -assert.equal(commentedJSON.configs[0], jsonrc) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore deleted file mode 100644 index 265ff739e07..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js -.zuul.yml -.nyc_output -coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml deleted file mode 100644 index ae0156a9bbb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,54 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - npm install -g npm -notifications: - email: false -matrix: - fast_finish: true - allow_failures: - - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - include: - - node_js: '0.8' - env: TASK=test - - node_js: '0.10' - env: TASK=test - - node_js: '0.11' - env: TASK=test - - node_js: '0.12' - env: TASK=test - - node_js: 1 - env: TASK=test - - node_js: 2 - env: TASK=test - - node_js: 3 - env: TASK=test - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 5 - env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695a4c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md deleted file mode 100644 index 2233732a9ba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# readable-stream - -***Node-core v6.1.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core, including [documentation](doc/stream.md). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams WG Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md deleted file mode 100644 index c907ca0e7b7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/stream.md +++ /dev/null @@ -1,1772 +0,0 @@ -# Stream - - Stability: 2 - Stable - -A stream is an abstract interface implemented by various objects in -Node.js. For example a [request to an HTTP server][http-incoming-message] is a -stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All -streams are instances of [`EventEmitter`][]. - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for [Readable][] streams, [Writable][] -streams, [Duplex][] streams, and [Transform][] streams. - -This document is split up into 3 sections: - -1. The first section explains the parts of the API that you need to be - aware of to use streams in your programs. -2. The second section explains the parts of the API that you need to - use if you implement your own custom streams yourself. The API is designed to - make this easy for you to do. -3. The third section goes into more depth about how streams work, - including some of the internal mechanisms and functions that you - should probably not modify unless you definitely know what you are - doing. - - -## API for Stream Consumers - - - -Streams can be either [Readable][], [Writable][], or both ([Duplex][]). - -All streams are EventEmitters, but they also have other custom methods -and properties depending on whether they are Readable, Writable, or -Duplex. - -If a stream is both Readable and Writable, then it implements all of -the methods and events. So, a [Duplex][] or [Transform][] stream is -fully described by this API, though their implementation may be -somewhat different. - -It is not necessary to implement Stream interfaces in order to consume -streams in your programs. If you **are** implementing streaming -interfaces in your own program, please also refer to -[API for Stream Implementors][]. - -Almost all Node.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an Node.js program: - -```js -const http = require('http'); - -var server = http.createServer( (req, res) => { - // req is an http.IncomingMessage, which is a Readable Stream - // res is an http.ServerResponse, which is a Writable Stream - - var body = ''; - // we want to get the data as utf8 strings - // If you don't set an encoding, then you'll get Buffer objects - req.setEncoding('utf8'); - - // Readable streams emit 'data' events once a listener is added - req.on('data', (chunk) => { - body += chunk; - }); - - // the end event tells you that you have entire body - req.on('end', () => { - try { - var data = JSON.parse(body); - } catch (er) { - // uh oh! bad json! - res.statusCode = 400; - return res.end(`error: ${er.message}`); - } - - // write back something interesting to the user: - res.write(typeof data); - res.end(); - }); -}); - -server.listen(1337); - -// $ curl localhost:1337 -d '{}' -// object -// $ curl localhost:1337 -d '"foo"' -// string -// $ curl localhost:1337 -d 'not json' -// error: Unexpected token o -``` - -### Class: stream.Duplex - -Duplex streams are streams that implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Duplex streams include: - -* [TCP sockets][] -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Readable - - - -The Readable stream interface is the abstraction for a *source* of -data that you are reading from. In other words, data comes *out* of a -Readable stream. - -A Readable stream will not start emitting data until you indicate that -you are ready to receive it. - -Readable streams have two "modes": a **flowing mode** and a **paused -mode**. When in flowing mode, data is read from the underlying system -and provided to your program as fast as possible. In paused mode, you -must explicitly call [`stream.read()`][stream-read] to get chunks of data out. -Streams start out in paused mode. - -**Note**: If no data event handlers are attached, and there are no -[`stream.pipe()`][] destinations, and the stream is switched into flowing -mode, then data will be lost. - -You can switch to flowing mode by doing any of the following: - -* Adding a [`'data'`][] event handler to listen for data. -* Calling the [`stream.resume()`][stream-resume] method to explicitly open the - flow. -* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. - -You can switch back to paused mode by doing either of the following: - -* If there are no pipe destinations, by calling the - [`stream.pause()`][stream-pause] method. -* If there are pipe destinations, by removing any [`'data'`][] event - handlers, and removing all pipe destinations by calling the - [`stream.unpipe()`][] method. - -Note that, for backwards compatibility reasons, removing [`'data'`][] -event handlers will **not** automatically pause the stream. Also, if -there are piped destinations, then calling [`stream.pause()`][stream-pause] will -not guarantee that the stream will *remain* paused once those -destinations drain and ask for more data. - -Examples of readable streams include: - -* [HTTP responses, on the client][http-incoming-message] -* [HTTP requests, on the server][http-incoming-message] -* [fs read streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdout and stderr][] -* [`process.stdin`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed. The event indicates that -no more events will be emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event as the `'close'` event is -optional. - -#### Event: 'data' - -* `chunk` {Buffer|String} The chunk of data. - -Attaching a `'data'` event listener to a stream that has not been -explicitly paused will switch the stream into flowing mode. Data will -then be passed as soon as it is available. - -If you just want to get all the data out of the stream as fast as -possible, this is the best way to do so. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -``` - -#### Event: 'end' - -This event fires when there will be no more data to read. - -Note that the `'end'` event **will not fire** unless the data is -completely consumed. This can be done by switching into flowing mode, -or by calling [`stream.read()`][stream-read] repeatedly until you get to the -end. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -readable.on('end', () => { - console.log('there will be no more data.'); -}); -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error receiving data. - -#### Event: 'readable' - -When a chunk of data can be read from the stream, it will emit a -`'readable'` event. - -In some cases, listening for a `'readable'` event will cause some data -to be read into the internal buffer from the underlying system, if it -hadn't already. - -```javascript -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - // there is some data to read now -}); -``` - -Once the internal buffer is drained, a `'readable'` event will fire -again when more data is available. - -The `'readable'` event is not emitted in the "flowing" mode with the -sole exception of the last one, on end-of-stream. - -The `'readable'` event indicates that the stream has new information: -either new data is available or the end of the stream has been reached. -In the former case, [`stream.read()`][stream-read] will return that data. In the -latter case, [`stream.read()`][stream-read] will return null. For instance, in -the following example, `foo.txt` is an empty file: - -```js -const fs = require('fs'); -var rr = fs.createReadStream('foo.txt'); -rr.on('readable', () => { - console.log('readable:', rr.read()); -}); -rr.on('end', () => { - console.log('end'); -}); -``` - -The output of running this script is: - -``` -$ node test.js -readable: null -end -``` - -#### readable.isPaused() - -* Return: {Boolean} - -This method returns whether or not the `readable` has been **explicitly** -paused by client code (using [`stream.pause()`][stream-pause] without a -corresponding [`stream.resume()`][stream-resume]). - -```js -var readable = new stream.Readable - -readable.isPaused() // === false -readable.pause() -readable.isPaused() // === true -readable.resume() -readable.isPaused() // === false -``` - -#### readable.pause() - -* Return: `this` - -This method will cause a stream in flowing mode to stop emitting -[`'data'`][] events, switching out of flowing mode. Any data that becomes -available will remain in the internal buffer. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); - readable.pause(); - console.log('there will be no more data for 1 second'); - setTimeout(() => { - console.log('now data will start flowing again'); - readable.resume(); - }, 1000); -}); -``` - -#### readable.pipe(destination[, options]) - -* `destination` {stream.Writable} The destination for writing data -* `options` {Object} Pipe options - * `end` {Boolean} End the writer when the reader ends. Default = `true` - -This method pulls all the data out of a readable stream, and writes it -to the supplied destination, automatically managing the flow so that -the destination is not overwhelmed by a fast readable stream. - -Multiple destinations can be piped to safely. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt' -readable.pipe(writable); -``` - -This function returns the destination stream, so you can set up pipe -chains like so: - -```js -var r = fs.createReadStream('file.txt'); -var z = zlib.createGzip(); -var w = fs.createWriteStream('file.txt.gz'); -r.pipe(z).pipe(w); -``` - -For example, emulating the Unix `cat` command: - -```js -process.stdin.pipe(process.stdout); -``` - -By default [`stream.end()`][stream-end] is called on the destination when the -source stream emits [`'end'`][], so that `destination` is no longer writable. -Pass `{ end: false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - -```js -reader.pipe(writer, { end: false }); -reader.on('end', () => { - writer.end('Goodbye\n'); -}); -``` - -Note that [`process.stderr`][] and [`process.stdout`][] are never closed until -the process exits, regardless of the specified options. - -#### readable.read([size]) - -* `size` {Number} Optional argument to specify how much data to read. -* Return {String|Buffer|Null} - -The `read()` method pulls some data out of the internal buffer and -returns it. If there is no data available, then it will return -`null`. - -If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`, -unless we've ended, in which case it will return the data remaining -in the buffer. - -If you do not specify a `size` argument, then it will return all the -data in the internal buffer. - -This method should only be called in paused mode. In flowing mode, -this method is called automatically until the internal buffer is -drained. - -```js -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - var chunk; - while (null !== (chunk = readable.read())) { - console.log('got %d bytes of data', chunk.length); - } -}); -``` - -If this method returns a data chunk, then it will also trigger the -emission of a [`'data'`][] event. - -Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] -event has been triggered will return `null`. No runtime error will be raised. - -#### readable.resume() - -* Return: `this` - -This method will cause the readable stream to resume emitting [`'data'`][] -events. - -This method will switch the stream into flowing mode. If you do *not* -want to consume the data from a stream, but you *do* want to get to -its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open -the flow of data. - -```js -var readable = getReadableStreamSomehow(); -readable.resume(); -readable.on('end', () => { - console.log('got to the end, but did not read anything'); -}); -``` - -#### readable.setEncoding(encoding) - -* `encoding` {String} The encoding to use. -* Return: `this` - -Call this function to cause the stream to return strings of the specified -encoding instead of Buffer objects. For example, if you do -`readable.setEncoding('utf8')`, then the output data will be interpreted as -UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, -then the data will be encoded in hexadecimal string format. - -This properly handles multi-byte characters that would otherwise be -potentially mangled if you simply pulled the Buffers directly and -called [`buf.toString(encoding)`][] on them. If you want to read the data -as strings, always use this method. - -Also you can disable any encoding at all with `readable.setEncoding(null)`. -This approach is very useful if you deal with binary data or with large -multi-byte strings spread out over multiple chunks. - -```js -var readable = getReadableStreamSomehow(); -readable.setEncoding('utf8'); -readable.on('data', (chunk) => { - assert.equal(typeof chunk, 'string'); - console.log('got %d characters of string data', chunk.length); -}); -``` - -#### readable.unpipe([destination]) - -* `destination` {stream.Writable} Optional specific stream to unpipe - -This method will remove the hooks set up for a previous [`stream.pipe()`][] -call. - -If the destination is not specified, then all pipes are removed. - -If the destination is specified, but no pipe is set up for it, then -this is a no-op. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt', -// but only for the first second -readable.pipe(writable); -setTimeout(() => { - console.log('stop writing to file.txt'); - readable.unpipe(writable); - console.log('manually close the file stream'); - writable.end(); -}, 1000); -``` - -#### readable.unshift(chunk) - -* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue - -This is useful in certain cases where a stream is being consumed by a -parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source, so that the stream can be -passed on to some other party. - -Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event -has been triggered; a runtime error will be raised. - -If you find that you must often call `stream.unshift(chunk)` in your -programs, consider implementing a [Transform][] stream instead. (See [API -for Stream Implementors][].) - -```js -// Pull off a header delimited by \n\n -// use unshift() if we get too much -// Call the callback with (error, header, stream) -const StringDecoder = require('string_decoder').StringDecoder; -function parseHeader(stream, callback) { - stream.on('error', callback); - stream.on('readable', onReadable); - var decoder = new StringDecoder('utf8'); - var header = ''; - function onReadable() { - var chunk; - while (null !== (chunk = stream.read())) { - var str = decoder.write(chunk); - if (str.match(/\n\n/)) { - // found the header boundary - var split = str.split(/\n\n/); - header += split.shift(); - var remaining = split.join('\n\n'); - var buf = Buffer.from(remaining, 'utf8'); - if (buf.length) - stream.unshift(buf); - stream.removeListener('error', callback); - stream.removeListener('readable', onReadable); - // now the body of the message can be read from the stream. - callback(null, header, stream); - } else { - // still reading the header. - header += str; - } - } - } -} -``` - -Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` -will not end the reading process by resetting the internal reading state of the -stream. This can cause unexpected results if `unshift()` is called during a -read (i.e. from within a [`stream._read()`][stream-_read] implementation on a -custom stream). Following the call to `unshift()` with an immediate -[`stream.push('')`][stream-push] will reset the reading state appropriately, -however it is best to simply avoid calling `unshift()` while in the process of -performing a read. - -#### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -Versions of Node.js prior to v0.10 had streams that did not implement the -entire Streams API as it is today. (See [Compatibility][] for -more information.) - -If you are using an older Node.js library that emits [`'data'`][] events and -has a [`stream.pause()`][stream-pause] method that is advisory only, then you -can use the `wrap()` method to create a [Readable][] stream that uses the old -stream as its data source. - -You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old Node.js programs and libraries. - -For example: - -```js -const OldReader = require('./old-api-module.js').OldReader; -const Readable = require('stream').Readable; -const oreader = new OldReader; -const myReader = new Readable().wrap(oreader); - -myReader.on('readable', () => { - myReader.read(); // etc. -}); -``` - -### Class: stream.Transform - -Transform streams are [Duplex][] streams where the output is in some way -computed from the input. They implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Transform streams include: - -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Writable - - - -The Writable stream interface is an abstraction for a *destination* -that you are writing data *to*. - -Examples of writable streams include: - -* [HTTP requests, on the client][] -* [HTTP responses, on the server][] -* [fs write streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdin][] -* [`process.stdout`][], [`process.stderr`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file descriptor, -for example) have been closed. The event indicates that no more events will be -emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event as the `'close'` event is -optional. - -#### Event: 'drain' - -If a [`stream.write(chunk)`][stream-write] call returns `false`, then the -`'drain'` event will indicate when it is appropriate to begin writing more data -to the stream. - -```js -// Write the data to the supplied writable stream one million times. -// Be attentive to back-pressure. -function writeOneMillionTimes(writer, data, encoding, callback) { - var i = 1000000; - write(); - function write() { - var ok = true; - do { - i -= 1; - if (i === 0) { - // last time! - writer.write(data, encoding, callback); - } else { - // see if we should continue, or wait - // don't pass the callback, because we're not done yet. - ok = writer.write(data, encoding); - } - } while (i > 0 && ok); - if (i > 0) { - // had to stop early! - // write some more once it drains - writer.once('drain', write); - } - } -} -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error when writing or piping data. - -#### Event: 'finish' - -When the [`stream.end()`][stream-end] method has been called, and all data has -been flushed to the underlying system, this event is emitted. - -```javascript -var writer = getWritableStreamSomehow(); -for (var i = 0; i < 100; i ++) { - writer.write('hello, #${i}!\n'); -} -writer.end('this is the end\n'); -writer.on('finish', () => { - console.error('all writes are now complete.'); -}); -``` - -#### Event: 'pipe' - -* `src` {stream.Readable} source stream that is piping to this writable - -This is emitted whenever the [`stream.pipe()`][] method is called on a readable -stream, adding this writable to its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('pipe', (src) => { - console.error('something is piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -``` - -#### Event: 'unpipe' - -* `src` {[Readable][] Stream} The source stream that - [unpiped][`stream.unpipe()`] this writable - -This is emitted whenever the [`stream.unpipe()`][] method is called on a -readable stream, removing this writable from its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('unpipe', (src) => { - console.error('something has stopped piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -reader.unpipe(writer); -``` - -#### writable.cork() - -Forces buffering of all writes. - -Buffered data will be flushed either at [`stream.uncork()`][] or at -[`stream.end()`][stream-end] call. - -#### writable.end([chunk][, encoding][, callback]) - -* `chunk` {String|Buffer} Optional data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Optional callback for when the stream is finished - -Call this method when no more data will be written to the stream. If supplied, -the callback is attached as a listener on the [`'finish'`][] event. - -Calling [`stream.write()`][stream-write] after calling -[`stream.end()`][stream-end] will raise an error. - -```js -// write 'hello, ' and then end with 'world!' -var file = fs.createWriteStream('example.txt'); -file.write('hello, '); -file.end('world!'); -// writing more now is not allowed! -``` - -#### writable.setDefaultEncoding(encoding) - -* `encoding` {String} The new default encoding -* Return: `this` - -Sets the default encoding for a writable stream. - -#### writable.uncork() - -Flush all data, buffered since [`stream.cork()`][] call. - -#### writable.write(chunk[, encoding][, callback]) - -* `chunk` {String|Buffer} The data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} `true` if the data was handled completely. - -This method writes some data to the underlying system, and calls the -supplied callback once the data has been fully handled. If an error -occurs, the callback may or may not be called with the error as its -first argument. To detect write errors, listen for the `'error'` event. - -The return value indicates if you should continue writing right now. -If the data had to be buffered internally, then it will return -`false`. Otherwise, it will return `true`. - -This return value is strictly advisory. You MAY continue to write, -even if it returns `false`. However, writes will be buffered in -memory, so it is best not to do this excessively. Instead, wait for -the [`'drain'`][] event before writing more data. - - -## API for Stream Implementors - - - -To implement any sort of stream, the pattern is the same: - -1. Extend the appropriate parent class in your own subclass. (The - [`util.inherits()`][] method is particularly helpful for this.) -2. Call the appropriate parent class constructor in your constructor, - to be sure that the internal mechanisms are set up properly. -3. Implement one or more specific methods, as detailed below. - -The class to extend and the method(s) to implement depend on the sort -of stream class you are writing: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Use-case

-
-

Class

-
-

Method(s) to implement

-
-

Reading only

-
-

[Readable](#stream_class_stream_readable_1)

-
-

[_read][stream-_read]

-
-

Writing only

-
-

[Writable](#stream_class_stream_writable_1)

-
-

[_write][stream-_write], [_writev][stream-_writev]

-
-

Reading and writing

-
-

[Duplex](#stream_class_stream_duplex_1)

-
-

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

-
-

Operate on written data, then read the result

-
-

[Transform](#stream_class_stream_transform_1)

-
-

[_transform][stream-_transform], [_flush][stream-_flush]

-
- -In your implementation code, it is very important to never call the methods -described in [API for Stream Consumers][]. Otherwise, you can potentially cause -adverse side effects in programs that consume your streaming interfaces. - -### Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a TCP -socket connection. - -Note that `stream.Duplex` is an abstract class designed to be extended -with an underlying implementation of the [`stream._read(size)`][stream-_read] -and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you -would with a Readable or Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this class -prototypally inherits from Readable, and then parasitically from Writable. It is -thus up to the user to implement both the low-level -[`stream._read(n)`][stream-_read] method as well as the low-level -[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension -duplex classes. - -#### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for readable side of the stream. Has no effect if `objectMode` - is `true`. - * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for writable side of the stream. Has no effect if `objectMode` - is `true`. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### Class: stream.PassThrough - -This is a trivial implementation of a [Transform][] stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy as a building block for novel sorts of streams. - -### Class: stream.Readable - - - -`stream.Readable` is an abstract class designed to be extended with an -underlying implementation of the [`stream._read(size)`][stream-_read] method. - -Please see [API for Stream Consumers][] for how to consume -streams in your programs. What follows is an explanation of how to -implement Readable streams in your programs. - -#### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default = `16384` (16kb), or `16` for `objectMode` streams - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default = `null` - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns - a single value instead of a Buffer of size n. Default = `false` - * `read` {Function} Implementation for the [`stream._read()`][stream-_read] - method. - -In classes that extend the Readable class, make sure to call the -Readable constructor so that the buffering settings can be properly -initialized. - -#### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **Implement this method, but do NOT call it directly.** - -This method is prefixed with an underscore because it is internal to the -class that defines it and should only be called by the internal Readable -class methods. All Readable stream implementations must provide a \_read -method to fetch data from the underlying resource. - -When `_read()` is called, if data is available from the resource, the `_read()` -implementation should start pushing that data into the read queue by calling -[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from -the resource and pushing data until push returns `false`, at which point it -should stop reading from the resource. Only when `_read()` is called again after -it has stopped should it start reading more data from the resource and pushing -that data onto the queue. - -Note: once the `_read()` method is called, it will not be called again until -the [`stream.push()`][stream-push] method is called. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. - -#### readable.push(chunk[, encoding]) - - -* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue -* `encoding` {String} Encoding of String chunks. Must be a valid - Buffer encoding, such as `'utf8'` or `'ascii'` -* return {Boolean} Whether or not more pushes should be performed - -Note: **This method should be called by Readable implementors, NOT -by consumers of Readable streams.** - -If a value other than null is passed, The `push()` method adds a chunk of data -into the queue for subsequent stream processors to consume. If `null` is -passed, it signals the end of the stream (EOF), after which no more data -can be written. - -The data added with `push()` can be pulled out by calling the -[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. - -This API is designed to be as flexible as possible. For example, -you may be wrapping a lower-level source which has some sort of -pause/resume mechanism, and a data callback. In those cases, you -could wrap the low-level source object by doing something like this: - -```js -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -util.inherits(SourceWrapper, Readable); - -function SourceWrapper(options) { - Readable.call(this, options); - - this._source = getLowlevelSourceObject(); - - // Every time there's data, we push it into the internal buffer. - this._source.ondata = (chunk) => { - // if push() returns false, then we need to stop reading from source - if (!this.push(chunk)) - this._source.readStop(); - }; - - // When the source ends, we push the EOF-signaling `null` chunk - this._source.onend = () => { - this.push(null); - }; -} - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -SourceWrapper.prototype._read = function(size) { - this._source.readStart(); -}; -``` - -#### Example: A Counting Stream - - - -This is a basic example of a Readable stream. It emits the numerals -from 1 to 1,000,000 in ascending order, and then ends. - -```js -const Readable = require('stream').Readable; -const util = require('util'); -util.inherits(Counter, Readable); - -function Counter(opt) { - Readable.call(this, opt); - this._max = 1000000; - this._index = 1; -} - -Counter.prototype._read = function() { - var i = this._index++; - if (i > this._max) - this.push(null); - else { - var str = '' + i; - var buf = Buffer.from(str, 'ascii'); - this.push(buf); - } -}; -``` - -#### Example: SimpleProtocol v1 (Sub-optimal) - -This is similar to the `parseHeader` function described -[here](#stream_readable_unshift_chunk), but implemented as a custom stream. -Also, note that this implementation does not convert the incoming data to a -string. - -However, this would be better implemented as a [Transform][] stream. See -[SimpleProtocol v2][] for a better implementation. - -```js -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// NOTE: This can be done more simply as a Transform stream! -// Using Readable directly for this is sub-optimal. See the -// alternative example below under the Transform section. - -const Readable = require('stream').Readable; -const util = require('util'); - -util.inherits(SimpleProtocol, Readable); - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(source, options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - source.on('end', () => { - this.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', () => { - this.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - // calling unshift by itself does not reset the reading state - // of the stream; since we're inside _read, doing an additional - // push('') will reset the state appropriately. - this.push(''); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -// var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a [zlib][] stream or a -[crypto][] stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will produce output -that is either much smaller or much larger than its input. - -Rather than implement the [`stream._read()`][stream-_read] and -[`stream._write()`][stream-_write] methods, Transform classes must implement the -[`stream._transform()`][stream-_transform] method, and may optionally -also implement the [`stream._flush()`][stream-_flush] method. (See below.) - -#### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `transform` {Function} Implementation for the - [`stream._transform()`][stream-_transform] method. - * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] - method. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### Events: 'finish' and 'end' - -The [`'finish'`][] and [`'end'`][] events are from the parent Writable -and Readable classes respectively. The `'finish'` event is fired after -[`stream.end()`][stream-end] is called and all chunks have been processed by -[`stream._transform()`][stream-_transform], `'end'` is fired after all data has -been output which is after the callback in [`stream._flush()`][stream-_flush] -has been called. - -#### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush()` method, which will be -called at the very end, after all the written data is consumed, but -before emitting [`'end'`][] to signal the end of the readable side. Just -like with [`stream._transform()`][stream-_transform], call -`transform.push(chunk)` zero or more times, as appropriate, and call `callback` -when the flush operation is complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument and data) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform()` -method to accept input and produce output. - -`_transform()` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. If you supply a second argument to the callback -it will be passed to the push method. In other words the following are -equivalent: - -```js -transform.prototype._transform = function (data, encoding, callback) { - this.push(data); - callback(); -}; - -transform.prototype._transform = function (data, encoding, callback) { - callback(null, data); -}; -``` - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### Example: `SimpleProtocol` parser v2 - -The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple -protocol parser can be implemented simply by using the higher level -[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol -v1` examples. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node.js stream -approach. - -```javascript -const util = require('util'); -const Transform = require('stream').Transform; -util.inherits(SimpleProtocol, Transform); - -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(chunk.slice(split)); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(chunk); - } - done(); -}; - -// Usage: -// var parser = new SimpleProtocol(); -// source.pipe(parser) -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Writable - - - -`stream.Writable` is an abstract class designed to be extended with an -underlying implementation of the -[`stream._write(chunk, encoding, callback)`][stream-_write] method. - -Please see [API for Stream Consumers][] for how to consume -writable streams in your programs. What follows is an explanation of -how to implement Writable streams in your programs. - -#### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when - [`stream.write()`][stream-write] starts returning `false`. Default = `16384` - (16kb), or `16` for `objectMode` streams. - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to [`stream._write()`][stream-_write]. - Default = `true` - * `objectMode` {Boolean} Whether or not the - [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can - write arbitrary data instead of only `Buffer` / `String` data. - Default = `false` - * `write` {Function} Implementation for the - [`stream._write()`][stream-_write] method. - * `writev` {Function} Implementation for the - [`stream._writev()`][stream-_writev] method. - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be written. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a -[`stream._write()`][stream-_write] method to send data to the underlying -resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### writable.\_writev(chunks, callback) - -* `chunks` {Array} The chunks to be written. Each chunk has following - format: `{ chunk: ..., encoding: ... }`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunks. - -Note: **This function MUST NOT be called directly.** It may be -implemented by child classes, and called by the internal Writable -class methods only. - -This function is completely optional to implement. In most cases it is -unnecessary. If implemented, it will be called with all the chunks -that are buffered in the write queue. - - -## Simplified Constructor API - - - -In simple cases there is now the added benefit of being able to construct a -stream without inheritance. - -This can be done by passing the appropriate methods as constructor options: - -Examples: - -### Duplex - -```js -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -### Readable - -```js -var readable = new stream.Readable({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - } -}); -``` - -### Transform - -```js -var transform = new stream.Transform({ - transform: function(chunk, encoding, next) { - // sets this._transform under the hood - - // generate output as many times as needed - // this.push(chunk); - - // call when the current chunk is consumed - next(); - }, - flush: function(done) { - // sets this._flush under the hood - - // generate output as many times as needed - // this.push(chunk); - - done(); - } -}); -``` - -### Writable - -```js -var writable = new stream.Writable({ - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var writable = new stream.Writable({ - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -## Streams: Under the Hood - - - -### Buffering - - - -Both Writable and Readable streams will buffer data on an internal -object which can be retrieved from `_writableState.getBuffer()` or -`_readableState.buffer`, respectively. - -The amount of data that will potentially be buffered depends on the -`highWaterMark` option which is passed into the constructor. - -Buffering in Readable streams happens when the implementation calls -[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not -call [`stream.read()`][stream-read], then the data will sit in the internal -queue until it is consumed. - -Buffering in Writable streams happens when the user calls -[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. - -The purpose of streams, especially with the [`stream.pipe()`][] method, is to -limit the buffering of data to acceptable levels, so that sources and -destinations of varying speed will not overwhelm the available memory. - -### Compatibility with Older Node.js Versions - - - -In versions of Node.js prior to v0.10, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the [`stream.read()`][stream-read] method, - [`'data'`][] events would start emitting immediately. If you needed to do - some I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The [`stream.pause()`][stream-pause] method was advisory, rather than - guaranteed. This meant that you still had to be prepared to receive - [`'data'`][] events even when the stream was in a paused state. - -In Node.js v0.10, the [Readable][] class was added. -For backwards compatibility with older Node.js programs, Readable streams -switch into "flowing mode" when a [`'data'`][] event handler is added, or -when the [`stream.resume()`][stream-resume] method is called. The effect is -that, even if you are not using the new [`stream.read()`][stream-read] method -and [`'readable'`][] event, you no longer have to worry about losing -[`'data'`][] chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No [`'data'`][] event handler is added. -* The [`stream.resume()`][stream-resume] method is never called. -* The stream is not piped to any writable destination. - -For example, consider the following code: - -```js -// WARNING! BROKEN! -net.createServer((socket) => { - - // we add an 'end' method, but never consume the data - socket.on('end', () => { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of Node.js prior to v0.10, the incoming message data would be -simply discarded. However, in Node.js v0.10 and beyond, -the socket will remain paused forever. - -The workaround in this situation is to call the -[`stream.resume()`][stream-resume] method to start the flow of data: - -```js -// Workaround -net.createServer((socket) => { - - socket.on('end', () => { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into flowing mode, -pre-v0.10 style streams can be wrapped in a Readable class using the -[`stream.wrap()`][] method. - - -### Object Mode - - - -Normally, Streams operate on Strings and Buffers exclusively. - -Streams that are in **object mode** can emit generic JavaScript values -other than Buffers and Strings. - -A Readable stream in object mode will always return a single item from -a call to [`stream.read(size)`][stream-read], regardless of what the size -argument is. - -A Writable stream in object mode will always ignore the `encoding` -argument to [`stream.write(data, encoding)`][stream-write]. - -The special value `null` still retains its special value for object -mode streams. That is, for object mode readable streams, `null` as a -return value from [`stream.read()`][stream-read] indicates that there is no more -data, and [`stream.push(null)`][stream-push] will signal the end of stream data -(`EOF`). - -No streams in Node.js core are object mode streams. This pattern is only -used by userland streaming libraries. - -You should set `objectMode` in your stream child class constructor on -the options object. Setting `objectMode` mid-stream is not safe. - -For Duplex streams `objectMode` can be set exclusively for readable or -writable side with `readableObjectMode` and `writableObjectMode` -respectively. These options can be used to implement parsers and -serializers with Transform streams. - -```js -const util = require('util'); -const StringDecoder = require('string_decoder').StringDecoder; -const Transform = require('stream').Transform; -util.inherits(JSONParseStream, Transform); - -// Gets \n-delimited JSON string data, and emits the parsed objects -function JSONParseStream() { - if (!(this instanceof JSONParseStream)) - return new JSONParseStream(); - - Transform.call(this, { readableObjectMode : true }); - - this._buffer = ''; - this._decoder = new StringDecoder('utf8'); -} - -JSONParseStream.prototype._transform = function(chunk, encoding, cb) { - this._buffer += this._decoder.write(chunk); - // split on newlines - var lines = this._buffer.split(/\r?\n/); - // keep the last partial line buffered - this._buffer = lines.pop(); - for (var l = 0; l < lines.length; l++) { - var line = lines[l]; - try { - var obj = JSON.parse(line); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; - -JSONParseStream.prototype._flush = function(cb) { - // Just handle any leftover - var rem = this._buffer.trim(); - if (rem) { - try { - var obj = JSON.parse(rem); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; -``` - -### `stream.read(0)` - -There are some cases where you want to trigger a refresh of the -underlying readable stream mechanisms, without actually consuming any -data. In that case, you can call `stream.read(0)`, which will always -return null. - -If the internal read buffer is below the `highWaterMark`, and the -stream is not currently reading, then calling `stream.read(0)` will trigger -a low-level [`stream._read()`][stream-_read] call. - -There is almost never a need to do this. However, you will see some -cases in Node.js's internals where this is done, particularly in the -Readable stream class internals. - -### `stream.push('')` - -Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an -interesting side effect. Because it *is* a call to -[`stream.push()`][stream-push], it will end the `reading` process. However, it -does *not* add any data to the readable buffer, so there's nothing for -a user to consume. - -Very rarely, there are cases where you have no data to provide now, -but the consumer of your stream (or, perhaps, another bit of your own -code) will know when to check again, by calling [`stream.read(0)`][stream-read]. -In those cases, you *may* call `stream.push('')`. - -So far, the only use case for this functionality is in the -[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you -find that you have to use `stream.push('')`, please consider another -approach, because it almost certainly indicates that something is -horribly wrong. - -[`'data'`]: #stream_event_data -[`'drain'`]: #stream_event_drain -[`'end'`]: #stream_event_end -[`'finish'`]: #stream_event_finish -[`'readable'`]: #stream_event_readable -[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.1.0/api/buffer.html#buffer_buf_tostring_encoding_start_end -[`EventEmitter`]: https://nodejs.org/docs/v6.1.0/api/events.html#events_class_eventemitter -[`process.stderr`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stderr -[`process.stdin`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdin -[`process.stdout`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdout -[`stream.cork()`]: #stream_writable_cork -[`stream.pipe()`]: #stream_readable_pipe_destination_options -[`stream.uncork()`]: #stream_writable_uncork -[`stream.unpipe()`]: #stream_readable_unpipe_destination -[`stream.wrap()`]: #stream_readable_wrap_stream -[`tls.CryptoStream`]: https://nodejs.org/docs/v6.1.0/api/tls.html#tls_class_cryptostream -[`util.inherits()`]: https://nodejs.org/docs/v6.1.0/api/util.html#util_util_inherits_constructor_superconstructor -[API for Stream Consumers]: #stream_api_for_stream_consumers -[API for Stream Implementors]: #stream_api_for_stream_implementors -[child process stdin]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdin -[child process stdout and stderr]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdout -[Compatibility]: #stream_compatibility_with_older_node_js_versions -[crypto]: crypto.html -[Duplex]: #stream_class_stream_duplex -[fs read streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_readstream -[fs write streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_writestream -[HTTP requests, on the client]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_clientrequest -[HTTP responses, on the server]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_serverresponse -[http-incoming-message]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_incomingmessage -[Object mode]: #stream_object_mode -[Readable]: #stream_class_stream_readable -[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 -[stream-_flush]: #stream_transform_flush_callback -[stream-_read]: #stream_readable_read_size_1 -[stream-_transform]: #stream_transform_transform_chunk_encoding_callback -[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 -[stream-_writev]: #stream_writable_writev_chunks_callback -[stream-end]: #stream_writable_end_chunk_encoding_callback -[stream-pause]: #stream_readable_pause -[stream-push]: #stream_readable_push_chunk_encoding -[stream-read]: #stream_readable_read_size -[stream-resume]: #stream_readable_resume -[stream-write]: #stream_writable_write_chunk_encoding_callback -[TCP sockets]: https://nodejs.org/docs/v6.1.0/api/net.html#net_class_net_socket -[Transform]: #stream_class_stream_transform -[Writable]: #stream_class_stream_writable -[zlib]: zlib.html diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f192e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8762..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 736693b8400..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,75 +0,0 @@ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index d06f71f1868..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,26 +0,0 @@ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 79914fa684c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,893 +0,0 @@ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -var hasPrependListener = typeof EE.prototype.prependListener === 'function'; - -function prependListener(emitter, event, fn) { - if (hasPrependListener) return emitter.prependListener(event, fn); - - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. This is here - // only because this code needs to continue to work with older versions - // of Node.js that do not include the prependListener() method. The goal - // is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -var Duplex; -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -var Duplex; -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = bufferShim.from(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var _e = new Error('stream.unshift() after end event'); - stream.emit('error', _e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) return 0; - - if (state.objectMode) return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; - } - - if (n <= 0) return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else { - return state.length; - } - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && !this._readableState.endEmitted) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) return null; - - if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var _buf = list[0]; - var cpy = Math.min(n - c, _buf.length); - - if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy); - - if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index dbc996ede62..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,180 +0,0 @@ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('Not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er) { - if (er) return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index ed5efcbd203..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,526 +0,0 @@ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -var Duplex; -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function writableStateGetBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -var Duplex; -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - // Always throw error if a null is written - // if we are not in object mode then throw - // if it is not a buffer, string, or undefined. - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = bufferShim.from(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json deleted file mode 100644 index 14818e30377..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_args": [ - [ - "readable-stream@^2.0.0 || ^1.1.13", - "/Users/eshanker/Code/fsevents/node_modules/are-we-there-yet" - ] - ], - "_from": "readable-stream@>=2.0.0 <3.0.0||>=1.1.13 <2.0.0", - "_id": "readable-stream@2.1.4", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/readable-stream", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.1.4.tgz_1463679605032_0.6917394688352942" - }, - "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "name": "readable-stream", - "raw": "readable-stream@^2.0.0 || ^1.1.13", - "rawSpec": "^2.0.0 || ^1.1.13", - "scope": null, - "spec": ">=2.0.0 <3.0.0||>=1.1.13 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/are-we-there-yet", - "/fsevents/tar-pack" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz", - "_shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", - "_shrinkwrap": null, - "_spec": "readable-stream@^2.0.0 || ^1.1.13", - "_where": "/Users/eshanker/Code/fsevents/node_modules/are-we-there-yet", - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "buffer-shims": "^1.0.0", - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "~1.4.0", - "nyc": "^6.4.0", - "tap": "~0.7.1", - "tape": "~4.5.1", - "zuul": "~3.9.0", - "zuul-ngrok": "^4.0.0" - }, - "directories": {}, - "dist": { - "shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" - }, - "gitHead": "7752832fba237929388dea6c96911a0a6379abfc", - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "pipe", - "readable", - "stream" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - { - "email": "nathan@tootallnate.net", - "name": "tootallnate" - }, - { - "email": "rod@vagg.org", - "name": "rvagg" - }, - { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - } - ], - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul -- test/browser.js", - "cover": "nyc npm test", - "local": "zuul --local -- test/browser.js", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\ntunnel: ngrok\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" - }, - "version": "2.1.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5516..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js deleted file mode 100644 index be2688a071d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,16 +0,0 @@ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); - -if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0780e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf3c1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc deleted file mode 100644 index 5a59481586a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.eslintrc +++ /dev/null @@ -1,45 +0,0 @@ -{ - "env": { - "node": true - }, - "rules": { - // 2-space indentation - "indent": [2, 2, {"SwitchCase": 1}], - // Disallow semi-colons, unless needed to disambiguate statement - "semi": [2, "never"], - // Require strings to use single quotes - "quotes": [2, "single"], - // Require curly braces for all control statements - "curly": 2, - // Disallow using variables and functions before they've been defined - "no-use-before-define": 2, - // Allow any case for variable naming - "camelcase": 0, - // Disallow unused variables, except as function arguments - "no-unused-vars": [2, {"args":"none"}], - // Allow leading underscores for method names - // REASON: we use underscores to denote private methods - "no-underscore-dangle": 0, - // Allow multi spaces around operators since they are - // used for alignment. This is not consistent in the - // code. - "no-multi-spaces": 0, - // Style rule is: most objects use { beforeColon: false, afterColon: true }, unless aligning which uses: - // - // { - // beforeColon : true, - // afterColon : true - // } - // - // eslint can't handle this, so the check is disabled. - "key-spacing": 0, - // Allow shadowing vars in outer scope (needs discussion) - "no-shadow": 0, - // Use if () { } - // ^ space - "keyword-spacing": [2, {"after": true}], - // Use if () { } - // ^ space - "space-before-blocks": [2, "always"] - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore deleted file mode 100644 index 67fe11cc0a7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -coverage -tests -node_modules -examples -release.sh -disabled.appveyor.yml diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml deleted file mode 100644 index 6f2d753b615..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ - -language: node_js - -node_js: - - node - - 4 - - 0.12 - - 0.10 - -after_script: - - npm run test-cov - - codecov - - cat ./coverage/lcov.info | coveralls - -webhooks: - urls: https://webhooks.gitter.im/e/237280ed4796c19cc626 - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: false # default: false - -sudo: false diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md deleted file mode 100644 index c7d684fa50e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CHANGELOG.md +++ /dev/null @@ -1,631 +0,0 @@ -## Change Log - -### v2.73.0 (2016/07/09) -- [#2240](https://github.com/request/request/pull/2240) Remove connectionErrorHandler to fix #1903 (@zarenner) -- [#2251](https://github.com/request/request/pull/2251) tape@4.6.0 breaks build 🚨 (@greenkeeperio-bot) -- [#2225](https://github.com/request/request/pull/2225) Update docs (@ArtskydJ) -- [#2203](https://github.com/request/request/pull/2203) Update browserify to version 13.0.1 🚀 (@greenkeeperio-bot) -- [#2275](https://github.com/request/request/pull/2275) Update karma to version 1.1.1 🚀 (@greenkeeperio-bot) -- [#2204](https://github.com/request/request/pull/2204) Add codecov.yml and disable PR comments (@simov) -- [#2212](https://github.com/request/request/pull/2212) Fix link to http.IncomingMessage documentation (@nazieb) -- [#2208](https://github.com/request/request/pull/2208) Update to form-data RC4 and pass null values to it (@simov) -- [#2207](https://github.com/request/request/pull/2207) Move aws4 require statement to the top (@simov) -- [#2199](https://github.com/request/request/pull/2199) Update karma-coverage to version 1.0.0 🚀 (@greenkeeperio-bot) -- [#2206](https://github.com/request/request/pull/2206) Update qs to version 6.2.0 🚀 (@greenkeeperio-bot) -- [#2205](https://github.com/request/request/pull/2205) Use server-destory to close hanging sockets in tests (@simov) -- [#2200](https://github.com/request/request/pull/2200) Update karma-cli to version 1.0.0 🚀 (@greenkeeperio-bot) - -### v2.72.0 (2016/04/17) -- [#2176](https://github.com/request/request/pull/2176) Do not try to pipe Gzip responses with no body (@simov) -- [#2175](https://github.com/request/request/pull/2175) Add 'delete' alias for the 'del' API method (@simov, @MuhanZou) -- [#2172](https://github.com/request/request/pull/2172) Add support for deflate content encoding (@czardoz) -- [#2169](https://github.com/request/request/pull/2169) Add callback option (@simov) -- [#2165](https://github.com/request/request/pull/2165) Check for self.req existence inside the write method (@simov) -- [#2167](https://github.com/request/request/pull/2167) Fix TravisCI badge reference master branch (@a0viedo) - -### v2.71.0 (2016/04/12) -- [#2164](https://github.com/request/request/pull/2164) Catch errors from the underlying http module (@simov) - -### v2.70.0 (2016/04/05) -- [#2147](https://github.com/request/request/pull/2147) Update eslint to version 2.5.3 🚀 (@simov, @greenkeeperio-bot) -- [#2009](https://github.com/request/request/pull/2009) Support JSON stringify replacer argument. (@elyobo) -- [#2142](https://github.com/request/request/pull/2142) Update eslint to version 2.5.1 🚀 (@greenkeeperio-bot) -- [#2128](https://github.com/request/request/pull/2128) Update browserify-istanbul to version 2.0.0 🚀 (@greenkeeperio-bot) -- [#2115](https://github.com/request/request/pull/2115) Update eslint to version 2.3.0 🚀 (@simov, @greenkeeperio-bot) -- [#2089](https://github.com/request/request/pull/2089) Fix badges (@simov) -- [#2092](https://github.com/request/request/pull/2092) Update browserify-istanbul to version 1.0.0 🚀 (@greenkeeperio-bot) -- [#2079](https://github.com/request/request/pull/2079) Accept read stream as body option (@simov) -- [#2070](https://github.com/request/request/pull/2070) Update bl to version 1.1.2 🚀 (@greenkeeperio-bot) -- [#2063](https://github.com/request/request/pull/2063) Up bluebird and oauth-sign (@simov) -- [#2058](https://github.com/request/request/pull/2058) Karma fixes for latest versions (@eiriksm) -- [#2057](https://github.com/request/request/pull/2057) Update contributing guidelines (@simov) -- [#2054](https://github.com/request/request/pull/2054) Update qs to version 6.1.0 🚀 (@greenkeeperio-bot) - -### v2.69.0 (2016/01/27) -- [#2041](https://github.com/request/request/pull/2041) restore aws4 as regular dependency (@rmg) - -### v2.68.0 (2016/01/27) -- [#2036](https://github.com/request/request/pull/2036) Add AWS Signature Version 4 (@simov, @mirkods) -- [#2022](https://github.com/request/request/pull/2022) Convert numeric multipart bodies to string (@simov, @feross) -- [#2024](https://github.com/request/request/pull/2024) Update har-validator dependency for nsp advisory #76 (@TylerDixon) -- [#2016](https://github.com/request/request/pull/2016) Update qs to version 6.0.2 🚀 (@greenkeeperio-bot) -- [#2007](https://github.com/request/request/pull/2007) Use the `extend` module instead of util._extend (@simov) -- [#2003](https://github.com/request/request/pull/2003) Update browserify to version 13.0.0 🚀 (@greenkeeperio-bot) -- [#1989](https://github.com/request/request/pull/1989) Update buffer-equal to version 1.0.0 🚀 (@greenkeeperio-bot) -- [#1956](https://github.com/request/request/pull/1956) Check form-data content-length value before setting up the header (@jongyoonlee) -- [#1958](https://github.com/request/request/pull/1958) Use IncomingMessage.destroy method (@simov) -- [#1952](https://github.com/request/request/pull/1952) Adds example for Tor proxy (@prometheansacrifice) -- [#1943](https://github.com/request/request/pull/1943) Update eslint to version 1.10.3 🚀 (@simov, @greenkeeperio-bot) -- [#1924](https://github.com/request/request/pull/1924) Update eslint to version 1.10.1 🚀 (@greenkeeperio-bot) -- [#1915](https://github.com/request/request/pull/1915) Remove content-length and transfer-encoding headers from defaultProxyHeaderWhiteList (@yaxia) - -### v2.67.0 (2015/11/19) -- [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot) - -### v2.66.0 (2015/11/18) -- [#1906](https://github.com/request/request/pull/1906) Update README URLs based on HTTP redirects (@ReadmeCritic) -- [#1905](https://github.com/request/request/pull/1905) Convert typed arrays into regular buffers (@simov) -- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot) -- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms) -- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot) -- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @vladimirich, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @Bloutiouf) -- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov) -- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot) -- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot) -- [#1866](https://github.com/request/request/pull/1866) Add missing quotes on x-token property in README (@miguelmota) -- [#1874](https://github.com/request/request/pull/1874) Fix typo in README.md (@gswalden) -- [#1860](https://github.com/request/request/pull/1860) Improve referer header tests and docs (@simov) -- [#1861](https://github.com/request/request/pull/1861) Remove redundant call to Stream constructor (@watson) -- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov) -- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot) -- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov) -- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@Bloutiouf) -- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu) -- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot) -- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot) - -### v2.65.0 (2015/10/11) -- [#1833](https://github.com/request/request/pull/1833) Update aws-sign2 to version 0.6.0 🚀 (@greenkeeperio-bot) -- [#1811](https://github.com/request/request/pull/1811) Enable loose cookie parsing in tough-cookie (@Sebmaster) -- [#1830](https://github.com/request/request/pull/1830) Bring back tilde ranges for all dependencies (@simov) -- [#1821](https://github.com/request/request/pull/1821) Implement support for RFC 2617 MD5-sess algorithm. (@BigDSK) -- [#1828](https://github.com/request/request/pull/1828) Updated qs dependency to 5.2.0 (@acroca) -- [#1818](https://github.com/request/request/pull/1818) Extract `readResponseBody` method out of `onRequestResponse` (@pvoisin) -- [#1819](https://github.com/request/request/pull/1819) Run stringify once (@mgenereu) -- [#1814](https://github.com/request/request/pull/1814) Updated har-validator to version 2.0.2 (@greenkeeperio-bot) -- [#1807](https://github.com/request/request/pull/1807) Updated tough-cookie to version 2.1.0 (@greenkeeperio-bot) -- [#1800](https://github.com/request/request/pull/1800) Add caret ranges for devDependencies, except eslint (@simov) -- [#1799](https://github.com/request/request/pull/1799) Updated karma-browserify to version 4.4.0 (@greenkeeperio-bot) -- [#1797](https://github.com/request/request/pull/1797) Updated tape to version 4.2.0 (@greenkeeperio-bot) -- [#1788](https://github.com/request/request/pull/1788) Pinned all dependencies (@greenkeeperio-bot) - -### v2.64.0 (2015/09/25) -- [#1787](https://github.com/request/request/pull/1787) npm ignore examples, release.sh and disabled.appveyor.yml (@thisconnect) -- [#1775](https://github.com/request/request/pull/1775) Fix typo in README.md (@djchie) -- [#1776](https://github.com/request/request/pull/1776) Changed word 'conjuction' to read 'conjunction' in README.md (@ryanwholey) -- [#1785](https://github.com/request/request/pull/1785) Revert: Set default application/json content-type when using json option #1772 (@simov) - -### v2.63.0 (2015/09/21) -- [#1772](https://github.com/request/request/pull/1772) Set default application/json content-type when using json option (@jzaefferer) - -### v2.62.0 (2015/09/15) -- [#1768](https://github.com/request/request/pull/1768) Add node 4.0 to the list of build targets (@simov) -- [#1767](https://github.com/request/request/pull/1767) Query strings now cooperate with unix sockets (@JoshWillik) -- [#1750](https://github.com/request/request/pull/1750) Revert doc about installation of tough-cookie added in #884 (@LoicMahieu) -- [#1746](https://github.com/request/request/pull/1746) Missed comma in Readme (@vladimirich) -- [#1743](https://github.com/request/request/pull/1743) Fix options not being initialized in defaults method (@simov) - -### v2.61.0 (2015/08/19) -- [#1721](https://github.com/request/request/pull/1721) Minor fix in README.md (@arbaaz) -- [#1733](https://github.com/request/request/pull/1733) Avoid useless Buffer transformation (@michelsalib) -- [#1726](https://github.com/request/request/pull/1726) Update README.md (@paulomcnally) -- [#1715](https://github.com/request/request/pull/1715) Fix forever option in node > 0.10 #1709 (@calibr) -- [#1716](https://github.com/request/request/pull/1716) Do not create Buffer from Object in setContentLength(iojs v3.0 issue) (@calibr) -- [#1711](https://github.com/request/request/pull/1711) Add ability to detect connect timeouts (@kevinburke) -- [#1712](https://github.com/request/request/pull/1712) Set certificate expiration to August 2, 2018 (@kevinburke) -- [#1700](https://github.com/request/request/pull/1700) debug() when JSON.parse() on a response body fails (@phillipj) - -### v2.60.0 (2015/07/21) -- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews) - -### v2.59.0 (2015/07/20) -- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options. Forever option defaults to using http(s).Agent in node 0.12+ (@simov) -- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman) -- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme) -- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov) -- [#1651](https://github.com/request/request/pull/1651) Preserve HEAD method when using followAllRedirects (@simov) -- [#1652](https://github.com/request/request/pull/1652) Update `encoding` option documentation in README.md (@daniel347x) -- [#1650](https://github.com/request/request/pull/1650) Allow content-type overriding when using the `form` option (@simov) -- [#1646](https://github.com/request/request/pull/1646) Clarify the nature of setting `ca` in `agentOptions` (@jeffcharles) - -### v2.58.0 (2015/06/16) -- [#1638](https://github.com/request/request/pull/1638) Use the `extend` module to deep extend in the defaults method (@simov) -- [#1631](https://github.com/request/request/pull/1631) Move tunnel logic into separate module (@simov) -- [#1634](https://github.com/request/request/pull/1634) Fix OAuth query transport_method (@simov) -- [#1603](https://github.com/request/request/pull/1603) Add codecov (@simov) - -### v2.57.0 (2015/05/31) -- [#1615](https://github.com/request/request/pull/1615) Replace '.client' with '.socket' as the former was deprecated in 2.2.0. (@ChALkeR) - -### v2.56.0 (2015/05/28) -- [#1610](https://github.com/request/request/pull/1610) Bump module dependencies (@simov) -- [#1600](https://github.com/request/request/pull/1600) Extract the querystring logic into separate module (@simov) -- [#1607](https://github.com/request/request/pull/1607) Re-generate certificates (@simov) -- [#1599](https://github.com/request/request/pull/1599) Move getProxyFromURI logic below the check for Invaild URI (#1595) (@simov) -- [#1598](https://github.com/request/request/pull/1598) Fix the way http verbs are defined in order to please intellisense IDEs (@simov, @flannelJesus) -- [#1591](https://github.com/request/request/pull/1591) A few minor fixes: (@simov) -- [#1584](https://github.com/request/request/pull/1584) Refactor test-default tests (according to comments in #1430) (@simov) -- [#1585](https://github.com/request/request/pull/1585) Fixing documentation regarding TLS options (#1583) (@mainakae) -- [#1574](https://github.com/request/request/pull/1574) Refresh the oauth_nonce on redirect (#1573) (@simov) -- [#1570](https://github.com/request/request/pull/1570) Discovered tests that weren't properly running (@seanstrom) -- [#1569](https://github.com/request/request/pull/1569) Fix pause before response arrives (@kevinoid) -- [#1558](https://github.com/request/request/pull/1558) Emit error instead of throw (@simov) -- [#1568](https://github.com/request/request/pull/1568) Fix stall when piping gzipped response (@kevinoid) -- [#1560](https://github.com/request/request/pull/1560) Update combined-stream (@apechimp) -- [#1543](https://github.com/request/request/pull/1543) Initial support for oauth_body_hash on json payloads (@simov, @aesopwolf) -- [#1541](https://github.com/request/request/pull/1541) Fix coveralls (@simov) -- [#1540](https://github.com/request/request/pull/1540) Fix recursive defaults for convenience methods (@simov) -- [#1536](https://github.com/request/request/pull/1536) More eslint style rules (@froatsnook) -- [#1533](https://github.com/request/request/pull/1533) Adding dependency status bar to README.md (@YasharF) -- [#1539](https://github.com/request/request/pull/1539) ensure the latest version of har-validator is included (@ahmadnassri) -- [#1516](https://github.com/request/request/pull/1516) forever+pool test (@devTristan) - -### v2.55.0 (2015/04/05) -- [#1520](https://github.com/request/request/pull/1520) Refactor defaults (@simov) -- [#1525](https://github.com/request/request/pull/1525) Delete request headers with undefined value. (@froatsnook) -- [#1521](https://github.com/request/request/pull/1521) Add promise tests (@simov) -- [#1518](https://github.com/request/request/pull/1518) Fix defaults (@simov) -- [#1515](https://github.com/request/request/pull/1515) Allow static invoking of convenience methods (@simov) -- [#1505](https://github.com/request/request/pull/1505) Fix multipart boundary extraction regexp (@simov) -- [#1510](https://github.com/request/request/pull/1510) Fix basic auth form data (@simov) - -### v2.54.0 (2015/03/24) -- [#1501](https://github.com/request/request/pull/1501) HTTP Archive 1.2 support (@ahmadnassri) -- [#1486](https://github.com/request/request/pull/1486) Add a test for the forever agent (@akshayp) -- [#1500](https://github.com/request/request/pull/1500) Adding handling for no auth method and null bearer (@philberg) -- [#1498](https://github.com/request/request/pull/1498) Add table of contents in readme (@simov) -- [#1477](https://github.com/request/request/pull/1477) Add support for qs options via qsOptions key (@simov) -- [#1496](https://github.com/request/request/pull/1496) Parameters encoded to base 64 should be decoded as UTF-8, not ASCII. (@albanm) -- [#1494](https://github.com/request/request/pull/1494) Update eslint (@froatsnook) -- [#1474](https://github.com/request/request/pull/1474) Require Colon in Basic Auth (@erykwalder) -- [#1481](https://github.com/request/request/pull/1481) Fix baseUrl and redirections. (@burningtree) -- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook) -- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em) -- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB) -- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nicolasmccurdy, @demohi, @simov, @0x4139) -- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139) -- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy, @demohi) -- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal) -- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimon) -- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen) -- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky) -- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack) -- [#1423](https://github.com/request/request/pull/1423) Allow fully qualified multipart content-type header (@simov) -- [#1430](https://github.com/request/request/pull/1430) Fix recursive requester (@tikotzky) -- [#1429](https://github.com/request/request/pull/1429) Throw error when making HEAD request with a body (@tikotzky) -- [#1419](https://github.com/request/request/pull/1419) Add note that the project is broken in 0.12.x (@nylen) -- [#1413](https://github.com/request/request/pull/1413) Fix basic auth (@simov) -- [#1397](https://github.com/request/request/pull/1397) Improve pipe-from-file tests (@nylen) - -### v2.53.0 (2015/02/02) -- [#1396](https://github.com/request/request/pull/1396) Do not rfc3986 escape JSON bodies (@nylen, @simov) -- [#1392](https://github.com/request/request/pull/1392) Improve `timeout` option description (@watson) - -### v2.52.0 (2015/02/02) -- [#1383](https://github.com/request/request/pull/1383) Add missing HTTPS options that were not being passed to tunnel (@brichard19) (@nylen) -- [#1388](https://github.com/request/request/pull/1388) Upgrade mime-types package version (@roderickhsiao) -- [#1389](https://github.com/request/request/pull/1389) Revise Setup Tunnel Function (@seanstrom) -- [#1374](https://github.com/request/request/pull/1374) Allow explicitly disabling tunneling for proxied https destinations (@nylen) -- [#1376](https://github.com/request/request/pull/1376) Use karma-browserify for tests. Add browser test coverage reporter. (@eiriksm) -- [#1366](https://github.com/request/request/pull/1366) Refactor OAuth into separate module (@simov) -- [#1373](https://github.com/request/request/pull/1373) Rewrite tunnel test to be pure Node.js (@nylen) -- [#1371](https://github.com/request/request/pull/1371) Upgrade test reporter (@nylen) -- [#1360](https://github.com/request/request/pull/1360) Refactor basic, bearer, digest auth logic into separate class (@simov) -- [#1354](https://github.com/request/request/pull/1354) Remove circular dependency from debugging code (@nylen) -- [#1351](https://github.com/request/request/pull/1351) Move digest auth into private prototype method (@simov) -- [#1352](https://github.com/request/request/pull/1352) Update hawk dependency to ~2.3.0 (@mridgway) -- [#1353](https://github.com/request/request/pull/1353) Correct travis-ci badge (@dogancelik) -- [#1349](https://github.com/request/request/pull/1349) Make sure we return on errored browser requests. (@eiriksm) -- [#1346](https://github.com/request/request/pull/1346) getProxyFromURI Extraction Refactor (@seanstrom) -- [#1337](https://github.com/request/request/pull/1337) Standardize test ports on 6767 (@nylen) -- [#1341](https://github.com/request/request/pull/1341) Emit FormData error events as Request error events (@nylen, @rwky) -- [#1343](https://github.com/request/request/pull/1343) Clean up readme badges, and add Travis and Coveralls badges (@nylen) -- [#1345](https://github.com/request/request/pull/1345) Update README.md (@Aaron-Hartwig) -- [#1338](https://github.com/request/request/pull/1338) Always wait for server.close() callback in tests (@nylen) -- [#1342](https://github.com/request/request/pull/1342) Add mock https server and redo start of browser tests for this purpose. (@eiriksm) -- [#1339](https://github.com/request/request/pull/1339) Improve auth docs (@nylen) -- [#1335](https://github.com/request/request/pull/1335) Add support for OAuth plaintext signature method (@simov) -- [#1332](https://github.com/request/request/pull/1332) Add clean script to remove test-browser.js after the tests run (@seanstrom) -- [#1327](https://github.com/request/request/pull/1327) Fix errors generating coverage reports. (@nylen) -- [#1330](https://github.com/request/request/pull/1330) Return empty buffer upon empty response body and encoding is set to null (@seanstrom) -- [#1326](https://github.com/request/request/pull/1326) Use faster container-based infrastructure on Travis (@nylen) -- [#1315](https://github.com/request/request/pull/1315) Implement rfc3986 option (@simov, @nylen, @apoco, @DullReferenceException, @mmalecki, @oliamb, @cliffcrosland, @LewisJEllis, @eiriksm, @poislagarde) -- [#1314](https://github.com/request/request/pull/1314) Detect urlencoded form data header via regex (@simov) -- [#1317](https://github.com/request/request/pull/1317) Improve OAuth1.0 server side flow example (@simov) - -### v2.51.0 (2014/12/10) -- [#1310](https://github.com/request/request/pull/1310) Revert changes introduced in https://github.com/request/request/pull/1282 (@simov) - -### v2.50.0 (2014/12/09) -- [#1308](https://github.com/request/request/pull/1308) Add browser test to keep track of browserify compability. (@eiriksm) -- [#1299](https://github.com/request/request/pull/1299) Add optional support for jsonReviver (@poislagarde) -- [#1277](https://github.com/request/request/pull/1277) Add Coveralls configuration (@simov) -- [#1307](https://github.com/request/request/pull/1307) Upgrade form-data, add back browserify compability. Fixes #455. (@eiriksm) -- [#1305](https://github.com/request/request/pull/1305) Fix typo in README.md (@LewisJEllis) -- [#1288](https://github.com/request/request/pull/1288) Update README.md to explain custom file use case (@cliffcrosland) - -### v2.49.0 (2014/11/28) -- [#1295](https://github.com/request/request/pull/1295) fix(proxy): no-proxy false positive (@oliamb) -- [#1292](https://github.com/request/request/pull/1292) Upgrade `caseless` to 0.8.1 (@mmalecki) -- [#1276](https://github.com/request/request/pull/1276) Set transfer encoding for multipart/related to chunked by default (@simov) -- [#1275](https://github.com/request/request/pull/1275) Fix multipart content-type headers detection (@simov) -- [#1269](https://github.com/request/request/pull/1269) adds streams example for review (@tbuchok) -- [#1238](https://github.com/request/request/pull/1238) Add examples README.md (@simov) - -### v2.48.0 (2014/11/12) -- [#1263](https://github.com/request/request/pull/1263) Fixed a syntax error / typo in README.md (@xna2) -- [#1253](https://github.com/request/request/pull/1253) Add multipart chunked flag (@simov, @nylen) -- [#1251](https://github.com/request/request/pull/1251) Clarify that defaults() does not modify global defaults (@nylen) -- [#1250](https://github.com/request/request/pull/1250) Improve documentation for pool and maxSockets options (@nylen) -- [#1237](https://github.com/request/request/pull/1237) Documenting error handling when using streams (@vmattos) -- [#1244](https://github.com/request/request/pull/1244) Finalize changelog command (@nylen) -- [#1241](https://github.com/request/request/pull/1241) Fix typo (@alexanderGugel) -- [#1223](https://github.com/request/request/pull/1223) Show latest version number instead of "upcoming" in changelog (@nylen) -- [#1236](https://github.com/request/request/pull/1236) Document how to use custom CA in README (#1229) (@hypesystem) -- [#1228](https://github.com/request/request/pull/1228) Support for oauth with RSA-SHA1 signing (@nylen) -- [#1216](https://github.com/request/request/pull/1216) Made json and multipart options coexist (@nylen, @simov) -- [#1225](https://github.com/request/request/pull/1225) Allow header white/exclusive lists in any case. (@RReverser) - -### v2.47.0 (2014/10/26) -- [#1222](https://github.com/request/request/pull/1222) Move from mikeal/request to request/request (@nylen) -- [#1220](https://github.com/request/request/pull/1220) update qs dependency to 2.3.1 (@FredKSchott) -- [#1212](https://github.com/request/request/pull/1212) Improve tests/test-timeout.js (@nylen) -- [#1219](https://github.com/request/request/pull/1219) remove old globalAgent workaround for node 0.4 (@request) -- [#1214](https://github.com/request/request/pull/1214) Remove cruft left over from optional dependencies (@nylen) -- [#1215](https://github.com/request/request/pull/1215) Add proxyHeaderExclusiveList option for proxy-only headers. (@RReverser) -- [#1211](https://github.com/request/request/pull/1211) Allow 'Host' header instead of 'host' and remember case across redirects (@nylen) -- [#1208](https://github.com/request/request/pull/1208) Improve release script (@nylen) -- [#1213](https://github.com/request/request/pull/1213) Support for custom cookie store (@nylen, @mitsuru) -- [#1197](https://github.com/request/request/pull/1197) Clean up some code around setting the agent (@FredKSchott) -- [#1209](https://github.com/request/request/pull/1209) Improve multipart form append test (@simov) -- [#1207](https://github.com/request/request/pull/1207) Update changelog (@nylen) -- [#1185](https://github.com/request/request/pull/1185) Stream multipart/related bodies (@simov) - -### v2.46.0 (2014/10/23) -- [#1198](https://github.com/request/request/pull/1198) doc for TLS/SSL protocol options (@shawnzhu) -- [#1200](https://github.com/request/request/pull/1200) Add a Gitter chat badge to README.md (@gitter-badger) -- [#1196](https://github.com/request/request/pull/1196) Upgrade taper test reporter to v0.3.0 (@nylen) -- [#1199](https://github.com/request/request/pull/1199) Fix lint error: undeclared var i (@nylen) -- [#1191](https://github.com/request/request/pull/1191) Move self.proxy decision logic out of init and into a helper (@FredKSchott) -- [#1190](https://github.com/request/request/pull/1190) Move _buildRequest() logic back into init (@FredKSchott) -- [#1186](https://github.com/request/request/pull/1186) Support Smarter Unix URL Scheme (@FredKSchott) -- [#1178](https://github.com/request/request/pull/1178) update form documentation for new usage (@FredKSchott) -- [#1180](https://github.com/request/request/pull/1180) Enable no-mixed-requires linting rule (@nylen) -- [#1184](https://github.com/request/request/pull/1184) Don't forward authorization header across redirects to different hosts (@nylen) -- [#1183](https://github.com/request/request/pull/1183) Correct README about pre and postamble CRLF using multipart and not mult... (@netpoetica) -- [#1179](https://github.com/request/request/pull/1179) Lint tests directory (@nylen) -- [#1169](https://github.com/request/request/pull/1169) add metadata for form-data file field (@dotcypress) -- [#1173](https://github.com/request/request/pull/1173) remove optional dependencies (@seanstrom) -- [#1165](https://github.com/request/request/pull/1165) Cleanup event listeners and remove function creation from init (@FredKSchott) -- [#1174](https://github.com/request/request/pull/1174) update the request.cookie docs to have a valid cookie example (@seanstrom) -- [#1168](https://github.com/request/request/pull/1168) create a detach helper and use detach helper in replace of nextTick (@seanstrom) -- [#1171](https://github.com/request/request/pull/1171) in post can send form data and use callback (@MiroRadenovic) -- [#1159](https://github.com/request/request/pull/1159) accept charset for x-www-form-urlencoded content-type (@seanstrom) -- [#1157](https://github.com/request/request/pull/1157) Update README.md: body with json=true (@Rob--W) -- [#1164](https://github.com/request/request/pull/1164) Disable tests/test-timeout.js on Travis (@nylen) -- [#1153](https://github.com/request/request/pull/1153) Document how to run a single test (@nylen) -- [#1144](https://github.com/request/request/pull/1144) adds documentation for the "response" event within the streaming section (@tbuchok) -- [#1162](https://github.com/request/request/pull/1162) Update eslintrc file to no longer allow past errors (@FredKSchott) -- [#1155](https://github.com/request/request/pull/1155) Support/use self everywhere (@seanstrom) -- [#1161](https://github.com/request/request/pull/1161) fix no-use-before-define lint warnings (@emkay) -- [#1156](https://github.com/request/request/pull/1156) adding curly brackets to get rid of lint errors (@emkay) -- [#1151](https://github.com/request/request/pull/1151) Fix localAddress test on OS X (@nylen) -- [#1145](https://github.com/request/request/pull/1145) documentation: fix outdated reference to setCookieSync old name in README (@FredKSchott) -- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott) -- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen) -- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund) -- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@slimelabs) -- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey) -- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott) -- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom) -- [#1129](https://github.com/request/request/pull/1129) linting fix: convert double quote strings to use single quotes (@FredKSchott) -- [#1124](https://github.com/request/request/pull/1124) linting fix: remove unneccesary semi-colons (@FredKSchott) - -### v2.45.0 (2014/10/06) -- [#1128](https://github.com/request/request/pull/1128) Add test for setCookie regression (@nylen) -- [#1127](https://github.com/request/request/pull/1127) added tests around using objects as values in a query string (@bcoe) -- [#1103](https://github.com/request/request/pull/1103) Support/refactor request constructor (@nylen, @seanstrom) -- [#1119](https://github.com/request/request/pull/1119) add basic linting to request library (@FredKSchott) -- [#1121](https://github.com/request/request/pull/1121) Revert "Explicitly use sync versions of cookie functions" (@nylen) -- [#1118](https://github.com/request/request/pull/1118) linting fix: Restructure bad empty if statement (@FredKSchott) -- [#1117](https://github.com/request/request/pull/1117) Fix a bad check for valid URIs (@FredKSchott) -- [#1113](https://github.com/request/request/pull/1113) linting fix: space out operators (@FredKSchott) -- [#1116](https://github.com/request/request/pull/1116) Fix typo in `noProxyHost` definition (@FredKSchott) -- [#1114](https://github.com/request/request/pull/1114) linting fix: Added a `new` operator that was missing when creating and throwing a new error (@FredKSchott) -- [#1096](https://github.com/request/request/pull/1096) No_proxy support (@samcday) -- [#1107](https://github.com/request/request/pull/1107) linting-fix: remove unused variables (@FredKSchott) -- [#1112](https://github.com/request/request/pull/1112) linting fix: Make return values consistent and more straitforward (@FredKSchott) -- [#1111](https://github.com/request/request/pull/1111) linting fix: authPieces was getting redeclared (@FredKSchott) -- [#1105](https://github.com/request/request/pull/1105) Use strict mode in request (@FredKSchott) -- [#1110](https://github.com/request/request/pull/1110) linting fix: replace lazy '==' with more strict '===' (@FredKSchott) -- [#1109](https://github.com/request/request/pull/1109) linting fix: remove function call from if-else conditional statement (@FredKSchott) -- [#1102](https://github.com/request/request/pull/1102) Fix to allow setting a `requester` on recursive calls to `request.defaults` (@tikotzky) -- [#1095](https://github.com/request/request/pull/1095) Tweaking engines in package.json (@pdehaan) -- [#1082](https://github.com/request/request/pull/1082) Forward the socket event from the httpModule request (@seanstrom) -- [#972](https://github.com/request/request/pull/972) Clarify gzip handling in the README (@kevinoid) -- [#1089](https://github.com/request/request/pull/1089) Mention that encoding defaults to utf8, not Buffer (@stuartpb) -- [#1088](https://github.com/request/request/pull/1088) Fix cookie example in README.md and make it more clear (@pipi32167) -- [#1027](https://github.com/request/request/pull/1027) Add support for multipart form data in request options. (@crocket) -- [#1076](https://github.com/request/request/pull/1076) use Request.abort() to abort the request when the request has timed-out (@seanstrom) -- [#1068](https://github.com/request/request/pull/1068) add optional postamble required by .NET multipart requests (@netpoetica) - -### v2.43.0 (2014/09/18) -- [#1057](https://github.com/request/request/pull/1057) Defaults should not overwrite defined options (@davidwood) -- [#1046](https://github.com/request/request/pull/1046) Propagate datastream errors, useful in case gzip fails. (@ZJONSSON, @Janpot) -- [#1063](https://github.com/request/request/pull/1063) copy the input headers object #1060 (@finnp) -- [#1031](https://github.com/request/request/pull/1031) Explicitly use sync versions of cookie functions (@ZJONSSON) -- [#1056](https://github.com/request/request/pull/1056) Fix redirects when passing url.parse(x) as URL to convenience method (@nylen) - -### v2.42.0 (2014/09/04) -- [#1053](https://github.com/request/request/pull/1053) Fix #1051 Parse auth properly when using non-tunneling proxy (@isaacs) - -### v2.41.0 (2014/09/04) -- [#1050](https://github.com/request/request/pull/1050) Pass whitelisted headers to tunneling proxy. Organize all tunneling logic. (@isaacs, @Feldhacker) -- [#1035](https://github.com/request/request/pull/1035) souped up nodei.co badge (@rvagg) -- [#1048](https://github.com/request/request/pull/1048) Aws is now possible over a proxy (@steven-aerts) -- [#1039](https://github.com/request/request/pull/1039) extract out helper functions to a helper file (@seanstrom) -- [#1021](https://github.com/request/request/pull/1021) Support/refactor indexjs (@seanstrom) -- [#1033](https://github.com/request/request/pull/1033) Improve and document debug options (@nylen) -- [#1034](https://github.com/request/request/pull/1034) Fix readme headings (@nylen) -- [#1030](https://github.com/request/request/pull/1030) Allow recursive request.defaults (@tikotzky) -- [#1029](https://github.com/request/request/pull/1029) Fix a couple of typos (@nylen) -- [#675](https://github.com/request/request/pull/675) Checking for SSL fault on connection before reading SSL properties (@VRMink) -- [#989](https://github.com/request/request/pull/989) Added allowRedirect function. Should return true if redirect is allowed or false otherwise (@doronin) -- [#1025](https://github.com/request/request/pull/1025) [fixes #1023] Set self._ended to true once response has ended (@mridgway) -- [#1020](https://github.com/request/request/pull/1020) Add back removed debug metadata (@FredKSchott) -- [#1008](https://github.com/request/request/pull/1008) Moving to module instead of cutomer buffer concatenation. (@mikeal) -- [#770](https://github.com/request/request/pull/770) Added dependency badge for README file; (@timgluz, @mafintosh, @lalitkapoor, @stash, @bobyrizov) -- [#1016](https://github.com/request/request/pull/1016) toJSON no longer results in an infinite loop, returns simple objects (@FredKSchott) -- [#1018](https://github.com/request/request/pull/1018) Remove pre-0.4.4 HTTPS fix (@mmalecki) -- [#1006](https://github.com/request/request/pull/1006) Migrate to caseless, fixes #1001 (@mikeal) -- [#995](https://github.com/request/request/pull/995) Fix parsing array of objects (@sjonnet19) -- [#999](https://github.com/request/request/pull/999) Fix fallback for browserify for optional modules. (@eiriksm) -- [#996](https://github.com/request/request/pull/996) Wrong oauth signature when multiple same param keys exist [updated] (@bengl, @hyjin) - -### v2.40.0 (2014/08/06) -- [#992](https://github.com/request/request/pull/992) Fix security vulnerability. Update qs (@poeticninja) -- [#988](https://github.com/request/request/pull/988) “--” -> “—” (@upisfree) -- [#987](https://github.com/request/request/pull/987) Show optional modules as being loaded by the module that reqeusted them (@iarna) - -### v2.39.0 (2014/07/24) -- [#976](https://github.com/request/request/pull/976) Update README.md (@pvoznenko) - -### v2.38.0 (2014/07/22) -- [#952](https://github.com/request/request/pull/952) Adding support to client certificate with proxy use case (@ofirshaked) -- [#884](https://github.com/request/request/pull/884) Documented tough-cookie installation. (@wbyoung) -- [#935](https://github.com/request/request/pull/935) Correct repository url (@fritx) -- [#963](https://github.com/request/request/pull/963) Update changelog (@nylen) -- [#960](https://github.com/request/request/pull/960) Support gzip with encoding on node pre-v0.9.4 (@kevinoid) -- [#953](https://github.com/request/request/pull/953) Add async Content-Length computation when using form-data (@LoicMahieu) -- [#844](https://github.com/request/request/pull/844) Add support for HTTP[S]_PROXY environment variables. Fixes #595. (@jvmccarthy) -- [#946](https://github.com/request/request/pull/946) defaults: merge headers (@aj0strow) - -### v2.37.0 (2014/07/07) -- [#957](https://github.com/request/request/pull/957) Silence EventEmitter memory leak warning #311 (@watson) -- [#955](https://github.com/request/request/pull/955) check for content-length header before setting it in nextTick (@camilleanne) -- [#951](https://github.com/request/request/pull/951) Add support for gzip content decoding (@kevinoid) -- [#949](https://github.com/request/request/pull/949) Manually enter querystring in form option (@charlespwd) -- [#944](https://github.com/request/request/pull/944) Make request work with browserify (@eiriksm) -- [#943](https://github.com/request/request/pull/943) New mime module (@eiriksm) -- [#927](https://github.com/request/request/pull/927) Bump version of hawk dep. (@samccone) -- [#907](https://github.com/request/request/pull/907) append secureOptions to poolKey (@medovob) - -### v2.35.0 (2014/05/17) -- [#901](https://github.com/request/request/pull/901) Fixes #555 (@pigulla) -- [#897](https://github.com/request/request/pull/897) merge with default options (@vohof) -- [#891](https://github.com/request/request/pull/891) fixes 857 - options object is mutated by calling request (@lalitkapoor) -- [#869](https://github.com/request/request/pull/869) Pipefilter test (@tgohn) -- [#866](https://github.com/request/request/pull/866) Fix typo (@dandv) -- [#861](https://github.com/request/request/pull/861) Add support for RFC 6750 Bearer Tokens (@phedny) -- [#809](https://github.com/request/request/pull/809) upgrade tunnel-proxy to 0.4.0 (@ksato9700) -- [#850](https://github.com/request/request/pull/850) Fix word consistency in readme (@0xNobody) -- [#810](https://github.com/request/request/pull/810) add some exposition to mpu example in README.md (@mikermcneil) -- [#840](https://github.com/request/request/pull/840) improve error reporting for invalid protocols (@FND) -- [#821](https://github.com/request/request/pull/821) added secureOptions back (@nw) -- [#815](https://github.com/request/request/pull/815) Create changelog based on pull requests (@lalitkapoor) - -### v2.34.0 (2014/02/18) -- [#516](https://github.com/request/request/pull/516) UNIX Socket URL Support (@lyuzashi) -- [#801](https://github.com/request/request/pull/801) 794 ignore cookie parsing and domain errors (@lalitkapoor) -- [#802](https://github.com/request/request/pull/802) Added the Apache license to the package.json. (@keskival) -- [#793](https://github.com/request/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul) -- [#785](https://github.com/request/request/pull/785) Provide ability to override content-type when `json` option used (@vvo) -- [#781](https://github.com/request/request/pull/781) simpler isReadStream function (@joaojeronimo) - -### v2.32.0 (2014/01/16) -- [#767](https://github.com/request/request/pull/767) Use tough-cookie CookieJar sync API (@stash) -- [#764](https://github.com/request/request/pull/764) Case-insensitive authentication scheme (@bobyrizov) -- [#763](https://github.com/request/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash) -- [#744](https://github.com/request/request/pull/744) Use Cookie.parse (@lalitkapoor) -- [#757](https://github.com/request/request/pull/757) require aws-sign2 (@mafintosh) - -### v2.31.0 (2014/01/08) -- [#645](https://github.com/request/request/pull/645) update twitter api url to v1.1 (@mick) -- [#746](https://github.com/request/request/pull/746) README: Markdown code highlight (@weakish) -- [#745](https://github.com/request/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay) -- [#742](https://github.com/request/request/pull/742) Add note about JSON output body type (@iansltx) -- [#741](https://github.com/request/request/pull/741) README example is using old cookie jar api (@emkay) -- [#736](https://github.com/request/request/pull/736) Fix callback arguments documentation (@mmalecki) - -### v2.30.0 (2013/12/13) -- [#732](https://github.com/request/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium) -- [#730](https://github.com/request/request/pull/730) better HTTP DIGEST support (@dai-shi) -- [#728](https://github.com/request/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow) - -### v2.29.0 (2013/12/06) -- [#727](https://github.com/request/request/pull/727) fix requester bug (@jchris) - -### v2.28.0 (2013/12/04) -- [#724](https://github.com/request/request/pull/724) README.md: add custom HTTP Headers example. (@tcort) -- [#719](https://github.com/request/request/pull/719) Made a comment gender neutral. (@unsetbit) -- [#715](https://github.com/request/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub) -- [#710](https://github.com/request/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak) -- [#696](https://github.com/request/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin) -- [#694](https://github.com/request/request/pull/694) Typo in README (@VRMink) -- [#690](https://github.com/request/request/pull/690) Handle blank password in basic auth. (@diversario) -- [#682](https://github.com/request/request/pull/682) Optional dependencies (@Turbo87) -- [#683](https://github.com/request/request/pull/683) Travis CI support (@Turbo87) -- [#674](https://github.com/request/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren) -- [#666](https://github.com/request/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong) -- [#656](https://github.com/request/request/pull/656) Test case for #304. (@diversario) -- [#662](https://github.com/request/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar) -- [#659](https://github.com/request/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm) -- [#630](https://github.com/request/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl) - -### v2.27.0 (2013/08/15) -- [#619](https://github.com/request/request/pull/619) decouple things a bit (@joaojeronimo) - -### v2.26.0 (2013/08/07) -- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander) -- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker) - -### v2.24.0 (2013/07/23) -- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath) -- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK) -- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko) - -### v2.23.0 (2013/07/23) -- [#589](https://github.com/request/request/pull/589) Prevent setting headers after they are sent (@geek) -- [#587](https://github.com/request/request/pull/587) Global cookie jar disabled by default (@threepointone) -- [#544](https://github.com/request/request/pull/544) Update http-signature version. (@davidlehn) -- [#581](https://github.com/request/request/pull/581) Fix spelling of "ignoring." (@bigeasy) -- [#568](https://github.com/request/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette) -- [#564](https://github.com/request/request/pull/564) Fix redirections (@criloz) -- [#541](https://github.com/request/request/pull/541) The exported request function doesn't have an auth method (@tschaub) -- [#542](https://github.com/request/request/pull/542) Expose Request class (@regality) -- [#536](https://github.com/request/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando) -- [#532](https://github.com/request/request/pull/532) fix typo (@fredericosilva) -- [#497](https://github.com/request/request/pull/497) Added redirect event (@Cauldrath) -- [#503](https://github.com/request/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi) -- [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway421) -- [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka) -- [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway421) -- [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway421) -- [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun) -- [#510](https://github.com/request/request/pull/510) Add HTTP Signature support. (@davidlehn) -- [#502](https://github.com/request/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen) -- [#508](https://github.com/request/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs) -- [#512](https://github.com/request/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1) -- [#513](https://github.com/request/request/pull/513) add 'localAddress' support (@yyfrankyy) -- [#498](https://github.com/request/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins) -- [#490](https://github.com/request/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas) -- [#479](https://github.com/request/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH) -- [#475](https://github.com/request/request/pull/475) Use `unescape` from `querystring` (@shimaore) -- [#473](https://github.com/request/request/pull/473) V0.10 compat (@isaacs) -- [#471](https://github.com/request/request/pull/471) Using querystring library from visionmedia (@kbackowski) -- [#461](https://github.com/request/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin) -- [#460](https://github.com/request/request/pull/460) hawk 0.10.0 (@hueniverse) -- [#462](https://github.com/request/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya) -- [#456](https://github.com/request/request/pull/456) hawk 0.9.0 (@hueniverse) -- [#429](https://github.com/request/request/pull/429) Copy options before adding callback. (@nrn, @nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) -- [#454](https://github.com/request/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh) -- [#310](https://github.com/request/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann, @isaacs, @mscdex) -- [#413](https://github.com/request/request/pull/413) rename googledoodle.png to .jpg (@nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) -- [#448](https://github.com/request/request/pull/448) Convenience method for PATCH (@mloar) -- [#444](https://github.com/request/request/pull/444) protect against double callbacks on error path (@spollack) -- [#433](https://github.com/request/request/pull/433) Added support for HTTPS cert & key (@mmalecki) -- [#430](https://github.com/request/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf) -- [#415](https://github.com/request/request/pull/415) Fixed a typo. (@jerem) -- [#338](https://github.com/request/request/pull/338) Add more auth options, including digest support (@nylen) -- [#403](https://github.com/request/request/pull/403) Optimize environment lookup to happen once only (@mmalecki) -- [#398](https://github.com/request/request/pull/398) Add more reporting to tests (@mmalecki) -- [#388](https://github.com/request/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23) -- [#381](https://github.com/request/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro) -- [#380](https://github.com/request/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-) -- [#376](https://github.com/request/request/pull/376) Headers lost on redirect (@kapetan) -- [#375](https://github.com/request/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock) -- [#374](https://github.com/request/request/pull/374) Correct Host header for proxy tunnel CONNECT (@youurayy) -- [#370](https://github.com/request/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge) -- [#369](https://github.com/request/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge) -- [#344](https://github.com/request/request/pull/344) Make AWS auth signing find headers correctly (@nlf) -- [#363](https://github.com/request/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall) -- [#362](https://github.com/request/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall) -- [#361](https://github.com/request/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins) -- [#360](https://github.com/request/request/pull/360) Delete self._form along with everything else on redirect (@jgautier) -- [#355](https://github.com/request/request/pull/355) stop sending erroneous headers on redirected requests (@azylman) -- [#332](https://github.com/request/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup) -- [#343](https://github.com/request/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf) -- [#320](https://github.com/request/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris) -- [#322](https://github.com/request/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo) -- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@strk) -- [#318](https://github.com/request/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs) -- [#317](https://github.com/request/request/pull/317) Workaround for #313 (@isaacs) -- [#293](https://github.com/request/request/pull/293) Allow parser errors to bubble up to request (@mscdex) -- [#290](https://github.com/request/request/pull/290) A test for #289 (@isaacs) -- [#280](https://github.com/request/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1) -- [#207](https://github.com/request/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs) -- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas) -- [#272](https://github.com/request/request/pull/272) Boundary begins with CRLF? (@elspoono, @timshadel, @naholyr, @nanodocumet, @TehShrike) -- [#284](https://github.com/request/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry) -- [#241](https://github.com/request/request/pull/241) Composability updates suggested by issue #239 (@polotek) -- [#282](https://github.com/request/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock) -- [#279](https://github.com/request/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin) -- [#273](https://github.com/request/request/pull/273) Pipe back pressure issue (@mafintosh) -- [#268](https://github.com/request/request/pull/268) I'm not OCD seriously (@TehShrike) -- [#263](https://github.com/request/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet) -- [#265](https://github.com/request/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr) -- [#262](https://github.com/request/request/pull/262) JSON test should check for equality (@timshadel) -- [#261](https://github.com/request/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel) -- [#249](https://github.com/request/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges, @polotek, @zephrax, @jeromegn) -- [#255](https://github.com/request/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1) -- [#260](https://github.com/request/request/pull/260) fixed just another leak of 'i' (@sreuter) -- [#246](https://github.com/request/request/pull/246) Fixing the set-cookie header (@jeromegn) -- [#243](https://github.com/request/request/pull/243) Dynamic boundary (@zephrax) -- [#240](https://github.com/request/request/pull/240) don't error when null is passed for options (@polotek) -- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso) -- [#224](https://github.com/request/request/pull/224) Multipart content-type change (@janjongboom) -- [#217](https://github.com/request/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup) -- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@milewise) -- [#199](https://github.com/request/request/pull/199) Tunnel (@isaacs) -- [#198](https://github.com/request/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs) -- [#197](https://github.com/request/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs) -- [#193](https://github.com/request/request/pull/193) Fixes GH-119 (@goatslacker) -- [#188](https://github.com/request/request/pull/188) Add abort support to the returned request (@itay) -- [#176](https://github.com/request/request/pull/176) Querystring option (@csainty) -- [#182](https://github.com/request/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63) -- [#180](https://github.com/request/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63) -- [#179](https://github.com/request/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack) -- [#177](https://github.com/request/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63) -- [#170](https://github.com/request/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes) -- [#168](https://github.com/request/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby) -- [#161](https://github.com/request/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou) -- [#162](https://github.com/request/request/pull/162) Fix issue #159 (@dpetukhov) -- [#90](https://github.com/request/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes) -- [#148](https://github.com/request/request/pull/148) Retry Agent (@thejh) -- [#146](https://github.com/request/request/pull/146) Multipart should respect content-type if previously set (@apeace) -- [#144](https://github.com/request/request/pull/144) added "form" option to readme (@petejkim) -- [#133](https://github.com/request/request/pull/133) Fixed cookies parsing (@afanasy) -- [#135](https://github.com/request/request/pull/135) host vs hostname (@iangreenleaf) -- [#132](https://github.com/request/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson) -- [#112](https://github.com/request/request/pull/112) Support using a custom http-like module (@jhs) -- [#104](https://github.com/request/request/pull/104) Cookie handling contains bugs (@janjongboom) -- [#121](https://github.com/request/request/pull/121) Another patch for cookie handling regression (@jhurliman) -- [#117](https://github.com/request/request/pull/117) Remove the global `i` (@3rd-Eden) -- [#110](https://github.com/request/request/pull/110) Update to Iris Couch URL (@jhs) -- [#86](https://github.com/request/request/pull/86) Can't post binary to multipart requests (@kkaefer) -- [#105](https://github.com/request/request/pull/105) added test for proxy option. (@dominictarr) -- [#102](https://github.com/request/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex) -- [#97](https://github.com/request/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs) -- [#96](https://github.com/request/request/pull/96) Authless parsed url host support (@isaacs) -- [#81](https://github.com/request/request/pull/81) Enhance redirect handling (@danmactough) -- [#78](https://github.com/request/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs) -- [#76](https://github.com/request/request/pull/76) Bug when a request fails and a timeout is set (@Marsup) -- [#70](https://github.com/request/request/pull/70) add test script to package.json (@isaacs, @aheckmann) -- [#73](https://github.com/request/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs) -- [#69](https://github.com/request/request/pull/69) Flatten chunked requests properly (@isaacs) -- [#67](https://github.com/request/request/pull/67) fixed global variable leaks (@aheckmann) -- [#66](https://github.com/request/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod) -- [#53](https://github.com/request/request/pull/53) Parse json: Issue #51 (@benatkin) -- [#45](https://github.com/request/request/pull/45) Added timeout option (@mbrevoort) -- [#35](https://github.com/request/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli) -- [#31](https://github.com/request/request/pull/31) Error on piping a request to a destination (@tobowers) \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md deleted file mode 100644 index 8aa6999acd8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/CONTRIBUTING.md +++ /dev/null @@ -1,81 +0,0 @@ - -# Contributing to Request - -:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: - -The following is a set of guidelines for contributing to Request and its packages, which are hosted in the [Request Organization](https://github.com/request) on GitHub. -These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request. - - -## Submitting an Issue - -1. Provide a small self **sufficient** code example to **reproduce** the issue. -2. Run your test code using [request-debug](https://github.com/request/request-debug) and copy/paste the results inside the issue. -3. You should **always** use fenced code blocks when submitting code examples or any other formatted output: -
-  ```js
-  put your javascript code here
-  ```
-
-  ```
-  put any other formatted output here,
-  like for example the one returned from using request-debug
-  ```
-  
- -If the problem cannot be reliably reproduced, the issue will be marked as `Not enough info (see CONTRIBUTING.md)`. - -If the problem is not related to request the issue will be marked as `Help (please use Stackoverflow)`. - - -## Submitting a Pull Request - -1. In almost all of the cases your PR **needs tests**. Make sure you have any. -2. Run `npm test` locally. Fix any errors before pushing to GitHub. -3. After submitting the PR a build will be triggered on TravisCI. Wait for it to ends and make sure all jobs are passing. - - ------------------------------------------ - - -## Becoming a Contributor - -Individuals making significant and valuable contributions are given -commit-access to the project to contribute as they see fit. This project is -more like an open wiki than a standard guarded open source project. - - -## Rules - -There are a few basic ground-rules for contributors: - -1. **No `--force` pushes** or modifying the Git history in any way. -1. **Non-master branches** ought to be used for ongoing work. -1. **Any** change should be added through Pull Request. -1. **External API changes and significant modifications** ought to be subject - to an **internal pull-request** to solicit feedback from other contributors. -1. Internal pull-requests to solicit feedback are *encouraged* for any other - non-trivial contribution but left to the discretion of the contributor. -1. For significant changes wait a full 24 hours before merging so that active - contributors who are distributed throughout the world have a chance to weigh - in. -1. Contributors should attempt to adhere to the prevailing code-style. -1. Run `npm test` locally before submitting your PR, to catch any easy to miss - style & testing issues. To diagnose test failures, there are two ways to - run a single test file: - - `node_modules/.bin/taper tests/test-file.js` - run using the default - [`taper`](https://github.com/nylen/taper) test reporter. - - `node tests/test-file.js` - view the raw - [tap](https://testanything.org/) output. - - -## Releases - -Declaring formal releases remains the prerogative of the project maintainer. - - -## Changes to this arrangement - -This is an experiment and feedback is welcome! This document may also be -subject to pull-requests or changes by contributors where you believe you have -something valuable to add or change. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE deleted file mode 100644 index a4a9aee0c2f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md deleted file mode 100644 index 81ecac50999..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/README.md +++ /dev/null @@ -1,1097 +0,0 @@ - -# Request - Simplified HTTP client - -[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/) - -[![Build status](https://img.shields.io/travis/request/request/master.svg?style=flat-square)](https://travis-ci.org/request/request) -[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master) -[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request) -[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request) -[![Known Vulnerabilities](https://snyk.io/test/npm/request/badge.svg?style=flat-square)](https://snyk.io/test/npm/request) -[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge) - - -## Super simple to use - -Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. - -```js -var request = require('request'); -request('http://www.google.com', function (error, response, body) { - if (!error && response.statusCode == 200) { - console.log(body) // Show the HTML for the Google homepage. - } -}) -``` - - -## Table of contents - -- [Streaming](#streaming) -- [Forms](#forms) -- [HTTP Authentication](#http-authentication) -- [Custom HTTP Headers](#custom-http-headers) -- [OAuth Signing](#oauth-signing) -- [Proxies](#proxies) -- [Unix Domain Sockets](#unix-domain-sockets) -- [TLS/SSL Protocol](#tlsssl-protocol) -- [Support for HAR 1.2](#support-for-har-12) -- [**All Available Options**](#requestoptions-callback) - -Request also offers [convenience methods](#convenience-methods) like -`request.defaults` and `request.post`, and there are -lots of [usage examples](#examples) and several -[debugging techniques](#debugging). - - ---- - - -## Streaming - -You can stream any response to a file stream. - -```js -request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) -``` - -You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one). - -```js -fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json')) -``` - -Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. - -```js -request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png')) -``` - -Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage). - -```js -request - .get('http://google.com/img.png') - .on('response', function(response) { - console.log(response.statusCode) // 200 - console.log(response.headers['content-type']) // 'image/png' - }) - .pipe(request.put('http://mysite.com/img.png')) -``` - -To easily handle errors when streaming requests, listen to the `error` event before piping: - -```js -request - .get('http://mysite.com/doodle.png') - .on('error', function(err) { - console.log(err) - }) - .pipe(fs.createWriteStream('doodle.png')) -``` - -Now let’s get fancy. - -```js -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - if (req.method === 'PUT') { - req.pipe(request.put('http://mysite.com/doodle.png')) - } else if (req.method === 'GET' || req.method === 'HEAD') { - request.get('http://mysite.com/doodle.png').pipe(resp) - } - } -}) -``` - -You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: - -```js -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - var x = request('http://mysite.com/doodle.png') - req.pipe(x) - x.pipe(resp) - } -}) -``` - -And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :) - -```js -req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) -``` - -Also, none of this new functionality conflicts with requests previous features, it just expands them. - -```js -var r = request.defaults({'proxy':'http://localproxy.com'}) - -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - r.get('http://google.com/doodle.png').pipe(resp) - } -}) -``` - -You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. - -[back to top](#table-of-contents) - - ---- - - -## Forms - -`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. - - -#### application/x-www-form-urlencoded (URL-Encoded Forms) - -URL-encoded forms are simple. - -```js -request.post('http://service.com/upload', {form:{key:'value'}}) -// or -request.post('http://service.com/upload').form({key:'value'}) -// or -request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ }) -``` - - -#### multipart/form-data (Multipart Form Uploads) - -For `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option. - - -```js -var formData = { - // Pass a simple key-value pair - my_field: 'my_value', - // Pass data via Buffers - my_buffer: new Buffer([1, 2, 3]), - // Pass data via Streams - my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), - // Pass multiple values /w an Array - attachments: [ - fs.createReadStream(__dirname + '/attachment1.jpg'), - fs.createReadStream(__dirname + '/attachment2.jpg') - ], - // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS} - // Use case: for some types of streams, you'll need to provide "file"-related information manually. - // See the `form-data` README for more information about options: https://github.com/form-data/form-data - custom_file: { - value: fs.createReadStream('/dev/urandom'), - options: { - filename: 'topsecret.jpg', - contentType: 'image/jpg' - } - } -}; -request.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) { - if (err) { - return console.error('upload failed:', err); - } - console.log('Upload successful! Server responded with:', body); -}); -``` - -For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.) - -```js -// NOTE: Advanced use-case, for normal use see 'formData' usage above -var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...}) -var form = r.form(); -form.append('my_field', 'my_value'); -form.append('my_buffer', new Buffer([1, 2, 3])); -form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'}); -``` -See the [form-data README](https://github.com/form-data/form-data) for more information & examples. - - -#### multipart/related - -Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options. - -```js - request({ - method: 'PUT', - preambleCRLF: true, - postambleCRLF: true, - uri: 'http://service.com/upload', - multipart: [ - { - 'content-type': 'application/json', - body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) - }, - { body: 'I am an attachment' }, - { body: fs.createReadStream('image.png') } - ], - // alternatively pass an object containing additional options - multipart: { - chunked: false, - data: [ - { - 'content-type': 'application/json', - body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) - }, - { body: 'I am an attachment' } - ] - } - }, - function (error, response, body) { - if (error) { - return console.error('upload failed:', error); - } - console.log('Upload successful! Server responded with:', body); - }) -``` - -[back to top](#table-of-contents) - - ---- - - -## HTTP Authentication - -```js -request.get('http://some.server.com/').auth('username', 'password', false); -// or -request.get('http://some.server.com/', { - 'auth': { - 'user': 'username', - 'pass': 'password', - 'sendImmediately': false - } -}); -// or -request.get('http://some.server.com/').auth(null, null, true, 'bearerToken'); -// or -request.get('http://some.server.com/', { - 'auth': { - 'bearer': 'bearerToken' - } -}); -``` - -If passed as an option, `auth` should be a hash containing values: - -- `user` || `username` -- `pass` || `password` -- `sendImmediately` (optional) -- `bearer` (optional) - -The method form takes parameters -`auth(username, password, sendImmediately, bearer)`. - -`sendImmediately` defaults to `true`, which causes a basic or bearer -authentication header to be sent. If `sendImmediately` is `false`, then -`request` will retry with a proper authentication header after receiving a -`401` response from the server (which must contain a `WWW-Authenticate` header -indicating the required authentication method). - -Note that you can also specify basic authentication using the URL itself, as -detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the -`user:password` before the host with an `@` sign: - -```js -var username = 'username', - password = 'password', - url = 'http://' + username + ':' + password + '@some.server.com'; - -request({url: url}, function (error, response, body) { - // Do more stuff with 'body' here -}); -``` - -Digest authentication is supported, but it only works with `sendImmediately` -set to `false`; otherwise `request` will send basic authentication on the -initial request, which will probably cause the request to fail. - -Bearer authentication is supported, and is activated when the `bearer` value is -available. The value may be either a `String` or a `Function` returning a -`String`. Using a function to supply the bearer token is particularly useful if -used in conjunction with `defaults` to allow a single function to supply the -last known token at the time of sending a request, or to compute one on the fly. - -[back to top](#table-of-contents) - - ---- - - -## Custom HTTP Headers - -HTTP Headers, such as `User-Agent`, can be set in the `options` object. -In the example below, we call the github API to find out the number -of stars and forks for the request repository. This requires a -custom `User-Agent` header as well as https. - -```js -var request = require('request'); - -var options = { - url: 'https://api.github.com/repos/request/request', - headers: { - 'User-Agent': 'request' - } -}; - -function callback(error, response, body) { - if (!error && response.statusCode == 200) { - var info = JSON.parse(body); - console.log(info.stargazers_count + " Stars"); - console.log(info.forks_count + " Forks"); - } -} - -request(options, callback); -``` - -[back to top](#table-of-contents) - - ---- - - -## OAuth Signing - -[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The -default signing algorithm is -[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2): - -```js -// OAuth1.0 - 3-legged server side flow (Twitter example) -// step 1 -var qs = require('querystring') - , oauth = - { callback: 'http://mysite.com/callback/' - , consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - } - , url = 'https://api.twitter.com/oauth/request_token' - ; -request.post({url:url, oauth:oauth}, function (e, r, body) { - // Ideally, you would take the body in the response - // and construct a URL that a user clicks on (like a sign in button). - // The verifier is only available in the response after a user has - // verified with twitter that they are authorizing your app. - - // step 2 - var req_data = qs.parse(body) - var uri = 'https://api.twitter.com/oauth/authenticate' - + '?' + qs.stringify({oauth_token: req_data.oauth_token}) - // redirect the user to the authorize uri - - // step 3 - // after the user is redirected back to your server - var auth_data = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: auth_data.oauth_token - , token_secret: req_data.oauth_token_secret - , verifier: auth_data.oauth_verifier - } - , url = 'https://api.twitter.com/oauth/access_token' - ; - request.post({url:url, oauth:oauth}, function (e, r, body) { - // ready to make signed requests on behalf of the user - var perm_data = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: perm_data.oauth_token - , token_secret: perm_data.oauth_token_secret - } - , url = 'https://api.twitter.com/1.1/users/show.json' - , qs = - { screen_name: perm_data.screen_name - , user_id: perm_data.user_id - } - ; - request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) { - console.log(user) - }) - }) -}) -``` - -For [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make -the following changes to the OAuth options object: -* Pass `signature_method : 'RSA-SHA1'` -* Instead of `consumer_secret`, specify a `private_key` string in - [PEM format](http://how2ssl.com/articles/working_with_pem_files/) - -For [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make -the following changes to the OAuth options object: -* Pass `signature_method : 'PLAINTEXT'` - -To send OAuth parameters via query params or in a post body as described in The -[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param) -section of the oauth1 spec: -* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth - options object. -* `transport_method` defaults to `'header'` - -To use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either -* Manually generate the body hash and pass it as a string `body_hash: '...'` -* Automatically generate the body hash by passing `body_hash: true` - -[back to top](#table-of-contents) - - ---- - - -## Proxies - -If you specify a `proxy` option, then the request (and any subsequent -redirects) will be sent via a connection to the proxy server. - -If your endpoint is an `https` url, and you are using a proxy, then -request will send a `CONNECT` request to the proxy server *first*, and -then use the supplied connection to connect to the endpoint. - -That is, first it will make a request like: - -``` -HTTP/1.1 CONNECT endpoint-server.com:80 -Host: proxy-server.com -User-Agent: whatever user agent you specify -``` - -and then the proxy server make a TCP connection to `endpoint-server` -on port `80`, and return a response that looks like: - -``` -HTTP/1.1 200 OK -``` - -At this point, the connection is left open, and the client is -communicating directly with the `endpoint-server.com` machine. - -See [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel) -for more information. - -By default, when proxying `http` traffic, request will simply make a -standard proxied `http` request. This is done by making the `url` -section of the initial line of the request a fully qualified url to -the endpoint. - -For example, it will make a single request that looks like: - -``` -HTTP/1.1 GET http://endpoint-server.com/some-url -Host: proxy-server.com -Other-Headers: all go here - -request body or whatever -``` - -Because a pure "http over http" tunnel offers no additional security -or other features, it is generally simpler to go with a -straightforward HTTP proxy in this case. However, if you would like -to force a tunneling proxy, you may set the `tunnel` option to `true`. - -You can also make a standard proxied `http` request by explicitly setting -`tunnel : false`, but **note that this will allow the proxy to see the traffic -to/from the destination server**. - -If you are using a tunneling proxy, you may set the -`proxyHeaderWhiteList` to share certain headers with the proxy. - -You can also set the `proxyHeaderExclusiveList` to share certain -headers only with the proxy and not with destination host. - -By default, this set is: - -``` -accept -accept-charset -accept-encoding -accept-language -accept-ranges -cache-control -content-encoding -content-language -content-length -content-location -content-md5 -content-range -content-type -connection -date -expect -max-forwards -pragma -proxy-authorization -referer -te -transfer-encoding -user-agent -via -``` - -Note that, when using a tunneling proxy, the `proxy-authorization` -header and any headers from custom `proxyHeaderExclusiveList` are -*never* sent to the endpoint server, but only to the proxy server. - - -### Controlling proxy behaviour using environment variables - -The following environment variables are respected by `request`: - - * `HTTP_PROXY` / `http_proxy` - * `HTTPS_PROXY` / `https_proxy` - * `NO_PROXY` / `no_proxy` - -When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request. - -`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables. - -Here's some examples of valid `no_proxy` values: - - * `google.com` - don't proxy HTTP/HTTPS requests to Google. - * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google. - * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo! - * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether. - -[back to top](#table-of-contents) - - ---- - - -## UNIX Domain Sockets - -`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme: - -```js -/* Pattern */ 'http://unix:SOCKET:PATH' -/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path') -``` - -Note: The `SOCKET` path is assumed to be absolute to the root of the host file system. - -[back to top](#table-of-contents) - - ---- - - -## TLS/SSL Protocol - -TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be -set directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent). - -```js -var fs = require('fs') - , path = require('path') - , certFile = path.resolve(__dirname, 'ssl/client.crt') - , keyFile = path.resolve(__dirname, 'ssl/client.key') - , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem') - , request = require('request'); - -var options = { - url: 'https://api.some-server.com/', - cert: fs.readFileSync(certFile), - key: fs.readFileSync(keyFile), - passphrase: 'password', - ca: fs.readFileSync(caFile) -}; - -request.get(options); -``` - -### Using `options.agentOptions` - -In the example below, we call an API requires client side SSL certificate -(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol: - -```js -var fs = require('fs') - , path = require('path') - , certFile = path.resolve(__dirname, 'ssl/client.crt') - , keyFile = path.resolve(__dirname, 'ssl/client.key') - , request = require('request'); - -var options = { - url: 'https://api.some-server.com/', - agentOptions: { - cert: fs.readFileSync(certFile), - key: fs.readFileSync(keyFile), - // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format: - // pfx: fs.readFileSync(pfxFilePath), - passphrase: 'password', - securityOptions: 'SSL_OP_NO_SSLv3' - } -}; - -request.get(options); -``` - -It is able to force using SSLv3 only by specifying `secureProtocol`: - -```js -request.get({ - url: 'https://api.some-server.com/', - agentOptions: { - secureProtocol: 'SSLv3_method' - } -}); -``` - -It is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs). -This can be useful, for example, when using self-signed certificates. -To require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`. -The certificate the domain presents must be signed by the root certificate specified: - -```js -request.get({ - url: 'https://api.some-server.com/', - agentOptions: { - ca: fs.readFileSync('ca.cert.pem') - } -}); -``` - -[back to top](#table-of-contents) - - ---- - -## Support for HAR 1.2 - -The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`. - -a validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching. - -```js - var request = require('request') - request({ - // will be ignored - method: 'GET', - uri: 'http://www.google.com', - - // HTTP Archive Request Object - har: { - url: 'http://www.mockbin.com/har', - method: 'POST', - headers: [ - { - name: 'content-type', - value: 'application/x-www-form-urlencoded' - } - ], - postData: { - mimeType: 'application/x-www-form-urlencoded', - params: [ - { - name: 'foo', - value: 'bar' - }, - { - name: 'hello', - value: 'world' - } - ] - } - } - }) - - // a POST request will be sent to http://www.mockbin.com - // with body an application/x-www-form-urlencoded body: - // foo=bar&hello=world -``` - -[back to top](#table-of-contents) - - ---- - -## request(options, callback) - -The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. - -- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` -- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string. -- `method` - http method (default: `"GET"`) -- `headers` - http headers (default: `{}`) - ---- - -- `qs` - object containing querystring values to be appended to the `uri` -- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}` -- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat` -- `useQuerystring` - If true, use `querystring` to stringify and parse - querystrings, otherwise use `qs` (default: `false`). Set this option to - `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the - default `foo[0]=bar&foo[1]=baz`. - ---- - -- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object. -- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above. -- `formData` - Data to pass for a `multipart/form-data` request. See - [Forms](#forms) section above. -- `multipart` - array of objects which contain their own headers and `body` - attributes. Sends a `multipart/related` request. See [Forms](#forms) section - above. - - Alternatively you can pass in an object `{chunked: false, data: []}` where - `chunked` is used to specify whether the request is sent in - [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) - In non-chunked requests, data items with body streams are not allowed. -- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request. -- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request. -- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. -- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body. -- `jsonReplacer` - a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that will be passed to `JSON.stringify()` when stringifying a JSON request body. - ---- - -- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above. -- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. -- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). -- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first. -- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. - ---- - -- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise. -- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) -- `maxRedirects` - the maximum number of redirects to follow (default: `10`) -- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain. - ---- - -- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) -- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below. -- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) - ---- - -- `agent` - `http(s).Agent` instance to use -- `agentClass` - alternatively specify your agent's class name -- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions). -- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+ -- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified. - - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`). - - Note that if you are sending multiple requests in a loop and creating - multiple new `pool` objects, `maxSockets` will not work as intended. To - work around this, either use [`request.defaults`](#requestdefaultsoptions) - with your pool options or create the pool object with the `maxSockets` - property outside of the loop. -- `timeout` - Integer containing the number of milliseconds to wait for a -server to send response headers (and start the response body) before aborting -the request. Note that if the underlying TCP connection cannot be established, -the OS-wide TCP connection timeout will overrule the `timeout` option ([the -default in Linux can be anywhere from 20-120 seconds][linux-timeout]). - -[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout - ---- - -- `localAddress` - Local interface to bind for network connections. -- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) -- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. -- `tunnel` - controls the behavior of - [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling) - as follows: - - `undefined` (default) - `true` if the destination is `https`, `false` otherwise - - `true` - always tunnel to the destination by making a `CONNECT` request to - the proxy - - `false` - request the destination as a `GET` request. -- `proxyHeaderWhiteList` - A whitelist of headers to send to a - tunneling proxy. -- `proxyHeaderExclusiveList` - A whitelist of headers to send - exclusively to a tunneling proxy and not to destination. - ---- - -- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property. -- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)* -- `callback` - alternatively pass the request's callback in the options object - -The callback argument gets 3 arguments: - -1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) -2. An [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object -3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) - -[back to top](#table-of-contents) - - ---- - -## Convenience methods - -There are also shorthand methods for different HTTP METHODs and some other conveniences. - - -### request.defaults(options) - -This method **returns a wrapper** around the normal request API that defaults -to whatever options you pass to it. - -**Note:** `request.defaults()` **does not** modify the global request API; -instead, it **returns a wrapper** that has your default settings applied to it. - -**Note:** You can call `.defaults()` on the wrapper that is returned from -`request.defaults` to add/override defaults that were previously defaulted. - -For example: -```js -//requests using baseRequest() will set the 'x-token' header -var baseRequest = request.defaults({ - headers: {'x-token': 'my-token'} -}) - -//requests using specialRequest() will include the 'x-token' header set in -//baseRequest and will also include the 'special' header -var specialRequest = baseRequest.defaults({ - headers: {special: 'special value'} -}) -``` - -### request.put - -Same as `request()`, but defaults to `method: "PUT"`. - -```js -request.put(url) -``` - -### request.patch - -Same as `request()`, but defaults to `method: "PATCH"`. - -```js -request.patch(url) -``` - -### request.post - -Same as `request()`, but defaults to `method: "POST"`. - -```js -request.post(url) -``` - -### request.head - -Same as `request()`, but defaults to `method: "HEAD"`. - -```js -request.head(url) -``` - -### request.del / request.delete - -Same as `request()`, but defaults to `method: "DELETE"`. - -```js -request.del(url) -request.delete(url) -``` - -### request.get - -Same as `request()` (for uniformity). - -```js -request.get(url) -``` -### request.cookie - -Function that creates a new cookie. - -```js -request.cookie('key1=value1') -``` -### request.jar() - -Function that creates a new cookie jar. - -```js -request.jar() -``` - -[back to top](#table-of-contents) - - ---- - - -## Debugging - -There are at least three ways to debug the operation of `request`: - -1. Launch the node process like `NODE_DEBUG=request node script.js` - (`lib,request,otherlib` works too). - -2. Set `require('request').debug = true` at any time (this does the same thing - as #1). - -3. Use the [request-debug module](https://github.com/request/request-debug) to - view request and response headers and bodies. - -[back to top](#table-of-contents) - - ---- - -## Timeouts - -Most requests to external servers should have a timeout attached, in case the -server is not responding in a timely manner. Without a timeout, your code may -have a socket open/consume resources for minutes or more. - -There are two main types of timeouts: **connection timeouts** and **read -timeouts**. A connect timeout occurs if the timeout is hit while your client is -attempting to establish a connection to a remote machine (corresponding to the -[connect() call][connect] on the socket). A read timeout occurs any time the -server is too slow to send back a part of the response. - -These two situations have widely different implications for what went wrong -with the request, so it's useful to be able to distinguish them. You can detect -timeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you -can detect whether the timeout was a connection timeout by checking if the -`err.connect` property is set to `true`. - -```js -request.get('http://10.255.255.1', {timeout: 1500}, function(err) { - console.log(err.code === 'ETIMEDOUT'); - // Set to `true` if the timeout was a connection timeout, `false` or - // `undefined` otherwise. - console.log(err.connect === true); - process.exit(0); -}); -``` - -[connect]: http://linux.die.net/man/2/connect - -## Examples: - -```js - var request = require('request') - , rand = Math.floor(Math.random()*100000000).toString() - ; - request( - { method: 'PUT' - , uri: 'http://mikeal.iriscouch.com/testjs/' + rand - , multipart: - [ { 'content-type': 'application/json' - , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) - } - , { body: 'I am an attachment' } - ] - } - , function (error, response, body) { - if(response.statusCode == 201){ - console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand) - } else { - console.log('error: '+ response.statusCode) - console.log(body) - } - } - ) -``` - -For backwards-compatibility, response compression is not supported by default. -To accept gzip-compressed responses, set the `gzip` option to `true`. Note -that the body data passed through `request` is automatically decompressed -while the response object is unmodified and will contain compressed data if -the server sent a compressed response. - -```js - var request = require('request') - request( - { method: 'GET' - , uri: 'http://www.google.com' - , gzip: true - } - , function (error, response, body) { - // body is the decompressed response body - console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity')) - console.log('the decoded data is: ' + body) - } - ).on('data', function(data) { - // decompressed data as it is received - console.log('decoded chunk: ' + data) - }) - .on('response', function(response) { - // unmodified http.IncomingMessage object - response.on('data', function(data) { - // compressed data as it is received - console.log('received ' + data.length + ' bytes of compressed data') - }) - }) -``` - -Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). - -```js -var request = request.defaults({jar: true}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` - -To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) - -```js -var j = request.jar() -var request = request.defaults({jar:j}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` - -OR - -```js -var j = request.jar(); -var cookie = request.cookie('key1=value1'); -var url = 'http://www.google.com'; -j.setCookie(cookie, url); -request({url: url, jar: j}, function () { - request('http://images.google.com') -}) -``` - -To use a custom cookie store (such as a -[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore) -which supports saving to and restoring from JSON files), pass it as a parameter -to `request.jar()`: - -```js -var FileCookieStore = require('tough-cookie-filestore'); -// NOTE - currently the 'cookies.json' file must already exist! -var j = request.jar(new FileCookieStore('cookies.json')); -request = request.defaults({ jar : j }) -request('http://www.google.com', function() { - request('http://images.google.com') -}) -``` - -The cookie store must be a -[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie) -store and it must support synchronous operations; see the -[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api) -for details. - -To inspect your cookie jar after a request: - -```js -var j = request.jar() -request({url: 'http://www.google.com', jar: j}, function () { - var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..." - var cookies = j.getCookies(url); - // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...] -}) -``` - -[back to top](#table-of-contents) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml deleted file mode 100644 index acd3f33ceb5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ - -comment: false diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js deleted file mode 100755 index 911a90dbb5a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/index.js +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2010-2012 Mikeal Rogers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict' - -var extend = require('extend') - , cookies = require('./lib/cookies') - , helpers = require('./lib/helpers') - -var isFunction = helpers.isFunction - , paramsHaveRequestBody = helpers.paramsHaveRequestBody - - -// organize params for patch, post, put, head, del -function initParams(uri, options, callback) { - if (typeof options === 'function') { - callback = options - } - - var params = {} - if (typeof options === 'object') { - extend(params, options, {uri: uri}) - } else if (typeof uri === 'string') { - extend(params, {uri: uri}) - } else { - extend(params, uri) - } - - params.callback = callback || params.callback - return params -} - -function request (uri, options, callback) { - if (typeof uri === 'undefined') { - throw new Error('undefined is not a valid uri or options object.') - } - - var params = initParams(uri, options, callback) - - if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { - throw new Error('HTTP HEAD requests MUST NOT include a request body.') - } - - return new request.Request(params) -} - -function verbFunc (verb) { - var method = verb.toUpperCase() - return function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.method = method - return request(params, params.callback) - } -} - -// define like this to please codeintel/intellisense IDEs -request.get = verbFunc('get') -request.head = verbFunc('head') -request.post = verbFunc('post') -request.put = verbFunc('put') -request.patch = verbFunc('patch') -request.del = verbFunc('delete') -request['delete'] = verbFunc('delete') - -request.jar = function (store) { - return cookies.jar(store) -} - -request.cookie = function (str) { - return cookies.parse(str) -} - -function wrapRequestMethod (method, options, requester, verb) { - - return function (uri, opts, callback) { - var params = initParams(uri, opts, callback) - - var target = {} - extend(true, target, options, params) - - target.pool = params.pool || options.pool - - if (verb) { - target.method = verb.toUpperCase() - } - - if (isFunction(requester)) { - method = requester - } - - return method(target, target.callback) - } -} - -request.defaults = function (options, requester) { - var self = this - - options = options || {} - - if (typeof options === 'function') { - requester = options - options = {} - } - - var defaults = wrapRequestMethod(self, options, requester) - - var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] - verbs.forEach(function(verb) { - defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) - }) - - defaults.cookie = wrapRequestMethod(self.cookie, options, requester) - defaults.jar = self.jar - defaults.defaults = self.defaults - return defaults -} - -request.forever = function (agentOptions, optionsArg) { - var options = {} - if (optionsArg) { - extend(options, optionsArg) - } - if (agentOptions) { - options.agentOptions = agentOptions - } - - options.forever = true - return request.defaults(options) -} - -// Exports - -module.exports = request -request.Request = require('./request') -request.initParams = initParams - -// Backwards compatibility for request.debug -Object.defineProperty(request, 'debug', { - enumerable : true, - get : function() { - return request.Request.debug - }, - set : function(debug) { - request.Request.debug = debug - } -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js deleted file mode 100644 index 1cb695216f6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/auth.js +++ /dev/null @@ -1,168 +0,0 @@ -'use strict' - -var caseless = require('caseless') - , uuid = require('node-uuid') - , helpers = require('./helpers') - -var md5 = helpers.md5 - , toBase64 = helpers.toBase64 - - -function Auth (request) { - // define all public properties here - this.request = request - this.hasAuth = false - this.sentAuth = false - this.bearerToken = null - this.user = null - this.pass = null -} - -Auth.prototype.basic = function (user, pass, sendImmediately) { - var self = this - if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { - self.request.emit('error', new Error('auth() received invalid user or password')) - } - self.user = user - self.pass = pass - self.hasAuth = true - var header = user + ':' + (pass || '') - if (sendImmediately || typeof sendImmediately === 'undefined') { - var authHeader = 'Basic ' + toBase64(header) - self.sentAuth = true - return authHeader - } -} - -Auth.prototype.bearer = function (bearer, sendImmediately) { - var self = this - self.bearerToken = bearer - self.hasAuth = true - if (sendImmediately || typeof sendImmediately === 'undefined') { - if (typeof bearer === 'function') { - bearer = bearer() - } - var authHeader = 'Bearer ' + (bearer || '') - self.sentAuth = true - return authHeader - } -} - -Auth.prototype.digest = function (method, path, authHeader) { - // TODO: More complete implementation of RFC 2617. - // - handle challenge.domain - // - support qop="auth-int" only - // - handle Authentication-Info (not necessarily?) - // - check challenge.stale (not necessarily?) - // - increase nc (not necessarily?) - // For reference: - // http://tools.ietf.org/html/rfc2617#section-3 - // https://github.com/bagder/curl/blob/master/lib/http_digest.c - - var self = this - - var challenge = {} - var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi - for (;;) { - var match = re.exec(authHeader) - if (!match) { - break - } - challenge[match[1]] = match[2] || match[3] - } - - /** - * RFC 2617: handle both MD5 and MD5-sess algorithms. - * - * If the algorithm directive's value is "MD5" or unspecified, then HA1 is - * HA1=MD5(username:realm:password) - * If the algorithm directive's value is "MD5-sess", then HA1 is - * HA1=MD5(MD5(username:realm:password):nonce:cnonce) - */ - var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) { - var ha1 = md5(user + ':' + realm + ':' + pass) - if (algorithm && algorithm.toLowerCase() === 'md5-sess') { - return md5(ha1 + ':' + nonce + ':' + cnonce) - } else { - return ha1 - } - } - - var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' - var nc = qop && '00000001' - var cnonce = qop && uuid().replace(/-/g, '') - var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce) - var ha2 = md5(method + ':' + path) - var digestResponse = qop - ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) - : md5(ha1 + ':' + challenge.nonce + ':' + ha2) - var authValues = { - username: self.user, - realm: challenge.realm, - nonce: challenge.nonce, - uri: path, - qop: qop, - response: digestResponse, - nc: nc, - cnonce: cnonce, - algorithm: challenge.algorithm, - opaque: challenge.opaque - } - - authHeader = [] - for (var k in authValues) { - if (authValues[k]) { - if (k === 'qop' || k === 'nc' || k === 'algorithm') { - authHeader.push(k + '=' + authValues[k]) - } else { - authHeader.push(k + '="' + authValues[k] + '"') - } - } - } - authHeader = 'Digest ' + authHeader.join(', ') - self.sentAuth = true - return authHeader -} - -Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { - var self = this - , request = self.request - - var authHeader - if (bearer === undefined && user === undefined) { - self.request.emit('error', new Error('no auth mechanism defined')) - } else if (bearer !== undefined) { - authHeader = self.bearer(bearer, sendImmediately) - } else { - authHeader = self.basic(user, pass, sendImmediately) - } - if (authHeader) { - request.setHeader('authorization', authHeader) - } -} - -Auth.prototype.onResponse = function (response) { - var self = this - , request = self.request - - if (!self.hasAuth || self.sentAuth) { return null } - - var c = caseless(response.headers) - - var authHeader = c.get('www-authenticate') - var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() - request.debug('reauth', authVerb) - - switch (authVerb) { - case 'basic': - return self.basic(self.user, self.pass, true) - - case 'bearer': - return self.bearer(self.bearerToken, true) - - case 'digest': - return self.digest(request.method, request.path, authHeader) - } -} - -exports.Auth = Auth diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js deleted file mode 100644 index 412c07d63be..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/cookies.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict' - -var tough = require('tough-cookie') - -var Cookie = tough.Cookie - , CookieJar = tough.CookieJar - - -exports.parse = function(str) { - if (str && str.uri) { - str = str.uri - } - if (typeof str !== 'string') { - throw new Error('The cookie function only accepts STRING as param') - } - return Cookie.parse(str, {loose: true}) -} - -// Adapt the sometimes-Async api of tough.CookieJar to our requirements -function RequestJar(store) { - var self = this - self._jar = new CookieJar(store, {looseMode: true}) -} -RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) { - var self = this - return self._jar.setCookieSync(cookieOrStr, uri, options || {}) -} -RequestJar.prototype.getCookieString = function(uri) { - var self = this - return self._jar.getCookieStringSync(uri) -} -RequestJar.prototype.getCookies = function(uri) { - var self = this - return self._jar.getCookiesSync(uri) -} - -exports.jar = function(store) { - return new RequestJar(store) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js deleted file mode 100644 index c2013a6e125..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/getProxyFromURI.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict' - -function formatHostname(hostname) { - // canonicalize the hostname, so that 'oogle.com' won't match 'google.com' - return hostname.replace(/^\.*/, '.').toLowerCase() -} - -function parseNoProxyZone(zone) { - zone = zone.trim().toLowerCase() - - var zoneParts = zone.split(':', 2) - , zoneHost = formatHostname(zoneParts[0]) - , zonePort = zoneParts[1] - , hasPort = zone.indexOf(':') > -1 - - return {hostname: zoneHost, port: zonePort, hasPort: hasPort} -} - -function uriInNoProxy(uri, noProxy) { - var port = uri.port || (uri.protocol === 'https:' ? '443' : '80') - , hostname = formatHostname(uri.hostname) - , noProxyList = noProxy.split(',') - - // iterate through the noProxyList until it finds a match. - return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) { - var isMatchedAt = hostname.indexOf(noProxyZone.hostname) - , hostnameMatched = ( - isMatchedAt > -1 && - (isMatchedAt === hostname.length - noProxyZone.hostname.length) - ) - - if (noProxyZone.hasPort) { - return (port === noProxyZone.port) && hostnameMatched - } - - return hostnameMatched - }) -} - -function getProxyFromURI(uri) { - // Decide the proper request proxy to use based on the request URI object and the - // environmental variables (NO_PROXY, HTTP_PROXY, etc.) - // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html) - - var noProxy = process.env.NO_PROXY || process.env.no_proxy || '' - - // if the noProxy is a wildcard then return null - - if (noProxy === '*') { - return null - } - - // if the noProxy is not empty and the uri is found return null - - if (noProxy !== '' && uriInNoProxy(uri, noProxy)) { - return null - } - - // Check for HTTP or HTTPS Proxy in environment Else default to null - - if (uri.protocol === 'http:') { - return process.env.HTTP_PROXY || - process.env.http_proxy || null - } - - if (uri.protocol === 'https:') { - return process.env.HTTPS_PROXY || - process.env.https_proxy || - process.env.HTTP_PROXY || - process.env.http_proxy || null - } - - // if none of that works, return null - // (What uri protocol are you using then?) - - return null -} - -module.exports = getProxyFromURI diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js deleted file mode 100644 index 30595748781..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/har.js +++ /dev/null @@ -1,215 +0,0 @@ -'use strict' - -var fs = require('fs') -var qs = require('querystring') -var validate = require('har-validator') -var extend = require('extend') - -function Har (request) { - this.request = request -} - -Har.prototype.reducer = function (obj, pair) { - // new property ? - if (obj[pair.name] === undefined) { - obj[pair.name] = pair.value - return obj - } - - // existing? convert to array - var arr = [ - obj[pair.name], - pair.value - ] - - obj[pair.name] = arr - - return obj -} - -Har.prototype.prep = function (data) { - // construct utility properties - data.queryObj = {} - data.headersObj = {} - data.postData.jsonObj = false - data.postData.paramsObj = false - - // construct query objects - if (data.queryString && data.queryString.length) { - data.queryObj = data.queryString.reduce(this.reducer, {}) - } - - // construct headers objects - if (data.headers && data.headers.length) { - // loweCase header keys - data.headersObj = data.headers.reduceRight(function (headers, header) { - headers[header.name] = header.value - return headers - }, {}) - } - - // construct Cookie header - if (data.cookies && data.cookies.length) { - var cookies = data.cookies.map(function (cookie) { - return cookie.name + '=' + cookie.value - }) - - if (cookies.length) { - data.headersObj.cookie = cookies.join('; ') - } - } - - // prep body - function some (arr) { - return arr.some(function (type) { - return data.postData.mimeType.indexOf(type) === 0 - }) - } - - if (some([ - 'multipart/mixed', - 'multipart/related', - 'multipart/form-data', - 'multipart/alternative'])) { - - // reset values - data.postData.mimeType = 'multipart/form-data' - } - - else if (some([ - 'application/x-www-form-urlencoded'])) { - - if (!data.postData.params) { - data.postData.text = '' - } else { - data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) - - // always overwrite - data.postData.text = qs.stringify(data.postData.paramsObj) - } - } - - else if (some([ - 'text/json', - 'text/x-json', - 'application/json', - 'application/x-json'])) { - - data.postData.mimeType = 'application/json' - - if (data.postData.text) { - try { - data.postData.jsonObj = JSON.parse(data.postData.text) - } catch (e) { - this.request.debug(e) - - // force back to text/plain - data.postData.mimeType = 'text/plain' - } - } - } - - return data -} - -Har.prototype.options = function (options) { - // skip if no har property defined - if (!options.har) { - return options - } - - var har = {} - extend(har, options.har) - - // only process the first entry - if (har.log && har.log.entries) { - har = har.log.entries[0] - } - - // add optional properties to make validation successful - har.url = har.url || options.url || options.uri || options.baseUrl || '/' - har.httpVersion = har.httpVersion || 'HTTP/1.1' - har.queryString = har.queryString || [] - har.headers = har.headers || [] - har.cookies = har.cookies || [] - har.postData = har.postData || {} - har.postData.mimeType = har.postData.mimeType || 'application/octet-stream' - - har.bodySize = 0 - har.headersSize = 0 - har.postData.size = 0 - - if (!validate.request(har)) { - return options - } - - // clean up and get some utility properties - var req = this.prep(har) - - // construct new options - if (req.url) { - options.url = req.url - } - - if (req.method) { - options.method = req.method - } - - if (Object.keys(req.queryObj).length) { - options.qs = req.queryObj - } - - if (Object.keys(req.headersObj).length) { - options.headers = req.headersObj - } - - function test (type) { - return req.postData.mimeType.indexOf(type) === 0 - } - if (test('application/x-www-form-urlencoded')) { - options.form = req.postData.paramsObj - } - else if (test('application/json')) { - if (req.postData.jsonObj) { - options.body = req.postData.jsonObj - options.json = true - } - } - else if (test('multipart/form-data')) { - options.formData = {} - - req.postData.params.forEach(function (param) { - var attachment = {} - - if (!param.fileName && !param.fileName && !param.contentType) { - options.formData[param.name] = param.value - return - } - - // attempt to read from disk! - if (param.fileName && !param.value) { - attachment.value = fs.createReadStream(param.fileName) - } else if (param.value) { - attachment.value = param.value - } - - if (param.fileName) { - attachment.options = { - filename: param.fileName, - contentType: param.contentType ? param.contentType : null - } - } - - options.formData[param.name] = attachment - }) - } - else { - if (req.postData.text) { - options.body = req.postData.text - } - } - - return options -} - -exports.Har = Har diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js deleted file mode 100644 index 356ff748e2f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/helpers.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict' - -var jsonSafeStringify = require('json-stringify-safe') - , crypto = require('crypto') - -function deferMethod() { - if (typeof setImmediate === 'undefined') { - return process.nextTick - } - - return setImmediate -} - -function isFunction(value) { - return typeof value === 'function' -} - -function paramsHaveRequestBody(params) { - return ( - params.body || - params.requestBodyStream || - (params.json && typeof params.json !== 'boolean') || - params.multipart - ) -} - -function safeStringify (obj, replacer) { - var ret - try { - ret = JSON.stringify(obj, replacer) - } catch (e) { - ret = jsonSafeStringify(obj, replacer) - } - return ret -} - -function md5 (str) { - return crypto.createHash('md5').update(str).digest('hex') -} - -function isReadStream (rs) { - return rs.readable && rs.path && rs.mode -} - -function toBase64 (str) { - return (new Buffer(str || '', 'utf8')).toString('base64') -} - -function copy (obj) { - var o = {} - Object.keys(obj).forEach(function (i) { - o[i] = obj[i] - }) - return o -} - -function version () { - var numbers = process.version.replace('v', '').split('.') - return { - major: parseInt(numbers[0], 10), - minor: parseInt(numbers[1], 10), - patch: parseInt(numbers[2], 10) - } -} - -exports.isFunction = isFunction -exports.paramsHaveRequestBody = paramsHaveRequestBody -exports.safeStringify = safeStringify -exports.md5 = md5 -exports.isReadStream = isReadStream -exports.toBase64 = toBase64 -exports.copy = copy -exports.version = version -exports.defer = deferMethod() diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js deleted file mode 100644 index c1281726187..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/multipart.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict' - -var uuid = require('node-uuid') - , CombinedStream = require('combined-stream') - , isstream = require('isstream') - - -function Multipart (request) { - this.request = request - this.boundary = uuid() - this.chunked = false - this.body = null -} - -Multipart.prototype.isChunked = function (options) { - var self = this - , chunked = false - , parts = options.data || options - - if (!parts.forEach) { - self.request.emit('error', new Error('Argument error, options.multipart.')) - } - - if (options.chunked !== undefined) { - chunked = options.chunked - } - - if (self.request.getHeader('transfer-encoding') === 'chunked') { - chunked = true - } - - if (!chunked) { - parts.forEach(function (part) { - if (typeof part.body === 'undefined') { - self.request.emit('error', new Error('Body attribute missing in multipart.')) - } - if (isstream(part.body)) { - chunked = true - } - }) - } - - return chunked -} - -Multipart.prototype.setHeaders = function (chunked) { - var self = this - - if (chunked && !self.request.hasHeader('transfer-encoding')) { - self.request.setHeader('transfer-encoding', 'chunked') - } - - var header = self.request.getHeader('content-type') - - if (!header || header.indexOf('multipart') === -1) { - self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) - } else { - if (header.indexOf('boundary') !== -1) { - self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1') - } else { - self.request.setHeader('content-type', header + '; boundary=' + self.boundary) - } - } -} - -Multipart.prototype.build = function (parts, chunked) { - var self = this - var body = chunked ? new CombinedStream() : [] - - function add (part) { - if (typeof part === 'number') { - part = part.toString() - } - return chunked ? body.append(part) : body.push(new Buffer(part)) - } - - if (self.request.preambleCRLF) { - add('\r\n') - } - - parts.forEach(function (part) { - var preamble = '--' + self.boundary + '\r\n' - Object.keys(part).forEach(function (key) { - if (key === 'body') { return } - preamble += key + ': ' + part[key] + '\r\n' - }) - preamble += '\r\n' - add(preamble) - add(part.body) - add('\r\n') - }) - add('--' + self.boundary + '--') - - if (self.request.postambleCRLF) { - add('\r\n') - } - - return body -} - -Multipart.prototype.onRequest = function (options) { - var self = this - - var chunked = self.isChunked(options) - , parts = options.data || options - - self.setHeaders(chunked) - self.chunked = chunked - self.body = self.build(parts, chunked) -} - -exports.Multipart = Multipart diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js deleted file mode 100644 index c24209b897a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/oauth.js +++ /dev/null @@ -1,147 +0,0 @@ -'use strict' - -var url = require('url') - , qs = require('qs') - , caseless = require('caseless') - , uuid = require('node-uuid') - , oauth = require('oauth-sign') - , crypto = require('crypto') - - -function OAuth (request) { - this.request = request - this.params = null -} - -OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) { - var oa = {} - for (var i in _oauth) { - oa['oauth_' + i] = _oauth[i] - } - if (!oa.oauth_version) { - oa.oauth_version = '1.0' - } - if (!oa.oauth_timestamp) { - oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString() - } - if (!oa.oauth_nonce) { - oa.oauth_nonce = uuid().replace(/-/g, '') - } - if (!oa.oauth_signature_method) { - oa.oauth_signature_method = 'HMAC-SHA1' - } - - var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key - delete oa.oauth_consumer_secret - delete oa.oauth_private_key - - var token_secret = oa.oauth_token_secret - delete oa.oauth_token_secret - - var realm = oa.oauth_realm - delete oa.oauth_realm - delete oa.oauth_transport_method - - var baseurl = uri.protocol + '//' + uri.host + uri.pathname - var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&')) - - oa.oauth_signature = oauth.sign( - oa.oauth_signature_method, - method, - baseurl, - params, - consumer_secret_or_private_key, - token_secret) - - if (realm) { - oa.realm = realm - } - - return oa -} - -OAuth.prototype.buildBodyHash = function(_oauth, body) { - if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) { - this.request.emit('error', new Error('oauth: ' + _oauth.signature_method + - ' signature_method not supported with body_hash signing.')) - } - - var shasum = crypto.createHash('sha1') - shasum.update(body || '') - var sha1 = shasum.digest('hex') - - return new Buffer(sha1).toString('base64') -} - -OAuth.prototype.concatParams = function (oa, sep, wrap) { - wrap = wrap || '' - - var params = Object.keys(oa).filter(function (i) { - return i !== 'realm' && i !== 'oauth_signature' - }).sort() - - if (oa.realm) { - params.splice(0, 0, 'realm') - } - params.push('oauth_signature') - - return params.map(function (i) { - return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap - }).join(sep) -} - -OAuth.prototype.onRequest = function (_oauth) { - var self = this - self.params = _oauth - - var uri = self.request.uri || {} - , method = self.request.method || '' - , headers = caseless(self.request.headers) - , body = self.request.body || '' - , qsLib = self.request.qsLib || qs - - var form - , query - , contentType = headers.get('content-type') || '' - , formContentType = 'application/x-www-form-urlencoded' - , transport = _oauth.transport_method || 'header' - - if (contentType.slice(0, formContentType.length) === formContentType) { - contentType = formContentType - form = body - } - if (uri.query) { - query = uri.query - } - if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) { - self.request.emit('error', new Error('oauth: transport_method of body requires POST ' + - 'and content-type ' + formContentType)) - } - - if (!form && typeof _oauth.body_hash === 'boolean') { - _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString()) - } - - var oa = self.buildParams(_oauth, uri, method, query, form, qsLib) - - switch (transport) { - case 'header': - self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"')) - break - - case 'query': - var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&') - self.request.uri = url.parse(href) - self.request.path = self.request.uri.path - break - - case 'body': - self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&') - break - - default: - self.request.emit('error', new Error('oauth: transport_method invalid')) - } -} - -exports.OAuth = OAuth diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js deleted file mode 100644 index baf5e8021f4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/querystring.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict' - -var qs = require('qs') - , querystring = require('querystring') - - -function Querystring (request) { - this.request = request - this.lib = null - this.useQuerystring = null - this.parseOptions = null - this.stringifyOptions = null -} - -Querystring.prototype.init = function (options) { - if (this.lib) {return} - - this.useQuerystring = options.useQuerystring - this.lib = (this.useQuerystring ? querystring : qs) - - this.parseOptions = options.qsParseOptions || {} - this.stringifyOptions = options.qsStringifyOptions || {} -} - -Querystring.prototype.stringify = function (obj) { - return (this.useQuerystring) - ? this.rfc3986(this.lib.stringify(obj, - this.stringifyOptions.sep || null, - this.stringifyOptions.eq || null, - this.stringifyOptions)) - : this.lib.stringify(obj, this.stringifyOptions) -} - -Querystring.prototype.parse = function (str) { - return (this.useQuerystring) - ? this.lib.parse(str, - this.parseOptions.sep || null, - this.parseOptions.eq || null, - this.parseOptions) - : this.lib.parse(str, this.parseOptions) -} - -Querystring.prototype.rfc3986 = function (str) { - return str.replace(/[!'()*]/g, function (c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -Querystring.prototype.unescape = querystring.unescape - -exports.Querystring = Querystring diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js deleted file mode 100644 index 040dfe0e03d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/redirect.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict' - -var url = require('url') -var isUrl = /^https?:/ - -function Redirect (request) { - this.request = request - this.followRedirect = true - this.followRedirects = true - this.followAllRedirects = false - this.allowRedirect = function () {return true} - this.maxRedirects = 10 - this.redirects = [] - this.redirectsFollowed = 0 - this.removeRefererHeader = false -} - -Redirect.prototype.onRequest = function (options) { - var self = this - - if (options.maxRedirects !== undefined) { - self.maxRedirects = options.maxRedirects - } - if (typeof options.followRedirect === 'function') { - self.allowRedirect = options.followRedirect - } - if (options.followRedirect !== undefined) { - self.followRedirects = !!options.followRedirect - } - if (options.followAllRedirects !== undefined) { - self.followAllRedirects = options.followAllRedirects - } - if (self.followRedirects || self.followAllRedirects) { - self.redirects = self.redirects || [] - } - if (options.removeRefererHeader !== undefined) { - self.removeRefererHeader = options.removeRefererHeader - } -} - -Redirect.prototype.redirectTo = function (response) { - var self = this - , request = self.request - - var redirectTo = null - if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { - var location = response.caseless.get('location') - request.debug('redirect', location) - - if (self.followAllRedirects) { - redirectTo = location - } else if (self.followRedirects) { - switch (request.method) { - case 'PATCH': - case 'PUT': - case 'POST': - case 'DELETE': - // Do not follow redirects - break - default: - redirectTo = location - break - } - } - } else if (response.statusCode === 401) { - var authHeader = request._auth.onResponse(response) - if (authHeader) { - request.setHeader('authorization', authHeader) - redirectTo = request.uri - } - } - return redirectTo -} - -Redirect.prototype.onResponse = function (response) { - var self = this - , request = self.request - - var redirectTo = self.redirectTo(response) - if (!redirectTo || !self.allowRedirect.call(request, response)) { - return false - } - - request.debug('redirect to', redirectTo) - - // ignore any potential response body. it cannot possibly be useful - // to us at this point. - // response.resume should be defined, but check anyway before calling. Workaround for browserify. - if (response.resume) { - response.resume() - } - - if (self.redirectsFollowed >= self.maxRedirects) { - request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href)) - return false - } - self.redirectsFollowed += 1 - - if (!isUrl.test(redirectTo)) { - redirectTo = url.resolve(request.uri.href, redirectTo) - } - - var uriPrev = request.uri - request.uri = url.parse(redirectTo) - - // handle the case where we change protocol from https to http or vice versa - if (request.uri.protocol !== uriPrev.protocol) { - delete request.agent - } - - self.redirects.push( - { statusCode : response.statusCode - , redirectUri: redirectTo - } - ) - if (self.followAllRedirects && request.method !== 'HEAD' - && response.statusCode !== 401 && response.statusCode !== 307) { - request.method = 'GET' - } - // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 - delete request.src - delete request.req - delete request._started - if (response.statusCode !== 401 && response.statusCode !== 307) { - // Remove parameters from the previous response, unless this is the second request - // for a server that requires digest authentication. - delete request.body - delete request._form - if (request.headers) { - request.removeHeader('host') - request.removeHeader('content-type') - request.removeHeader('content-length') - if (request.uri.hostname !== request.originalHost.split(':')[0]) { - // Remove authorization if changing hostnames (but not if just - // changing ports or protocols). This matches the behavior of curl: - // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710 - request.removeHeader('authorization') - } - } - } - - if (!self.removeRefererHeader) { - request.setHeader('referer', uriPrev.href) - } - - request.emit('redirect') - - request.init() - - return true -} - -exports.Redirect = Redirect diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js deleted file mode 100644 index bf96a8fec53..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/lib/tunnel.js +++ /dev/null @@ -1,176 +0,0 @@ -'use strict' - -var url = require('url') - , tunnel = require('tunnel-agent') - -var defaultProxyHeaderWhiteList = [ - 'accept', - 'accept-charset', - 'accept-encoding', - 'accept-language', - 'accept-ranges', - 'cache-control', - 'content-encoding', - 'content-language', - 'content-location', - 'content-md5', - 'content-range', - 'content-type', - 'connection', - 'date', - 'expect', - 'max-forwards', - 'pragma', - 'referer', - 'te', - 'user-agent', - 'via' -] - -var defaultProxyHeaderExclusiveList = [ - 'proxy-authorization' -] - -function constructProxyHost(uriObject) { - var port = uriObject.port - , protocol = uriObject.protocol - , proxyHost = uriObject.hostname + ':' - - if (port) { - proxyHost += port - } else if (protocol === 'https:') { - proxyHost += '443' - } else { - proxyHost += '80' - } - - return proxyHost -} - -function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) { - var whiteList = proxyHeaderWhiteList - .reduce(function (set, header) { - set[header.toLowerCase()] = true - return set - }, {}) - - return Object.keys(headers) - .filter(function (header) { - return whiteList[header.toLowerCase()] - }) - .reduce(function (set, header) { - set[header] = headers[header] - return set - }, {}) -} - -function constructTunnelOptions (request, proxyHeaders) { - var proxy = request.proxy - - var tunnelOptions = { - proxy : { - host : proxy.hostname, - port : +proxy.port, - proxyAuth : proxy.auth, - headers : proxyHeaders - }, - headers : request.headers, - ca : request.ca, - cert : request.cert, - key : request.key, - passphrase : request.passphrase, - pfx : request.pfx, - ciphers : request.ciphers, - rejectUnauthorized : request.rejectUnauthorized, - secureOptions : request.secureOptions, - secureProtocol : request.secureProtocol - } - - return tunnelOptions -} - -function constructTunnelFnName(uri, proxy) { - var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http') - var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http') - return [uriProtocol, proxyProtocol].join('Over') -} - -function getTunnelFn(request) { - var uri = request.uri - var proxy = request.proxy - var tunnelFnName = constructTunnelFnName(uri, proxy) - return tunnel[tunnelFnName] -} - - -function Tunnel (request) { - this.request = request - this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList - this.proxyHeaderExclusiveList = [] - if (typeof request.tunnel !== 'undefined') { - this.tunnelOverride = request.tunnel - } -} - -Tunnel.prototype.isEnabled = function () { - var self = this - , request = self.request - // Tunnel HTTPS by default. Allow the user to override this setting. - - // If self.tunnelOverride is set (the user specified a value), use it. - if (typeof self.tunnelOverride !== 'undefined') { - return self.tunnelOverride - } - - // If the destination is HTTPS, tunnel. - if (request.uri.protocol === 'https:') { - return true - } - - // Otherwise, do not use tunnel. - return false -} - -Tunnel.prototype.setup = function (options) { - var self = this - , request = self.request - - options = options || {} - - if (typeof request.proxy === 'string') { - request.proxy = url.parse(request.proxy) - } - - if (!request.proxy || !request.tunnel) { - return false - } - - // Setup Proxy Header Exclusive List and White List - if (options.proxyHeaderWhiteList) { - self.proxyHeaderWhiteList = options.proxyHeaderWhiteList - } - if (options.proxyHeaderExclusiveList) { - self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList - } - - var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList) - var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList) - - // Setup Proxy Headers and Proxy Headers Host - // Only send the Proxy White Listed Header names - var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList) - proxyHeaders.host = constructProxyHost(request.uri) - - proxyHeaderExclusiveList.forEach(request.removeHeader, request) - - // Set Agent from Tunnel Data - var tunnelFn = getTunnelFn(request) - var tunnelOptions = constructTunnelOptions(request, proxyHeaders) - request.agent = tunnelFn(tunnelOptions) - - return true -} - -Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList -Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList -exports.Tunnel = Tunnel diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json deleted file mode 100644 index 7143dde4939..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/package.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "_args": [ - [ - "request@2.x", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "request@>=2.0.0 <3.0.0", - "_id": "request@2.73.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/request", - "_nodeVersion": "6.2.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/request-2.73.0.tgz_1468050202545_0.40326908184215426" - }, - "_npmUser": { - "email": "simeonvelichkov@gmail.com", - "name": "simov" - }, - "_npmVersion": "2.15.6", - "_phantomChildren": {}, - "_requested": { - "name": "request", - "raw": "request@2.x", - "rawSpec": "2.x", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/node-pre-gyp" - ], - "_resolved": "https://registry.npmjs.org/request/-/request-2.73.0.tgz", - "_shasum": "5f78a9fde4370abc8ff6479d7a84a71a14b878a2", - "_shrinkwrap": null, - "_spec": "request@2.x", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "author": { - "email": "mikeal.rogers@gmail.com", - "name": "Mikeal Rogers" - }, - "bugs": { - "url": "http://github.com/request/request/issues" - }, - "dependencies": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "bl": "~1.1.2", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~1.0.0-rc4", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "node-uuid": "~1.4.7", - "oauth-sign": "~0.8.1", - "qs": "~6.2.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.2.0", - "tunnel-agent": "~0.4.1" - }, - "description": "Simplified HTTP request client.", - "devDependencies": { - "bluebird": "^3.2.1", - "browserify": "^13.0.1", - "browserify-istanbul": "^2.0.0", - "buffer-equal": "^1.0.0", - "codecov": "^1.0.1", - "coveralls": "^2.11.4", - "eslint": "^2.5.3", - "function-bind": "^1.0.2", - "istanbul": "^0.4.0", - "karma": "^1.1.1", - "karma-browserify": "^5.0.1", - "karma-cli": "^1.0.0", - "karma-coverage": "^1.0.0", - "karma-phantomjs-launcher": "^1.0.0", - "karma-tap": "^1.0.3", - "phantomjs-prebuilt": "^2.1.3", - "rimraf": "^2.2.8", - "server-destroy": "^1.0.1", - "tape": "^4.6.0", - "taper": "^0.4.0" - }, - "directories": {}, - "dist": { - "shasum": "5f78a9fde4370abc8ff6479d7a84a71a14b878a2", - "tarball": "https://registry.npmjs.org/request/-/request-2.73.0.tgz" - }, - "engines": { - "node": ">=0.8.0" - }, - "gitHead": "fa46be421b165c737c93672a8f920245cfb090a2", - "homepage": "https://github.com/request/request#readme", - "license": "Apache-2.0", - "main": "index.js", - "maintainers": [ - { - "email": "mikeal.rogers@gmail.com", - "name": "mikeal" - }, - { - "email": "jnylen@gmail.com", - "name": "nylen" - }, - { - "email": "fkschott@gmail.com", - "name": "fredkschott" - }, - { - "email": "simeonvelichkov@gmail.com", - "name": "simov" - } - ], - "name": "request", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/request/request.git" - }, - "scripts": { - "lint": "eslint lib/ *.js tests/ && echo Lint passed.", - "test": "npm run lint && npm run test-ci && npm run test-browser", - "test-browser": "node tests/browser/start.js", - "test-ci": "taper tests/test-*.js", - "test-cov": "istanbul cover tape tests/test-*.js" - }, - "tags": [ - "http", - "simple", - "util", - "utility" - ], - "version": "2.73.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js deleted file mode 100644 index 8267c125375..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/request/request.js +++ /dev/null @@ -1,1434 +0,0 @@ -'use strict' - -var http = require('http') - , https = require('https') - , url = require('url') - , util = require('util') - , stream = require('stream') - , zlib = require('zlib') - , bl = require('bl') - , hawk = require('hawk') - , aws2 = require('aws-sign2') - , aws4 = require('aws4') - , httpSignature = require('http-signature') - , mime = require('mime-types') - , stringstream = require('stringstream') - , caseless = require('caseless') - , ForeverAgent = require('forever-agent') - , FormData = require('form-data') - , extend = require('extend') - , isstream = require('isstream') - , isTypedArray = require('is-typedarray').strict - , helpers = require('./lib/helpers') - , cookies = require('./lib/cookies') - , getProxyFromURI = require('./lib/getProxyFromURI') - , Querystring = require('./lib/querystring').Querystring - , Har = require('./lib/har').Har - , Auth = require('./lib/auth').Auth - , OAuth = require('./lib/oauth').OAuth - , Multipart = require('./lib/multipart').Multipart - , Redirect = require('./lib/redirect').Redirect - , Tunnel = require('./lib/tunnel').Tunnel - -var safeStringify = helpers.safeStringify - , isReadStream = helpers.isReadStream - , toBase64 = helpers.toBase64 - , defer = helpers.defer - , copy = helpers.copy - , version = helpers.version - , globalCookieJar = cookies.jar() - - -var globalPool = {} - -function filterForNonReserved(reserved, options) { - // Filter out properties that are not reserved. - // Reserved values are passed in at call site. - - var object = {} - for (var i in options) { - var notReserved = (reserved.indexOf(i) === -1) - if (notReserved) { - object[i] = options[i] - } - } - return object -} - -function filterOutReservedFunctions(reserved, options) { - // Filter out properties that are functions and are reserved. - // Reserved values are passed in at call site. - - var object = {} - for (var i in options) { - var isReserved = !(reserved.indexOf(i) === -1) - var isFunction = (typeof options[i] === 'function') - if (!(isReserved && isFunction)) { - object[i] = options[i] - } - } - return object - -} - -// Return a simpler request object to allow serialization -function requestToJSON() { - var self = this - return { - uri: self.uri, - method: self.method, - headers: self.headers - } -} - -// Return a simpler response object to allow serialization -function responseToJSON() { - var self = this - return { - statusCode: self.statusCode, - body: self.body, - headers: self.headers, - request: requestToJSON.call(self.request) - } -} - -function Request (options) { - // if given the method property in options, set property explicitMethod to true - - // extend the Request instance with any non-reserved properties - // remove any reserved functions from the options object - // set Request instance to be readable and writable - // call init - - var self = this - - // start with HAR, then override with additional options - if (options.har) { - self._har = new Har(self) - options = self._har.options(options) - } - - stream.Stream.call(self) - var reserved = Object.keys(Request.prototype) - var nonReserved = filterForNonReserved(reserved, options) - - extend(self, nonReserved) - options = filterOutReservedFunctions(reserved, options) - - self.readable = true - self.writable = true - if (options.method) { - self.explicitMethod = true - } - self._qs = new Querystring(self) - self._auth = new Auth(self) - self._oauth = new OAuth(self) - self._multipart = new Multipart(self) - self._redirect = new Redirect(self) - self._tunnel = new Tunnel(self) - self.init(options) -} - -util.inherits(Request, stream.Stream) - -// Debugging -Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) -function debug() { - if (Request.debug) { - console.error('REQUEST %s', util.format.apply(util, arguments)) - } -} -Request.prototype.debug = debug - -Request.prototype.init = function (options) { - // init() contains all the code to setup the request object. - // the actual outgoing request is not started until start() is called - // this function is called from both the constructor and on redirect. - var self = this - if (!options) { - options = {} - } - self.headers = self.headers ? copy(self.headers) : {} - - // Delete headers with value undefined since they break - // ClientRequest.OutgoingMessage.setHeader in node 0.12 - for (var headerName in self.headers) { - if (typeof self.headers[headerName] === 'undefined') { - delete self.headers[headerName] - } - } - - caseless.httpify(self, self.headers) - - if (!self.method) { - self.method = options.method || 'GET' - } - if (!self.localAddress) { - self.localAddress = options.localAddress - } - - self._qs.init(options) - - debug(options) - if (!self.pool && self.pool !== false) { - self.pool = globalPool - } - self.dests = self.dests || [] - self.__isRequestRequest = true - - // Protect against double callback - if (!self._callback && self.callback) { - self._callback = self.callback - self.callback = function () { - if (self._callbackCalled) { - return // Print a warning maybe? - } - self._callbackCalled = true - self._callback.apply(self, arguments) - } - self.on('error', self.callback.bind()) - self.on('complete', self.callback.bind(self, null)) - } - - // People use this property instead all the time, so support it - if (!self.uri && self.url) { - self.uri = self.url - delete self.url - } - - // If there's a baseUrl, then use it as the base URL (i.e. uri must be - // specified as a relative path and is appended to baseUrl). - if (self.baseUrl) { - if (typeof self.baseUrl !== 'string') { - return self.emit('error', new Error('options.baseUrl must be a string')) - } - - if (typeof self.uri !== 'string') { - return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) - } - - if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { - return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) - } - - // Handle all cases to make sure that there's only one slash between - // baseUrl and uri. - var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 - var uriStartsWithSlash = self.uri.indexOf('/') === 0 - - if (baseUrlEndsWithSlash && uriStartsWithSlash) { - self.uri = self.baseUrl + self.uri.slice(1) - } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { - self.uri = self.baseUrl + self.uri - } else if (self.uri === '') { - self.uri = self.baseUrl - } else { - self.uri = self.baseUrl + '/' + self.uri - } - delete self.baseUrl - } - - // A URI is needed by this point, emit error if we haven't been able to get one - if (!self.uri) { - return self.emit('error', new Error('options.uri is a required argument')) - } - - // If a string URI/URL was given, parse it into a URL object - if (typeof self.uri === 'string') { - self.uri = url.parse(self.uri) - } - - // Some URL objects are not from a URL parsed string and need href added - if (!self.uri.href) { - self.uri.href = url.format(self.uri) - } - - // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme - if (self.uri.protocol === 'unix:') { - return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) - } - - // Support Unix Sockets - if (self.uri.host === 'unix') { - self.enableUnixSocket() - } - - if (self.strictSSL === false) { - self.rejectUnauthorized = false - } - - if (!self.uri.pathname) {self.uri.pathname = '/'} - - if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { - // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar - // Detect and reject it as soon as possible - var faultyUri = url.format(self.uri) - var message = 'Invalid URI "' + faultyUri + '"' - if (Object.keys(options).length === 0) { - // No option ? This can be the sign of a redirect - // As this is a case where the user cannot do anything (they didn't call request directly with this URL) - // they should be warned that it can be caused by a redirection (can save some hair) - message += '. This can be caused by a crappy redirection.' - } - // This error was fatal - self.abort() - return self.emit('error', new Error(message)) - } - - if (!self.hasOwnProperty('proxy')) { - self.proxy = getProxyFromURI(self.uri) - } - - self.tunnel = self._tunnel.isEnabled() - if (self.proxy) { - self._tunnel.setup(options) - } - - self._redirect.onRequest(options) - - self.setHost = false - if (!self.hasHeader('host')) { - var hostHeaderName = self.originalHostHeaderName || 'host' - self.setHeader(hostHeaderName, self.uri.hostname) - if (self.uri.port) { - if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && - !(self.uri.port === 443 && self.uri.protocol === 'https:') ) { - self.setHeader(hostHeaderName, self.getHeader('host') + (':' + self.uri.port) ) - } - } - self.setHost = true - } - - self.jar(self._jar || options.jar) - - if (!self.uri.port) { - if (self.uri.protocol === 'http:') {self.uri.port = 80} - else if (self.uri.protocol === 'https:') {self.uri.port = 443} - } - - if (self.proxy && !self.tunnel) { - self.port = self.proxy.port - self.host = self.proxy.hostname - } else { - self.port = self.uri.port - self.host = self.uri.hostname - } - - if (options.form) { - self.form(options.form) - } - - if (options.formData) { - var formData = options.formData - var requestForm = self.form() - var appendFormValue = function (key, value) { - if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) { - requestForm.append(key, value.value, value.options) - } else { - requestForm.append(key, value) - } - } - for (var formKey in formData) { - if (formData.hasOwnProperty(formKey)) { - var formValue = formData[formKey] - if (formValue instanceof Array) { - for (var j = 0; j < formValue.length; j++) { - appendFormValue(formKey, formValue[j]) - } - } else { - appendFormValue(formKey, formValue) - } - } - } - } - - if (options.qs) { - self.qs(options.qs) - } - - if (self.uri.path) { - self.path = self.uri.path - } else { - self.path = self.uri.pathname + (self.uri.search || '') - } - - if (self.path.length === 0) { - self.path = '/' - } - - // Auth must happen last in case signing is dependent on other headers - if (options.aws) { - self.aws(options.aws) - } - - if (options.hawk) { - self.hawk(options.hawk) - } - - if (options.httpSignature) { - self.httpSignature(options.httpSignature) - } - - if (options.auth) { - if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { - options.auth.user = options.auth.username - } - if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { - options.auth.pass = options.auth.password - } - - self.auth( - options.auth.user, - options.auth.pass, - options.auth.sendImmediately, - options.auth.bearer - ) - } - - if (self.gzip && !self.hasHeader('accept-encoding')) { - self.setHeader('accept-encoding', 'gzip, deflate') - } - - if (self.uri.auth && !self.hasHeader('authorization')) { - var uriAuthPieces = self.uri.auth.split(':').map(function(item) {return self._qs.unescape(item)}) - self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) - } - - if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { - var proxyAuthPieces = self.proxy.auth.split(':').map(function(item) {return self._qs.unescape(item)}) - var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) - self.setHeader('proxy-authorization', authHeader) - } - - if (self.proxy && !self.tunnel) { - self.path = (self.uri.protocol + '//' + self.uri.host + self.path) - } - - if (options.json) { - self.json(options.json) - } - if (options.multipart) { - self.multipart(options.multipart) - } - - if (options.time) { - self.timing = true - self.elapsedTime = self.elapsedTime || 0 - } - - function setContentLength () { - if (isTypedArray(self.body)) { - self.body = new Buffer(self.body) - } - - if (!self.hasHeader('content-length')) { - var length - if (typeof self.body === 'string') { - length = Buffer.byteLength(self.body) - } - else if (Array.isArray(self.body)) { - length = self.body.reduce(function (a, b) {return a + b.length}, 0) - } - else { - length = self.body.length - } - - if (length) { - self.setHeader('content-length', length) - } else { - self.emit('error', new Error('Argument error, options.body.')) - } - } - } - if (self.body && !isstream(self.body)) { - setContentLength() - } - - if (options.oauth) { - self.oauth(options.oauth) - } else if (self._oauth.params && self.hasHeader('authorization')) { - self.oauth(self._oauth.params) - } - - var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol - , defaultModules = {'http:':http, 'https:':https} - , httpModules = self.httpModules || {} - - self.httpModule = httpModules[protocol] || defaultModules[protocol] - - if (!self.httpModule) { - return self.emit('error', new Error('Invalid protocol: ' + protocol)) - } - - if (options.ca) { - self.ca = options.ca - } - - if (!self.agent) { - if (options.agentOptions) { - self.agentOptions = options.agentOptions - } - - if (options.agentClass) { - self.agentClass = options.agentClass - } else if (options.forever) { - var v = version() - // use ForeverAgent in node 0.10- only - if (v.major === 0 && v.minor <= 10) { - self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL - } else { - self.agentClass = self.httpModule.Agent - self.agentOptions = self.agentOptions || {} - self.agentOptions.keepAlive = true - } - } else { - self.agentClass = self.httpModule.Agent - } - } - - if (self.pool === false) { - self.agent = false - } else { - self.agent = self.agent || self.getNewAgent() - } - - self.on('pipe', function (src) { - if (self.ntick && self._started) { - self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) - } - self.src = src - if (isReadStream(src)) { - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', mime.lookup(src.path)) - } - } else { - if (src.headers) { - for (var i in src.headers) { - if (!self.hasHeader(i)) { - self.setHeader(i, src.headers[i]) - } - } - } - if (self._json && !self.hasHeader('content-type')) { - self.setHeader('content-type', 'application/json') - } - if (src.method && !self.explicitMethod) { - self.method = src.method - } - } - - // self.on('pipe', function () { - // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') - // }) - }) - - defer(function () { - if (self._aborted) { - return - } - - var end = function () { - if (self._form) { - if (!self._auth.hasAuth) { - self._form.pipe(self) - } - else if (self._auth.hasAuth && self._auth.sentAuth) { - self._form.pipe(self) - } - } - if (self._multipart && self._multipart.chunked) { - self._multipart.body.pipe(self) - } - if (self.body) { - if (isstream(self.body)) { - self.body.pipe(self) - } else { - setContentLength() - if (Array.isArray(self.body)) { - self.body.forEach(function (part) { - self.write(part) - }) - } else { - self.write(self.body) - } - self.end() - } - } else if (self.requestBodyStream) { - console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') - self.requestBodyStream.pipe(self) - } else if (!self.src) { - if (self._auth.hasAuth && !self._auth.sentAuth) { - self.end() - return - } - if (self.method !== 'GET' && typeof self.method !== 'undefined') { - self.setHeader('content-length', 0) - } - self.end() - } - } - - if (self._form && !self.hasHeader('content-length')) { - // Before ending the request, we had to compute the length of the whole form, asyncly - self.setHeader(self._form.getHeaders(), true) - self._form.getLength(function (err, length) { - if (!err && !isNaN(length)) { - self.setHeader('content-length', length) - } - end() - }) - } else { - end() - } - - self.ntick = true - }) - -} - -Request.prototype.getNewAgent = function () { - var self = this - var Agent = self.agentClass - var options = {} - if (self.agentOptions) { - for (var i in self.agentOptions) { - options[i] = self.agentOptions[i] - } - } - if (self.ca) { - options.ca = self.ca - } - if (self.ciphers) { - options.ciphers = self.ciphers - } - if (self.secureProtocol) { - options.secureProtocol = self.secureProtocol - } - if (self.secureOptions) { - options.secureOptions = self.secureOptions - } - if (typeof self.rejectUnauthorized !== 'undefined') { - options.rejectUnauthorized = self.rejectUnauthorized - } - - if (self.cert && self.key) { - options.key = self.key - options.cert = self.cert - } - - if (self.pfx) { - options.pfx = self.pfx - } - - if (self.passphrase) { - options.passphrase = self.passphrase - } - - var poolKey = '' - - // different types of agents are in different pools - if (Agent !== self.httpModule.Agent) { - poolKey += Agent.name - } - - // ca option is only relevant if proxy or destination are https - var proxy = self.proxy - if (typeof proxy === 'string') { - proxy = url.parse(proxy) - } - var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' - - if (isHttps) { - if (options.ca) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.ca - } - - if (typeof options.rejectUnauthorized !== 'undefined') { - if (poolKey) { - poolKey += ':' - } - poolKey += options.rejectUnauthorized - } - - if (options.cert) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.cert.toString('ascii') + options.key.toString('ascii') - } - - if (options.pfx) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.pfx.toString('ascii') - } - - if (options.ciphers) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.ciphers - } - - if (options.secureProtocol) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.secureProtocol - } - - if (options.secureOptions) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.secureOptions - } - } - - if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { - // not doing anything special. Use the globalAgent - return self.httpModule.globalAgent - } - - // we're using a stored agent. Make sure it's protocol-specific - poolKey = self.uri.protocol + poolKey - - // generate a new agent for this setting if none yet exists - if (!self.pool[poolKey]) { - self.pool[poolKey] = new Agent(options) - // properly set maxSockets on new agents - if (self.pool.maxSockets) { - self.pool[poolKey].maxSockets = self.pool.maxSockets - } - } - - return self.pool[poolKey] -} - -Request.prototype.start = function () { - // start() is called once we are ready to send the outgoing HTTP request. - // this is usually called on the first write(), end() or on nextTick() - var self = this - - if (self._aborted) { - return - } - - self._started = true - self.method = self.method || 'GET' - self.href = self.uri.href - - if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { - self.setHeader('content-length', self.src.stat.size) - } - if (self._aws) { - self.aws(self._aws, true) - } - - // We have a method named auth, which is completely different from the http.request - // auth option. If we don't remove it, we're gonna have a bad time. - var reqOptions = copy(self) - delete reqOptions.auth - - debug('make request', self.uri.href) - - try { - self.req = self.httpModule.request(reqOptions) - } catch (err) { - self.emit('error', err) - return - } - - if (self.timing) { - self.startTime = new Date().getTime() - } - - if (self.timeout && !self.timeoutTimer) { - var timeout = self.timeout < 0 ? 0 : self.timeout - // Set a timeout in memory - this block will throw if the server takes more - // than `timeout` to write the HTTP status and headers (corresponding to - // the on('response') event on the client). NB: this measures wall-clock - // time, not the time between bytes sent by the server. - self.timeoutTimer = setTimeout(function () { - var connectTimeout = self.req.socket && self.req.socket.readable === false - self.abort() - var e = new Error('ETIMEDOUT') - e.code = 'ETIMEDOUT' - e.connect = connectTimeout - self.emit('error', e) - }, timeout) - - if (self.req.setTimeout) { // only works on node 0.6+ - // Set an additional timeout on the socket, via the `setsockopt` syscall. - // This timeout sets the amount of time to wait *between* bytes sent - // from the server, and may or may not correspond to the wall-clock time - // elapsed from the start of the request. - // - // In particular, it's useful for erroring if the server fails to send - // data halfway through streaming a response. - self.req.setTimeout(timeout, function () { - if (self.req) { - self.req.abort() - var e = new Error('ESOCKETTIMEDOUT') - e.code = 'ESOCKETTIMEDOUT' - e.connect = false - self.emit('error', e) - } - }) - } - } - - self.req.on('response', self.onRequestResponse.bind(self)) - self.req.on('error', self.onRequestError.bind(self)) - self.req.on('drain', function() { - self.emit('drain') - }) - self.req.on('socket', function(socket) { - self.emit('socket', socket) - }) - - self.emit('request', self.req) -} - -Request.prototype.onRequestError = function (error) { - var self = this - if (self._aborted) { - return - } - if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' - && self.agent.addRequestNoreuse) { - self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } - self.start() - self.req.end() - return - } - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - self.emit('error', error) -} - -Request.prototype.onRequestResponse = function (response) { - var self = this - debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) - response.on('end', function() { - if (self.timing) { - self.elapsedTime += (new Date().getTime() - self.startTime) - debug('elapsed time', self.elapsedTime) - response.elapsedTime = self.elapsedTime - } - debug('response end', self.uri.href, response.statusCode, response.headers) - }) - - if (self._aborted) { - debug('aborted', self.uri.href) - response.resume() - return - } - - self.response = response - response.request = self - response.toJSON = responseToJSON - - // XXX This is different on 0.10, because SSL is strict by default - if (self.httpModule === https && - self.strictSSL && (!response.hasOwnProperty('socket') || - !response.socket.authorized)) { - debug('strict ssl error', self.uri.href) - var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' - self.emit('error', new Error('SSL Error: ' + sslErr)) - return - } - - // Save the original host before any redirect (if it changes, we need to - // remove any authorization headers). Also remember the case of the header - // name because lots of broken servers expect Host instead of host and we - // want the caller to be able to specify this. - self.originalHost = self.getHeader('host') - if (!self.originalHostHeaderName) { - self.originalHostHeaderName = self.hasHeader('host') - } - if (self.setHost) { - self.removeHeader('host') - } - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - - var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar - var addCookie = function (cookie) { - //set the cookie if it's domain in the href's domain. - try { - targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) - } catch (e) { - self.emit('error', e) - } - } - - response.caseless = caseless(response.headers) - - if (response.caseless.has('set-cookie') && (!self._disableCookies)) { - var headerName = response.caseless.has('set-cookie') - if (Array.isArray(response.headers[headerName])) { - response.headers[headerName].forEach(addCookie) - } else { - addCookie(response.headers[headerName]) - } - } - - if (self._redirect.onResponse(response)) { - return // Ignore the rest of the response - } else { - // Be a good stream and emit end when the response is finished. - // Hack to emit end on close because of a core bug that never fires end - response.on('close', function () { - if (!self._ended) { - self.response.emit('end') - } - }) - - response.on('end', function () { - self._ended = true - }) - - var noBody = function (code) { - return ( - self.method === 'HEAD' - // Informational - || (code >= 100 && code < 200) - // No Content - || code === 204 - // Not Modified - || code === 304 - ) - } - - var responseContent - if (self.gzip && !noBody(response.statusCode)) { - var contentEncoding = response.headers['content-encoding'] || 'identity' - contentEncoding = contentEncoding.trim().toLowerCase() - - if (contentEncoding === 'gzip') { - responseContent = zlib.createGunzip() - response.pipe(responseContent) - } else if (contentEncoding === 'deflate') { - responseContent = zlib.createInflate() - response.pipe(responseContent) - } else { - // Since previous versions didn't check for Content-Encoding header, - // ignore any invalid values to preserve backwards-compatibility - if (contentEncoding !== 'identity') { - debug('ignoring unrecognized Content-Encoding ' + contentEncoding) - } - responseContent = response - } - } else { - responseContent = response - } - - if (self.encoding) { - if (self.dests.length !== 0) { - console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') - } else if (responseContent.setEncoding) { - responseContent.setEncoding(self.encoding) - } else { - // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with - // zlib streams. - // If/When support for 0.9.4 is dropped, this should be unnecessary. - responseContent = responseContent.pipe(stringstream(self.encoding)) - } - } - - if (self._paused) { - responseContent.pause() - } - - self.responseContent = responseContent - - self.emit('response', response) - - self.dests.forEach(function (dest) { - self.pipeDest(dest) - }) - - responseContent.on('data', function (chunk) { - self._destdata = true - self.emit('data', chunk) - }) - responseContent.on('end', function (chunk) { - self.emit('end', chunk) - }) - responseContent.on('error', function (error) { - self.emit('error', error) - }) - responseContent.on('close', function () {self.emit('close')}) - - if (self.callback) { - self.readResponseBody(response) - } - //if no callback - else { - self.on('end', function () { - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - self.emit('complete', response) - }) - } - } - debug('finish init function', self.uri.href) -} - -Request.prototype.readResponseBody = function (response) { - var self = this - debug('reading response\'s body') - var buffer = bl() - , strings = [] - - self.on('data', function (chunk) { - if (Buffer.isBuffer(chunk)) { - buffer.append(chunk) - } else { - strings.push(chunk) - } - }) - self.on('end', function () { - debug('end event', self.uri.href) - if (self._aborted) { - debug('aborted', self.uri.href) - // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request. - // This can lead to leaky behavior if the user retains a reference to the request object. - buffer.destroy() - return - } - - if (buffer.length) { - debug('has body', self.uri.href, buffer.length) - if (self.encoding === null) { - // response.body = buffer - // can't move to this until https://github.com/rvagg/bl/issues/13 - response.body = buffer.slice() - } else { - response.body = buffer.toString(self.encoding) - } - // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request. - // This can lead to leaky behavior if the user retains a reference to the request object. - buffer.destroy() - } else if (strings.length) { - // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. - // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). - if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { - strings[0] = strings[0].substring(1) - } - response.body = strings.join('') - } - - if (self._json) { - try { - response.body = JSON.parse(response.body, self._jsonReviver) - } catch (e) { - debug('invalid JSON received', self.uri.href) - } - } - debug('emitting complete', self.uri.href) - if (typeof response.body === 'undefined' && !self._json) { - response.body = self.encoding === null ? new Buffer(0) : '' - } - self.emit('complete', response, response.body) - }) -} - -Request.prototype.abort = function () { - var self = this - self._aborted = true - - if (self.req) { - self.req.abort() - } - else if (self.response) { - self.response.destroy() - } - - self.emit('abort') -} - -Request.prototype.pipeDest = function (dest) { - var self = this - var response = self.response - // Called after the response is received - if (dest.headers && !dest.headersSent) { - if (response.caseless.has('content-type')) { - var ctname = response.caseless.has('content-type') - if (dest.setHeader) { - dest.setHeader(ctname, response.headers[ctname]) - } - else { - dest.headers[ctname] = response.headers[ctname] - } - } - - if (response.caseless.has('content-length')) { - var clname = response.caseless.has('content-length') - if (dest.setHeader) { - dest.setHeader(clname, response.headers[clname]) - } else { - dest.headers[clname] = response.headers[clname] - } - } - } - if (dest.setHeader && !dest.headersSent) { - for (var i in response.headers) { - // If the response content is being decoded, the Content-Encoding header - // of the response doesn't represent the piped content, so don't pass it. - if (!self.gzip || i !== 'content-encoding') { - dest.setHeader(i, response.headers[i]) - } - } - dest.statusCode = response.statusCode - } - if (self.pipefilter) { - self.pipefilter(response, dest) - } -} - -Request.prototype.qs = function (q, clobber) { - var self = this - var base - if (!clobber && self.uri.query) { - base = self._qs.parse(self.uri.query) - } else { - base = {} - } - - for (var i in q) { - base[i] = q[i] - } - - var qs = self._qs.stringify(base) - - if (qs === '') { - return self - } - - self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) - self.url = self.uri - self.path = self.uri.path - - if (self.uri.host === 'unix') { - self.enableUnixSocket() - } - - return self -} -Request.prototype.form = function (form) { - var self = this - if (form) { - if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { - self.setHeader('content-type', 'application/x-www-form-urlencoded') - } - self.body = (typeof form === 'string') - ? self._qs.rfc3986(form.toString('utf8')) - : self._qs.stringify(form).toString('utf8') - return self - } - // create form-data object - self._form = new FormData() - self._form.on('error', function(err) { - err.message = 'form-data: ' + err.message - self.emit('error', err) - self.abort() - }) - return self._form -} -Request.prototype.multipart = function (multipart) { - var self = this - - self._multipart.onRequest(multipart) - - if (!self._multipart.chunked) { - self.body = self._multipart.body - } - - return self -} -Request.prototype.json = function (val) { - var self = this - - if (!self.hasHeader('accept')) { - self.setHeader('accept', 'application/json') - } - - if (typeof self.jsonReplacer === 'function') { - self._jsonReplacer = self.jsonReplacer - } - - self._json = true - if (typeof val === 'boolean') { - if (self.body !== undefined) { - if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { - self.body = safeStringify(self.body, self._jsonReplacer) - } else { - self.body = self._qs.rfc3986(self.body) - } - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', 'application/json') - } - } - } else { - self.body = safeStringify(val, self._jsonReplacer) - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', 'application/json') - } - } - - if (typeof self.jsonReviver === 'function') { - self._jsonReviver = self.jsonReviver - } - - return self -} -Request.prototype.getHeader = function (name, headers) { - var self = this - var result, re, match - if (!headers) { - headers = self.headers - } - Object.keys(headers).forEach(function (key) { - if (key.length !== name.length) { - return - } - re = new RegExp(name, 'i') - match = key.match(re) - if (match) { - result = headers[key] - } - }) - return result -} -Request.prototype.enableUnixSocket = function () { - // Get the socket & request paths from the URL - var unixParts = this.uri.path.split(':') - , host = unixParts[0] - , path = unixParts[1] - // Apply unix properties to request - this.socketPath = host - this.uri.pathname = path - this.uri.path = path - this.uri.host = host - this.uri.hostname = host - this.uri.isUnix = true -} - - -Request.prototype.auth = function (user, pass, sendImmediately, bearer) { - var self = this - - self._auth.onRequest(user, pass, sendImmediately, bearer) - - return self -} -Request.prototype.aws = function (opts, now) { - var self = this - - if (!now) { - self._aws = opts - return self - } - - if (opts.sign_version == 4 || opts.sign_version == '4') { - // use aws4 - var options = { - host: self.uri.host, - path: self.uri.path, - method: self.method, - headers: { - 'content-type': self.getHeader('content-type') || '' - }, - body: self.body - } - var signRes = aws4.sign(options, { - accessKeyId: opts.key, - secretAccessKey: opts.secret - }) - self.setHeader('authorization', signRes.headers.Authorization) - self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) - } - else { - // default: use aws-sign2 - var date = new Date() - self.setHeader('date', date.toUTCString()) - var auth = - { key: opts.key - , secret: opts.secret - , verb: self.method.toUpperCase() - , date: date - , contentType: self.getHeader('content-type') || '' - , md5: self.getHeader('content-md5') || '' - , amazonHeaders: aws2.canonicalizeHeaders(self.headers) - } - var path = self.uri.path - if (opts.bucket && path) { - auth.resource = '/' + opts.bucket + path - } else if (opts.bucket && !path) { - auth.resource = '/' + opts.bucket - } else if (!opts.bucket && path) { - auth.resource = path - } else if (!opts.bucket && !path) { - auth.resource = '/' - } - auth.resource = aws2.canonicalizeResource(auth.resource) - self.setHeader('authorization', aws2.authorization(auth)) - } - - return self -} -Request.prototype.httpSignature = function (opts) { - var self = this - httpSignature.signRequest({ - getHeader: function(header) { - return self.getHeader(header, self.headers) - }, - setHeader: function(header, value) { - self.setHeader(header, value) - }, - method: self.method, - path: self.path - }, opts) - debug('httpSignature authorization', self.getHeader('authorization')) - - return self -} -Request.prototype.hawk = function (opts) { - var self = this - self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field) -} -Request.prototype.oauth = function (_oauth) { - var self = this - - self._oauth.onRequest(_oauth) - - return self -} - -Request.prototype.jar = function (jar) { - var self = this - var cookies - - if (self._redirect.redirectsFollowed === 0) { - self.originalCookieHeader = self.getHeader('cookie') - } - - if (!jar) { - // disable cookies - cookies = false - self._disableCookies = true - } else { - var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar - var urihref = self.uri.href - //fetch cookie in the Specified host - if (targetCookieJar) { - cookies = targetCookieJar.getCookieString(urihref) - } - } - - //if need cookie and cookie is not empty - if (cookies && cookies.length) { - if (self.originalCookieHeader) { - // Don't overwrite existing Cookie header - self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) - } else { - self.setHeader('cookie', cookies) - } - } - self._jar = jar - return self -} - - -// Stream API -Request.prototype.pipe = function (dest, opts) { - var self = this - - if (self.response) { - if (self._destdata) { - self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) - } else if (self._ended) { - self.emit('error', new Error('You cannot pipe after the response has been ended.')) - } else { - stream.Stream.prototype.pipe.call(self, dest, opts) - self.pipeDest(dest) - return dest - } - } else { - self.dests.push(dest) - stream.Stream.prototype.pipe.call(self, dest, opts) - return dest - } -} -Request.prototype.write = function () { - var self = this - if (self._aborted) {return} - - if (!self._started) { - self.start() - } - if (self.req) { - return self.req.write.apply(self.req, arguments) - } -} -Request.prototype.end = function (chunk) { - var self = this - if (self._aborted) {return} - - if (chunk) { - self.write(chunk) - } - if (!self._started) { - self.start() - } - if (self.req) { - self.req.end() - } -} -Request.prototype.pause = function () { - var self = this - if (!self.responseContent) { - self._paused = true - } else { - self.responseContent.pause.apply(self.responseContent, arguments) - } -} -Request.prototype.resume = function () { - var self = this - if (!self.responseContent) { - self._paused = false - } else { - self.responseContent.resume.apply(self.responseContent, arguments) - } -} -Request.prototype.destroy = function () { - var self = this - if (!self._ended) { - self.end() - } else if (self.response) { - self.response.destroy() - } -} - -Request.defaultProxyHeaderWhiteList = - Tunnel.defaultProxyHeaderWhiteList.slice() - -Request.defaultProxyHeaderExclusiveList = - Tunnel.defaultProxyHeaderExclusiveList.slice() - -// Exports - -Request.prototype.toJSON = requestToJSON -module.exports = Request diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md deleted file mode 100644 index 423b8cf854a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/README.md +++ /dev/null @@ -1,101 +0,0 @@ -[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) - -The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, [opts], callback)` - -The first parameter will be interpreted as a globbing pattern for files. If you -want to disable globbing you can do so with `opts.disableGlob` (defaults to -`false`). This might be handy, for instance, if you have filenames that contain -globbing wildcard characters. - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up, adding 100ms of wait - between each attempt. The default `maxBusyTries` is 3. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. -* `EMFILE` - Since `readdir` requires opening a file descriptor, it's - possible to hit `EMFILE` if too many file descriptors are in use. - In the sync case, there's nothing to be done for this. But in the - async case, rimraf will gradually back off with timeouts up to - `opts.emfileWait` ms, which defaults to 1000. - -## options - -* unlink, chmod, stat, lstat, rmdir, readdir, - unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync - - In order to use a custom file system library, you can override - specific fs functions on the options object. - - If any of these functions are present on the options object, then - the supplied function will be used instead of the default fs - method. - - Sync methods are only relevant for `rimraf.sync()`, of course. - - For example: - - ```javascript - var myCustomFS = require('some-custom-fs') - - rimraf('some-thing', myCustomFS, callback) - ``` - -* maxBusyTries - - If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered - on Windows systems, then rimraf will retry with a linear backoff - wait of 100ms longer on each try. The default maxBusyTries is 3. - - Only relevant for async usage. - -* emfileWait - - If an `EMFILE` error is encountered, then rimraf will retry - repeatedly with a linear backoff of 1ms longer on each try, until - the timeout counter hits this max. The default limit is 1000. - - If you repeatedly encounter `EMFILE` errors, then consider using - [graceful-fs](http://npm.im/graceful-fs) in your program. - - Only relevant for async usage. - -* glob - - Set to `false` to disable [glob](http://npm.im/glob) pattern - matching. - - Set to an object to pass options to the glob module. The default - glob options are `{ nosort: true, silent: true }`. - - Glob version 6 is used in this module. - - Relevant for both sync and async usage. - -* disableGlob - - Set to any non-falsey value to disable globbing entirely. - (Equivalent to setting `glob: false`.) - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf [ ...]` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js deleted file mode 100755 index 1bd5a0d16ac..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/bin.js +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf [ ...]') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else - go(0) - -function go (n) { - if (n >= args.length) - return - rimraf(args[n], function (er) { - if (er) - throw er - go(n+1) - }) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json deleted file mode 100644 index e2ec086be1d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_args": [ - [ - "rimraf@~2.5.0", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "rimraf@>=2.5.0 <2.6.0", - "_id": "rimraf@2.5.3", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/rimraf", - "_nodeVersion": "4.4.4", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/rimraf-2.5.3.tgz_1467582915019_0.6380921453237534" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.10.2", - "_phantomChildren": {}, - "_requested": { - "name": "rimraf", - "raw": "rimraf@~2.5.0", - "rawSpec": "~2.5.0", - "scope": null, - "spec": ">=2.5.0 <2.6.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/fstream", - "/fsevents/node-pre-gyp", - "/fsevents/tar-pack" - ], - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz", - "_shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705", - "_shrinkwrap": null, - "_spec": "rimraf@~2.5.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bin": { - "rimraf": "./bin.js" - }, - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "dependencies": { - "glob": "^7.0.5" - }, - "description": "A deep deletion module for node (like `rm -rf`)", - "devDependencies": { - "mkdirp": "^0.5.1", - "tap": "^6.1.1" - }, - "directories": {}, - "dist": { - "shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705", - "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz" - }, - "files": [ - "LICENSE", - "README.md", - "bin.js", - "rimraf.js" - ], - "gitHead": "7263a784e8f08d94dd6caf6ee934fceb525a6f3d", - "homepage": "https://github.com/isaacs/rimraf#readme", - "license": "ISC", - "main": "rimraf.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - } - ], - "name": "rimraf", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "2.5.3" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js deleted file mode 100644 index db518a9d6cc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,343 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var assert = require("assert") -var path = require("path") -var fs = require("fs") -var glob = require("glob") - -var defaultGlobOpts = { - nosort: true, - silent: true -} - -// for EMFILE handling -var timeout = 0 - -var isWindows = (process.platform === "win32") - -function defaults (options) { - var methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(function(m) { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 - options.emfileWait = options.emfileWait || 1000 - if (options.glob === false) { - options.disableGlob = true - } - options.disableGlob = options.disableGlob || false - options.glob = options.glob || defaultGlobOpts -} - -function rimraf (p, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - assert.equal(typeof cb, 'function', 'rimraf: callback function required') - - defaults(options) - - var busyTries = 0 - var errState = null - var n = 0 - - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]) - - options.lstat(p, function (er, stat) { - if (!er) - return afterGlob(null, [p]) - - glob(p, options.glob, afterGlob) - }) - - function next (er) { - errState = errState || er - if (--n === 0) - cb(errState) - } - - function afterGlob (er, results) { - if (er) - return cb(er) - - n = results.length - if (n === 0) - return cb() - - results.forEach(function (p) { - rimraf_(p, options, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && - busyTries < options.maxBusyTries) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, options, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(function () { - rimraf_(p, options, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - next(er) - }) - }) - } -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, function (er, st) { - if (er && er.code === "ENOENT") - return cb(null) - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb) - - if (st && st.isDirectory()) - return rmdir(p, options, er, cb) - - options.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - if (er.code === "EISDIR") - return rmdir(p, options, er, cb) - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) - assert(er instanceof Error) - - options.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - options.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, options, er, cb) - else - options.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, options, er) { - assert(p) - assert(options) - if (er) - assert(er instanceof Error) - - try { - options.chmodSync(p, 666) - } catch (er2) { - if (er2.code === "ENOENT") - return - else - throw er - } - - try { - var stats = options.statSync(p) - } catch (er3) { - if (er3.code === "ENOENT") - return - else - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, options, er) - else - options.unlinkSync(p) -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return options.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), options, function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - options.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - var results - - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p] - } else { - try { - options.lstatSync(p) - results = [p] - } catch (er) { - results = glob.sync(p, options.glob) - } - } - - if (!results.length) - return - - for (var i = 0; i < results.length; i++) { - var p = results[i] - - try { - var st = options.lstatSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - - // Windows can EPERM on stat. Life is suffering. - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p, options, er) - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) - rmdirSync(p, options, null) - else - options.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, options, er) - } - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options) - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f), options) - }) - options.rmdirSync(p, options) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md deleted file mode 100644 index 27b044ecd89..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/README.md +++ /dev/null @@ -1,346 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Usage - - $ npm install semver - - semver.valid('1.2.3') // '1.2.3' - semver.valid('a.b.c') // null - semver.clean(' =v1.2.3 ') // '1.2.3' - semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true - semver.gt('1.2.3', '9.8.7') // false - semver.lt('1.2.3', '9.8.7') // true - -As a command-line utility: - - $ semver -h - - SemVer 5.1.0 - - A JavaScript implementation of the http://semver.org/ specification - Copyright Isaac Z. Schlueter - - Usage: semver [options] [ [...]] - Prints valid versions sorted by SemVer precedence - - Options: - -r --range - Print versions that match the specified range. - - -i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - - --preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - - -l --loose - Interpret versions and ranges loosely - - Program exits successfully if any valid version satisfies - all supplied ranges, and prints all satisfying versions. - - If no satisfying versions are found, then exits failure. - - Versions are printed in ascending order, so supplying - multiple versions to the utility will just sort them. - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -> semver.inc('1.2.3', 'prerelease', 'beta') -'1.2.4-beta.0' -``` - -command-line example: - -```shell -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```shell -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `loose` boolean argument that, if -true, will be more forgiving about not-quite-valid semver strings. -The resulting output will always be 100% strict, of course. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver deleted file mode 100755 index c5f2e857e82..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/bin/semver +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , inc = null - , version = require("../package.json").version - , loose = false - , identifier = undefined - , semver = require("../semver") - , reverse = false - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var i = a.indexOf('=') - if (i !== -1) { - a = a.slice(0, i) - argv.unshift(a.slice(i + 1)) - } - switch (a) { - case "-rv": case "-rev": case "--rev": case "--reverse": - reverse = true - break - case "-l": case "--loose": - loose = true - break - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-i": case "--inc": case "--increment": - switch (argv[0]) { - case "major": case "minor": case "patch": case "prerelease": - case "premajor": case "preminor": case "prepatch": - inc = argv.shift() - break - default: - inc = "patch" - break - } - break - case "--preid": - identifier = argv.shift() - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.filter(function (v) { - return semver.valid(v, loose) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) - return failInc() - - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], loose) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error("--inc can only be used on a single version with no range") - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? "rcompare" : "compare" - versions.sort(function (a, b) { - return semver[compare](a, b, loose) - }).map(function (v) { - return semver.clean(v, loose) - }).map(function (v) { - return inc ? semver.inc(v, inc, loose, identifier) : v - }).forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["SemVer " + version - ,"" - ,"A JavaScript implementation of the http://semver.org/ specification" - ,"Copyright Isaac Z. Schlueter" - ,"" - ,"Usage: semver [options] [ [...]]" - ,"Prints valid versions sorted by SemVer precedence" - ,"" - ,"Options:" - ,"-r --range " - ," Print versions that match the specified range." - ,"" - ,"-i --increment []" - ," Increment a version by the specified level. Level can" - ," be one of: major, minor, patch, premajor, preminor," - ," prepatch, or prerelease. Default level is 'patch'." - ," Only one version may be specified." - ,"" - ,"--preid " - ," Identifier to be used to prefix premajor, preminor," - ," prepatch or prerelease version increments." - ,"" - ,"-l --loose" - ," Interpret versions and ranges loosely" - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no satisfying versions are found, then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json deleted file mode 100644 index 74479e394eb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_args": [ - [ - "semver@~5.2.0", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "semver@>=5.2.0 <5.3.0", - "_id": "semver@5.2.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/semver", - "_nodeVersion": "4.4.4", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/semver-5.2.0.tgz_1467136841238_0.2250258030835539" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.10.2", - "_phantomChildren": {}, - "_requested": { - "name": "semver", - "raw": "semver@~5.2.0", - "rawSpec": "~5.2.0", - "scope": null, - "spec": ">=5.2.0 <5.3.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/node-pre-gyp" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz", - "_shasum": "281995b80c1448209415ddbc4cf50c269cef55c5", - "_shrinkwrap": null, - "_spec": "semver@~5.2.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "dependencies": {}, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^2.0.0" - }, - "directories": {}, - "dist": { - "shasum": "281995b80c1448209415ddbc4cf50c269cef55c5", - "tarball": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "gitHead": "f7fef36765c53ebe237bf415c3ea002f24aa5621", - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "maintainers": [ - { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" - } - ], - "name": "semver", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "5.2.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf deleted file mode 100644 index 25ebd5c8325..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js deleted file mode 100644 index b2d7298c6ef..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/semver/semver.js +++ /dev/null @@ -1,1194 +0,0 @@ -exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. -/* nomin */ var debug; -/* nomin */ if (typeof process === 'object' && - /* nomin */ process.env && - /* nomin */ process.env.NODE_DEBUG && - /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) - /* nomin */ debug = function() { - /* nomin */ var args = Array.prototype.slice.call(arguments, 0); - /* nomin */ args.unshift('SEMVER'); - /* nomin */ console.log.apply(console, args); - /* nomin */ }; -/* nomin */ else - /* nomin */ debug = function() {}; - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; - -var MAX_LENGTH = 256; -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; - -// The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; - -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; - -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; - -src[FULL] = '^' + FULLPLAIN + '$'; - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; - -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; - -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; - -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; - -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; - -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; - -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; - -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; - -// Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) - re[i] = new RegExp(src[i]); -} - -exports.parse = parse; -function parse(version, loose) { - if (version instanceof SemVer) - return version; - - if (typeof version !== 'string') - return null; - - if (version.length > MAX_LENGTH) - return null; - - var r = loose ? re[LOOSE] : re[FULL]; - if (!r.test(version)) - return null; - - try { - return new SemVer(version, loose); - } catch (er) { - return null; - } -} - -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; -} - - -exports.clean = clean; -function clean(version, loose) { - var s = parse(version.trim().replace(/^[=v]+/, ''), loose); - return s ? s.version : null; -} - -exports.SemVer = SemVer; - -function SemVer(version, loose) { - if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version); - } - - if (version.length > MAX_LENGTH) - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - - if (!(this instanceof SemVer)) - return new SemVer(version, loose); - - debug('SemVer', version, loose); - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - - if (!m) - throw new TypeError('Invalid Version: ' + version); - - this.raw = version; - - // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) - throw new TypeError('Invalid major version') - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) - throw new TypeError('Invalid minor version') - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) - throw new TypeError('Invalid patch version') - - // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) - return num - } - return id; - }); - - this.build = m[5] ? m[5].split('.') : []; - this.format(); -} - -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.toString = function() { - return this.version; -}; - -SemVer.prototype.compare = function(other) { - debug('SemVer.compare', this.version, this.loose, other); - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return this.compareMain(other) || this.comparePre(other); -}; - -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; - -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.length && !other.prerelease.length) - return 0; - - var i = 0; - do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function(release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc('pre', identifier); - break; - case 'preminor': - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc('pre', identifier); - break; - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0; - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) - this.major++; - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) - this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) - this.patch++; - this.prerelease = []; - break; - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) // didn't increment anything - this.prerelease.push(0); - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) - this.prerelease = [identifier, 0]; - } else - this.prerelease = [identifier, 0]; - } - break; - - default: - throw new Error('invalid increment argument: ' + release); - } - this.format(); - this.raw = this.version; - return this; -}; - -exports.inc = inc; -function inc(version, release, loose, identifier) { - if (typeof(loose) === 'string') { - identifier = loose; - loose = undefined; - } - - try { - return new SemVer(version, loose).inc(release, identifier).version; - } catch (er) { - return null; - } -} - -exports.diff = diff; -function diff(version1, version2) { - if (eq(version1, version2)) { - return null; - } else { - var v1 = parse(version1); - var v2 = parse(version2); - if (v1.prerelease.length || v2.prerelease.length) { - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return 'pre'+key; - } - } - } - return 'prerelease'; - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return key; - } - } - } - } -} - -exports.compareIdentifiers = compareIdentifiers; - -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - - if (anum && bnum) { - a = +a; - b = +b; - } - - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; -} - -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); -} - -exports.major = major; -function major(a, loose) { - return new SemVer(a, loose).major; -} - -exports.minor = minor; -function minor(a, loose) { - return new SemVer(a, loose).minor; -} - -exports.patch = patch; -function patch(a, loose) { - return new SemVer(a, loose).patch; -} - -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(b); -} - -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); -} - -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); -} - -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); -} - -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); -} - -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; -} - -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; -} - -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; -} - -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; -} - -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; -} - -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; -} - -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; - switch (op) { - case '===': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a === b; - break; - case '!==': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a !== b; - break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, loose) { - if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; - } - - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); - - debug('comparator', comp, loose); - this.loose = loose; - this.parse(comp); - - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; - - debug('comp', this); -} - -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); - - if (!m) - throw new TypeError('Invalid comparator: ' + comp); - - this.operator = m[1]; - if (this.operator === '=') - this.operator = ''; - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else - this.semver = new SemVer(m[2], this.loose); -}; - -Comparator.prototype.toString = function() { - return this.value; -}; - -Comparator.prototype.test = function(version) { - debug('Comparator.test', version, this.loose); - - if (this.semver === ANY) - return true; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - return cmp(version, this.operator, this.semver, this.loose); -}; - - -exports.Range = Range; -function Range(range, loose) { - if ((range instanceof Range) && range.loose === loose) - return range; - - if (!(this instanceof Range)) - return new Range(range, loose); - - this.loose = loose; - - // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { - // throw out any that are not relevant for whatever reason - return c.length; - }); - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); - } - - this.format(); -} - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; - -Range.prototype.toString = function() { - return this.range; -}; - -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - debug('range', range, loose); - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug('hyphen replace', range); - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[COMPARATORTRIM]); - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); - - // normalize spaces - range = range.split(/\s+/).join(' '); - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - - return set; -}; - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator(comp, loose) { - debug('comp', comp); - comp = replaceCarets(comp, loose); - debug('caret', comp); - comp = replaceTildes(comp, loose); - debug('tildes', comp); - comp = replaceXRanges(comp, loose); - debug('xrange', comp); - comp = replaceStars(comp, loose); - debug('stars', comp); - return comp; -} - -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else if (pr) { - debug('replaceTilde pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - - debug('tilde return', ret); - return ret; - }); -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - debug('caret', comp, loose); - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; - } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0'; - } else { - debug('no pr'); - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0'; - } - - debug('caret return', ret); - return ret; - }); -} - -function replaceXRanges(comp, loose) { - debug('replaceXRanges', comp, loose); - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); -} - -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0'; - } else { - // nothing is forbidden - ret = '*'; - } - } else if (gtlt && anyX) { - // replace X with 0 - if (xm) - m = 0; - if (xp) - p = 0; - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>='; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) - M = +M + 1 - else - m = +m + 1 - } - - ret = gtlt + M + '.' + m + '.' + p; - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - } - - debug('xRange return', ret); - - return ret; - }); -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - debug('replaceStars', comp, loose); - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} - - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; - } - return false; -}; - -function testSet(set, version) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; - } - - if (version.prerelease.length) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (var i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === ANY) - continue; - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver; - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) - return true; - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false; - } - - return true; -} - -exports.satisfies = satisfies; -function satisfies(version, range, loose) { - try { - range = new Range(range, loose); - } catch (er) { - return false; - } - return range.test(version); -} - -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return rcompare(a, b, loose); - })[0] || null; -} - -exports.validRange = validRange; -function validRange(range, loose) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; - } catch (er) { - return null; - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); -} - -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); - - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; - } - }); - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false; - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; -} - -exports.prerelease = prerelease; -function prerelease(version, loose) { - var parsed = parse(version, loose); - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md deleted file mode 100644 index 03bf591923d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -# [2.0.0](https://github.com/yargs/set-blocking/compare/v1.0.0...v2.0.0) (2016-05-17) - - -### Features - -* add an isTTY check ([#3](https://github.com/yargs/set-blocking/issues/3)) ([66ce277](https://github.com/yargs/set-blocking/commit/66ce277)) - - -### BREAKING CHANGES - -* stdio/stderr will not be set to blocking if isTTY === false - - - - -# 1.0.0 (2016-05-14) - - -### Features - -* implemented shim for stream._handle.setBlocking ([6bde0c0](https://github.com/yargs/set-blocking/commit/6bde0c0)) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt deleted file mode 100644 index 836440bef7c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md deleted file mode 100644 index e93b4202b59..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# set-blocking - -[![Build Status](https://travis-ci.org/yargs/set-blocking.svg)](https://travis-ci.org/yargs/set-blocking) -[![NPM version](https://img.shields.io/npm/v/set-blocking.svg)](https://www.npmjs.com/package/set-blocking) -[![Coverage Status](https://coveralls.io/repos/yargs/set-blocking/badge.svg?branch=)](https://coveralls.io/r/yargs/set-blocking?branch=master) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - -set blocking `stdio` and `stderr` ensuring that terminal output does not truncate. - -```js -const setBlocking = require('set-blocking') -setBlocking(true) -console.log(someLargeStringToOutput) -``` - -## Historical Context/Word of Warning - -This was created as a shim to address the bug discussed in [node #6456](https://github.com/nodejs/node/issues/6456). This bug crops up on -newer versions of Node.js (`0.12+`), truncating terminal output. - -You should be mindful of the side-effects caused by using `set-blocking`: - -* if your module sets blocking to `true`, it will effect other modules - consuming your library. In [yargs](https://github.com/yargs/yargs/blob/master/yargs.js#L653) we only call - `setBlocking(true)` once we already know we are about to call `process.exit(code)`. -* this patch will not apply to subprocesses spawned with `isTTY = true`, this is - the [default `spawn()` behavior](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). - -## License - -ISC diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js deleted file mode 100644 index 6f78774bb63..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function (blocking) { - [process.stdout, process.stderr].forEach(function (stream) { - if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { - stream._handle.setBlocking(blocking) - } - }) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json deleted file mode 100644 index 4d469892445..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/set-blocking/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - "set-blocking@~2.0.0", - "/Users/eshanker/Code/fsevents/node_modules/npmlog" - ] - ], - "_from": "set-blocking@>=2.0.0 <2.1.0", - "_id": "set-blocking@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/set-blocking", - "_nodeVersion": "0.12.7", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/set-blocking-2.0.0.tgz_1463525966987_0.5456729622092098" - }, - "_npmUser": { - "email": "ben@npmjs.com", - "name": "bcoe" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "name": "set-blocking", - "raw": "set-blocking@~2.0.0", - "rawSpec": "~2.0.0", - "scope": null, - "spec": ">=2.0.0 <2.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/npmlog" - ], - "_resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "_shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", - "_shrinkwrap": null, - "_spec": "set-blocking@~2.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/npmlog", - "author": { - "email": "ben@npmjs.com", - "name": "Ben Coe" - }, - "bugs": { - "url": "https://github.com/yargs/set-blocking/issues" - }, - "dependencies": {}, - "description": "set blocking stdio and stderr ensuring that terminal output does not truncate", - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.9", - "mocha": "^2.4.5", - "nyc": "^6.4.4", - "standard": "^7.0.1", - "standard-version": "^2.2.1" - }, - "directories": {}, - "dist": { - "shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", - "tarball": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - }, - "files": [ - "LICENSE.txt", - "index.js" - ], - "gitHead": "7eec10577b5fff264de477ba3b9d07f404946eff", - "homepage": "https://github.com/yargs/set-blocking#readme", - "keywords": [ - "blocking", - "flush", - "shim", - "stderr", - "stdio", - "terminal" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "email": "ben@npmjs.com", - "name": "bcoe" - } - ], - "name": "set-blocking", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/yargs/set-blocking.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "test": "nyc mocha ./test/*.js", - "version": "standard-version" - }, - "version": "2.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md deleted file mode 100644 index c12f8340c8d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) - - -### Bug Fixes - -* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) -* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) - - -### BREAKING CHANGES - -* signal-exit no longer wires into SIGPROF diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt deleted file mode 100644 index c7e27478a3e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md deleted file mode 100644 index 8ebccabecae..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# signal-exit - -[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) -[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) -[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) -[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - -When you want to fire an event no matter how a process exits: - -* reaching the end of execution. -* explicitly having `process.exit(code)` called. -* having `process.kill(pid, sig)` called. -* receiving a fatal signal from outside the process - -Use `signal-exit`. - -```js -var onExit = require('signal-exit') - -onExit(function (code, signal) { - console.log('process exited!') -}) -``` - -## API - -`var remove = onExit(function (code, signal) {}, options)` - -The return value of the function is a function that will remove the -handler. - -Note that the function *only* fires for signals if the signal would -cause the proces to exit. That is, there are no other listeners, and -it is a fatal signal. - -## Options - -* `alwaysLast`: Run this handler after any other signal or exit - handlers. This causes `process.emit` to be monkeypatched. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js deleted file mode 100644 index 7dd8d917dc5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/index.js +++ /dev/null @@ -1,148 +0,0 @@ -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -var assert = require('assert') -var signals = require('./signals.js') - -var EE = require('events') -/* istanbul ignore if */ -if (typeof EE !== 'function') { - EE = EE.EventEmitter -} - -var emitter -if (process.__signal_exit_emitter__) { - emitter = process.__signal_exit_emitter__ -} else { - emitter = process.__signal_exit_emitter__ = new EE() - emitter.count = 0 - emitter.emitted = {} -} - -module.exports = function (cb, opts) { - assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') - - if (loaded === false) { - load() - } - - var ev = 'exit' - if (opts && opts.alwaysLast) { - ev = 'afterexit' - } - - var remove = function () { - emitter.removeListener(ev, cb) - if (emitter.listeners('exit').length === 0 && - emitter.listeners('afterexit').length === 0) { - unload() - } - } - emitter.on(ev, cb) - - return remove -} - -module.exports.unload = unload -function unload () { - if (!loaded) { - return - } - loaded = false - - signals.forEach(function (sig) { - try { - process.removeListener(sig, sigListeners[sig]) - } catch (er) {} - }) - process.emit = originalProcessEmit - process.reallyExit = originalProcessReallyExit - emitter.count -= 1 -} - -function emit (event, code, signal) { - if (emitter.emitted[event]) { - return - } - emitter.emitted[event] = true - emitter.emit(event, code, signal) -} - -// { : , ... } -var sigListeners = {} -signals.forEach(function (sig) { - sigListeners[sig] = function listener () { - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - var listeners = process.listeners(sig) - if (listeners.length === emitter.count) { - unload() - emit('exit', null, sig) - /* istanbul ignore next */ - emit('afterexit', null, sig) - /* istanbul ignore next */ - process.kill(process.pid, sig) - } - } -}) - -module.exports.signals = function () { - return signals -} - -module.exports.load = load - -var loaded = false - -function load () { - if (loaded) { - return - } - loaded = true - - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - emitter.count += 1 - - signals = signals.filter(function (sig) { - try { - process.on(sig, sigListeners[sig]) - return true - } catch (er) { - return false - } - }) - - process.emit = processEmit - process.reallyExit = processReallyExit -} - -var originalProcessReallyExit = process.reallyExit -function processReallyExit (code) { - process.exitCode = code || 0 - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - originalProcessReallyExit.call(process, process.exitCode) -} - -var originalProcessEmit = process.emit -function processEmit (ev, arg) { - if (ev === 'exit') { - if (arg !== undefined) { - process.exitCode = arg - } - var ret = originalProcessEmit.apply(this, arguments) - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - return ret - } else { - return originalProcessEmit.apply(this, arguments) - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json deleted file mode 100644 index 54976232442..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_args": [ - [ - "signal-exit@^3.0.0", - "/Users/eshanker/Code/fsevents/node_modules/gauge" - ] - ], - "_from": "signal-exit@>=3.0.0 <4.0.0", - "_id": "signal-exit@3.0.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/signal-exit", - "_nodeVersion": "5.1.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/signal-exit-3.0.0.tgz_1465857346813_0.7961636525578797" - }, - "_npmUser": { - "email": "ben@npmjs.com", - "name": "bcoe" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "name": "signal-exit", - "raw": "signal-exit@^3.0.0", - "rawSpec": "^3.0.0", - "scope": null, - "spec": ">=3.0.0 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/gauge" - ], - "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz", - "_shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", - "_shrinkwrap": null, - "_spec": "signal-exit@^3.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", - "author": { - "email": "ben@npmjs.com", - "name": "Ben Coe" - }, - "bugs": { - "url": "https://github.com/tapjs/signal-exit/issues" - }, - "dependencies": {}, - "description": "when you want to fire an event no matter how a process exits.", - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.2", - "nyc": "^6.4.4", - "standard": "^7.1.2", - "standard-version": "^2.3.0", - "tap": "^5.7.2" - }, - "directories": {}, - "dist": { - "shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", - "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz" - }, - "files": [ - "index.js", - "signals.js" - ], - "gitHead": "2bbec4e5d9f9cf1f7529b1c923d1b058e69ccf7f", - "homepage": "https://github.com/tapjs/signal-exit", - "keywords": [ - "exit", - "signal" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "email": "ben@npmjs.com", - "name": "bcoe" - }, - { - "email": "isaacs@npmjs.com", - "name": "isaacs" - } - ], - "name": "signal-exit", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/tapjs/signal-exit.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "release": "standard-version", - "test": "tap --timeout=240 ./test/*.js --cov" - }, - "version": "3.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js deleted file mode 100644 index bc6f97ee606..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/signal-exit/signals.js +++ /dev/null @@ -1,52 +0,0 @@ -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGBUS', - 'SIGFPE', - 'SIGHUP', - 'SIGILL', - 'SIGINT', - 'SIGSEGV', - 'SIGTERM' -] - -if (process.platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) -} - -if (process.platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore deleted file mode 100644 index 77ba16cb055..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml deleted file mode 100755 index 047f7e3d5e1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE deleted file mode 100755 index b0d877439ea..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012-2014, Eran Hammer and other contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hueniverse/sntp/graphs/contributors diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile deleted file mode 100755 index 417fd937086..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -t 100 -m 3000 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html - -.PHONY: test test-cov test-cov-html - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md deleted file mode 100755 index 98a6e025dba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# sntp - -An SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time -along with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset -to the local time. - -[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp) - -# Usage - -```javascript -var Sntp = require('sntp'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); -``` - -If an application needs to maintain continuous time synchronization, the module provides a stateful method for -querying the current offset only when the last one is too old (defaults to daily). - -```javascript -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); -``` - -To set a background offset refresh, start the interval and use the provided now() method. If for any reason the -client fails to obtain an up-to-date offset, the current system clock is used. - -```javascript -var before = Sntp.now(); // System time without offset - -Sntp.start(function () { - - var now = Sntp.now(); // With offset - Sntp.stop(); -}); -``` - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js deleted file mode 100755 index 0303f6dcfa7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/offset.js +++ /dev/null @@ -1,16 +0,0 @@ -var Sntp = require('../lib'); - -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js deleted file mode 100755 index bd70d0e6a51..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/examples/time.js +++ /dev/null @@ -1,25 +0,0 @@ -var Sntp = require('../lib'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log(time); - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js deleted file mode 100755 index 4cc88b35877..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js deleted file mode 100755 index e91718b4ff5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/lib/index.js +++ /dev/null @@ -1,412 +0,0 @@ -// Load modules - -var Dgram = require('dgram'); -var Dns = require('dns'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - - -exports.time = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var settings = Hoek.clone(options); - settings.host = settings.host || 'pool.ntp.org'; - settings.port = settings.port || 123; - settings.resolveReference = settings.resolveReference || false; - - // Declare variables used by callback - - var timeoutId = 0; - var sent = 0; - - // Ensure callback is only called once - - var finish = function (err, result) { - - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = 0; - } - - socket.removeAllListeners(); - socket.once('error', internals.ignore); - socket.close(); - return callback(err, result); - }; - - finish = Hoek.once(finish); - - // Create UDP socket - - var socket = Dgram.createSocket('udp4'); - - socket.once('error', function (err) { - - return finish(err); - }); - - // Listen to incoming messages - - socket.on('message', function (buffer, rinfo) { - - var received = Date.now(); - - var message = new internals.NtpMessage(buffer); - if (!message.isValid) { - return finish(new Error('Invalid server response'), message); - } - - if (message.originateTimestamp !== sent) { - return finish(new Error('Wrong originate timestamp'), message); - } - - // Timestamp Name ID When Generated - // ------------------------------------------------------------ - // Originate Timestamp T1 time request sent by client - // Receive Timestamp T2 time request received by server - // Transmit Timestamp T3 time reply sent by server - // Destination Timestamp T4 time reply received by client - // - // The roundtrip delay d and system clock offset t are defined as: - // - // d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2 - - var T1 = message.originateTimestamp; - var T2 = message.receiveTimestamp; - var T3 = message.transmitTimestamp; - var T4 = received; - - message.d = (T4 - T1) - (T3 - T2); - message.t = ((T2 - T1) + (T3 - T4)) / 2; - message.receivedLocally = received; - - if (!settings.resolveReference || - message.stratum !== 'secondary') { - - return finish(null, message); - } - - // Resolve reference IP address - - Dns.reverse(message.referenceId, function (err, domains) { - - if (/* $lab:coverage:off$ */ !err /* $lab:coverage:on$ */) { - message.referenceHost = domains[0]; - } - - return finish(null, message); - }); - }); - - // Set timeout - - if (settings.timeout) { - timeoutId = setTimeout(function () { - - timeoutId = 0; - return finish(new Error('Timeout')); - }, settings.timeout); - } - - // Construct NTP message - - var message = new Buffer(48); - for (var i = 0; i < 48; i++) { // Zero message - message[i] = 0; - } - - message[0] = (0 << 6) + (4 << 3) + (3 << 0) // Set version number to 4 and Mode to 3 (client) - sent = Date.now(); - internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate) - - // Send NTP request - - socket.send(message, 0, message.length, settings.port, settings.host, function (err, bytes) { - - if (err || - bytes !== 48) { - - return finish(err || new Error('Could not send entire message')); - } - }); -}; - - -internals.NtpMessage = function (buffer) { - - this.isValid = false; - - // Validate - - if (buffer.length !== 48) { - return; - } - - // Leap indicator - - var li = (buffer[0] >> 6); - switch (li) { - case 0: this.leapIndicator = 'no-warning'; break; - case 1: this.leapIndicator = 'last-minute-61'; break; - case 2: this.leapIndicator = 'last-minute-59'; break; - case 3: this.leapIndicator = 'alarm'; break; - } - - // Version - - var vn = ((buffer[0] & 0x38) >> 3); - this.version = vn; - - // Mode - - var mode = (buffer[0] & 0x7); - switch (mode) { - case 1: this.mode = 'symmetric-active'; break; - case 2: this.mode = 'symmetric-passive'; break; - case 3: this.mode = 'client'; break; - case 4: this.mode = 'server'; break; - case 5: this.mode = 'broadcast'; break; - case 0: - case 6: - case 7: this.mode = 'reserved'; break; - } - - // Stratum - - var stratum = buffer[1]; - if (stratum === 0) { - this.stratum = 'death'; - } - else if (stratum === 1) { - this.stratum = 'primary'; - } - else if (stratum <= 15) { - this.stratum = 'secondary'; - } - else { - this.stratum = 'reserved'; - } - - // Poll interval (msec) - - this.pollInterval = Math.round(Math.pow(2, buffer[2])) * 1000; - - // Precision (msecs) - - this.precision = Math.pow(2, buffer[3]) * 1000; - - // Root delay (msecs) - - var rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7]; - this.rootDelay = 1000 * (rootDelay / 0x10000); - - // Root dispersion (msecs) - - this.rootDispersion = ((buffer[8] << 8) + buffer[9] + ((buffer[10] << 8) + buffer[11]) / Math.pow(2, 16)) * 1000; - - // Reference identifier - - this.referenceId = ''; - switch (this.stratum) { - case 'death': - case 'primary': - this.referenceId = String.fromCharCode(buffer[12]) + String.fromCharCode(buffer[13]) + String.fromCharCode(buffer[14]) + String.fromCharCode(buffer[15]); - break; - case 'secondary': - this.referenceId = '' + buffer[12] + '.' + buffer[13] + '.' + buffer[14] + '.' + buffer[15]; - break; - } - - // Reference timestamp - - this.referenceTimestamp = internals.toMsecs(buffer, 16); - - // Originate timestamp - - this.originateTimestamp = internals.toMsecs(buffer, 24); - - // Receive timestamp - - this.receiveTimestamp = internals.toMsecs(buffer, 32); - - // Transmit timestamp - - this.transmitTimestamp = internals.toMsecs(buffer, 40); - - // Validate - - if (this.version === 4 && - this.stratum !== 'reserved' && - this.mode === 'server' && - this.originateTimestamp && - this.receiveTimestamp && - this.transmitTimestamp) { - - this.isValid = true; - } - - return this; -}; - - -internals.toMsecs = function (buffer, offset) { - - var seconds = 0; - var fraction = 0; - - for (var i = 0; i < 4; ++i) { - seconds = (seconds * 256) + buffer[offset + i]; - } - - for (i = 4; i < 8; ++i) { - fraction = (fraction * 256) + buffer[offset + i]; - } - - return ((seconds - 2208988800 + (fraction / Math.pow(2, 32))) * 1000); -}; - - -internals.fromMsecs = function (ts, buffer, offset) { - - var seconds = Math.floor(ts / 1000) + 2208988800; - var fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32)); - - buffer[offset + 0] = (seconds & 0xFF000000) >> 24; - buffer[offset + 1] = (seconds & 0x00FF0000) >> 16; - buffer[offset + 2] = (seconds & 0x0000FF00) >> 8; - buffer[offset + 3] = (seconds & 0x000000FF); - - buffer[offset + 4] = (fraction & 0xFF000000) >> 24; - buffer[offset + 5] = (fraction & 0x00FF0000) >> 16; - buffer[offset + 6] = (fraction & 0x0000FF00) >> 8; - buffer[offset + 7] = (fraction & 0x000000FF); -}; - - -// Offset singleton - -internals.last = { - offset: 0, - expires: 0, - host: '', - port: 0 -}; - - -exports.offset = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var now = Date.now(); - var clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily - - if (internals.last.offset && - internals.last.host === options.host && - internals.last.port === options.port && - now < internals.last.expires) { - - process.nextTick(function () { - - callback(null, internals.last.offset); - }); - - return; - } - - exports.time(options, function (err, time) { - - if (err) { - return callback(err, 0); - } - - internals.last = { - offset: Math.round(time.t), - expires: now + clockSyncRefresh, - host: options.host, - port: options.port - }; - - return callback(null, internals.last.offset); - }); -}; - - -// Now singleton - -internals.now = { - intervalId: 0 -}; - - -exports.start = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - if (internals.now.intervalId) { - process.nextTick(function () { - - callback(); - }); - - return; - } - - exports.offset(options, function (err, offset) { - - internals.now.intervalId = setInterval(function () { - - exports.offset(options, function () { }); - }, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily - - return callback(); - }); -}; - - -exports.stop = function () { - - if (!internals.now.intervalId) { - return; - } - - clearInterval(internals.now.intervalId); - internals.now.intervalId = 0; -}; - - -exports.isLive = function () { - - return !!internals.now.intervalId; -}; - - -exports.now = function () { - - var now = Date.now(); - if (!exports.isLive() || - now >= internals.last.expires) { - - return now; - } - - return now + internals.last.offset; -}; - - -internals.ignore = function () { - -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json deleted file mode 100644 index aef7e0940c8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "sntp@1.x.x", - "/Users/eshanker/Code/fsevents/node_modules/hawk" - ] - ], - "_from": "sntp@>=1.0.0 <2.0.0", - "_id": "sntp@1.0.9", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/sntp", - "_npmUser": { - "email": "eran@hueniverse.com", - "name": "hueniverse" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "name": "sntp", - "raw": "sntp@1.x.x", - "rawSpec": "1.x.x", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/hawk" - ], - "_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "_shasum": "6541184cc90aeea6c6e7b35e2659082443c66198", - "_shrinkwrap": null, - "_spec": "sntp@1.x.x", - "_where": "/Users/eshanker/Code/fsevents/node_modules/hawk", - "author": { - "email": "eran@hammer.io", - "name": "Eran Hammer", - "url": "http://hueniverse.com" - }, - "bugs": { - "url": "https://github.com/hueniverse/sntp/issues" - }, - "contributors": [], - "dependencies": { - "hoek": "2.x.x" - }, - "description": "SNTP Client", - "devDependencies": { - "lab": "4.x.x" - }, - "directories": {}, - "dist": { - "shasum": "6541184cc90aeea6c6e7b35e2659082443c66198", - "tarball": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" - }, - "engines": { - "node": ">=0.8.0" - }, - "gitHead": "ee2e35284f684609990681734d39010cd356d7da", - "homepage": "https://github.com/hueniverse/sntp", - "keywords": [ - "ntp", - "sntp", - "time" - ], - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE" - } - ], - "main": "index", - "maintainers": [ - { - "email": "eran@hueniverse.com", - "name": "hueniverse" - } - ], - "name": "sntp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/sntp.git" - }, - "scripts": { - "test": "make test-cov" - }, - "version": "1.0.9" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js deleted file mode 100755 index f1d1cdabf5b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sntp/test/index.js +++ /dev/null @@ -1,435 +0,0 @@ -// Load modules - -var Dns = require('dns'); -var Dgram = require('dgram'); -var Lab = require('lab'); -var Sntp = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var before = lab.before; -var after = lab.after; -var describe = lab.experiment; -var it = lab.test; -var expect = Lab.expect; - - -describe('SNTP', function () { - - describe('#time', function () { - - it('returns consistent result over multiple tries', function (done) { - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t1 = time.t; - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t2 = time.t; - expect(Math.abs(t1 - t2)).is.below(200); - done(); - }); - }); - }); - - it('resolves reference IP', function (done) { - - Sntp.time({ host: 'ntp.exnet.com', resolveReference: true }, function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - expect(time.referenceHost).to.exist; - done(); - }); - }); - - it('times out on no response', function (done) { - - Sntp.time({ port: 124, timeout: 100 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Timeout'); - done(); - }); - }); - - it('errors on error event', { parallel: false }, function (done) { - - var orig = Dgram.createSocket; - Dgram.createSocket = function (type) { - - Dgram.createSocket = orig; - var socket = Dgram.createSocket(type); - setImmediate(function () { socket.emit('error', new Error('Fake')) }); - return socket; - }; - - Sntp.time(function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Fake'); - done(); - }); - }); - - it('errors on incorrect sent size', { parallel: false }, function (done) { - - var orig = Dgram.Socket.prototype.send; - Dgram.Socket.prototype.send = function (buf, offset, length, port, address, callback) { - - Dgram.Socket.prototype.send = orig; - return callback(null, 40); - }; - - Sntp.time(function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Could not send entire message'); - done(); - }); - }); - - it('times out on invalid host', function (done) { - - Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.contain('getaddrinfo'); - done(); - }); - }); - - it('fails on bad response buffer size', function (done) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - var message = new Buffer(10); - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - var messup = function (bytes) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - - var message = new Buffer([ - 0x24, 0x01, 0x00, 0xe3, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x41, 0x43, 0x54, 0x53, - 0xd4, 0xa8, 0x2d, 0xc7, - 0x1c, 0x5d, 0x49, 0x1b, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x67, 0xef, 0x9d, 0xb2, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xed, 0xb5, 0xfb, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xee, 0x6c, 0xc5 - ]); - - for (var i = 0, il = bytes.length; i < il; ++i) { - message[bytes[i][0]] = bytes[i][1]; - } - - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - }; - - it('fails on bad version', function (done) { - - messup([[0, (0 << 6) + (3 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.version).to.equal(3); - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - it('fails on bad originateTimestamp', function (done) { - - messup([[24, 0x83], [25, 0xaa], [26, 0x7e], [27, 0x80], [28, 0], [29, 0], [30, 0], [31, 0]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - it('fails on bad receiveTimestamp', function (done) { - - messup([[32, 0x83], [33, 0xaa], [34, 0x7e], [35, 0x80], [36, 0], [37, 0], [38, 0], [39, 0]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - it('fails on bad originate timestamp and alarm li', function (done) { - - messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Wrong originate timestamp'); - expect(time.leapIndicator).to.equal('alarm'); - done(); - }); - }); - - it('returns time with death stratum and last61 li', function (done) { - - messup([[0, (1 << 6) + (4 << 3) + (4 << 0)], [1, 0]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('death'); - expect(time.leapIndicator).to.equal('last-minute-61'); - done(); - }); - }); - - it('returns time with reserved stratum and last59 li', function (done) { - - messup([[0, (2 << 6) + (4 << 3) + (4 << 0)], [1, 0x1f]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('reserved'); - expect(time.leapIndicator).to.equal('last-minute-59'); - done(); - }); - }); - - it('fails on bad mode (symmetric-active)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (1 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-active'); - done(); - }); - }); - - it('fails on bad mode (symmetric-passive)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (2 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-passive'); - done(); - }); - }); - - it('fails on bad mode (client)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (3 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('client'); - done(); - }); - }); - - it('fails on bad mode (broadcast)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (5 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('broadcast'); - done(); - }); - }); - - it('fails on bad mode (reserved)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (6 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('reserved'); - done(); - }); - }); - }); - - describe('#offset', function () { - - it('gets the current offset', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - done(); - }); - }); - - it('gets the current offset from cache', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - var offset1 = offset; - Sntp.offset({}, function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.equal(offset1); - done(); - }); - }); - }); - - it('gets the new offset on different server', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - var offset1 = offset; - Sntp.offset({ host: 'nist1-sj.ustiming.org' }, function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(offset1); - done(); - }); - }); - }); - - it('gets the new offset on different server', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - var offset1 = offset; - Sntp.offset({ port: 123 }, function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(offset1); - done(); - }); - }); - }); - - it('fails getting the current offset on invalid server', function (done) { - - Sntp.offset({ host: 'error' }, function (err, offset) { - - expect(err).to.exist; - expect(offset).to.equal(0); - done(); - }); - }); - }); - - describe('#now', function () { - - it('starts auto-sync, gets now, then stops', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - - it('starts twice', function (done) { - - Sntp.start(function () { - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - }); - - it('starts auto-sync, gets now, waits, gets again after timeout', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start({ clockSyncRefresh: 100 }, function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - expect(now).to.equal(Sntp.now()); - - setTimeout(function () { - - expect(Sntp.now()).to.not.equal(now); - Sntp.stop(); - done(); - }, 110); - }); - }); - }); -}); - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore deleted file mode 100644 index 8000b595bb4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -.gitmodules -deps -docs -Makefile -node_modules -test -tools -coverage -man/src diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml deleted file mode 100644 index c3394c258fc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - "5.10" - - "4.4" - - "4.1" - - "0.12" - - "0.10" -before_install: - - "make check" -after_success: - - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio' diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE deleted file mode 100644 index f6d947d2f61..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md deleted file mode 100644 index d0fa88dfa29..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/README.md +++ /dev/null @@ -1,455 +0,0 @@ -sshpk -========= - -Parse, convert, fingerprint and use SSH keys (both public and private) in pure -node -- no `ssh-keygen` or other external dependencies. - -Supports RSA, DSA, ECDSA (nistp-\*) and ED25519 key types, in PEM (PKCS#1, -PKCS#8) and OpenSSH formats. - -This library has been extracted from -[`node-http-signature`](https://github.com/joyent/node-http-signature) -(work by [Mark Cavage](https://github.com/mcavage) and -[Dave Eddy](https://github.com/bahamas10)) and -[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint) -(work by Dave Eddy), with additions (including ECDSA support) by -[Alex Wilson](https://github.com/arekinath). - -Install -------- - -``` -npm install sshpk -``` - -Examples --------- - -```js -var sshpk = require('sshpk'); - -var fs = require('fs'); - -/* Read in an OpenSSH-format public key */ -var keyPub = fs.readFileSync('id_rsa.pub'); -var key = sshpk.parseKey(keyPub, 'ssh'); - -/* Get metadata about the key */ -console.log('type => %s', key.type); -console.log('size => %d bits', key.size); -console.log('comment => %s', key.comment); - -/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */ -console.log('fingerprint => %s', key.fingerprint().toString()); -console.log('old-style fingerprint => %s', key.fingerprint('md5').toString()); -``` - -Example output: - -``` -type => rsa -size => 2048 bits -comment => foo@foo.com -fingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w -old-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd -``` - -More examples: converting between formats: - -```js -/* Read in a PEM public key */ -var keyPem = fs.readFileSync('id_rsa.pem'); -var key = sshpk.parseKey(keyPem, 'pem'); - -/* Convert to PEM PKCS#8 public key format */ -var pemBuf = key.toBuffer('pkcs8'); - -/* Convert to SSH public key format (and return as a string) */ -var sshKey = key.toString('ssh'); -``` - -Signing and verifying: - -```js -/* Read in an OpenSSH/PEM *private* key */ -var keyPriv = fs.readFileSync('id_ecdsa'); -var key = sshpk.parsePrivateKey(keyPriv, 'pem'); - -var data = 'some data'; - -/* Sign some data with the key */ -var s = key.createSign('sha1'); -s.update(data); -var signature = s.sign(); - -/* Now load the public key (could also use just key.toPublic()) */ -var keyPub = fs.readFileSync('id_ecdsa.pub'); -key = sshpk.parseKey(keyPub, 'ssh'); - -/* Make a crypto.Verifier with this key */ -var v = key.createVerify('sha1'); -v.update(data); -var valid = v.verify(signature); -/* => true! */ -``` - -Matching fingerprints with keys: - -```js -var fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w'); - -var keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...]; - -keys.forEach(function (key) { - if (fp.matches(key)) - console.log('found it!'); -}); -``` - -Usage ------ - -## Public keys - -### `parseKey(data[, format = 'auto'[, options]])` - -Parses a key from a given data format and returns a new `Key` object. - -Parameters - -- `data` -- Either a Buffer or String, containing the key -- `format` -- String name of format to use, valid options are: - - `auto`: choose automatically from all below - - `pem`: supports both PKCS#1 and PKCS#8 - - `ssh`: standard OpenSSH format, - - `pkcs1`, `pkcs8`: variants of `pem` - - `rfc4253`: raw OpenSSH wire format - - `openssh`: new post-OpenSSH 6.5 internal format, produced by - `ssh-keygen -o` -- `options` -- Optional Object, extra options, with keys: - - `filename` -- Optional String, name for the key being parsed - (eg. the filename that was opened). Used to generate - Error messages - - `passphrase` -- Optional String, encryption passphrase used to decrypt an - encrypted PEM file - -### `Key.isKey(obj)` - -Returns `true` if the given object is a valid `Key` object created by a version -of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `Key#type` - -String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. - -### `Key#size` - -Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; -for ECDSA this is the bit size of the curve in use. - -### `Key#comment` - -Optional string, a key comment used by some formats (eg the `ssh` format). - -### `Key#curve` - -Only present if `this.type === 'ecdsa'`, string containing the name of the -named curve used with this key. Possible values include `nistp256`, `nistp384` -and `nistp521`. - -### `Key#toBuffer([format = 'ssh'])` - -Convert the key into a given data format and return the serialized key as -a Buffer. - -Parameters - -- `format` -- String name of format to use, for valid options see `parseKey()` - -### `Key#toString([format = 'ssh])` - -Same as `this.toBuffer(format).toString()`. - -### `Key#fingerprint([algorithm = 'sha256'])` - -Creates a new `Fingerprint` object representing this Key's fingerprint. - -Parameters - -- `algorithm` -- String name of hash algorithm to use, valid options are `md5`, - `sha1`, `sha256`, `sha384`, `sha512` - -### `Key#createVerify([hashAlgorithm])` - -Creates a `crypto.Verifier` specialized to use this Key (and the correct public -key algorithm to match it). The returned Verifier has the same API as a regular -one, except that the `verify()` function takes only the target signature as an -argument. - -Parameters - -- `hashAlgorithm` -- optional String name of hash algorithm to use, any - supported by OpenSSL are valid, usually including - `sha1`, `sha256`. - -`v.verify(signature[, format])` Parameters - -- `signature` -- either a Signature object, or a Buffer or String -- `format` -- optional String, name of format to interpret given String with. - Not valid if `signature` is a Signature or Buffer. - -### `Key#createDiffieHellman()` -### `Key#createDH()` - -Creates a Diffie-Hellman key exchange object initialized with this key and all -necessary parameters. This has the same API as a `crypto.DiffieHellman` -instance, except that functions take `Key` and `PrivateKey` objects as -arguments, and return them where indicated for. - -This is only valid for keys belonging to a cryptosystem that supports DHE -or a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt -to call this function on other keys will yield an `Error`. - -## Private keys - -### `parsePrivateKey(data[, format = 'auto'[, options]])` - -Parses a private key from a given data format and returns a new -`PrivateKey` object. - -Parameters - -- `data` -- Either a Buffer or String, containing the key -- `format` -- String name of format to use, valid options are: - - `auto`: choose automatically from all below - - `pem`: supports both PKCS#1 and PKCS#8 - - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by - `ssh-keygen -o` - - `pkcs1`, `pkcs8`: variants of `pem` - - `rfc4253`: raw OpenSSH wire format -- `options` -- Optional Object, extra options, with keys: - - `filename` -- Optional String, name for the key being parsed - (eg. the filename that was opened). Used to generate - Error messages - - `passphrase` -- Optional String, encryption passphrase used to decrypt an - encrypted PEM file - -### `PrivateKey.isPrivateKey(obj)` - -Returns `true` if the given object is a valid `PrivateKey` object created by a -version of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `PrivateKey#type` - -String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. - -### `PrivateKey#size` - -Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; -for ECDSA this is the bit size of the curve in use. - -### `PrivateKey#curve` - -Only present if `this.type === 'ecdsa'`, string containing the name of the -named curve used with this key. Possible values include `nistp256`, `nistp384` -and `nistp521`. - -### `PrivateKey#toBuffer([format = 'pkcs1'])` - -Convert the key into a given data format and return the serialized key as -a Buffer. - -Parameters - -- `format` -- String name of format to use, valid options are listed under - `parsePrivateKey`. Note that ED25519 keys default to `openssh` - format instead (as they have no `pkcs1` representation). - -### `PrivateKey#toString([format = 'pkcs1'])` - -Same as `this.toBuffer(format).toString()`. - -### `PrivateKey#toPublic()` - -Extract just the public part of this private key, and return it as a `Key` -object. - -### `PrivateKey#fingerprint([algorithm = 'sha256'])` - -Same as `this.toPublic().fingerprint()`. - -### `PrivateKey#createVerify([hashAlgorithm])` - -Same as `this.toPublic().createVerify()`. - -### `PrivateKey#createSign([hashAlgorithm])` - -Creates a `crypto.Sign` specialized to use this PrivateKey (and the correct -key algorithm to match it). The returned Signer has the same API as a regular -one, except that the `sign()` function takes no arguments, and returns a -`Signature` object. - -Parameters - -- `hashAlgorithm` -- optional String name of hash algorithm to use, any - supported by OpenSSL are valid, usually including - `sha1`, `sha256`. - -`v.sign()` Parameters - -- none - -### `PrivateKey#derive(newType)` - -Derives a related key of type `newType` from this key. Currently this is -only supported to change between `ed25519` and `curve25519` keys which are -stored with the same private key (but usually distinct public keys in order -to avoid degenerate keys that lead to a weak Diffie-Hellman exchange). - -Parameters - -- `newType` -- String, type of key to derive, either `ed25519` or `curve25519` - -## Fingerprints - -### `parseFingerprint(fingerprint[, algorithms])` - -Pre-parses a fingerprint, creating a `Fingerprint` object that can be used to -quickly locate a key by using the `Fingerprint#matches` function. - -Parameters - -- `fingerprint` -- String, the fingerprint value, in any supported format -- `algorithms` -- Optional list of strings, names of hash algorithms to limit - support to. If `fingerprint` uses a hash algorithm not on - this list, throws `InvalidAlgorithmError`. - -### `Fingerprint.isFingerprint(obj)` - -Returns `true` if the given object is a valid `Fingerprint` object created by a -version of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `Fingerprint#toString([format])` - -Returns a fingerprint as a string, in the given format. - -Parameters - -- `format` -- Optional String, format to use, valid options are `hex` and - `base64`. If this `Fingerprint` uses the `md5` algorithm, the - default format is `hex`. Otherwise, the default is `base64`. - -### `Fingerprint#matches(key)` - -Verifies whether or not this `Fingerprint` matches a given `Key`. This function -uses double-hashing to avoid leaking timing information. Returns a boolean. - -Parameters - -- `key` -- a `Key` object, the key to match this fingerprint against - -## Signatures - -### `parseSignature(signature, algorithm, format)` - -Parses a signature in a given format, creating a `Signature` object. Useful -for converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and -also returned as output from `PrivateKey#createSign().sign()`. - -A Signature object can also be passed to a verifier produced by -`Key#createVerify()` and it will automatically be converted internally into the -correct format for verification. - -Parameters - -- `signature` -- a Buffer (binary) or String (base64), data of the actual - signature in the given format -- `algorithm` -- a String, name of the algorithm to be used, possible values - are `rsa`, `dsa`, `ecdsa` -- `format` -- a String, either `asn1` or `ssh` - -### `Signature.isSignature(obj)` - -Returns `true` if the given object is a valid `Signature` object created by a -version of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `Signature#toBuffer([format = 'asn1'])` - -Converts a Signature to the given format and returns it as a Buffer. - -Parameters - -- `format` -- a String, either `asn1` or `ssh` - -### `Signature#toString([format = 'asn1'])` - -Same as `this.toBuffer(format).toString('base64')`. - -Errors ------- - -### `InvalidAlgorithmError` - -The specified algorithm is not valid, either because it is not supported, or -because it was not included on a list of allowed algorithms. - -Thrown by `Fingerprint.parse`, `Key#fingerprint`. - -Properties - -- `algorithm` -- the algorithm that could not be validated - -### `FingerprintFormatError` - -The fingerprint string given could not be parsed as a supported fingerprint -format, or the specified fingerprint format is invalid. - -Thrown by `Fingerprint.parse`, `Fingerprint#toString`. - -Properties - -- `fingerprint` -- if caused by a fingerprint, the string value given -- `format` -- if caused by an invalid format specification, the string value given - -### `KeyParseError` - -The key data given could not be parsed as a valid key. - -Properties - -- `keyName` -- `filename` that was given to `Key#parse` -- `format` -- the `format` that was trying to parse the key -- `innerErr` -- the inner Error thrown by the format parser - -### `KeyEncryptedError` - -The key is encrypted with a symmetric key (ie, it is password protected). The -parsing operation would succeed if it was given the `passphrase` option. - -Properties - -- `keyName` -- `filename` that was given to `Key#parse` -- `format` -- the `format` that was trying to parse the key (currently can only - be `"pem"`) - -Friends of sshpk ----------------- - - * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library - for speaking the `ssh-agent` protocol from node.js, which uses `sshpk` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv deleted file mode 100755 index a1205a45d54..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-conv +++ /dev/null @@ -1,195 +0,0 @@ -#!/usr/bin/env node -// -*- mode: js -*- -// vim: set filetype=javascript : -// Copyright 2015 Joyent, Inc. All rights reserved. - -var dashdash = require('dashdash'); -var sshpk = require('../lib/index'); -var fs = require('fs'); -var path = require('path'); -var tty = require('tty'); -var readline = require('readline'); -var getPassword = require('getpass').getPass; - -var options = [ - { - names: ['outformat', 't'], - type: 'string', - help: 'Output format' - }, - { - names: ['informat', 'T'], - type: 'string', - help: 'Input format' - }, - { - names: ['file', 'f'], - type: 'string', - help: 'Input file name (default stdin)' - }, - { - names: ['out', 'o'], - type: 'string', - help: 'Output file name (default stdout)' - }, - { - names: ['private', 'p'], - type: 'bool', - help: 'Produce a private key as output' - }, - { - names: ['derive', 'd'], - type: 'string', - help: 'Output a new key derived from this one, with given algo' - }, - { - names: ['identify', 'i'], - type: 'bool', - help: 'Print key metadata instead of converting' - }, - { - names: ['comment', 'c'], - type: 'string', - help: 'Set key comment, if output format supports' - }, - { - names: ['help', 'h'], - type: 'bool', - help: 'Shows this help text' - } -]; - -if (require.main === module) { - var parser = dashdash.createParser({ - options: options - }); - - try { - var opts = parser.parse(process.argv); - } catch (e) { - console.error('sshpk-conv: error: %s', e.message); - process.exit(1); - } - - if (opts.help || opts._args.length > 1) { - var help = parser.help({}).trimRight(); - console.error('sshpk-conv: converts between SSH key formats\n'); - console.error(help); - console.error('\navailable formats:'); - console.error(' - pem, pkcs1 eg id_rsa'); - console.error(' - ssh eg id_rsa.pub'); - console.error(' - pkcs8 format you want for openssl'); - console.error(' - openssh like output of ssh-keygen -o'); - console.error(' - rfc4253 raw OpenSSH wire format'); - process.exit(1); - } - - /* - * Key derivation can only be done on private keys, so use of the -d - * option necessarily implies -p. - */ - if (opts.derive) - opts.private = true; - - var inFile = process.stdin; - var inFileName = 'stdin'; - - var inFilePath; - if (opts.file) { - inFilePath = opts.file; - } else if (opts._args.length === 1) { - inFilePath = opts._args[0]; - } - - if (inFilePath) - inFileName = path.basename(inFilePath); - - try { - if (inFilePath) { - fs.accessSync(inFilePath, fs.R_OK); - inFile = fs.createReadStream(inFilePath); - } - } catch (e) { - console.error('sshpk-conv: error opening input file' + - ': ' + e.name + ': ' + e.message); - process.exit(1); - } - - var outFile = process.stdout; - - try { - if (opts.out && !opts.identify) { - fs.accessSync(path.dirname(opts.out), fs.W_OK); - outFile = fs.createWriteStream(opts.out); - } - } catch (e) { - console.error('sshpk-conv: error opening output file' + - ': ' + e.name + ': ' + e.message); - process.exit(1); - } - - var bufs = []; - inFile.on('readable', function () { - var data; - while ((data = inFile.read())) - bufs.push(data); - }); - var parseOpts = {}; - parseOpts.filename = inFileName; - inFile.on('end', function processKey() { - var buf = Buffer.concat(bufs); - var fmt = 'auto'; - if (opts.informat) - fmt = opts.informat; - var f = sshpk.parseKey; - if (opts.private) - f = sshpk.parsePrivateKey; - try { - var key = f(buf, fmt, parseOpts); - } catch (e) { - if (e.name === 'KeyEncryptedError') { - getPassword(function (err, pw) { - parseOpts.passphrase = pw; - processKey(); - }); - return; - } - console.error('sshpk-conv: ' + - e.name + ': ' + e.message); - process.exit(1); - } - - if (opts.derive) - key = key.derive(opts.derive); - - if (opts.comment) - key.comment = opts.comment; - - if (!opts.identify) { - fmt = undefined; - if (opts.outformat) - fmt = opts.outformat; - outFile.write(key.toBuffer(fmt)); - if (fmt === 'ssh' || - (!opts.private && fmt === undefined)) - outFile.write('\n'); - outFile.once('drain', function () { - process.exit(0); - }); - } else { - var kind = 'public'; - if (sshpk.PrivateKey.isPrivateKey(key)) - kind = 'private'; - console.log('%s: a %d bit %s %s key', inFileName, - key.size, key.type.toUpperCase(), kind); - if (key.type === 'ecdsa') - console.log('ECDSA curve: %s', key.curve); - if (key.comment) - console.log('Comment: %s', key.comment); - console.log('Fingerprint:'); - console.log(' ' + key.fingerprint().toString()); - console.log(' ' + key.fingerprint('md5').toString()); - process.exit(0); - } - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign deleted file mode 100755 index 673fc986421..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-sign +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env node -// -*- mode: js -*- -// vim: set filetype=javascript : -// Copyright 2015 Joyent, Inc. All rights reserved. - -var dashdash = require('dashdash'); -var sshpk = require('../lib/index'); -var fs = require('fs'); -var path = require('path'); -var getPassword = require('getpass').getPass; - -var options = [ - { - names: ['hash', 'H'], - type: 'string', - help: 'Hash algorithm (sha1, sha256, sha384, sha512)' - }, - { - names: ['verbose', 'v'], - type: 'bool', - help: 'Display verbose info about key and hash used' - }, - { - names: ['identity', 'i'], - type: 'string', - help: 'Path to key to use' - }, - { - names: ['file', 'f'], - type: 'string', - help: 'Input filename' - }, - { - names: ['out', 'o'], - type: 'string', - help: 'Output filename' - }, - { - names: ['format', 't'], - type: 'string', - help: 'Signature format (asn1, ssh, raw)' - }, - { - names: ['binary', 'b'], - type: 'bool', - help: 'Output raw binary instead of base64' - }, - { - names: ['help', 'h'], - type: 'bool', - help: 'Shows this help text' - } -]; - -var parseOpts = {}; - -if (require.main === module) { - var parser = dashdash.createParser({ - options: options - }); - - try { - var opts = parser.parse(process.argv); - } catch (e) { - console.error('sshpk-sign: error: %s', e.message); - process.exit(1); - } - - if (opts.help || opts._args.length > 1) { - var help = parser.help({}).trimRight(); - console.error('sshpk-sign: sign data using an SSH key\n'); - console.error(help); - process.exit(1); - } - - if (!opts.identity) { - var help = parser.help({}).trimRight(); - console.error('sshpk-sign: the -i or --identity option ' + - 'is required\n'); - console.error(help); - process.exit(1); - } - - var keyData = fs.readFileSync(opts.identity); - parseOpts.filename = opts.identity; - - run(); -} - -function run() { - var key; - try { - key = sshpk.parsePrivateKey(keyData, 'auto', parseOpts); - } catch (e) { - if (e.name === 'KeyEncryptedError') { - getPassword(function (err, pw) { - parseOpts.passphrase = pw; - run(); - }); - return; - } - console.error('sshpk-sign: error loading private key "' + - opts.identity + '": ' + e.name + ': ' + e.message); - process.exit(1); - } - - var hash = opts.hash || key.defaultHashAlgorithm(); - - var signer; - try { - signer = key.createSign(hash); - } catch (e) { - console.error('sshpk-sign: error creating signer: ' + - e.name + ': ' + e.message); - process.exit(1); - } - - if (opts.verbose) { - console.error('sshpk-sign: using %s-%s with a %d bit key', - key.type, hash, key.size); - } - - var inFile = process.stdin; - var inFileName = 'stdin'; - - var inFilePath; - if (opts.file) { - inFilePath = opts.file; - } else if (opts._args.length === 1) { - inFilePath = opts._args[0]; - } - - if (inFilePath) - inFileName = path.basename(inFilePath); - - try { - if (inFilePath) { - fs.accessSync(inFilePath, fs.R_OK); - inFile = fs.createReadStream(inFilePath); - } - } catch (e) { - console.error('sshpk-sign: error opening input file' + - ': ' + e.name + ': ' + e.message); - process.exit(1); - } - - var outFile = process.stdout; - - try { - if (opts.out && !opts.identify) { - fs.accessSync(path.dirname(opts.out), fs.W_OK); - outFile = fs.createWriteStream(opts.out); - } - } catch (e) { - console.error('sshpk-sign: error opening output file' + - ': ' + e.name + ': ' + e.message); - process.exit(1); - } - - inFile.pipe(signer); - inFile.on('end', function () { - var sig; - try { - sig = signer.sign(); - } catch (e) { - console.error('sshpk-sign: error signing data: ' + - e.name + ': ' + e.message); - process.exit(1); - } - - var fmt = opts.format || 'asn1'; - var output; - try { - output = sig.toBuffer(fmt); - if (!opts.binary) - output = output.toString('base64'); - } catch (e) { - console.error('sshpk-sign: error converting signature' + - ' to ' + fmt + ' format: ' + e.name + ': ' + - e.message); - process.exit(1); - } - - outFile.write(output); - if (!opts.binary) - outFile.write('\n'); - outFile.once('drain', function () { - process.exit(0); - }); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify deleted file mode 100755 index a1669f409df..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/bin/sshpk-verify +++ /dev/null @@ -1,166 +0,0 @@ -#!/usr/bin/env node -// -*- mode: js -*- -// vim: set filetype=javascript : -// Copyright 2015 Joyent, Inc. All rights reserved. - -var dashdash = require('dashdash'); -var sshpk = require('../lib/index'); -var fs = require('fs'); -var path = require('path'); - -var options = [ - { - names: ['hash', 'H'], - type: 'string', - help: 'Hash algorithm (sha1, sha256, sha384, sha512)' - }, - { - names: ['verbose', 'v'], - type: 'bool', - help: 'Display verbose info about key and hash used' - }, - { - names: ['identity', 'i'], - type: 'string', - help: 'Path to (public) key to use' - }, - { - names: ['file', 'f'], - type: 'string', - help: 'Input filename' - }, - { - names: ['format', 't'], - type: 'string', - help: 'Signature format (asn1, ssh, raw)' - }, - { - names: ['signature', 's'], - type: 'string', - help: 'base64-encoded signature data' - }, - { - names: ['help', 'h'], - type: 'bool', - help: 'Shows this help text' - } -]; - -if (require.main === module) { - var parser = dashdash.createParser({ - options: options - }); - - try { - var opts = parser.parse(process.argv); - } catch (e) { - console.error('sshpk-verify: error: %s', e.message); - process.exit(3); - } - - if (opts.help || opts._args.length > 1) { - var help = parser.help({}).trimRight(); - console.error('sshpk-verify: sign data using an SSH key\n'); - console.error(help); - process.exit(3); - } - - if (!opts.identity) { - var help = parser.help({}).trimRight(); - console.error('sshpk-verify: the -i or --identity option ' + - 'is required\n'); - console.error(help); - process.exit(3); - } - - if (!opts.signature) { - var help = parser.help({}).trimRight(); - console.error('sshpk-verify: the -s or --signature option ' + - 'is required\n'); - console.error(help); - process.exit(3); - } - - var keyData = fs.readFileSync(opts.identity); - - var key; - try { - key = sshpk.parseKey(keyData); - } catch (e) { - console.error('sshpk-verify: error loading key "' + - opts.identity + '": ' + e.name + ': ' + e.message); - process.exit(2); - } - - var fmt = opts.format || 'asn1'; - var sigData = new Buffer(opts.signature, 'base64'); - - var sig; - try { - sig = sshpk.parseSignature(sigData, key.type, fmt); - } catch (e) { - console.error('sshpk-verify: error parsing signature: ' + - e.name + ': ' + e.message); - process.exit(2); - } - - var hash = opts.hash || key.defaultHashAlgorithm(); - - var verifier; - try { - verifier = key.createVerify(hash); - } catch (e) { - console.error('sshpk-verify: error creating verifier: ' + - e.name + ': ' + e.message); - process.exit(2); - } - - if (opts.verbose) { - console.error('sshpk-verify: using %s-%s with a %d bit key', - key.type, hash, key.size); - } - - var inFile = process.stdin; - var inFileName = 'stdin'; - - var inFilePath; - if (opts.file) { - inFilePath = opts.file; - } else if (opts._args.length === 1) { - inFilePath = opts._args[0]; - } - - if (inFilePath) - inFileName = path.basename(inFilePath); - - try { - if (inFilePath) { - fs.accessSync(inFilePath, fs.R_OK); - inFile = fs.createReadStream(inFilePath); - } - } catch (e) { - console.error('sshpk-verify: error opening input file' + - ': ' + e.name + ': ' + e.message); - process.exit(2); - } - - inFile.pipe(verifier); - inFile.on('end', function () { - var ret; - try { - ret = verifier.verify(sig); - } catch (e) { - console.error('sshpk-verify: error verifying data: ' + - e.name + ': ' + e.message); - process.exit(1); - } - - if (ret) { - console.error('OK'); - process.exit(0); - } - - console.error('NOT OK'); - process.exit(1); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js deleted file mode 100644 index f30af560e36..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/algs.js +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -var algInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y'], - sizePart: 'p' - }, - 'rsa': { - parts: ['e', 'n'], - sizePart: 'n' - }, - 'ecdsa': { - parts: ['curve', 'Q'], - sizePart: 'Q' - }, - 'ed25519': { - parts: ['R'], - normalize: false, - sizePart: 'R' - } -}; -algInfo['curve25519'] = algInfo['ed25519']; - -var algPrivInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y', 'x'] - }, - 'rsa': { - parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] - }, - 'ecdsa': { - parts: ['curve', 'Q', 'd'] - }, - 'ed25519': { - parts: ['R', 'r'], - normalize: false - } -}; -algPrivInfo['curve25519'] = algPrivInfo['ed25519']; - -var hashAlgs = { - 'md5': true, - 'sha1': true, - 'sha256': true, - 'sha384': true, - 'sha512': true -}; - -/* - * Taken from - * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf - */ -var curves = { - 'nistp256': { - size: 256, - pkcs8oid: '1.2.840.10045.3.1.7', - p: new Buffer(('00' + - 'ffffffff 00000001 00000000 00000000' + - '00000000 ffffffff ffffffff ffffffff'). - replace(/ /g, ''), 'hex'), - a: new Buffer(('00' + - 'FFFFFFFF 00000001 00000000 00000000' + - '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: new Buffer(( - '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + - '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). - replace(/ /g, ''), 'hex'), - s: new Buffer(('00' + - 'c49d3608 86e70493 6a6678e1 139d26b7' + - '819f7e90'). - replace(/ /g, ''), 'hex'), - n: new Buffer(('00' + - 'ffffffff 00000000 ffffffff ffffffff' + - 'bce6faad a7179e84 f3b9cac2 fc632551'). - replace(/ /g, ''), 'hex'), - G: new Buffer(('04' + - '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + - '77037d81 2deb33a0 f4a13945 d898c296' + - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + - '2bce3357 6b315ece cbb64068 37bf51f5'). - replace(/ /g, ''), 'hex') - }, - 'nistp384': { - size: 384, - pkcs8oid: '1.3.132.0.34', - p: new Buffer(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffe' + - 'ffffffff 00000000 00000000 ffffffff'). - replace(/ /g, ''), 'hex'), - a: new Buffer(('00' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + - 'FFFFFFFF 00000000 00000000 FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: new Buffer(( - 'b3312fa7 e23ee7e4 988e056b e3f82d19' + - '181d9c6e fe814112 0314088f 5013875a' + - 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). - replace(/ /g, ''), 'hex'), - s: new Buffer(('00' + - 'a335926a a319a27a 1d00896a 6773a482' + - '7acdac73'). - replace(/ /g, ''), 'hex'), - n: new Buffer(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff c7634d81 f4372ddf' + - '581a0db2 48b0a77a ecec196a ccc52973'). - replace(/ /g, ''), 'hex'), - G: new Buffer(('04' + - 'aa87ca22 be8b0537 8eb1c71e f320ad74' + - '6e1d3b62 8ba79b98 59f741e0 82542a38' + - '5502f25d bf55296c 3a545e38 72760ab7' + - '3617de4a 96262c6f 5d9e98bf 9292dc29' + - 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + - '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). - replace(/ /g, ''), 'hex') - }, - 'nistp521': { - size: 521, - pkcs8oid: '1.3.132.0.35', - p: new Buffer(( - '01ffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffff').replace(/ /g, ''), 'hex'), - a: new Buffer(('01FF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: new Buffer(('51' + - '953eb961 8e1c9a1f 929a21a0 b68540ee' + - 'a2da725b 99b315f3 b8b48991 8ef109e1' + - '56193951 ec7e937b 1652c0bd 3bb1bf07' + - '3573df88 3d2c34f1 ef451fd4 6b503f00'). - replace(/ /g, ''), 'hex'), - s: new Buffer(('00' + - 'd09e8800 291cb853 96cc6717 393284aa' + - 'a0da64ba').replace(/ /g, ''), 'hex'), - n: new Buffer(('01ff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffa' + - '51868783 bf2f966b 7fcc0148 f709a5d0' + - '3bb5c9b8 899c47ae bb6fb71e 91386409'). - replace(/ /g, ''), 'hex'), - G: new Buffer(('04' + - '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + - '9c648139 053fb521 f828af60 6b4d3dba' + - 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + - '3348b3c1 856a429b f97e7e31 c2e5bd66' + - '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + - '98f54449 579b4468 17afbd17 273e662c' + - '97ee7299 5ef42640 c550b901 3fad0761' + - '353c7086 a272c240 88be9476 9fd16650'). - replace(/ /g, ''), 'hex') - } -}; - -module.exports = { - info: algInfo, - privInfo: algPrivInfo, - hashAlgs: hashAlgs, - curves: curves -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js deleted file mode 100644 index 8f9548ce576..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/dhe.js +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = DiffieHellman; - -var assert = require('assert-plus'); -var crypto = require('crypto'); -var algs = require('./algs'); -var utils = require('./utils'); -var ed; - -var Key = require('./key'); -var PrivateKey = require('./private-key'); - -var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); - -var ecdh, ec, jsbn; - -function DiffieHellman(key) { - utils.assertCompatible(key, Key, [1, 4], 'key'); - this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); - this._algo = key.type; - this._curve = key.curve; - this._key = key; - if (key.type === 'dsa') { - if (!CRYPTO_HAVE_ECDH) { - throw (new Error('Due to bugs in the node 0.10 ' + - 'crypto API, node 0.12.x or later is required ' + - 'to use DH')); - } - this._dh = crypto.createDiffieHellman( - key.part.p.data, undefined, - key.part.g.data, undefined); - this._p = key.part.p; - this._g = key.part.g; - if (this._isPriv) - this._dh.setPrivateKey(key.part.x.data); - this._dh.setPublicKey(key.part.y.data); - - } else if (key.type === 'ecdsa') { - if (!CRYPTO_HAVE_ECDH) { - if (ecdh === undefined) - ecdh = require('ecc-jsbn'); - if (ec === undefined) - ec = require('ecc-jsbn/lib/ec'); - if (jsbn === undefined) - jsbn = require('jsbn').BigInteger; - - this._ecParams = new X9ECParameters(this._curve); - - if (this._isPriv) { - this._priv = new ECPrivate( - this._ecParams, key.part.d.data); - } - return; - } - - var curve = { - 'nistp256': 'prime256v1', - 'nistp384': 'secp384r1', - 'nistp521': 'secp521r1' - }[key.curve]; - this._dh = crypto.createECDH(curve); - if (typeof (this._dh) !== 'object' || - typeof (this._dh.setPrivateKey) !== 'function') { - CRYPTO_HAVE_ECDH = false; - DiffieHellman.call(this, key); - return; - } - if (this._isPriv) - this._dh.setPrivateKey(key.part.d.data); - this._dh.setPublicKey(key.part.Q.data); - - } else if (key.type === 'curve25519') { - if (ed === undefined) - ed = require('jodid25519'); - - if (this._isPriv) { - this._priv = key.part.r.data; - if (this._priv[0] === 0x00) - this._priv = this._priv.slice(1); - this._priv = this._priv.slice(0, 32); - } - - } else { - throw (new Error('DH not supported for ' + key.type + ' keys')); - } -} - -DiffieHellman.prototype.getPublicKey = function () { - if (this._isPriv) - return (this._key.toPublic()); - return (this._key); -}; - -DiffieHellman.prototype.getPrivateKey = function () { - if (this._isPriv) - return (this._key); - else - return (undefined); -}; -DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; - -DiffieHellman.prototype._keyCheck = function (pk, isPub) { - assert.object(pk, 'key'); - if (!isPub) - utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); - utils.assertCompatible(pk, Key, [1, 4], 'key'); - - if (pk.type !== this._algo) { - throw (new Error('A ' + pk.type + ' key cannot be used in ' + - this._algo + ' Diffie-Hellman')); - } - - if (pk.curve !== this._curve) { - throw (new Error('A key from the ' + pk.curve + ' curve ' + - 'cannot be used with a ' + this._curve + - ' Diffie-Hellman')); - } - - if (pk.type === 'dsa') { - assert.deepEqual(pk.part.p, this._p, - 'DSA key prime does not match'); - assert.deepEqual(pk.part.g, this._g, - 'DSA key generator does not match'); - } -}; - -DiffieHellman.prototype.setKey = function (pk) { - this._keyCheck(pk); - - if (pk.type === 'dsa') { - this._dh.setPrivateKey(pk.part.x.data); - this._dh.setPublicKey(pk.part.y.data); - - } else if (pk.type === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.setPrivateKey(pk.part.d.data); - this._dh.setPublicKey(pk.part.Q.data); - } else { - this._priv = new ECPrivate( - this._ecParams, pk.part.d.data); - } - - } else if (pk.type === 'curve25519') { - this._priv = pk.part.r.data; - if (this._priv[0] === 0x00) - this._priv = this._priv.slice(1); - this._priv = this._priv.slice(0, 32); - } - this._key = pk; - this._isPriv = true; -}; -DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; - -DiffieHellman.prototype.computeSecret = function (otherpk) { - this._keyCheck(otherpk, true); - if (!this._isPriv) - throw (new Error('DH exchange has not been initialized with ' + - 'a private key yet')); - - var pub; - if (this._algo === 'dsa') { - return (this._dh.computeSecret( - otherpk.part.y.data)); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - return (this._dh.computeSecret( - otherpk.part.Q.data)); - } else { - pub = new ECPublic( - this._ecParams, otherpk.part.Q.data); - return (this._priv.deriveSharedSecret(pub)); - } - - } else if (this._algo === 'curve25519') { - pub = otherpk.part.R.data; - if (pub[0] === 0x00) - pub = pub.slice(1); - - var secret = ed.dh.computeKey( - this._priv.toString('binary'), - pub.toString('binary')); - - return (new Buffer(secret, 'binary')); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; - -DiffieHellman.prototype.generateKey = function () { - var parts = []; - var priv, pub; - if (this._algo === 'dsa') { - this._dh.generateKeys(); - - parts.push({name: 'p', data: this._p.data}); - parts.push({name: 'q', data: this._key.part.q.data}); - parts.push({name: 'g', data: this._g.data}); - parts.push({name: 'y', data: this._dh.getPublicKey()}); - parts.push({name: 'x', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'dsa', - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.generateKeys(); - - parts.push({name: 'curve', - data: new Buffer(this._curve)}); - parts.push({name: 'Q', data: this._dh.getPublicKey()}); - parts.push({name: 'd', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else { - var n = this._ecParams.getN(); - var r = new jsbn(crypto.randomBytes(n.bitLength())); - var n1 = n.subtract(jsbn.ONE); - priv = r.mod(n1).add(jsbn.ONE); - pub = this._ecParams.getG().multiply(priv); - - priv = new Buffer(priv.toByteArray()); - pub = new Buffer(this._ecParams.getCurve(). - encodePointHex(pub), 'hex'); - - this._priv = new ECPrivate(this._ecParams, priv); - - parts.push({name: 'curve', - data: new Buffer(this._curve)}); - parts.push({name: 'Q', data: pub}); - parts.push({name: 'd', data: priv}); - - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - } else if (this._algo === 'curve25519') { - priv = ed.dh.generateKey(); - pub = ed.dh.publicKey(priv); - this._priv = priv = new Buffer(priv, 'binary'); - pub = new Buffer(pub, 'binary'); - - parts.push({name: 'R', data: pub}); - parts.push({name: 'r', data: Buffer.concat([priv, pub])}); - this._key = new PrivateKey({ - type: 'curve25519', - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; -DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; - -/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ - -function X9ECParameters(name) { - var params = algs.curves[name]; - assert.object(params); - - var p = new jsbn(params.p); - var a = new jsbn(params.a); - var b = new jsbn(params.b); - var n = new jsbn(params.n); - var h = jsbn.ONE; - var curve = new ec.ECCurveFp(p, a, b); - var G = curve.decodePointHex(params.G.toString('hex')); - - this.curve = curve; - this.g = G; - this.n = n; - this.h = h; -} -X9ECParameters.prototype.getCurve = function () { return (this.curve); }; -X9ECParameters.prototype.getG = function () { return (this.g); }; -X9ECParameters.prototype.getN = function () { return (this.n); }; -X9ECParameters.prototype.getH = function () { return (this.h); }; - -function ECPublic(params, buffer) { - this._params = params; - if (buffer[0] === 0x00) - buffer = buffer.slice(1); - this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); -} - -function ECPrivate(params, buffer) { - this._params = params; - this._priv = new jsbn(utils.mpNormalize(buffer)); -} -ECPrivate.prototype.deriveSharedSecret = function (pubKey) { - assert.ok(pubKey instanceof ECPublic); - var S = pubKey._pub.multiply(this._priv); - return (new Buffer(S.getX().toBigInteger().toByteArray())); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js deleted file mode 100644 index 5365fb14027..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ed-compat.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - Verifier: Verifier, - Signer: Signer -}; - -var nacl; -var stream = require('stream'); -var util = require('util'); -var assert = require('assert-plus'); -var Signature = require('./signature'); - -function Verifier(key, hashAlgo) { - if (nacl === undefined) - nacl = require('tweetnacl'); - - if (hashAlgo.toLowerCase() !== 'sha512') - throw (new Error('ED25519 only supports the use of ' + - 'SHA-512 hashes')); - - this.key = key; - this.chunks = []; - - stream.Writable.call(this, {}); -} -util.inherits(Verifier, stream.Writable); - -Verifier.prototype._write = function (chunk, enc, cb) { - this.chunks.push(chunk); - cb(); -}; - -Verifier.prototype.update = function (chunk) { - if (typeof (chunk) === 'string') - chunk = new Buffer(chunk, 'binary'); - this.chunks.push(chunk); -}; - -Verifier.prototype.verify = function (signature, fmt) { - var sig; - if (Signature.isSignature(signature, [2, 0])) { - if (signature.type !== 'ed25519') - return (false); - sig = signature.toBuffer('raw'); - - } else if (typeof (signature) === 'string') { - sig = new Buffer(signature, 'base64'); - - } else if (Signature.isSignature(signature, [1, 0])) { - throw (new Error('signature was created by too old ' + - 'a version of sshpk and cannot be verified')); - } - - assert.buffer(sig); - return (nacl.sign.detached.verify( - new Uint8Array(Buffer.concat(this.chunks)), - new Uint8Array(sig), - new Uint8Array(this.key.part.R.data))); -}; - -function Signer(key, hashAlgo) { - if (nacl === undefined) - nacl = require('tweetnacl'); - - if (hashAlgo.toLowerCase() !== 'sha512') - throw (new Error('ED25519 only supports the use of ' + - 'SHA-512 hashes')); - - this.key = key; - this.chunks = []; - - stream.Writable.call(this, {}); -} -util.inherits(Signer, stream.Writable); - -Signer.prototype._write = function (chunk, enc, cb) { - this.chunks.push(chunk); - cb(); -}; - -Signer.prototype.update = function (chunk) { - if (typeof (chunk) === 'string') - chunk = new Buffer(chunk, 'binary'); - this.chunks.push(chunk); -}; - -Signer.prototype.sign = function () { - var sig = nacl.sign.detached( - new Uint8Array(Buffer.concat(this.chunks)), - new Uint8Array(this.key.part.r.data)); - var sigBuf = new Buffer(sig); - var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); - sigObj.hashAlgorithm = 'sha512'; - return (sigObj); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js deleted file mode 100644 index d984f1ac3f6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/errors.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -var assert = require('assert-plus'); -var util = require('util'); - -function FingerprintFormatError(fp, format) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, FingerprintFormatError); - this.name = 'FingerprintFormatError'; - this.fingerprint = fp; - this.format = format; - this.message = 'Fingerprint format is not supported, or is invalid: '; - if (fp !== undefined) - this.message += ' fingerprint = ' + fp; - if (format !== undefined) - this.message += ' format = ' + format; -} -util.inherits(FingerprintFormatError, Error); - -function InvalidAlgorithmError(alg) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, InvalidAlgorithmError); - this.name = 'InvalidAlgorithmError'; - this.algorithm = alg; - this.message = 'Algorithm "' + alg + '" is not supported'; -} -util.inherits(InvalidAlgorithmError, Error); - -function KeyParseError(name, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, KeyParseError); - this.name = 'KeyParseError'; - this.format = format; - this.keyName = name; - this.innerErr = innerErr; - this.message = 'Failed to parse ' + name + ' as a valid ' + format + - ' format key: ' + innerErr.message; -} -util.inherits(KeyParseError, Error); - -function SignatureParseError(type, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, SignatureParseError); - this.name = 'SignatureParseError'; - this.type = type; - this.format = format; - this.innerErr = innerErr; - this.message = 'Failed to parse the given data as a ' + type + - ' signature in ' + format + ' format: ' + innerErr.message; -} -util.inherits(SignatureParseError, Error); - -function KeyEncryptedError(name, format) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, KeyEncryptedError); - this.name = 'KeyEncryptedError'; - this.format = format; - this.keyName = name; - this.message = 'The ' + format + ' format key ' + name + ' is ' + - 'encrypted (password-protected), and no passphrase was ' + - 'provided in `options`'; -} -util.inherits(KeyEncryptedError, Error); - -module.exports = { - FingerprintFormatError: FingerprintFormatError, - InvalidAlgorithmError: InvalidAlgorithmError, - KeyParseError: KeyParseError, - SignatureParseError: SignatureParseError, - KeyEncryptedError: KeyEncryptedError -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js deleted file mode 100644 index c607330e7f5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/fingerprint.js +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = Fingerprint; - -var assert = require('assert-plus'); -var algs = require('./algs'); -var crypto = require('crypto'); -var errs = require('./errors'); -var Key = require('./key'); -var utils = require('./utils'); - -var FingerprintFormatError = errs.FingerprintFormatError; -var InvalidAlgorithmError = errs.InvalidAlgorithmError; - -function Fingerprint(opts) { - assert.object(opts, 'options'); - assert.buffer(opts.hash, 'options.hash'); - assert.string(opts.algorithm, 'options.algorithm'); - - this.algorithm = opts.algorithm.toLowerCase(); - if (algs.hashAlgs[this.algorithm] !== true) - throw (new InvalidAlgorithmError(this.algorithm)); - - this.hash = opts.hash; -} - -Fingerprint.prototype.toString = function (format) { - if (format === undefined) { - if (this.algorithm === 'md5') - format = 'hex'; - else - format = 'base64'; - } - assert.string(format); - - switch (format) { - case 'hex': - return (addColons(this.hash.toString('hex'))); - case 'base64': - return (sshBase64Format(this.algorithm, - this.hash.toString('base64'))); - default: - throw (new FingerprintFormatError(undefined, format)); - } -}; - -Fingerprint.prototype.matches = function (key) { - assert.object(key, 'key'); - utils.assertCompatible(key, Key, [1, 0], 'key'); - - var theirHash = key.hash(this.algorithm); - var theirHash2 = crypto.createHash(this.algorithm). - update(theirHash).digest('base64'); - - if (this.hash2 === undefined) - this.hash2 = crypto.createHash(this.algorithm). - update(this.hash).digest('base64'); - - return (this.hash2 === theirHash2); -}; - -Fingerprint.parse = function (fp, enAlgs) { - assert.string(fp, 'fingerprint'); - - var alg, hash; - assert.optionalArrayOfString(enAlgs, 'algorithms'); - - var parts = fp.split(':'); - if (parts.length == 2) { - alg = parts[0].toLowerCase(); - /*JSSTYLED*/ - var base64RE = /^[A-Za-z0-9+\/=]+$/; - if (!base64RE.test(parts[1])) - throw (new FingerprintFormatError(fp)); - try { - hash = new Buffer(parts[1], 'base64'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } else if (parts.length > 2) { - alg = 'md5'; - if (parts[0].toLowerCase() === 'md5') - parts = parts.slice(1); - parts = parts.join(''); - /*JSSTYLED*/ - var md5RE = /^[a-fA-F0-9]+$/; - if (!md5RE.test(parts)) - throw (new FingerprintFormatError(fp)); - try { - hash = new Buffer(parts, 'hex'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } - - if (alg === undefined) - throw (new FingerprintFormatError(fp)); - - if (algs.hashAlgs[alg] === undefined) - throw (new InvalidAlgorithmError(alg)); - - if (enAlgs !== undefined) { - enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); - if (enAlgs.indexOf(alg) === -1) - throw (new InvalidAlgorithmError(alg)); - } - - return (new Fingerprint({algorithm: alg, hash: hash})); -}; - -function addColons(s) { - /*JSSTYLED*/ - return (s.replace(/(.{2})(?=.)/g, '$1:')); -} - -function base64Strip(s) { - /*JSSTYLED*/ - return (s.replace(/=*$/, '')); -} - -function sshBase64Format(alg, h) { - return (alg.toUpperCase() + ':' + base64Strip(h)); -} - -Fingerprint.isFingerprint = function (obj, ver) { - return (utils.isCompatible(obj, Fingerprint, ver)); -}; - -/* - * API versions for Fingerprint: - * [1,0] -- initial ver - * [1,1] -- first tagged ver - */ -Fingerprint.prototype._sshpkApiVersion = [1, 1]; - -Fingerprint._oldVersionDetect = function (obj) { - assert.func(obj.toString); - assert.func(obj.matches); - return ([1, 0]); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js deleted file mode 100644 index 973c03245e3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/auto.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); - -var pem = require('./pem'); -var ssh = require('./ssh'); -var rfc4253 = require('./rfc4253'); - -function read(buf, options) { - if (typeof (buf) === 'string') { - if (buf.trim().match(/^[-]+[ ]*BEGIN/)) - return (pem.read(buf, options)); - if (buf.match(/^\s*ssh-[a-z]/)) - return (ssh.read(buf, options)); - if (buf.match(/^\s*ecdsa-/)) - return (ssh.read(buf, options)); - buf = new Buffer(buf, 'binary'); - } else { - assert.buffer(buf); - if (findPEMHeader(buf)) - return (pem.read(buf, options)); - if (findSSHHeader(buf)) - return (ssh.read(buf, options)); - } - if (buf.readUInt32BE(0) < buf.length) - return (rfc4253.read(buf, options)); - throw (new Error('Failed to auto-detect format of key')); -} - -function findSSHHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) - ++offset; - if (offset + 4 <= buf.length && - buf.slice(offset, offset + 4).toString('ascii') === 'ssh-') - return (true); - if (offset + 6 <= buf.length && - buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-') - return (true); - return (false); -} - -function findPEMHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10)) - ++offset; - if (buf[offset] !== 45) - return (false); - while (offset < buf.length && - (buf[offset] === 45)) - ++offset; - while (offset < buf.length && - (buf[offset] === 32)) - ++offset; - if (offset + 5 > buf.length || - buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN') - return (false); - return (true); -} - -function write(key, options) { - throw (new Error('"auto" format cannot be used for writing')); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js deleted file mode 100644 index 5318b351653..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pem.js +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var crypto = require('crypto'); -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); - -var pkcs1 = require('./pkcs1'); -var pkcs8 = require('./pkcs8'); -var sshpriv = require('./ssh-private'); -var rfc4253 = require('./rfc4253'); - -var errors = require('../errors'); - -/* - * For reading we support both PKCS#1 and PKCS#8. If we find a private key, - * we just take the public component of it and use that. - */ -function read(buf, options, forceType) { - var input = buf; - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var lines = buf.trim().split('\n'); - - var m = lines[0].match(/*JSSTYLED*/ - /[-]+[ ]*BEGIN ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - assert.ok(m, 'invalid PEM header'); - - var m2 = lines[lines.length - 1].match(/*JSSTYLED*/ - /[-]+[ ]*END ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - assert.ok(m2, 'invalid PEM footer'); - - /* Begin and end banners must match key type */ - assert.equal(m[2], m2[2]); - var type = m[2].toLowerCase(); - - var alg; - if (m[1]) { - /* They also must match algorithms, if given */ - assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); - alg = m[1].trim(); - } - - var headers = {}; - while (true) { - lines = lines.slice(1); - m = lines[0].match(/*JSSTYLED*/ - /^([A-Za-z0-9-]+): (.+)$/); - if (!m) - break; - headers[m[1].toLowerCase()] = m[2]; - } - - var cipher, key, iv; - if (headers['proc-type']) { - var parts = headers['proc-type'].split(','); - if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { - if (typeof (options.passphrase) === 'string') { - options.passphrase = new Buffer( - options.passphrase, 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } else { - parts = headers['dek-info'].split(','); - assert.ok(parts.length === 2); - cipher = parts[0].toLowerCase(); - iv = new Buffer(parts[1], 'hex'); - key = utils.opensslKeyDeriv(cipher, iv, - options.passphrase, 1).key; - } - } - } - - /* Chop off the first and last lines */ - lines = lines.slice(0, -1).join(''); - buf = new Buffer(lines, 'base64'); - - if (cipher && key && iv) { - var cipherStream = crypto.createDecipheriv(cipher, key, iv); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - if (e.toString().indexOf('bad decrypt') !== -1) { - throw (new Error('Incorrect passphrase ' + - 'supplied, could not decrypt key')); - } - throw (e); - }); - cipherStream.write(buf); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - buf = Buffer.concat(chunks); - } - - /* The new OpenSSH internal format abuses PEM headers */ - if (alg && alg.toLowerCase() === 'openssh') - return (sshpriv.readSSHPrivate(type, buf)); - if (alg && alg.toLowerCase() === 'ssh2') - return (rfc4253.readType(type, buf)); - - var der = new asn1.BerReader(buf); - der.originalInput = input; - - /* - * All of the PEM file types start with a sequence tag, so chop it - * off here - */ - der.readSequence(); - - /* PKCS#1 type keys name an algorithm in the banner explicitly */ - if (alg) { - if (forceType) - assert.strictEqual(forceType, 'pkcs1'); - return (pkcs1.readPkcs1(alg, type, der)); - } else { - if (forceType) - assert.strictEqual(forceType, 'pkcs8'); - return (pkcs8.readPkcs8(alg, type, der)); - } -} - -function write(key, options, type) { - assert.object(key); - - var alg = {'ecdsa': 'EC', 'rsa': 'RSA', 'dsa': 'DSA'}[key.type]; - var header; - - var der = new asn1.BerWriter(); - - if (PrivateKey.isPrivateKey(key)) { - if (type && type === 'pkcs8') { - header = 'PRIVATE KEY'; - pkcs8.writePkcs8(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs1'); - header = alg + ' PRIVATE KEY'; - pkcs1.writePkcs1(der, key); - } - - } else if (Key.isKey(key)) { - if (type && type === 'pkcs1') { - header = alg + ' PUBLIC KEY'; - pkcs1.writePkcs1(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs8'); - header = 'PUBLIC KEY'; - pkcs8.writePkcs8(der, key); - } - - } else { - throw (new Error('key is not a Key or PrivateKey')); - } - - var tmp = der.buffer.toString('base64'); - var len = tmp.length + (tmp.length / 64) + - 18 + 16 + header.length*2 + 10; - var buf = new Buffer(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 64; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js deleted file mode 100644 index a5676af6ef8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs1.js +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readPkcs1: readPkcs1, - write: write, - writePkcs1: writePkcs1 -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var algs = require('../algs'); -var utils = require('../utils'); - -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); - -var pkcs8 = require('./pkcs8'); -var readECDSACurve = pkcs8.readECDSACurve; - -function read(buf, options) { - return (pem.read(buf, options, 'pkcs1')); -} - -function write(key, options) { - return (pem.write(key, options, 'pkcs1')); -} - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function readPkcs1(alg, type, der) { - switch (alg) { - case 'RSA': - if (type === 'public') - return (readPkcs1RSAPublic(der)); - else if (type === 'private') - return (readPkcs1RSAPrivate(der)); - throw (new Error('Unknown key type: ' + type)); - case 'DSA': - if (type === 'public') - return (readPkcs1DSAPublic(der)); - else if (type === 'private') - return (readPkcs1DSAPrivate(der)); - throw (new Error('Unknown key type: ' + type)); - case 'EC': - case 'ECDSA': - if (type === 'private') - return (readPkcs1ECDSAPrivate(der)); - else if (type === 'public') - return (readPkcs1ECDSAPublic(der)); - throw (new Error('Unknown key type: ' + type)); - default: - throw (new Error('Unknown key algo: ' + alg)); - } -} - -function readPkcs1RSAPublic(der) { - // modulus and exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'exponent'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'e', data: e }, - { name: 'n', data: n } - ] - }; - - return (new Key(key)); -} - -function readPkcs1RSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version[0], 0); - - // modulus then public exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'public exponent'); - var d = readMPInt(der, 'private exponent'); - var p = readMPInt(der, 'prime1'); - var q = readMPInt(der, 'prime2'); - var dmodp = readMPInt(der, 'exponent1'); - var dmodq = readMPInt(der, 'exponent2'); - var iqmp = readMPInt(der, 'iqmp'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'n', data: n }, - { name: 'e', data: e }, - { name: 'd', data: d }, - { name: 'iqmp', data: iqmp }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'dmodp', data: dmodp }, - { name: 'dmodq', data: dmodq } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1DSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 0); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - var y = readMPInt(der, 'y'); - var x = readMPInt(der, 'x'); - - // now, make the key - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y }, - { name: 'x', data: x } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1DSAPublic(der) { - var y = readMPInt(der, 'y'); - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - var key = { - type: 'dsa', - parts: [ - { name: 'y', data: y }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g } - ] - }; - - return (new Key(key)); -} - -function readPkcs1ECDSAPublic(der) { - der.readSequence(); - - var oid = der.readOID(); - assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey'); - - var curveOid = der.readOID(); - - var curve; - var curves = Object.keys(algs.curves); - for (var j = 0; j < curves.length; ++j) { - var c = curves[j]; - var cd = algs.curves[c]; - if (cd.pkcs8oid === curveOid) { - curve = c; - break; - } - } - assert.string(curve, 'a known ECDSA named curve'); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: new Buffer(curve) }, - { name: 'Q', data: Q } - ] - }; - - return (new Key(key)); -} - -function readPkcs1ECDSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 1); - - // private key - var d = der.readString(asn1.Ber.OctetString, true); - - der.readSequence(0xa0); - var curve = readECDSACurve(der); - assert.string(curve, 'a known elliptic curve'); - - der.readSequence(0xa1); - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: new Buffer(curve) }, - { name: 'Q', data: Q }, - { name: 'd', data: d } - ] - }; - - return (new PrivateKey(key)); -} - -function writePkcs1(der, key) { - der.startSequence(); - - switch (key.type) { - case 'rsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1RSAPrivate(der, key); - else - writePkcs1RSAPublic(der, key); - break; - case 'dsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1DSAPrivate(der, key); - else - writePkcs1DSAPublic(der, key); - break; - case 'ecdsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1ECDSAPrivate(der, key); - else - writePkcs1ECDSAPublic(der, key); - break; - default: - throw (new Error('Unknown key algo: ' + key.type)); - } - - der.endSequence(); -} - -function writePkcs1RSAPublic(der, key) { - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); -} - -function writePkcs1RSAPrivate(der, key) { - var ver = new Buffer(1); - ver[0] = 0; - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.writeBuffer(key.part.d.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - if (!key.part.dmodp || !key.part.dmodq) - utils.addRSAMissing(key); - der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); - der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); - der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); -} - -function writePkcs1DSAPrivate(der, key) { - var ver = new Buffer(1); - ver[0] = 0; - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.writeBuffer(key.part.x.data, asn1.Ber.Integer); -} - -function writePkcs1DSAPublic(der, key) { - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); -} - -function writePkcs1ECDSAPublic(der, key) { - der.startSequence(); - - der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */ - var curve = key.part.curve.data.toString(); - var curveOid = algs.curves[curve].pkcs8oid; - assert.string(curveOid, 'a known ECDSA named curve'); - der.writeOID(curveOid); - - der.endSequence(); - - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); -} - -function writePkcs1ECDSAPrivate(der, key) { - var ver = new Buffer(1); - ver[0] = 1; - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); - - der.startSequence(0xa0); - var curve = key.part.curve.data.toString(); - var curveOid = algs.curves[curve].pkcs8oid; - assert.string(curveOid, 'a known ECDSA named curve'); - der.writeOID(curveOid); - der.endSequence(); - - der.startSequence(0xa1); - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); - der.endSequence(); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js deleted file mode 100644 index 33fb7cc4759..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/pkcs8.js +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readPkcs8: readPkcs8, - write: write, - writePkcs8: writePkcs8, - - readECDSACurve: readECDSACurve, - writeECDSACurve: writeECDSACurve -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); - -function read(buf, options) { - return (pem.read(buf, options, 'pkcs8')); -} - -function write(key, options) { - return (pem.write(key, options, 'pkcs8')); -} - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function readPkcs8(alg, type, der) { - /* Private keys in pkcs#8 format have a weird extra int */ - if (der.peek() === asn1.Ber.Integer) { - assert.strictEqual(type, 'private', - 'unexpected Integer at start of public key'); - der.readString(asn1.Ber.Integer, true); - } - - der.readSequence(); - - var oid = der.readOID(); - switch (oid) { - case '1.2.840.113549.1.1.1': - if (type === 'public') - return (readPkcs8RSAPublic(der)); - else - return (readPkcs8RSAPrivate(der)); - case '1.2.840.10040.4.1': - if (type === 'public') - return (readPkcs8DSAPublic(der)); - else - return (readPkcs8DSAPrivate(der)); - case '1.2.840.10045.2.1': - if (type === 'public') - return (readPkcs8ECDSAPublic(der)); - else - return (readPkcs8ECDSAPrivate(der)); - default: - throw (new Error('Unknown key type OID ' + oid)); - } -} - -function readPkcs8RSAPublic(der) { - // Null -- XXX this probably isn't good practice - der.readByte(); - der.readByte(); - - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - der.readSequence(); - - // modulus - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'exponent'); - - // now, make the key - var key = { - type: 'rsa', - source: der.originalInput, - parts: [ - { name: 'e', data: e }, - { name: 'n', data: n } - ] - }; - - return (new Key(key)); -} - -function readPkcs8RSAPrivate(der) { - der.readByte(); - der.readByte(); - - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var ver = readMPInt(der, 'version'); - assert.equal(ver[0], 0x0, 'unknown RSA private key version'); - - // modulus then public exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'public exponent'); - var d = readMPInt(der, 'private exponent'); - var p = readMPInt(der, 'prime1'); - var q = readMPInt(der, 'prime2'); - var dmodp = readMPInt(der, 'exponent1'); - var dmodq = readMPInt(der, 'exponent2'); - var iqmp = readMPInt(der, 'iqmp'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'n', data: n }, - { name: 'e', data: e }, - { name: 'd', data: d }, - { name: 'iqmp', data: iqmp }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'dmodp', data: dmodp }, - { name: 'dmodq', data: dmodq } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8DSAPublic(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - - var y = readMPInt(der, 'y'); - - // now, make the key - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y } - ] - }; - - return (new Key(key)); -} - -function readPkcs8DSAPrivate(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - der.readSequence(asn1.Ber.OctetString); - var x = readMPInt(der, 'x'); - - /* The pkcs#8 format does not include the public key */ - var y = utils.calculateDSAPublic(g, p, x); - - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y }, - { name: 'x', data: x } - ] - }; - - return (new PrivateKey(key)); -} - -function readECDSACurve(der) { - var curveName, curveNames; - var j, c, cd; - - if (der.peek() === asn1.Ber.OID) { - var oid = der.readOID(); - - curveNames = Object.keys(algs.curves); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - if (cd.pkcs8oid === oid) { - curveName = c; - break; - } - } - - } else { - // ECParameters sequence - der.readSequence(); - var version = der.readString(asn1.Ber.Integer, true); - assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); - - var curve = {}; - - // FieldID sequence - der.readSequence(); - var fieldTypeOid = der.readOID(); - assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', - 'ECDSA key is not from a prime-field'); - var p = curve.p = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - /* - * p always starts with a 1 bit, so count the zeros to get its - * real size. - */ - curve.size = p.length * 8 - utils.countZeros(p); - - // Curve sequence - der.readSequence(); - curve.a = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - curve.b = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - if (der.peek() === asn1.Ber.BitString) - curve.s = der.readString(asn1.Ber.BitString, true); - - // Combined Gx and Gy - curve.G = der.readString(asn1.Ber.OctetString, true); - assert.strictEqual(curve.G[0], 0x4, - 'uncompressed G is required'); - - curve.n = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - curve.h = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + - 'required'); - - curveNames = Object.keys(algs.curves); - var ks = Object.keys(curve); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - var equal = true; - for (var i = 0; i < ks.length; ++i) { - var k = ks[i]; - if (cd[k] === undefined) - continue; - if (typeof (cd[k]) === 'object' && - cd[k].equals !== undefined) { - if (!cd[k].equals(curve[k])) { - equal = false; - break; - } - } else if (Buffer.isBuffer(cd[k])) { - if (cd[k].toString('binary') - !== curve[k].toString('binary')) { - equal = false; - break; - } - } else { - if (cd[k] !== curve[k]) { - equal = false; - break; - } - } - } - if (equal) { - curveName = c; - break; - } - } - } - return (curveName); -} - -function readPkcs8ECDSAPrivate(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var version = readMPInt(der, 'version'); - assert.equal(version[0], 1, 'unknown version of ECDSA key'); - - var d = der.readString(asn1.Ber.OctetString, true); - der.readSequence(0xa1); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: new Buffer(curveName) }, - { name: 'Q', data: Q }, - { name: 'd', data: d } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8ECDSAPublic(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: new Buffer(curveName) }, - { name: 'Q', data: Q } - ] - }; - - return (new Key(key)); -} - -function writePkcs8(der, key) { - der.startSequence(); - - if (PrivateKey.isPrivateKey(key)) { - var sillyInt = new Buffer(1); - sillyInt[0] = 0x0; - der.writeBuffer(sillyInt, asn1.Ber.Integer); - } - - der.startSequence(); - switch (key.type) { - case 'rsa': - der.writeOID('1.2.840.113549.1.1.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8RSAPrivate(key, der); - else - writePkcs8RSAPublic(key, der); - break; - case 'dsa': - der.writeOID('1.2.840.10040.4.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8DSAPrivate(key, der); - else - writePkcs8DSAPublic(key, der); - break; - case 'ecdsa': - der.writeOID('1.2.840.10045.2.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8ECDSAPrivate(key, der); - else - writePkcs8ECDSAPublic(key, der); - break; - default: - throw (new Error('Unsupported key type: ' + key.type)); - } - - der.endSequence(); -} - -function writePkcs8RSAPrivate(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = new Buffer(1); - version[0] = 0; - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.writeBuffer(key.part.d.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - if (!key.part.dmodp || !key.part.dmodq) - utils.addRSAMissing(key); - der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); - der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); - der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); - - der.endSequence(); - der.endSequence(); -} - -function writePkcs8RSAPublic(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - - der.startSequence(); - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); -} - -function writePkcs8DSAPrivate(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.writeBuffer(key.part.x.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writePkcs8DSAPublic(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writeECDSACurve(key, der) { - var curve = algs.curves[key.curve]; - if (curve.pkcs8oid) { - /* This one has a name in pkcs#8, so just write the oid */ - der.writeOID(curve.pkcs8oid); - - } else { - // ECParameters sequence - der.startSequence(); - - var version = new Buffer(1); - version.writeUInt8(1, 0); - der.writeBuffer(version, asn1.Ber.Integer); - - // FieldID sequence - der.startSequence(); - der.writeOID('1.2.840.10045.1.1'); // prime-field - der.writeBuffer(curve.p, asn1.Ber.Integer); - der.endSequence(); - - // Curve sequence - der.startSequence(); - var a = curve.p; - if (a[0] === 0x0) - a = a.slice(1); - der.writeBuffer(a, asn1.Ber.OctetString); - der.writeBuffer(curve.b, asn1.Ber.OctetString); - der.writeBuffer(curve.s, asn1.Ber.BitString); - der.endSequence(); - - der.writeBuffer(curve.G, asn1.Ber.OctetString); - der.writeBuffer(curve.n, asn1.Ber.Integer); - var h = curve.h; - if (!h) { - h = new Buffer(1); - h[0] = 1; - } - der.writeBuffer(h, asn1.Ber.Integer); - - // ECParameters - der.endSequence(); - } -} - -function writePkcs8ECDSAPublic(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); -} - -function writePkcs8ECDSAPrivate(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = new Buffer(1); - version[0] = 1; - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); - - der.startSequence(0xa1); - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); - der.endSequence(); - - der.endSequence(); - der.endSequence(); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js deleted file mode 100644 index 9d436dd9215..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/rfc4253.js +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read.bind(undefined, false, undefined), - readType: read.bind(undefined, false), - write: write, - /* semi-private api, used by sshpk-agent */ - readPartial: read.bind(undefined, true), - - /* shared with ssh format */ - readInternal: read, - keyTypeToAlg: keyTypeToAlg, - algToKeyType: algToKeyType -}; - -var assert = require('assert-plus'); -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var SSHBuffer = require('../ssh-buffer'); - -function algToKeyType(alg) { - assert.string(alg); - if (alg === 'ssh-dss') - return ('dsa'); - else if (alg === 'ssh-rsa') - return ('rsa'); - else if (alg === 'ssh-ed25519') - return ('ed25519'); - else if (alg === 'ssh-curve25519') - return ('curve25519'); - else if (alg.match(/^ecdsa-sha2-/)) - return ('ecdsa'); - else - throw (new Error('Unknown algorithm ' + alg)); -} - -function keyTypeToAlg(key) { - assert.object(key); - if (key.type === 'dsa') - return ('ssh-dss'); - else if (key.type === 'rsa') - return ('ssh-rsa'); - else if (key.type === 'ed25519') - return ('ssh-ed25519'); - else if (key.type === 'curve25519') - return ('ssh-curve25519'); - else if (key.type === 'ecdsa') - return ('ecdsa-sha2-' + key.part.curve.data.toString()); - else - throw (new Error('Unknown key type ' + key.type)); -} - -function read(partial, type, buf, options) { - if (typeof (buf) === 'string') - buf = new Buffer(buf); - assert.buffer(buf, 'buf'); - - var key = {}; - - var parts = key.parts = []; - var sshbuf = new SSHBuffer({buffer: buf}); - - var alg = sshbuf.readString(); - assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); - - key.type = algToKeyType(alg); - - var partCount = algs.info[key.type].parts.length; - if (type && type === 'private') - partCount = algs.privInfo[key.type].parts.length; - - while (!sshbuf.atEnd() && parts.length < partCount) - parts.push(sshbuf.readPart()); - while (!partial && !sshbuf.atEnd()) - parts.push(sshbuf.readPart()); - - assert.ok(parts.length >= 1, - 'key must have at least one part'); - assert.ok(partial || sshbuf.atEnd(), - 'leftover bytes at end of key'); - - var Constructor = Key; - var algInfo = algs.info[key.type]; - if (type === 'private' || algInfo.parts.length !== parts.length) { - algInfo = algs.privInfo[key.type]; - Constructor = PrivateKey; - } - assert.strictEqual(algInfo.parts.length, parts.length); - - if (key.type === 'ecdsa') { - var res = /^ecdsa-sha2-(.+)$/.exec(alg); - assert.ok(res !== null); - assert.strictEqual(res[1], parts[0].data.toString()); - } - - var normalized = true; - for (var i = 0; i < algInfo.parts.length; ++i) { - parts[i].name = algInfo.parts[i]; - if (parts[i].name !== 'curve' && - algInfo.normalize !== false) { - var p = parts[i]; - var nd = utils.mpNormalize(p.data); - if (nd !== p.data) { - p.data = nd; - normalized = false; - } - } - } - - if (normalized) - key._rfc4253Cache = sshbuf.toBuffer(); - - if (partial && typeof (partial) === 'object') { - partial.remainder = sshbuf.remainder(); - partial.consumed = sshbuf._offset; - } - - return (new Constructor(key)); -} - -function write(key, options) { - assert.object(key); - - var alg = keyTypeToAlg(key); - var i; - - var algInfo = algs.info[key.type]; - if (PrivateKey.isPrivateKey(key)) - algInfo = algs.privInfo[key.type]; - var parts = algInfo.parts; - - var buf = new SSHBuffer({}); - - buf.writeString(alg); - - for (i = 0; i < parts.length; ++i) { - var data = key.part[parts[i]].data; - if (algInfo.normalize !== false) - data = utils.mpNormalize(data); - buf.writeBuffer(data); - } - - return (buf.toBuffer()); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js deleted file mode 100644 index bfbdab527f9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh-private.js +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readSSHPrivate: readSSHPrivate, - write: write -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var algs = require('../algs'); -var utils = require('../utils'); -var crypto = require('crypto'); - -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); -var rfc4253 = require('./rfc4253'); -var SSHBuffer = require('../ssh-buffer'); - -function read(buf, options) { - return (pem.read(buf, options)); -} - -var MAGIC = 'openssh-key-v1'; - -function readSSHPrivate(type, buf) { - buf = new SSHBuffer({buffer: buf}); - - var magic = buf.readCString(); - assert.strictEqual(magic, MAGIC, 'bad magic string'); - - var cipher = buf.readString(); - var kdf = buf.readString(); - - /* We only support unencrypted keys. */ - if (cipher !== 'none' || kdf !== 'none') { - throw (new Error('OpenSSH-format key is encrypted ' + - '(password-protected). Please use the SSH agent ' + - 'or decrypt the key.')); - } - - /* Skip over kdfoptions. */ - buf.readString(); - - var nkeys = buf.readInt(); - if (nkeys !== 1) { - throw (new Error('OpenSSH-format key file contains ' + - 'multiple keys: this is unsupported.')); - } - - var pubKey = buf.readBuffer(); - - if (type === 'public') { - assert.ok(buf.atEnd(), 'excess bytes left after key'); - return (rfc4253.read(pubKey)); - } - - var privKeyBlob = buf.readBuffer(); - assert.ok(buf.atEnd(), 'excess bytes left after key'); - - buf = new SSHBuffer({buffer: privKeyBlob}); - - var checkInt1 = buf.readInt(); - var checkInt2 = buf.readInt(); - assert.strictEqual(checkInt1, checkInt2, 'checkints do not match'); - - var ret = {}; - var key = rfc4253.readInternal(ret, 'private', buf.remainder()); - - buf.skip(ret.consumed); - - var comment = buf.readString(); - key.comment = comment; - - return (key); -} - -function write(key, options) { - var pubKey; - if (PrivateKey.isPrivateKey(key)) - pubKey = key.toPublic(); - else - pubKey = key; - - var privBuf; - if (PrivateKey.isPrivateKey(key)) { - privBuf = new SSHBuffer({}); - var checkInt = crypto.randomBytes(4).readUInt32BE(0); - privBuf.writeInt(checkInt); - privBuf.writeInt(checkInt); - privBuf.write(key.toBuffer('rfc4253')); - privBuf.writeString(key.comment || ''); - - var n = 1; - while (privBuf._offset % 8 !== 0) - privBuf.writeChar(n++); - } - - var buf = new SSHBuffer({}); - - buf.writeCString(MAGIC); - buf.writeString('none'); /* cipher */ - buf.writeString('none'); /* kdf */ - buf.writeBuffer(new Buffer(0)); /* kdfoptions */ - - buf.writeInt(1); /* nkeys */ - buf.writeBuffer(pubKey.toBuffer('rfc4253')); - - if (privBuf) - buf.writeBuffer(privBuf.toBuffer()); - - buf = buf.toBuffer(); - - var header; - if (PrivateKey.isPrivateKey(key)) - header = 'OPENSSH PRIVATE KEY'; - else - header = 'OPENSSH PUBLIC KEY'; - - var tmp = buf.toString('base64'); - var len = tmp.length + (tmp.length / 70) + - 18 + 16 + header.length*2 + 10; - buf = new Buffer(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 70; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js deleted file mode 100644 index 655c9eaf3bf..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/formats/ssh.js +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var rfc4253 = require('./rfc4253'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); - -var sshpriv = require('./ssh-private'); - -/*JSSTYLED*/ -var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/; -/*JSSTYLED*/ -var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/; - -function read(buf, options) { - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var trimmed = buf.trim().replace(/[\\\r]/g, ''); - var m = trimmed.match(SSHKEY_RE); - if (!m) - m = trimmed.match(SSHKEY_RE2); - assert.ok(m, 'key must match regex'); - - var type = rfc4253.algToKeyType(m[1]); - var kbuf = new Buffer(m[2], 'base64'); - - /* - * This is a bit tricky. If we managed to parse the key and locate the - * key comment with the regex, then do a non-partial read and assert - * that we have consumed all bytes. If we couldn't locate the key - * comment, though, there may be whitespace shenanigans going on that - * have conjoined the comment to the rest of the key. We do a partial - * read in this case to try to make the best out of a sorry situation. - */ - var key; - var ret = {}; - if (m[4]) { - try { - key = rfc4253.read(kbuf); - - } catch (e) { - m = trimmed.match(SSHKEY_RE2); - assert.ok(m, 'key must match regex'); - kbuf = new Buffer(m[2], 'base64'); - key = rfc4253.readInternal(ret, 'public', kbuf); - } - } else { - key = rfc4253.readInternal(ret, 'public', kbuf); - } - - assert.strictEqual(type, key.type); - - if (m[4] && m[4].length > 0) { - key.comment = m[4]; - - } else if (ret.consumed) { - /* - * Now the magic: trying to recover the key comment when it's - * gotten conjoined to the key or otherwise shenanigan'd. - * - * Work out how much base64 we used, then drop all non-base64 - * chars from the beginning up to this point in the the string. - * Then offset in this and try to make up for missing = chars. - */ - var data = m[2] + m[3]; - var realOffset = Math.ceil(ret.consumed / 3) * 4; - data = data.slice(0, realOffset - 2). /*JSSTYLED*/ - replace(/[^a-zA-Z0-9+\/=]/g, '') + - data.slice(realOffset - 2); - - var padding = ret.consumed % 3; - if (padding > 0 && - data.slice(realOffset - 1, realOffset) !== '=') - realOffset--; - while (data.slice(realOffset, realOffset + 1) === '=') - realOffset++; - - /* Finally, grab what we think is the comment & clean it up. */ - var trailer = data.slice(realOffset); - trailer = trailer.replace(/[\r\n]/g, ' '). - replace(/^\s+/, ''); - if (trailer.match(/^[a-zA-Z0-9]/)) - key.comment = trailer; - } - - return (key); -} - -function write(key, options) { - assert.object(key); - if (!Key.isKey(key)) - throw (new Error('Must be a public key')); - - var parts = []; - var alg = rfc4253.keyTypeToAlg(key); - parts.push(alg); - - var buf = rfc4253.write(key); - parts.push(buf.toString('base64')); - - if (key.comment) - parts.push(key.comment); - - return (new Buffer(parts.join(' '))); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js deleted file mode 100644 index 0b40429c95c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/index.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -var Key = require('./key'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var PrivateKey = require('./private-key'); -var errs = require('./errors'); - -module.exports = { - /* top-level classes */ - Key: Key, - parseKey: Key.parse, - Fingerprint: Fingerprint, - parseFingerprint: Fingerprint.parse, - Signature: Signature, - parseSignature: Signature.parse, - PrivateKey: PrivateKey, - parsePrivateKey: PrivateKey.parse, - - /* errors */ - FingerprintFormatError: errs.FingerprintFormatError, - InvalidAlgorithmError: errs.InvalidAlgorithmError, - KeyParseError: errs.KeyParseError, - SignatureParseError: errs.SignatureParseError, - KeyEncryptedError: errs.KeyEncryptedError -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js deleted file mode 100644 index edc5143426a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/key.js +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = Key; - -var assert = require('assert-plus'); -var algs = require('./algs'); -var crypto = require('crypto'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var DiffieHellman = require('./dhe'); -var errs = require('./errors'); -var utils = require('./utils'); -var PrivateKey = require('./private-key'); -var edCompat; - -try { - edCompat = require('./ed-compat'); -} catch (e) { - /* Just continue through, and bail out if we try to use it. */ -} - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var KeyParseError = errs.KeyParseError; - -var formats = {}; -formats['auto'] = require('./formats/auto'); -formats['pem'] = require('./formats/pem'); -formats['pkcs1'] = require('./formats/pkcs1'); -formats['pkcs8'] = require('./formats/pkcs8'); -formats['rfc4253'] = require('./formats/rfc4253'); -formats['ssh'] = require('./formats/ssh'); -formats['ssh-private'] = require('./formats/ssh-private'); -formats['openssh'] = formats['ssh-private']; - -function Key(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.parts, 'options.parts'); - assert.string(opts.type, 'options.type'); - assert.optionalString(opts.comment, 'options.comment'); - - var algInfo = algs.info[opts.type]; - if (typeof (algInfo) !== 'object') - throw (new InvalidAlgorithmError(opts.type)); - - var partLookup = {}; - for (var i = 0; i < opts.parts.length; ++i) { - var part = opts.parts[i]; - partLookup[part.name] = part; - } - - this.type = opts.type; - this.parts = opts.parts; - this.part = partLookup; - this.comment = undefined; - this.source = opts.source; - - /* for speeding up hashing/fingerprint operations */ - this._rfc4253Cache = opts._rfc4253Cache; - this._hashCache = {}; - - var sz; - this.curve = undefined; - if (this.type === 'ecdsa') { - var curve = this.part.curve.data.toString(); - this.curve = curve; - sz = algs.curves[curve].size; - } else if (this.type === 'ed25519') { - sz = 256; - this.curve = 'curve25519'; - } else { - var szPart = this.part[algInfo.sizePart]; - sz = szPart.data.length; - sz = sz * 8 - utils.countZeros(szPart.data); - } - this.size = sz; -} - -Key.formats = formats; - -Key.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'ssh'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - if (format === 'rfc4253') { - if (this._rfc4253Cache === undefined) - this._rfc4253Cache = formats['rfc4253'].write(this); - return (this._rfc4253Cache); - } - - return (formats[format].write(this, options)); -}; - -Key.prototype.toString = function (format, options) { - return (this.toBuffer(format, options).toString()); -}; - -Key.prototype.hash = function (algo) { - assert.string(algo, 'algorithm'); - algo = algo.toLowerCase(); - if (algs.hashAlgs[algo] === undefined) - throw (new InvalidAlgorithmError(algo)); - - if (this._hashCache[algo]) - return (this._hashCache[algo]); - - var hash = crypto.createHash(algo). - update(this.toBuffer('rfc4253')).digest(); - this._hashCache[algo] = hash; - return (hash); -}; - -Key.prototype.fingerprint = function (algo) { - if (algo === undefined) - algo = 'sha256'; - assert.string(algo, 'algorithm'); - var opts = { - hash: this.hash(algo), - algorithm: algo - }; - return (new Fingerprint(opts)); -}; - -Key.prototype.defaultHashAlgorithm = function () { - var hashAlgo = 'sha1'; - if (this.type === 'rsa') - hashAlgo = 'sha256'; - if (this.type === 'dsa' && this.size > 1024) - hashAlgo = 'sha256'; - if (this.type === 'ed25519') - hashAlgo = 'sha512'; - if (this.type === 'ecdsa') { - if (this.size <= 256) - hashAlgo = 'sha256'; - else if (this.size <= 384) - hashAlgo = 'sha384'; - else - hashAlgo = 'sha512'; - } - return (hashAlgo); -}; - -Key.prototype.createVerify = function (hashAlgo) { - if (hashAlgo === undefined) - hashAlgo = this.defaultHashAlgorithm(); - assert.string(hashAlgo, 'hash algorithm'); - - /* ED25519 is not supported by OpenSSL, use a javascript impl. */ - if (this.type === 'ed25519' && edCompat !== undefined) - return (new edCompat.Verifier(this, hashAlgo)); - if (this.type === 'curve25519') - throw (new Error('Curve25519 keys are not suitable for ' + - 'signing or verification')); - - var v, nm, err; - try { - nm = hashAlgo.toUpperCase(); - v = crypto.createVerify(nm); - } catch (e) { - err = e; - } - if (v === undefined || (err instanceof Error && - err.message.match(/Unknown message digest/))) { - nm = 'RSA-'; - nm += hashAlgo.toUpperCase(); - v = crypto.createVerify(nm); - } - assert.ok(v, 'failed to create verifier'); - var oldVerify = v.verify.bind(v); - var key = this.toBuffer('pkcs8'); - var self = this; - v.verify = function (signature, fmt) { - if (Signature.isSignature(signature, [2, 0])) { - if (signature.type !== self.type) - return (false); - if (signature.hashAlgorithm && - signature.hashAlgorithm !== hashAlgo) - return (false); - return (oldVerify(key, signature.toBuffer('asn1'))); - - } else if (typeof (signature) === 'string' || - Buffer.isBuffer(signature)) { - return (oldVerify(key, signature, fmt)); - - /* - * Avoid doing this on valid arguments, walking the prototype - * chain can be quite slow. - */ - } else if (Signature.isSignature(signature, [1, 0])) { - throw (new Error('signature was created by too old ' + - 'a version of sshpk and cannot be verified')); - - } else { - throw (new TypeError('signature must be a string, ' + - 'Buffer, or Signature object')); - } - }; - return (v); -}; - -Key.prototype.createDiffieHellman = function () { - if (this.type === 'rsa') - throw (new Error('RSA keys do not support Diffie-Hellman')); - - return (new DiffieHellman(this)); -}; -Key.prototype.createDH = Key.prototype.createDiffieHellman; - -Key.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - if (k instanceof PrivateKey) - k = k.toPublic(); - if (!k.comment) - k.comment = options.filename; - return (k); - } catch (e) { - if (e.name === 'KeyEncryptedError') - throw (e); - throw (new KeyParseError(options.filename, format, e)); - } -}; - -Key.isKey = function (obj, ver) { - return (utils.isCompatible(obj, Key, ver)); -}; - -/* - * API versions for Key: - * [1,0] -- initial ver, may take Signature for createVerify or may not - * [1,1] -- added pkcs1, pkcs8 formats - * [1,2] -- added auto, ssh-private, openssh formats - * [1,3] -- added defaultHashAlgorithm - * [1,4] -- added ed support, createDH - * [1,5] -- first explicitly tagged version - */ -Key.prototype._sshpkApiVersion = [1, 5]; - -Key._oldVersionDetect = function (obj) { - assert.func(obj.toBuffer); - assert.func(obj.fingerprint); - if (obj.createDH) - return ([1, 4]); - if (obj.defaultHashAlgorithm) - return ([1, 3]); - if (obj.formats['auto']) - return ([1, 2]); - if (obj.formats['pkcs1']) - return ([1, 1]); - return ([1, 0]); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js deleted file mode 100644 index f80d9396628..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/private-key.js +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = PrivateKey; - -var assert = require('assert-plus'); -var algs = require('./algs'); -var crypto = require('crypto'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var errs = require('./errors'); -var util = require('util'); -var utils = require('./utils'); -var edCompat; -var ed; - -try { - edCompat = require('./ed-compat'); -} catch (e) { - /* Just continue through, and bail out if we try to use it. */ -} - -var Key = require('./key'); - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var KeyParseError = errs.KeyParseError; -var KeyEncryptedError = errs.KeyEncryptedError; - -var formats = {}; -formats['auto'] = require('./formats/auto'); -formats['pem'] = require('./formats/pem'); -formats['pkcs1'] = require('./formats/pkcs1'); -formats['pkcs8'] = require('./formats/pkcs8'); -formats['rfc4253'] = require('./formats/rfc4253'); -formats['ssh-private'] = require('./formats/ssh-private'); -formats['openssh'] = formats['ssh-private']; -formats['ssh'] = formats['ssh-private']; - -function PrivateKey(opts) { - assert.object(opts, 'options'); - Key.call(this, opts); - - this._pubCache = undefined; -} -util.inherits(PrivateKey, Key); - -PrivateKey.formats = formats; - -PrivateKey.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'pkcs1'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - return (formats[format].write(this, options)); -}; - -PrivateKey.prototype.hash = function (algo) { - return (this.toPublic().hash(algo)); -}; - -PrivateKey.prototype.toPublic = function () { - if (this._pubCache) - return (this._pubCache); - - var algInfo = algs.info[this.type]; - var pubParts = []; - for (var i = 0; i < algInfo.parts.length; ++i) { - var p = algInfo.parts[i]; - pubParts.push(this.part[p]); - } - - this._pubCache = new Key({ - type: this.type, - source: this, - parts: pubParts - }); - if (this.comment) - this._pubCache.comment = this.comment; - return (this._pubCache); -}; - -PrivateKey.prototype.derive = function (newType, newSize) { - assert.string(newType, 'type'); - assert.optionalNumber(newSize, 'size'); - var priv, pub; - - if (this.type === 'ed25519' && newType === 'curve25519') { - if (ed === undefined) - ed = require('jodid25519'); - - priv = this.part.r.data; - if (priv[0] === 0x00) - priv = priv.slice(1); - priv = priv.slice(0, 32); - - pub = ed.dh.publicKey(priv); - priv = utils.mpNormalize(Buffer.concat([priv, pub])); - - return (new PrivateKey({ - type: 'curve25519', - parts: [ - { name: 'R', data: utils.mpNormalize(pub) }, - { name: 'r', data: priv } - ] - })); - } else if (this.type === 'curve25519' && newType === 'ed25519') { - if (ed === undefined) - ed = require('jodid25519'); - - priv = this.part.r.data; - if (priv[0] === 0x00) - priv = priv.slice(1); - priv = priv.slice(0, 32); - - pub = ed.eddsa.publicKey(priv.toString('binary')); - pub = new Buffer(pub, 'binary'); - - priv = utils.mpNormalize(Buffer.concat([priv, pub])); - - return (new PrivateKey({ - type: 'ed25519', - parts: [ - { name: 'R', data: utils.mpNormalize(pub) }, - { name: 'r', data: priv } - ] - })); - } - throw (new Error('Key derivation not supported from ' + this.type + - ' to ' + newType)); -}; - -PrivateKey.prototype.createVerify = function (hashAlgo) { - return (this.toPublic().createVerify(hashAlgo)); -}; - -PrivateKey.prototype.createSign = function (hashAlgo) { - if (hashAlgo === undefined) - hashAlgo = this.defaultHashAlgorithm(); - assert.string(hashAlgo, 'hash algorithm'); - - /* ED25519 is not supported by OpenSSL, use a javascript impl. */ - if (this.type === 'ed25519' && edCompat !== undefined) - return (new edCompat.Signer(this, hashAlgo)); - if (this.type === 'curve25519') - throw (new Error('Curve25519 keys are not suitable for ' + - 'signing or verification')); - - var v, nm, err; - try { - nm = hashAlgo.toUpperCase(); - v = crypto.createSign(nm); - } catch (e) { - err = e; - } - if (v === undefined || (err instanceof Error && - err.message.match(/Unknown message digest/))) { - nm = 'RSA-'; - nm += hashAlgo.toUpperCase(); - v = crypto.createSign(nm); - } - assert.ok(v, 'failed to create verifier'); - var oldSign = v.sign.bind(v); - var key = this.toBuffer('pkcs1'); - var type = this.type; - v.sign = function () { - var sig = oldSign(key); - if (typeof (sig) === 'string') - sig = new Buffer(sig, 'binary'); - sig = Signature.parse(sig, type, 'asn1'); - sig.hashAlgorithm = hashAlgo; - return (sig); - }; - return (v); -}; - -PrivateKey.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - assert.ok(k instanceof PrivateKey, 'key is not a private key'); - if (!k.comment) - k.comment = options.filename; - return (k); - } catch (e) { - if (e.name === 'KeyEncryptedError') - throw (e); - throw (new KeyParseError(options.filename, format, e)); - } -}; - -PrivateKey.isPrivateKey = function (obj, ver) { - return (utils.isCompatible(obj, PrivateKey, ver)); -}; - -/* - * API versions for PrivateKey: - * [1,0] -- initial ver - * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats - * [1,2] -- added defaultHashAlgorithm - * [1,3] -- added derive, ed, createDH - * [1,4] -- first tagged version - */ -PrivateKey.prototype._sshpkApiVersion = [1, 4]; - -PrivateKey._oldVersionDetect = function (obj) { - assert.func(obj.toPublic); - assert.func(obj.createSign); - if (obj.derive) - return ([1, 3]); - if (obj.defaultHashAlgorithm) - return ([1, 2]); - if (obj.formats['auto']) - return ([1, 1]); - return ([1, 0]); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js deleted file mode 100644 index ddf4a8c988c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/signature.js +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = Signature; - -var assert = require('assert-plus'); -var algs = require('./algs'); -var crypto = require('crypto'); -var errs = require('./errors'); -var utils = require('./utils'); -var asn1 = require('asn1'); -var SSHBuffer = require('./ssh-buffer'); - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var SignatureParseError = errs.SignatureParseError; - -function Signature(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.parts, 'options.parts'); - assert.string(opts.type, 'options.type'); - - var partLookup = {}; - for (var i = 0; i < opts.parts.length; ++i) { - var part = opts.parts[i]; - partLookup[part.name] = part; - } - - this.type = opts.type; - this.hashAlgorithm = opts.hashAlgo; - this.parts = opts.parts; - this.part = partLookup; -} - -Signature.prototype.toBuffer = function (format) { - if (format === undefined) - format = 'asn1'; - assert.string(format, 'format'); - - var buf; - - switch (this.type) { - case 'rsa': - case 'ed25519': - if (format === 'ssh') { - buf = new SSHBuffer({}); - buf.writeString('ssh-' + this.type); - buf.writePart(this.part.sig); - return (buf.toBuffer()); - } else { - return (this.part.sig.data); - } - - case 'dsa': - case 'ecdsa': - var r, s; - if (format === 'asn1') { - var der = new asn1.BerWriter(); - der.startSequence(); - r = utils.mpNormalize(this.part.r.data); - s = utils.mpNormalize(this.part.s.data); - der.writeBuffer(r, asn1.Ber.Integer); - der.writeBuffer(s, asn1.Ber.Integer); - der.endSequence(); - return (der.buffer); - } else if (format === 'ssh' && this.type === 'dsa') { - buf = new SSHBuffer({}); - buf.writeString('ssh-dss'); - r = this.part.r.data; - if (r[0] === 0x00) - r = r.slice(1); - s = this.part.s.data; - buf.writeBuffer(Buffer.concat([r, s])); - return (buf.toBuffer()); - } else if (format === 'ssh' && this.type === 'ecdsa') { - var inner = new SSHBuffer({}); - r = this.part.r; - if (r[0] === 0x00) - r = r.slice(1); - inner.writePart(r); - inner.writePart(this.part.s); - - buf = new SSHBuffer({}); - /* XXX: find a more proper way to do this? */ - var curve; - var sz = this.part.r.data.length * 8; - if (sz === 256) - curve = 'nistp256'; - else if (sz === 384) - curve = 'nistp384'; - else if (sz === 528) - curve = 'nistp521'; - buf.writeString('ecdsa-sha2-' + curve); - buf.writeBuffer(inner.toBuffer()); - return (buf.toBuffer()); - } - throw (new Error('Invalid signature format')); - default: - throw (new Error('Invalid signature data')); - } -}; - -Signature.prototype.toString = function (format) { - assert.optionalString(format, 'format'); - return (this.toBuffer(format).toString('base64')); -}; - -Signature.parse = function (data, type, format) { - if (typeof (data) === 'string') - data = new Buffer(data, 'base64'); - assert.buffer(data, 'data'); - assert.string(format, 'format'); - assert.string(type, 'type'); - - var opts = {}; - opts.type = type.toLowerCase(); - opts.parts = []; - - try { - assert.ok(data.length > 0, 'signature must not be empty'); - switch (opts.type) { - case 'rsa': - return (parseOneNum(data, type, format, opts, - 'ssh-rsa')); - case 'ed25519': - return (parseOneNum(data, type, format, opts, - 'ssh-ed25519')); - - case 'dsa': - case 'ecdsa': - if (format === 'asn1') - return (parseDSAasn1(data, type, format, opts)); - else if (opts.type === 'dsa') - return (parseDSA(data, type, format, opts)); - else - return (parseECDSA(data, type, format, opts)); - - default: - throw (new InvalidAlgorithmError(type)); - } - - } catch (e) { - if (e instanceof InvalidAlgorithmError) - throw (e); - throw (new SignatureParseError(type, format, e)); - } -}; - -function parseOneNum(data, type, format, opts, headType) { - if (format === 'ssh') { - try { - var buf = new SSHBuffer({buffer: data}); - var head = buf.readString(); - } catch (e) { - /* fall through */ - } - if (head === headType) { - var sig = buf.readPart(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - sig.name = 'sig'; - opts.parts.push(sig); - return (new Signature(opts)); - } - } - opts.parts.push({name: 'sig', data: data}); - return (new Signature(opts)); -} - -function parseDSAasn1(data, type, format, opts) { - var der = new asn1.BerReader(data); - der.readSequence(); - var r = der.readString(asn1.Ber.Integer, true); - var s = der.readString(asn1.Ber.Integer, true); - - opts.parts.push({name: 'r', data: utils.mpNormalize(r)}); - opts.parts.push({name: 's', data: utils.mpNormalize(s)}); - - return (new Signature(opts)); -} - -function parseDSA(data, type, format, opts) { - if (data.length != 40) { - var buf = new SSHBuffer({buffer: data}); - var d = buf.readBuffer(); - if (d.toString('ascii') === 'ssh-dss') - d = buf.readBuffer(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - assert.strictEqual(d.length, 40, 'invalid inner length'); - data = d; - } - opts.parts.push({name: 'r', data: data.slice(0, 20)}); - opts.parts.push({name: 's', data: data.slice(20, 40)}); - return (new Signature(opts)); -} - -function parseECDSA(data, type, format, opts) { - var buf = new SSHBuffer({buffer: data}); - - var r, s; - var inner = buf.readBuffer(); - if (inner.toString('ascii').match(/^ecdsa-/)) { - inner = buf.readBuffer(); - assert.ok(buf.atEnd(), 'extra trailing bytes on outer'); - buf = new SSHBuffer({buffer: inner}); - r = buf.readPart(); - } else { - r = {data: inner}; - } - - s = buf.readPart(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - - r.name = 'r'; - s.name = 's'; - - opts.parts.push(r); - opts.parts.push(s); - return (new Signature(opts)); -} - -Signature.isSignature = function (obj, ver) { - return (utils.isCompatible(obj, Signature, ver)); -}; - -/* - * API versions for Signature: - * [1,0] -- initial ver - * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent - * hashAlgorithm property - * [2,1] -- first tagged version - */ -Signature.prototype._sshpkApiVersion = [2, 1]; - -Signature._oldVersionDetect = function (obj) { - assert.func(obj.toBuffer); - if (obj.hasOwnProperty('hashAlgorithm')) - return ([2, 0]); - return ([1, 0]); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js deleted file mode 100644 index 0b002773495..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/ssh-buffer.js +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = SSHBuffer; - -var assert = require('assert-plus'); - -function SSHBuffer(opts) { - assert.object(opts, 'options'); - if (opts.buffer !== undefined) - assert.buffer(opts.buffer, 'options.buffer'); - - this._size = opts.buffer ? opts.buffer.length : 1024; - this._buffer = opts.buffer || (new Buffer(this._size)); - this._offset = 0; -} - -SSHBuffer.prototype.toBuffer = function () { - return (this._buffer.slice(0, this._offset)); -}; - -SSHBuffer.prototype.atEnd = function () { - return (this._offset >= this._buffer.length); -}; - -SSHBuffer.prototype.remainder = function () { - return (this._buffer.slice(this._offset)); -}; - -SSHBuffer.prototype.skip = function (n) { - this._offset += n; -}; - -SSHBuffer.prototype.expand = function () { - this._size *= 2; - var buf = new Buffer(this._size); - this._buffer.copy(buf, 0); - this._buffer = buf; -}; - -SSHBuffer.prototype.readPart = function () { - return ({data: this.readBuffer()}); -}; - -SSHBuffer.prototype.readBuffer = function () { - var len = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - assert.ok(this._offset + len <= this._buffer.length, - 'length out of bounds at +0x' + this._offset.toString(16) + - ' (data truncated?)'); - var buf = this._buffer.slice(this._offset, this._offset + len); - this._offset += len; - return (buf); -}; - -SSHBuffer.prototype.readString = function () { - return (this.readBuffer().toString()); -}; - -SSHBuffer.prototype.readCString = function () { - var offset = this._offset; - while (offset < this._buffer.length && - this._buffer[offset] !== 0x00) - offset++; - assert.ok(offset < this._buffer.length, 'c string does not terminate'); - var str = this._buffer.slice(this._offset, offset).toString(); - this._offset = offset + 1; - return (str); -}; - -SSHBuffer.prototype.readInt = function () { - var v = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - return (v); -}; - -SSHBuffer.prototype.readChar = function () { - var v = this._buffer[this._offset++]; - return (v); -}; - -SSHBuffer.prototype.writeBuffer = function (buf) { - while (this._offset + 4 + buf.length > this._size) - this.expand(); - this._buffer.writeUInt32BE(buf.length, this._offset); - this._offset += 4; - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; - -SSHBuffer.prototype.writeString = function (str) { - this.writeBuffer(new Buffer(str, 'utf8')); -}; - -SSHBuffer.prototype.writeCString = function (str) { - while (this._offset + 1 + str.length > this._size) - this.expand(); - this._buffer.write(str, this._offset); - this._offset += str.length; - this._buffer[this._offset++] = 0; -}; - -SSHBuffer.prototype.writeInt = function (v) { - while (this._offset + 4 > this._size) - this.expand(); - this._buffer.writeUInt32BE(v, this._offset); - this._offset += 4; -}; - -SSHBuffer.prototype.writeChar = function (v) { - while (this._offset + 1 > this._size) - this.expand(); - this._buffer[this._offset++] = v; -}; - -SSHBuffer.prototype.writePart = function (p) { - this.writeBuffer(p.data); -}; - -SSHBuffer.prototype.write = function (buf) { - while (this._offset + buf.length > this._size) - this.expand(); - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js deleted file mode 100644 index d57245cc16b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/lib/utils.js +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - bufferSplit: bufferSplit, - addRSAMissing: addRSAMissing, - calculateDSAPublic: calculateDSAPublic, - mpNormalize: mpNormalize, - ecNormalize: ecNormalize, - countZeros: countZeros, - assertCompatible: assertCompatible, - isCompatible: isCompatible, - opensslKeyDeriv: opensslKeyDeriv -}; - -var assert = require('assert-plus'); -var PrivateKey = require('./private-key'); -var crypto = require('crypto'); - -var MAX_CLASS_DEPTH = 3; - -function isCompatible(obj, klass, needVer) { - if (obj === null || typeof (obj) !== 'object') - return (false); - if (needVer === undefined) - needVer = klass.prototype._sshpkApiVersion; - if (obj instanceof klass && - klass.prototype._sshpkApiVersion[0] == needVer[0]) - return (true); - var proto = Object.getPrototypeOf(obj); - var depth = 0; - while (proto.constructor.name !== klass.name) { - proto = Object.getPrototypeOf(proto); - if (!proto || ++depth > MAX_CLASS_DEPTH) - return (false); - } - if (proto.constructor.name !== klass.name) - return (false); - var ver = proto._sshpkApiVersion; - if (ver === undefined) - ver = klass._oldVersionDetect(obj); - if (ver[0] != needVer[0] || ver[1] < needVer[1]) - return (false); - return (true); -} - -function assertCompatible(obj, klass, needVer, name) { - if (name === undefined) - name = 'object'; - assert.ok(obj, name + ' must not be null'); - assert.object(obj, name + ' must be an object'); - if (needVer === undefined) - needVer = klass.prototype._sshpkApiVersion; - if (obj instanceof klass && - klass.prototype._sshpkApiVersion[0] == needVer[0]) - return; - var proto = Object.getPrototypeOf(obj); - var depth = 0; - while (proto.constructor.name !== klass.name) { - proto = Object.getPrototypeOf(proto); - assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, - name + ' must be a ' + klass.name + ' instance'); - } - assert.strictEqual(proto.constructor.name, klass.name, - name + ' must be a ' + klass.name + ' instance'); - var ver = proto._sshpkApiVersion; - if (ver === undefined) - ver = klass._oldVersionDetect(obj); - assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], - name + ' must be compatible with ' + klass.name + ' klass ' + - 'version ' + needVer[0] + '.' + needVer[1]); -} - -var CIPHER_LEN = { - 'des-ede3-cbc': { key: 7, iv: 8 }, - 'aes-128-cbc': { key: 16, iv: 16 } -}; -var PKCS5_SALT_LEN = 8; - -function opensslKeyDeriv(cipher, salt, passphrase, count) { - assert.buffer(salt, 'salt'); - assert.buffer(passphrase, 'passphrase'); - assert.number(count, 'iteration count'); - - var clen = CIPHER_LEN[cipher]; - assert.object(clen, 'supported cipher'); - - salt = salt.slice(0, PKCS5_SALT_LEN); - - var D, D_prev, bufs; - var material = new Buffer(0); - while (material.length < clen.key + clen.iv) { - bufs = []; - if (D_prev) - bufs.push(D_prev); - bufs.push(passphrase); - bufs.push(salt); - D = Buffer.concat(bufs); - for (var j = 0; j < count; ++j) - D = crypto.createHash('md5').update(D).digest(); - material = Buffer.concat([material, D]); - D_prev = D; - } - - return ({ - key: material.slice(0, clen.key), - iv: material.slice(clen.key, clen.key + clen.iv) - }); -} - -/* Count leading zero bits on a buffer */ -function countZeros(buf) { - var o = 0, obit = 8; - while (o < buf.length) { - var mask = (1 << obit); - if ((buf[o] & mask) === mask) - break; - obit--; - if (obit < 0) { - o++; - obit = 8; - } - } - return (o*8 + (8 - obit) - 1); -} - -function bufferSplit(buf, chr) { - assert.buffer(buf); - assert.string(chr); - - var parts = []; - var lastPart = 0; - var matches = 0; - for (var i = 0; i < buf.length; ++i) { - if (buf[i] === chr.charCodeAt(matches)) - ++matches; - else if (buf[i] === chr.charCodeAt(0)) - matches = 1; - else - matches = 0; - - if (matches >= chr.length) { - var newPart = i + 1; - parts.push(buf.slice(lastPart, newPart - matches)); - lastPart = newPart; - matches = 0; - } - } - if (lastPart <= buf.length) - parts.push(buf.slice(lastPart, buf.length)); - - return (parts); -} - -function ecNormalize(buf, addZero) { - assert.buffer(buf); - if (buf[0] === 0x00 && buf[1] === 0x04) { - if (addZero) - return (buf); - return (buf.slice(1)); - } else if (buf[0] === 0x04) { - if (!addZero) - return (buf); - } else { - while (buf[0] === 0x00) - buf = buf.slice(1); - if (buf[0] === 0x02 || buf[0] === 0x03) - throw (new Error('Compressed elliptic curve points ' + - 'are not supported')); - if (buf[0] !== 0x04) - throw (new Error('Not a valid elliptic curve point')); - if (!addZero) - return (buf); - } - var b = new Buffer(buf.length + 1); - b[0] = 0x0; - buf.copy(b, 1); - return (b); -} - -function mpNormalize(buf) { - assert.buffer(buf); - while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) - buf = buf.slice(1); - if ((buf[0] & 0x80) === 0x80) { - var b = new Buffer(buf.length + 1); - b[0] = 0x00; - buf.copy(b, 1); - buf = b; - } - return (buf); -} - -function bigintToMpBuf(bigint) { - var buf = new Buffer(bigint.toByteArray()); - buf = mpNormalize(buf); - return (buf); -} - -function calculateDSAPublic(g, p, x) { - assert.buffer(g); - assert.buffer(p); - assert.buffer(x); - try { - var bigInt = require('jsbn').BigInteger; - } catch (e) { - throw (new Error('To load a PKCS#8 format DSA private key, ' + - 'the node jsbn library is required.')); - } - g = new bigInt(g); - p = new bigInt(p); - x = new bigInt(x); - var y = g.modPow(x, p); - var ybuf = bigintToMpBuf(y); - return (ybuf); -} - -function addRSAMissing(key) { - assert.object(key); - assertCompatible(key, PrivateKey, [1, 1]); - try { - var bigInt = require('jsbn').BigInteger; - } catch (e) { - throw (new Error('To write a PEM private key from ' + - 'this source, the node jsbn lib is required.')); - } - - var d = new bigInt(key.part.d.data); - var buf; - - if (!key.part.dmodp) { - var p = new bigInt(key.part.p.data); - var dmodp = d.mod(p.subtract(1)); - - buf = bigintToMpBuf(dmodp); - key.part.dmodp = {name: 'dmodp', data: buf}; - key.parts.push(key.part.dmodp); - } - if (!key.part.dmodq) { - var q = new bigInt(key.part.q.data); - var dmodq = d.mod(q.subtract(1)); - - buf = bigintToMpBuf(dmodq); - key.part.dmodq = {name: 'dmodq', data: buf}; - key.parts.push(key.part.dmodq); - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 deleted file mode 100644 index 0887dce2728..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-conv.1 +++ /dev/null @@ -1,135 +0,0 @@ -.TH sshpk\-conv 1 "Jan 2016" sshpk "sshpk Commands" -.SH NAME -.PP -sshpk\-conv \- convert between key formats -.SH SYNOPSYS -.PP -\fB\fCsshpk\-conv\fR \-t FORMAT [FILENAME] [OPTIONS...] -.PP -\fB\fCsshpk\-conv\fR \-i [FILENAME] [OPTIONS...] -.SH DESCRIPTION -.PP -Reads in a public or private key and converts it between different formats, -particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7 -formats. -.PP -In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to -stderr information about its nature, size and fingerprint. -.SH EXAMPLES -.PP -Assume the following SSH\-format public key in \fB\fCid_ecdsa.pub\fR: -.PP -.RS -.nf -ecdsa\-sha2\-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host -.fi -.RE -.PP -Identify it with \fB\fC\-i\fR: -.PP -.RS -.nf -$ sshpk\-conv \-i id_ecdsa.pub -id_ecdsa: a 256 bit ECDSA public key -ECDSA curve: nistp256 -Comment: user@host -Fingerprint: - SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k - 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51 -.fi -.RE -.PP -Convert it to \fB\fCpkcs8\fR format, for use with e.g. OpenSSL: -.PP -.RS -.nf -$ sshpk\-conv \-t pkcs8 id_ecdsa -\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR -zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg== -\-\-\-\-\-END PUBLIC KEY\-\-\-\-\- -.fi -.RE -.PP -Retrieve the public half of a private key: -.PP -.RS -.nf -$ openssl genrsa 2048 | sshpk\-conv \-t ssh \-c foo@bar -ssh\-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar -.fi -.RE -.PP -Convert a private key to PKCS#1 (OpenSSL) format from a new\-style OpenSSH key -format (the \fB\fCssh\-keygen \-o\fR format): -.PP -.RS -.nf -$ ssh\-keygen \-o \-f foobar -\&... -$ sshpk\-conv \-p \-t pkcs1 foobar -\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\- -MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL.... -\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\- -.fi -.RE -.SH OPTIONS -.TP -\fB\fC\-i, \-\-identify\fR -Instead of converting the key, output identifying information about it to -stderr, including its type, size and fingerprints. -.TP -\fB\fC\-p, \-\-private\fR -Treat the key as a private key instead of a public key (the default). If you -supply \fB\fCsshpk\-conv\fR with a private key and do not give this option, it will -extract only the public half of the key from it and work with that. -.TP -\fB\fC\-f PATH, \-\-file=PATH\fR -Input file to take the key from instead of stdin. If a filename is supplied -as a positional argument, it is equivalent to using this option. -.TP -\fB\fC\-o PATH, \-\-out=PATH\fR -Output file name to use instead of stdout. -.PP -\fB\fC\-T FORMAT, \-\-informat=FORMAT\fR -.TP -\fB\fC\-t FORMAT, \-\-outformat=FORMAT\fR -Selects the input and output formats to be used (see FORMATS, below). -.TP -\fB\fC\-c TEXT, \-\-comment=TEXT\fR -Sets the key comment for the output file, if supported. -.SH FORMATS -.PP -Currently supported formats: -.TP -\fB\fCpem, pkcs1\fR -The standard PEM format used by older OpenSSH and most TLS libraries such as -OpenSSL. The classic \fB\fCid_rsa\fR file is usually in this format. It is an ASN.1 -encoded structure, base64\-encoded and placed between PEM headers. -.TP -\fB\fCssh\fR -The SSH public key text format (the format of an \fB\fCid_rsa.pub\fR file). A single -line, containing 3 space separated parts: the key type, key body and optional -key comment. -.TP -\fB\fCpkcs8\fR -A newer PEM format, usually used only for public keys by TLS libraries such -as OpenSSL. The ASN.1 structure is more generic than that of \fB\fCpkcs1\fR\&. -.TP -\fB\fCopenssh\fR -The new \fB\fCssh\-keygen \-o\fR format from OpenSSH. This can be mistaken for a PEM -encoding but is actually an OpenSSH internal format. -.TP -\fB\fCrfc4253\fR -The internal binary format of keys when sent over the wire in the SSH -protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol. -.SH SEE ALSO -.PP -.BR ssh-keygen (1), -.BR openssl (1) -.SH BUGS -.PP -Encrypted (password\-protected) keys are not supported. -.PP -Report bugs at Github -\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 deleted file mode 100644 index 749916ba887..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-sign.1 +++ /dev/null @@ -1,81 +0,0 @@ -.TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands" -.SH NAME -.PP -sshpk\-sign \- sign data using an SSH key -.SH SYNOPSYS -.PP -\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...] -.SH DESCRIPTION -.PP -Takes in arbitrary bytes, and signs them using an SSH private key. The key can -be of any type or format supported by the \fB\fCsshpk\fR library, including the -standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8. -.PP -The signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fR -option is given. -.SH EXAMPLES -.PP -Signing with default settings: -.PP -.RS -.nf -$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa -MEUCIAMdLS/vXrrtWFepwe... -.fi -.RE -.PP -Signing in SSH (RFC 4253) format (rather than the default ASN.1): -.PP -.RS -.nf -$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t ssh -AAAAFGVjZHNhLXNoYTIt... -.fi -.RE -.PP -Saving the binary signature to a file: -.PP -.RS -.nf -$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\ - \-o signature.bin \-b -$ cat signature.bin | base64 -MEUCIAMdLS/vXrrtWFepwe... -.fi -.RE -.SH OPTIONS -.TP -\fB\fC\-v, \-\-verbose\fR -Print extra information about the key and signature to stderr when signing. -.TP -\fB\fC\-b, \-\-binary\fR -Don't base64\-encode the signature before outputting it. -.TP -\fB\fC\-i KEY, \-\-identity=KEY\fR -Select the key to be used for signing. \fB\fCKEY\fR must be a relative or absolute -filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR library -is supported, including OpenSSH formats and standard PEM PKCS. -.TP -\fB\fC\-f PATH, \-\-file=PATH\fR -Input file to sign instead of stdin. -.TP -\fB\fC\-o PATH, \-\-out=PATH\fR -Output file to save signature in instead of stdout. -.TP -\fB\fC\-H HASH, \-\-hash=HASH\fR -Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, -\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash -algorithms may be used (e.g. ED25519 keys can only use SHA\-512). -.TP -\fB\fC\-t FORMAT, \-\-format=FORMAT\fR -Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for -ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format -used with TLS and typically the standard in most non\-SSH libraries (e.g. -OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. -.SH SEE ALSO -.PP -.BR sshpk-verify (1) -.SH BUGS -.PP -Report bugs at Github -\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 deleted file mode 100644 index f79169d2753..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/man/man1/sshpk-verify.1 +++ /dev/null @@ -1,68 +0,0 @@ -.TH sshpk\-verify 1 "Jan 2016" sshpk "sshpk Commands" -.SH NAME -.PP -sshpk\-verify \- verify a signature on data using an SSH key -.SH SYNOPSYS -.PP -\fB\fCsshpk\-verify\fR \-i KEYPATH \-s SIGNATURE [OPTION...] -.SH DESCRIPTION -.PP -Takes in arbitrary bytes and a Base64\-encoded signature, and verifies that the -signature was produced by the private half of the given SSH public key. -.SH EXAMPLES -.PP -.RS -.nf -$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s MEUCIQCYp... -OK -$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s GARBAGE... -NOT OK -.fi -.RE -.SH EXIT STATUS -.TP -\fB\fC0\fR -Signature validates and matches the key. -.TP -\fB\fC1\fR -Signature is parseable and the correct length but does not match the key or -otherwise is invalid. -.TP -\fB\fC2\fR -The signature or key could not be parsed. -.TP -\fB\fC3\fR -Invalid commandline options were supplied. -.SH OPTIONS -.TP -\fB\fC\-v, \-\-verbose\fR -Print extra information about the key and signature to stderr when verifying. -.TP -\fB\fC\-i KEY, \-\-identity=KEY\fR -Select the key to be used for verification. \fB\fCKEY\fR must be a relative or -absolute filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR -library is supported, including OpenSSH formats and standard PEM PKCS. -.TP -\fB\fC\-s BASE64, \-\-signature=BASE64\fR -Supplies the base64\-encoded signature to be verified. -.TP -\fB\fC\-f PATH, \-\-file=PATH\fR -Input file to verify instead of stdin. -.TP -\fB\fC\-H HASH, \-\-hash=HASH\fR -Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, -\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash -algorithms may be used (e.g. ED25519 keys can only use SHA\-512). -.TP -\fB\fC\-t FORMAT, \-\-format=FORMAT\fR -Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for -ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format -used with TLS and typically the standard in most non\-SSH libraries (e.g. -OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. -.SH SEE ALSO -.PP -.BR sshpk-sign (1) -.SH BUGS -.PP -Report bugs at Github -\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS deleted file mode 100644 index 1923524fe40..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -Dave Eddy -Fred Kuo -Lars-Magnus Skog -Mark Cavage -Patrick Mooney -Rob Gulewich diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md deleted file mode 100644 index 57d92bfdb9d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +++ /dev/null @@ -1,14 +0,0 @@ -# assert-plus Changelog - -## 1.0.0 - -- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input -- Add assert.finite check. Previous assert.number callers should use this if - they expect Infinity inputs to throw. - -## 0.2.0 - -- Fix `assert.object(null)` so it throws -- Fix optional/arrayOf exports for non-type-of asserts -- Add optiona/arrayOf exports for Stream/Date/Regex/uuid -- Add basic unit test coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md deleted file mode 100644 index ec200d161ef..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# assert-plus - -This library is a super small wrapper over node's assert module that has two -things: (1) the ability to disable assertions with the environment variable -NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks -like this: - -```javascript - var assert = require('assert-plus'); - - function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id'); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); - - // Do stuff - callback(null, {}); - } -``` - -# API - -All methods that *aren't* part of node's core assert API are simply assumed to -take an argument, and then a string 'name' that's not a message; `AssertionError` -will be thrown if the assertion fails with a message like: - - AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object. (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) - -from: - -```javascript - function test(foo) { - assert.string(foo, 'foo'); - } -``` - -There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: - -```javascript - function test(foo) { - assert.arrayOfString(foo, 'foo'); - } -``` - -You can assert IFF an argument is not `undefined` (i.e., an optional arg): - -```javascript - assert.optionalString(foo, 'foo'); -``` - -Lastly, you can opt-out of assertion checking altogether by setting the -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. Be advised: The standard functions re-exported from `assert` are -also disabled in assert-plus if NDEBUG is specified. Using them directly from -the `assert` module avoids this behavior. - -The complete list of APIs is: - -* assert.array -* assert.bool -* assert.buffer -* assert.func -* assert.number -* assert.finite -* assert.object -* assert.string -* assert.stream -* assert.date -* assert.regexp -* assert.uuid -* assert.arrayOfArray -* assert.arrayOfBool -* assert.arrayOfBuffer -* assert.arrayOfFunc -* assert.arrayOfNumber -* assert.arrayOfFinite -* assert.arrayOfObject -* assert.arrayOfString -* assert.arrayOfStream -* assert.arrayOfDate -* assert.arrayOfRegexp -* assert.arrayOfUuid -* assert.optionalArray -* assert.optionalBool -* assert.optionalBuffer -* assert.optionalFunc -* assert.optionalNumber -* assert.optionalFinite -* assert.optionalObject -* assert.optionalString -* assert.optionalStream -* assert.optionalDate -* assert.optionalRegexp -* assert.optionalUuid -* assert.optionalArrayOfArray -* assert.optionalArrayOfBool -* assert.optionalArrayOfBuffer -* assert.optionalArrayOfFunc -* assert.optionalArrayOfNumber -* assert.optionalArrayOfFinite -* assert.optionalArrayOfObject -* assert.optionalArrayOfString -* assert.optionalArrayOfStream -* assert.optionalArrayOfDate -* assert.optionalArrayOfRegexp -* assert.optionalArrayOfUuid -* assert.AssertionError -* assert.fail -* assert.ok -* assert.equal -* assert.notEqual -* assert.deepEqual -* assert.notDeepEqual -* assert.strictEqual -* assert.notStrictEqual -* assert.throws -* assert.doesNotThrow -* assert.ifError - -# Installation - - npm install assert-plus - -## License - -The MIT License (MIT) -Copyright (c) 2012 Mark Cavage - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -## Bugs - -See . diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js deleted file mode 100644 index 26f944eec30..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/assert.js +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2012, Mark Cavage. All rights reserved. -// Copyright 2015 Joyent, Inc. - -var assert = require('assert'); -var Stream = require('stream').Stream; -var util = require('util'); - - -///--- Globals - -/* JSSTYLED */ -var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; - - -///--- Internal - -function _capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function _toss(name, expected, oper, arg, actual) { - throw new assert.AssertionError({ - message: util.format('%s (%s) is required', name, expected), - actual: (actual === undefined) ? typeof (arg) : actual(arg), - expected: expected, - operator: oper || '===', - stackStartFunction: _toss.caller - }); -} - -function _getClass(arg) { - return (Object.prototype.toString.call(arg).slice(8, -1)); -} - -function noop() { - // Why even bother with asserts? -} - - -///--- Exports - -var types = { - bool: { - check: function (arg) { return typeof (arg) === 'boolean'; } - }, - func: { - check: function (arg) { return typeof (arg) === 'function'; } - }, - string: { - check: function (arg) { return typeof (arg) === 'string'; } - }, - object: { - check: function (arg) { - return typeof (arg) === 'object' && arg !== null; - } - }, - number: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg); - } - }, - finite: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); - } - }, - buffer: { - check: function (arg) { return Buffer.isBuffer(arg); }, - operator: 'Buffer.isBuffer' - }, - array: { - check: function (arg) { return Array.isArray(arg); }, - operator: 'Array.isArray' - }, - stream: { - check: function (arg) { return arg instanceof Stream; }, - operator: 'instanceof', - actual: _getClass - }, - date: { - check: function (arg) { return arg instanceof Date; }, - operator: 'instanceof', - actual: _getClass - }, - regexp: { - check: function (arg) { return arg instanceof RegExp; }, - operator: 'instanceof', - actual: _getClass - }, - uuid: { - check: function (arg) { - return typeof (arg) === 'string' && UUID_REGEXP.test(arg); - }, - operator: 'isUUID' - } -}; - -function _setExports(ndebug) { - var keys = Object.keys(types); - var out; - - /* re-export standard assert */ - if (process.env.NODE_NDEBUG) { - out = noop; - } else { - out = function (arg, msg) { - if (!arg) { - _toss(msg, 'true', arg); - } - }; - } - - /* standard checks */ - keys.forEach(function (k) { - if (ndebug) { - out[k] = noop; - return; - } - var type = types[k]; - out[k] = function (arg, msg) { - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* optional checks */ - keys.forEach(function (k) { - var name = 'optional' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* arrayOf checks */ - keys.forEach(function (k) { - var name = 'arrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* optionalArrayOf checks */ - keys.forEach(function (k) { - var name = 'optionalArrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* re-export built-in assertions */ - Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - out[k] = assert[k]; - return; - } - if (ndebug) { - out[k] = noop; - return; - } - out[k] = assert[k]; - }); - - /* export ourselves (for unit tests _only_) */ - out._setExports = _setExports; - - return out; -} - -module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json deleted file mode 100644 index 25a6d698626..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/node_modules/assert-plus/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_args": [ - [ - "assert-plus@^1.0.0", - "/Users/eshanker/Code/fsevents/node_modules/sshpk" - ] - ], - "_from": "assert-plus@>=1.0.0 <2.0.0", - "_id": "assert-plus@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/sshpk/assert-plus", - "_nodeVersion": "0.10.40", - "_npmUser": { - "email": "patrick.f.mooney@gmail.com", - "name": "pfmooney" - }, - "_npmVersion": "3.3.9", - "_phantomChildren": {}, - "_requested": { - "name": "assert-plus", - "raw": "assert-plus@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/sshpk" - ], - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", - "_shrinkwrap": null, - "_spec": "assert-plus@^1.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/sshpk", - "author": { - "email": "mcavage@gmail.com", - "name": "Mark Cavage" - }, - "bugs": { - "url": "https://github.com/mcavage/node-assert-plus/issues" - }, - "contributors": [ - { - "email": "dave@daveeddy.com", - "name": "Dave Eddy" - }, - { - "email": "fred.kuo@joyent.com", - "name": "Fred Kuo" - }, - { - "email": "ralphtheninja@riseup.net", - "name": "Lars-Magnus Skog" - }, - { - "email": "mcavage@gmail.com", - "name": "Mark Cavage" - }, - { - "email": "pmooney@pfmooney.com", - "name": "Patrick Mooney" - }, - { - "email": "robert.gulewich@joyent.com", - "name": "Rob Gulewich" - } - ], - "dependencies": {}, - "description": "Extra assertions on top of node's assert module", - "devDependencies": { - "faucet": "0.0.1", - "tape": "4.2.2" - }, - "directories": {}, - "dist": { - "shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", - "tarball": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - }, - "engines": { - "node": ">=0.8" - }, - "homepage": "https://github.com/mcavage/node-assert-plus#readme", - "license": "MIT", - "main": "./assert.js", - "maintainers": [ - { - "email": "mcavage@gmail.com", - "name": "mcavage" - }, - { - "email": "patrick.f.mooney@gmail.com", - "name": "pfmooney" - } - ], - "name": "assert-plus", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mcavage/node-assert-plus.git" - }, - "scripts": { - "test": "tape tests/*.js | ./node_modules/.bin/faucet" - }, - "version": "1.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json deleted file mode 100644 index dcb361becd7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/sshpk/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "_args": [ - [ - "sshpk@^1.7.0", - "/Users/eshanker/Code/fsevents/node_modules/http-signature" - ] - ], - "_from": "sshpk@>=1.7.0 <2.0.0", - "_id": "sshpk@1.8.3", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/sshpk", - "_nodeVersion": "0.12.13", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/sshpk-1.8.3.tgz_1461968607532_0.32797130732797086" - }, - "_npmUser": { - "email": "alex@cooperi.net", - "name": "arekinath" - }, - "_npmVersion": "2.15.1", - "_phantomChildren": {}, - "_requested": { - "name": "sshpk", - "raw": "sshpk@^1.7.0", - "rawSpec": "^1.7.0", - "scope": null, - "spec": ">=1.7.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/http-signature" - ], - "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz", - "_shasum": "890cc9d614dc5292e5cb1a543b03c9abaa5c374e", - "_shrinkwrap": null, - "_spec": "sshpk@^1.7.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/http-signature", - "author": { - "name": "Joyent, Inc" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "bugs": { - "url": "https://github.com/arekinath/node-sshpk/issues" - }, - "contributors": [ - { - "email": "dave@daveeddy.com", - "name": "Dave Eddy" - }, - { - "email": "mcavage@gmail.com", - "name": "Mark Cavage" - }, - { - "email": "alex@cooperi.net", - "name": "Alex Wilson" - } - ], - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jodid25519": "^1.0.0", - "jsbn": "~0.1.0", - "tweetnacl": "~0.13.0" - }, - "description": "A library for finding and using SSH public keys", - "devDependencies": { - "benchmark": "^1.0.0", - "sinon": "^1.17.2", - "tape": "^3.5.0", - "temp": "^0.8.2" - }, - "directories": { - "bin": "./bin", - "lib": "./lib", - "man": "./man/man1" - }, - "dist": { - "shasum": "890cc9d614dc5292e5cb1a543b03c9abaa5c374e", - "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "gitHead": "82d39066b2df4e8284350ff5ebb08c5b95c74652", - "homepage": "https://github.com/arekinath/node-sshpk#readme", - "license": "MIT", - "main": "lib/index.js", - "maintainers": [ - { - "email": "alex@cooperi.net", - "name": "arekinath" - } - ], - "man": [ - "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-conv.1", - "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-sign.1", - "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-verify.1" - ], - "name": "sshpk", - "optionalDependencies": { - "ecc-jsbn": "~0.1.1", - "jodid25519": "^1.0.0", - "jsbn": "~0.1.0", - "tweetnacl": "~0.13.0" - }, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/arekinath/node-sshpk.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "1.8.3" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js deleted file mode 100644 index aa2f839b6dd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; -var stripAnsi = require('strip-ansi'); -var codePointAt = require('code-point-at'); -var isFullwidthCodePoint = require('is-fullwidth-code-point'); - -// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345 -module.exports = function (str) { - if (typeof str !== 'string' || str.length === 0) { - return 0; - } - - var width = 0; - - str = stripAnsi(str); - - for (var i = 0; i < str.length; i++) { - var code = codePointAt(str, i); - - // surrogates - if (code >= 0x10000) { - i++; - } - - if (isFullwidthCodePoint(code)) { - width += 2; - } else { - width++; - } - } - - return width; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json deleted file mode 100644 index 8fa2102b022..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "_args": [ - [ - "string-width@^1.0.1", - "/Users/eshanker/Code/fsevents/node_modules/gauge" - ] - ], - "_from": "string-width@>=1.0.1 <2.0.0", - "_id": "string-width@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/string-width", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "string-width", - "raw": "string-width@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/gauge", - "/fsevents/wide-align" - ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz", - "_shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", - "_shrinkwrap": null, - "_spec": "string-width@^1.0.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/string-width/issues" - }, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "description": "Get the visual width of a string - the number of columns required to display it", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", - "tarball": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "f279cfd14835f0a3c8df69ba18e9a3960156e135", - "homepage": "https://github.com/sindresorhus/string-width", - "keywords": [ - "ansi", - "char", - "character", - "chinese", - "cjk", - "cli", - "codes", - "column", - "columns", - "command-line", - "console", - "escape", - "fixed-width", - "full", - "full-width", - "fullwidth", - "japanese", - "korean", - "str", - "string", - "terminal", - "unicode", - "visual", - "width" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "string-width", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/string-width.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md deleted file mode 100644 index a7737a986c5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string-width/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) - -> Get the visual width of a string - the number of columns required to display it - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. - -Useful to be able to measure the actual width of command-line output. - - -## Install - -``` -$ npm install --save string-width -``` - - -## Usage - -```js -var stringWidth = require('string-width'); - -stringWidth('古'); -//=> 2 - -stringWidth('\u001b[1m古\u001b[22m'); -//=> 2 - -stringWidth('a'); -//=> 1 -``` - - -## Related - -- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module -- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc1d2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a48f5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001501..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb790..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json deleted file mode 100644 index 6d95b19f1e8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/string_decoder/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "string_decoder@~0.10.x", - "/Users/eshanker/Code/fsevents/node_modules/readable-stream" - ] - ], - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_id": "string_decoder@0.10.31", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/string_decoder", - "_npmUser": { - "email": "rod@vagg.org", - "name": "rvagg" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "name": "string_decoder", - "raw": "string_decoder@~0.10.x", - "rawSpec": "~0.10.x", - "scope": null, - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/bl/readable-stream", - "/fsevents/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_shrinkwrap": null, - "_spec": "string_decoder@~0.10.x", - "_where": "/Users/eshanker/Code/fsevents/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "dependencies": {}, - "description": "The string_decoder module from Node core", - "devDependencies": { - "tap": "~0.4.8" - }, - "directories": {}, - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "browser", - "browserify", - "decoder", - "string" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "mail@substack.net", - "name": "substack" - }, - { - "email": "rod@vagg.org", - "name": "rvagg" - } - ], - "name": "string_decoder", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "0.10.31" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore deleted file mode 100644 index 7dccd970766..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml deleted file mode 100644 index f1d0f13c8a5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt deleted file mode 100644 index ab861acdc12..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 Michael Hart (michael.hart.au@gmail.com) - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md deleted file mode 100644 index 32fc9825565..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Decode streams into strings The Right Way(tm) - -```javascript -var fs = require('fs') -var zlib = require('zlib') -var strs = require('stringstream') - -var utf8Stream = fs.createReadStream('massiveLogFile.gz') - .pipe(zlib.createGunzip()) - .pipe(strs('utf8')) -``` - -No need to deal with `setEncoding()` weirdness, just compose streams -like they were supposed to be! - -Handles input and output encoding: - -```javascript -// Stream from utf8 to hex to base64... Why not, ay. -var hex64Stream = fs.createReadStream('myFile') - .pipe(strs('utf8', 'hex')) - .pipe(strs('hex', 'base64')) -``` - -Also deals with `base64` output correctly by aligning each emitted data -chunk so that there are no dangling `=` characters: - -```javascript -var stream = fs.createReadStream('myFile').pipe(strs('base64')) - -var base64Str = '' - -stream.on('data', function(data) { base64Str += data }) -stream.on('end', function() { - console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding() - console.log('Original file is: ' + new Buffer(base64Str, 'base64')) -}) -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js deleted file mode 100644 index f82b85edc7f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/example.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require('fs') -var zlib = require('zlib') -var strs = require('stringstream') - -var utf8Stream = fs.createReadStream('massiveLogFile.gz') - .pipe(zlib.createGunzip()) - .pipe(strs('utf8')) - -utf8Stream.pipe(process.stdout) - -// Stream from utf8 to hex to base64... Why not, ay. -var hex64Stream = fs.createReadStream('myFile') - .pipe(strs('utf8', 'hex')) - .pipe(strs('hex', 'base64')) - -hex64Stream.pipe(process.stdout) - -// Deals with base64 correctly by aligning chunks -var stream = fs.createReadStream('myFile').pipe(strs('base64')) - -var base64Str = '' - -stream.on('data', function(data) { base64Str += data }) -stream.on('end', function() { - console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding() - console.log('Original file is: ' + new Buffer(base64Str, 'base64')) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json deleted file mode 100644 index 3c567cc9e42..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_args": [ - [ - "stringstream@~0.0.4", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "stringstream@>=0.0.4 <0.1.0", - "_id": "stringstream@0.0.5", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/stringstream", - "_nodeVersion": "4.2.1", - "_npmUser": { - "email": "michael.hart.au@gmail.com", - "name": "hichaelmart" - }, - "_npmVersion": "2.14.8", - "_phantomChildren": {}, - "_requested": { - "name": "stringstream", - "raw": "stringstream@~0.0.4", - "rawSpec": "~0.0.4", - "scope": null, - "spec": ">=0.0.4 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "_shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", - "_shrinkwrap": null, - "_spec": "stringstream@~0.0.4", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "author": { - "email": "michael.hart.au@gmail.com", - "name": "Michael Hart", - "url": "http://github.com/mhart" - }, - "bugs": { - "url": "https://github.com/mhart/StringStream/issues" - }, - "dependencies": {}, - "description": "Encode and decode streams into string streams", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "4e484cd4de5a0bbbee18e46307710a8a81621878", - "tarball": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" - }, - "gitHead": "1efe3bf507bf3a1161f8473908b60e881d41422b", - "homepage": "https://github.com/mhart/StringStream#readme", - "keywords": [ - "base64", - "gzip", - "stream", - "string" - ], - "license": "MIT", - "main": "stringstream.js", - "maintainers": [ - { - "email": "michael.hart.au@gmail.com", - "name": "hichaelmart" - } - ], - "name": "stringstream", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/mhart/StringStream.git" - }, - "scripts": {}, - "version": "0.0.5" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js deleted file mode 100644 index 4ece1275f44..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/stringstream/stringstream.js +++ /dev/null @@ -1,102 +0,0 @@ -var util = require('util') -var Stream = require('stream') -var StringDecoder = require('string_decoder').StringDecoder - -module.exports = StringStream -module.exports.AlignedStringDecoder = AlignedStringDecoder - -function StringStream(from, to) { - if (!(this instanceof StringStream)) return new StringStream(from, to) - - Stream.call(this) - - if (from == null) from = 'utf8' - - this.readable = this.writable = true - this.paused = false - this.toEncoding = (to == null ? from : to) - this.fromEncoding = (to == null ? '' : from) - this.decoder = new AlignedStringDecoder(this.toEncoding) -} -util.inherits(StringStream, Stream) - -StringStream.prototype.write = function(data) { - if (!this.writable) { - var err = new Error('stream not writable') - err.code = 'EPIPE' - this.emit('error', err) - return false - } - if (this.fromEncoding) { - if (Buffer.isBuffer(data)) data = data.toString() - data = new Buffer(data, this.fromEncoding) - } - var string = this.decoder.write(data) - if (string.length) this.emit('data', string) - return !this.paused -} - -StringStream.prototype.flush = function() { - if (this.decoder.flush) { - var string = this.decoder.flush() - if (string.length) this.emit('data', string) - } -} - -StringStream.prototype.end = function() { - if (!this.writable && !this.readable) return - this.flush() - this.emit('end') - this.writable = this.readable = false - this.destroy() -} - -StringStream.prototype.destroy = function() { - this.decoder = null - this.writable = this.readable = false - this.emit('close') -} - -StringStream.prototype.pause = function() { - this.paused = true -} - -StringStream.prototype.resume = function () { - if (this.paused) this.emit('drain') - this.paused = false -} - -function AlignedStringDecoder(encoding) { - StringDecoder.call(this, encoding) - - switch (this.encoding) { - case 'base64': - this.write = alignedWrite - this.alignedBuffer = new Buffer(3) - this.alignedBytes = 0 - break - } -} -util.inherits(AlignedStringDecoder, StringDecoder) - -AlignedStringDecoder.prototype.flush = function() { - if (!this.alignedBuffer || !this.alignedBytes) return '' - var leftover = this.alignedBuffer.toString(this.encoding, 0, this.alignedBytes) - this.alignedBytes = 0 - return leftover -} - -function alignedWrite(buffer) { - var rem = (this.alignedBytes + buffer.length) % this.alignedBuffer.length - if (!rem && !this.alignedBytes) return buffer.toString(this.encoding) - - var returnBuffer = new Buffer(this.alignedBytes + buffer.length - rem) - - this.alignedBuffer.copy(returnBuffer, 0, 0, this.alignedBytes) - buffer.copy(returnBuffer, this.alignedBytes, 0, buffer.length - rem) - - buffer.copy(this.alignedBuffer, 0, buffer.length - rem, buffer.length) - this.alignedBytes = rem - - return returnBuffer.toString(this.encoding) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js deleted file mode 100644 index 099480fbfc5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var ansiRegex = require('ansi-regex')(); - -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json deleted file mode 100644 index cc5b0090c60..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_args": [ - [ - "strip-ansi@^3.0.1", - "/Users/eshanker/Code/fsevents/node_modules/gauge" - ] - ], - "_from": "strip-ansi@>=3.0.1 <4.0.0", - "_id": "strip-ansi@3.0.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/strip-ansi", - "_nodeVersion": "0.12.7", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/strip-ansi-3.0.1.tgz_1456057278183_0.28958667791448534" - }, - "_npmUser": { - "email": "jappelman@xebia.com", - "name": "jbnicolai" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "name": "strip-ansi", - "raw": "strip-ansi@^3.0.1", - "rawSpec": "^3.0.1", - "scope": null, - "spec": ">=3.0.1 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/chalk", - "/fsevents/gauge", - "/fsevents/string-width" - ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "_shrinkwrap": null, - "_spec": "strip-ansi@^3.0.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "description": "Strip ANSI escape codes", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "directories": {}, - "dist": { - "shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "tarball": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8270705c704956da865623e564eba4875c3ea17f", - "homepage": "https://github.com/chalk/strip-ansi", - "keywords": [ - "256", - "ansi", - "color", - "colors", - "colour", - "command-line", - "console", - "escape", - "formatting", - "log", - "logging", - "remove", - "rgb", - "shell", - "string", - "strip", - "styles", - "terminal", - "text", - "trim", - "tty", - "xterm" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - { - "email": "jappelman@xebia.com", - "name": "jbnicolai" - } - ], - "name": "strip-ansi", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md deleted file mode 100644 index cb7d9ff7ee4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install --save strip-ansi -``` - - -## Usage - -```js -var stripAnsi = require('strip-ansi'); - -stripAnsi('\u001b[4mcake\u001b[0m'); -//=> 'cake' -``` - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js deleted file mode 100755 index aec5aa20e4a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/cli.js +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var strip = require('./strip-json-comments'); -var input = process.argv[2]; - - -function getStdin(cb) { - var ret = ''; - - process.stdin.setEncoding('utf8'); - - process.stdin.on('data', function (data) { - ret += data; - }); - - process.stdin.on('end', function () { - cb(ret); - }); -} - -if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-json-comments input-file > output-file'); - console.log('or'); - console.log('strip-json-comments < input-file > output-file'); - return; -} - -if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { - console.log(require('./package').version); - return; -} - -if (input) { - process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); - return; -} - -getStdin(function (data) { - process.stdout.write(strip(data)); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json deleted file mode 100644 index 01e092d0078..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - "strip-json-comments@~1.0.4", - "/Users/eshanker/Code/fsevents/node_modules/rc" - ] - ], - "_from": "strip-json-comments@>=1.0.4 <1.1.0", - "_id": "strip-json-comments@1.0.4", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/strip-json-comments", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "strip-json-comments", - "raw": "strip-json-comments@~1.0.4", - "rawSpec": "~1.0.4", - "scope": null, - "spec": ">=1.0.4 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/rc" - ], - "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "_shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", - "_shrinkwrap": null, - "_spec": "strip-json-comments@~1.0.4", - "_where": "/Users/eshanker/Code/fsevents/node_modules/rc", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bin": { - "strip-json-comments": "cli.js" - }, - "bugs": { - "url": "https://github.com/sindresorhus/strip-json-comments/issues" - }, - "dependencies": {}, - "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91", - "tarball": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "cli.js", - "strip-json-comments.js" - ], - "gitHead": "f58348696368583cc5bb18525fe31eacc9bd00e1", - "homepage": "https://github.com/sindresorhus/strip-json-comments", - "keywords": [ - "bin", - "cli", - "comments", - "conf", - "config", - "configuration", - "delete", - "env", - "environment", - "json", - "multiline", - "parse", - "remove", - "settings", - "strip", - "trim", - "util" - ], - "license": "MIT", - "main": "strip-json-comments", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "strip-json-comments", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/strip-json-comments.git" - }, - "scripts": { - "test": "mocha --ui tdd" - }, - "version": "1.0.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md deleted file mode 100644 index 63ce165b238..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/readme.md +++ /dev/null @@ -1,80 +0,0 @@ -# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments) - -> Strip comments from JSON. Lets you use comments in your JSON files! - -This is now possible: - -```js -{ - // rainbows - "unicorn": /* ❤ */ "cake" -} -``` - -It will remove single-line comments `//` and multi-line comments `/**/`. - -Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. - -- - -*There's also [`json-comments`](https://npmjs.org/package/json-comments), but it's only for Node.js, inefficient, bloated as it also minifies, and comes with a `require` hook, which is :(* - - -## Install - -```sh -$ npm install --save strip-json-comments -``` - -```sh -$ bower install --save strip-json-comments -``` - -```sh -$ component install sindresorhus/strip-json-comments -``` - - -## Usage - -```js -var json = '{/*rainbows*/"unicorn":"cake"}'; -JSON.parse(stripJsonComments(json)); -//=> {unicorn: 'cake'} -``` - - -## API - -### stripJsonComments(input) - -#### input - -Type: `string` - -Accepts a string with JSON and returns a string without comments. - - -## CLI - -```sh -$ npm install --global strip-json-comments -``` - -```sh -$ strip-json-comments --help - -strip-json-comments input-file > output-file -# or -strip-json-comments < input-file > output-file -``` - - -## Related - -- [`strip-css-comments`](https://github.com/sindresorhus/strip-css-comments) - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js deleted file mode 100644 index eb77ce7456b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/strip-json-comments/strip-json-comments.js +++ /dev/null @@ -1,73 +0,0 @@ -/*! - strip-json-comments - Strip comments from JSON. Lets you use comments in your JSON files! - https://github.com/sindresorhus/strip-json-comments - by Sindre Sorhus - MIT License -*/ -(function () { - 'use strict'; - - var singleComment = 1; - var multiComment = 2; - - function stripJsonComments(str) { - var currentChar; - var nextChar; - var insideString = false; - var insideComment = false; - var ret = ''; - - for (var i = 0; i < str.length; i++) { - currentChar = str[i]; - nextChar = str[i + 1]; - - if (!insideComment && currentChar === '"') { - var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; - if (!insideComment && !escaped && currentChar === '"') { - insideString = !insideString; - } - } - - if (insideString) { - ret += currentChar; - continue; - } - - if (!insideComment && currentChar + nextChar === '//') { - insideComment = singleComment; - i++; - } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { - insideComment = false; - i++; - ret += currentChar; - ret += nextChar; - continue; - } else if (insideComment === singleComment && currentChar === '\n') { - insideComment = false; - } else if (!insideComment && currentChar + nextChar === '/*') { - insideComment = multiComment; - i++; - continue; - } else if (insideComment === multiComment && currentChar + nextChar === '*/') { - insideComment = false; - i++; - continue; - } - - if (insideComment) { - continue; - } - - ret += currentChar; - } - - return ret; - } - - if (typeof module !== 'undefined' && module.exports) { - module.exports = stripJsonComments; - } else { - window.stripJsonComments = stripJsonComments; - } -})(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js deleted file mode 100644 index 4346e272e1f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/index.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; -var argv = process.argv; - -var terminator = argv.indexOf('--'); -var hasFlag = function (flag) { - flag = '--' + flag; - var pos = argv.indexOf(flag); - return pos !== -1 && (terminator !== -1 ? pos < terminator : true); -}; - -module.exports = (function () { - if ('FORCE_COLOR' in process.env) { - return true; - } - - if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - return false; - } - - if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json deleted file mode 100644 index a7906fa1d7d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - "supports-color@^2.0.0", - "/Users/eshanker/Code/fsevents/node_modules/chalk" - ] - ], - "_from": "supports-color@>=2.0.0 <3.0.0", - "_id": "supports-color@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/supports-color", - "_nodeVersion": "0.12.5", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.11.2", - "_phantomChildren": {}, - "_requested": { - "name": "supports-color", - "raw": "supports-color@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "_shasum": "535d045ce6b6363fa40117084629995e9df324c7", - "_shrinkwrap": null, - "_spec": "supports-color@^2.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/chalk", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "dependencies": {}, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "mocha": "*", - "require-uncached": "^1.0.2" - }, - "directories": {}, - "dist": { - "shasum": "535d045ce6b6363fa40117084629995e9df324c7", - "tarball": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "index.js" - ], - "gitHead": "8400d98ade32b2adffd50902c06d9e725a5c6588", - "homepage": "https://github.com/chalk/supports-color", - "keywords": [ - "256", - "ansi", - "capability", - "cli", - "color", - "colors", - "colour", - "command-line", - "console", - "detect", - "rgb", - "shell", - "styles", - "support", - "supports", - "terminal", - "tty", - "xterm" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - { - "email": "jappelman@xebia.com", - "name": "jbnicolai" - } - ], - "name": "supports-color", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md deleted file mode 100644 index b4761f1ecde..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/supports-color/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install --save supports-color -``` - - -## Usage - -```js -var supportsColor = require('supports-color'); - -if (supportsColor) { - console.log('Terminal supports color'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - -For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore deleted file mode 100644 index c6f386f85f3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid - -pids -logs -results - -npm-debug.log -node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml deleted file mode 100644 index cf5d63687de..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -sudo: false -language: node_js -node_js: - - stable - - "0.10" - - "0.8" -before_install: if [[ `npm --version` != 3* ]]; then npm install -g npm; fi; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE deleted file mode 100644 index 67b20da3089..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2014, Forbes Lindesay -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md deleted file mode 100644 index dab8dc99f5a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Tar Pack - -Package and un-package modules of some sort (in tar/gz bundles). This is mostly useful for package managers. Note that it doesn't check for or touch `package.json` so it can be used even if that's not the way you store your package info. - -[![Build Status](https://img.shields.io/travis/ForbesLindesay/tar-pack/master.svg)](https://travis-ci.org/ForbesLindesay/tar-pack) -[![Dependency Status](https://img.shields.io/david/ForbesLindesay/tar-pack.svg)](https://david-dm.org/ForbesLindesay/tar-pack) -[![NPM version](https://img.shields.io/npm/v/tar-pack.svg)](https://www.npmjs.com/package/tar-pack) - -## Installation - - $ npm install tar-pack - -## API - -### pack(folder|packer, [options]) - -Pack the folder at `folder` into a gzipped tarball and return the tgz as a stream. Files ignored by `.gitignore` will not be in the package. - -You can optionally pass a `fstream.DirReader` directly, instead of folder. For example, to create an npm package, do: - -```js -pack(require("fstream-npm")(folder), [options]) -``` - -Options: - - - `noProprietary` (defaults to `false`) Set this to `true` to prevent any proprietary attributes being added to the tarball. These attributes are allowed by the spec, but may trip up some poorly written tarball parsers. - - `ignoreFiles` (defaults to `['.gitignore']`) These files can specify files to be excluded from the package using the syntax of `.gitignore`. This option is ignored if you parse a `fstream.DirReader` instead of a string for folder. - - `filter` (defaults to `entry => true`) A function that takes an entry and returns `true` if it should be included in the package and `false` if it should not. Entryies are of the form `{path, basename, dirname, type}` where (type is "Directory" or "File"). This function is ignored if you parse a `fstream.DirReader` instead of a string for folder. - -Example: - -```js -var write = require('fs').createWriteStream -var pack = require('tar-pack').pack -pack(process.cwd()) - .pipe(write(__dirname + '/package.tar.gz')) - .on('error', function (err) { - console.error(err.stack) - }) - .on('close', function () { - console.log('done') - }) -``` - -### unpack(folder, [options,] cb) - -Return a stream that unpacks a tarball into a folder at `folder`. N.B. the output folder will be removed first if it already exists. - -The callback is called with an optional error and, as its second argument, a string which is one of: - - - `'directory'`, indicating that the extracted package was a directory (either `.tar.gz` or `.tar`) - - `'file'`, incating that the extracted package was just a single file (extracted to `defaultName`, see options) - -Basic Options: - - - `defaultName` (defaults to `index.js`) If the package is a single file, rather than a tarball, it will be "extracted" to this file name, set to `false` to disable. - -Advanced Options (you probably don't need any of these): - - - `gid` - (defaults to `null`) the `gid` to use when writing files - - `uid` - (defaults to `null`) the `uid` to use when writing files - - `dmode` - (defaults to `0777`) The mode to use when creating directories - - `fmode` - (defaults to `0666`) The mode to use when creating files - - `unsafe` - (defaults to `false`) (on non win32 OSes it overrides `gid` and `uid` with the current processes IDs) - -Example: - -```js -var read = require('fs').createReadStream -var unpack = require('tar-pack').unpack -read(process.cwd() + '/package.tar.gz') - .pipe(unpack(__dirname + '/package/', function (err) { - if (err) console.error(err.stack) - else console.log('done') - })) -``` - -## License - - BSD \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js deleted file mode 100644 index 8a1539ba172..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/index.js +++ /dev/null @@ -1,240 +0,0 @@ -"use strict" - -var debug = require('debug')('tar-pack') -var uidNumber = require('uid-number') -var rm = require('rimraf') -var tar = require('tar') -var once = require('once') -var fstream = require('fstream') -var packer = require('fstream-ignore') - -var PassThrough = require('stream').PassThrough || require('readable-stream').PassThrough -var zlib = require('zlib') -var path = require('path') - -var win32 = process.platform === 'win32' -var myUid = process.getuid && process.getuid() -var myGid = process.getgid && process.getgid() - -if (process.env.SUDO_UID && myUid === 0) { - if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID - if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID -} - -exports.pack = pack -exports.unpack = unpack - -function pack(folder, options) { - options = options || {} - if (typeof folder === 'string') { - - var filter = options.filter || function (entry) { return true; } - - folder = packer({ - path: folder, - type: 'Directory', - isDirectory: true, - ignoreFiles: options.ignoreFiles || ['.gitignore'], - filter: function (entry) { // {path, basename, dirname, type} (type is "Directory" or "File") - var basename = entry.basename - // some files are *never* allowed under any circumstances - // these files should always be either temporary files or - // version control related files - if (basename === '.git' || basename === '.lock-wscript' || basename.match(/^\.wafpickle-[0-9]+$/) || - basename === 'CVS' || basename === '.svn' || basename === '.hg' || basename.match(/^\..*\.swp$/) || - basename === '.DS_Store' || basename.match(/^\._/)) { - return false - } - //custom excludes - return filter(entry) - } - }) - } - // By default, npm includes some proprietary attributes in the - // package tarball. This is sane, and allowed by the spec. - // However, npm *itself* excludes these from its own package, - // so that it can be more easily bootstrapped using old and - // non-compliant tar implementations. - var tarPack = tar.Pack({ noProprietary: options.noProprietary || false }) - var gzip = zlib.Gzip() - - folder - .on('error', function (er) { - if (er) debug('Error reading folder') - return gzip.emit('error', er) - }) - tarPack - .on('error', function (er) { - if (er) debug('tar creation error') - gzip.emit('error', er) - }) - return folder.pipe(tarPack).pipe(gzip) -} - -function unpack(unpackTarget, options, cb) { - if (typeof options === 'function' && cb === undefined) cb = options, options = undefined - - var tarball = new PassThrough() - if (typeof cb === 'function') { - cb = once(cb) - tarball.on('error', cb) - tarball.on('close', function () { - cb() - }) - } - - var parent = path.dirname(unpackTarget) - var base = path.basename(unpackTarget) - - options = options || {} - var gid = options.gid || null - var uid = options.uid || null - var dMode = options.dmode || 0x0777 //npm.modes.exec - var fMode = options.fmode || 0x0666 //npm.modes.file - var defaultName = options.defaultName || (options.defaultName === false ? false : 'index.js') - - // figure out who we're supposed to be, if we're not pretending - // to be a specific user. - if (options.unsafe && !win32) { - uid = myUid - gid = myGid - } - - var pending = 2 - uidNumber(uid, gid, function (er, uid, gid) { - if (er) { - tarball.emit('error', er) - return tarball.end() - } - if (0 === --pending) next() - }) - rm(unpackTarget, function (er) { - if (er) { - tarball.emit('error', er) - return tarball.end() - } - if (0 === --pending) next() - }) - function next() { - // gzip {tarball} --decompress --stdout \ - // | tar -mvxpf - --strip-components=1 -C {unpackTarget} - gunzTarPerm(tarball, unpackTarget, dMode, fMode, uid, gid, defaultName) - } - return tarball -} - - -function gunzTarPerm(tarball, target, dMode, fMode, uid, gid, defaultName) { - debug('modes %j', [dMode.toString(8), fMode.toString(8)]) - - function fixEntry(entry) { - debug('fixEntry %j', entry.path) - // never create things that are user-unreadable, - // or dirs that are user-un-listable. Only leads to headaches. - var originalMode = entry.mode = entry.mode || entry.props.mode - entry.mode = entry.mode | (entry.type === 'Directory' ? dMode : fMode) - entry.props.mode = entry.mode - if (originalMode !== entry.mode) { - debug('modified mode %j', [entry.path, originalMode, entry.mode]) - } - - // if there's a specific owner uid/gid that we want, then set that - if (!win32 && typeof uid === 'number' && typeof gid === 'number') { - entry.props.uid = entry.uid = uid - entry.props.gid = entry.gid = gid - } - } - - var extractOpts = { type: 'Directory', path: target, strip: 1 } - - if (!win32 && typeof uid === 'number' && typeof gid === 'number') { - extractOpts.uid = uid - extractOpts.gid = gid - } - - extractOpts.filter = function () { - // symbolic links are not allowed in packages. - if (this.type.match(/^.*Link$/)) { - debug('excluding symbolic link: ' + this.path.substr(target.length + 1) + ' -> ' + this.linkpath) - return false - } - return true - } - - - type(tarball, function (err, type) { - if (err) return tarball.emit('error', err) - var strm = tarball - if (type === 'gzip') { - strm = strm.pipe(zlib.Unzip()) - strm.on('error', function (er) { - if (er) debug('unzip error') - tarball.emit('error', er) - }) - type = 'tar' - } - if (type === 'tar') { - strm - .pipe(tar.Extract(extractOpts)) - .on('entry', fixEntry) - .on('error', function (er) { - if (er) debug('untar error') - tarball.emit('error', er) - }) - .on('close', function () { - tarball.emit('close') - }) - return - } - if (type === 'naked-file' && defaultName) { - var jsOpts = { path: path.resolve(target, defaultName) } - - if (!win32 && typeof uid === 'number' && typeof gid === 'number') { - jsOpts.uid = uid - jsOpts.gid = gid - } - - strm - .pipe(fstream.Writer(jsOpts)) - .on('error', function (er) { - if (er) debug('copy error') - tarball.emit('error', er) - }) - .on('close', function () { - tarball.emit('close') - }) - return - } - - return cb(new Error('Unrecognised package type')); - }) -} - -function type(stream, callback) { - stream.on('error', handle) - stream.on('data', parse) - function handle(err) { - stream.removeListener('data', parse) - stream.removeListener('error', handle) - } - function parse(chunk) { - // detect what it is. - // Then, depending on that, we'll figure out whether it's - // a single-file module, gzipped tarball, or naked tarball. - - // gzipped files all start with 1f8b08 - if (chunk[0] === 0x1F && chunk[1] === 0x8B && chunk[2] === 0x08) { - callback(null, 'gzip') - } else if (chunk.toString().match(/^package\/\u0000/)) { - // note, this will only pick up on tarballs with a root directory called package - callback(null, 'tar') - } else { - callback(null, 'naked-file') - } - - // now un-hook, and re-emit the chunk - stream.removeListener('data', parse) - stream.removeListener('error', handle) - stream.unshift(chunk) - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json deleted file mode 100644 index 4f888964787..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - "tar-pack@~3.1.0", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "tar-pack@>=3.1.0 <3.2.0", - "_id": "tar-pack@3.1.4", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/tar-pack", - "_nodeVersion": "6.2.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/tar-pack-3.1.4.tgz_1467088357244_0.18669610540382564" - }, - "_npmUser": { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" - }, - "_npmVersion": "3.10.2", - "_phantomChildren": {}, - "_requested": { - "name": "tar-pack", - "raw": "tar-pack@~3.1.0", - "rawSpec": "~3.1.0", - "scope": null, - "spec": ">=3.1.0 <3.2.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/node-pre-gyp" - ], - "_resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.4.tgz", - "_shasum": "bc8cf9a22f5832739f12f3910dac1eb97b49708c", - "_shrinkwrap": null, - "_spec": "tar-pack@~3.1.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "bugs": { - "url": "https://github.com/ForbesLindesay/tar-pack/issues" - }, - "dependencies": { - "debug": "~2.2.0", - "fstream": "~1.0.10", - "fstream-ignore": "~1.0.5", - "once": "~1.3.3", - "readable-stream": "~2.1.4", - "rimraf": "~2.5.1", - "tar": "~2.2.1", - "uid-number": "~0.0.6" - }, - "description": "Package and un-package modules of some sort (in tar/gz bundles).", - "devDependencies": { - "mkdirp": "*", - "mocha": "*", - "rfile": "*" - }, - "directories": {}, - "dist": { - "shasum": "bc8cf9a22f5832739f12f3910dac1eb97b49708c", - "tarball": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.4.tgz" - }, - "gitHead": "ee23170716772ae458574ea090500035202c7c64", - "homepage": "https://github.com/ForbesLindesay/tar-pack#readme", - "license": "BSD-2-Clause", - "maintainers": [ - { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - }, - { - "email": "forbes@lindesay.co.uk", - "name": "forbeslindesay" - }, - { - "email": "snnskwtnb@gmail.com", - "name": "shinnn" - } - ], - "name": "tar-pack", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/ForbesLindesay/tar-pack.git" - }, - "scripts": { - "test": "mocha -R list" - }, - "version": "3.1.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt deleted file mode 100644 index ba0e162e1c4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed-file.txt +++ /dev/null @@ -1 +0,0 @@ -bar \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/packed.tar deleted file mode 100644 index 35fd1745182fd4c3c4572a7d11e0d9f2f41658b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3584 zcmeH{K?(vf3`KjCoIsPdnVhF1>cYhgG7ItaMy)WoaTOTwchfe|B)s3Bxg9R;eB7tN zMU~Br5C~06%Nc|=-cm2n9-7U8z1dH%5{R?&dH4oMGH-ABi yL%KoIHG#3+*H@hXjKIhLr)k=T|24n-pMCzr|M8#E=YD(E_7jX0PWO03Iah41>hVd7f>@lNzOAX*jS9n z6yoU}#YM2$YLcfTRTkX(XB^`12+V^V_A=KiO0 zKek7s5rQoBpML#Y?%7-;lMswHl_$Y|&HKO9x{dv7{OsQh`(H!<`vd?0`||=f!0QwM G4gdh@=127a diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt deleted file mode 100644 index 3f953866625..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/bar.txt +++ /dev/null @@ -1 +0,0 @@ -baz \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt deleted file mode 100644 index ba0e162e1c4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/fixtures/to-pack/foo.txt +++ /dev/null @@ -1 +0,0 @@ -bar \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js deleted file mode 100644 index 314c020af7b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar-pack/test/index.js +++ /dev/null @@ -1,67 +0,0 @@ -var tar = require('../') -var path = require('path') -var rfile = require('rfile') -var rimraf = require('rimraf').sync -var mkdir = require('mkdirp').sync - -var read = require('fs').createReadStream -var write = require('fs').createWriteStream -var assert = require('assert') - -beforeEach(function () { - rimraf(__dirname + '/output') -}) -afterEach(function () { - rimraf(__dirname + '/output') -}) -describe('tarball.pipe(unpack(directory, callback))', function () { - it('unpacks the tarball into the directory', function (done) { - read(__dirname + '/fixtures/packed.tar').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { - if (err) return done(err) - assert.equal(rfile('./output/unpacked/bar.txt'), rfile('./fixtures/to-pack/bar.txt')) - assert.equal(rfile('./output/unpacked/foo.txt'), rfile('./fixtures/to-pack/foo.txt')) - done() - })) - }) -}) -describe('gziptarball.pipe(unpack(directory, callback))', function () { - it('unpacks the tarball into the directory', function (done) { - read(__dirname + '/fixtures/packed.tar.gz').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { - if (err) return done(err) - assert.equal(rfile('./output/unpacked/bar.txt'), rfile('./fixtures/to-pack/bar.txt')) - assert.equal(rfile('./output/unpacked/foo.txt'), rfile('./fixtures/to-pack/foo.txt')) - done() - })) - }) -}) -describe('file.pipe(unpack(directory, callback))', function () { - it('copies the file into the directory', function (done) { - read(__dirname + '/fixtures/packed-file.txt').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { - if (err) return done(err) - assert.equal(rfile('./output/unpacked/index.js'), rfile('./fixtures/packed-file.txt')) - done() - })) - }) -}) -describe('pack(directory).pipe(tarball)', function () { - it('packs the directory into the output', function (done) { - var called = false - mkdir(__dirname + '/output/') - tar.pack(__dirname + '/fixtures/to-pack').pipe(write(__dirname + '/output/packed.tar.gz')) - .on('error', function (err) { - if (called) return - called = true - done(err) - }) - .on('close', function () { - if (called) return - called = true - read(__dirname + '/output/packed.tar.gz').pipe(tar.unpack(__dirname + '/output/unpacked', function (err) { - if (err) return done(err) - assert.equal(rfile('./output/unpacked/bar.txt'), rfile('./fixtures/to-pack/bar.txt')) - assert.equal(rfile('./output/unpacked/foo.txt'), rfile('./fixtures/to-pack/foo.txt')) - done() - })) - }) - }) -}) \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore deleted file mode 100644 index c167ad5b1c1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules -examples/extract/ -test/tmp/ -test/fixtures/ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml deleted file mode 100644 index fca8ef01940..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.10 - - 0.11 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE deleted file mode 100644 index 019b7e40ea0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -The ISC License -Copyright (c) Isaac Z. Schlueter and Contributors -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md deleted file mode 100644 index cfda2ac1806..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# node-tar - -Tar for Node.js. - -[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) - -## API - -See `examples/` for usage examples. - -### var tar = require('tar') - -Returns an object with `.Pack`, `.Extract` and `.Parse` methods. - -### tar.Pack([properties]) - -Returns a through stream. Use -[fstream](https://npmjs.org/package/fstream) to write files into the -pack stream and you will receive tar archive data from the pack -stream. - -This only works with directories, it does not work with individual files. - -The optional `properties` object are used to set properties in the tar -'Global Extended Header'. If the `fromBase` property is set to true, -the tar will contain files relative to the path passed, and not with -the path included. - -### tar.Extract([options]) - -Returns a through stream. Write tar data to the stream and the files -in the tarball will be extracted onto the filesystem. - -`options` can be: - -```js -{ - path: '/path/to/extract/tar/into', - strip: 0, // how many path segments to strip from the root when extracting -} -``` - -`options` also get passed to the `fstream.Writer` instance that `tar` -uses internally. - -### tar.Parse() - -Returns a writable stream. Write tar data to it and it will emit -`entry` events for each entry parsed from the tarball. This is used by -`tar.Extract`. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js deleted file mode 100644 index f6253a72c5c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/extracter.js +++ /dev/null @@ -1,19 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - - -function onError(err) { - console.error('An error occurred:', err) -} - -function onEnd() { - console.log('Extracted!') -} - -var extractor = tar.Extract({path: __dirname + "/extract"}) - .on('error', onError) - .on('end', onEnd); - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .on('error', onError) - .pipe(extractor); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js deleted file mode 100644 index 039969ce300..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/packer.js +++ /dev/null @@ -1,24 +0,0 @@ -var tar = require("../tar.js") - , fstream = require("fstream") - , fs = require("fs") - -var dirDest = fs.createWriteStream('dir.tar') - - -function onError(err) { - console.error('An error occurred:', err) -} - -function onEnd() { - console.log('Packed!') -} - -var packer = tar.Pack({ noProprietary: true }) - .on('error', onError) - .on('end', onEnd); - -// This must be a "directory" -fstream.Reader({ path: __dirname, type: "Directory" }) - .on('error', onError) - .pipe(packer) - .pipe(dirDest) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js deleted file mode 100644 index 39f3f0888a2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/examples/reader.js +++ /dev/null @@ -1,36 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Parse()) - .on("extendedHeader", function (e) { - console.error("extended pax header", e.props) - e.on("end", function () { - console.error("extended pax fields:", e.fields) - }) - }) - .on("ignoredEntry", function (e) { - console.error("ignoredEntry?!?", e.props) - }) - .on("longLinkpath", function (e) { - console.error("longLinkpath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("longPath", function (e) { - console.error("longPath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("entry", function (e) { - console.error("entry", e.props) - e.on("data", function (c) { - console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) - }) - e.on("end", function () { - console.error(" << 0 - return !this._needDrain -} - -EntryWriter.prototype.end = function (c) { - // console.error(".. ew end") - if (c) this._buffer.push(c) - this._buffer.push(EOF) - this._ended = true - this._process() - this._needDrain = this._buffer.length > 0 -} - -EntryWriter.prototype.pause = function () { - // console.error(".. ew pause") - this._paused = true - this.emit("pause") -} - -EntryWriter.prototype.resume = function () { - // console.error(".. ew resume") - this._paused = false - this.emit("resume") - this._process() -} - -EntryWriter.prototype.add = function (entry) { - // console.error(".. ew add") - if (!this.parent) return this.emit("error", new Error("no parent")) - - // make sure that the _header and such is emitted, and clear out - // the _currentEntry link on the parent. - if (!this._ended) this.end() - - return this.parent.add(entry) -} - -EntryWriter.prototype._header = function () { - // console.error(".. ew header") - if (this._didHeader) return - this._didHeader = true - - var headerBlock = TarHeader.encode(this.props) - - if (this.props.needExtended && !this._meta) { - var me = this - - ExtendedHeaderWriter = ExtendedHeaderWriter || - require("./extended-header-writer.js") - - ExtendedHeaderWriter(this.props) - .on("data", function (c) { - me.emit("data", c) - }) - .on("error", function (er) { - me.emit("error", er) - }) - .end() - } - - // console.error(".. .. ew headerBlock emitting") - this.emit("data", headerBlock) - this.emit("header") -} - -EntryWriter.prototype._process = function () { - // console.error(".. .. ew process") - if (!this._didHeader && !this._meta) { - this._header() - } - - if (this._paused || this._processing) { - // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing) - return - } - - this._processing = true - - var buf = this._buffer - for (var i = 0; i < buf.length; i ++) { - // console.error(".. .. .. i=%d", i) - - var c = buf[i] - - if (c === EOF) this._stream.end() - else this._stream.write(c) - - if (this._paused) { - // console.error(".. .. .. paused mid-emission") - this._processing = false - if (i < buf.length) { - this._needDrain = true - this._buffer = buf.slice(i + 1) - } - return - } - } - - // console.error(".. .. .. emitted") - this._buffer.length = 0 - this._processing = false - - // console.error(".. .. .. emitting drain") - this.emit("drain") -} - -EntryWriter.prototype.destroy = function () {} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js deleted file mode 100644 index 591202bd3b9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/entry.js +++ /dev/null @@ -1,220 +0,0 @@ -// A passthrough read/write stream that sets its properties -// based on a header, extendedHeader, and globalHeader -// -// Can be either a file system object of some sort, or -// a pax/ustar metadata entry. - -module.exports = Entry - -var TarHeader = require("./header.js") - , tar = require("../tar") - , assert = require("assert").ok - , Stream = require("stream").Stream - , inherits = require("inherits") - , fstream = require("fstream").Abstract - -function Entry (header, extended, global) { - Stream.call(this) - this.readable = true - this.writable = true - - this._needDrain = false - this._paused = false - this._reading = false - this._ending = false - this._ended = false - this._remaining = 0 - this._abort = false - this._queue = [] - this._index = 0 - this._queueLen = 0 - - this._read = this._read.bind(this) - - this.props = {} - this._header = header - this._extended = extended || {} - - // globals can change throughout the course of - // a file parse operation. Freeze it at its current state. - this._global = {} - var me = this - Object.keys(global || {}).forEach(function (g) { - me._global[g] = global[g] - }) - - this._setProps() -} - -inherits(Entry, Stream) - -Entry.prototype.write = function (c) { - if (this._ending) this.error("write() after end()", null, true) - if (this._remaining === 0) { - this.error("invalid bytes past eof") - } - - // often we'll get a bunch of \0 at the end of the last write, - // since chunks will always be 512 bytes when reading a tarball. - if (c.length > this._remaining) { - c = c.slice(0, this._remaining) - } - this._remaining -= c.length - - // put it on the stack. - var ql = this._queueLen - this._queue.push(c) - this._queueLen ++ - - this._read() - - // either paused, or buffered - if (this._paused || ql > 0) { - this._needDrain = true - return false - } - - return true -} - -Entry.prototype.end = function (c) { - if (c) this.write(c) - this._ending = true - this._read() -} - -Entry.prototype.pause = function () { - this._paused = true - this.emit("pause") -} - -Entry.prototype.resume = function () { - // console.error(" Tar Entry resume", this.path) - this.emit("resume") - this._paused = false - this._read() - return this._queueLen - this._index > 1 -} - - // This is bound to the instance -Entry.prototype._read = function () { - // console.error(" Tar Entry _read", this.path) - - if (this._paused || this._reading || this._ended) return - - // set this flag so that event handlers don't inadvertently - // get multiple _read() calls running. - this._reading = true - - // have any data to emit? - while (this._index < this._queueLen && !this._paused) { - var chunk = this._queue[this._index ++] - this.emit("data", chunk) - } - - // check if we're drained - if (this._index >= this._queueLen) { - this._queue.length = this._queueLen = this._index = 0 - if (this._needDrain) { - this._needDrain = false - this.emit("drain") - } - if (this._ending) { - this._ended = true - this.emit("end") - } - } - - // if the queue gets too big, then pluck off whatever we can. - // this should be fairly rare. - var mql = this._maxQueueLen - if (this._queueLen > mql && this._index > 0) { - mql = Math.min(this._index, mql) - this._index -= mql - this._queueLen -= mql - this._queue = this._queue.slice(mql) - } - - this._reading = false -} - -Entry.prototype._setProps = function () { - // props = extended->global->header->{} - var header = this._header - , extended = this._extended - , global = this._global - , props = this.props - - // first get the values from the normal header. - var fields = tar.fields - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = header[field] - if (typeof val !== "undefined") props[field] = val - } - - // next, the global header for this file. - // numeric values, etc, will have already been parsed. - ;[global, extended].forEach(function (p) { - Object.keys(p).forEach(function (f) { - if (typeof p[f] !== "undefined") props[f] = p[f] - }) - }) - - // no nulls allowed in path or linkpath - ;["path", "linkpath"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = props[p].split("\0")[0] - } - }) - - - // set date fields to be a proper date - ;["mtime", "ctime", "atime"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = new Date(props[p] * 1000) - } - }) - - // set the type so that we know what kind of file to create - var type - switch (tar.types[props.type]) { - case "OldFile": - case "ContiguousFile": - type = "File" - break - - case "GNUDumpDir": - type = "Directory" - break - - case undefined: - type = "Unknown" - break - - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - default: - type = tar.types[props.type] - } - - this.type = type - this.path = props.path - this.size = props.size - - // size is special, since it signals when the file needs to end. - this._remaining = props.size -} - -// the parser may not call write if _abort is true. -// useful for skipping data from some files quickly. -Entry.prototype.abort = function(){ - this._abort = true -} - -Entry.prototype.warn = fstream.warn -Entry.prototype.error = fstream.error diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js deleted file mode 100644 index 1728c4583ae..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header-writer.js +++ /dev/null @@ -1,191 +0,0 @@ - -module.exports = ExtendedHeaderWriter - -var inherits = require("inherits") - , EntryWriter = require("./entry-writer.js") - -inherits(ExtendedHeaderWriter, EntryWriter) - -var tar = require("../tar.js") - , path = require("path") - , TarHeader = require("./header.js") - -// props is the props of the thing we need to write an -// extended header for. -// Don't be shy with it. Just encode everything. -function ExtendedHeaderWriter (props) { - // console.error(">> ehw ctor") - var me = this - - if (!(me instanceof ExtendedHeaderWriter)) { - return new ExtendedHeaderWriter(props) - } - - me.fields = props - - var p = - { path : ("PaxHeader" + path.join("/", props.path || "")) - .replace(/\\/g, "/").substr(0, 100) - , mode : props.mode || 0666 - , uid : props.uid || 0 - , gid : props.gid || 0 - , size : 0 // will be set later - , mtime : props.mtime || Date.now() / 1000 - , type : "x" - , linkpath : "" - , ustar : "ustar\0" - , ustarver : "00" - , uname : props.uname || "" - , gname : props.gname || "" - , devmaj : props.devmaj || 0 - , devmin : props.devmin || 0 - } - - - EntryWriter.call(me, p) - // console.error(">> ehw props", me.props) - me.props = p - - me._meta = true -} - -ExtendedHeaderWriter.prototype.end = function () { - // console.error(">> ehw end") - var me = this - - if (me._ended) return - me._ended = true - - me._encodeFields() - - if (me.props.size === 0) { - // nothing to write! - me._ready = true - me._stream.end() - return - } - - me._stream.write(TarHeader.encode(me.props)) - me.body.forEach(function (l) { - me._stream.write(l) - }) - me._ready = true - - // console.error(">> ehw _process calling end()", me.props) - this._stream.end() -} - -ExtendedHeaderWriter.prototype._encodeFields = function () { - // console.error(">> ehw _encodeFields") - this.body = [] - if (this.fields.prefix) { - this.fields.path = this.fields.prefix + "/" + this.fields.path - this.fields.prefix = "" - } - encodeFields(this.fields, "", this.body, this.fields.noProprietary) - var me = this - this.body.forEach(function (l) { - me.props.size += l.length - }) -} - -function encodeFields (fields, prefix, body, nop) { - // console.error(">> >> ehw encodeFields") - // "%d %s=%s\n", , , - // The length is a decimal number, and includes itself and the \n - // Numeric values are decimal strings. - - Object.keys(fields).forEach(function (k) { - var val = fields[k] - , numeric = tar.numeric[k] - - if (prefix) k = prefix + "." + k - - // already including NODETAR.type, don't need File=true also - if (k === fields.type && val === true) return - - switch (k) { - // don't include anything that's always handled just fine - // in the normal header, or only meaningful in the context - // of nodetar - case "mode": - case "cksum": - case "ustar": - case "ustarver": - case "prefix": - case "basename": - case "dirname": - case "needExtended": - case "block": - case "filter": - return - - case "rdev": - if (val === 0) return - break - - case "nlink": - case "dev": // Truly a hero among men, Creator of Star! - case "ino": // Speak his name with reverent awe! It is: - k = "SCHILY." + k - break - - default: break - } - - if (val && typeof val === "object" && - !Buffer.isBuffer(val)) encodeFields(val, k, body, nop) - else if (val === null || val === undefined) return - else body.push.apply(body, encodeField(k, val, nop)) - }) - - return body -} - -function encodeField (k, v, nop) { - // lowercase keys must be valid, otherwise prefix with - // "NODETAR." - if (k.charAt(0) === k.charAt(0).toLowerCase()) { - var m = k.split(".")[0] - if (!tar.knownExtended[m]) k = "NODETAR." + k - } - - // no proprietary - if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) { - return [] - } - - if (typeof val === "number") val = val.toString(10) - - var s = new Buffer(" " + k + "=" + v + "\n") - , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 - - // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - // if adding that many digits will make it go over that length, - // then add one to it. For example, if the string is: - // " foo=bar\n" - // then that's 9 characters. With the "9", that bumps the length - // up to 10. However, this is invalid: - // "10 foo=bar\n" - // but, since that's actually 11 characters, since 10 adds another - // character to the length, and the length includes the number - // itself. In that case, just bump it up again. - if (s.length + digits >= Math.pow(10, digits)) digits += 1 - // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - var len = digits + s.length - // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) - var lenBuf = new Buffer("" + len) - if (lenBuf.length + s.length !== len) { - throw new Error("Bad length calculation\n"+ - "len="+len+"\n"+ - "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ - "lenBuf.length="+lenBuf.length+"\n"+ - "digits="+digits+"\n"+ - "s="+JSON.stringify(s.toString())+"\n"+ - "s.length="+s.length) - } - - return [lenBuf, s] -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js deleted file mode 100644 index 74f432ceee5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extended-header.js +++ /dev/null @@ -1,140 +0,0 @@ -// An Entry consisting of: -// -// "%d %s=%s\n", , , -// -// The length is a decimal number, and includes itself and the \n -// \0 does not terminate anything. Only the length terminates the string. -// Numeric values are decimal strings. - -module.exports = ExtendedHeader - -var Entry = require("./entry.js") - , inherits = require("inherits") - , tar = require("../tar.js") - , numeric = tar.numeric - , keyTrans = { "SCHILY.dev": "dev" - , "SCHILY.ino": "ino" - , "SCHILY.nlink": "nlink" } - -function ExtendedHeader () { - Entry.apply(this, arguments) - this.on("data", this._parse) - this.fields = {} - this._position = 0 - this._fieldPos = 0 - this._state = SIZE - this._sizeBuf = [] - this._keyBuf = [] - this._valBuf = [] - this._size = -1 - this._key = "" -} - -inherits(ExtendedHeader, Entry) -ExtendedHeader.prototype._parse = parse - -var s = 0 - , states = ExtendedHeader.states = {} - , SIZE = states.SIZE = s++ - , KEY = states.KEY = s++ - , VAL = states.VAL = s++ - , ERR = states.ERR = s++ - -Object.keys(states).forEach(function (s) { - states[states[s]] = states[s] -}) - -states[s] = null - -// char code values for comparison -var _0 = "0".charCodeAt(0) - , _9 = "9".charCodeAt(0) - , point = ".".charCodeAt(0) - , a = "a".charCodeAt(0) - , Z = "Z".charCodeAt(0) - , a = "a".charCodeAt(0) - , z = "z".charCodeAt(0) - , space = " ".charCodeAt(0) - , eq = "=".charCodeAt(0) - , cr = "\n".charCodeAt(0) - -function parse (c) { - if (this._state === ERR) return - - for ( var i = 0, l = c.length - ; i < l - ; this._position++, this._fieldPos++, i++) { - // console.error("top of loop, size="+this._size) - - var b = c[i] - - if (this._size >= 0 && this._fieldPos > this._size) { - error(this, "field exceeds length="+this._size) - return - } - - switch (this._state) { - case ERR: return - - case SIZE: - // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString()) - if (b === space) { - this._state = KEY - // this._fieldPos = this._sizeBuf.length - this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10) - this._sizeBuf.length = 0 - continue - } - if (b < _0 || b > _9) { - error(this, "expected [" + _0 + ".." + _9 + "], got " + b) - return - } - this._sizeBuf.push(b) - continue - - case KEY: - // can be any char except =, not > size. - if (b === eq) { - this._state = VAL - this._key = new Buffer(this._keyBuf).toString() - if (keyTrans[this._key]) this._key = keyTrans[this._key] - this._keyBuf.length = 0 - continue - } - this._keyBuf.push(b) - continue - - case VAL: - // field must end with cr - if (this._fieldPos === this._size - 1) { - // console.error("finished with "+this._key) - if (b !== cr) { - error(this, "expected \\n at end of field") - return - } - var val = new Buffer(this._valBuf).toString() - if (numeric[this._key]) { - val = parseFloat(val) - } - this.fields[this._key] = val - - this._valBuf.length = 0 - this._state = SIZE - this._size = -1 - this._fieldPos = -1 - continue - } - this._valBuf.push(b) - continue - } - } -} - -function error (me, msg) { - msg = "invalid header: " + msg - + "\nposition=" + me._position - + "\nfield position=" + me._fieldPos - - me.error(msg) - me.state = ERR -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js deleted file mode 100644 index fe1bb976eb0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/extract.js +++ /dev/null @@ -1,94 +0,0 @@ -// give it a tarball and a path, and it'll dump the contents - -module.exports = Extract - -var tar = require("../tar.js") - , fstream = require("fstream") - , inherits = require("inherits") - , path = require("path") - -function Extract (opts) { - if (!(this instanceof Extract)) return new Extract(opts) - tar.Parse.apply(this) - - if (typeof opts !== "object") { - opts = { path: opts } - } - - // better to drop in cwd? seems more standard. - opts.path = opts.path || path.resolve("node-tar-extract") - opts.type = "Directory" - opts.Directory = true - - // similar to --strip or --strip-components - opts.strip = +opts.strip - if (!opts.strip || opts.strip <= 0) opts.strip = 0 - - this._fst = fstream.Writer(opts) - - this.pause() - var me = this - - // Hardlinks in tarballs are relative to the root - // of the tarball. So, they need to be resolved against - // the target directory in order to be created properly. - me.on("entry", function (entry) { - // if there's a "strip" argument, then strip off that many - // path components. - if (opts.strip) { - var p = entry.path.split("/").slice(opts.strip).join("/") - entry.path = entry.props.path = p - if (entry.linkpath) { - var lp = entry.linkpath.split("/").slice(opts.strip).join("/") - entry.linkpath = entry.props.linkpath = lp - } - } - if (entry.type === "Link") { - entry.linkpath = entry.props.linkpath = - path.join(opts.path, path.join("/", entry.props.linkpath)) - } - - if (entry.type === "SymbolicLink") { - var dn = path.dirname(entry.path) || "" - var linkpath = entry.props.linkpath - var target = path.resolve(opts.path, dn, linkpath) - if (target.indexOf(opts.path) !== 0) { - linkpath = path.join(opts.path, path.join("/", linkpath)) - } - entry.linkpath = entry.props.linkpath = linkpath - } - }) - - this._fst.on("ready", function () { - me.pipe(me._fst, { end: false }) - me.resume() - }) - - this._fst.on('error', function(err) { - me.emit('error', err) - }) - - this._fst.on('drain', function() { - me.emit('drain') - }) - - // this._fst.on("end", function () { - // console.error("\nEEEE Extract End", me._fst.path) - // }) - - this._fst.on("close", function () { - // console.error("\nEEEE Extract End", me._fst.path) - me.emit("finish") - me.emit("end") - me.emit("close") - }) -} - -inherits(Extract, tar.Parse) - -Extract.prototype._streamEnd = function () { - var me = this - if (!me._ended || me._entry) me.error("unexpected eof") - me._fst.end() - // my .end() is coming later. -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js deleted file mode 100644 index 0bfc7b80aa7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/global-header-writer.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = GlobalHeaderWriter - -var ExtendedHeaderWriter = require("./extended-header-writer.js") - , inherits = require("inherits") - -inherits(GlobalHeaderWriter, ExtendedHeaderWriter) - -function GlobalHeaderWriter (props) { - if (!(this instanceof GlobalHeaderWriter)) { - return new GlobalHeaderWriter(props) - } - ExtendedHeaderWriter.call(this, props) - this.props.type = "g" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js deleted file mode 100644 index 05b237c0c7b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/header.js +++ /dev/null @@ -1,385 +0,0 @@ -// parse a 512-byte header block to a data object, or vice-versa -// If the data won't fit nicely in a simple header, then generate -// the appropriate extended header file, and return that. - -module.exports = TarHeader - -var tar = require("../tar.js") - , fields = tar.fields - , fieldOffs = tar.fieldOffs - , fieldEnds = tar.fieldEnds - , fieldSize = tar.fieldSize - , numeric = tar.numeric - , assert = require("assert").ok - , space = " ".charCodeAt(0) - , slash = "/".charCodeAt(0) - , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null - -function TarHeader (block) { - if (!(this instanceof TarHeader)) return new TarHeader(block) - if (block) this.decode(block) -} - -TarHeader.prototype = - { decode : decode - , encode: encode - , calcSum: calcSum - , checkSum: checkSum - } - -TarHeader.parseNumeric = parseNumeric -TarHeader.encode = encode -TarHeader.decode = decode - -// note that this will only do the normal ustar header, not any kind -// of extended posix header file. If something doesn't fit comfortably, -// then it will set obj.needExtended = true, and set the block to -// the closest approximation. -function encode (obj) { - if (!obj && !(this instanceof TarHeader)) throw new Error( - "encode must be called on a TarHeader, or supplied an object") - - obj = obj || this - var block = obj.block = new Buffer(512) - - // if the object has a "prefix", then that's actually an extension of - // the path field. - if (obj.prefix) { - // console.error("%% header encoding, got a prefix", obj.prefix) - obj.path = obj.prefix + "/" + obj.path - // console.error("%% header encoding, prefixed path", obj.path) - obj.prefix = "" - } - - obj.needExtended = false - - if (obj.mode) { - if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8) - obj.mode = obj.mode & 0777 - } - - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , off = fieldOffs[f] - , end = fieldEnds[f] - , ret - - switch (field) { - case "cksum": - // special, done below, after all the others - break - - case "prefix": - // special, this is an extension of the "path" field. - // console.error("%% header encoding, skip prefix later") - break - - case "type": - // convert from long name to a single char. - var type = obj.type || "0" - if (type.length > 1) { - type = tar.types[obj.type] - if (!type) type = "0" - } - writeText(block, off, end, type) - break - - case "path": - // uses the "prefix" field if > 100 bytes, but <= 255 - var pathLen = Buffer.byteLength(obj.path) - , pathFSize = fieldSize[fields.path] - , prefFSize = fieldSize[fields.prefix] - - // paths between 100 and 255 should use the prefix field. - // longer than 255 - if (pathLen > pathFSize && - pathLen <= pathFSize + prefFSize) { - // need to find a slash somewhere in the middle so that - // path and prefix both fit in their respective fields - var searchStart = pathLen - 1 - pathFSize - , searchEnd = prefFSize - , found = false - , pathBuf = new Buffer(obj.path) - - for ( var s = searchStart - ; (s <= searchEnd) - ; s ++ ) { - if (pathBuf[s] === slash || pathBuf[s] === bslash) { - found = s - break - } - } - - if (found !== false) { - prefix = pathBuf.slice(0, found).toString("utf8") - path = pathBuf.slice(found + 1).toString("utf8") - - ret = writeText(block, off, end, path) - off = fieldOffs[fields.prefix] - end = fieldEnds[fields.prefix] - // console.error("%% header writing prefix", off, end, prefix) - ret = writeText(block, off, end, prefix) || ret - break - } - } - - // paths less than 100 chars don't need a prefix - // and paths longer than 255 need an extended header and will fail - // on old implementations no matter what we do here. - // Null out the prefix, and fallthrough to default. - // console.error("%% header writing no prefix") - var poff = fieldOffs[fields.prefix] - , pend = fieldEnds[fields.prefix] - writeText(block, poff, pend, "") - // fallthrough - - // all other fields are numeric or text - default: - ret = numeric[field] - ? writeNumeric(block, off, end, obj[field]) - : writeText(block, off, end, obj[field] || "") - break - } - obj.needExtended = obj.needExtended || ret - } - - var off = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - writeNumeric(block, off, end, calcSum.call(this, block)) - - return block -} - -// if it's a negative number, or greater than will fit, -// then use write256. -var MAXNUM = { 12: 077777777777 - , 11: 07777777777 - , 8 : 07777777 - , 7 : 0777777 } -function writeNumeric (block, off, end, num) { - var writeLen = end - off - , maxNum = MAXNUM[writeLen] || 0 - - num = num || 0 - // console.error(" numeric", num) - - if (num instanceof Date || - Object.prototype.toString.call(num) === "[object Date]") { - num = num.getTime() / 1000 - } - - if (num > maxNum || num < 0) { - write256(block, off, end, num) - // need an extended header if negative or too big. - return true - } - - // god, tar is so annoying - // if the string is small enough, you should put a space - // between the octal string and the \0, but if it doesn't - // fit, then don't. - var numStr = Math.floor(num).toString(8) - if (num < MAXNUM[writeLen - 1]) numStr += " " - - // pad with "0" chars - if (numStr.length < writeLen) { - numStr = (new Array(writeLen - numStr.length).join("0")) + numStr - } - - if (numStr.length !== writeLen - 1) { - throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" + - "expected: "+writeLen) - } - block.write(numStr, off, writeLen, "utf8") - block[end - 1] = 0 -} - -function write256 (block, off, end, num) { - var buf = block.slice(off, end) - var positive = num >= 0 - buf[0] = positive ? 0x80 : 0xFF - - // get the number as a base-256 tuple - if (!positive) num *= -1 - var tuple = [] - do { - var n = num % 256 - tuple.push(n) - num = (num - n) / 256 - } while (num) - - var bytes = tuple.length - - var fill = buf.length - bytes - for (var i = 1; i < fill; i ++) { - buf[i] = positive ? 0 : 0xFF - } - - // tuple is a base256 number, with [0] as the *least* significant byte - // if it's negative, then we need to flip all the bits once we hit the - // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's- - // complement is (0xFF - n). - var zero = true - for (i = bytes; i > 0; i --) { - var byte = tuple[bytes - i] - if (positive) buf[fill + i] = byte - else if (zero && byte === 0) buf[fill + i] = 0 - else if (zero) { - zero = false - buf[fill + i] = 0x100 - byte - } else buf[fill + i] = 0xFF - byte - } -} - -function writeText (block, off, end, str) { - // strings are written as utf8, then padded with \0 - var strLen = Buffer.byteLength(str) - , writeLen = Math.min(strLen, end - off) - // non-ascii fields need extended headers - // long fields get truncated - , needExtended = strLen !== str.length || strLen > writeLen - - // write the string, and null-pad - if (writeLen > 0) block.write(str, off, writeLen, "utf8") - for (var i = off + writeLen; i < end; i ++) block[i] = 0 - - return needExtended -} - -function calcSum (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - if (!block) throw new Error("Need block to checksum") - - // now figure out what it would be if the cksum was " " - var sum = 0 - , start = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - for (var i = 0; i < fieldOffs[fields.cksum]; i ++) { - sum += block[i] - } - - for (var i = start; i < end; i ++) { - sum += space - } - - for (var i = end; i < 512; i ++) { - sum += block[i] - } - - return sum -} - - -function checkSum (block) { - var sum = calcSum.call(this, block) - block = block || this.block - - var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum]) - cksum = parseNumeric(cksum) - - return cksum === sum -} - -function decode (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - this.block = block - this.cksumValid = this.checkSum() - - var prefix = null - - // slice off each field. - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = block.slice(fieldOffs[f], fieldEnds[f]) - - switch (field) { - case "ustar": - // if not ustar, then everything after that is just padding. - if (val.toString() !== "ustar\0") { - this.ustar = false - return - } else { - // console.error("ustar:", val, val.toString()) - this.ustar = val.toString() - } - break - - // prefix is special, since it might signal the xstar header - case "prefix": - var atime = parseNumeric(val.slice(131, 131 + 12)) - , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12)) - if ((val[130] === 0 || val[130] === space) && - typeof atime === "number" && - typeof ctime === "number" && - val[131 + 12] === space && - val[131 + 12 + 12] === space) { - this.atime = atime - this.ctime = ctime - val = val.slice(0, 130) - } - prefix = val.toString("utf8").replace(/\0+$/, "") - // console.error("%% header reading prefix", prefix) - break - - // all other fields are null-padding text - // or a number. - default: - if (numeric[field]) { - this[field] = parseNumeric(val) - } else { - this[field] = val.toString("utf8").replace(/\0+$/, "") - } - break - } - } - - // if we got a prefix, then prepend it to the path. - if (prefix) { - this.path = prefix + "/" + this.path - // console.error("%% header got a prefix", this.path) - } -} - -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return null - - // build up a base-256 tuple from the least sig to the highest - var zero = false - , tuple = [] - for (var i = buf.length - 1; i > 0; i --) { - var byte = buf[i] - if (positive) tuple.push(byte) - else if (zero && byte === 0) tuple.push(0) - else if (zero) { - zero = false - tuple.push(0x100 - byte) - } else tuple.push(0xFF - byte) - } - - for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) { - sum += tuple[i] * Math.pow(256, i) - } - - return positive ? sum : -1 * sum -} - -function parseNumeric (f) { - if (f[0] & 0x80) return parse256(f) - - var str = f.toString("utf8").split("\0")[0].trim() - , res = parseInt(str, 8) - - return isNaN(res) ? null : res -} - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js deleted file mode 100644 index 5a3bb95a121..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/pack.js +++ /dev/null @@ -1,236 +0,0 @@ -// pipe in an fstream, and it'll make a tarball. -// key-value pair argument is global extended header props. - -module.exports = Pack - -var EntryWriter = require("./entry-writer.js") - , Stream = require("stream").Stream - , path = require("path") - , inherits = require("inherits") - , GlobalHeaderWriter = require("./global-header-writer.js") - , collect = require("fstream").collect - , eof = new Buffer(512) - -for (var i = 0; i < 512; i ++) eof[i] = 0 - -inherits(Pack, Stream) - -function Pack (props) { - // console.error("-- p ctor") - var me = this - if (!(me instanceof Pack)) return new Pack(props) - - if (props) me._noProprietary = props.noProprietary - else me._noProprietary = false - - me._global = props - - me.readable = true - me.writable = true - me._buffer = [] - // console.error("-- -- set current to null in ctor") - me._currentEntry = null - me._processing = false - - me._pipeRoot = null - me.on("pipe", function (src) { - if (src.root === me._pipeRoot) return - me._pipeRoot = src - src.on("end", function () { - me._pipeRoot = null - }) - me.add(src) - }) -} - -Pack.prototype.addGlobal = function (props) { - // console.error("-- p addGlobal") - if (this._didGlobal) return - this._didGlobal = true - - var me = this - GlobalHeaderWriter(props) - .on("data", function (c) { - me.emit("data", c) - }) - .end() -} - -Pack.prototype.add = function (stream) { - if (this._global && !this._didGlobal) this.addGlobal(this._global) - - if (this._ended) return this.emit("error", new Error("add after end")) - - collect(stream) - this._buffer.push(stream) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -Pack.prototype.pause = function () { - this._paused = true - if (this._currentEntry) this._currentEntry.pause() - this.emit("pause") -} - -Pack.prototype.resume = function () { - this._paused = false - if (this._currentEntry) this._currentEntry.resume() - this.emit("resume") - this._process() -} - -Pack.prototype.end = function () { - this._ended = true - this._buffer.push(eof) - this._process() -} - -Pack.prototype._process = function () { - var me = this - if (me._paused || me._processing) { - return - } - - var entry = me._buffer.shift() - - if (!entry) { - if (me._needDrain) { - me.emit("drain") - } - return - } - - if (entry.ready === false) { - // console.error("-- entry is not ready", entry) - me._buffer.unshift(entry) - entry.on("ready", function () { - // console.error("-- -- ready!", entry) - me._process() - }) - return - } - - me._processing = true - - if (entry === eof) { - // need 2 ending null blocks. - me.emit("data", eof) - me.emit("data", eof) - me.emit("end") - me.emit("close") - return - } - - // Change the path to be relative to the root dir that was - // added to the tarball. - // - // XXX This should be more like how -C works, so you can - // explicitly set a root dir, and also explicitly set a pathname - // in the tarball to use. That way we can skip a lot of extra - // work when resolving symlinks for bundled dependencies in npm. - - var root = path.dirname((entry.root || entry).path); - if (me._global && me._global.fromBase && entry.root && entry.root.path) { - // user set 'fromBase: true' indicating tar root should be directory itself - root = entry.root.path; - } - - var wprops = {} - - Object.keys(entry.props || {}).forEach(function (k) { - wprops[k] = entry.props[k] - }) - - if (me._noProprietary) wprops.noProprietary = true - - wprops.path = path.relative(root, entry.path || '') - - // actually not a matter of opinion or taste. - if (process.platform === "win32") { - wprops.path = wprops.path.replace(/\\/g, "/") - } - - if (!wprops.type) - wprops.type = 'Directory' - - switch (wprops.type) { - // sockets not supported - case "Socket": - return - - case "Directory": - wprops.path += "/" - wprops.size = 0 - break - - case "Link": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(root, lp) || "." - wprops.size = 0 - break - - case "SymbolicLink": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "." - wprops.size = 0 - break - } - - // console.error("-- new writer", wprops) - // if (!wprops.type) { - // // console.error("-- no type?", entry.constructor.name, entry) - // } - - // console.error("-- -- set current to new writer", wprops.path) - var writer = me._currentEntry = EntryWriter(wprops) - - writer.parent = me - - // writer.on("end", function () { - // // console.error("-- -- writer end", writer.path) - // }) - - writer.on("data", function (c) { - me.emit("data", c) - }) - - writer.on("header", function () { - Buffer.prototype.toJSON = function () { - return this.toString().split(/\0/).join(".") - } - // console.error("-- -- writer header %j", writer.props) - if (writer.props.size === 0) nextEntry() - }) - writer.on("close", nextEntry) - - var ended = false - function nextEntry () { - if (ended) return - ended = true - - // console.error("-- -- writer close", writer.path) - // console.error("-- -- set current to null", wprops.path) - me._currentEntry = null - me._processing = false - me._process() - } - - writer.on("error", function (er) { - // console.error("-- -- writer error", writer.path) - me.emit("error", er) - }) - - // if it's the root, then there's no need to add its entries, - // or data, since they'll be added directly. - if (entry === me._pipeRoot) { - // console.error("-- is the root, don't auto-add") - writer.add = null - } - - entry.pipe(writer) -} - -Pack.prototype.destroy = function () {} -Pack.prototype.write = function () {} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js deleted file mode 100644 index 600ad782f0f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/lib/parse.js +++ /dev/null @@ -1,275 +0,0 @@ - -// A writable stream. -// It emits "entry" events, which provide a readable stream that has -// header info attached. - -module.exports = Parse.create = Parse - -var stream = require("stream") - , Stream = stream.Stream - , BlockStream = require("block-stream") - , tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , BufferEntry = require("./buffer-entry.js") - , ExtendedHeader = require("./extended-header.js") - , assert = require("assert").ok - , inherits = require("inherits") - , fstream = require("fstream") - -// reading a tar is a lot like reading a directory -// However, we're actually not going to run the ctor, -// since it does a stat and various other stuff. -// This inheritance gives us the pause/resume/pipe -// behavior that is desired. -inherits(Parse, fstream.Reader) - -function Parse () { - var me = this - if (!(me instanceof Parse)) return new Parse() - - // doesn't apply fstream.Reader ctor? - // no, becasue we don't want to stat/etc, we just - // want to get the entry/add logic from .pipe() - Stream.apply(me) - - me.writable = true - me.readable = true - me._stream = new BlockStream(512) - me.position = 0 - me._ended = false - - me._stream.on("error", function (e) { - me.emit("error", e) - }) - - me._stream.on("data", function (c) { - me._process(c) - }) - - me._stream.on("end", function () { - me._streamEnd() - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) -} - -// overridden in Extract class, since it needs to -// wait for its DirWriter part to finish before -// emitting "end" -Parse.prototype._streamEnd = function () { - var me = this - if (!me._ended || me._entry) me.error("unexpected eof") - me.emit("end") -} - -// a tar reader is actually a filter, not just a readable stream. -// So, you should pipe a tarball stream into it, and it needs these -// write/end methods to do that. -Parse.prototype.write = function (c) { - if (this._ended) { - // gnutar puts a LOT of nulls at the end. - // you can keep writing these things forever. - // Just ignore them. - for (var i = 0, l = c.length; i > l; i ++) { - if (c[i] !== 0) return this.error("write() after end()") - } - return - } - return this._stream.write(c) -} - -Parse.prototype.end = function (c) { - this._ended = true - return this._stream.end(c) -} - -// don't need to do anything, since we're just -// proxying the data up from the _stream. -// Just need to override the parent's "Not Implemented" -// error-thrower. -Parse.prototype._read = function () {} - -Parse.prototype._process = function (c) { - assert(c && c.length === 512, "block size should be 512") - - // one of three cases. - // 1. A new header - // 2. A part of a file/extended header - // 3. One of two or more EOF null blocks - - if (this._entry) { - var entry = this._entry - if(!entry._abort) entry.write(c) - else { - entry._remaining -= c.length - if(entry._remaining < 0) entry._remaining = 0 - } - if (entry._remaining === 0) { - entry.end() - this._entry = null - } - } else { - // either zeroes or a header - var zero = true - for (var i = 0; i < 512 && zero; i ++) { - zero = c[i] === 0 - } - - // eof is *at least* 2 blocks of nulls, and then the end of the - // file. you can put blocks of nulls between entries anywhere, - // so appending one tarball to another is technically valid. - // ending without the eof null blocks is not allowed, however. - if (zero) { - if (this._eofStarted) - this._ended = true - this._eofStarted = true - } else { - this._eofStarted = false - this._startEntry(c) - } - } - - this.position += 512 -} - -// take a header chunk, start the right kind of entry. -Parse.prototype._startEntry = function (c) { - var header = new TarHeader(c) - , self = this - , entry - , ev - , EntryType - , onend - , meta = false - - if (null === header.size || !header.cksumValid) { - var e = new Error("invalid tar file") - e.header = header - e.tar_file_offset = this.position - e.tar_block = this.position / 512 - return this.emit("error", e) - } - - switch (tar.types[header.type]) { - case "File": - case "OldFile": - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - case "ContiguousFile": - case "GNUDumpDir": - // start a file. - // pass in any extended headers - // These ones consumers are typically most interested in. - EntryType = Entry - ev = "entry" - break - - case "GlobalExtendedHeader": - // extended headers that apply to the rest of the tarball - EntryType = ExtendedHeader - onend = function () { - self._global = self._global || {} - Object.keys(entry.fields).forEach(function (k) { - self._global[k] = entry.fields[k] - }) - } - ev = "globalExtendedHeader" - meta = true - break - - case "ExtendedHeader": - case "OldExtendedHeader": - // extended headers that apply to the next entry - EntryType = ExtendedHeader - onend = function () { - self._extended = entry.fields - } - ev = "extendedHeader" - meta = true - break - - case "NextFileHasLongLinkpath": - // set linkpath= in extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.linkpath = entry.body - } - ev = "longLinkpath" - meta = true - break - - case "NextFileHasLongPath": - case "OldGnuLongPath": - // set path= in file-extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.path = entry.body - } - ev = "longPath" - meta = true - break - - default: - // all the rest we skip, but still set the _entry - // member, so that we can skip over their data appropriately. - // emit an event to say that this is an ignored entry type? - EntryType = Entry - ev = "ignoredEntry" - break - } - - var global, extended - if (meta) { - global = extended = null - } else { - var global = this._global - var extended = this._extended - - // extendedHeader only applies to one entry, so once we start - // an entry, it's over. - this._extended = null - } - entry = new EntryType(header, extended, global) - entry.meta = meta - - // only proxy data events of normal files. - if (!meta) { - entry.on("data", function (c) { - me.emit("data", c) - }) - } - - if (onend) entry.on("end", onend) - - this._entry = entry - var me = this - - entry.on("pause", function () { - me.pause() - }) - - entry.on("resume", function () { - me.resume() - }) - - if (this.listeners("*").length) { - this.emit("*", ev, entry) - } - - this.emit(ev, entry) - - // Zero-byte entry. End immediately. - if (entry.props.size === 0) { - entry.end() - this._entry = null - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json deleted file mode 100644 index efce1c64cb5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "tar@~2.2.0", - "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp" - ] - ], - "_from": "tar@>=2.2.0 <2.3.0", - "_id": "tar@2.2.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/tar", - "_nodeVersion": "2.2.2", - "_npmUser": { - "email": "kat@sykosomatic.org", - "name": "zkat" - }, - "_npmVersion": "2.14.3", - "_phantomChildren": {}, - "_requested": { - "name": "tar", - "raw": "tar@~2.2.0", - "rawSpec": "~2.2.0", - "scope": null, - "spec": ">=2.2.0 <2.3.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/node-pre-gyp", - "/fsevents/tar-pack" - ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", - "_shrinkwrap": null, - "_spec": "tar@~2.2.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-tar/issues" - }, - "dependencies": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - }, - "description": "tar for node", - "devDependencies": { - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "rimraf": "1.x", - "tap": "0.x" - }, - "directories": {}, - "dist": { - "shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", - "tarball": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" - }, - "gitHead": "52237e39d2eb68d22a32d9a98f1d762189fe6a3d", - "homepage": "https://github.com/isaacs/node-tar#readme", - "license": "ISC", - "main": "tar.js", - "maintainers": [ - { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" - }, - { - "email": "soldair@gmail.com", - "name": "soldair" - }, - { - "email": "kat@sykosomatic.org", - "name": "zkat" - } - ], - "name": "tar", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-tar.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "2.2.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js deleted file mode 100644 index a81298b9a0b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/tar.js +++ /dev/null @@ -1,173 +0,0 @@ -// field paths that every tar file must have. -// header is padded to 512 bytes. -var f = 0 - , fields = {} - , path = fields.path = f++ - , mode = fields.mode = f++ - , uid = fields.uid = f++ - , gid = fields.gid = f++ - , size = fields.size = f++ - , mtime = fields.mtime = f++ - , cksum = fields.cksum = f++ - , type = fields.type = f++ - , linkpath = fields.linkpath = f++ - , headerSize = 512 - , blockSize = 512 - , fieldSize = [] - -fieldSize[path] = 100 -fieldSize[mode] = 8 -fieldSize[uid] = 8 -fieldSize[gid] = 8 -fieldSize[size] = 12 -fieldSize[mtime] = 12 -fieldSize[cksum] = 8 -fieldSize[type] = 1 -fieldSize[linkpath] = 100 - -// "ustar\0" may introduce another bunch of headers. -// these are optional, and will be nulled out if not present. - -var ustar = fields.ustar = f++ - , ustarver = fields.ustarver = f++ - , uname = fields.uname = f++ - , gname = fields.gname = f++ - , devmaj = fields.devmaj = f++ - , devmin = fields.devmin = f++ - , prefix = fields.prefix = f++ - , fill = fields.fill = f++ - -// terminate fields. -fields[f] = null - -fieldSize[ustar] = 6 -fieldSize[ustarver] = 2 -fieldSize[uname] = 32 -fieldSize[gname] = 32 -fieldSize[devmaj] = 8 -fieldSize[devmin] = 8 -fieldSize[prefix] = 155 -fieldSize[fill] = 12 - -// nb: prefix field may in fact be 130 bytes of prefix, -// a null char, 12 bytes for atime, 12 bytes for ctime. -// -// To recognize this format: -// 1. prefix[130] === ' ' or '\0' -// 2. atime and ctime are octal numeric values -// 3. atime and ctime have ' ' in their last byte - -var fieldEnds = {} - , fieldOffs = {} - , fe = 0 -for (var i = 0; i < f; i ++) { - fieldOffs[i] = fe - fieldEnds[i] = (fe += fieldSize[i]) -} - -// build a translation table of field paths. -Object.keys(fields).forEach(function (f) { - if (fields[f] !== null) fields[fields[f]] = f -}) - -// different values of the 'type' field -// paths match the values of Stats.isX() functions, where appropriate -var types = - { 0: "File" - , "\0": "OldFile" // like 0 - , "": "OldFile" - , 1: "Link" - , 2: "SymbolicLink" - , 3: "CharacterDevice" - , 4: "BlockDevice" - , 5: "Directory" - , 6: "FIFO" - , 7: "ContiguousFile" // like 0 - // posix headers - , g: "GlobalExtendedHeader" // k=v for the rest of the archive - , x: "ExtendedHeader" // k=v for the next file - // vendor-specific stuff - , A: "SolarisACL" // skip - , D: "GNUDumpDir" // like 5, but with data, which should be skipped - , I: "Inode" // metadata only, skip - , K: "NextFileHasLongLinkpath" // data = link path of next file - , L: "NextFileHasLongPath" // data = path of next file - , M: "ContinuationFile" // skip - , N: "OldGnuLongPath" // like L - , S: "SparseFile" // skip - , V: "TapeVolumeHeader" // skip - , X: "OldExtendedHeader" // like x - } - -Object.keys(types).forEach(function (t) { - types[types[t]] = types[types[t]] || t -}) - -// values for the mode field -var modes = - { suid: 04000 // set uid on extraction - , sgid: 02000 // set gid on extraction - , svtx: 01000 // set restricted deletion flag on dirs on extraction - , uread: 0400 - , uwrite: 0200 - , uexec: 0100 - , gread: 040 - , gwrite: 020 - , gexec: 010 - , oread: 4 - , owrite: 2 - , oexec: 1 - , all: 07777 - } - -var numeric = - { mode: true - , uid: true - , gid: true - , size: true - , mtime: true - , devmaj: true - , devmin: true - , cksum: true - , atime: true - , ctime: true - , dev: true - , ino: true - , nlink: true - } - -Object.keys(modes).forEach(function (t) { - modes[modes[t]] = modes[modes[t]] || t -}) - -var knownExtended = - { atime: true - , charset: true - , comment: true - , ctime: true - , gid: true - , gname: true - , linkpath: true - , mtime: true - , path: true - , realtime: true - , security: true - , size: true - , uid: true - , uname: true } - - -exports.fields = fields -exports.fieldSize = fieldSize -exports.fieldOffs = fieldOffs -exports.fieldEnds = fieldEnds -exports.types = types -exports.modes = modes -exports.numeric = numeric -exports.headerSize = headerSize -exports.blockSize = blockSize -exports.knownExtended = knownExtended - -exports.Pack = require("./lib/pack.js") -exports.Parse = require("./lib/parse.js") -exports.Extract = require("./lib/extract.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js deleted file mode 100644 index 1524ff7af05..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/00-setup-fixtures.js +++ /dev/null @@ -1,53 +0,0 @@ -// the fixtures have some weird stuff that is painful -// to include directly in the repo for various reasons. -// -// So, unpack the fixtures with the system tar first. -// -// This means, of course, that it'll only work if you -// already have a tar implementation, and some of them -// will not properly unpack the fixtures anyway. -// -// But, since usually those tests will fail on Windows -// and other systems with less capable filesystems anyway, -// at least this way we don't cause inconveniences by -// merely cloning the repo or installing the package. - -var tap = require("tap") -, child_process = require("child_process") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) - -test("extract fixtures", function (t) { - var c = child_process.spawn("tar" - ,["xzvf", "fixtures.tgz"] - ,{ cwd: __dirname }) - - c.stdout.on("data", errwrite) - c.stderr.on("data", errwrite) - function errwrite (chunk) { - process.stderr.write(chunk) - } - - c.on("exit", function (code) { - t.equal(code, 0, "extract fixtures should exit with 0") - if (code) { - t.comment("Note, all tests from here on out will fail because of this.") - } - t.end() - }) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/cb-never-called-1.0.1.tgz b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/cb-never-called-1.0.1.tgz deleted file mode 100644 index 9e7014d85abe48a54cb6b4e1ec032df9a2073034..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4096 zcmV+b5dZHViwFP!000001MOI6Sd-h91_Y5NO{$a-kt&eT2}P;Wl@<^X2_bX>Bta4B zh*T+|m(YrHJ$@AVon$2K1bnGjnI=&)j>@+~+y(pY`qa?su)7oxJON zp18u`jxbwz}afxwcd{NMW^{~g@X7#QmGDF4?wzdj4#-{Zds9+3k8KqSl=0fYd6a4R7s;ywZ; z1cx~}A*_Md&dAd>+TI0u#)E}H!r)(7YXlmOvUkP&#{5b;!|Z>q?2*<8kJF#huk5dl z=u_gX*=YiUKx59fA>ei{0CS)!3gv==0FW+#GXj8iMZoQC>=D-HKmZR90O4Ve0f2$0 zO7EZ5VD1<@7u0|Bbh3vdkm#Ss*Dz29l6#Z?*;o26h2MNHa(4Bn-`GE-$C>{nCI3hN zONfJh_rHXsn55{b|3y!q{__7n1NUJl!08151prE$InmxD|dP>VO0+d3I@mgOu8WXfCwZ8^$>UsU~^jIY!>k$ z_#csz!CjDO7bk?UlZ!1MP*vAZ{|*Fr4I%6b!`Pkn@cvzUHh2D$7WFsc(>Pp<* zcMDHUmM`*lommz%IhEqIpfC(=?vs+JU}a`0(8(cZ#l?4UNw^kaK7i7>l&;d3kbSUc z5W{Go@P?7%HAZH~5~c3xN(v5b(G($OtjFj=^vA~TMW6C0!h!JPICEtnsZ6Wk>+-4?xyI*FY5P*X7b18* zQ#;)wb!KCta{=d#O`e1}nLA{Bz1-#8=O3ZjB$@bOMLE^qS1N+M{DYsVde<-Ax~PI-9sxr3cjUIH?G_6g(t%feuXw9=AAUxMz3LTVO`c!x z-iK8l+1Ea?1$Wfgc+0XLF6wk8{@~z1deC>fmDu@4>z_50m}cVFp60T@BtE9^ zfLC2p<{wc@E=|>fqTKrK&iDqRt|E7RVi|W1sI{d;%2R@=n@UQyDr(1$H)e+0S28sF zj3@-0|uGPWd$n3h~PH2NKF@Iz64wvvwt7qD#B9 zL;y087W(|OBp+r4J||c&>IA&o@^tRJl~|CyVsKA6E%55ZgHHv?)N=PqL;~#3HxH7N z%g0mSV%s4Rmtr`E(U{7xO&xq(Ki_KQaemjmzNp6jP5PBrV;c4*lr37?eL+8hTy3pF zgu}X^WYUcErNvyjGsvM)^^nd>wt|^~DZR-vJI3yUsOD6SDcBN#4lfTN{Albmt-Ep; zu2L>OHxl^DXwhbweyPlTTQ#7NW*XJyvcw#f(NNWay0oB`JTEvD)n408ADCBm7->Ed z$BtC$t>ta+@!)TnVO1-p}HQbjOFzFcaR@JepTP4?y_@6wC8ULj@kUBM2wb^(mdCpGI^ zyYScO5bw6=gbT{^Q}bp}yLDM#(1idUtkhn^r`{mLXadG7C*Zs%tZnna^>8Bd>%2%L zrE5#_Bl1ERR|q~N*XuYAKGuIImui6<0I@k?@!(s`*e6Td+@VJGx1cW6hb0FMdux5S zwCmD2FHDjj-kr&jZr#`HY)x4koye0E{dQd|7u)73CLqK#$Q`vCP-)ioKt>~lzg6$) zqrR{PkJ6{v<-_iEJnCW|DJHNwh>Otz(~WxvejNmw`{R7y2OxTG&cK~ZR%##>T4usq zZo;Ls+mrkFrF_|pxCJwJBJ4#-yzmauIvYgatKC$$f1Eo=)h?(rHgsx^lgEvId)bV9 z32wVg|Bi5`+``1ow}-l~E-MWvRqP-P!IJS%3XO^nJ;smQWi$8Zy|YUtq|i6Wd=F(h zZ!*C;faYZA?@;uyJHgt)uyg58OTIEMw5*V=#dlA1TgwqITi#xvFbD+`UYW#g>EPVn zMbjp1`bqoqaGi7?yw&!Vmyn8-8SkapO%pZ9CxxGgEo;=gBPl*cgmZDVBt8Eoam{-y z)oskabX+^4=US=$3zTy=MKkC~dIZ0H2@(`s7)X6*8g@@u(<1#zyl5<&)9vUQ7UMUf zbLK@OjL>H5>5}#t1egUoD+)`Q@8G4e6O*WD7I0> z+U0SSp%YPwkxaVG5zLYHeALwZW^7>Z!sz&de!0I?oJ+4&3T>lyNT6Joi}(f^^-G#> zKna44%!2d#9U=-fu5?8gt_s;TOgk|~e=M z(haQdGr5=iTH8)nZXH;?u09#Rz+BrXZCbX1J_FzZ&qAQk9c)lKpP_OPIw=^k(M^Gp*dN^34MCzJl$h3Ui?QeGHsaDBf>&F zqwOuqj`uz9``CKo1H*CUef*-$lqTa6g}S-qAwocs+buTNG{q4LW!zdhZgnFu=iW@$#^D zf0!8E&1jN3HHCmZht^t6Q-p~0<_c{(bLj{Xt5i1hdRGraD|^yyDcY4!d-o$4l02VE z&+arc1Yff^@DZkNrO)5*jC&(eiO!G7h}0e!#Om+Qbf#XE?uQKfdXXd!NvX90NzW5; zt0SHXPbjk2s*xuh7Gn=nL@SaPm8ttxo;2z(tVa^e5jIi1!uc^cy}rw0Q*RMCuh3JnYF?qDv`?-IL0QE&DEbmYE~jLk>}h4zB57 z;6oAJH5tLx?sA+!XARU`KFDFukndYzpGW#J_Qi*UiSH8(tD0#Wrs>09LpoR{^L1ID zMPm&z6|Y@Q^-Z9FJZwD-W&e_C!5(&}l!&3t3|pI<_Bmbdt145s!Jsv>o(=t0QI7v+ zGnB)5``uQH%0Vr)a+OoQUfv?pORr*xjAvv5OmwCT+}s%9aG%X%s?T~S!@M{xw@kVb zZgt7*U1xOCXa6LlnDf@|LOEtnY zzEqI5I?^(M0wbC{FSeDM2-nc-o1E;!9@>}mJ~k4_5%AW2OFy2J5?aC!ba|GrUzh(P zH;-Q}UT$e?iP2ahx_SRHUmJWzK~H0=sYo(Sv;CoFNKS0`?pnw}6L2@0kuoY~0C3b+ z_k!U@)uxiwmc=_>0=RarSRrwE57V$m7v)j9VoIa}Zbcd7XOT_%a<|WLoHcHNG0?yM z0&xIkXbv*X;f<&-J~D0ktzl=)Yh^sN#>=}bAWq2yb+@UUp2fJT!Ms(AOcv7K{%ni+$8 zz$=z&nRh69i)q$1V{6|q#WA)wJ;}m$P;M~_q`Ws!oTG@tIASTaFohN0jW(4Wys~dW zv&H&%2xFyaB|l$KkInQmtnQ4u`O#-zba;D>Vp=+{xYhDo1^<}hIhg?y&L$wKx5*C{ zr4WXy0_Fj9J&8~<%+@{Iv0Z*4CAy*GNz-&=oj>&+=tc898+nvWmPMdINsE-cTouy4 zrK^}eind7L7z`S$TTlVooa}3NM2i-<(%k1T#!a(%EAXdr^|qP}<;il0R}=Hj2KoC1 zh^$(!w~U(47zn-L%(^TYAW-!HoVUq_!kOEjr1Q#9Y^;WS*xbU2i}zF3R?hPoDqT2M z^F~d2X;*s_sL%kd;)BWDdAPRxOXp@M_rHu-J&Q;Rs+i|c66vVN-lcvKrVz805jc+O z!f2?HlA-C?r?f5BwAZHUjm4-Eld?r|f~HYf>-`IYq4Uo4oTMeT)ZwV8sl#gA_q{Tz znWptaRUdk8Q?>g;VAAoh4TtOif7Nyp4(E%<#;@gbrTlQR`GRJ!F2!+j$9a|u>aS%8 zkNlwTdaGySDF-|K<}yunncD&gsvRKudg_NN+cm@R>WQpYsvyRGeRvo}&)Y$ZS2TTV z!?DaM#u?#pYqR<(OWy0Pt-|^RR?9I;uO5NIZrtvT&4dsS%kPtw}<6))- yt=kRJt4#0W>hFnshu(4QecAmmIH4odAf{v@=5VI8kvw%kgq3P?0(H++;E@y9-yRnL diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js deleted file mode 100644 index 9719c42f354..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.js +++ /dev/null @@ -1,177 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var fs = require('fs') -var path = require('path') - -var fstream = require('fstream') -var test = require('tap').test - -var tar = require('../tar.js') -var file = path.resolve(__dirname, 'dir-normalization.tar') -var target = path.resolve(__dirname, 'tmp/dir-normalization-test') -var ee = 0 - -var expectEntries = [ - { path: 'fixtures/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/a/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/the-chumbler', - mode: '755', - type: '2', - linkpath: path.resolve(target, 'a/b/c/d/the-chumbler'), - }, - { path: 'fixtures/a/b/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/a/x', - mode: '644', - type: '0', - linkpath: '' - }, - { path: 'fixtures/a/b/c/', - mode: '755', - type: '5', - linkpath: '' - }, - { path: 'fixtures/a/b/c/y', - mode: '755', - type: '2', - linkpath: '../../x', - } -] - -var ef = 0 -var expectFiles = [ - { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined - }, - { path: '/fixtures', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined - }, - { path: '/fixtures/a', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined - }, - { path: '/fixtures/a/b', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined - }, - { path: '/fixtures/a/b/c', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined - }, - { path: '/fixtures/a/b/c/y', - mode: '120755', - type: 'SymbolicLink', - depth: 5, - linkpath: '../../x' - }, - { path: '/fixtures/a/x', - mode: '100644', - type: 'File', - depth: 3, - linkpath: undefined - }, - { path: '/fixtures/the-chumbler', - mode: '120755', - type: 'SymbolicLink', - depth: 2, - linkpath: path.resolve(target, 'a/b/c/d/the-chumbler') - } -] - -test('preclean', function (t) { - require('rimraf').sync(path.join(__dirname, '/tmp/dir-normalization-test')) - t.pass('cleaned!') - t.end() -}) - -test('extract test', function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - inp.pipe(extract) - - extract.on('end', function () { - t.equal(ee, expectEntries.length, 'should see ' + expectEntries.length + ' entries') - - // should get no more entries after end - extract.removeAllListeners('entry') - extract.on('entry', function (e) { - t.fail('Should not get entries after end!') - }) - - next() - }) - - extract.on('entry', function (entry) { - var mode = entry.props.mode & (~parseInt('22', 8)) - var found = { - path: entry.path, - mode: mode.toString(8), - type: entry.props.type, - linkpath: entry.props.linkpath, - } - - var wanted = expectEntries[ee++] - t.equivalent(found, wanted, 'tar entry ' + ee + ' ' + (wanted && wanted.path)) - }) - - function next () { - var r = fstream.Reader({ - path: target, - type: 'Directory', - sort: 'alpha' - }) - - r.on('ready', function () { - foundEntry(r) - }) - - r.on('end', finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var mode = entry.props.mode & (~parseInt('22', 8)) - var found = { - path: p, - mode: mode.toString(8), - type: entry.props.type, - depth: entry.props.depth, - linkpath: entry.props.linkpath - } - - var wanted = expectFiles[ef++] - t.equivalent(found, wanted, 'unpacked file ' + ef + ' ' + (wanted && wanted.path)) - - entry.on('entry', foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, 'should have ' + ef + ' items') - t.end() - } - } -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.tar b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/dir-normalization.tar deleted file mode 100644 index 3c4845356cecb20939b415830a5fa9717fb91341..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4608 zcmeHJS&qUm4DC^J0f_Cy&3Qtn6-dKR7m2w&PN6j7t4Me>Xkt~0n?~MVp55+r8K=G- zY^5gv5SUE`972tqikXFmnFvea&It?*4!@B>h$+50` z-pt$IGqpQZU1J+8}SF0 zCIB7{5IUmDkd5|W8~bGygDd>M_5W1rH{-sT+lc?%|G~}t525gXDWB^4;D59iEk}ZX z?bE#9F#qrUKRCf3v;xZQ7XGjNZ*)4qOZ=A~MLp$ne2HwSHsX(c~XH?({YrM8z diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js deleted file mode 100644 index e484920fd96..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/error-on-broken.js +++ /dev/null @@ -1,33 +0,0 @@ -var fs = require('fs') -var path = require('path') -var zlib = require('zlib') - -var tap = require('tap') - -var tar = require('../tar.js') - -var file = path.join(__dirname, 'cb-never-called-1.0.1.tgz') -var target = path.join(__dirname, 'tmp/extract-test') - -tap.test('preclean', function (t) { - require('rimraf').sync(__dirname + '/tmp/extract-test') - t.pass('cleaned!') - t.end() -}) - -tap.test('extract test', function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - inp.pipe(zlib.createGunzip()).pipe(extract) - - extract.on('error', function (er) { - t.equal(er.message, 'unexpected eof', 'error noticed') - t.end() - }) - - extract.on('end', function () { - t.fail('shouldn\'t reach this point due to errors') - t.end() - }) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js deleted file mode 100644 index 45400cd9bb8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract-move.js +++ /dev/null @@ -1,132 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , gfs = require("graceful-fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/dir.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - , rimraf = require("rimraf") - , mkdirp = require("mkdirp") - - , ee = 0 - , expectEntries = [ - { - "path" : "dir/", - "mode" : "750", - "type" : "5", - "depth" : undefined, - "size" : 0, - "linkpath" : "", - "nlink" : undefined, - "dev" : undefined, - "ino" : undefined - }, - { - "path" : "dir/sub/", - "mode" : "750", - "type" : "5", - "depth" : undefined, - "size" : 0, - "linkpath" : "", - "nlink" : undefined, - "dev" : undefined, - "ino" : undefined - } ] - -function slow (fs, method, t1, t2) { - var orig = fs[method] - if (!orig) return null - fs[method] = function () { - var args = [].slice.call(arguments) - console.error("slow", method, args[0]) - var cb = args.pop() - - setTimeout(function () { - orig.apply(fs, args.concat(function(er, data) { - setTimeout(function() { - cb(er, data) - }, t2) - })) - }, t1) - } -} - -// Make sure we get the graceful-fs that fstream is using. -var gfs2 -try { - gfs2 = require("fstream/node_modules/graceful-fs") -} catch (er) {} - -var slowMethods = ["chown", "chmod", "utimes", "lutimes"] -slowMethods.forEach(function (method) { - var t1 = 500 - var t2 = 0 - slow(fs, method, t1, t2) - slow(gfs, method, t1, t2) - if (gfs2) { - slow(gfs2, method, t1, t2) - } -}) - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("preclean", function (t) { - rimraf.sync(target) - /mkdirp.sync(target) - t.pass("cleaned!") - t.end() -}) - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - rimraf.sync(target) - - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - t.end() - }) - - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js deleted file mode 100644 index eca4e7cc962..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/extract.js +++ /dev/null @@ -1,367 +0,0 @@ -// Set the umask, so that it works the same everywhere. -process.umask(parseInt('22', 8)) - -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - - , ee = 0 - , expectEntries = -[ { path: 'c.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'cc.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 100, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51693379 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 201, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '777', - type: '2', - depth: undefined, - size: 0, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200-hard', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 2, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '1', - depth: undefined, - size: 0, - linkpath: path.resolve(target, '200-hard'), - nlink: 2, - dev: 234881026, - ino: 51681874 } ] - - , ef = 0 - , expectFiles = -[ { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined }, - { path: '/200-hard', - mode: '100644', - type: 'File', - depth: 1, - size: 200, - linkpath: undefined, - nlink: 2 }, - { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120777', - type: 'SymbolicLink', - depth: 1, - size: 200, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: 1 }, - { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'Link', - depth: 1, - size: 200, - linkpath: path.join(target, '200-hard'), - nlink: 2 }, - { path: '/c.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/cc.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/r', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined }, - { path: '/r/e', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined }, - { path: '/r/e/a', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined }, - { path: '/r/e/a/l', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined }, - { path: '/r/e/a/l/l', - mode: '40755', - type: 'Directory', - depth: 5, - linkpath: undefined }, - { path: '/r/e/a/l/l/y', - mode: '40755', - type: 'Directory', - depth: 6, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-', - mode: '40755', - type: 'Directory', - depth: 7, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d', - mode: '40755', - type: 'Directory', - depth: 8, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e', - mode: '40755', - type: 'Directory', - depth: 9, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e', - mode: '40755', - type: 'Directory', - depth: 10, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p', - mode: '40755', - type: 'Directory', - depth: 11, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-', - mode: '40755', - type: 'Directory', - depth: 12, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', - mode: '40755', - type: 'Directory', - depth: 13, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', - mode: '40755', - type: 'Directory', - depth: 14, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', - mode: '40755', - type: 'Directory', - depth: 15, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', - mode: '40755', - type: 'Directory', - depth: 16, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', - mode: '40755', - type: 'Directory', - depth: 17, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', - mode: '40755', - type: 'Directory', - depth: 18, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', - mode: '40755', - type: 'Directory', - depth: 19, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', - mode: '40755', - type: 'Directory', - depth: 20, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', - mode: '40755', - type: 'Directory', - depth: 21, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', - mode: '40755', - type: 'Directory', - depth: 22, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', - mode: '40755', - type: 'Directory', - depth: 23, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'File', - depth: 24, - size: 100, - linkpath: undefined, - nlink: 1 }, - { path: '/Ω.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 2, - linkpath: undefined, - nlink: 1 } ] - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("preclean", function (t) { - require("rimraf").sync(__dirname + "/tmp/extract-test") - t.pass("cleaned!") - t.end() -}) - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - next() - }) - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) - - function next () { - var r = fstream.Reader({ path: target - , type: "Directory" - // this is just to encourage consistency - , sort: "alpha" }) - - r.on("ready", function () { - foundEntry(r) - }) - - r.on("end", finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var found = - { path: p - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - } - - var wanted = expectFiles[ef ++] - - t.has(found, wanted, "unpacked file " + ef + " " + wanted.path) - - entry.on("entry", foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, "should have "+ef+" items") - t.end() - } - } -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/fixtures.tgz b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/fixtures.tgz deleted file mode 100644 index f1676023afa2bba2aa18b5508c92f03e1d0816c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19352 zcmdS9Wm8?>6E%oKa0>)?hoHgXLLj)iOK^9Wixb@4-2;JO!GpWILvVM$XZZb}7gIGe zUtnIH+O<#h+1^?)mpt7>+4-uRLlz3qxI~Dff#Gk#6 z`g-rTn_<`NkGgSqh`9%iyIO+RJMIEk@Q^cjEPzS$QFJLbkvahQFp1Gi?M1xtX z_d_3jPIjl>+%+o^H;key?OVfX3E8v2FgIk&q5@J)^5h?H8?w4%1l*k;@LW8A*KOPe z2m})_YIt^yV27?Sb9o}&8YLHw}wmBaI#s5;w$~1gL}Yl8$kSfR+T&Wf?T=;vdl4$nrcnE0Smw^kG$rI+igCu zLr{XYa&G{kKrnW&uV)Zm056SzBh^q4DFok3neK>2dnOF*v9)P(VIXSxruX3R_(6<} zOZDyM+Urp`x)%;WHfqw~UlV|((9x}_0fV6Gd7)s-8b8Iyj6dV=FE|k7SbKGn(HT^^ z)#XFd>jGa=?AGFLS4E*@QNW1Z$Q|ykv(g=BFX*Wsx?zg(0`LaBgj=IE_Wi($#wNW= zsOzqY_94)b9n`KM(7@!i*G@qTGS7a5nPO`&8Hxx?HJ_Gs!6KRIcU9CIXw9oVS zaHGn2ODfpk4(T4xmN)?#5wf70ksW$_I+pa)A=&N+ErhZ;zaOTE3v1zIS}$30$99_@ zb#iRJNa!r%r72#Uo2unZQ3}G@roGZvMz_6UPggT$oZ&9C#MNJTEnx0o>7^3(ga*-0 z&|(RQ5v%!l@f?}!_P4aUe|2XDn?Mi3*r3P46Qlh9V>}CRA zNt_D6UCg|6b#Tv={{aM$OtzmQ$i&Yf7iIx&i#I_l@h5^OhV5nYfI{AjKXEfz1ce5@z7!Ei78)mBhq_n%2+n=ux$t?fCf*hcr8^+}NV~}t0I|P;l~Dfy z!P1AX08Kyxu($y+Y>8+@)w&bh(9{}u_Nj(4Ujc>yYM_@la&?%B6_turyY$u2@C7Ki z>{{J++UgDrJ_)=BW)`g6JJY#8KLD>o53tw3D;snh2o7LH?m=^eY+@U^sAij6@eoCg zkH_?3)Vt4Z*h_A7gvEms*^r9@fY@H{SLyQhOQ~PLr_8c^m+W6 zlrdDj_DAr1kbw4f7X2lu)tdOTJ+eBX@l1;u?E88w$R9$A)^86lIoi1RR&Q1rArGd{eH6$HSpvF zphwMqYsS@TeAefy_J-C#%>?2!(}CsK(bvhQe_#uM6`q@?pN%Z91eOzx%h4)7d56K} z)Y>XP9eIg+MkFab6~VjxnM+BoY1%4Zx=r3HKSCDP%_@HsDh**J8G*6><~JvS-j5}W zzN>y}rrh9r%-$m-a*1~eCCjaY{4WI0Chrb*X9B!|^Ez45U3nMx9@%|hqVgKF`s-r!h3v08+ywa|;0oDPc?XrN()H-=WDK=y zYaai@>}TjqOax|hLM@tiXH#C5pD3I`W*?@g?R}KHX+&_+UXGkWX;7aZlAJxXSl*cx zS*GW$`UZnO^uK)BKz6l^dSx}sl1Qpa^#+1uSF~LmnY(|A(wN?|1xcWw5zz3P!XGbX!q*-V*b{#S=Ws@+bDjMqk5mR zjb|;MQs=`KY3kmnTUYzAgWsv)(G8PGVimd8_qS2d+csIGooYB7qs$E z8qKum8fe9z76`L9-#PvjK?QY-b|}l)`zd|C4?)Yy-$!6Y;d`A+A@xA{o}Vktxsgwy zoqqc4KkmMe6m5e2jhguA|+(eH*iS?hzyIMn+ z*2>F;9VRY<+KhECR6w;$kdWCzOCC^eK?4a7Uxwsj*i2qfYtIB9Ji+y%+tD{y;QP1e z`|!*1-wv?f5AXS?iz0#SV`herWGe_@YUeXDa_PUs2~Rq~;?TQPYo3Kf3i zz<-779Bf06Qb8L<@Y$qZ9>^Q%l>Ue4G>6=*i}+H@LkU9n%wtq2r4 z&#xwgbmf|^$iYsa7@p&r=mtL$WkG}?rn(krh*giCv#S|G{h4&`XCJoOfL<32oY8zO zQlQ29&yX7?JdBB2^7R5-gfm$|)W%Ck|I|qwjDe&U21RC{5t3J}t$P|NmVocL+8ZvX z@9;*5@cyf>rQ9^-5z1!?ZOk|`D=IEEySb!I_CoH@KUfDyXp$Gk+r;Rra`-! zj0UZ?_`V$-(;BbcvphCA{EylZO-QQovUdy|4w*%v^%Nm=LAB>D*I!)3##;t#V zcQ1#fZS3oy&zBIV+ORF3FXyeVT?^mfJ%lTndN~%rZbdF^7%edU-&fNIfy*>DMkS=5 zB2JS}KyEh((s@kEt3{)RqWQTnruDh&O#P7zMN=62AnH)=<3cv@ruC`+=v~dLMa^zo z%Sa1g^ap9J&UN(pNxev6GfRK3Kx;9=fZr_ixV z(x3w`A`sma*0_xyvpxGm3S4%GwwrjDz(NP{m-A>O{M5bxY7Pzaiyj2SuXY45KD`E| z!eE4+X$r+XeEdHucqp6>k^Cp#T$t&NHUI;>gt0=sE1&ED2uMo_%uEi!-|vGfHc@{01*RPWf;3OmcKDu@q4D`r~G_ z(cEfdB8)Dxe8|Rcw$&nDOk;}!Y+gW~kii^451AKm=;+x4SMvd&f3I;Fc=G>fCJHGY zv93XawV43cpe67!%BJw191>o~x=y17u+AJ`0N-_20YniO;WGecsI%O=*cuEYTNie# z)1u!4c5u7z{(%;Nh{C2QfCXNI1x);os8>UWsq3y)G6$A&v^7Xv2j5j5l!KIP5H-cq zh2#bm)_D|wCx&uy_%g7I zhQO3;_N&K#5-&8U3GnvX;2+0JbarZeLmcoY-vt@N#Pv-;bSZ7^BaMZHWf6}{AIHbh zrg}Px@lB<@8%BSEaa-=tE+27*iMCAsoaCGXVZdb&_Ul5p2ej^zzZOq-5!>U1tbIo( z%H{qV6h^G^=)*3(+=_v~wQl;y|9YjlvvG?FVRnAF zx-snu-~?f$))jXqriYcbVp;Lai=f z7LWwI%QDBh-25|8bwe;s6!)8egGnwV?GC_ZjizE1c_TyYYy+$qE|o_7|EJmKo7;AG|CH~k3w3D?x9E0F z3KI8Ac*p&BPG3Zxxbzx&kO7^nM^H6MWAo~CbWI!?x_!>;g-Ky^%Ijv>rl8D&<}ko+ ze8>LO)zPs7y@`dSoEow>+JpZ~@!z;KL@Q%HAB? z?p;$|4`WPDlLU^H;3-~PzR?twcq6r^GPayPVaXZ$5P@VzCtq7SNSZ`Cc~VsD;f+V> zOHgm8(cKe^_Z*r}tA1;a;}YuSPG$y=-cZ0R3-J1qy@k-WBn9{O5N}cx2lw^#^7FRy z#udOhocCr;-VyfG&bsQU~7jK=$3BDXX#V z5|YBb^8=U__EqasEAjr`GGkhAyP)o#v)+}CZOW)}8{VqNcL-u&zmwmGn@2K8;KI=-m!&T{tS+)ga26y*a5X?0&iWY?>yGgvkxeHcLrci?Y$}zH1+|a zNVc1$H+j;h=U^S=z2`+mk-33|yeD9{a zci$n8{f>Xx%33GVpxAqN1`_N&_y=%wFN06eKoby*W$>@GzII^u7Em#|hhS7f?qi!( zzaXv%i2AC#bSt`l_3X)j1u?(!zJO?faD&x(us$;H+eLREEaJ%reu#jKfFYeW`|_U` zZb3m@vdLQD5HaCG(iC`+zLo0p*i7NCZiOtKfDF3-%C_u04?^$z(SBF~N07DM86q6s z85)rr<-U=5sskV^#Ls{W1JsEKq^mSohn)PnsmRm9Vvq+GTC|-+Li)D}@9QU|fKZ#> z89U7#DC4<%_a>puerSK*^6HnbD=nP>S)=~j=3c-JutPA}tNxfe~;2BRqT5#}dMsM5r|8?n=XVw51`#Q*3`Pl-PV5$y+?;#JpXb66s zuK`r@o!+m~ssC*o6aRTX^OzQJuCMZ+sexC+W=K?c#tArlW9x1abQRQH18{65-gR*z zxAZ(CChP(w-6bcWKScj62Xj{eUF0!sK;RdgLmedIoy-yUe}XUWaUI|89DE{@0NFsM zYOufVe=mmz{>Sw{e?yw1KWrGi^+3CxbfLb7ZBRI>lvChz(hz%ElDPlU_Lv*j78+RLYcK15!Fyrw!z6z$$w`>R-O&B|%F{bhq5hog z04W$UeDp7_!8Q?HhwhEE{c7|;=n()KS{df@p@eSH46p|Amudq35H+=@vU2kn+SwAj zE4&0p(S<%bw>)UKKizKko)0#Me;01|d^_&{=?QpU9Hhlz#JPiHKYPC-1D=E=fVxNa642WUvph;I>V8~GfQLR^emR^tS?_)0nWH#e zJ-4_!dFfbh_IYNtk-Ah)aEl-7bK)NA8l8w#)jG2sTS8oJwpBXvTDCcDn!kX8iyN8< zocN=i#-6Qm7hJgE=a1vl_^>*?G1%b*{vPnxuUjB^`K^`kijzO)i$u0(*`|!G0Pr z{1+;^@g$>2+9CXSyFa;Ob&5DCe!xXimh+*Su=-fIX0p^2T8maoCPJMOt`v_g?lvNz zdE!}22fk4I@Gm*2=bRHkYhb*+xx$-?RT=!b?_t*eVD9+spO5`5ruV?7SXSD#TlU|a zotQvYjLQztfs3i+QOAQn1lqNQD}`p|xTS4840q&&uczdt4VrVdh8i8X*z1)GSOSfH zL>smDyHHd(LSwi}`6&V?=ND}22{YM!ka0|6(mhdt5P(oh#Xf9YI8hob4Th7yvGmFp z;kkYNxfAaE%MlG_{$sJ_90OJMqqKjbC}`j@OR0!f8I==;5s_5%3#~+AeII0jE+MYo zDH0CFMOu}CEEK`;w2QEFX$5SCMk;aXx0cu4;zb(3_}rT$YHo$)OKAhI5;J9}2wNjD z!fpH{j28Gwfw};#;lq&Asq+w|Pz!O8frkgAm^?7L~UGScl-?lo9__q4Y(A47B zpAJ_zT}^kjueFbwSv}rwwo@e;sb53I(QX?yttxn$9@D@(=5-kD!pK~Esfqyuf@=WA zTgZjiJe~j36VFKm??(BTo9)@v;EuTCgtL_g!+TZ$vYvfW06Xw-r%dd}`|S7x>j3e! zY*ZSodqMw~A2et>DqMPpc`KmUC?!Svac8qHsmn_-vy>Qp-uCw4DIsfvNS;<}|UqE1v1L5t(E0Zf+zv7>t?j)BRv`v89t0CVGmO=E&Mli>C zS!nCy<+GeO)r;yZQAR9$MdLo*bp7{^TDt{SskIRzs3OJU;9)CaA-<1q5$^O*7N9Z~lZ(I&w`Y4jg4DnaUm_ zn$q-85%$sxEyk6;y0f3Ta4gU~!;=$JVK8(VV_4*$$V(OYj}?suJhqS6XL1IL zI-f8ImvB!n<;~Vj4~mjA=`OIxavM+~8uu*N$Ct&YzWxY!l-5bOsMRn?*TeTXzf)AM zY6qRo|Xx!Lp#{p33m01t-HZw~2f7we9*ssbILy%RT$N?Devedw-hN zmAF0M#h=c}jS+7K;h|0aK$0?lIFzDXY4G`7He~MslRI*Sn;P6FO+^`bTwZX-S@>qW z0lywtK(O^U8SgmbQ$1A`Nq~eaVxDlPz!D&Zx19vy{1Z2&?SIGBuTA!^4o^!39e%GG znvxQ=39~R*7E_v<)8e={Ex72-5Ht-V{A7f*vYqS|j2Sd6B#HrJs(#f7`np(%MdU8M zjIAil(WHpzV1<<+_lqa=F)e90Z))bt+NgwWc-N`FaI((UFog+~_c=bXFHs;(`tW0q zS#ZdemGSLAO^FcF-i2mgsN61Wkr%pNVm|N>)M%34D;}y>mB?ngt}jE}-%J#hsb8PJ zg<|G?sjO8~m=j+}LWSX>tG`SXl&)KrP!T*F1>uvKuiFF7Hbn{{G}$M&ynuObi4&+1GJ>z4JkX_I5AxKSjk1d= z(9~6Oh;a}{YBrnqPLL5*j#xioG7m9lhMTNhtk8cNY+BuzVoB0 zhir`hasHztJ!ptjHv30W6qZg~lh}H+SOyJE3}$Q-ugoAF!8f7l+8Qep8)3HCn>N(h zsQ@TRDBh9u$+cfnZqIGVe;p-*sBybSI{0JlgNMKF{7M+GB8~$@Ai#3h@yBtcmX!(i8g_ke4V56?ZEzGLR8k1ghRaTHS&5_x?g$ z#Qvk~W|MENd;nYG*JEg>(dfT86(lWQbC|7e!E_-}KRL_#zXYH@+kK9-<>>jacqVtfd~w70vFyopsz0`P^V+|8jqp^S zT~JBkxJG`-F@u&F)f0d0#(4j!y)}qltWbOP@ zAJTksj6=pJv)9d>GYnIo_QE?Ob|d%G`VzROz2|6k z6l-NpVtAXHu_O;7d6z;~o1U7?{}Q;*F^gCK1jjKpZ8aIke{q*s4N|!rkunY*8ut;Z zL$_>4yZ$tXS!(df&}J-bSkhP~nhy|V@9EyOjDKE!Dwe)pC4o!ec^10NdY)mO^OtU< zqu0*o{LU{vA+To}zM|AN+t3iT$w$%ick;^o=7a^ehFmsxM{_d0HSm?60F;IPOxMfF zIbatnUSgUuC6s#)Q3Fq@gu%TIm&6e@So(f%zXtbDXDx#Nbg1L8%rd?Zs7B7*KnN@o zm4$PQ2aP@}vJIoinIc1vt`p^uYlcmHspz3c>9ti~cImcMEoLUrwRW+LaBuz;E_2A( z+(b`>#px%qWK=)t@+`|h_8M|?dZ~)1`$|wYG2D`9OKZFZ1j%Z0V6 z$XWk~^;0mR6hd_Q;PDfHc)!_gX+`erEyKU-|>^{|+m*+&>F2P~+ubElv&U+s; zMOT;j`(EF#-|hcKD5t|pQn3(uDllY-t&_pRD*Rd&>*Wh#IPVs`(jzhK?u++PJ?nFk zsKQxNQAVBF`E9#CVppX=7?%)6hcn3Nhks<5Y|Meq-1I~_mM)aITOCfslr1Q4`k4Vn zo_FL>Mxadlp;a!UHxw!v;2cL@VG&^!Pm++mETuJhL`P_m6a3dfQ=uEg%Z{(Sa>TJ% zH%h(4b>L^vU?r-`;&R~XY?y*lUiHs7_2nWmZq&Cc+5N_o4*hcVpY?V2KUd4pInoBw z*Dv#EGKstlA9Oj1YUTM9qnq@Y`u!w)Hh=#LlF{TVN6{Z9A+jg}4up}QZsY_JKR)L(fx%d$j-tX>- zDaxr;2{IYl$t%Aj+7Yw(wb@-;A3nz*$3%E1E)?9N5FCBDUoX|yY1kr zfWQ{f>0_j8AgNcqau@?YJ<>3bmWCRbAHtBEc%7TAupMYDyhiPwj8m+t>4`~YjtlR_wW9rJw#o-CuSAhgo)2pHC-F*A&z*s{N2g~rsor5|9DN$wLrN^N`zCH{## z0!?mI(KswjWMRQjGM5e)D94iW;~(YPc$$j@sB|^F$EgsP`T4UwX-tfb#bdRV;A$iBXvzM3@=aFWUEX%|J*ygV$I^db3N@n%O(m^UGhrL383yT z`fv;-6G}Tyb0jxdo-VRPD4t6A6~20;OzN{o`~VT_EKfnk*OdTvp(I=Wfd(rJuN0O9 zO!GR!ejfTqa_mEeZsh=hh@cN17>xfY(q1`jc*iLJrU%ZwePcLUG8cuF9c85<0GuNi z3WV88IL`xuI(Lo|b{+i2=;sN%!mtpSZM3E>f84c|fLsfKIyqQKB30N*kg6!{>z%d!r1){}Y= z8j0E&5CNZpIxi^}5Sn1wbAZF_+NJ+Ai-(Ns2gvm9w}n*FUK(2NQqgolH{>4;uS z_{_9R8KALTb#FaqsieTzXtWcGq7xAt6VZ{>xUWac#oNPr_}$r68O4**_s*#OQ)6-p z(V`NGQa4{5iI@16BlsnU>F8v|N7$xtRfv?}?efaczWPd@%d10)C9D|Yc3dLyJ|uoc z9J|^xt&=e}f%E)4AG-vM{O~a=B=V)OLLL#be+<}xKazE+tEionvTi0Yfi9u3BIf^{ z6UXt~)3)y18FhrztLv<*S@cUWB;M{@Z-Wx!2~mVdsl~{bj3CKea9T#?kE(L{2g~@% zhPGsu%JKch+FVb?WNAjl=wwoqp3iJBc?8?Nz7j2El*Z4tiVbv@@b0doV?g8`+VL0u z+va-7wsHNhFK}_OV9ktOs&vX&f_gB=U)A1)3L=vlRPm2#SFPj+ldfpf-w1IBAZ#=B zfq{y4Gm$gYqfaGT0jQdKPum>mN{C4*LhdDmJx&#+ck4+3>6y% z&s8(>scOiSKIas!i}Vn4orh&_(p3a~&ukYeTH~50X}t}L=t085xv}kvOuO#Wel?03W#B+I5zE`mmtNej&8T)u4H zT6JUpm*}aKgs+2W;sM$>81aVq(M%JG6er@Gm^OroJNgB(JvQ1VxDg#hxc*HSjE2-P-IvS38)>j0J~r-4EMVr0D9wX7ONy7J7};c@0ixt4`}QXi9= z69xU^G6hn%YI%~2;0@E2TjF`Mb@c<8@p$gY|tS%CF&IzAJ z0-{;AvH`_1l4np-Nv@u-jYH&c5_fr6DIh}CN>96-f%K)l<59m@70pPTCae-$F1s;X zxgE43SW5K+s$q1Xm|kWUE2_))v5&aL`HDA6&C7Jfq{=tiJY_qJ{Y4gWCo&b>ztQ|} z$Sf6z$Q}1U%rm$kE$@<>tu&Y#76I^Ge>01rPU@%8rr&1hOEiu<16U4L)W^9hh`!-#dYW<& zrTqDTS>G_V_Eptq3WY3gi}=!V)y_isvd=Tr zDmb)dZg9`DDnfRp;TI38hX&NbsK}~V97!Cj!!nMCMAMFu5ggD>34ZkqIb&wGO8~qGk&OP&Czw7>2bj=cw?jRLV2V)~clR z(ql!59qI)^FUt@bPi0PP`7tmP(zQ*gsNS#fTwj-zt{TKtx_(41LWR$Pw#3sjCkd!b z{`2*K@gOi%o~XI-ho2DFV-=`aNYz|Moje#qi*8+rnK<01Q77dNaM>xTNim9B!(eK=HML^A)x3%H+M7O|#ks`KF@1WTf11NaDF#O3w6;G^ zT414+x~Qn&4dg_9D4lZZYTe~mPENYEU1+q$^b$O`-hZSq59z?Z$0ZyTWzsL8mVM4v z6>vIGO-yRshj=1Qi6{g&Lk@9sBeYEksGV+B~^hc#-$OB(9oM6oU=_4G&{z;S#+Flj4tNFw%yhtD;xMtB;UiY z(O^1E$l>b^)S0U*jCPl7u4CrmMz^g_@O+kAb+8;LmMq?jh|W|XM%!txx0;*AGBV=Y zvndnZ%T|-SGJeHnjI7Z5iHol>8~*5M=;Hvbd2MoL`kYF8g^ZP%c`!&F2A>vgnjp-! z?`|<*(sieWAeKpOre}>;NjhBKKkCe;0$Za=nVu724r(}L2M!e$>%=_MZ{%cq4qc-z z9eapX^OQJ>KlvMfL*qU-qb^noJeT%K(f1l-Z92>^2oXZxIMTH$h9r_dxb5|LhG_4| zPPcPkm5CADQ~et+oIc$t*!M3ASwwvh%?SI*XM-Xbz2o;<*fBaY7EY^1wD+uv;0@N2 zQ&Lp=>!XUQ;z6wmlVYj$y#d>-xSDg^=5tEKQNEP}rHiC2PGY37DuduZ)cGFYcJ$jQ2T$qFN1R~j)R z*iow<%zeGs<^w?{7lp(@+zMtvT%#(pt3@^284;4y?pKWPxxW8gJ9OckTf7!WBFpG) zL`EtPu1!Tv(G+7RR%Y_uj!jnP922WVWxg}$U$5JzVbidm`wR!&6!6A}x6JCvpy;nF zBEXAMh?j;Zx*V>N25d0w^a~-lT{p&S^TARz|Ds6eQ-5)&|3OWX9he%|pitR-HxkNa zCh6B?X~fT79b7n$i`->hV5GjsG$Ibd7sxyC(b7l&w@fYLZr3b6R=^M*Z)2ydA;{(}^Sj*9>93*Q8ZbBv;x=vvVu& zA8wL+z#>vR&1B@;G`rtwWey2z$`Pm03V9%zMT=OKXO>S;BkttPc4$ktYPg1!P9E!T z-Pz%dkfem`VJta|_72Y94Ywr8VvLwfu=?}kuFMTKljaTKru`u-hE|31{MC8ftK%<> zYVm15tMl`J{%QH!f?MqFg7PtUfg1HO!}D`acJp42-~h94K|S<^S8`X?c9*a7wK$$< zptP4Hkqx7vkK*9O)5QZnIE(#y)=d1oCN^fw`s7wxTW%j2ZLH5%r}vcITqNk1NGK-D z->TSsmeub1zfYhiO{>}hJ~k4ErNU~H$&!JpG#52If>jcHGub?UjV_rWWjj5rRf@f4 z!^rctY(p ze*P>EP=@pF709C>gwG1JKCWI~xm>XZ59hH_#eRoff@U7B0;Tf&n-eZO`*v3$Zoh%? z{h5_v;G#hRK;<1>6X0YOGe+fTR$2~C%2tqbjzu6i!1f`iN>^i(GUH*W7mdU4&M`NG zgGDLtVV$3)7$9dr>6OwL^h3}lj6|nPSP%Q$<>xl#=}Uaa6BT54}ucX2MhdqzujElZsA9FIEh=8R(FK2=V%N(UAJk}LCzOY?5d?N_riEKjCCJM@nPrcJ z2$eXoJ0&9$vo*1P(A8)NU?|*;NxxbN)bv`@)KE72_Bhfn6XSLi!?Ls@ugdb$(lSz* zV6kRZQzH=0CYS$MAo#OWR-JW%ZlFYKU-nYL2WPUk^jq2H;1R_6_GbTHv4nt@Wl_hQ z<>PTdBgM@b#v8G|AE!_%U0~lZFUj}hDo|@(P3XYe*Q3268(z6^FWA_63s-qrZmUBg z(%)<(t$xL-L@)!RLg^(bZY40ClRB zFUny;U6kwYsS3@ma9Dh#Z7zk3bJET!p*3EVHy6jmRgs43O$Req!^w)u56iqtFe3QU zygRPEDe!vnWrh*DnSN4kv27o5HE2*mJY@!#(NHTV0{FhV7u&c@qGhaU*Qftu;~$v7 z|By({5usl35jMvC-Y3}xC7T4HKsuq7!0EGWxak2sEQ)D~e{5U_x)8n;&rmfb|)$&Jai0u(|?f#W{ zgJe{6m2JP`p0}no=bLWhAMCV^9;;C8FTGZpWpG9z&9_+uvw1Lwjd<#GRw| z3=;4DXsmH~l?y74_kP!vA8vpE*D-EphDMoXT&+AOQFqTZFJFI=w^rWGYJdAis7)~- zvxVQEhRvJEIf6|sbBNSXEnSsaVRS25VPWPr8(R@Mv*VoXhdDSK(c#B2flysH@`-8h za8H29Np(PTzO)nfP6aJ*`O|vT~?fQr_ zCnil$`PU9^*_=C~>PJ_ziAI zgjUL`!Y`O9>U{J8(hNBiR&{IjIYy_f(;FX^4R5v^ZrdK)YGy_U+Us*e>^tS+OA00f(%Zcd*t*9co@s+l$UqLf} z{ru;)QBWS&03mET>Q@}r98Z0HL$j8}+4NSau8EM-*xB6kw(sP462tHcjc)>vO?v#aFEqkcDk=pTb%S3V~!g#GMlXtQ_M`r}yarJjf8 zt4O0e{1NVXu#t%;@wF*oGs(S8!;W{qU9T+qp`q|@Oh@apt!OwtTx5STa!wt#MWrh9 z&&2Oc=9{*$K9$zTDXSJ@TEvl5cT4KO(Pxx=aeA|^@uUS+1Mv>7cmZTqKp}<1l>0cT zO9%_lK0~%ANlCFD^*iHmIpigC&C@nM)Y&w|hJU-AeSCRxc}DZ(e6wozg5X4R-NO*C zx?J(VeuJILgoHQ<9T?Ji2?q>IR)eqv4A3UEb$s`JDrG`{UlZIc|8XWmQRrH3Sy?QW zD;0PQ=KZC(r2I|y4^B)!NlEghlgj5d36CEm<%}qA2kwp%8h!+hb)Pb9T@oEqV|wW& zsD4(<9;h+^8!}ZgT_tbO_VB{^e}0cE>BPI5XgRHr4GTM`PJ2XuQg7!}@-bwoXw*%2 zZ!R?<(Mg4qFEe#A<$66DI@L-_KTrFppw@ZcCrn1A%e6<^_|`7>E9n5Eg;PuOcQC4F zc1212(Lr-laGEz+j(3IHE^p&e^)cpNv@&JOpVjYN6Y{;#4Kyej=3?j}%TQ**&cyL} z(D3>VRddzHOx4s~6*^y^MW#`uEuspvA(^&&_V7Qgn$~y%nO^+quorP#Rjlm^Rc_iP zkk;+*YZ72Cb>J{_LY+YLFKvuX)?0_N9D^>Br4c#?vg6WjzWb5AR`vQOn^o8VTffc` z*aFRuhX-%0-XRfPPPd-R+%+?gwDM=ga8_AzjYf3c=d3;UlH?uh}ewaGIN>366b9ET0w?`)3c#{le=nU5?~9w@2$&l0T$YQA?}G zmXM}qPYYN5L^tdU7E{ZL7-uqZxRgV&i=tAW;xM)nyQ3GjiR8H>wXTb@{a*U1u`<)Z zLA$JZ)-)?*?NN>)TFOX@A@~V-N-Bn0M)>xs~vpA7LY5wvp&AT>RzCjOU zMLRxIA_d|eSHUM4-_Y>y;o_cx&Kpv98$5B}>}%>Qp7$UrQf%^JDpK5TNtvb_)XDU< zz0n^$+=Yy?C$3B8EwFS|uDY0zFpVx^94J*#L&3r(2KhO+%M=q<6fYnoR>;KalL{!9 zD;fm|*g4F-ggKq>C?b9Fb?%KEz_xh z!`sU9S7ah=9S z0XRmaZ_Tr^rrxSgq&nJq1D477zF%N8g-rRzoQL#~7?L`fl4u16g~U-Kjh^igaVq|} zCZ*A!R~E%*oG0BDxAXj@@cmX+H`4yFt7le^bEu4qH?Dl-R@ow^$#a-*l7Pk`3>mJL zLG(iQ`#hK2;T+ua&$%j>A>44J{r-7?Y;bn(n;maLso>x`g1(xD*;kJjA(z~}H+|FU zw?+Fey}zAPlj00Upl(YyBbPD9mT#Ji;Eq!asmY(YomCVjKO^Ml3dNOxXm>(irQn|kxMx4Yi*B&k(r zCPQe}@~1Ej%`WMOle=x*^C?jcms-bF3EW=L&?*jvlZxy9% z7J;oor9fV#d%tVBOrLd*^1Z26SEmSjy?%`k9jxxujk`xWP*QkCWyr6o=pzJBTr1XmtA9*a zdwav9s^QQ7468(C)Y>`F?4C+9Ph*TMtt=eYZiNXe^mQ8jQ@76@z6-z9 z)xFahF*Y|Mb&t^uk4s=^$+NiP95sEPS^y%YFB@)jkHg2W*)guIBYaVGRgeIC5yL-C zKX|C^ir)B`I+?1`%V)EjZGq;FxNMX#Fly9kwKT`HSfbWef~za?u`PP(?4ONz&+dQS zbMTDm%4ThX4yjdtnZ2q++ z;e>r0Daoz8m7<|GpDto%bIOQ)OvM-@?EDDlo)VEcL0i)9md$;1iefcmwQl$0e&J(z zxLWyKez6GC@h>i;eMF`4A}U7H)?2jJ?N`ff%AioOk`e23dV1DE1siZrHquS$ip<+j zGHb@aTh^)x58mTtELR!VvVJMHajK!8nb6J2D{((htC}uWSK}cyFhN%P|4v0b8VNh3 zHL56TcUqLHxDGKVe7mU_BTdz&0%B@2zX+&281y62xjXArEZ_AiH+ylE%Rj&TZU zl3(f)(TsMv4O4Tr-um?_SCLrny!6zxiO*5oJNW&4SaH27^3y5D)+tPl#*wZ^+x2X3 zr|KK?t0viD&Jp+&S+nZ=a+o5BUEEUOZ4;(r^;$F0xkrCLTKB7FIWty>06XqPUU@ER z=VmZbe+sR<{9t9Ze)#v3u2({~;5uaY7ZFkd!FJGbX;6Z<1wG_1_Wu>?2^IEHc0u=< ztyE(Lc*9(SQX|-{-amIyl2y(618p^9d%%oWlh~%1qD)t>n$$>MKwR3cH)M1(?%72m zDZ%ryK4XbyYG{|MHS;-#r%eT)pGo~S%QdYOsg`qpj>lK@(M0Pw4Xb*v2%W^{a z;tq=M@`__Bg`FC&j_c}9;$&H|PcAB3-e^sUoBgxC9qQqtz@nV{7iGO6Rq7VdtAUm0 z!SR5X>6*}evqD``Q;m|-Cw#^Wt*VRX%vCdV$qWLMGpMpe$JrTHT|+|crQbNc#w6Iu zc#1XCVaYkwrP?D7it2OiYK$g%fPQH{KltR`6T0N*iU$ep=&rd;cC9<(+$0W?ZqT4p zMQY91b$D{}L>45&(_1so5*7{T2SK0DP)H3CY^DfZb&6xj#?JWdO~B>f7^H@&_mj#) zB+b*r*Djx$Ws3+nMo&bf0`vYz#actah^P<&s;t;hmZ)>?2L`+;d0;YOl(>U%*X z|9EDK{TY)e>Iahf&dc&L*P-D;L6fo}UD1`V;HX`N%g=Dq9Xm@zKa9k*!u@?Nht_J(i}@4PiS z8+=!rxhG*u$u!}E%`Q0h*KD?1MQqjy5I6?L%9y3CLQGe{+v5}?k} zR_^QlVW%lm%Z_M zDIy&PVCs?A&v5<1DPBQf23ROC!UtH3VLE~(25KCqWy(W7tZc2r({^6>+00etbnKfg ztR;r*X*3Ij$c%5|pYrk?b68xC{Aar=0$!Vnm!NjdN7YSrGL1>1Hd-?+d0E<@AG$Q_ zgUKZww5T|8HW=}h>SdX8IznYfih37Xb(Xu=%E%bJ@4W zRLBRTAmH!aIRR14E;GAN-h?J=pw6b}DGJ1I+2GE5L|6?UygYJ;d4=%6TSUc=F)J5m zU^~?IgXEn6m`Geq%4@R9(|TS@;^G#)8G0WJJaD!jNe}xa-+a{c0i|>$X4I8$Q%(#9 zVpDg{;z_i;14BgHci6FyC}6TYMJ(l%c#U%)g2ncMx}ZiY+c#6)bXg&F)*@}Vema#2 z-Q9BPC~k3)PslmB z(i-+FSLqt5jr2XIK^daixLVsdCRAB8vaeBR1Lg8DXkeDC`jYkN2-saF7t9>BpFD4JkrKp$KA zAL@2H+T7=td2fHniTr5BwPpvVCMvwr99iMeii$Xu81{Q=%fuK83Ql;>8VHJl^6Di6 zgXC9gTW)iu(+NC1;Zq!F;2}a;0!js>P0lSt(?5I^=bFJVp1g$yBn^6zPK{Q8ij1;J zE&M7U)lFBkhp=D%55F2SV`}D>*@rI&NBiQ}PX}KDL z@n)2OSK9)#-C5m?+XI9Lho1~2=GPxT9qk>?`0n+WceB3Q{c`jktEiS=-cmaRo`L@} z{BQT|+s}K4hp#q1q{FBFGrU%DG$rTo8<%^cE#eocI0d8O<>S-IWc1V4*7xtyvZ}3r{Jk|fpWMC;&-0Qf5|6yN z-A;Ugf8)j~{Y$_5zVQ7d@j@>S!ccgD7l+X!aen)z=L6kR4PEIMY1%1fKL?NXdY9ng zp$Pr&Jpq_*ys6-2oep^QHv&)4eIhUY$lH$Mot+&YKTG+uFo?IqD2aA9f>4#s>t^3x z`boRp4*YH7CgH?j&|89T0Re*`KfHr_1+Oc;T|9ip@!giD-L6RiE|4};x{*M>X oml~`&|2uHtz<~n?4jede;J|?c2M!!Kc-Zj&1MZ2imH?Oo0D?ENMF0Q* diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js deleted file mode 100644 index 8ea6f79500d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/header.js +++ /dev/null @@ -1,183 +0,0 @@ -var tap = require("tap") -var TarHeader = require("../lib/header.js") -var tar = require("../tar.js") -var fs = require("fs") - - -var headers = - { "a.txt file header": - [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'a.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 257 - , mtime: 1319493851 - , cksum: 5417 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "omega pax": // the extended header from omega tar. - [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'PaxHeader/Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 120 - , mtime: 1301254537 - , cksum: 6697 - , type: 'x' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "omega file header": - [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 2 - , mtime: 1301254537 - , cksum: 5690 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "foo.js file header": - [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'foo.js' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 4 - , mtime: 1301246433 - , cksum: 5519 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "b.txt file header": - [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'b.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 512 - , mtime: 1319494079 - , cksum: 5425 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "deep nested file": - [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true, - path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 100 - , mtime: 1319687003 - , cksum: 18124 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - } - -tap.test("parsing", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , header = new Buffer(h[0], "hex") - , expect = h[1] - , parsed = new TarHeader(header) - - // console.error(parsed) - t.has(parsed, expect, "parse " + name) - }) - t.end() -}) - -tap.test("encoding", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , expect = new Buffer(h[0], "hex") - , encoded = TarHeader.encode(h[1]) - - // might have slightly different bytes, since the standard - // isn't very strict, but should have the same semantics - // checkSum will be different, but cksumValid will be true - - var th = new TarHeader(encoded) - delete h[1].block - delete h[1].needExtended - delete h[1].cksum - t.has(th, h[1], "fields "+name) - }) - t.end() -}) - -// test these manually. they're a bit rare to find in the wild -tap.test("parseNumeric tests", function (t) { - var parseNumeric = TarHeader.parseNumeric - , numbers = - { "303737373737373700": 2097151 - , "30373737373737373737373700": 8589934591 - , "303030303036343400": 420 - , "800000ffffffffffff": 281474976710655 - , "ffffff000000000001": -281474976710654 - , "ffffff000000000000": -281474976710655 - , "800000000000200000": 2097152 - , "8000000000001544c5": 1393861 - , "ffffffffffff1544c5": -15383354 } - Object.keys(numbers).forEach(function (n) { - var b = new Buffer(n, "hex") - t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) - }) - t.end() -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js deleted file mode 100644 index d4b03a1fe93..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack-no-proprietary.js +++ /dev/null @@ -1,886 +0,0 @@ -// This is exactly like test/pack.js, except that it's excluding -// any proprietary headers. -// -// This loses some information about the filesystem, but creates -// tarballs that are supported by more versions of tar, especially -// old non-spec-compliant copies of gnutar. - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - uid: uid, - gid: gid, - size: 200 } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/sub/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - uid: uid, - gid: gid, - size: 2 } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , uid: uid - , gid: gid - , size: 2 } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - props.noProprietary = true - var pack = Pack(props) - var writer = Writer(target) - - // global header should be skipped regardless, since it has no content. - var entry = 0 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error("wanted", wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js deleted file mode 100644 index 0f16c07bb01..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/pack.js +++ /dev/null @@ -1,952 +0,0 @@ - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'globalExtendedHeader', - { path: 'PaxHeader/', - mode: 438, - uid: 0, - gid: 0, - type: 'g', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { "NODETAR.author": pkg.author, - "NODETAR.name": pkg.name, - "NODETAR.description": pkg.description, - "NODETAR.version": pkg.version, - "NODETAR.repository.type": pkg.repository.type, - "NODETAR.repository.url": pkg.repository.url, - "NODETAR.main": pkg.main, - "NODETAR.scripts.test": pkg.scripts.test } ] - - , [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 200, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/dir/sub/', - mode: 488, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 2, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , "NODETAR.depth": "1" - , "NODETAR.type": "File" - , nlink: 1 - , uid: uid - , gid: gid - , size: 2 - , "NODETAR.blksize": "4096" - , "NODETAR.blocks": "8" } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -tap.test("with from base", { timeout: 10000 }, function (t) { - runTest(t, true, true) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH, doFromBase) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - if(doFromBase) props.fromBase = true; - - var pack = Pack(props) - var writer = Writer(target) - - // skip the global header if we're not doing that. - var entry = doGH ? 0 : 1 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if(doFromBase) { - if(wanted[1].path.indexOf('fixtures/') && wanted[1].path.length == 100) - wanted[1].path = wanted[1].path.replace('fixtures/', '') + 'ccccccccc' - - if(wanted[1]) wanted[1].path = wanted[1].path.replace('fixtures/', '').replace('//', '/') - if(wanted[1].path == '') wanted[1].path = '/' - if(wanted[2] && wanted[2].path) wanted[2].path = wanted[2].path.replace('fixtures', '').replace(/^\//, '') - - wanted[1].linkpath = wanted[1].linkpath.replace('fixtures/', '') - } - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error("wanted", wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js deleted file mode 100644 index da01a65ccc7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse-discard.js +++ /dev/null @@ -1,29 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - -tap.test("parser test", function (t) { - var parser = tar.Parse() - var total = 0 - var dataTotal = 0 - - parser.on("end", function () { - - t.equals(total-513,dataTotal,'should have discarded only c.txt') - - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on('entry',function(entry){ - if(entry.path === 'c.txt') entry.abort() - - total += entry.size; - entry.on('data',function(data){ - dataTotal += data.length - }) - }) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js deleted file mode 100644 index f765a50129b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/parse.js +++ /dev/null @@ -1,359 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , index = 0 - - , expect = -[ [ 'entry', - { path: 'c.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5422, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'cc.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5525, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 18124, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 120, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6702, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'Ω.txt', - ctime: 1319737909, - atime: 1319739061, - dev: 234881026, - ino: 51693379, - nlink: 1 } ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), - dev: 234881026, - ino: 51693379, - nlink: 1 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1319686868, - atime: 1319741254, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14570, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 }, - undefined ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 1000, - gid: 1000, - size: 201, - mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), - cksum: 14086, - type: '0', - linkpath: '', - ustar: false }, - undefined ], - [ 'longLinkpath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4975, - type: 'K', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], - [ 'entry', - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: 511, - uid: 1000, - gid: 1000, - size: 0, - mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), - cksum: 21603, - type: '2', - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ustar: false }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 143, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 6533, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { ctime: 1320617144, - atime: 1320617232, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 5526, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1320617144, - atime: 1320617406, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 15173, - type: '1', - linkpath: '200-hard', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ] ] - - -tap.test("parser test", function (t) { - var parser = tar.Parse() - - parser.on("end", function () { - t.equal(index, expect.length, "saw all expected events") - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on("*", function (ev, entry) { - var wanted = expect[index] - if (!wanted) { - return t.fail("Unexpected event: " + ev) - } - var result = [ev, entry.props] - entry.on("end", function () { - result.push(entry.fields || entry.body) - - t.equal(ev, wanted[0], index + " event type") - t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") - if (wanted[2]) { - t.equivalent(result[2], wanted[2], "metadata values") - } - index ++ - }) - }) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js deleted file mode 100644 index a00ff7faa03..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tar/test/zz-cleanup.js +++ /dev/null @@ -1,20 +0,0 @@ -// clean up the fixtures - -var tap = require("tap") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE deleted file mode 100644 index 1bc286fb579..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2015, Salesforce.com, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -=== - -The following exceptions apply: - -=== - -`public_suffix_list.dat` was obtained from - via -. The license for this file is MPL/2.0. The header of -that file reads as follows: - - // This Source Code Form is subject to the terms of the Mozilla Public - // License, v. 2.0. If a copy of the MPL was not distributed with this - // file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md deleted file mode 100644 index 9899dbf6eed..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/README.md +++ /dev/null @@ -1,492 +0,0 @@ -[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js - -[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie) - -[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie) -![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9) - -# Synopsis - -``` javascript -var tough = require('tough-cookie'); -var Cookie = tough.Cookie; -var cookie = Cookie.parse(header); -cookie.value = 'somethingdifferent'; -header = cookie.toString(); - -var cookiejar = new tough.CookieJar(); -cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); -// ... -cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { - res.headers['cookie'] = cookies.join('; '); -}); -``` - -# Installation - -It's _so_ easy! - -`npm install tough-cookie` - -Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. - -# API - -## tough - -Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". - -**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary. - -### `parseDate(string)` - -Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. - -### `formatDate(date)` - -Format a Date into a RFC1123 string (the RFC6265-recommended format). - -### `canonicalDomain(str)` - -Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). - -### `domainMatch(str,domStr[,canonicalize=true])` - -Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". - -The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. - -### `defaultPath(path)` - -Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. - -The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. - -### `pathMatch(reqPath,cookiePath)` - -Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. - -This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. - -### `parse(cookieString[, options])` - -alias for `Cookie.parse(cookieString[, options])` - -### `fromJSON(string)` - -alias for `Cookie.fromJSON(string)` - -### `getPublicSuffix(hostname)` - -Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. - -For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. - -For further information, see http://publicsuffix.org/. This module derives its list from that site. - -### `cookieCompare(a,b)` - -For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence: - -* Longest `.path` -* oldest `.creation` (which has a 1ms precision, same as `Date`) -* lowest `.creationIndex` (to get beyond the 1ms precision) - -``` javascript -var cookies = [ /* unsorted array of Cookie objects */ ]; -cookies = cookies.sort(cookieCompare); -``` - -**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`. - -### `permuteDomain(domain)` - -Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. - -### `permutePath(path)` - -Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. - - -## Cookie - -Exported via `tough.Cookie`. - -### `Cookie.parse(cookieString[, options])` - -Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. - -The options parameter is not required and currently has only one property: - - * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant. - -If options is not an object, it is ignored, which means you can use `Array#map` with it. - -Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: - -``` javascript -if (res.headers['set-cookie'] instanceof Array) - cookies = res.headers['set-cookie'].map(Cookie.parse); -else - cookies = [Cookie.parse(res.headers['set-cookie'])]; -``` - -### Properties - -Cookie object properties: - - * _key_ - string - the name or key of the cookie (default "") - * _value_ - string - the value of the cookie (default "") - * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` - * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` - * _domain_ - string - the `Domain=` attribute of the cookie - * _path_ - string - the `Path=` of the cookie - * _secure_ - boolean - the `Secure` cookie flag - * _httpOnly_ - boolean - the `HttpOnly` cookie flag - * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) - * _creation_ - `Date` - when this cookie was constructed - * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation) - -After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: - - * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) - * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. - * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar - * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. - -### `Cookie([{properties}])` - -Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties. - -### `.toString()` - -encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. - -### `.cookieString()` - -encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). - -### `.setExpires(String)` - -sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. - -### `.setMaxAge(number)` - -sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. - -### `.expiryTime([now=Date.now()])` - -### `.expiryDate([now=Date.now()])` - -expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. - -Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. - -If Expires (`.expires`) is set, that's returned. - -Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). - -### `.TTL([now=Date.now()])` - -compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. - -The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. - -### `.canonicalizedDoman()` - -### `.cdomain()` - -return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. - -### `.toJSON()` - -For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized. - -Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`). - -**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. - -### `Cookie.fromJSON(strOrObj)` - -Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first. - -Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer. - -Returns `null` upon JSON parsing error. - -### `.clone()` - -Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`. - -### `.validate()` - -Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. - -validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: - -``` javascript -if (cookie.validate() === true) { - // it's tasty -} else { - // yuck! -} -``` - - -## CookieJar - -Exported via `tough.CookieJar`. - -### `CookieJar([store],[options])` - -Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. - -The `options` object can be omitted and can have the following properties: - - * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk" - * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name. - This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers. - -Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. - -### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))` - -Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option. - -As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). - -### `.setCookieSync(cookieOrString, currentUrl, [{options}])` - -Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getCookies(currentUrl, [{options},] cb(err,cookies))` - -Retrieve the list of cookies that can be sent in a Cookie header for the current url. - -If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). - * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it). - -The `.lastAccessed` property of the returned cookies will have been updated. - -### `.getCookiesSync(currentUrl, [{options}])` - -Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getCookieString(...)` - -Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. - -### `.getCookieStringSync(...)` - -Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getSetCookieStrings(...)` - -Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`. - -### `.getSetCookieStringsSync(...)` - -Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.serialize(cb(err,serializedObject))` - -Serialize the Jar if the underlying store supports `.getAllCookies`. - -**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. - -See [Serialization Format]. - -### `.serializeSync()` - -Sync version of .serialize - -### `.toJSON()` - -Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`. - -### `CookieJar.deserialize(serialized, [store], cb(err,object))` - -A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization. - -The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. - -As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback. - -### `CookieJar.deserializeSync(serialized, [store])` - -Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work. - -### `CookieJar.fromJSON(string)` - -Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`. - -### `.clone([store,]cb(err,newJar))` - -Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa. - -The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`. - -### `.cloneSync([store])` - -Synchronous version of `.clone`, returning a new `CookieJar` instance. - -The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used. - -The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls. - -## Store - -Base class for CookieJar stores. Available as `tough.Store`. - -## Store API - -The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. - -Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. - -Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style - -All `domain` parameters will have been normalized before calling. - -The Cookie store must have all of the following methods. - -### `store.findCookie(domain, path, key, cb(err,cookie))` - -Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. - -Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). - -### `store.findCookies(domain, path, cb(err,cookies))` - -Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. - -If no cookies are found, the callback MUST be passed an empty array. - -The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. - -As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). - -### `store.putCookie(cookie, cb(err))` - -Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. - -The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. - -Pass an error if the cookie cannot be stored. - -### `store.updateCookie(oldCookie, newCookie, cb(err))` - -Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. - -The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement). - -Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. - -The `newCookie` and `oldCookie` objects MUST NOT be modified. - -Pass an error if the newCookie cannot be stored. - -### `store.removeCookie(domain, path, key, cb(err))` - -Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). - -The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. - -### `store.removeCookies(domain, path, cb(err))` - -Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed. - -Pass an error ONLY if removing any existing cookies failed. - -### `store.getAllCookies(cb(err, cookies))` - -Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure. - -Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail. - -Pass an error if retrieval fails. - -## MemoryCookieStore - -Inherits from `Store`. - -A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. - -# Serialization Format - -**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`. - -```js - { - // The version of tough-cookie that serialized this jar. - version: 'tough-cookie@1.x.y', - - // add the store type, to make humans happy: - storeType: 'MemoryCookieStore', - - // CookieJar configuration: - rejectPublicSuffixes: true, - // ... future items go here - - // Gets filled from jar.store.getAllCookies(): - cookies: [ - { - key: 'string', - value: 'string', - // ... - /* other Cookie.serializableProperties go here */ - } - ] - } -``` - -# Copyright and License - -(tl;dr: BSD-3-Clause with some MPL/2.0) - -```text - Copyright (c) 2015, Salesforce.com, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Salesforce.com nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -``` - -Portions may be licensed under different licenses (in particular `public_suffix_list.dat` is MPL/2.0); please read that file and the LICENSE file for full details. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js deleted file mode 100644 index 12da297ac4d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/cookie.js +++ /dev/null @@ -1,1342 +0,0 @@ -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -'use strict'; -var net = require('net'); -var urlParse = require('url').parse; -var pubsuffix = require('./pubsuffix'); -var Store = require('./store').Store; -var MemoryCookieStore = require('./memstore').MemoryCookieStore; -var pathMatch = require('./pathMatch').pathMatch; -var VERSION = require('../package.json').version; - -var punycode; -try { - punycode = require('punycode'); -} catch(e) { - console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); -} - -var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - -// From RFC6265 S4.1.1 -// note that it excludes \x3B ";" -var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; -var COOKIE_OCTETS = new RegExp('^'+COOKIE_OCTET.source+'+$'); - -var CONTROL_CHARS = /[\x00-\x1F]/; - -// Double quotes are part of the value (see: S4.1.1). -// '\r', '\n' and '\0' should be treated as a terminator in the "relaxed" mode -// (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60) -// '=' and ';' are attribute/values separators -// (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L64) -var COOKIE_PAIR = /^(([^=;]+))\s*=\s*([^\n\r\0]*)/; - -// Used to parse non-RFC-compliant cookies like '=abc' when given the `loose` -// option in Cookie.parse: -var LOOSE_COOKIE_PAIR = /^((?:=)?([^=;]*)\s*=\s*)?([^\n\r\0]*)/; - -// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' -// Note ';' is \x3B -var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; - -// Used for checking whether or not there is a trailing semi-colon -var TRAILING_SEMICOLON = /;+$/; - -var DAY_OF_MONTH = /^(\d{1,2})[^\d]*$/; -var TIME = /^(\d{1,2})[^\d]*:(\d{1,2})[^\d]*:(\d{1,2})[^\d]*$/; -var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/i; - -var MONTH_TO_NUM = { - jan:0, feb:1, mar:2, apr:3, may:4, jun:5, - jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 -}; -var NUM_TO_MONTH = [ - 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' -]; -var NUM_TO_DAY = [ - 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' -]; - -var YEAR = /^(\d{2}|\d{4})$/; // 2 to 4 digits - -var MAX_TIME = 2147483647000; // 31-bit max -var MIN_TIME = 0; // 31-bit min - - -// RFC6265 S5.1.1 date parser: -function parseDate(str) { - if (!str) { - return; - } - - /* RFC6265 S5.1.1: - * 2. Process each date-token sequentially in the order the date-tokens - * appear in the cookie-date - */ - var tokens = str.split(DATE_DELIM); - if (!tokens) { - return; - } - - var hour = null; - var minutes = null; - var seconds = null; - var day = null; - var month = null; - var year = null; - - for (var i=0; i 23 || minutes > 59 || seconds > 59) { - return; - } - - continue; - } - } - - /* 2.2. If the found-day-of-month flag is not set and the date-token matches - * the day-of-month production, set the found-day-of- month flag and set - * the day-of-month-value to the number denoted by the date-token. Skip - * the remaining sub-steps and continue to the next date-token. - */ - if (day === null) { - result = DAY_OF_MONTH.exec(token); - if (result) { - day = parseInt(result, 10); - /* RFC6265 S5.1.1.5: - * [fail if] the day-of-month-value is less than 1 or greater than 31 - */ - if(day < 1 || day > 31) { - return; - } - continue; - } - } - - /* 2.3. If the found-month flag is not set and the date-token matches the - * month production, set the found-month flag and set the month-value to - * the month denoted by the date-token. Skip the remaining sub-steps and - * continue to the next date-token. - */ - if (month === null) { - result = MONTH.exec(token); - if (result) { - month = MONTH_TO_NUM[result[1].toLowerCase()]; - continue; - } - } - - /* 2.4. If the found-year flag is not set and the date-token matches the year - * production, set the found-year flag and set the year-value to the number - * denoted by the date-token. Skip the remaining sub-steps and continue to - * the next date-token. - */ - if (year === null) { - result = YEAR.exec(token); - if (result) { - year = parseInt(result[0], 10); - /* From S5.1.1: - * 3. If the year-value is greater than or equal to 70 and less - * than or equal to 99, increment the year-value by 1900. - * 4. If the year-value is greater than or equal to 0 and less - * than or equal to 69, increment the year-value by 2000. - */ - if (70 <= year && year <= 99) { - year += 1900; - } else if (0 <= year && year <= 69) { - year += 2000; - } - - if (year < 1601) { - return; // 5. ... the year-value is less than 1601 - } - } - } - } - - if (seconds === null || day === null || month === null || year === null) { - return; // 5. ... at least one of the found-day-of-month, found-month, found- - // year, or found-time flags is not set, - } - - return new Date(Date.UTC(year, month, day, hour, minutes, seconds)); -} - -function formatDate(date) { - var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; - var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; - var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; - var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; - return NUM_TO_DAY[date.getUTCDay()] + ', ' + - d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ - h+':'+m+':'+s+' GMT'; -} - -// S5.1.2 Canonicalized Host Names -function canonicalDomain(str) { - if (str == null) { - return null; - } - str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - - // convert to IDN if any non-ASCII characters - if (punycode && /[^\u0001-\u007f]/.test(str)) { - str = punycode.toASCII(str); - } - - return str.toLowerCase(); -} - -// S5.1.3 Domain Matching -function domainMatch(str, domStr, canonicalize) { - if (str == null || domStr == null) { - return null; - } - if (canonicalize !== false) { - str = canonicalDomain(str); - domStr = canonicalDomain(domStr); - } - - /* - * "The domain string and the string are identical. (Note that both the - * domain string and the string will have been canonicalized to lower case at - * this point)" - */ - if (str == domStr) { - return true; - } - - /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ - - /* "* The string is a host name (i.e., not an IP address)." */ - if (net.isIP(str)) { - return false; - } - - /* "* The domain string is a suffix of the string" */ - var idx = str.indexOf(domStr); - if (idx <= 0) { - return false; // it's a non-match (-1) or prefix (0) - } - - // e.g "a.b.c".indexOf("b.c") === 2 - // 5 === 3+2 - if (str.length !== domStr.length + idx) { // it's not a suffix - return false; - } - - /* "* The last character of the string that is not included in the domain - * string is a %x2E (".") character." */ - if (str.substr(idx-1,1) !== '.') { - return false; - } - - return true; -} - - -// RFC6265 S5.1.4 Paths and Path-Match - -/* - * "The user agent MUST use an algorithm equivalent to the following algorithm - * to compute the default-path of a cookie:" - * - * Assumption: the path (and not query part or absolute uri) is passed in. - */ -function defaultPath(path) { - // "2. If the uri-path is empty or if the first character of the uri-path is not - // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. - if (!path || path.substr(0,1) !== "/") { - return "/"; - } - - // "3. If the uri-path contains no more than one %x2F ("/") character, output - // %x2F ("/") and skip the remaining step." - if (path === "/") { - return path; - } - - var rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) { - return "/"; - } - - // "4. Output the characters of the uri-path from the first character up to, - // but not including, the right-most %x2F ("/")." - return path.slice(0, rightSlash); -} - - -function parse(str, options) { - if (!options || typeof options !== 'object') { - options = {}; - } - str = str.trim(); - - // S4.1.1 Trailing semi-colons are not part of the specification. - var semiColonCheck = TRAILING_SEMICOLON.exec(str); - if (semiColonCheck) { - str = str.slice(0, semiColonCheck.index); - } - - // We use a regex to parse the "name-value-pair" part of S5.2 - var firstSemi = str.indexOf(';'); // S5.2 step 1 - var pairRe = options.loose ? LOOSE_COOKIE_PAIR : COOKIE_PAIR; - var result = pairRe.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); - - // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" - // constraints as well as trimming any whitespace. - if (!result) { - return; - } - - var c = new Cookie(); - if (result[1]) { - c.key = result[2].trim(); - } else { - c.key = ''; - } - c.value = result[3].trim(); - if (CONTROL_CHARS.test(c.key) || CONTROL_CHARS.test(c.value)) { - return; - } - - if (firstSemi === -1) { - return c; - } - - // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question)." plus later on in the same section - // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); - - // "If the unparsed-attributes string is empty, skip the rest of these - // steps." - if (unparsed.length === 0) { - return c; - } - - /* - * S5.2 says that when looping over the items "[p]rocess the attribute-name - * and attribute-value according to the requirements in the following - * subsections" for every item. Plus, for many of the individual attributes - * in S5.3 it says to use the "attribute-value of the last attribute in the - * cookie-attribute-list". Therefore, in this implementation, we overwrite - * the previous value. - */ - var cookie_avs = unparsed.split(/\s*;\s*/); - while (cookie_avs.length) { - var av = cookie_avs.shift(); - var av_sep = av.indexOf('='); - var av_key, av_value; - - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.substr(0,av_sep); - av_value = av.substr(av_sep+1); - } - - av_key = av_key.trim().toLowerCase(); - - if (av_value) { - av_value = av_value.trim(); - } - - switch(av_key) { - case 'expires': // S5.2.1 - if (av_value) { - var exp = parseDate(av_value); - // "If the attribute-value failed to parse as a cookie date, ignore the - // cookie-av." - if (exp) { - // over and underflow not realistically a concern: V8's getTime() seems to - // store something larger than a 32-bit time_t (even with 32-bit node) - c.expires = exp; - } - } - break; - - case 'max-age': // S5.2.2 - if (av_value) { - // "If the first character of the attribute-value is not a DIGIT or a "-" - // character ...[or]... If the remainder of attribute-value contains a - // non-DIGIT character, ignore the cookie-av." - if (/^-?[0-9]+$/.test(av_value)) { - var delta = parseInt(av_value, 10); - // "If delta-seconds is less than or equal to zero (0), let expiry-time - // be the earliest representable date and time." - c.setMaxAge(delta); - } - } - break; - - case 'domain': // S5.2.3 - // "If the attribute-value is empty, the behavior is undefined. However, - // the user agent SHOULD ignore the cookie-av entirely." - if (av_value) { - // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E - // (".") character." - var domain = av_value.trim().replace(/^\./, ''); - if (domain) { - // "Convert the cookie-domain to lower case." - c.domain = domain.toLowerCase(); - } - } - break; - - case 'path': // S5.2.4 - /* - * "If the attribute-value is empty or if the first character of the - * attribute-value is not %x2F ("/"): - * Let cookie-path be the default-path. - * Otherwise: - * Let cookie-path be the attribute-value." - * - * We'll represent the default-path as null since it depends on the - * context of the parsing. - */ - c.path = av_value && av_value[0] === "/" ? av_value : null; - break; - - case 'secure': // S5.2.5 - /* - * "If the attribute-name case-insensitively matches the string "Secure", - * the user agent MUST append an attribute to the cookie-attribute-list - * with an attribute-name of Secure and an empty attribute-value." - */ - c.secure = true; - break; - - case 'httponly': // S5.2.6 -- effectively the same as 'secure' - c.httpOnly = true; - break; - - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - - return c; -} - -// avoid the V8 deoptimization monster! -function jsonParse(str) { - var obj; - try { - obj = JSON.parse(str); - } catch (e) { - return e; - } - return obj; -} - -function fromJSON(str) { - if (!str) { - return null; - } - - var obj; - if (typeof str === 'string') { - obj = jsonParse(str); - if (obj instanceof Error) { - return null; - } - } else { - // assume it's an Object - obj = str; - } - - var c = new Cookie(); - for (var i=0; i 1) { - var lindex = path.lastIndexOf('/'); - if (lindex === 0) { - break; - } - path = path.substr(0,lindex); - permutations.push(path); - } - permutations.push('/'); - return permutations; -} - -function getCookieContext(url) { - if (url instanceof Object) { - return url; - } - // NOTE: decodeURI will throw on malformed URIs (see GH-32). - // Therefore, we will just skip decoding for such URIs. - try { - url = decodeURI(url); - } - catch(err) { - // Silently swallow error - } - - return urlParse(url); -} - -function Cookie(options) { - options = options || {}; - - Object.keys(options).forEach(function(prop) { - if (Cookie.prototype.hasOwnProperty(prop) && - Cookie.prototype[prop] !== options[prop] && - prop.substr(0,1) !== '_') - { - this[prop] = options[prop]; - } - }, this); - - this.creation = this.creation || new Date(); - - // used to break creation ties in cookieCompare(): - Object.defineProperty(this, 'creationIndex', { - configurable: false, - enumerable: false, // important for assert.deepEqual checks - writable: true, - value: ++Cookie.cookiesCreated - }); -} - -Cookie.cookiesCreated = 0; // incremented each time a cookie is created - -Cookie.parse = parse; -Cookie.fromJSON = fromJSON; - -Cookie.prototype.key = ""; -Cookie.prototype.value = ""; - -// the order in which the RFC has them: -Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity -Cookie.prototype.maxAge = null; // takes precedence over expires for TTL -Cookie.prototype.domain = null; -Cookie.prototype.path = null; -Cookie.prototype.secure = false; -Cookie.prototype.httpOnly = false; -Cookie.prototype.extensions = null; - -// set by the CookieJar: -Cookie.prototype.hostOnly = null; // boolean when set -Cookie.prototype.pathIsDefault = null; // boolean when set -Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse -Cookie.prototype.lastAccessed = null; // Date when set -Object.defineProperty(Cookie.prototype, 'creationIndex', { - configurable: true, - enumerable: false, - writable: true, - value: 0 -}); - -Cookie.serializableProperties = Object.keys(Cookie.prototype) - .filter(function(prop) { - return !( - Cookie.prototype[prop] instanceof Function || - prop === 'creationIndex' || - prop.substr(0,1) === '_' - ); - }); - -Cookie.prototype.inspect = function inspect() { - var now = Date.now(); - return 'Cookie="'+this.toString() + - '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + - '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + - '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + - '"'; -}; - -Cookie.prototype.toJSON = function() { - var obj = {}; - - var props = Cookie.serializableProperties; - for (var i=0; i suffixLen) { - var publicSuffix = parts.slice(0,suffixLen+1).reverse().join('.'); - return converted ? punycode.toUnicode(publicSuffix) : publicSuffix; - } - - return null; -}; - -// The following generated structure is used under the MPL version 2.0 -// See public-suffix.txt for more information - -var index = module.exports.index = Object.freeze( -{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"ar":true,"com.ar":true,"edu.ar":true,"gob.ar":true,"gov.ar":true,"int.ar":true,"mil.ar":true,"net.ar":true,"org.ar":true,"tur.ar":true,"arpa":true,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"au":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"co.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"tv.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"eco.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"leg.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mp.br":true,"mus.br":true,"net.br":true,"*.nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bv":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"co.cm":true,"com.cm":true,"gov.cm":true,"net.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cw":true,"com.cw":true,"edu.cw":true,"net.cw":true,"org.cw":true,"cx":true,"gov.cx":true,"ac.cy":true,"biz.cy":true,"com.cy":true,"ekloges.cy":true,"gov.cy":true,"ltd.cy":true,"name.cy":true,"net.cy":true,"org.cy":true,"parliament.cy":true,"press.cy":true,"pro.cy":true,"tm.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"et":true,"com.et":true,"gov.et":true,"org.et":true,"edu.et":true,"biz.et":true,"name.et":true,"info.et":true,"net.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gb":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"net.gg":true,"org.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"co.gl":true,"com.gl":true,"edu.gl":true,"net.gl":true,"org.gl":true,"gm":true,"gn":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"gt":true,"com.gt":true,"edu.gt":true,"gob.gt":true,"ind.gt":true,"mil.gt":true,"net.gt":true,"org.gt":true,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"biz.id":true,"co.id":true,"desa.id":true,"go.id":true,"mil.id":true,"my.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"il":true,"ac.il":true,"co.il":true,"gov.il":true,"idf.il":true,"k12.il":true,"muni.il":true,"net.il":true,"org.il":true,"im":true,"ac.im":true,"co.im":true,"com.im":true,"ltd.co.im":true,"net.im":true,"org.im":true,"plc.co.im":true,"tt.im":true,"tv.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"abr.it":true,"abruzzo.it":true,"aosta-valley.it":true,"aostavalley.it":true,"bas.it":true,"basilicata.it":true,"cal.it":true,"calabria.it":true,"cam.it":true,"campania.it":true,"emilia-romagna.it":true,"emiliaromagna.it":true,"emr.it":true,"friuli-v-giulia.it":true,"friuli-ve-giulia.it":true,"friuli-vegiulia.it":true,"friuli-venezia-giulia.it":true,"friuli-veneziagiulia.it":true,"friuli-vgiulia.it":true,"friuliv-giulia.it":true,"friulive-giulia.it":true,"friulivegiulia.it":true,"friulivenezia-giulia.it":true,"friuliveneziagiulia.it":true,"friulivgiulia.it":true,"fvg.it":true,"laz.it":true,"lazio.it":true,"lig.it":true,"liguria.it":true,"lom.it":true,"lombardia.it":true,"lombardy.it":true,"lucania.it":true,"mar.it":true,"marche.it":true,"mol.it":true,"molise.it":true,"piedmont.it":true,"piemonte.it":true,"pmn.it":true,"pug.it":true,"puglia.it":true,"sar.it":true,"sardegna.it":true,"sardinia.it":true,"sic.it":true,"sicilia.it":true,"sicily.it":true,"taa.it":true,"tos.it":true,"toscana.it":true,"trentino-a-adige.it":true,"trentino-aadige.it":true,"trentino-alto-adige.it":true,"trentino-altoadige.it":true,"trentino-s-tirol.it":true,"trentino-stirol.it":true,"trentino-sud-tirol.it":true,"trentino-sudtirol.it":true,"trentino-sued-tirol.it":true,"trentino-suedtirol.it":true,"trentinoa-adige.it":true,"trentinoaadige.it":true,"trentinoalto-adige.it":true,"trentinoaltoadige.it":true,"trentinos-tirol.it":true,"trentinostirol.it":true,"trentinosud-tirol.it":true,"trentinosudtirol.it":true,"trentinosued-tirol.it":true,"trentinosuedtirol.it":true,"tuscany.it":true,"umb.it":true,"umbria.it":true,"val-d-aosta.it":true,"val-daosta.it":true,"vald-aosta.it":true,"valdaosta.it":true,"valle-aosta.it":true,"valle-d-aosta.it":true,"valle-daosta.it":true,"valleaosta.it":true,"valled-aosta.it":true,"valledaosta.it":true,"vallee-aoste.it":true,"valleeaoste.it":true,"vao.it":true,"vda.it":true,"ven.it":true,"veneto.it":true,"ag.it":true,"agrigento.it":true,"al.it":true,"alessandria.it":true,"alto-adige.it":true,"altoadige.it":true,"an.it":true,"ancona.it":true,"andria-barletta-trani.it":true,"andria-trani-barletta.it":true,"andriabarlettatrani.it":true,"andriatranibarletta.it":true,"ao.it":true,"aosta.it":true,"aoste.it":true,"ap.it":true,"aq.it":true,"aquila.it":true,"ar.it":true,"arezzo.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"asti.it":true,"at.it":true,"av.it":true,"avellino.it":true,"ba.it":true,"balsan.it":true,"bari.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"belluno.it":true,"benevento.it":true,"bergamo.it":true,"bg.it":true,"bi.it":true,"biella.it":true,"bl.it":true,"bn.it":true,"bo.it":true,"bologna.it":true,"bolzano.it":true,"bozen.it":true,"br.it":true,"brescia.it":true,"brindisi.it":true,"bs.it":true,"bt.it":true,"bz.it":true,"ca.it":true,"cagliari.it":true,"caltanissetta.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"campobasso.it":true,"carbonia-iglesias.it":true,"carboniaiglesias.it":true,"carrara-massa.it":true,"carraramassa.it":true,"caserta.it":true,"catania.it":true,"catanzaro.it":true,"cb.it":true,"ce.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"ch.it":true,"chieti.it":true,"ci.it":true,"cl.it":true,"cn.it":true,"co.it":true,"como.it":true,"cosenza.it":true,"cr.it":true,"cremona.it":true,"crotone.it":true,"cs.it":true,"ct.it":true,"cuneo.it":true,"cz.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"en.it":true,"enna.it":true,"fc.it":true,"fe.it":true,"fermo.it":true,"ferrara.it":true,"fg.it":true,"fi.it":true,"firenze.it":true,"florence.it":true,"fm.it":true,"foggia.it":true,"forli-cesena.it":true,"forlicesena.it":true,"fr.it":true,"frosinone.it":true,"ge.it":true,"genoa.it":true,"genova.it":true,"go.it":true,"gorizia.it":true,"gr.it":true,"grosseto.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"im.it":true,"imperia.it":true,"is.it":true,"isernia.it":true,"kr.it":true,"la-spezia.it":true,"laquila.it":true,"laspezia.it":true,"latina.it":true,"lc.it":true,"le.it":true,"lecce.it":true,"lecco.it":true,"li.it":true,"livorno.it":true,"lo.it":true,"lodi.it":true,"lt.it":true,"lu.it":true,"lucca.it":true,"macerata.it":true,"mantova.it":true,"massa-carrara.it":true,"massacarrara.it":true,"matera.it":true,"mb.it":true,"mc.it":true,"me.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"messina.it":true,"mi.it":true,"milan.it":true,"milano.it":true,"mn.it":true,"mo.it":true,"modena.it":true,"monza-brianza.it":true,"monza-e-della-brianza.it":true,"monza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"ms.it":true,"mt.it":true,"na.it":true,"naples.it":true,"napoli.it":true,"no.it":true,"novara.it":true,"nu.it":true,"nuoro.it":true,"og.it":true,"ogliastra.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"or.it":true,"oristano.it":true,"ot.it":true,"pa.it":true,"padova.it":true,"padua.it":true,"palermo.it":true,"parma.it":true,"pavia.it":true,"pc.it":true,"pd.it":true,"pe.it":true,"perugia.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"pescara.it":true,"pg.it":true,"pi.it":true,"piacenza.it":true,"pisa.it":true,"pistoia.it":true,"pn.it":true,"po.it":true,"pordenone.it":true,"potenza.it":true,"pr.it":true,"prato.it":true,"pt.it":true,"pu.it":true,"pv.it":true,"pz.it":true,"ra.it":true,"ragusa.it":true,"ravenna.it":true,"rc.it":true,"re.it":true,"reggio-calabria.it":true,"reggio-emilia.it":true,"reggiocalabria.it":true,"reggioemilia.it":true,"rg.it":true,"ri.it":true,"rieti.it":true,"rimini.it":true,"rm.it":true,"rn.it":true,"ro.it":true,"roma.it":true,"rome.it":true,"rovigo.it":true,"sa.it":true,"salerno.it":true,"sassari.it":true,"savona.it":true,"si.it":true,"siena.it":true,"siracusa.it":true,"so.it":true,"sondrio.it":true,"sp.it":true,"sr.it":true,"ss.it":true,"suedtirol.it":true,"sv.it":true,"ta.it":true,"taranto.it":true,"te.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"teramo.it":true,"terni.it":true,"tn.it":true,"to.it":true,"torino.it":true,"tp.it":true,"tr.it":true,"trani-andria-barletta.it":true,"trani-barletta-andria.it":true,"traniandriabarletta.it":true,"tranibarlettaandria.it":true,"trapani.it":true,"trentino.it":true,"trento.it":true,"treviso.it":true,"trieste.it":true,"ts.it":true,"turin.it":true,"tv.it":true,"ud.it":true,"udine.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"va.it":true,"varese.it":true,"vb.it":true,"vc.it":true,"ve.it":true,"venezia.it":true,"venice.it":true,"verbania.it":true,"vercelli.it":true,"verona.it":true,"vi.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vicenza.it":true,"viterbo.it":true,"vr.it":true,"vs.it":true,"vt.it":true,"vv.it":true,"je":true,"co.je":true,"net.je":true,"org.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"aichi.jp":true,"akita.jp":true,"aomori.jp":true,"chiba.jp":true,"ehime.jp":true,"fukui.jp":true,"fukuoka.jp":true,"fukushima.jp":true,"gifu.jp":true,"gunma.jp":true,"hiroshima.jp":true,"hokkaido.jp":true,"hyogo.jp":true,"ibaraki.jp":true,"ishikawa.jp":true,"iwate.jp":true,"kagawa.jp":true,"kagoshima.jp":true,"kanagawa.jp":true,"kochi.jp":true,"kumamoto.jp":true,"kyoto.jp":true,"mie.jp":true,"miyagi.jp":true,"miyazaki.jp":true,"nagano.jp":true,"nagasaki.jp":true,"nara.jp":true,"niigata.jp":true,"oita.jp":true,"okayama.jp":true,"okinawa.jp":true,"osaka.jp":true,"saga.jp":true,"saitama.jp":true,"shiga.jp":true,"shimane.jp":true,"shizuoka.jp":true,"tochigi.jp":true,"tokushima.jp":true,"tokyo.jp":true,"tottori.jp":true,"toyama.jp":true,"wakayama.jp":true,"yamagata.jp":true,"yamaguchi.jp":true,"yamanashi.jp":true,"xn--4pvxs.jp":true,"xn--vgu402c.jp":true,"xn--c3s14m.jp":true,"xn--f6qx53a.jp":true,"xn--8pvr4u.jp":true,"xn--uist22h.jp":true,"xn--djrs72d6uy.jp":true,"xn--mkru45i.jp":true,"xn--0trq7p7nn.jp":true,"xn--8ltr62k.jp":true,"xn--2m4a15e.jp":true,"xn--efvn9s.jp":true,"xn--32vp30h.jp":true,"xn--4it797k.jp":true,"xn--1lqs71d.jp":true,"xn--5rtp49c.jp":true,"xn--5js045d.jp":true,"xn--ehqz56n.jp":true,"xn--1lqs03n.jp":true,"xn--qqqt11m.jp":true,"xn--kbrq7o.jp":true,"xn--pssu33l.jp":true,"xn--ntsq17g.jp":true,"xn--uisz3g.jp":true,"xn--6btw5a.jp":true,"xn--1ctwo.jp":true,"xn--6orx2r.jp":true,"xn--rht61e.jp":true,"xn--rht27z.jp":true,"xn--djty4k.jp":true,"xn--nit225k.jp":true,"xn--rht3d.jp":true,"xn--klty5x.jp":true,"xn--kltx9a.jp":true,"xn--kltp7d.jp":true,"xn--uuwu58a.jp":true,"xn--zbx025d.jp":true,"xn--ntso0iqx3a.jp":true,"xn--elqq16h.jp":true,"xn--4it168d.jp":true,"xn--klt787d.jp":true,"xn--rny31h.jp":true,"xn--7t0a264c.jp":true,"xn--5rtq34k.jp":true,"xn--k7yn95e.jp":true,"xn--tor131o.jp":true,"xn--d5qv7z876c.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.nagoya.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.yokohama.jp":true,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.nagoya.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.yokohama.jp":false,"aisai.aichi.jp":true,"ama.aichi.jp":true,"anjo.aichi.jp":true,"asuke.aichi.jp":true,"chiryu.aichi.jp":true,"chita.aichi.jp":true,"fuso.aichi.jp":true,"gamagori.aichi.jp":true,"handa.aichi.jp":true,"hazu.aichi.jp":true,"hekinan.aichi.jp":true,"higashiura.aichi.jp":true,"ichinomiya.aichi.jp":true,"inazawa.aichi.jp":true,"inuyama.aichi.jp":true,"isshiki.aichi.jp":true,"iwakura.aichi.jp":true,"kanie.aichi.jp":true,"kariya.aichi.jp":true,"kasugai.aichi.jp":true,"kira.aichi.jp":true,"kiyosu.aichi.jp":true,"komaki.aichi.jp":true,"konan.aichi.jp":true,"kota.aichi.jp":true,"mihama.aichi.jp":true,"miyoshi.aichi.jp":true,"nishio.aichi.jp":true,"nisshin.aichi.jp":true,"obu.aichi.jp":true,"oguchi.aichi.jp":true,"oharu.aichi.jp":true,"okazaki.aichi.jp":true,"owariasahi.aichi.jp":true,"seto.aichi.jp":true,"shikatsu.aichi.jp":true,"shinshiro.aichi.jp":true,"shitara.aichi.jp":true,"tahara.aichi.jp":true,"takahama.aichi.jp":true,"tobishima.aichi.jp":true,"toei.aichi.jp":true,"togo.aichi.jp":true,"tokai.aichi.jp":true,"tokoname.aichi.jp":true,"toyoake.aichi.jp":true,"toyohashi.aichi.jp":true,"toyokawa.aichi.jp":true,"toyone.aichi.jp":true,"toyota.aichi.jp":true,"tsushima.aichi.jp":true,"yatomi.aichi.jp":true,"akita.akita.jp":true,"daisen.akita.jp":true,"fujisato.akita.jp":true,"gojome.akita.jp":true,"hachirogata.akita.jp":true,"happou.akita.jp":true,"higashinaruse.akita.jp":true,"honjo.akita.jp":true,"honjyo.akita.jp":true,"ikawa.akita.jp":true,"kamikoani.akita.jp":true,"kamioka.akita.jp":true,"katagami.akita.jp":true,"kazuno.akita.jp":true,"kitaakita.akita.jp":true,"kosaka.akita.jp":true,"kyowa.akita.jp":true,"misato.akita.jp":true,"mitane.akita.jp":true,"moriyoshi.akita.jp":true,"nikaho.akita.jp":true,"noshiro.akita.jp":true,"odate.akita.jp":true,"oga.akita.jp":true,"ogata.akita.jp":true,"semboku.akita.jp":true,"yokote.akita.jp":true,"yurihonjo.akita.jp":true,"aomori.aomori.jp":true,"gonohe.aomori.jp":true,"hachinohe.aomori.jp":true,"hashikami.aomori.jp":true,"hiranai.aomori.jp":true,"hirosaki.aomori.jp":true,"itayanagi.aomori.jp":true,"kuroishi.aomori.jp":true,"misawa.aomori.jp":true,"mutsu.aomori.jp":true,"nakadomari.aomori.jp":true,"noheji.aomori.jp":true,"oirase.aomori.jp":true,"owani.aomori.jp":true,"rokunohe.aomori.jp":true,"sannohe.aomori.jp":true,"shichinohe.aomori.jp":true,"shingo.aomori.jp":true,"takko.aomori.jp":true,"towada.aomori.jp":true,"tsugaru.aomori.jp":true,"tsuruta.aomori.jp":true,"abiko.chiba.jp":true,"asahi.chiba.jp":true,"chonan.chiba.jp":true,"chosei.chiba.jp":true,"choshi.chiba.jp":true,"chuo.chiba.jp":true,"funabashi.chiba.jp":true,"futtsu.chiba.jp":true,"hanamigawa.chiba.jp":true,"ichihara.chiba.jp":true,"ichikawa.chiba.jp":true,"ichinomiya.chiba.jp":true,"inzai.chiba.jp":true,"isumi.chiba.jp":true,"kamagaya.chiba.jp":true,"kamogawa.chiba.jp":true,"kashiwa.chiba.jp":true,"katori.chiba.jp":true,"katsuura.chiba.jp":true,"kimitsu.chiba.jp":true,"kisarazu.chiba.jp":true,"kozaki.chiba.jp":true,"kujukuri.chiba.jp":true,"kyonan.chiba.jp":true,"matsudo.chiba.jp":true,"midori.chiba.jp":true,"mihama.chiba.jp":true,"minamiboso.chiba.jp":true,"mobara.chiba.jp":true,"mutsuzawa.chiba.jp":true,"nagara.chiba.jp":true,"nagareyama.chiba.jp":true,"narashino.chiba.jp":true,"narita.chiba.jp":true,"noda.chiba.jp":true,"oamishirasato.chiba.jp":true,"omigawa.chiba.jp":true,"onjuku.chiba.jp":true,"otaki.chiba.jp":true,"sakae.chiba.jp":true,"sakura.chiba.jp":true,"shimofusa.chiba.jp":true,"shirako.chiba.jp":true,"shiroi.chiba.jp":true,"shisui.chiba.jp":true,"sodegaura.chiba.jp":true,"sosa.chiba.jp":true,"tako.chiba.jp":true,"tateyama.chiba.jp":true,"togane.chiba.jp":true,"tohnosho.chiba.jp":true,"tomisato.chiba.jp":true,"urayasu.chiba.jp":true,"yachimata.chiba.jp":true,"yachiyo.chiba.jp":true,"yokaichiba.chiba.jp":true,"yokoshibahikari.chiba.jp":true,"yotsukaido.chiba.jp":true,"ainan.ehime.jp":true,"honai.ehime.jp":true,"ikata.ehime.jp":true,"imabari.ehime.jp":true,"iyo.ehime.jp":true,"kamijima.ehime.jp":true,"kihoku.ehime.jp":true,"kumakogen.ehime.jp":true,"masaki.ehime.jp":true,"matsuno.ehime.jp":true,"matsuyama.ehime.jp":true,"namikata.ehime.jp":true,"niihama.ehime.jp":true,"ozu.ehime.jp":true,"saijo.ehime.jp":true,"seiyo.ehime.jp":true,"shikokuchuo.ehime.jp":true,"tobe.ehime.jp":true,"toon.ehime.jp":true,"uchiko.ehime.jp":true,"uwajima.ehime.jp":true,"yawatahama.ehime.jp":true,"echizen.fukui.jp":true,"eiheiji.fukui.jp":true,"fukui.fukui.jp":true,"ikeda.fukui.jp":true,"katsuyama.fukui.jp":true,"mihama.fukui.jp":true,"minamiechizen.fukui.jp":true,"obama.fukui.jp":true,"ohi.fukui.jp":true,"ono.fukui.jp":true,"sabae.fukui.jp":true,"sakai.fukui.jp":true,"takahama.fukui.jp":true,"tsuruga.fukui.jp":true,"wakasa.fukui.jp":true,"ashiya.fukuoka.jp":true,"buzen.fukuoka.jp":true,"chikugo.fukuoka.jp":true,"chikuho.fukuoka.jp":true,"chikujo.fukuoka.jp":true,"chikushino.fukuoka.jp":true,"chikuzen.fukuoka.jp":true,"chuo.fukuoka.jp":true,"dazaifu.fukuoka.jp":true,"fukuchi.fukuoka.jp":true,"hakata.fukuoka.jp":true,"higashi.fukuoka.jp":true,"hirokawa.fukuoka.jp":true,"hisayama.fukuoka.jp":true,"iizuka.fukuoka.jp":true,"inatsuki.fukuoka.jp":true,"kaho.fukuoka.jp":true,"kasuga.fukuoka.jp":true,"kasuya.fukuoka.jp":true,"kawara.fukuoka.jp":true,"keisen.fukuoka.jp":true,"koga.fukuoka.jp":true,"kurate.fukuoka.jp":true,"kurogi.fukuoka.jp":true,"kurume.fukuoka.jp":true,"minami.fukuoka.jp":true,"miyako.fukuoka.jp":true,"miyama.fukuoka.jp":true,"miyawaka.fukuoka.jp":true,"mizumaki.fukuoka.jp":true,"munakata.fukuoka.jp":true,"nakagawa.fukuoka.jp":true,"nakama.fukuoka.jp":true,"nishi.fukuoka.jp":true,"nogata.fukuoka.jp":true,"ogori.fukuoka.jp":true,"okagaki.fukuoka.jp":true,"okawa.fukuoka.jp":true,"oki.fukuoka.jp":true,"omuta.fukuoka.jp":true,"onga.fukuoka.jp":true,"onojo.fukuoka.jp":true,"oto.fukuoka.jp":true,"saigawa.fukuoka.jp":true,"sasaguri.fukuoka.jp":true,"shingu.fukuoka.jp":true,"shinyoshitomi.fukuoka.jp":true,"shonai.fukuoka.jp":true,"soeda.fukuoka.jp":true,"sue.fukuoka.jp":true,"tachiarai.fukuoka.jp":true,"tagawa.fukuoka.jp":true,"takata.fukuoka.jp":true,"toho.fukuoka.jp":true,"toyotsu.fukuoka.jp":true,"tsuiki.fukuoka.jp":true,"ukiha.fukuoka.jp":true,"umi.fukuoka.jp":true,"usui.fukuoka.jp":true,"yamada.fukuoka.jp":true,"yame.fukuoka.jp":true,"yanagawa.fukuoka.jp":true,"yukuhashi.fukuoka.jp":true,"aizubange.fukushima.jp":true,"aizumisato.fukushima.jp":true,"aizuwakamatsu.fukushima.jp":true,"asakawa.fukushima.jp":true,"bandai.fukushima.jp":true,"date.fukushima.jp":true,"fukushima.fukushima.jp":true,"furudono.fukushima.jp":true,"futaba.fukushima.jp":true,"hanawa.fukushima.jp":true,"higashi.fukushima.jp":true,"hirata.fukushima.jp":true,"hirono.fukushima.jp":true,"iitate.fukushima.jp":true,"inawashiro.fukushima.jp":true,"ishikawa.fukushima.jp":true,"iwaki.fukushima.jp":true,"izumizaki.fukushima.jp":true,"kagamiishi.fukushima.jp":true,"kaneyama.fukushima.jp":true,"kawamata.fukushima.jp":true,"kitakata.fukushima.jp":true,"kitashiobara.fukushima.jp":true,"koori.fukushima.jp":true,"koriyama.fukushima.jp":true,"kunimi.fukushima.jp":true,"miharu.fukushima.jp":true,"mishima.fukushima.jp":true,"namie.fukushima.jp":true,"nango.fukushima.jp":true,"nishiaizu.fukushima.jp":true,"nishigo.fukushima.jp":true,"okuma.fukushima.jp":true,"omotego.fukushima.jp":true,"ono.fukushima.jp":true,"otama.fukushima.jp":true,"samegawa.fukushima.jp":true,"shimogo.fukushima.jp":true,"shirakawa.fukushima.jp":true,"showa.fukushima.jp":true,"soma.fukushima.jp":true,"sukagawa.fukushima.jp":true,"taishin.fukushima.jp":true,"tamakawa.fukushima.jp":true,"tanagura.fukushima.jp":true,"tenei.fukushima.jp":true,"yabuki.fukushima.jp":true,"yamato.fukushima.jp":true,"yamatsuri.fukushima.jp":true,"yanaizu.fukushima.jp":true,"yugawa.fukushima.jp":true,"anpachi.gifu.jp":true,"ena.gifu.jp":true,"gifu.gifu.jp":true,"ginan.gifu.jp":true,"godo.gifu.jp":true,"gujo.gifu.jp":true,"hashima.gifu.jp":true,"hichiso.gifu.jp":true,"hida.gifu.jp":true,"higashishirakawa.gifu.jp":true,"ibigawa.gifu.jp":true,"ikeda.gifu.jp":true,"kakamigahara.gifu.jp":true,"kani.gifu.jp":true,"kasahara.gifu.jp":true,"kasamatsu.gifu.jp":true,"kawaue.gifu.jp":true,"kitagata.gifu.jp":true,"mino.gifu.jp":true,"minokamo.gifu.jp":true,"mitake.gifu.jp":true,"mizunami.gifu.jp":true,"motosu.gifu.jp":true,"nakatsugawa.gifu.jp":true,"ogaki.gifu.jp":true,"sakahogi.gifu.jp":true,"seki.gifu.jp":true,"sekigahara.gifu.jp":true,"shirakawa.gifu.jp":true,"tajimi.gifu.jp":true,"takayama.gifu.jp":true,"tarui.gifu.jp":true,"toki.gifu.jp":true,"tomika.gifu.jp":true,"wanouchi.gifu.jp":true,"yamagata.gifu.jp":true,"yaotsu.gifu.jp":true,"yoro.gifu.jp":true,"annaka.gunma.jp":true,"chiyoda.gunma.jp":true,"fujioka.gunma.jp":true,"higashiagatsuma.gunma.jp":true,"isesaki.gunma.jp":true,"itakura.gunma.jp":true,"kanna.gunma.jp":true,"kanra.gunma.jp":true,"katashina.gunma.jp":true,"kawaba.gunma.jp":true,"kiryu.gunma.jp":true,"kusatsu.gunma.jp":true,"maebashi.gunma.jp":true,"meiwa.gunma.jp":true,"midori.gunma.jp":true,"minakami.gunma.jp":true,"naganohara.gunma.jp":true,"nakanojo.gunma.jp":true,"nanmoku.gunma.jp":true,"numata.gunma.jp":true,"oizumi.gunma.jp":true,"ora.gunma.jp":true,"ota.gunma.jp":true,"shibukawa.gunma.jp":true,"shimonita.gunma.jp":true,"shinto.gunma.jp":true,"showa.gunma.jp":true,"takasaki.gunma.jp":true,"takayama.gunma.jp":true,"tamamura.gunma.jp":true,"tatebayashi.gunma.jp":true,"tomioka.gunma.jp":true,"tsukiyono.gunma.jp":true,"tsumagoi.gunma.jp":true,"ueno.gunma.jp":true,"yoshioka.gunma.jp":true,"asaminami.hiroshima.jp":true,"daiwa.hiroshima.jp":true,"etajima.hiroshima.jp":true,"fuchu.hiroshima.jp":true,"fukuyama.hiroshima.jp":true,"hatsukaichi.hiroshima.jp":true,"higashihiroshima.hiroshima.jp":true,"hongo.hiroshima.jp":true,"jinsekikogen.hiroshima.jp":true,"kaita.hiroshima.jp":true,"kui.hiroshima.jp":true,"kumano.hiroshima.jp":true,"kure.hiroshima.jp":true,"mihara.hiroshima.jp":true,"miyoshi.hiroshima.jp":true,"naka.hiroshima.jp":true,"onomichi.hiroshima.jp":true,"osakikamijima.hiroshima.jp":true,"otake.hiroshima.jp":true,"saka.hiroshima.jp":true,"sera.hiroshima.jp":true,"seranishi.hiroshima.jp":true,"shinichi.hiroshima.jp":true,"shobara.hiroshima.jp":true,"takehara.hiroshima.jp":true,"abashiri.hokkaido.jp":true,"abira.hokkaido.jp":true,"aibetsu.hokkaido.jp":true,"akabira.hokkaido.jp":true,"akkeshi.hokkaido.jp":true,"asahikawa.hokkaido.jp":true,"ashibetsu.hokkaido.jp":true,"ashoro.hokkaido.jp":true,"assabu.hokkaido.jp":true,"atsuma.hokkaido.jp":true,"bibai.hokkaido.jp":true,"biei.hokkaido.jp":true,"bifuka.hokkaido.jp":true,"bihoro.hokkaido.jp":true,"biratori.hokkaido.jp":true,"chippubetsu.hokkaido.jp":true,"chitose.hokkaido.jp":true,"date.hokkaido.jp":true,"ebetsu.hokkaido.jp":true,"embetsu.hokkaido.jp":true,"eniwa.hokkaido.jp":true,"erimo.hokkaido.jp":true,"esan.hokkaido.jp":true,"esashi.hokkaido.jp":true,"fukagawa.hokkaido.jp":true,"fukushima.hokkaido.jp":true,"furano.hokkaido.jp":true,"furubira.hokkaido.jp":true,"haboro.hokkaido.jp":true,"hakodate.hokkaido.jp":true,"hamatonbetsu.hokkaido.jp":true,"hidaka.hokkaido.jp":true,"higashikagura.hokkaido.jp":true,"higashikawa.hokkaido.jp":true,"hiroo.hokkaido.jp":true,"hokuryu.hokkaido.jp":true,"hokuto.hokkaido.jp":true,"honbetsu.hokkaido.jp":true,"horokanai.hokkaido.jp":true,"horonobe.hokkaido.jp":true,"ikeda.hokkaido.jp":true,"imakane.hokkaido.jp":true,"ishikari.hokkaido.jp":true,"iwamizawa.hokkaido.jp":true,"iwanai.hokkaido.jp":true,"kamifurano.hokkaido.jp":true,"kamikawa.hokkaido.jp":true,"kamishihoro.hokkaido.jp":true,"kamisunagawa.hokkaido.jp":true,"kamoenai.hokkaido.jp":true,"kayabe.hokkaido.jp":true,"kembuchi.hokkaido.jp":true,"kikonai.hokkaido.jp":true,"kimobetsu.hokkaido.jp":true,"kitahiroshima.hokkaido.jp":true,"kitami.hokkaido.jp":true,"kiyosato.hokkaido.jp":true,"koshimizu.hokkaido.jp":true,"kunneppu.hokkaido.jp":true,"kuriyama.hokkaido.jp":true,"kuromatsunai.hokkaido.jp":true,"kushiro.hokkaido.jp":true,"kutchan.hokkaido.jp":true,"kyowa.hokkaido.jp":true,"mashike.hokkaido.jp":true,"matsumae.hokkaido.jp":true,"mikasa.hokkaido.jp":true,"minamifurano.hokkaido.jp":true,"mombetsu.hokkaido.jp":true,"moseushi.hokkaido.jp":true,"mukawa.hokkaido.jp":true,"muroran.hokkaido.jp":true,"naie.hokkaido.jp":true,"nakagawa.hokkaido.jp":true,"nakasatsunai.hokkaido.jp":true,"nakatombetsu.hokkaido.jp":true,"nanae.hokkaido.jp":true,"nanporo.hokkaido.jp":true,"nayoro.hokkaido.jp":true,"nemuro.hokkaido.jp":true,"niikappu.hokkaido.jp":true,"niki.hokkaido.jp":true,"nishiokoppe.hokkaido.jp":true,"noboribetsu.hokkaido.jp":true,"numata.hokkaido.jp":true,"obihiro.hokkaido.jp":true,"obira.hokkaido.jp":true,"oketo.hokkaido.jp":true,"okoppe.hokkaido.jp":true,"otaru.hokkaido.jp":true,"otobe.hokkaido.jp":true,"otofuke.hokkaido.jp":true,"otoineppu.hokkaido.jp":true,"oumu.hokkaido.jp":true,"ozora.hokkaido.jp":true,"pippu.hokkaido.jp":true,"rankoshi.hokkaido.jp":true,"rebun.hokkaido.jp":true,"rikubetsu.hokkaido.jp":true,"rishiri.hokkaido.jp":true,"rishirifuji.hokkaido.jp":true,"saroma.hokkaido.jp":true,"sarufutsu.hokkaido.jp":true,"shakotan.hokkaido.jp":true,"shari.hokkaido.jp":true,"shibecha.hokkaido.jp":true,"shibetsu.hokkaido.jp":true,"shikabe.hokkaido.jp":true,"shikaoi.hokkaido.jp":true,"shimamaki.hokkaido.jp":true,"shimizu.hokkaido.jp":true,"shimokawa.hokkaido.jp":true,"shinshinotsu.hokkaido.jp":true,"shintoku.hokkaido.jp":true,"shiranuka.hokkaido.jp":true,"shiraoi.hokkaido.jp":true,"shiriuchi.hokkaido.jp":true,"sobetsu.hokkaido.jp":true,"sunagawa.hokkaido.jp":true,"taiki.hokkaido.jp":true,"takasu.hokkaido.jp":true,"takikawa.hokkaido.jp":true,"takinoue.hokkaido.jp":true,"teshikaga.hokkaido.jp":true,"tobetsu.hokkaido.jp":true,"tohma.hokkaido.jp":true,"tomakomai.hokkaido.jp":true,"tomari.hokkaido.jp":true,"toya.hokkaido.jp":true,"toyako.hokkaido.jp":true,"toyotomi.hokkaido.jp":true,"toyoura.hokkaido.jp":true,"tsubetsu.hokkaido.jp":true,"tsukigata.hokkaido.jp":true,"urakawa.hokkaido.jp":true,"urausu.hokkaido.jp":true,"uryu.hokkaido.jp":true,"utashinai.hokkaido.jp":true,"wakkanai.hokkaido.jp":true,"wassamu.hokkaido.jp":true,"yakumo.hokkaido.jp":true,"yoichi.hokkaido.jp":true,"aioi.hyogo.jp":true,"akashi.hyogo.jp":true,"ako.hyogo.jp":true,"amagasaki.hyogo.jp":true,"aogaki.hyogo.jp":true,"asago.hyogo.jp":true,"ashiya.hyogo.jp":true,"awaji.hyogo.jp":true,"fukusaki.hyogo.jp":true,"goshiki.hyogo.jp":true,"harima.hyogo.jp":true,"himeji.hyogo.jp":true,"ichikawa.hyogo.jp":true,"inagawa.hyogo.jp":true,"itami.hyogo.jp":true,"kakogawa.hyogo.jp":true,"kamigori.hyogo.jp":true,"kamikawa.hyogo.jp":true,"kasai.hyogo.jp":true,"kasuga.hyogo.jp":true,"kawanishi.hyogo.jp":true,"miki.hyogo.jp":true,"minamiawaji.hyogo.jp":true,"nishinomiya.hyogo.jp":true,"nishiwaki.hyogo.jp":true,"ono.hyogo.jp":true,"sanda.hyogo.jp":true,"sannan.hyogo.jp":true,"sasayama.hyogo.jp":true,"sayo.hyogo.jp":true,"shingu.hyogo.jp":true,"shinonsen.hyogo.jp":true,"shiso.hyogo.jp":true,"sumoto.hyogo.jp":true,"taishi.hyogo.jp":true,"taka.hyogo.jp":true,"takarazuka.hyogo.jp":true,"takasago.hyogo.jp":true,"takino.hyogo.jp":true,"tamba.hyogo.jp":true,"tatsuno.hyogo.jp":true,"toyooka.hyogo.jp":true,"yabu.hyogo.jp":true,"yashiro.hyogo.jp":true,"yoka.hyogo.jp":true,"yokawa.hyogo.jp":true,"ami.ibaraki.jp":true,"asahi.ibaraki.jp":true,"bando.ibaraki.jp":true,"chikusei.ibaraki.jp":true,"daigo.ibaraki.jp":true,"fujishiro.ibaraki.jp":true,"hitachi.ibaraki.jp":true,"hitachinaka.ibaraki.jp":true,"hitachiomiya.ibaraki.jp":true,"hitachiota.ibaraki.jp":true,"ibaraki.ibaraki.jp":true,"ina.ibaraki.jp":true,"inashiki.ibaraki.jp":true,"itako.ibaraki.jp":true,"iwama.ibaraki.jp":true,"joso.ibaraki.jp":true,"kamisu.ibaraki.jp":true,"kasama.ibaraki.jp":true,"kashima.ibaraki.jp":true,"kasumigaura.ibaraki.jp":true,"koga.ibaraki.jp":true,"miho.ibaraki.jp":true,"mito.ibaraki.jp":true,"moriya.ibaraki.jp":true,"naka.ibaraki.jp":true,"namegata.ibaraki.jp":true,"oarai.ibaraki.jp":true,"ogawa.ibaraki.jp":true,"omitama.ibaraki.jp":true,"ryugasaki.ibaraki.jp":true,"sakai.ibaraki.jp":true,"sakuragawa.ibaraki.jp":true,"shimodate.ibaraki.jp":true,"shimotsuma.ibaraki.jp":true,"shirosato.ibaraki.jp":true,"sowa.ibaraki.jp":true,"suifu.ibaraki.jp":true,"takahagi.ibaraki.jp":true,"tamatsukuri.ibaraki.jp":true,"tokai.ibaraki.jp":true,"tomobe.ibaraki.jp":true,"tone.ibaraki.jp":true,"toride.ibaraki.jp":true,"tsuchiura.ibaraki.jp":true,"tsukuba.ibaraki.jp":true,"uchihara.ibaraki.jp":true,"ushiku.ibaraki.jp":true,"yachiyo.ibaraki.jp":true,"yamagata.ibaraki.jp":true,"yawara.ibaraki.jp":true,"yuki.ibaraki.jp":true,"anamizu.ishikawa.jp":true,"hakui.ishikawa.jp":true,"hakusan.ishikawa.jp":true,"kaga.ishikawa.jp":true,"kahoku.ishikawa.jp":true,"kanazawa.ishikawa.jp":true,"kawakita.ishikawa.jp":true,"komatsu.ishikawa.jp":true,"nakanoto.ishikawa.jp":true,"nanao.ishikawa.jp":true,"nomi.ishikawa.jp":true,"nonoichi.ishikawa.jp":true,"noto.ishikawa.jp":true,"shika.ishikawa.jp":true,"suzu.ishikawa.jp":true,"tsubata.ishikawa.jp":true,"tsurugi.ishikawa.jp":true,"uchinada.ishikawa.jp":true,"wajima.ishikawa.jp":true,"fudai.iwate.jp":true,"fujisawa.iwate.jp":true,"hanamaki.iwate.jp":true,"hiraizumi.iwate.jp":true,"hirono.iwate.jp":true,"ichinohe.iwate.jp":true,"ichinoseki.iwate.jp":true,"iwaizumi.iwate.jp":true,"iwate.iwate.jp":true,"joboji.iwate.jp":true,"kamaishi.iwate.jp":true,"kanegasaki.iwate.jp":true,"karumai.iwate.jp":true,"kawai.iwate.jp":true,"kitakami.iwate.jp":true,"kuji.iwate.jp":true,"kunohe.iwate.jp":true,"kuzumaki.iwate.jp":true,"miyako.iwate.jp":true,"mizusawa.iwate.jp":true,"morioka.iwate.jp":true,"ninohe.iwate.jp":true,"noda.iwate.jp":true,"ofunato.iwate.jp":true,"oshu.iwate.jp":true,"otsuchi.iwate.jp":true,"rikuzentakata.iwate.jp":true,"shiwa.iwate.jp":true,"shizukuishi.iwate.jp":true,"sumita.iwate.jp":true,"tanohata.iwate.jp":true,"tono.iwate.jp":true,"yahaba.iwate.jp":true,"yamada.iwate.jp":true,"ayagawa.kagawa.jp":true,"higashikagawa.kagawa.jp":true,"kanonji.kagawa.jp":true,"kotohira.kagawa.jp":true,"manno.kagawa.jp":true,"marugame.kagawa.jp":true,"mitoyo.kagawa.jp":true,"naoshima.kagawa.jp":true,"sanuki.kagawa.jp":true,"tadotsu.kagawa.jp":true,"takamatsu.kagawa.jp":true,"tonosho.kagawa.jp":true,"uchinomi.kagawa.jp":true,"utazu.kagawa.jp":true,"zentsuji.kagawa.jp":true,"akune.kagoshima.jp":true,"amami.kagoshima.jp":true,"hioki.kagoshima.jp":true,"isa.kagoshima.jp":true,"isen.kagoshima.jp":true,"izumi.kagoshima.jp":true,"kagoshima.kagoshima.jp":true,"kanoya.kagoshima.jp":true,"kawanabe.kagoshima.jp":true,"kinko.kagoshima.jp":true,"kouyama.kagoshima.jp":true,"makurazaki.kagoshima.jp":true,"matsumoto.kagoshima.jp":true,"minamitane.kagoshima.jp":true,"nakatane.kagoshima.jp":true,"nishinoomote.kagoshima.jp":true,"satsumasendai.kagoshima.jp":true,"soo.kagoshima.jp":true,"tarumizu.kagoshima.jp":true,"yusui.kagoshima.jp":true,"aikawa.kanagawa.jp":true,"atsugi.kanagawa.jp":true,"ayase.kanagawa.jp":true,"chigasaki.kanagawa.jp":true,"ebina.kanagawa.jp":true,"fujisawa.kanagawa.jp":true,"hadano.kanagawa.jp":true,"hakone.kanagawa.jp":true,"hiratsuka.kanagawa.jp":true,"isehara.kanagawa.jp":true,"kaisei.kanagawa.jp":true,"kamakura.kanagawa.jp":true,"kiyokawa.kanagawa.jp":true,"matsuda.kanagawa.jp":true,"minamiashigara.kanagawa.jp":true,"miura.kanagawa.jp":true,"nakai.kanagawa.jp":true,"ninomiya.kanagawa.jp":true,"odawara.kanagawa.jp":true,"oi.kanagawa.jp":true,"oiso.kanagawa.jp":true,"sagamihara.kanagawa.jp":true,"samukawa.kanagawa.jp":true,"tsukui.kanagawa.jp":true,"yamakita.kanagawa.jp":true,"yamato.kanagawa.jp":true,"yokosuka.kanagawa.jp":true,"yugawara.kanagawa.jp":true,"zama.kanagawa.jp":true,"zushi.kanagawa.jp":true,"aki.kochi.jp":true,"geisei.kochi.jp":true,"hidaka.kochi.jp":true,"higashitsuno.kochi.jp":true,"ino.kochi.jp":true,"kagami.kochi.jp":true,"kami.kochi.jp":true,"kitagawa.kochi.jp":true,"kochi.kochi.jp":true,"mihara.kochi.jp":true,"motoyama.kochi.jp":true,"muroto.kochi.jp":true,"nahari.kochi.jp":true,"nakamura.kochi.jp":true,"nankoku.kochi.jp":true,"nishitosa.kochi.jp":true,"niyodogawa.kochi.jp":true,"ochi.kochi.jp":true,"okawa.kochi.jp":true,"otoyo.kochi.jp":true,"otsuki.kochi.jp":true,"sakawa.kochi.jp":true,"sukumo.kochi.jp":true,"susaki.kochi.jp":true,"tosa.kochi.jp":true,"tosashimizu.kochi.jp":true,"toyo.kochi.jp":true,"tsuno.kochi.jp":true,"umaji.kochi.jp":true,"yasuda.kochi.jp":true,"yusuhara.kochi.jp":true,"amakusa.kumamoto.jp":true,"arao.kumamoto.jp":true,"aso.kumamoto.jp":true,"choyo.kumamoto.jp":true,"gyokuto.kumamoto.jp":true,"hitoyoshi.kumamoto.jp":true,"kamiamakusa.kumamoto.jp":true,"kashima.kumamoto.jp":true,"kikuchi.kumamoto.jp":true,"kosa.kumamoto.jp":true,"kumamoto.kumamoto.jp":true,"mashiki.kumamoto.jp":true,"mifune.kumamoto.jp":true,"minamata.kumamoto.jp":true,"minamioguni.kumamoto.jp":true,"nagasu.kumamoto.jp":true,"nishihara.kumamoto.jp":true,"oguni.kumamoto.jp":true,"ozu.kumamoto.jp":true,"sumoto.kumamoto.jp":true,"takamori.kumamoto.jp":true,"uki.kumamoto.jp":true,"uto.kumamoto.jp":true,"yamaga.kumamoto.jp":true,"yamato.kumamoto.jp":true,"yatsushiro.kumamoto.jp":true,"ayabe.kyoto.jp":true,"fukuchiyama.kyoto.jp":true,"higashiyama.kyoto.jp":true,"ide.kyoto.jp":true,"ine.kyoto.jp":true,"joyo.kyoto.jp":true,"kameoka.kyoto.jp":true,"kamo.kyoto.jp":true,"kita.kyoto.jp":true,"kizu.kyoto.jp":true,"kumiyama.kyoto.jp":true,"kyotamba.kyoto.jp":true,"kyotanabe.kyoto.jp":true,"kyotango.kyoto.jp":true,"maizuru.kyoto.jp":true,"minami.kyoto.jp":true,"minamiyamashiro.kyoto.jp":true,"miyazu.kyoto.jp":true,"muko.kyoto.jp":true,"nagaokakyo.kyoto.jp":true,"nakagyo.kyoto.jp":true,"nantan.kyoto.jp":true,"oyamazaki.kyoto.jp":true,"sakyo.kyoto.jp":true,"seika.kyoto.jp":true,"tanabe.kyoto.jp":true,"uji.kyoto.jp":true,"ujitawara.kyoto.jp":true,"wazuka.kyoto.jp":true,"yamashina.kyoto.jp":true,"yawata.kyoto.jp":true,"asahi.mie.jp":true,"inabe.mie.jp":true,"ise.mie.jp":true,"kameyama.mie.jp":true,"kawagoe.mie.jp":true,"kiho.mie.jp":true,"kisosaki.mie.jp":true,"kiwa.mie.jp":true,"komono.mie.jp":true,"kumano.mie.jp":true,"kuwana.mie.jp":true,"matsusaka.mie.jp":true,"meiwa.mie.jp":true,"mihama.mie.jp":true,"minamiise.mie.jp":true,"misugi.mie.jp":true,"miyama.mie.jp":true,"nabari.mie.jp":true,"shima.mie.jp":true,"suzuka.mie.jp":true,"tado.mie.jp":true,"taiki.mie.jp":true,"taki.mie.jp":true,"tamaki.mie.jp":true,"toba.mie.jp":true,"tsu.mie.jp":true,"udono.mie.jp":true,"ureshino.mie.jp":true,"watarai.mie.jp":true,"yokkaichi.mie.jp":true,"furukawa.miyagi.jp":true,"higashimatsushima.miyagi.jp":true,"ishinomaki.miyagi.jp":true,"iwanuma.miyagi.jp":true,"kakuda.miyagi.jp":true,"kami.miyagi.jp":true,"kawasaki.miyagi.jp":true,"kesennuma.miyagi.jp":true,"marumori.miyagi.jp":true,"matsushima.miyagi.jp":true,"minamisanriku.miyagi.jp":true,"misato.miyagi.jp":true,"murata.miyagi.jp":true,"natori.miyagi.jp":true,"ogawara.miyagi.jp":true,"ohira.miyagi.jp":true,"onagawa.miyagi.jp":true,"osaki.miyagi.jp":true,"rifu.miyagi.jp":true,"semine.miyagi.jp":true,"shibata.miyagi.jp":true,"shichikashuku.miyagi.jp":true,"shikama.miyagi.jp":true,"shiogama.miyagi.jp":true,"shiroishi.miyagi.jp":true,"tagajo.miyagi.jp":true,"taiwa.miyagi.jp":true,"tome.miyagi.jp":true,"tomiya.miyagi.jp":true,"wakuya.miyagi.jp":true,"watari.miyagi.jp":true,"yamamoto.miyagi.jp":true,"zao.miyagi.jp":true,"aya.miyazaki.jp":true,"ebino.miyazaki.jp":true,"gokase.miyazaki.jp":true,"hyuga.miyazaki.jp":true,"kadogawa.miyazaki.jp":true,"kawaminami.miyazaki.jp":true,"kijo.miyazaki.jp":true,"kitagawa.miyazaki.jp":true,"kitakata.miyazaki.jp":true,"kitaura.miyazaki.jp":true,"kobayashi.miyazaki.jp":true,"kunitomi.miyazaki.jp":true,"kushima.miyazaki.jp":true,"mimata.miyazaki.jp":true,"miyakonojo.miyazaki.jp":true,"miyazaki.miyazaki.jp":true,"morotsuka.miyazaki.jp":true,"nichinan.miyazaki.jp":true,"nishimera.miyazaki.jp":true,"nobeoka.miyazaki.jp":true,"saito.miyazaki.jp":true,"shiiba.miyazaki.jp":true,"shintomi.miyazaki.jp":true,"takaharu.miyazaki.jp":true,"takanabe.miyazaki.jp":true,"takazaki.miyazaki.jp":true,"tsuno.miyazaki.jp":true,"achi.nagano.jp":true,"agematsu.nagano.jp":true,"anan.nagano.jp":true,"aoki.nagano.jp":true,"asahi.nagano.jp":true,"azumino.nagano.jp":true,"chikuhoku.nagano.jp":true,"chikuma.nagano.jp":true,"chino.nagano.jp":true,"fujimi.nagano.jp":true,"hakuba.nagano.jp":true,"hara.nagano.jp":true,"hiraya.nagano.jp":true,"iida.nagano.jp":true,"iijima.nagano.jp":true,"iiyama.nagano.jp":true,"iizuna.nagano.jp":true,"ikeda.nagano.jp":true,"ikusaka.nagano.jp":true,"ina.nagano.jp":true,"karuizawa.nagano.jp":true,"kawakami.nagano.jp":true,"kiso.nagano.jp":true,"kisofukushima.nagano.jp":true,"kitaaiki.nagano.jp":true,"komagane.nagano.jp":true,"komoro.nagano.jp":true,"matsukawa.nagano.jp":true,"matsumoto.nagano.jp":true,"miasa.nagano.jp":true,"minamiaiki.nagano.jp":true,"minamimaki.nagano.jp":true,"minamiminowa.nagano.jp":true,"minowa.nagano.jp":true,"miyada.nagano.jp":true,"miyota.nagano.jp":true,"mochizuki.nagano.jp":true,"nagano.nagano.jp":true,"nagawa.nagano.jp":true,"nagiso.nagano.jp":true,"nakagawa.nagano.jp":true,"nakano.nagano.jp":true,"nozawaonsen.nagano.jp":true,"obuse.nagano.jp":true,"ogawa.nagano.jp":true,"okaya.nagano.jp":true,"omachi.nagano.jp":true,"omi.nagano.jp":true,"ookuwa.nagano.jp":true,"ooshika.nagano.jp":true,"otaki.nagano.jp":true,"otari.nagano.jp":true,"sakae.nagano.jp":true,"sakaki.nagano.jp":true,"saku.nagano.jp":true,"sakuho.nagano.jp":true,"shimosuwa.nagano.jp":true,"shinanomachi.nagano.jp":true,"shiojiri.nagano.jp":true,"suwa.nagano.jp":true,"suzaka.nagano.jp":true,"takagi.nagano.jp":true,"takamori.nagano.jp":true,"takayama.nagano.jp":true,"tateshina.nagano.jp":true,"tatsuno.nagano.jp":true,"togakushi.nagano.jp":true,"togura.nagano.jp":true,"tomi.nagano.jp":true,"ueda.nagano.jp":true,"wada.nagano.jp":true,"yamagata.nagano.jp":true,"yamanouchi.nagano.jp":true,"yasaka.nagano.jp":true,"yasuoka.nagano.jp":true,"chijiwa.nagasaki.jp":true,"futsu.nagasaki.jp":true,"goto.nagasaki.jp":true,"hasami.nagasaki.jp":true,"hirado.nagasaki.jp":true,"iki.nagasaki.jp":true,"isahaya.nagasaki.jp":true,"kawatana.nagasaki.jp":true,"kuchinotsu.nagasaki.jp":true,"matsuura.nagasaki.jp":true,"nagasaki.nagasaki.jp":true,"obama.nagasaki.jp":true,"omura.nagasaki.jp":true,"oseto.nagasaki.jp":true,"saikai.nagasaki.jp":true,"sasebo.nagasaki.jp":true,"seihi.nagasaki.jp":true,"shimabara.nagasaki.jp":true,"shinkamigoto.nagasaki.jp":true,"togitsu.nagasaki.jp":true,"tsushima.nagasaki.jp":true,"unzen.nagasaki.jp":true,"ando.nara.jp":true,"gose.nara.jp":true,"heguri.nara.jp":true,"higashiyoshino.nara.jp":true,"ikaruga.nara.jp":true,"ikoma.nara.jp":true,"kamikitayama.nara.jp":true,"kanmaki.nara.jp":true,"kashiba.nara.jp":true,"kashihara.nara.jp":true,"katsuragi.nara.jp":true,"kawai.nara.jp":true,"kawakami.nara.jp":true,"kawanishi.nara.jp":true,"koryo.nara.jp":true,"kurotaki.nara.jp":true,"mitsue.nara.jp":true,"miyake.nara.jp":true,"nara.nara.jp":true,"nosegawa.nara.jp":true,"oji.nara.jp":true,"ouda.nara.jp":true,"oyodo.nara.jp":true,"sakurai.nara.jp":true,"sango.nara.jp":true,"shimoichi.nara.jp":true,"shimokitayama.nara.jp":true,"shinjo.nara.jp":true,"soni.nara.jp":true,"takatori.nara.jp":true,"tawaramoto.nara.jp":true,"tenkawa.nara.jp":true,"tenri.nara.jp":true,"uda.nara.jp":true,"yamatokoriyama.nara.jp":true,"yamatotakada.nara.jp":true,"yamazoe.nara.jp":true,"yoshino.nara.jp":true,"aga.niigata.jp":true,"agano.niigata.jp":true,"gosen.niigata.jp":true,"itoigawa.niigata.jp":true,"izumozaki.niigata.jp":true,"joetsu.niigata.jp":true,"kamo.niigata.jp":true,"kariwa.niigata.jp":true,"kashiwazaki.niigata.jp":true,"minamiuonuma.niigata.jp":true,"mitsuke.niigata.jp":true,"muika.niigata.jp":true,"murakami.niigata.jp":true,"myoko.niigata.jp":true,"nagaoka.niigata.jp":true,"niigata.niigata.jp":true,"ojiya.niigata.jp":true,"omi.niigata.jp":true,"sado.niigata.jp":true,"sanjo.niigata.jp":true,"seiro.niigata.jp":true,"seirou.niigata.jp":true,"sekikawa.niigata.jp":true,"shibata.niigata.jp":true,"tagami.niigata.jp":true,"tainai.niigata.jp":true,"tochio.niigata.jp":true,"tokamachi.niigata.jp":true,"tsubame.niigata.jp":true,"tsunan.niigata.jp":true,"uonuma.niigata.jp":true,"yahiko.niigata.jp":true,"yoita.niigata.jp":true,"yuzawa.niigata.jp":true,"beppu.oita.jp":true,"bungoono.oita.jp":true,"bungotakada.oita.jp":true,"hasama.oita.jp":true,"hiji.oita.jp":true,"himeshima.oita.jp":true,"hita.oita.jp":true,"kamitsue.oita.jp":true,"kokonoe.oita.jp":true,"kuju.oita.jp":true,"kunisaki.oita.jp":true,"kusu.oita.jp":true,"oita.oita.jp":true,"saiki.oita.jp":true,"taketa.oita.jp":true,"tsukumi.oita.jp":true,"usa.oita.jp":true,"usuki.oita.jp":true,"yufu.oita.jp":true,"akaiwa.okayama.jp":true,"asakuchi.okayama.jp":true,"bizen.okayama.jp":true,"hayashima.okayama.jp":true,"ibara.okayama.jp":true,"kagamino.okayama.jp":true,"kasaoka.okayama.jp":true,"kibichuo.okayama.jp":true,"kumenan.okayama.jp":true,"kurashiki.okayama.jp":true,"maniwa.okayama.jp":true,"misaki.okayama.jp":true,"nagi.okayama.jp":true,"niimi.okayama.jp":true,"nishiawakura.okayama.jp":true,"okayama.okayama.jp":true,"satosho.okayama.jp":true,"setouchi.okayama.jp":true,"shinjo.okayama.jp":true,"shoo.okayama.jp":true,"soja.okayama.jp":true,"takahashi.okayama.jp":true,"tamano.okayama.jp":true,"tsuyama.okayama.jp":true,"wake.okayama.jp":true,"yakage.okayama.jp":true,"aguni.okinawa.jp":true,"ginowan.okinawa.jp":true,"ginoza.okinawa.jp":true,"gushikami.okinawa.jp":true,"haebaru.okinawa.jp":true,"higashi.okinawa.jp":true,"hirara.okinawa.jp":true,"iheya.okinawa.jp":true,"ishigaki.okinawa.jp":true,"ishikawa.okinawa.jp":true,"itoman.okinawa.jp":true,"izena.okinawa.jp":true,"kadena.okinawa.jp":true,"kin.okinawa.jp":true,"kitadaito.okinawa.jp":true,"kitanakagusuku.okinawa.jp":true,"kumejima.okinawa.jp":true,"kunigami.okinawa.jp":true,"minamidaito.okinawa.jp":true,"motobu.okinawa.jp":true,"nago.okinawa.jp":true,"naha.okinawa.jp":true,"nakagusuku.okinawa.jp":true,"nakijin.okinawa.jp":true,"nanjo.okinawa.jp":true,"nishihara.okinawa.jp":true,"ogimi.okinawa.jp":true,"okinawa.okinawa.jp":true,"onna.okinawa.jp":true,"shimoji.okinawa.jp":true,"taketomi.okinawa.jp":true,"tarama.okinawa.jp":true,"tokashiki.okinawa.jp":true,"tomigusuku.okinawa.jp":true,"tonaki.okinawa.jp":true,"urasoe.okinawa.jp":true,"uruma.okinawa.jp":true,"yaese.okinawa.jp":true,"yomitan.okinawa.jp":true,"yonabaru.okinawa.jp":true,"yonaguni.okinawa.jp":true,"zamami.okinawa.jp":true,"abeno.osaka.jp":true,"chihayaakasaka.osaka.jp":true,"chuo.osaka.jp":true,"daito.osaka.jp":true,"fujiidera.osaka.jp":true,"habikino.osaka.jp":true,"hannan.osaka.jp":true,"higashiosaka.osaka.jp":true,"higashisumiyoshi.osaka.jp":true,"higashiyodogawa.osaka.jp":true,"hirakata.osaka.jp":true,"ibaraki.osaka.jp":true,"ikeda.osaka.jp":true,"izumi.osaka.jp":true,"izumiotsu.osaka.jp":true,"izumisano.osaka.jp":true,"kadoma.osaka.jp":true,"kaizuka.osaka.jp":true,"kanan.osaka.jp":true,"kashiwara.osaka.jp":true,"katano.osaka.jp":true,"kawachinagano.osaka.jp":true,"kishiwada.osaka.jp":true,"kita.osaka.jp":true,"kumatori.osaka.jp":true,"matsubara.osaka.jp":true,"minato.osaka.jp":true,"minoh.osaka.jp":true,"misaki.osaka.jp":true,"moriguchi.osaka.jp":true,"neyagawa.osaka.jp":true,"nishi.osaka.jp":true,"nose.osaka.jp":true,"osakasayama.osaka.jp":true,"sakai.osaka.jp":true,"sayama.osaka.jp":true,"sennan.osaka.jp":true,"settsu.osaka.jp":true,"shijonawate.osaka.jp":true,"shimamoto.osaka.jp":true,"suita.osaka.jp":true,"tadaoka.osaka.jp":true,"taishi.osaka.jp":true,"tajiri.osaka.jp":true,"takaishi.osaka.jp":true,"takatsuki.osaka.jp":true,"tondabayashi.osaka.jp":true,"toyonaka.osaka.jp":true,"toyono.osaka.jp":true,"yao.osaka.jp":true,"ariake.saga.jp":true,"arita.saga.jp":true,"fukudomi.saga.jp":true,"genkai.saga.jp":true,"hamatama.saga.jp":true,"hizen.saga.jp":true,"imari.saga.jp":true,"kamimine.saga.jp":true,"kanzaki.saga.jp":true,"karatsu.saga.jp":true,"kashima.saga.jp":true,"kitagata.saga.jp":true,"kitahata.saga.jp":true,"kiyama.saga.jp":true,"kouhoku.saga.jp":true,"kyuragi.saga.jp":true,"nishiarita.saga.jp":true,"ogi.saga.jp":true,"omachi.saga.jp":true,"ouchi.saga.jp":true,"saga.saga.jp":true,"shiroishi.saga.jp":true,"taku.saga.jp":true,"tara.saga.jp":true,"tosu.saga.jp":true,"yoshinogari.saga.jp":true,"arakawa.saitama.jp":true,"asaka.saitama.jp":true,"chichibu.saitama.jp":true,"fujimi.saitama.jp":true,"fujimino.saitama.jp":true,"fukaya.saitama.jp":true,"hanno.saitama.jp":true,"hanyu.saitama.jp":true,"hasuda.saitama.jp":true,"hatogaya.saitama.jp":true,"hatoyama.saitama.jp":true,"hidaka.saitama.jp":true,"higashichichibu.saitama.jp":true,"higashimatsuyama.saitama.jp":true,"honjo.saitama.jp":true,"ina.saitama.jp":true,"iruma.saitama.jp":true,"iwatsuki.saitama.jp":true,"kamiizumi.saitama.jp":true,"kamikawa.saitama.jp":true,"kamisato.saitama.jp":true,"kasukabe.saitama.jp":true,"kawagoe.saitama.jp":true,"kawaguchi.saitama.jp":true,"kawajima.saitama.jp":true,"kazo.saitama.jp":true,"kitamoto.saitama.jp":true,"koshigaya.saitama.jp":true,"kounosu.saitama.jp":true,"kuki.saitama.jp":true,"kumagaya.saitama.jp":true,"matsubushi.saitama.jp":true,"minano.saitama.jp":true,"misato.saitama.jp":true,"miyashiro.saitama.jp":true,"miyoshi.saitama.jp":true,"moroyama.saitama.jp":true,"nagatoro.saitama.jp":true,"namegawa.saitama.jp":true,"niiza.saitama.jp":true,"ogano.saitama.jp":true,"ogawa.saitama.jp":true,"ogose.saitama.jp":true,"okegawa.saitama.jp":true,"omiya.saitama.jp":true,"otaki.saitama.jp":true,"ranzan.saitama.jp":true,"ryokami.saitama.jp":true,"saitama.saitama.jp":true,"sakado.saitama.jp":true,"satte.saitama.jp":true,"sayama.saitama.jp":true,"shiki.saitama.jp":true,"shiraoka.saitama.jp":true,"soka.saitama.jp":true,"sugito.saitama.jp":true,"toda.saitama.jp":true,"tokigawa.saitama.jp":true,"tokorozawa.saitama.jp":true,"tsurugashima.saitama.jp":true,"urawa.saitama.jp":true,"warabi.saitama.jp":true,"yashio.saitama.jp":true,"yokoze.saitama.jp":true,"yono.saitama.jp":true,"yorii.saitama.jp":true,"yoshida.saitama.jp":true,"yoshikawa.saitama.jp":true,"yoshimi.saitama.jp":true,"aisho.shiga.jp":true,"gamo.shiga.jp":true,"higashiomi.shiga.jp":true,"hikone.shiga.jp":true,"koka.shiga.jp":true,"konan.shiga.jp":true,"kosei.shiga.jp":true,"koto.shiga.jp":true,"kusatsu.shiga.jp":true,"maibara.shiga.jp":true,"moriyama.shiga.jp":true,"nagahama.shiga.jp":true,"nishiazai.shiga.jp":true,"notogawa.shiga.jp":true,"omihachiman.shiga.jp":true,"otsu.shiga.jp":true,"ritto.shiga.jp":true,"ryuoh.shiga.jp":true,"takashima.shiga.jp":true,"takatsuki.shiga.jp":true,"torahime.shiga.jp":true,"toyosato.shiga.jp":true,"yasu.shiga.jp":true,"akagi.shimane.jp":true,"ama.shimane.jp":true,"gotsu.shimane.jp":true,"hamada.shimane.jp":true,"higashiizumo.shimane.jp":true,"hikawa.shimane.jp":true,"hikimi.shimane.jp":true,"izumo.shimane.jp":true,"kakinoki.shimane.jp":true,"masuda.shimane.jp":true,"matsue.shimane.jp":true,"misato.shimane.jp":true,"nishinoshima.shimane.jp":true,"ohda.shimane.jp":true,"okinoshima.shimane.jp":true,"okuizumo.shimane.jp":true,"shimane.shimane.jp":true,"tamayu.shimane.jp":true,"tsuwano.shimane.jp":true,"unnan.shimane.jp":true,"yakumo.shimane.jp":true,"yasugi.shimane.jp":true,"yatsuka.shimane.jp":true,"arai.shizuoka.jp":true,"atami.shizuoka.jp":true,"fuji.shizuoka.jp":true,"fujieda.shizuoka.jp":true,"fujikawa.shizuoka.jp":true,"fujinomiya.shizuoka.jp":true,"fukuroi.shizuoka.jp":true,"gotemba.shizuoka.jp":true,"haibara.shizuoka.jp":true,"hamamatsu.shizuoka.jp":true,"higashiizu.shizuoka.jp":true,"ito.shizuoka.jp":true,"iwata.shizuoka.jp":true,"izu.shizuoka.jp":true,"izunokuni.shizuoka.jp":true,"kakegawa.shizuoka.jp":true,"kannami.shizuoka.jp":true,"kawanehon.shizuoka.jp":true,"kawazu.shizuoka.jp":true,"kikugawa.shizuoka.jp":true,"kosai.shizuoka.jp":true,"makinohara.shizuoka.jp":true,"matsuzaki.shizuoka.jp":true,"minamiizu.shizuoka.jp":true,"mishima.shizuoka.jp":true,"morimachi.shizuoka.jp":true,"nishiizu.shizuoka.jp":true,"numazu.shizuoka.jp":true,"omaezaki.shizuoka.jp":true,"shimada.shizuoka.jp":true,"shimizu.shizuoka.jp":true,"shimoda.shizuoka.jp":true,"shizuoka.shizuoka.jp":true,"susono.shizuoka.jp":true,"yaizu.shizuoka.jp":true,"yoshida.shizuoka.jp":true,"ashikaga.tochigi.jp":true,"bato.tochigi.jp":true,"haga.tochigi.jp":true,"ichikai.tochigi.jp":true,"iwafune.tochigi.jp":true,"kaminokawa.tochigi.jp":true,"kanuma.tochigi.jp":true,"karasuyama.tochigi.jp":true,"kuroiso.tochigi.jp":true,"mashiko.tochigi.jp":true,"mibu.tochigi.jp":true,"moka.tochigi.jp":true,"motegi.tochigi.jp":true,"nasu.tochigi.jp":true,"nasushiobara.tochigi.jp":true,"nikko.tochigi.jp":true,"nishikata.tochigi.jp":true,"nogi.tochigi.jp":true,"ohira.tochigi.jp":true,"ohtawara.tochigi.jp":true,"oyama.tochigi.jp":true,"sakura.tochigi.jp":true,"sano.tochigi.jp":true,"shimotsuke.tochigi.jp":true,"shioya.tochigi.jp":true,"takanezawa.tochigi.jp":true,"tochigi.tochigi.jp":true,"tsuga.tochigi.jp":true,"ujiie.tochigi.jp":true,"utsunomiya.tochigi.jp":true,"yaita.tochigi.jp":true,"aizumi.tokushima.jp":true,"anan.tokushima.jp":true,"ichiba.tokushima.jp":true,"itano.tokushima.jp":true,"kainan.tokushima.jp":true,"komatsushima.tokushima.jp":true,"matsushige.tokushima.jp":true,"mima.tokushima.jp":true,"minami.tokushima.jp":true,"miyoshi.tokushima.jp":true,"mugi.tokushima.jp":true,"nakagawa.tokushima.jp":true,"naruto.tokushima.jp":true,"sanagochi.tokushima.jp":true,"shishikui.tokushima.jp":true,"tokushima.tokushima.jp":true,"wajiki.tokushima.jp":true,"adachi.tokyo.jp":true,"akiruno.tokyo.jp":true,"akishima.tokyo.jp":true,"aogashima.tokyo.jp":true,"arakawa.tokyo.jp":true,"bunkyo.tokyo.jp":true,"chiyoda.tokyo.jp":true,"chofu.tokyo.jp":true,"chuo.tokyo.jp":true,"edogawa.tokyo.jp":true,"fuchu.tokyo.jp":true,"fussa.tokyo.jp":true,"hachijo.tokyo.jp":true,"hachioji.tokyo.jp":true,"hamura.tokyo.jp":true,"higashikurume.tokyo.jp":true,"higashimurayama.tokyo.jp":true,"higashiyamato.tokyo.jp":true,"hino.tokyo.jp":true,"hinode.tokyo.jp":true,"hinohara.tokyo.jp":true,"inagi.tokyo.jp":true,"itabashi.tokyo.jp":true,"katsushika.tokyo.jp":true,"kita.tokyo.jp":true,"kiyose.tokyo.jp":true,"kodaira.tokyo.jp":true,"koganei.tokyo.jp":true,"kokubunji.tokyo.jp":true,"komae.tokyo.jp":true,"koto.tokyo.jp":true,"kouzushima.tokyo.jp":true,"kunitachi.tokyo.jp":true,"machida.tokyo.jp":true,"meguro.tokyo.jp":true,"minato.tokyo.jp":true,"mitaka.tokyo.jp":true,"mizuho.tokyo.jp":true,"musashimurayama.tokyo.jp":true,"musashino.tokyo.jp":true,"nakano.tokyo.jp":true,"nerima.tokyo.jp":true,"ogasawara.tokyo.jp":true,"okutama.tokyo.jp":true,"ome.tokyo.jp":true,"oshima.tokyo.jp":true,"ota.tokyo.jp":true,"setagaya.tokyo.jp":true,"shibuya.tokyo.jp":true,"shinagawa.tokyo.jp":true,"shinjuku.tokyo.jp":true,"suginami.tokyo.jp":true,"sumida.tokyo.jp":true,"tachikawa.tokyo.jp":true,"taito.tokyo.jp":true,"tama.tokyo.jp":true,"toshima.tokyo.jp":true,"chizu.tottori.jp":true,"hino.tottori.jp":true,"kawahara.tottori.jp":true,"koge.tottori.jp":true,"kotoura.tottori.jp":true,"misasa.tottori.jp":true,"nanbu.tottori.jp":true,"nichinan.tottori.jp":true,"sakaiminato.tottori.jp":true,"tottori.tottori.jp":true,"wakasa.tottori.jp":true,"yazu.tottori.jp":true,"yonago.tottori.jp":true,"asahi.toyama.jp":true,"fuchu.toyama.jp":true,"fukumitsu.toyama.jp":true,"funahashi.toyama.jp":true,"himi.toyama.jp":true,"imizu.toyama.jp":true,"inami.toyama.jp":true,"johana.toyama.jp":true,"kamiichi.toyama.jp":true,"kurobe.toyama.jp":true,"nakaniikawa.toyama.jp":true,"namerikawa.toyama.jp":true,"nanto.toyama.jp":true,"nyuzen.toyama.jp":true,"oyabe.toyama.jp":true,"taira.toyama.jp":true,"takaoka.toyama.jp":true,"tateyama.toyama.jp":true,"toga.toyama.jp":true,"tonami.toyama.jp":true,"toyama.toyama.jp":true,"unazuki.toyama.jp":true,"uozu.toyama.jp":true,"yamada.toyama.jp":true,"arida.wakayama.jp":true,"aridagawa.wakayama.jp":true,"gobo.wakayama.jp":true,"hashimoto.wakayama.jp":true,"hidaka.wakayama.jp":true,"hirogawa.wakayama.jp":true,"inami.wakayama.jp":true,"iwade.wakayama.jp":true,"kainan.wakayama.jp":true,"kamitonda.wakayama.jp":true,"katsuragi.wakayama.jp":true,"kimino.wakayama.jp":true,"kinokawa.wakayama.jp":true,"kitayama.wakayama.jp":true,"koya.wakayama.jp":true,"koza.wakayama.jp":true,"kozagawa.wakayama.jp":true,"kudoyama.wakayama.jp":true,"kushimoto.wakayama.jp":true,"mihama.wakayama.jp":true,"misato.wakayama.jp":true,"nachikatsuura.wakayama.jp":true,"shingu.wakayama.jp":true,"shirahama.wakayama.jp":true,"taiji.wakayama.jp":true,"tanabe.wakayama.jp":true,"wakayama.wakayama.jp":true,"yuasa.wakayama.jp":true,"yura.wakayama.jp":true,"asahi.yamagata.jp":true,"funagata.yamagata.jp":true,"higashine.yamagata.jp":true,"iide.yamagata.jp":true,"kahoku.yamagata.jp":true,"kaminoyama.yamagata.jp":true,"kaneyama.yamagata.jp":true,"kawanishi.yamagata.jp":true,"mamurogawa.yamagata.jp":true,"mikawa.yamagata.jp":true,"murayama.yamagata.jp":true,"nagai.yamagata.jp":true,"nakayama.yamagata.jp":true,"nanyo.yamagata.jp":true,"nishikawa.yamagata.jp":true,"obanazawa.yamagata.jp":true,"oe.yamagata.jp":true,"oguni.yamagata.jp":true,"ohkura.yamagata.jp":true,"oishida.yamagata.jp":true,"sagae.yamagata.jp":true,"sakata.yamagata.jp":true,"sakegawa.yamagata.jp":true,"shinjo.yamagata.jp":true,"shirataka.yamagata.jp":true,"shonai.yamagata.jp":true,"takahata.yamagata.jp":true,"tendo.yamagata.jp":true,"tozawa.yamagata.jp":true,"tsuruoka.yamagata.jp":true,"yamagata.yamagata.jp":true,"yamanobe.yamagata.jp":true,"yonezawa.yamagata.jp":true,"yuza.yamagata.jp":true,"abu.yamaguchi.jp":true,"hagi.yamaguchi.jp":true,"hikari.yamaguchi.jp":true,"hofu.yamaguchi.jp":true,"iwakuni.yamaguchi.jp":true,"kudamatsu.yamaguchi.jp":true,"mitou.yamaguchi.jp":true,"nagato.yamaguchi.jp":true,"oshima.yamaguchi.jp":true,"shimonoseki.yamaguchi.jp":true,"shunan.yamaguchi.jp":true,"tabuse.yamaguchi.jp":true,"tokuyama.yamaguchi.jp":true,"toyota.yamaguchi.jp":true,"ube.yamaguchi.jp":true,"yuu.yamaguchi.jp":true,"chuo.yamanashi.jp":true,"doshi.yamanashi.jp":true,"fuefuki.yamanashi.jp":true,"fujikawa.yamanashi.jp":true,"fujikawaguchiko.yamanashi.jp":true,"fujiyoshida.yamanashi.jp":true,"hayakawa.yamanashi.jp":true,"hokuto.yamanashi.jp":true,"ichikawamisato.yamanashi.jp":true,"kai.yamanashi.jp":true,"kofu.yamanashi.jp":true,"koshu.yamanashi.jp":true,"kosuge.yamanashi.jp":true,"minami-alps.yamanashi.jp":true,"minobu.yamanashi.jp":true,"nakamichi.yamanashi.jp":true,"nanbu.yamanashi.jp":true,"narusawa.yamanashi.jp":true,"nirasaki.yamanashi.jp":true,"nishikatsura.yamanashi.jp":true,"oshino.yamanashi.jp":true,"otsuki.yamanashi.jp":true,"showa.yamanashi.jp":true,"tabayama.yamanashi.jp":true,"tsuru.yamanashi.jp":true,"uenohara.yamanashi.jp":true,"yamanakako.yamanashi.jp":true,"yamanashi.yamanashi.jp":true,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"kp":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"lb":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"ac.lk":true,"lr":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"co.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"com.ms":true,"edu.ms":true,"gov.ms":true,"net.ms":true,"org.ms":true,"mt":true,"com.mt":true,"edu.mt":true,"net.mt":true,"org.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"teledata.mz":false,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ng":true,"com.ng":true,"edu.ng":true,"name.ng":true,"net.ng":true,"org.ng":true,"sch.ng":true,"gov.ng":true,"mil.ng":true,"mobi.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"nz":true,"ac.nz":true,"co.nz":true,"cri.nz":true,"geek.nz":true,"gen.nz":true,"govt.nz":true,"health.nz":true,"iwi.nz":true,"kiwi.nz":true,"maori.nz":true,"mil.nz":true,"xn--mori-qsa.nz":true,"net.nz":true,"org.nz":true,"parliament.nz":true,"school.nz":true,"om":true,"co.om":true,"com.om":true,"edu.om":true,"gov.om":true,"med.om":true,"museum.om":true,"net.om":true,"org.om":true,"pro.om":true,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"com.pl":true,"net.pl":true,"org.pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"gov.pl":true,"ap.gov.pl":true,"ic.gov.pl":true,"is.gov.pl":true,"us.gov.pl":true,"kmpsp.gov.pl":true,"kppsp.gov.pl":true,"kwpsp.gov.pl":true,"psp.gov.pl":true,"wskr.gov.pl":true,"kwp.gov.pl":true,"mw.gov.pl":true,"ug.gov.pl":true,"um.gov.pl":true,"umig.gov.pl":true,"ugim.gov.pl":true,"upow.gov.pl":true,"uw.gov.pl":true,"starostwo.gov.pl":true,"pa.gov.pl":true,"po.gov.pl":true,"psse.gov.pl":true,"pup.gov.pl":true,"rzgw.gov.pl":true,"sa.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"wsa.gov.pl":true,"sko.gov.pl":true,"uzs.gov.pl":true,"wiih.gov.pl":true,"winb.gov.pl":true,"pinb.gov.pl":true,"wios.gov.pl":true,"witd.gov.pl":true,"wzmiuw.gov.pl":true,"piw.gov.pl":true,"wiw.gov.pl":true,"griw.gov.pl":true,"wif.gov.pl":true,"oum.gov.pl":true,"sdn.gov.pl":true,"zp.gov.pl":true,"uppo.gov.pl":true,"mup.gov.pl":true,"wuoz.gov.pl":true,"konsulat.gov.pl":true,"oirm.gov.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"post":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"py":true,"com.py":true,"coop.py":true,"edu.py":true,"gov.py":true,"mil.py":true,"net.py":true,"org.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"tv.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"com.sh":true,"net.sh":true,"gov.sh":true,"org.sh":true,"mil.sh":true,"si":true,"sj":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"adygeya.su":true,"arkhangelsk.su":true,"balashov.su":true,"bashkiria.su":true,"bryansk.su":true,"dagestan.su":true,"grozny.su":true,"ivanovo.su":true,"kalmykia.su":true,"kaluga.su":true,"karelia.su":true,"khakassia.su":true,"krasnodar.su":true,"kurgan.su":true,"lenug.su":true,"mordovia.su":true,"msk.su":true,"murmansk.su":true,"nalchik.su":true,"nov.su":true,"obninsk.su":true,"penza.su":true,"pokrovsk.su":true,"sochi.su":true,"spb.su":true,"togliatti.su":true,"troitsk.su":true,"tula.su":true,"tuva.su":true,"vladikavkaz.su":true,"vladimir.su":true,"vologda.su":true,"sv":true,"com.sv":true,"edu.sv":true,"gob.sv":true,"org.sv":true,"red.sv":true,"sx":true,"gov.sx":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"com.tm":true,"co.tm":true,"org.tm":true,"net.tm":true,"nom.tm":true,"gov.tm":true,"mil.tm":true,"edu.tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"tp":true,"tr":true,"com.tr":true,"info.tr":true,"biz.tr":true,"net.tr":true,"org.tr":true,"web.tr":true,"gen.tr":true,"tv.tr":true,"av.tr":true,"dr.tr":true,"bbs.tr":true,"name.tr":true,"tel.tr":true,"gov.tr":true,"bel.tr":true,"pol.tr":true,"mil.tr":true,"k12.tr":true,"edu.tr":true,"kep.tr":true,"nc.tr":true,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"tz":true,"ac.tz":true,"co.tz":true,"go.tz":true,"hotel.tz":true,"info.tz":true,"me.tz":true,"mil.tz":true,"mobi.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"tv.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"cherkasy.ua":true,"chernigov.ua":true,"chernihiv.ua":true,"chernivtsi.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"cr.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"dnipropetrovsk.ua":true,"dominic.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkiv.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"khmelnytskyi.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"krym.ua":true,"ks.ua":true,"kv.ua":true,"kyiv.ua":true,"lg.ua":true,"lt.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lv.ua":true,"lviv.ua":true,"mk.ua":true,"mykolaiv.ua":true,"nikolaev.ua":true,"od.ua":true,"odesa.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rivne.ua":true,"rovno.ua":true,"rv.ua":true,"sb.ua":true,"sebastopol.ua":true,"sevastopol.ua":true,"sm.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uz.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vinnytsia.ua":true,"vn.ua":true,"volyn.ua":true,"yalta.ua":true,"zaporizhzhe.ua":true,"zaporizhzhia.ua":true,"zhitomir.ua":true,"zhytomyr.ua":true,"zp.ua":true,"zt.ua":true,"ug":true,"co.ug":true,"or.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"com.ug":true,"org.ug":true,"uk":true,"ac.uk":true,"co.uk":true,"gov.uk":true,"ltd.uk":true,"me.uk":true,"net.uk":true,"nhs.uk":true,"org.uk":true,"plc.uk":true,"police.uk":true,"*.sch.uk":true,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"uy":true,"com.uy":true,"edu.uy":true,"gub.uy":true,"mil.uy":true,"net.uy":true,"org.uy":true,"uz":true,"co.uz":true,"com.uz":true,"net.uz":true,"org.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"ve":true,"arts.ve":true,"co.ve":true,"com.ve":true,"e12.ve":true,"edu.ve":true,"firm.ve":true,"gob.ve":true,"gov.ve":true,"info.ve":true,"int.ve":true,"mil.ve":true,"net.ve":true,"org.ve":true,"rec.ve":true,"store.ve":true,"tec.ve":true,"web.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"com.vu":true,"edu.vu":true,"net.vu":true,"org.vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--y9a3aq":true,"xn--54b7fta0cc":true,"xn--90ais":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--qxam":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbtx2b":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--80ao21a":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--d1alf":true,"xn--l1acc":true,"xn--mix891f":true,"xn--mix082f":true,"xn--mgbx4cd0ab":true,"xn--mgb9awbf":true,"xn--mgbai9azgqp6j":true,"xn--mgbai9a5eva00b":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--o1ac.xn--90a3ac":true,"xn--c1avg.xn--90a3ac":true,"xn--90azh.xn--90a3ac":true,"xn--d1at.xn--90a3ac":true,"xn--o1ach.xn--90a3ac":true,"xn--80au.xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--mgbpl2fh":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"ac.za":true,"agrica.za":true,"alt.za":true,"co.za":true,"edu.za":true,"gov.za":true,"grondar.za":true,"law.za":true,"mil.za":true,"net.za":true,"ngo.za":true,"nis.za":true,"nom.za":true,"org.za":true,"school.za":true,"tm.za":true,"web.za":true,"*.zm":true,"*.zw":true,"aaa":true,"aarp":true,"abarth":true,"abb":true,"abbott":true,"abbvie":true,"abc":true,"able":true,"abogado":true,"abudhabi":true,"academy":true,"accenture":true,"accountant":true,"accountants":true,"aco":true,"active":true,"actor":true,"adac":true,"ads":true,"adult":true,"aeg":true,"aetna":true,"afamilycompany":true,"afl":true,"africa":true,"africamagic":true,"agakhan":true,"agency":true,"aig":true,"aigo":true,"airbus":true,"airforce":true,"airtel":true,"akdn":true,"alfaromeo":true,"alibaba":true,"alipay":true,"allfinanz":true,"allstate":true,"ally":true,"alsace":true,"alstom":true,"americanexpress":true,"americanfamily":true,"amex":true,"amfam":true,"amica":true,"amsterdam":true,"analytics":true,"android":true,"anquan":true,"anz":true,"aol":true,"apartments":true,"app":true,"apple":true,"aquarelle":true,"aramco":true,"archi":true,"army":true,"arte":true,"asda":true,"associates":true,"athleta":true,"attorney":true,"auction":true,"audi":true,"audible":true,"audio":true,"auspost":true,"author":true,"auto":true,"autos":true,"avianca":true,"aws":true,"axa":true,"azure":true,"baby":true,"baidu":true,"banamex":true,"bananarepublic":true,"band":true,"bank":true,"bar":true,"barcelona":true,"barclaycard":true,"barclays":true,"barefoot":true,"bargains":true,"basketball":true,"bauhaus":true,"bayern":true,"bbc":true,"bbt":true,"bbva":true,"bcg":true,"bcn":true,"beats":true,"beer":true,"bentley":true,"berlin":true,"best":true,"bestbuy":true,"bet":true,"bharti":true,"bible":true,"bid":true,"bike":true,"bing":true,"bingo":true,"bio":true,"black":true,"blackfriday":true,"blanco":true,"blockbuster":true,"blog":true,"bloomberg":true,"blue":true,"bms":true,"bmw":true,"bnl":true,"bnpparibas":true,"boats":true,"boehringer":true,"bofa":true,"bom":true,"bond":true,"boo":true,"book":true,"booking":true,"boots":true,"bosch":true,"bostik":true,"bot":true,"boutique":true,"bradesco":true,"bridgestone":true,"broadway":true,"broker":true,"brother":true,"brussels":true,"budapest":true,"bugatti":true,"build":true,"builders":true,"business":true,"buy":true,"buzz":true,"bzh":true,"cab":true,"cafe":true,"cal":true,"call":true,"calvinklein":true,"camera":true,"camp":true,"cancerresearch":true,"canon":true,"capetown":true,"capital":true,"capitalone":true,"car":true,"caravan":true,"cards":true,"care":true,"career":true,"careers":true,"cars":true,"cartier":true,"casa":true,"case":true,"caseih":true,"cash":true,"casino":true,"catering":true,"cba":true,"cbn":true,"cbre":true,"cbs":true,"ceb":true,"center":true,"ceo":true,"cern":true,"cfa":true,"cfd":true,"chanel":true,"channel":true,"chase":true,"chat":true,"cheap":true,"chintai":true,"chloe":true,"christmas":true,"chrome":true,"chrysler":true,"church":true,"cipriani":true,"circle":true,"cisco":true,"citadel":true,"citi":true,"citic":true,"city":true,"cityeats":true,"claims":true,"cleaning":true,"click":true,"clinic":true,"clothing":true,"cloud":true,"club":true,"clubmed":true,"coach":true,"codes":true,"coffee":true,"college":true,"cologne":true,"comcast":true,"commbank":true,"community":true,"company":true,"computer":true,"comsec":true,"condos":true,"construction":true,"consulting":true,"contact":true,"contractors":true,"cooking":true,"cookingchannel":true,"cool":true,"corsica":true,"country":true,"coupon":true,"coupons":true,"courses":true,"credit":true,"creditcard":true,"creditunion":true,"cricket":true,"crown":true,"crs":true,"cruises":true,"csc":true,"cuisinella":true,"cymru":true,"cyou":true,"dabur":true,"dad":true,"dance":true,"date":true,"dating":true,"datsun":true,"day":true,"dclk":true,"dds":true,"deal":true,"dealer":true,"deals":true,"degree":true,"delivery":true,"dell":true,"deloitte":true,"delta":true,"democrat":true,"dental":true,"dentist":true,"desi":true,"design":true,"dev":true,"dhl":true,"diamonds":true,"diet":true,"digital":true,"direct":true,"directory":true,"discount":true,"discover":true,"dish":true,"dnp":true,"docs":true,"dodge":true,"dog":true,"doha":true,"domains":true,"doosan":true,"dot":true,"download":true,"drive":true,"dstv":true,"dtv":true,"dubai":true,"duck":true,"dunlop":true,"duns":true,"dupont":true,"durban":true,"dvag":true,"dwg":true,"earth":true,"eat":true,"edeka":true,"education":true,"email":true,"emerck":true,"emerson":true,"energy":true,"engineer":true,"engineering":true,"enterprises":true,"epost":true,"epson":true,"equipment":true,"ericsson":true,"erni":true,"esq":true,"estate":true,"esurance":true,"etisalat":true,"eurovision":true,"eus":true,"events":true,"everbank":true,"exchange":true,"expert":true,"exposed":true,"express":true,"extraspace":true,"fage":true,"fail":true,"fairwinds":true,"faith":true,"family":true,"fan":true,"fans":true,"farm":true,"farmers":true,"fashion":true,"fast":true,"fedex":true,"feedback":true,"ferrari":true,"ferrero":true,"fiat":true,"fidelity":true,"fido":true,"film":true,"final":true,"finance":true,"financial":true,"fire":true,"firestone":true,"firmdale":true,"fish":true,"fishing":true,"fit":true,"fitness":true,"flickr":true,"flights":true,"flir":true,"florist":true,"flowers":true,"flsmidth":true,"fly":true,"foo":true,"foodnetwork":true,"football":true,"ford":true,"forex":true,"forsale":true,"forum":true,"foundation":true,"fox":true,"fresenius":true,"frl":true,"frogans":true,"frontdoor":true,"frontier":true,"ftr":true,"fujitsu":true,"fujixerox":true,"fund":true,"furniture":true,"futbol":true,"fyi":true,"gal":true,"gallery":true,"gallo":true,"gallup":true,"game":true,"games":true,"gap":true,"garden":true,"gbiz":true,"gdn":true,"gea":true,"gent":true,"genting":true,"george":true,"ggee":true,"gift":true,"gifts":true,"gives":true,"giving":true,"glade":true,"glass":true,"gle":true,"global":true,"globo":true,"gmail":true,"gmo":true,"gmx":true,"godaddy":true,"gold":true,"goldpoint":true,"golf":true,"goo":true,"goodhands":true,"goodyear":true,"goog":true,"google":true,"gop":true,"got":true,"gotv":true,"grainger":true,"graphics":true,"gratis":true,"green":true,"gripe":true,"group":true,"guardian":true,"gucci":true,"guge":true,"guide":true,"guitars":true,"guru":true,"hamburg":true,"hangout":true,"haus":true,"hbo":true,"hdfc":true,"hdfcbank":true,"health":true,"healthcare":true,"help":true,"helsinki":true,"here":true,"hermes":true,"hgtv":true,"hiphop":true,"hisamitsu":true,"hitachi":true,"hiv":true,"hkt":true,"hockey":true,"holdings":true,"holiday":true,"homedepot":true,"homegoods":true,"homes":true,"homesense":true,"honda":true,"honeywell":true,"horse":true,"host":true,"hosting":true,"hot":true,"hoteles":true,"hotmail":true,"house":true,"how":true,"hsbc":true,"htc":true,"hughes":true,"hyatt":true,"hyundai":true,"ibm":true,"icbc":true,"ice":true,"icu":true,"ieee":true,"ifm":true,"iinet":true,"ikano":true,"imamat":true,"imdb":true,"immo":true,"immobilien":true,"industries":true,"infiniti":true,"ing":true,"ink":true,"institute":true,"insurance":true,"insure":true,"intel":true,"international":true,"intuit":true,"investments":true,"ipiranga":true,"irish":true,"iselect":true,"ismaili":true,"ist":true,"istanbul":true,"itau":true,"itv":true,"iveco":true,"iwc":true,"jaguar":true,"java":true,"jcb":true,"jcp":true,"jeep":true,"jetzt":true,"jewelry":true,"jio":true,"jlc":true,"jll":true,"jmp":true,"jnj":true,"joburg":true,"jot":true,"joy":true,"jpmorgan":true,"jprs":true,"juegos":true,"juniper":true,"kaufen":true,"kddi":true,"kerryhotels":true,"kerrylogistics":true,"kerryproperties":true,"kfh":true,"kia":true,"kim":true,"kinder":true,"kindle":true,"kitchen":true,"kiwi":true,"koeln":true,"komatsu":true,"kosher":true,"kpmg":true,"kpn":true,"krd":true,"kred":true,"kuokgroup":true,"kyknet":true,"kyoto":true,"lacaixa":true,"ladbrokes":true,"lamborghini":true,"lancaster":true,"lancia":true,"lancome":true,"land":true,"landrover":true,"lanxess":true,"lasalle":true,"lat":true,"latino":true,"latrobe":true,"law":true,"lawyer":true,"lds":true,"lease":true,"leclerc":true,"lefrak":true,"legal":true,"lego":true,"lexus":true,"lgbt":true,"liaison":true,"lidl":true,"life":true,"lifeinsurance":true,"lifestyle":true,"lighting":true,"like":true,"lilly":true,"limited":true,"limo":true,"lincoln":true,"linde":true,"link":true,"lipsy":true,"live":true,"living":true,"lixil":true,"loan":true,"loans":true,"locker":true,"locus":true,"loft":true,"lol":true,"london":true,"lotte":true,"lotto":true,"love":true,"lpl":true,"lplfinancial":true,"ltd":true,"ltda":true,"lundbeck":true,"lupin":true,"luxe":true,"luxury":true,"macys":true,"madrid":true,"maif":true,"maison":true,"makeup":true,"man":true,"management":true,"mango":true,"market":true,"marketing":true,"markets":true,"marriott":true,"marshalls":true,"maserati":true,"mattel":true,"mba":true,"mcd":true,"mcdonalds":true,"mckinsey":true,"med":true,"media":true,"meet":true,"melbourne":true,"meme":true,"memorial":true,"men":true,"menu":true,"meo":true,"metlife":true,"miami":true,"microsoft":true,"mini":true,"mint":true,"mit":true,"mitsubishi":true,"mlb":true,"mls":true,"mma":true,"mnet":true,"mobily":true,"moda":true,"moe":true,"moi":true,"mom":true,"monash":true,"money":true,"monster":true,"montblanc":true,"mopar":true,"mormon":true,"mortgage":true,"moscow":true,"moto":true,"motorcycles":true,"mov":true,"movie":true,"movistar":true,"msd":true,"mtn":true,"mtpc":true,"mtr":true,"multichoice":true,"mutual":true,"mutuelle":true,"mzansimagic":true,"nab":true,"nadex":true,"nagoya":true,"naspers":true,"nationwide":true,"natura":true,"navy":true,"nba":true,"nec":true,"netbank":true,"netflix":true,"network":true,"neustar":true,"new":true,"newholland":true,"news":true,"next":true,"nextdirect":true,"nexus":true,"nfl":true,"ngo":true,"nhk":true,"nico":true,"nike":true,"nikon":true,"ninja":true,"nissan":true,"nokia":true,"northwesternmutual":true,"norton":true,"now":true,"nowruz":true,"nowtv":true,"nra":true,"nrw":true,"ntt":true,"nyc":true,"obi":true,"observer":true,"off":true,"office":true,"okinawa":true,"olayan":true,"olayangroup":true,"oldnavy":true,"ollo":true,"omega":true,"one":true,"ong":true,"onl":true,"online":true,"onyourside":true,"ooo":true,"open":true,"oracle":true,"orange":true,"organic":true,"orientexpress":true,"osaka":true,"otsuka":true,"ott":true,"ovh":true,"page":true,"pamperedchef":true,"panasonic":true,"panerai":true,"paris":true,"pars":true,"partners":true,"parts":true,"party":true,"passagens":true,"pay":true,"payu":true,"pccw":true,"pet":true,"pfizer":true,"pharmacy":true,"philips":true,"photo":true,"photography":true,"photos":true,"physio":true,"piaget":true,"pics":true,"pictet":true,"pictures":true,"pid":true,"pin":true,"ping":true,"pink":true,"pioneer":true,"pizza":true,"place":true,"play":true,"playstation":true,"plumbing":true,"plus":true,"pnc":true,"pohl":true,"poker":true,"politie":true,"porn":true,"pramerica":true,"praxi":true,"press":true,"prime":true,"prod":true,"productions":true,"prof":true,"progressive":true,"promo":true,"properties":true,"property":true,"protection":true,"pru":true,"prudential":true,"pub":true,"qpon":true,"quebec":true,"quest":true,"qvc":true,"racing":true,"raid":true,"read":true,"realestate":true,"realtor":true,"realty":true,"recipes":true,"red":true,"redstone":true,"redumbrella":true,"rehab":true,"reise":true,"reisen":true,"reit":true,"reliance":true,"ren":true,"rent":true,"rentals":true,"repair":true,"report":true,"republican":true,"rest":true,"restaurant":true,"review":true,"reviews":true,"rexroth":true,"rich":true,"richardli":true,"ricoh":true,"rightathome":true,"ril":true,"rio":true,"rip":true,"rocher":true,"rocks":true,"rodeo":true,"rogers":true,"room":true,"rsvp":true,"ruhr":true,"run":true,"rwe":true,"ryukyu":true,"saarland":true,"safe":true,"safety":true,"sakura":true,"sale":true,"salon":true,"samsclub":true,"samsung":true,"sandvik":true,"sandvikcoromant":true,"sanofi":true,"sap":true,"sapo":true,"sarl":true,"sas":true,"save":true,"saxo":true,"sbi":true,"sbs":true,"sca":true,"scb":true,"schaeffler":true,"schmidt":true,"scholarships":true,"school":true,"schule":true,"schwarz":true,"science":true,"scjohnson":true,"scor":true,"scot":true,"seat":true,"secure":true,"security":true,"seek":true,"sener":true,"services":true,"ses":true,"seven":true,"sew":true,"sex":true,"sexy":true,"sfr":true,"shangrila":true,"sharp":true,"shaw":true,"shell":true,"shia":true,"shiksha":true,"shoes":true,"shouji":true,"show":true,"showtime":true,"shriram":true,"silk":true,"sina":true,"singles":true,"site":true,"ski":true,"skin":true,"sky":true,"skype":true,"sling":true,"smart":true,"smile":true,"sncf":true,"soccer":true,"social":true,"softbank":true,"software":true,"sohu":true,"solar":true,"solutions":true,"song":true,"sony":true,"soy":true,"space":true,"spiegel":true,"spot":true,"spreadbetting":true,"srl":true,"srt":true,"stada":true,"staples":true,"star":true,"starhub":true,"statebank":true,"statefarm":true,"statoil":true,"stc":true,"stcgroup":true,"stockholm":true,"storage":true,"store":true,"studio":true,"study":true,"style":true,"sucks":true,"supersport":true,"supplies":true,"supply":true,"support":true,"surf":true,"surgery":true,"suzuki":true,"swatch":true,"swiftcover":true,"swiss":true,"sydney":true,"symantec":true,"systems":true,"tab":true,"taipei":true,"talk":true,"taobao":true,"target":true,"tatamotors":true,"tatar":true,"tattoo":true,"tax":true,"taxi":true,"tci":true,"tdk":true,"team":true,"tech":true,"technology":true,"telecity":true,"telefonica":true,"temasek":true,"tennis":true,"teva":true,"thd":true,"theater":true,"theatre":true,"theguardian":true,"tiaa":true,"tickets":true,"tienda":true,"tiffany":true,"tips":true,"tires":true,"tirol":true,"tjmaxx":true,"tjx":true,"tkmaxx":true,"tmall":true,"today":true,"tokyo":true,"tools":true,"top":true,"toray":true,"toshiba":true,"total":true,"tours":true,"town":true,"toyota":true,"toys":true,"trade":true,"trading":true,"training":true,"travelchannel":true,"travelers":true,"travelersinsurance":true,"trust":true,"trv":true,"tube":true,"tui":true,"tunes":true,"tushu":true,"tvs":true,"ubank":true,"ubs":true,"uconnect":true,"university":true,"uno":true,"uol":true,"ups":true,"vacations":true,"vana":true,"vanguard":true,"vegas":true,"ventures":true,"verisign":true,"versicherung":true,"vet":true,"viajes":true,"video":true,"vig":true,"viking":true,"villas":true,"vin":true,"vip":true,"virgin":true,"visa":true,"vision":true,"vista":true,"vistaprint":true,"viva":true,"vivo":true,"vlaanderen":true,"vodka":true,"volkswagen":true,"vote":true,"voting":true,"voto":true,"voyage":true,"vuelos":true,"wales":true,"walmart":true,"walter":true,"wang":true,"wanggou":true,"warman":true,"watch":true,"watches":true,"weather":true,"weatherchannel":true,"webcam":true,"weber":true,"website":true,"wed":true,"wedding":true,"weibo":true,"weir":true,"whoswho":true,"wien":true,"wiki":true,"williamhill":true,"win":true,"windows":true,"wine":true,"winners":true,"wme":true,"wolterskluwer":true,"woodside":true,"work":true,"works":true,"world":true,"wtc":true,"wtf":true,"xbox":true,"xerox":true,"xfinity":true,"xihuan":true,"xin":true,"xn--11b4c3d":true,"xn--1ck2e1b":true,"xn--1qqw23a":true,"xn--30rr7y":true,"xn--3bst00m":true,"xn--3ds443g":true,"xn--3oq18vl8pn36a":true,"xn--3pxu8k":true,"xn--42c2d9a":true,"xn--45q11c":true,"xn--4gbrim":true,"xn--4gq48lf9j":true,"xn--55qw42g":true,"xn--55qx5d":true,"xn--5su34j936bgsg":true,"xn--5tzm5g":true,"xn--6frz82g":true,"xn--6qq986b3xl":true,"xn--80adxhks":true,"xn--80asehdb":true,"xn--80aswg":true,"xn--8y0a063a":true,"xn--9dbq2a":true,"xn--9et52u":true,"xn--9krt00a":true,"xn--b4w605ferd":true,"xn--bck1b9a5dre4c":true,"xn--c1avg":true,"xn--c2br7g":true,"xn--cck2b3b":true,"xn--cg4bki":true,"xn--czr694b":true,"xn--czrs0t":true,"xn--czru2d":true,"xn--d1acj3b":true,"xn--eckvdtc9d":true,"xn--efvy88h":true,"xn--estv75g":true,"xn--fct429k":true,"xn--fhbei":true,"xn--fiq228c5hs":true,"xn--fiq64b":true,"xn--fjq720a":true,"xn--flw351e":true,"xn--fzys8d69uvgm":true,"xn--g2xx48c":true,"xn--gckr3f0f":true,"xn--hxt814e":true,"xn--i1b6b1a6a2e":true,"xn--imr513n":true,"xn--io0a7i":true,"xn--j1aef":true,"xn--jlq61u9w7b":true,"xn--jvr189m":true,"xn--kcrx77d1x4a":true,"xn--kpu716f":true,"xn--kput3i":true,"xn--mgba3a3ejt":true,"xn--mgba7c0bbn0a":true,"xn--mgbaakc7dvf":true,"xn--mgbab2bd":true,"xn--mgbb9fbpob":true,"xn--mgbca7dzdo":true,"xn--mgbt3dhd":true,"xn--mk1bu44c":true,"xn--mxtq1m":true,"xn--ngbc5azd":true,"xn--ngbe9e0a":true,"xn--nqv7f":true,"xn--nqv7fs00ema":true,"xn--nyqy26a":true,"xn--p1acf":true,"xn--pbt977c":true,"xn--pssy2u":true,"xn--q9jyb4c":true,"xn--qcka1pmc":true,"xn--rhqv96g":true,"xn--rovu88b":true,"xn--ses554g":true,"xn--t60b56a":true,"xn--tckwe":true,"xn--unup4y":true,"xn--vermgensberater-ctb":true,"xn--vermgensberatung-pwb":true,"xn--vhquv":true,"xn--vuq861b":true,"xn--w4r85el8fhu5dnra":true,"xn--w4rs40l":true,"xn--xhq521b":true,"xn--zfr164b":true,"xperia":true,"xyz":true,"yachts":true,"yahoo":true,"yamaxun":true,"yandex":true,"yodobashi":true,"yoga":true,"yokohama":true,"you":true,"youtube":true,"yun":true,"zappos":true,"zara":true,"zero":true,"zip":true,"zippo":true,"zone":true,"zuerich":true,"cloudfront.net":true,"ap-northeast-1.compute.amazonaws.com":true,"ap-southeast-1.compute.amazonaws.com":true,"ap-southeast-2.compute.amazonaws.com":true,"cn-north-1.compute.amazonaws.cn":true,"compute.amazonaws.cn":true,"compute.amazonaws.com":true,"compute-1.amazonaws.com":true,"eu-west-1.compute.amazonaws.com":true,"eu-central-1.compute.amazonaws.com":true,"sa-east-1.compute.amazonaws.com":true,"us-east-1.amazonaws.com":true,"us-gov-west-1.compute.amazonaws.com":true,"us-west-1.compute.amazonaws.com":true,"us-west-2.compute.amazonaws.com":true,"z-1.compute-1.amazonaws.com":true,"z-2.compute-1.amazonaws.com":true,"elasticbeanstalk.com":true,"elb.amazonaws.com":true,"s3.amazonaws.com":true,"s3-ap-northeast-1.amazonaws.com":true,"s3-ap-southeast-1.amazonaws.com":true,"s3-ap-southeast-2.amazonaws.com":true,"s3-external-1.amazonaws.com":true,"s3-external-2.amazonaws.com":true,"s3-fips-us-gov-west-1.amazonaws.com":true,"s3-eu-central-1.amazonaws.com":true,"s3-eu-west-1.amazonaws.com":true,"s3-sa-east-1.amazonaws.com":true,"s3-us-gov-west-1.amazonaws.com":true,"s3-us-west-1.amazonaws.com":true,"s3-us-west-2.amazonaws.com":true,"s3.cn-north-1.amazonaws.com.cn":true,"s3.eu-central-1.amazonaws.com":true,"betainabox.com":true,"ae.org":true,"ar.com":true,"br.com":true,"cn.com":true,"com.de":true,"com.se":true,"de.com":true,"eu.com":true,"gb.com":true,"gb.net":true,"hu.com":true,"hu.net":true,"jp.net":true,"jpn.com":true,"kr.com":true,"mex.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"se.net":true,"uk.com":true,"uk.net":true,"us.com":true,"uy.com":true,"za.bz":true,"za.com":true,"africa.com":true,"gr.com":true,"in.net":true,"us.org":true,"co.com":true,"c.la":true,"cloudcontrolled.com":true,"cloudcontrolapp.com":true,"co.ca":true,"c.cdn77.org":true,"cdn77-ssl.net":true,"r.cdn77.net":true,"rsc.cdn77.org":true,"ssl.origin.cdn77-secure.org":true,"co.nl":true,"co.no":true,"*.platform.sh":true,"cupcake.is":true,"dreamhosters.com":true,"duckdns.org":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true,"eu.org":true,"al.eu.org":true,"asso.eu.org":true,"at.eu.org":true,"au.eu.org":true,"be.eu.org":true,"bg.eu.org":true,"ca.eu.org":true,"cd.eu.org":true,"ch.eu.org":true,"cn.eu.org":true,"cy.eu.org":true,"cz.eu.org":true,"de.eu.org":true,"dk.eu.org":true,"edu.eu.org":true,"ee.eu.org":true,"es.eu.org":true,"fi.eu.org":true,"fr.eu.org":true,"gr.eu.org":true,"hr.eu.org":true,"hu.eu.org":true,"ie.eu.org":true,"il.eu.org":true,"in.eu.org":true,"int.eu.org":true,"is.eu.org":true,"it.eu.org":true,"jp.eu.org":true,"kr.eu.org":true,"lt.eu.org":true,"lu.eu.org":true,"lv.eu.org":true,"mc.eu.org":true,"me.eu.org":true,"mk.eu.org":true,"mt.eu.org":true,"my.eu.org":true,"net.eu.org":true,"ng.eu.org":true,"nl.eu.org":true,"no.eu.org":true,"nz.eu.org":true,"paris.eu.org":true,"pl.eu.org":true,"pt.eu.org":true,"q-a.eu.org":true,"ro.eu.org":true,"ru.eu.org":true,"se.eu.org":true,"si.eu.org":true,"sk.eu.org":true,"tr.eu.org":true,"uk.eu.org":true,"us.eu.org":true,"a.ssl.fastly.net":true,"b.ssl.fastly.net":true,"global.ssl.fastly.net":true,"a.prod.fastly.net":true,"global.prod.fastly.net":true,"firebaseapp.com":true,"flynnhub.com":true,"service.gov.uk":true,"github.io":true,"githubusercontent.com":true,"ro.com":true,"appspot.com":true,"blogspot.ae":true,"blogspot.al":true,"blogspot.am":true,"blogspot.ba":true,"blogspot.be":true,"blogspot.bg":true,"blogspot.bj":true,"blogspot.ca":true,"blogspot.cf":true,"blogspot.ch":true,"blogspot.cl":true,"blogspot.co.at":true,"blogspot.co.id":true,"blogspot.co.il":true,"blogspot.co.ke":true,"blogspot.co.nz":true,"blogspot.co.uk":true,"blogspot.co.za":true,"blogspot.com":true,"blogspot.com.ar":true,"blogspot.com.au":true,"blogspot.com.br":true,"blogspot.com.by":true,"blogspot.com.co":true,"blogspot.com.cy":true,"blogspot.com.ee":true,"blogspot.com.eg":true,"blogspot.com.es":true,"blogspot.com.mt":true,"blogspot.com.ng":true,"blogspot.com.tr":true,"blogspot.com.uy":true,"blogspot.cv":true,"blogspot.cz":true,"blogspot.de":true,"blogspot.dk":true,"blogspot.fi":true,"blogspot.fr":true,"blogspot.gr":true,"blogspot.hk":true,"blogspot.hr":true,"blogspot.hu":true,"blogspot.ie":true,"blogspot.in":true,"blogspot.is":true,"blogspot.it":true,"blogspot.jp":true,"blogspot.kr":true,"blogspot.li":true,"blogspot.lt":true,"blogspot.lu":true,"blogspot.md":true,"blogspot.mk":true,"blogspot.mr":true,"blogspot.mx":true,"blogspot.my":true,"blogspot.nl":true,"blogspot.no":true,"blogspot.pe":true,"blogspot.pt":true,"blogspot.qa":true,"blogspot.re":true,"blogspot.ro":true,"blogspot.rs":true,"blogspot.ru":true,"blogspot.se":true,"blogspot.sg":true,"blogspot.si":true,"blogspot.sk":true,"blogspot.sn":true,"blogspot.td":true,"blogspot.tw":true,"blogspot.ug":true,"blogspot.vn":true,"codespot.com":true,"googleapis.com":true,"googlecode.com":true,"pagespeedmobilizer.com":true,"withgoogle.com":true,"withyoutube.com":true,"herokuapp.com":true,"herokussl.com":true,"iki.fi":true,"biz.at":true,"info.at":true,"co.pl":true,"azurewebsites.net":true,"azure-mobile.net":true,"cloudapp.net":true,"bmoattachments.org":true,"4u.com":true,"nfshost.com":true,"nyc.mn":true,"nid.io":true,"operaunite.com":true,"outsystemscloud.com":true,"art.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pantheon.io":true,"gotpantheon.com":true,"priv.at":true,"qa2.com":true,"rhcloud.com":true,"sandcats.io":true,"biz.ua":true,"co.ua":true,"pp.ua":true,"sinaapp.com":true,"vipsinaapp.com":true,"1kapp.com":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"hk.com":true,"hk.org":true,"ltd.hk":true,"inc.hk":true,"yolasite.com":true,"za.net":true,"za.org":true}); - -// END of automatically generated file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js deleted file mode 100644 index bce52925db1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/lib/store.js +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -'use strict'; -/*jshint unused:false */ - -function Store() { -} -exports.Store = Store; - -// Stores may be synchronous, but are still required to use a -// Continuation-Passing Style API. The CookieJar itself will expose a "*Sync" -// API that converts from synchronous-callbacks to imperative style. -Store.prototype.synchronous = false; - -Store.prototype.findCookie = function(domain, path, key, cb) { - throw new Error('findCookie is not implemented'); -}; - -Store.prototype.findCookies = function(domain, path, cb) { - throw new Error('findCookies is not implemented'); -}; - -Store.prototype.putCookie = function(cookie, cb) { - throw new Error('putCookie is not implemented'); -}; - -Store.prototype.updateCookie = function(oldCookie, newCookie, cb) { - // recommended default implementation: - // return this.putCookie(newCookie, cb); - throw new Error('updateCookie is not implemented'); -}; - -Store.prototype.removeCookie = function(domain, path, key, cb) { - throw new Error('removeCookie is not implemented'); -}; - -Store.prototype.removeCookies = function(domain, path, cb) { - throw new Error('removeCookies is not implemented'); -}; - -Store.prototype.getAllCookies = function(cb) { - throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)'); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json deleted file mode 100644 index 4072a280761..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tough-cookie/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "_args": [ - [ - "tough-cookie@~2.2.0", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "tough-cookie@>=2.2.0 <2.3.0", - "_id": "tough-cookie@2.2.2", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/tough-cookie", - "_nodeVersion": "5.1.1", - "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/tough-cookie-2.2.2.tgz_1457564639182_0.5129188685677946" - }, - "_npmUser": { - "email": "jstash@gmail.com", - "name": "jstash" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "name": "tough-cookie", - "raw": "tough-cookie@~2.2.0", - "rawSpec": "~2.2.0", - "scope": null, - "spec": ">=2.2.0 <2.3.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz", - "_shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7", - "_shrinkwrap": null, - "_spec": "tough-cookie@~2.2.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "author": { - "email": "jstashewsky@salesforce.com", - "name": "Jeremy Stashewsky" - }, - "bugs": { - "url": "https://github.com/SalesforceEng/tough-cookie/issues" - }, - "contributors": [ - { - "name": "Alexander Savin" - }, - { - "name": "Ian Livingstone" - }, - { - "name": "Ivan Nikulin" - }, - { - "name": "Lalit Kapoor" - }, - { - "name": "Sam Thompson" - }, - { - "name": "Sebastian Mayr" - } - ], - "dependencies": {}, - "description": "RFC6265 Cookies and Cookie Jar for node.js", - "devDependencies": { - "async": "^1.4.2", - "vows": "^0.8.1" - }, - "directories": {}, - "dist": { - "shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7", - "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "lib" - ], - "gitHead": "cc46628c4d7d2e8c372ecba29293ca8a207ec192", - "homepage": "https://github.com/SalesforceEng/tough-cookie", - "keywords": [ - "HTTP", - "RFC2965", - "RFC6265", - "cookie", - "cookiejar", - "cookies", - "jar", - "set-cookie" - ], - "license": "BSD-3-Clause", - "main": "./lib/cookie", - "maintainers": [ - { - "email": "jeremy@goinstant.com", - "name": "jstash" - }, - { - "email": "services@goinstant.com", - "name": "goinstant" - } - ], - "name": "tough-cookie", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/SalesforceEng/tough-cookie.git" - }, - "scripts": { - "suffixup": "curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js", - "test": "vows test/*_test.js" - }, - "version": "2.2.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE deleted file mode 100644 index a4a9aee0c2f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md deleted file mode 100644 index bb533d56b1a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -tunnel-agent -============ - -HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js deleted file mode 100644 index 68013ac1f4e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/index.js +++ /dev/null @@ -1,243 +0,0 @@ -'use strict' - -var net = require('net') - , tls = require('tls') - , http = require('http') - , https = require('https') - , events = require('events') - , assert = require('assert') - , util = require('util') - ; - -exports.httpOverHttp = httpOverHttp -exports.httpsOverHttp = httpsOverHttp -exports.httpOverHttps = httpOverHttps -exports.httpsOverHttps = httpsOverHttps - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - return agent -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - agent.createSocket = createSecureSocket - agent.defaultPort = 443 - return agent -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - return agent -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - agent.createSocket = createSecureSocket - agent.defaultPort = 443 - return agent -} - - -function TunnelingAgent(options) { - var self = this - self.options = options || {} - self.proxyOptions = self.options.proxy || {} - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets - self.requests = [] - self.sockets = [] - - self.on('free', function onFree(socket, host, port) { - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i] - if (pending.host === host && pending.port === port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1) - pending.request.onSocket(socket) - return - } - } - socket.destroy() - self.removeSocket(socket) - }) -} -util.inherits(TunnelingAgent, events.EventEmitter) - -TunnelingAgent.prototype.addRequest = function addRequest(req, options) { - var self = this - - // Legacy API: addRequest(req, host, port, path) - if (typeof options === 'string') { - options = { - host: options, - port: arguments[2], - path: arguments[3] - }; - } - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push({host: options.host, port: options.port, request: req}) - return - } - - // If we are under maxSockets create a new one. - self.createConnection({host: options.host, port: options.port, request: req}) -} - -TunnelingAgent.prototype.createConnection = function createConnection(pending) { - var self = this - - self.createSocket(pending, function(socket) { - socket.on('free', onFree) - socket.on('close', onCloseOrRemove) - socket.on('agentRemove', onCloseOrRemove) - pending.request.onSocket(socket) - - function onFree() { - self.emit('free', socket, pending.host, pending.port) - } - - function onCloseOrRemove(err) { - self.removeSocket(socket) - socket.removeListener('free', onFree) - socket.removeListener('close', onCloseOrRemove) - socket.removeListener('agentRemove', onCloseOrRemove) - } - }) -} - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this - var placeholder = {} - self.sockets.push(placeholder) - - var connectOptions = mergeOptions({}, self.proxyOptions, - { method: 'CONNECT' - , path: options.host + ':' + options.port - , agent: false - } - ) - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {} - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64') - } - - debug('making CONNECT request') - var connectReq = self.request(connectOptions) - connectReq.useChunkedEncodingByDefault = false // for v0.6 - connectReq.once('response', onResponse) // for v0.6 - connectReq.once('upgrade', onUpgrade) // for v0.6 - connectReq.once('connect', onConnect) // for v0.7 or later - connectReq.once('error', onError) - connectReq.end() - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head) - }) - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners() - socket.removeAllListeners() - - if (res.statusCode === 200) { - assert.equal(head.length, 0) - debug('tunneling connection has established') - self.sockets[self.sockets.indexOf(placeholder)] = socket - cb(socket) - } else { - debug('tunneling socket could not be established, statusCode=%d', res.statusCode) - var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } - } - - function onError(cause) { - connectReq.removeAllListeners() - - debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) - var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } -} - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) return - - this.sockets.splice(pos, 1) - - var pending = this.requests.shift() - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createConnection(pending) - } -} - -function createSecureSocket(options, cb) { - var self = this - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, mergeOptions({}, self.options, - { servername: options.host - , socket: socket - } - )) - self.sockets[self.sockets.indexOf(socket)] = secureSocket - cb(secureSocket) - }) -} - - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i] - if (typeof overrides === 'object') { - var keys = Object.keys(overrides) - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j] - if (overrides[k] !== undefined) { - target[k] = overrides[k] - } - } - } - } - return target -} - - -var debug -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments) - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0] - } else { - args.unshift('TUNNEL:') - } - console.error.apply(console, args) - } -} else { - debug = function() {} -} -exports.debug = debug // for test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json deleted file mode 100644 index 27e8f58f0c4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tunnel-agent/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - "tunnel-agent@~0.4.1", - "/Users/eshanker/Code/fsevents/node_modules/request" - ] - ], - "_from": "tunnel-agent@>=0.4.1 <0.5.0", - "_id": "tunnel-agent@0.4.3", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/tunnel-agent", - "_nodeVersion": "5.9.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/tunnel-agent-0.4.3.tgz_1462396470295_0.23639482469297945" - }, - "_npmUser": { - "email": "simeonvelichkov@gmail.com", - "name": "simov" - }, - "_npmVersion": "2.15.3", - "_phantomChildren": {}, - "_requested": { - "name": "tunnel-agent", - "raw": "tunnel-agent@~0.4.1", - "rawSpec": "~0.4.1", - "scope": null, - "spec": ">=0.4.1 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/request" - ], - "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "_shasum": "6373db76909fe570e08d73583365ed828a74eeeb", - "_shrinkwrap": null, - "_spec": "tunnel-agent@~0.4.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/request", - "author": { - "email": "mikeal.rogers@gmail.com", - "name": "Mikeal Rogers", - "url": "http://www.futurealoof.com" - }, - "bugs": { - "url": "https://github.com/mikeal/tunnel-agent/issues" - }, - "dependencies": {}, - "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "6373db76909fe570e08d73583365ed828a74eeeb", - "tarball": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "index.js" - ], - "gitHead": "e72d830f5ed388a2a71d37ce062c38e3fb34bdde", - "homepage": "https://github.com/mikeal/tunnel-agent#readme", - "license": "Apache-2.0", - "main": "index.js", - "maintainers": [ - { - "email": "mikeal.rogers@gmail.com", - "name": "mikeal" - }, - { - "email": "jnylen@gmail.com", - "name": "nylen" - }, - { - "email": "fkschott@gmail.com", - "name": "fredkschott" - }, - { - "email": "simeonvelichkov@gmail.com", - "name": "simov" - } - ], - "name": "tunnel-agent", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "url": "git+https://github.com/mikeal/tunnel-agent.git" - }, - "scripts": {}, - "version": "0.4.3" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore deleted file mode 100644 index 7d98dcbd2d3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.eslintrc -.travis.yml -bower.json -test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md deleted file mode 100644 index 77c69bd5ee4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/CHANGELOG.md +++ /dev/null @@ -1,128 +0,0 @@ -TweetNaCl.js Changelog -====================== - - -v0.13.2 -------- - -* Fixed undefined variable bug in fast version of Poly1305. No worries, this - bug was *never* triggered. - -* Specified CC0 public domain dedication. - -* Updated development dependencies. - - -v0.13.1 -------- - -* Exclude `crypto` and `buffer` modules from browserify builds. - - -v0.13.0 -------- - -* Made `nacl-fast` the default version in NPM package. Now - `require("tweetnacl")` will use fast version; to get the original version, - use `require("tweetnacl/nacl.js")`. - -* Cleanup temporary array after generating random bytes. - - -v0.12.2 -------- - -* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`, - `nacl.sign` and related functions up to 3x faster in `nacl-fast` version. - - -v0.12.1 -------- - -* Significantly improved performance of Salsa20 (~1.5x faster) and - Poly1305 (~3.5x faster) in `nacl-fast` version. - - -v0.12.0 -------- - -* Instead of using the given secret key directly, TweetNaCl.js now copies it to - a new array in `nacl.box.keyPair.fromSecretKey` and - `nacl.sign.keyPair.fromSecretKey`. - - -v0.11.2 -------- - -* Added new constant: `nacl.sign.seedLength`. - - -v0.11.1 -------- - -* Even faster hash for both short and long inputs (in `nacl-fast`). - - -v0.11.0 -------- - -* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs - deterministically from a 32-byte seed. (It behaves like - [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html) - `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.) - -* Fast version now has an improved hash implementation that is 2x-5x faster. - -* Fixed benchmarks, which may have produced incorrect measurements. - - -v0.10.1 -------- - -* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`. - - -v0.10.0 -------- - -* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal - with signed messages, and new `nacl.sign.detached` and - `nacl.sign.detached.verify` are available. - - Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a - message and "detached" signature. This was unlike NaCl's API, which dealt with - signed messages (concatenation of signature and message). - - The new API is: - - nacl.sign(message, secretKey) -> signedMessage - nacl.sign.open(signedMessage, publicKey) -> message | null - - Since detached signatures are common, two new API functions were introduced: - - nacl.sign.detached(message, secretKey) -> signature - nacl.sign.detached.verify(message, signature, publicKey) -> true | false - - (Note that it's `verify`, not `open`, and it returns a boolean value, unlike - `open`, which returns an "unsigned" message.) - -* NPM package now comes without `test` directory to keep it small. - - -v0.9.2 ------- - -* Improved documentation. -* Fast version: increased theoretical message size limit from 2^32-1 to 2^52 - bytes in Poly1305 (and thus, secretbox and box). However this has no impact - in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit - indexes, and most implementations won't allocate more than a gigabyte or so. - (Obviously, there are no tests for the correctness of implementation.) Also, - it's not recommended to use messages that large without splitting them into - smaller packets anyway. - - -v0.9.1 ------- - -* Initial release diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md deleted file mode 100644 index 11bd3472c25..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/README.md +++ /dev/null @@ -1,463 +0,0 @@ -TweetNaCl.js -============ - -Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/) -to JavaScript for modern browsers and Node.js. Public domain. - -[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) -](https://travis-ci.org/dchest/tweetnacl-js) - -[Demo](https://dchest.github.io/tweetnacl-js/) - -**:warning: Beta version. The library is stable and API is frozen, however -it has not been independently reviewed. If you can help reviewing it, please -[contact me](mailto:dmitry@codingrobots.com).** - -Documentation -============= - -* [Overview](#overview) -* [Installation](#installation) -* [Usage](#usage) - * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box) - * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox) - * [Scalar multiplication](#scalar-multiplication) - * [Signatures](#signatures) - * [Hashing](#hashing) - * [Random bytes generation](#random-bytes-generation) - * [Constant-time comparison](#constant-time-comparison) - * [Utilities](#utilities) -* [Examples](#examples) -* [System requirements](#system-requirements) -* [Development and testing](#development-and-testing) -* [Contributors](#contributors) -* [Who uses it](#who-uses-it) - - -Overview --------- - -The primary goal of this project is to produce a translation of TweetNaCl to -JavaScript which is as close as possible to the original C implementation, plus -a thin layer of idiomatic high-level API on top of it. - -There are two versions, you can use either of them: - -* `nacl.js` is the port of TweetNaCl with minimum differences from the - original + high-level API. - -* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with - faster versions. - - -Installation ------------- - -You can install TweetNaCl.js via a package manager: - -[Bower](http://bower.io): - - $ bower install tweetnacl - -[NPM](https://www.npmjs.org/): - - $ npm install tweetnacl - -or [download source code](https://github.com/dchest/tweetnacl-js/releases). - - -Usage ------- - -All API functions accept and return bytes as `Uint8Array`s. If you need to -encode or decode strings, use functions from `nacl.util` namespace. - -### Public-key authenticated encryption (box) - -Implements *curve25519-xsalsa20-poly1305*. - -#### nacl.box.keyPair() - -Generates a new random key pair for box and returns it as an object with -`publicKey` and `secretKey` members: - - { - publicKey: ..., // Uint8Array with 32-byte public key - secretKey: ... // Uint8Array with 32-byte secret key - } - - -#### nacl.box.keyPair.fromSecretKey(secretKey) - -Returns a key pair for box with public key corresponding to the given secret -key. - -#### nacl.box(message, nonce, theirPublicKey, mySecretKey) - -Encrypt and authenticates message using peer's public key, our secret key, and -the given nonce, which must be unique for each distinct message for a key pair. - -Returns an encrypted and authenticated message, which is -`nacl.box.overheadLength` longer than the original message. - -#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey) - -Authenticates and decrypts the given box with peer's public key, our secret -key, and the given nonce. - -Returns the original message, or `false` if authentication fails. - -#### nacl.box.before(theirPublicKey, mySecretKey) - -Returns a precomputed shared key which can be used in `nacl.box.after` and -`nacl.box.open.after`. - -#### nacl.box.after(message, nonce, sharedKey) - -Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`. - -#### nacl.box.open.after(box, nonce, sharedKey) - -Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`. - -#### nacl.box.publicKeyLength = 32 - -Length of public key in bytes. - -#### nacl.box.secretKeyLength = 32 - -Length of secret key in bytes. - -#### nacl.box.sharedKeyLength = 32 - -Length of precomputed shared key in bytes. - -#### nacl.box.nonceLength = 24 - -Length of nonce in bytes. - -#### nacl.box.overheadLength = 16 - -Length of overhead added to box compared to original message. - - -### Secret-key authenticated encryption (secretbox) - -Implements *xsalsa20-poly1305*. - -#### nacl.secretbox(message, nonce, key) - -Encrypt and authenticates message using the key and the nonce. The nonce must -be unique for each distinct message for this key. - -Returns an encrypted and authenticated message, which is -`nacl.secretbox.overheadLength` longer than the original message. - -#### nacl.secretbox.open(box, nonce, key) - -Authenticates and decrypts the given secret box using the key and the nonce. - -Returns the original message, or `false` if authentication fails. - -#### nacl.secretbox.keyLength = 32 - -Length of key in bytes. - -#### nacl.secretbox.nonceLength = 24 - -Length of nonce in bytes. - -#### nacl.secretbox.overheadLength = 16 - -Length of overhead added to secret box compared to original message. - - -### Scalar multiplication - -Implements *curve25519*. - -#### nacl.scalarMult(n, p) - -Multiplies an integer `n` by a group element `p` and returns the resulting -group element. - -#### nacl.scalarMult.base(n) - -Multiplies an integer `n` by a standard group element and returns the resulting -group element. - -#### nacl.scalarMult.scalarLength = 32 - -Length of scalar in bytes. - -#### nacl.scalarMult.groupElementLength = 32 - -Length of group element in bytes. - - -### Signatures - -Implements [ed25519](http://ed25519.cr.yp.to). - -#### nacl.sign.keyPair() - -Generates new random key pair for signing and returns it as an object with -`publicKey` and `secretKey` members: - - { - publicKey: ..., // Uint8Array with 32-byte public key - secretKey: ... // Uint8Array with 64-byte secret key - } - -#### nacl.sign.keyPair.fromSecretKey(secretKey) - -Returns a signing key pair with public key corresponding to the given -64-byte secret key. The secret key must have been generated by -`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`. - -#### nacl.sign.keyPair.fromSeed(seed) - -Returns a new signing key pair generated deterministically from a 32-byte seed. -The seed must contain enough entropy to be secure. This method is not -recommended for general use: instead, use `nacl.sign.keyPair` to generate a new -key pair from a random seed. - -#### nacl.sign(message, secretKey) - -Signs the message using the secret key and returns a signed message. - -#### nacl.sign.open(signedMessage, publicKey) - -Verifies the signed message and returns the message without signature. - -Returns `null` if verification failed. - -#### nacl.sign.detached(message, secretKey) - -Signs the message using the secret key and returns a signature. - -#### nacl.sign.detached.verify(message, signature, publicKey) - -Verifies the signature for the message and returns `true` if verification -succeeded or `false` if it failed. - -#### nacl.sign.publicKeyLength = 32 - -Length of signing public key in bytes. - -#### nacl.sign.secretKeyLength = 64 - -Length of signing secret key in bytes. - -#### nacl.sign.seedLength = 32 - -Length of seed for `nacl.sign.keyPair.fromSeed` in bytes. - -#### nacl.sign.signatureLength = 64 - -Length of signature in bytes. - - -### Hashing - -Implements *SHA-512*. - -#### nacl.hash(message) - -Returns SHA-512 hash of the message. - -#### nacl.hash.hashLength = 64 - -Length of hash in bytes. - - -### Random bytes generation - -#### nacl.randomBytes(length) - -Returns a `Uint8Array` of the given length containing random bytes of -cryptographic quality. - -**Implementation note** - -TweetNaCl.js uses the following methods to generate random bytes, -depending on the platform it runs on: - -* `window.crypto.getRandomValues` (WebCrypto standard) -* `window.msCrypto.getRandomValues` (Internet Explorer 11) -* `crypto.randomBytes` (Node.js) - -Note that browsers are required to throw `QuotaExceededError` exception if -requested `length` is more than 65536, so do not ask for more than 65536 bytes -in *one call* (multiple calls to get as many bytes as you like are okay: -browsers can generate infinite amount of random bytes without any bad -consequences). - -If the platform doesn't provide a suitable PRNG, the following functions, -which require random numbers, will throw exception: - -* `nacl.randomBytes` -* `nacl.box.keyPair` -* `nacl.sign.keyPair` - -Other functions are deterministic and will continue working. - -If a platform you are targeting doesn't implement secure random number -generator, but you somehow have a cryptographically-strong source of entropy -(not `Math.random`!), and you know what you are doing, you can plug it into -TweetNaCl.js like this: - - nacl.setPRNG(function(x, n) { - // ... copy n random bytes into x ... - }); - -Note that `nacl.setPRNG` *completely replaces* internal random byte generator -with the one provided. - - -### Constant-time comparison - -#### nacl.verify(x, y) - -Compares `x` and `y` in constant time and returns `true` if their lengths are -non-zero and equal, and their contents are equal. - -Returns `false` if either of the arguments has zero length, or arguments have -different lengths, or their contents differ. - - -### Utilities - -Encoding/decoding functions are provided for convenience. They are correct, -however their performance and wide compatibility with uncommon runtimes is not -something that is considered important compared to the simplicity and size of -implementation. You can use third-party libraries if you need to. - -#### nacl.util.decodeUTF8(string) - -Decodes string and returns `Uint8Array` of bytes. - -#### nacl.util.encodeUTF8(array) - -Encodes `Uint8Array` or `Array` of bytes into string. - -#### nacl.util.decodeBase64(string) - -Decodes Base-64 encoded string and returns `Uint8Array` of bytes. - -#### nacl.util.encodeBase64(array) - -Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding. - - -System requirements -------------------- - -TweetNaCl.js supports modern browsers that have a cryptographically secure -pseudorandom number generator and typed arrays, including the latest versions -of: - -* Chrome -* Firefox -* Safari (Mac, iOS) -* Internet Explorer 11 - -Other systems: - -* Node.js (we test on 0.10 and later) - - -Development and testing ------------------------- - -Install NPM modules needed for development: - - $ npm install - -To build minified versions: - - $ npm run build - -Tests use minified version, so make sure to rebuild it every time you change -`nacl.js` or `nacl-fast.js`. - -### Testing - -To run tests in Node.js: - - $ npm test - -By default all tests described here work on `nacl.min.js`. To test other -versions, set environment variable `NACL_SRC` to the file name you want to test. -For example, the following command will test fast minified version: - - $ NACL_SRC=nacl-fast.min.js npm test - -To run full suite of tests in Node.js, including comparing outputs of -JavaScript port to outputs of the original C version: - - $ npm run testall - -To prepare tests for browsers: - - $ npm run browser - -and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to -run them. - -To run headless browser tests with `testling`: - - $ npm run testling - -(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) - -### Benchmarking - -To run benchmarks in Node.js: - - $ npm run bench - $ NACL_SRC=nacl-fast.min.js npm run bench - -To run benchmarks in a browser, open `test/benchmark/bench.html` (or -`test/benchmark/bench-fast.html`). - - -Contributors ------------- - -JavaScript port: - - * [Dmitry Chestnykh](http://github.com/dchest) (ported xsalsa20, poly1305, curve25519) - * [Devi Mandiri](https://github.com/devi) (ported curve25519, ed25519, sha512) - -Original authors of [NaCl](http://nacl.cr.yp.to), [TweetNaCl](http://tweetnacl.cr.yp.to) -and [Poly1305-donna](https://github.com/floodyberry/poly1305-donna) -(who are *not* responsible for any errors in this implementation): - - * [Daniel J. Bernstein](http://cr.yp.to/djb.html) - * Wesley Janssen - * [Tanja Lange](http://hyperelliptic.org/tanja) - * [Peter Schwabe](http://www.cryptojedi.org/users/peter/) - * [Matthew Dempsky](https://github.com/mdempsky) - * [Andrew Moon](https://github.com/floodyberry) - -Contributors have dedicated their work to the public domain. - -This software is distributed without any warranty. - - -Third-party libraries based on TweetNaCl.js -------------------------------------------- - -* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation -* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption -* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html) - - -Who uses it ------------ - -Some notable users of TweetNaCl.js: - -* [miniLock](http://minilock.io/) -* [Stellar](https://www.stellar.org/) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js deleted file mode 100644 index 6c4995848cc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.js +++ /dev/null @@ -1,2418 +0,0 @@ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function ts64(x, i, h, l) { - x[i] = (h >> 24) & 0xff; - x[i+1] = (h >> 16) & 0xff; - x[i+2] = (h >> 8) & 0xff; - x[i+3] = h & 0xff; - x[i+4] = (l >> 24) & 0xff; - x[i+5] = (l >> 16) & 0xff; - x[i+6] = (l >> 8) & 0xff; - x[i+7] = l & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core_salsa20(o, p, k, c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - x0 = x0 + j0 | 0; - x1 = x1 + j1 | 0; - x2 = x2 + j2 | 0; - x3 = x3 + j3 | 0; - x4 = x4 + j4 | 0; - x5 = x5 + j5 | 0; - x6 = x6 + j6 | 0; - x7 = x7 + j7 | 0; - x8 = x8 + j8 | 0; - x9 = x9 + j9 | 0; - x10 = x10 + j10 | 0; - x11 = x11 + j11 | 0; - x12 = x12 + j12 | 0; - x13 = x13 + j13 | 0; - x14 = x14 + j14 | 0; - x15 = x15 + j15 | 0; - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x1 >>> 0 & 0xff; - o[ 5] = x1 >>> 8 & 0xff; - o[ 6] = x1 >>> 16 & 0xff; - o[ 7] = x1 >>> 24 & 0xff; - - o[ 8] = x2 >>> 0 & 0xff; - o[ 9] = x2 >>> 8 & 0xff; - o[10] = x2 >>> 16 & 0xff; - o[11] = x2 >>> 24 & 0xff; - - o[12] = x3 >>> 0 & 0xff; - o[13] = x3 >>> 8 & 0xff; - o[14] = x3 >>> 16 & 0xff; - o[15] = x3 >>> 24 & 0xff; - - o[16] = x4 >>> 0 & 0xff; - o[17] = x4 >>> 8 & 0xff; - o[18] = x4 >>> 16 & 0xff; - o[19] = x4 >>> 24 & 0xff; - - o[20] = x5 >>> 0 & 0xff; - o[21] = x5 >>> 8 & 0xff; - o[22] = x5 >>> 16 & 0xff; - o[23] = x5 >>> 24 & 0xff; - - o[24] = x6 >>> 0 & 0xff; - o[25] = x6 >>> 8 & 0xff; - o[26] = x6 >>> 16 & 0xff; - o[27] = x6 >>> 24 & 0xff; - - o[28] = x7 >>> 0 & 0xff; - o[29] = x7 >>> 8 & 0xff; - o[30] = x7 >>> 16 & 0xff; - o[31] = x7 >>> 24 & 0xff; - - o[32] = x8 >>> 0 & 0xff; - o[33] = x8 >>> 8 & 0xff; - o[34] = x8 >>> 16 & 0xff; - o[35] = x8 >>> 24 & 0xff; - - o[36] = x9 >>> 0 & 0xff; - o[37] = x9 >>> 8 & 0xff; - o[38] = x9 >>> 16 & 0xff; - o[39] = x9 >>> 24 & 0xff; - - o[40] = x10 >>> 0 & 0xff; - o[41] = x10 >>> 8 & 0xff; - o[42] = x10 >>> 16 & 0xff; - o[43] = x10 >>> 24 & 0xff; - - o[44] = x11 >>> 0 & 0xff; - o[45] = x11 >>> 8 & 0xff; - o[46] = x11 >>> 16 & 0xff; - o[47] = x11 >>> 24 & 0xff; - - o[48] = x12 >>> 0 & 0xff; - o[49] = x12 >>> 8 & 0xff; - o[50] = x12 >>> 16 & 0xff; - o[51] = x12 >>> 24 & 0xff; - - o[52] = x13 >>> 0 & 0xff; - o[53] = x13 >>> 8 & 0xff; - o[54] = x13 >>> 16 & 0xff; - o[55] = x13 >>> 24 & 0xff; - - o[56] = x14 >>> 0 & 0xff; - o[57] = x14 >>> 8 & 0xff; - o[58] = x14 >>> 16 & 0xff; - o[59] = x14 >>> 24 & 0xff; - - o[60] = x15 >>> 0 & 0xff; - o[61] = x15 >>> 8 & 0xff; - o[62] = x15 >>> 16 & 0xff; - o[63] = x15 >>> 24 & 0xff; -} - -function core_hsalsa20(o,p,k,c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x5 >>> 0 & 0xff; - o[ 5] = x5 >>> 8 & 0xff; - o[ 6] = x5 >>> 16 & 0xff; - o[ 7] = x5 >>> 24 & 0xff; - - o[ 8] = x10 >>> 0 & 0xff; - o[ 9] = x10 >>> 8 & 0xff; - o[10] = x10 >>> 16 & 0xff; - o[11] = x10 >>> 24 & 0xff; - - o[12] = x15 >>> 0 & 0xff; - o[13] = x15 >>> 8 & 0xff; - o[14] = x15 >>> 16 & 0xff; - o[15] = x15 >>> 24 & 0xff; - - o[16] = x6 >>> 0 & 0xff; - o[17] = x6 >>> 8 & 0xff; - o[18] = x6 >>> 16 & 0xff; - o[19] = x6 >>> 24 & 0xff; - - o[20] = x7 >>> 0 & 0xff; - o[21] = x7 >>> 8 & 0xff; - o[22] = x7 >>> 16 & 0xff; - o[23] = x7 >>> 24 & 0xff; - - o[24] = x8 >>> 0 & 0xff; - o[25] = x8 >>> 8 & 0xff; - o[26] = x8 >>> 16 & 0xff; - o[27] = x8 >>> 24 & 0xff; - - o[28] = x9 >>> 0 & 0xff; - o[29] = x9 >>> 8 & 0xff; - o[30] = x9 >>> 16 & 0xff; - o[31] = x9 >>> 24 & 0xff; -} - -function crypto_core_salsa20(out,inp,k,c) { - core_salsa20(out,inp,k,c); -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core_hsalsa20(out,inp,k,c); -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = x[i]; - } - return 0; -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20(c,cpos,d,sn,s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); -} - -/* -* Port of Andrew Moon's Poly1305-donna-16. Public domain. -* https://github.com/floodyberry/poly1305-donna -*/ - -var poly1305 = function(key) { - this.buffer = new Uint8Array(16); - this.r = new Uint16Array(10); - this.h = new Uint16Array(10); - this.pad = new Uint16Array(8); - this.leftover = 0; - this.fin = 0; - - var t0, t1, t2, t3, t4, t5, t6, t7; - - t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; - t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; - t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; - this.r[5] = ((t4 >>> 1)) & 0x1ffe; - t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; - t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - this.r[9] = ((t7 >>> 5)) & 0x007f; - - this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; - this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; - this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; - this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; - this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; - this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; - this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; - this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; -}; - -poly1305.prototype.blocks = function(m, mpos, bytes) { - var hibit = this.fin ? 0 : (1 << 11); - var t0, t1, t2, t3, t4, t5, t6, t7, c; - var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; - - var h0 = this.h[0], - h1 = this.h[1], - h2 = this.h[2], - h3 = this.h[3], - h4 = this.h[4], - h5 = this.h[5], - h6 = this.h[6], - h7 = this.h[7], - h8 = this.h[8], - h9 = this.h[9]; - - var r0 = this.r[0], - r1 = this.r[1], - r2 = this.r[2], - r3 = this.r[3], - r4 = this.r[4], - r5 = this.r[5], - r6 = this.r[6], - r7 = this.r[7], - r8 = this.r[8], - r9 = this.r[9]; - - while (bytes >= 16) { - t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; - t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; - t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; - h5 += ((t4 >>> 1)) & 0x1fff; - t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; - t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - h9 += ((t7 >>> 5)) | hibit; - - c = 0; - - d0 = c; - d0 += h0 * r0; - d0 += h1 * (5 * r9); - d0 += h2 * (5 * r8); - d0 += h3 * (5 * r7); - d0 += h4 * (5 * r6); - c = (d0 >>> 13); d0 &= 0x1fff; - d0 += h5 * (5 * r5); - d0 += h6 * (5 * r4); - d0 += h7 * (5 * r3); - d0 += h8 * (5 * r2); - d0 += h9 * (5 * r1); - c += (d0 >>> 13); d0 &= 0x1fff; - - d1 = c; - d1 += h0 * r1; - d1 += h1 * r0; - d1 += h2 * (5 * r9); - d1 += h3 * (5 * r8); - d1 += h4 * (5 * r7); - c = (d1 >>> 13); d1 &= 0x1fff; - d1 += h5 * (5 * r6); - d1 += h6 * (5 * r5); - d1 += h7 * (5 * r4); - d1 += h8 * (5 * r3); - d1 += h9 * (5 * r2); - c += (d1 >>> 13); d1 &= 0x1fff; - - d2 = c; - d2 += h0 * r2; - d2 += h1 * r1; - d2 += h2 * r0; - d2 += h3 * (5 * r9); - d2 += h4 * (5 * r8); - c = (d2 >>> 13); d2 &= 0x1fff; - d2 += h5 * (5 * r7); - d2 += h6 * (5 * r6); - d2 += h7 * (5 * r5); - d2 += h8 * (5 * r4); - d2 += h9 * (5 * r3); - c += (d2 >>> 13); d2 &= 0x1fff; - - d3 = c; - d3 += h0 * r3; - d3 += h1 * r2; - d3 += h2 * r1; - d3 += h3 * r0; - d3 += h4 * (5 * r9); - c = (d3 >>> 13); d3 &= 0x1fff; - d3 += h5 * (5 * r8); - d3 += h6 * (5 * r7); - d3 += h7 * (5 * r6); - d3 += h8 * (5 * r5); - d3 += h9 * (5 * r4); - c += (d3 >>> 13); d3 &= 0x1fff; - - d4 = c; - d4 += h0 * r4; - d4 += h1 * r3; - d4 += h2 * r2; - d4 += h3 * r1; - d4 += h4 * r0; - c = (d4 >>> 13); d4 &= 0x1fff; - d4 += h5 * (5 * r9); - d4 += h6 * (5 * r8); - d4 += h7 * (5 * r7); - d4 += h8 * (5 * r6); - d4 += h9 * (5 * r5); - c += (d4 >>> 13); d4 &= 0x1fff; - - d5 = c; - d5 += h0 * r5; - d5 += h1 * r4; - d5 += h2 * r3; - d5 += h3 * r2; - d5 += h4 * r1; - c = (d5 >>> 13); d5 &= 0x1fff; - d5 += h5 * r0; - d5 += h6 * (5 * r9); - d5 += h7 * (5 * r8); - d5 += h8 * (5 * r7); - d5 += h9 * (5 * r6); - c += (d5 >>> 13); d5 &= 0x1fff; - - d6 = c; - d6 += h0 * r6; - d6 += h1 * r5; - d6 += h2 * r4; - d6 += h3 * r3; - d6 += h4 * r2; - c = (d6 >>> 13); d6 &= 0x1fff; - d6 += h5 * r1; - d6 += h6 * r0; - d6 += h7 * (5 * r9); - d6 += h8 * (5 * r8); - d6 += h9 * (5 * r7); - c += (d6 >>> 13); d6 &= 0x1fff; - - d7 = c; - d7 += h0 * r7; - d7 += h1 * r6; - d7 += h2 * r5; - d7 += h3 * r4; - d7 += h4 * r3; - c = (d7 >>> 13); d7 &= 0x1fff; - d7 += h5 * r2; - d7 += h6 * r1; - d7 += h7 * r0; - d7 += h8 * (5 * r9); - d7 += h9 * (5 * r8); - c += (d7 >>> 13); d7 &= 0x1fff; - - d8 = c; - d8 += h0 * r8; - d8 += h1 * r7; - d8 += h2 * r6; - d8 += h3 * r5; - d8 += h4 * r4; - c = (d8 >>> 13); d8 &= 0x1fff; - d8 += h5 * r3; - d8 += h6 * r2; - d8 += h7 * r1; - d8 += h8 * r0; - d8 += h9 * (5 * r9); - c += (d8 >>> 13); d8 &= 0x1fff; - - d9 = c; - d9 += h0 * r9; - d9 += h1 * r8; - d9 += h2 * r7; - d9 += h3 * r6; - d9 += h4 * r5; - c = (d9 >>> 13); d9 &= 0x1fff; - d9 += h5 * r4; - d9 += h6 * r3; - d9 += h7 * r2; - d9 += h8 * r1; - d9 += h9 * r0; - c += (d9 >>> 13); d9 &= 0x1fff; - - c = (((c << 2) + c)) | 0; - c = (c + d0) | 0; - d0 = c & 0x1fff; - c = (c >>> 13); - d1 += c; - - h0 = d0; - h1 = d1; - h2 = d2; - h3 = d3; - h4 = d4; - h5 = d5; - h6 = d6; - h7 = d7; - h8 = d8; - h9 = d9; - - mpos += 16; - bytes -= 16; - } - this.h[0] = h0; - this.h[1] = h1; - this.h[2] = h2; - this.h[3] = h3; - this.h[4] = h4; - this.h[5] = h5; - this.h[6] = h6; - this.h[7] = h7; - this.h[8] = h8; - this.h[9] = h9; -}; - -poly1305.prototype.finish = function(mac, macpos) { - var g = new Uint16Array(10); - var c, mask, f, i; - - if (this.leftover) { - i = this.leftover; - this.buffer[i++] = 1; - for (; i < 16; i++) this.buffer[i] = 0; - this.fin = 1; - this.blocks(this.buffer, 0, 16); - } - - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - for (i = 2; i < 10; i++) { - this.h[i] += c; - c = this.h[i] >>> 13; - this.h[i] &= 0x1fff; - } - this.h[0] += (c * 5); - c = this.h[0] >>> 13; - this.h[0] &= 0x1fff; - this.h[1] += c; - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - this.h[2] += c; - - g[0] = this.h[0] + 5; - c = g[0] >>> 13; - g[0] &= 0x1fff; - for (i = 1; i < 10; i++) { - g[i] = this.h[i] + c; - c = g[i] >>> 13; - g[i] &= 0x1fff; - } - g[9] -= (1 << 13); - - mask = (g[9] >>> ((2 * 8) - 1)) - 1; - for (i = 0; i < 10; i++) g[i] &= mask; - mask = ~mask; - for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; - - this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; - this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; - this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; - this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; - this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; - this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; - this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; - this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; - - f = this.h[0] + this.pad[0]; - this.h[0] = f & 0xffff; - for (i = 1; i < 8; i++) { - f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; - this.h[i] = f & 0xffff; - } - - mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; - mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; - mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; - mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; - mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; - mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; - mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; - mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; - mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; - mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; - mac[macpos+10] = (this.h[5] >>> 0) & 0xff; - mac[macpos+11] = (this.h[5] >>> 8) & 0xff; - mac[macpos+12] = (this.h[6] >>> 0) & 0xff; - mac[macpos+13] = (this.h[6] >>> 8) & 0xff; - mac[macpos+14] = (this.h[7] >>> 0) & 0xff; - mac[macpos+15] = (this.h[7] >>> 8) & 0xff; -}; - -poly1305.prototype.update = function(m, mpos, bytes) { - var i, want; - - if (this.leftover) { - want = (16 - this.leftover); - if (want > bytes) - want = bytes; - for (i = 0; i < want; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - bytes -= want; - mpos += want; - this.leftover += want; - if (this.leftover < 16) - return; - this.blocks(this.buffer, 0, 16); - this.leftover = 0; - } - - if (bytes >= 16) { - want = bytes - (bytes % 16); - this.blocks(m, mpos, want); - mpos += want; - bytes -= want; - } - - if (bytes) { - for (i = 0; i < bytes; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - this.leftover += bytes; - } -}; - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s = new poly1305(k); - s.update(m, mpos, n); - s.finish(out, outpos); - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var i, v, c = 1; - for (i = 0; i < 16; i++) { - v = o[i] + c + 65535; - c = Math.floor(v / 65536); - o[i] = v - c * 65536; - } - o[0] += c-1 + 37 * (c-1); -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; -} - -function Z(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; -} - -function M(o, a, b) { - var v, c, - t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, - t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, - t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, - t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, - b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11], - b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - - v = a[0]; - t0 += v * b0; - t1 += v * b1; - t2 += v * b2; - t3 += v * b3; - t4 += v * b4; - t5 += v * b5; - t6 += v * b6; - t7 += v * b7; - t8 += v * b8; - t9 += v * b9; - t10 += v * b10; - t11 += v * b11; - t12 += v * b12; - t13 += v * b13; - t14 += v * b14; - t15 += v * b15; - v = a[1]; - t1 += v * b0; - t2 += v * b1; - t3 += v * b2; - t4 += v * b3; - t5 += v * b4; - t6 += v * b5; - t7 += v * b6; - t8 += v * b7; - t9 += v * b8; - t10 += v * b9; - t11 += v * b10; - t12 += v * b11; - t13 += v * b12; - t14 += v * b13; - t15 += v * b14; - t16 += v * b15; - v = a[2]; - t2 += v * b0; - t3 += v * b1; - t4 += v * b2; - t5 += v * b3; - t6 += v * b4; - t7 += v * b5; - t8 += v * b6; - t9 += v * b7; - t10 += v * b8; - t11 += v * b9; - t12 += v * b10; - t13 += v * b11; - t14 += v * b12; - t15 += v * b13; - t16 += v * b14; - t17 += v * b15; - v = a[3]; - t3 += v * b0; - t4 += v * b1; - t5 += v * b2; - t6 += v * b3; - t7 += v * b4; - t8 += v * b5; - t9 += v * b6; - t10 += v * b7; - t11 += v * b8; - t12 += v * b9; - t13 += v * b10; - t14 += v * b11; - t15 += v * b12; - t16 += v * b13; - t17 += v * b14; - t18 += v * b15; - v = a[4]; - t4 += v * b0; - t5 += v * b1; - t6 += v * b2; - t7 += v * b3; - t8 += v * b4; - t9 += v * b5; - t10 += v * b6; - t11 += v * b7; - t12 += v * b8; - t13 += v * b9; - t14 += v * b10; - t15 += v * b11; - t16 += v * b12; - t17 += v * b13; - t18 += v * b14; - t19 += v * b15; - v = a[5]; - t5 += v * b0; - t6 += v * b1; - t7 += v * b2; - t8 += v * b3; - t9 += v * b4; - t10 += v * b5; - t11 += v * b6; - t12 += v * b7; - t13 += v * b8; - t14 += v * b9; - t15 += v * b10; - t16 += v * b11; - t17 += v * b12; - t18 += v * b13; - t19 += v * b14; - t20 += v * b15; - v = a[6]; - t6 += v * b0; - t7 += v * b1; - t8 += v * b2; - t9 += v * b3; - t10 += v * b4; - t11 += v * b5; - t12 += v * b6; - t13 += v * b7; - t14 += v * b8; - t15 += v * b9; - t16 += v * b10; - t17 += v * b11; - t18 += v * b12; - t19 += v * b13; - t20 += v * b14; - t21 += v * b15; - v = a[7]; - t7 += v * b0; - t8 += v * b1; - t9 += v * b2; - t10 += v * b3; - t11 += v * b4; - t12 += v * b5; - t13 += v * b6; - t14 += v * b7; - t15 += v * b8; - t16 += v * b9; - t17 += v * b10; - t18 += v * b11; - t19 += v * b12; - t20 += v * b13; - t21 += v * b14; - t22 += v * b15; - v = a[8]; - t8 += v * b0; - t9 += v * b1; - t10 += v * b2; - t11 += v * b3; - t12 += v * b4; - t13 += v * b5; - t14 += v * b6; - t15 += v * b7; - t16 += v * b8; - t17 += v * b9; - t18 += v * b10; - t19 += v * b11; - t20 += v * b12; - t21 += v * b13; - t22 += v * b14; - t23 += v * b15; - v = a[9]; - t9 += v * b0; - t10 += v * b1; - t11 += v * b2; - t12 += v * b3; - t13 += v * b4; - t14 += v * b5; - t15 += v * b6; - t16 += v * b7; - t17 += v * b8; - t18 += v * b9; - t19 += v * b10; - t20 += v * b11; - t21 += v * b12; - t22 += v * b13; - t23 += v * b14; - t24 += v * b15; - v = a[10]; - t10 += v * b0; - t11 += v * b1; - t12 += v * b2; - t13 += v * b3; - t14 += v * b4; - t15 += v * b5; - t16 += v * b6; - t17 += v * b7; - t18 += v * b8; - t19 += v * b9; - t20 += v * b10; - t21 += v * b11; - t22 += v * b12; - t23 += v * b13; - t24 += v * b14; - t25 += v * b15; - v = a[11]; - t11 += v * b0; - t12 += v * b1; - t13 += v * b2; - t14 += v * b3; - t15 += v * b4; - t16 += v * b5; - t17 += v * b6; - t18 += v * b7; - t19 += v * b8; - t20 += v * b9; - t21 += v * b10; - t22 += v * b11; - t23 += v * b12; - t24 += v * b13; - t25 += v * b14; - t26 += v * b15; - v = a[12]; - t12 += v * b0; - t13 += v * b1; - t14 += v * b2; - t15 += v * b3; - t16 += v * b4; - t17 += v * b5; - t18 += v * b6; - t19 += v * b7; - t20 += v * b8; - t21 += v * b9; - t22 += v * b10; - t23 += v * b11; - t24 += v * b12; - t25 += v * b13; - t26 += v * b14; - t27 += v * b15; - v = a[13]; - t13 += v * b0; - t14 += v * b1; - t15 += v * b2; - t16 += v * b3; - t17 += v * b4; - t18 += v * b5; - t19 += v * b6; - t20 += v * b7; - t21 += v * b8; - t22 += v * b9; - t23 += v * b10; - t24 += v * b11; - t25 += v * b12; - t26 += v * b13; - t27 += v * b14; - t28 += v * b15; - v = a[14]; - t14 += v * b0; - t15 += v * b1; - t16 += v * b2; - t17 += v * b3; - t18 += v * b4; - t19 += v * b5; - t20 += v * b6; - t21 += v * b7; - t22 += v * b8; - t23 += v * b9; - t24 += v * b10; - t25 += v * b11; - t26 += v * b12; - t27 += v * b13; - t28 += v * b14; - t29 += v * b15; - v = a[15]; - t15 += v * b0; - t16 += v * b1; - t17 += v * b2; - t18 += v * b3; - t19 += v * b4; - t20 += v * b5; - t21 += v * b6; - t22 += v * b7; - t23 += v * b8; - t24 += v * b9; - t25 += v * b10; - t26 += v * b11; - t27 += v * b12; - t28 += v * b13; - t29 += v * b14; - t30 += v * b15; - - t0 += 38 * t16; - t1 += 38 * t17; - t2 += 38 * t18; - t3 += 38 * t19; - t4 += 38 * t20; - t5 += 38 * t21; - t6 += 38 * t22; - t7 += 38 * t23; - t8 += 38 * t24; - t9 += 38 * t25; - t10 += 38 * t26; - t11 += 38 * t27; - t12 += 38 * t28; - t13 += 38 * t29; - t14 += 38 * t30; - // t15 left as is - - // first car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - // second car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - o[ 0] = t0; - o[ 1] = t1; - o[ 2] = t2; - o[ 3] = t3; - o[ 4] = t4; - o[ 5] = t5; - o[ 6] = t6; - o[ 7] = t7; - o[ 8] = t8; - o[ 9] = t9; - o[10] = t10; - o[11] = t11; - o[12] = t12; - o[13] = t13; - o[14] = t14; - o[15] = t15; -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -function crypto_hashblocks_hl(hh, hl, m, n) { - var wh = new Int32Array(16), wl = new Int32Array(16), - bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, - bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, - th, tl, i, j, h, l, a, b, c, d; - - var ah0 = hh[0], - ah1 = hh[1], - ah2 = hh[2], - ah3 = hh[3], - ah4 = hh[4], - ah5 = hh[5], - ah6 = hh[6], - ah7 = hh[7], - - al0 = hl[0], - al1 = hl[1], - al2 = hl[2], - al3 = hl[3], - al4 = hl[4], - al5 = hl[5], - al6 = hl[6], - al7 = hl[7]; - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) { - j = 8 * i + pos; - wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; - wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; - } - for (i = 0; i < 80; i++) { - bh0 = ah0; - bh1 = ah1; - bh2 = ah2; - bh3 = ah3; - bh4 = ah4; - bh5 = ah5; - bh6 = ah6; - bh7 = ah7; - - bl0 = al0; - bl1 = al1; - bl2 = al2; - bl3 = al3; - bl4 = al4; - bl5 = al5; - bl6 = al6; - bl7 = al7; - - // add - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma1 - h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); - l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Ch - h = (ah4 & ah5) ^ (~ah4 & ah6); - l = (al4 & al5) ^ (~al4 & al6); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // K - h = K[i*2]; - l = K[i*2+1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // w - h = wh[i%16]; - l = wl[i%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - th = c & 0xffff | d << 16; - tl = a & 0xffff | b << 16; - - // add - h = th; - l = tl; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma0 - h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); - l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Maj - h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); - l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh7 = (c & 0xffff) | (d << 16); - bl7 = (a & 0xffff) | (b << 16); - - // add - h = bh3; - l = bl3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = th; - l = tl; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh3 = (c & 0xffff) | (d << 16); - bl3 = (a & 0xffff) | (b << 16); - - ah1 = bh0; - ah2 = bh1; - ah3 = bh2; - ah4 = bh3; - ah5 = bh4; - ah6 = bh5; - ah7 = bh6; - ah0 = bh7; - - al1 = bl0; - al2 = bl1; - al3 = bl2; - al4 = bl3; - al5 = bl4; - al6 = bl5; - al7 = bl6; - al0 = bl7; - - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - // add - h = wh[j]; - l = wl[j]; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = wh[(j+9)%16]; - l = wl[(j+9)%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma0 - th = wh[(j+1)%16]; - tl = wl[(j+1)%16]; - h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); - l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma1 - th = wh[(j+14)%16]; - tl = wl[(j+14)%16]; - h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); - l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - wh[j] = (c & 0xffff) | (d << 16); - wl[j] = (a & 0xffff) | (b << 16); - } - } - } - - // add - h = ah0; - l = al0; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[0]; - l = hl[0]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[0] = ah0 = (c & 0xffff) | (d << 16); - hl[0] = al0 = (a & 0xffff) | (b << 16); - - h = ah1; - l = al1; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[1]; - l = hl[1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[1] = ah1 = (c & 0xffff) | (d << 16); - hl[1] = al1 = (a & 0xffff) | (b << 16); - - h = ah2; - l = al2; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[2]; - l = hl[2]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[2] = ah2 = (c & 0xffff) | (d << 16); - hl[2] = al2 = (a & 0xffff) | (b << 16); - - h = ah3; - l = al3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[3]; - l = hl[3]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[3] = ah3 = (c & 0xffff) | (d << 16); - hl[3] = al3 = (a & 0xffff) | (b << 16); - - h = ah4; - l = al4; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[4]; - l = hl[4]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[4] = ah4 = (c & 0xffff) | (d << 16); - hl[4] = al4 = (a & 0xffff) | (b << 16); - - h = ah5; - l = al5; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[5]; - l = hl[5]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[5] = ah5 = (c & 0xffff) | (d << 16); - hl[5] = al5 = (a & 0xffff) | (b << 16); - - h = ah6; - l = al6; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[6]; - l = hl[6]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[6] = ah6 = (c & 0xffff) | (d << 16); - hl[6] = al6 = (a & 0xffff) | (b << 16); - - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[7]; - l = hl[7]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[7] = ah7 = (c & 0xffff) | (d << 16); - hl[7] = al7 = (a & 0xffff) | (b << 16); - - pos += 128; - n -= 128; - } - - return n; -} - -function crypto_hash(out, m, n) { - var hh = new Int32Array(8), - hl = new Int32Array(8), - x = new Uint8Array(256), - i, b = n; - - hh[0] = 0x6a09e667; - hh[1] = 0xbb67ae85; - hh[2] = 0x3c6ef372; - hh[3] = 0xa54ff53a; - hh[4] = 0x510e527f; - hh[5] = 0x9b05688c; - hh[6] = 0x1f83d9ab; - hh[7] = 0x5be0cd19; - - hl[0] = 0xf3bcc908; - hl[1] = 0x84caa73b; - hl[2] = 0xfe94f82b; - hl[3] = 0x5f1d36f1; - hl[4] = 0xade682d1; - hl[5] = 0x2b3e6c1f; - hl[6] = 0xfb41bd6b; - hl[7] = 0x137e2179; - - crypto_hashblocks_hl(hh, hl, m, n); - n %= 128; - - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, (b / 0x20000000) | 0, b << 3); - crypto_hashblocks_hl(hh, hl, x, n); - - for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -nacl.util = {}; - -nacl.util.decodeUTF8 = function(s) { - var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; -}; - -nacl.util.encodeUTF8 = function(arr) { - var i, s = []; - for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); - return decodeURIComponent(escape(s.join(''))); -}; - -nacl.util.encodeBase64 = function(arr) { - if (typeof btoa === 'undefined') { - return (new Buffer(arr)).toString('base64'); - } else { - var i, s = [], len = arr.length; - for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); - return btoa(s.join('')); - } -}; - -nacl.util.decodeBase64 = function(s) { - if (typeof atob === 'undefined') { - return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); - } else { - var i, d = atob(s), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; - } -}; - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto; - if (typeof window !== 'undefined') { - // Browser. - if (window.crypto && window.crypto.getRandomValues) { - crypto = window.crypto; // Standard - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - crypto = window.msCrypto; // Internet Explorer 11+ - } - if (crypto) { - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - crypto.getRandomValues(v); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js deleted file mode 100644 index 7072c2af443..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl-fast.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;_=_+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+g|0,L=L+v|0,C=C+b|0,R=R+d|0,z=z+A|0,r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=C>>>0&255,r[53]=C>>>8&255,r[54]=C>>>16&255,r[55]=C>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=z>>>0&255,r[61]=z>>>8&255,r[62]=z>>>16&255,r[63]=z>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=z>>>0&255,r[13]=z>>>8&255,r[14]=z>>>16&255,r[15]=z>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function v(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function b(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function d(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(b(h),b(h),b(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function _(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,g=0,v=0,b=0,d=0,A=0,_=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,C=0,R=0,z=n[0],P=n[1],O=n[2],N=n[3],F=n[4],I=n[5],j=n[6],G=n[7],Z=n[8],V=n[9],q=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*z,h+=e*P,a+=e*O,f+=e*N,s+=e*F,u+=e*I,c+=e*j,y+=e*G,l+=e*Z,w+=e*V,p+=e*q,g+=e*X,v+=e*D,b+=e*H,d+=e*J,A+=e*Q,e=t[1],h+=e*z,a+=e*P,f+=e*O,s+=e*N,u+=e*F,c+=e*I,y+=e*j,l+=e*G,w+=e*Z,p+=e*V,g+=e*q,v+=e*X,b+=e*D,d+=e*H,A+=e*J,_+=e*Q,e=t[2],a+=e*z,f+=e*P,s+=e*O,u+=e*N,c+=e*F,y+=e*I,l+=e*j,w+=e*G,p+=e*Z,g+=e*V,v+=e*q,b+=e*X,d+=e*D,A+=e*H,_+=e*J,U+=e*Q,e=t[3],f+=e*z,s+=e*P,u+=e*O,c+=e*N,y+=e*F,l+=e*I,w+=e*j,p+=e*G,g+=e*Z,v+=e*V,b+=e*q,d+=e*X,A+=e*D,_+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*z,u+=e*P,c+=e*O,y+=e*N,l+=e*F,w+=e*I,p+=e*j,g+=e*G,v+=e*Z,b+=e*V,d+=e*q,A+=e*X,_+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*z,c+=e*P,y+=e*O,l+=e*N,w+=e*F,p+=e*I,g+=e*j,v+=e*G,b+=e*Z,d+=e*V,A+=e*q,_+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*z,y+=e*P,l+=e*O,w+=e*N,p+=e*F,g+=e*I,v+=e*j,b+=e*G,d+=e*Z,A+=e*V,_+=e*q,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*z,l+=e*P,w+=e*O,p+=e*N,g+=e*F,v+=e*I,b+=e*j,d+=e*G,A+=e*Z,_+=e*V,U+=e*q,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*z,w+=e*P,p+=e*O,g+=e*N,v+=e*F,b+=e*I,d+=e*j,A+=e*G,_+=e*Z,U+=e*V,E+=e*q,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*z,p+=e*P,g+=e*O,v+=e*N,b+=e*F,d+=e*I,A+=e*j,_+=e*G,U+=e*Z,E+=e*V,x+=e*q,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*z,g+=e*P,v+=e*O,b+=e*N,d+=e*F,A+=e*I,_+=e*j,U+=e*G,E+=e*Z,x+=e*V,M+=e*q,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],g+=e*z,v+=e*P,b+=e*O,d+=e*N,A+=e*F,_+=e*I,U+=e*j,E+=e*G,x+=e*Z,M+=e*V,m+=e*q,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],v+=e*z,b+=e*P,d+=e*O,A+=e*N,_+=e*F,U+=e*I,E+=e*j,x+=e*G,M+=e*Z,m+=e*V,B+=e*q,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],b+=e*z,d+=e*P,A+=e*O,_+=e*N,U+=e*F,E+=e*I,x+=e*j,M+=e*G,m+=e*Z,B+=e*V,S+=e*q,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],d+=e*z,A+=e*P,_+=e*O,U+=e*N,E+=e*F,x+=e*I,M+=e*j,m+=e*G,B+=e*Z,S+=e*V,K+=e*q,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,C+=e*Q,e=t[15],A+=e*z,_+=e*P,U+=e*O,E+=e*N,x+=e*F,M+=e*I,m+=e*j,B+=e*G,S+=e*Z,K+=e*V,T+=e*q,Y+=e*X,k+=e*D,L+=e*H,C+=e*J,R+=e*Q,i+=38*_,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,g+=38*k,v+=38*L,b+=38*C,d+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=g,r[12]=v,r[13]=b,r[14]=d,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,d(a,f,e),d(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),d(a,f,e),d(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function C(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function z(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],C=r[2],R=r[3],z=r[4],P=r[5],O=r[6],N=r[7],F=t[0],I=t[1],j=t[2],G=t[3],Z=t[4],V=t[5],q=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=C,a=R,f=z,s=P,u=O,c=N,y=F,l=I,w=j,p=G,g=Z,v=V,b=q,d=X,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(z>>>14|Z<<18)^(z>>>18|Z<<14)^(Z>>>9|z<<23),M=(Z>>>14|z<<18)^(Z>>>18|z<<14)^(z>>>9|Z<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=z&P^~z&O,M=Z&V^~Z&q,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,_=65535&m|B<<16,x=A,M=_,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&C^L&C,M=F&I^F&j^I&j,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,d=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=_,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,C=i,R=h,z=a,P=f,O=s,N=u,k=c,I=y,j=l,G=w,Z=p,V=g,q=v,X=b,F=d,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],_=Y[(E+1)%16],x=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7,M=(_>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],_=Y[(E+14)%16],x=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6,M=(_>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=C,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=C=65535&S|K<<16,t[2]=j=65535&m|B<<16,x=R,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=G=65535&m|B<<16,x=z,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=z=65535&S|K<<16,t[4]=Z=65535&m|B<<16,x=P,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=P=65535&S|K<<16,t[5]=V=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=O=65535&S|K<<16,t[6]=q=65535&m|B<<16,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=N=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function P(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,z(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),z(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function O(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function N(r,t,n){var e;for(e=0;4>e;e++)d(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(v(r[0],er),v(r[1],or),v(r[2],or),v(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,N(r,t,e),O(t,r),O(r,r),N(r,t,e)}function j(r,t){var n=[$(),$(),$(),$()];v(n[0],fr),v(n[1],sr),v(n[2],or),m(n[3],fr,sr),I(r,n,t)}function G(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),P(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,j(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function Z(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*gr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*gr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*gr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function V(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;Z(r,n)}function q(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];P(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(P(f,r.subarray(32),n+32),V(f),j(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(P(a,r,n+64),V(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return Z(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return v(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),_(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),_(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(P(f,r,n),V(f),I(s,u,f),j(u,t.subarray(32)),O(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==vr)throw new Error("bad key size");if(t.length!==br)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],C=this.r[1],R=this.r[2],z=this.r[3],P=this.r[4],O=this.r[5],N=this.r[6],F=this.r[7],I=this.r[8],j=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=5*x*j,y+=5*M*I,y+=5*m*F,y+=5*B*N,c=y>>>13,y&=8191,y+=5*S*O,y+=5*K*P,y+=5*T*z,y+=5*Y*R,y+=5*k*C,c+=y>>>13,y&=8191,l=c,l+=E*C,l+=x*L,l+=5*M*j,l+=5*m*I,l+=5*B*F,c=l>>>13,l&=8191,l+=5*S*N,l+=5*K*O,l+=5*T*P,l+=5*Y*z,l+=5*k*R,c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*C,w+=M*L,w+=5*m*j,w+=5*B*I,c=w>>>13,w&=8191,w+=5*S*F,w+=5*K*N,w+=5*T*O,w+=5*Y*P,w+=5*k*z,c+=w>>>13,w&=8191,p=c,p+=E*z,p+=x*R,p+=M*C,p+=m*L,p+=5*B*j,c=p>>>13,p&=8191,p+=5*S*I,p+=5*K*F,p+=5*T*N,p+=5*Y*O,p+=5*k*P,c+=p>>>13,p&=8191,g=c,g+=E*P,g+=x*z,g+=M*R,g+=m*C,g+=B*L,c=g>>>13,g&=8191,g+=5*S*j,g+=5*K*I,g+=5*T*F,g+=5*Y*N,g+=5*k*O,c+=g>>>13,g&=8191,v=c,v+=E*O,v+=x*P,v+=M*z,v+=m*R,v+=B*C,c=v>>>13,v&=8191,v+=S*L,v+=5*K*j,v+=5*T*I,v+=5*Y*F,v+=5*k*N,c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*z,b+=B*R,c=b>>>13,b&=8191,b+=S*C,b+=K*L,b+=5*T*j,b+=5*Y*I,b+=5*k*F,c+=b>>>13,b&=8191,d=c,d+=E*F,d+=x*N,d+=M*O,d+=m*P,d+=B*z,c=d>>>13,d&=8191,d+=S*R,d+=K*C,d+=T*L,d+=5*Y*j,d+=5*k*I,c+=d>>>13,d&=8191,A=c,A+=E*I,A+=x*F,A+=M*N,A+=m*O,A+=B*P,c=A>>>13,A&=8191,A+=S*z,A+=K*R,A+=T*C,A+=Y*L,A+=5*k*j,c+=A>>>13,A&=8191,_=c,_+=E*j,_+=x*I,_+=M*F,_+=m*N,_+=B*O,c=_>>>13,_&=8191,_+=S*P,_+=K*z,_+=T*R,_+=Y*C,_+=k*L,c+=_>>>13,_&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=g,S=v,K=b,T=d,Y=A,k=_,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(h[9]>>>15)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=g,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],gr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),vr=32,br=24,dr=32,Ar=16,_r=32,Ur=32,Er=32,xr=32,Mr=32,mr=br,Br=dr,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:g,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:C,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:P,crypto_sign:q,crypto_sign_keypair:G,crypto_sign_open:D,crypto_secretbox_KEYBYTES:vr,crypto_secretbox_NONCEBYTES:br,crypto_secretbox_ZEROBYTES:dr,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:_r,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util={},r.util.decodeUTF8=function(r){var t,n=unescape(encodeURIComponent(r)),e=new Uint8Array(n.length);for(t=0;tt;t++)n.push(String.fromCharCode(r[t]));return btoa(n.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var t,n=atob(r),e=new Uint8Array(n.length);for(t=0;te)return null;for(var o=new Uint8Array(e),i=0;ie;e++)o[e]=t[e];for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return G(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;ne;e++)n[e]=r[e];return G(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return P(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?t=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(t=window.msCrypto),t&&r.setPRNG(function(r,n){var e,o=new Uint8Array(n);for(t.getRandomValues(o),e=0;n>e;e++)r[e]=o[e];W(o)})):"undefined"!=typeof require&&(t=require("crypto"),t&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js deleted file mode 100644 index b8edbbee692..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.js +++ /dev/null @@ -1,1205 +0,0 @@ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; }; -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function L32(x, c) { return (x << c) | (x >>> (32 - c)); } - -function ld32(x, i) { - var u = x[i+3] & 0xff; - u = (u<<8)|(x[i+2] & 0xff); - u = (u<<8)|(x[i+1] & 0xff); - return (u<<8)|(x[i+0] & 0xff); -} - -function dl64(x, i) { - var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3]; - var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7]; - return new u64(h, l); -} - -function st32(x, j, u) { - var i; - for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; } -} - -function ts64(x, i, u) { - x[i] = (u.hi >> 24) & 0xff; - x[i+1] = (u.hi >> 16) & 0xff; - x[i+2] = (u.hi >> 8) & 0xff; - x[i+3] = u.hi & 0xff; - x[i+4] = (u.lo >> 24) & 0xff; - x[i+5] = (u.lo >> 16) & 0xff; - x[i+6] = (u.lo >> 8) & 0xff; - x[i+7] = u.lo & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core(out,inp,k,c,h) { - var w = new Uint32Array(16), x = new Uint32Array(16), - y = new Uint32Array(16), t = new Uint32Array(4); - var i, j, m; - - for (i = 0; i < 4; i++) { - x[5*i] = ld32(c, 4*i); - x[1+i] = ld32(k, 4*i); - x[6+i] = ld32(inp, 4*i); - x[11+i] = ld32(k, 16+4*i); - } - - for (i = 0; i < 16; i++) y[i] = x[i]; - - for (i = 0; i < 20; i++) { - for (j = 0; j < 4; j++) { - for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16]; - t[1] ^= L32((t[0]+t[3])|0, 7); - t[2] ^= L32((t[1]+t[0])|0, 9); - t[3] ^= L32((t[2]+t[1])|0,13); - t[0] ^= L32((t[3]+t[2])|0,18); - for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m]; - } - for (m = 0; m < 16; m++) x[m] = w[m]; - } - - if (h) { - for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0; - for (i = 0; i < 4; i++) { - x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0; - x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0; - } - for (i = 0; i < 4; i++) { - st32(out,4*i,x[5*i]); - st32(out,16+4*i,x[6+i]); - } - } else { - for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0); - } -} - -function crypto_core_salsa20(out,inp,k,c) { - core(out,inp,k,c,false); - return 0; -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core(out,inp,k,c,true); - return 0; -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - if (!b) return 0; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - if (m) mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,d,n,k) { - return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k); -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s); -} - -function add1305(h, c) { - var j, u = 0; - for (j = 0; j < 17; j++) { - u = (u + ((h[j] + c[j]) | 0)) | 0; - h[j] = u & 255; - u >>>= 8; - } -} - -var minusp = new Uint32Array([ - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252 -]); - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s, i, j, u; - var x = new Uint32Array(17), r = new Uint32Array(17), - h = new Uint32Array(17), c = new Uint32Array(17), - g = new Uint32Array(17); - for (j = 0; j < 17; j++) r[j]=h[j]=0; - for (j = 0; j < 16; j++) r[j]=k[j]; - r[3]&=15; - r[4]&=252; - r[7]&=15; - r[8]&=252; - r[11]&=15; - r[12]&=252; - r[15]&=15; - - while (n > 0) { - for (j = 0; j < 17; j++) c[j] = 0; - for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j]; - c[j] = 1; - mpos += j; n -= j; - add1305(h,c); - for (i = 0; i < 17; i++) { - x[i] = 0; - for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0; - } - for (i = 0; i < 17; i++) h[i] = x[i]; - u = 0; - for (j = 0; j < 16; j++) { - u = (u + h[j]) | 0; - h[j] = u & 255; - u >>>= 8; - } - u = (u + h[16]) | 0; h[16] = u & 3; - u = (5 * (u >>> 2)) | 0; - for (j = 0; j < 16; j++) { - u = (u + h[j]) | 0; - h[j] = u & 255; - u >>>= 8; - } - u = (u + h[16]) | 0; h[16] = u; - } - - for (j = 0; j < 17; j++) g[j] = h[j]; - add1305(h,minusp); - s = (-(h[16] >>> 7) | 0); - for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]); - - for (j = 0; j < 16; j++) c[j] = k[j + 16]; - c[16] = 0; - add1305(h,c); - for (j = 0; j < 16; j++) out[outpos+j] = h[j]; - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var c; - var i; - for (i = 0; i < 16; i++) { - o[i] += 65536; - c = Math.floor(o[i] / 65536); - o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0); - o[i] -= (c * 65536); - } -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - var i; - for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0; -} - -function Z(o, a, b) { - var i; - for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0; -} - -function M(o, a, b) { - var i, j, t = new Float64Array(31); - for (i = 0; i < 31; i++) t[i] = 0; - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - t[i+j] += a[i] * b[j]; - } - } - for (i = 0; i < 15; i++) { - t[i] += 38 * t[i+16]; - } - for (i = 0; i < 16; i++) o[i] = t[i]; - car25519(o); - car25519(o); -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -function add64() { - var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i; - for (i = 0; i < arguments.length; i++) { - l = arguments[i].lo; - h = arguments[i].hi; - a += (l & m16); b += (l >>> 16); - c += (h & m16); d += (h >>> 16); - } - - b += (a >>> 16); - c += (b >>> 16); - d += (c >>> 16); - - return new u64((c & m16) | (d << 16), (a & m16) | (b << 16)); -} - -function shr64(x, c) { - return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c))); -} - -function xor64() { - var l = 0, h = 0, i; - for (i = 0; i < arguments.length; i++) { - l ^= arguments[i].lo; - h ^= arguments[i].hi; - } - return new u64(h, l); -} - -function R(x, c) { - var h, l, c1 = 32 - c; - if (c < 32) { - h = (x.hi >>> c) | (x.lo << c1); - l = (x.lo >>> c) | (x.hi << c1); - } else if (c < 64) { - h = (x.lo >>> c) | (x.hi << c1); - l = (x.hi >>> c) | (x.lo << c1); - } - return new u64(h, l); -} - -function Ch(x, y, z) { - var h = (x.hi & y.hi) ^ (~x.hi & z.hi), - l = (x.lo & y.lo) ^ (~x.lo & z.lo); - return new u64(h, l); -} - -function Maj(x, y, z) { - var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi), - l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo); - return new u64(h, l); -} - -function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); } -function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); } -function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); } -function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); } - -var K = [ - new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd), - new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc), - new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019), - new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118), - new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe), - new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2), - new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1), - new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694), - new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3), - new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65), - new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483), - new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5), - new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210), - new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4), - new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725), - new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70), - new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926), - new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df), - new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8), - new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b), - new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001), - new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30), - new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910), - new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8), - new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53), - new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8), - new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb), - new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3), - new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60), - new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec), - new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9), - new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b), - new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207), - new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178), - new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6), - new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b), - new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493), - new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c), - new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a), - new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817) -]; - -function crypto_hashblocks(x, m, n) { - var z = [], b = [], a = [], w = [], t, i, j; - - for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i); - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos); - for (i = 0; i < 80; i++) { - for (j = 0; j < 8; j++) b[j] = a[j]; - t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]); - b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2])); - b[3] = add64(b[3], t); - for (j = 0; j < 8; j++) a[(j+1)%8] = b[j]; - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16])); - } - } - } - - for (i = 0; i < 8; i++) { - a[i] = add64(a[i], z[i]); - z[i] = a[i]; - } - - pos += 128; - n -= 128; - } - - for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]); - return n; -} - -var iv = new Uint8Array([ - 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, - 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, - 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, - 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, - 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, - 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, - 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, - 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 -]); - -function crypto_hash(out, m, n) { - var h = new Uint8Array(64), x = new Uint8Array(256); - var i, b = n; - - for (i = 0; i < 64; i++) h[i] = iv[i]; - - crypto_hashblocks(h, m, n); - n %= 128; - - for (i = 0; i < 256; i++) x[i] = 0; - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3)); - crypto_hashblocks(h, x, n); - - for (i = 0; i < 64; i++) out[i] = h[i]; - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -nacl.util = {}; - -nacl.util.decodeUTF8 = function(s) { - var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; -}; - -nacl.util.encodeUTF8 = function(arr) { - var i, s = []; - for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); - return decodeURIComponent(escape(s.join(''))); -}; - -nacl.util.encodeBase64 = function(arr) { - if (typeof btoa === 'undefined') { - return (new Buffer(arr)).toString('base64'); - } else { - var i, s = [], len = arr.length; - for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); - return btoa(s.join('')); - } -}; - -nacl.util.decodeBase64 = function(s) { - if (typeof atob === 'undefined') { - return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); - } else { - var i, d = atob(s), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; - } -}; - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto; - if (typeof window !== 'undefined') { - // Browser. - if (window.crypto && window.crypto.getRandomValues) { - crypto = window.crypto; // Standard - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - crypto = window.msCrypto; // Internet Explorer 11+ - } - if (crypto) { - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - crypto.getRandomValues(v); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js deleted file mode 100644 index 95d869502e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/nacl.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function p(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function v(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,p(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(p(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,p(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function b(r,n,e,t,o,i){var a=new Uint8Array(16);return v(a,0,e,t,o,i),f(r,n,a,0)}function A(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),v(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function U(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==b(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function _(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function d(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function E(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(d(a),d(a),d(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,E(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];d(r),d(r)}function L(r,n){Y(r,n,n)}function C(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function k(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,E(f,u,t),E(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ur),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),E(f,u,t),E(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return C(l,l),Y(h,h,l),x(r,h),0}function z(r,n){return k(r,n,vr)}function P(r,n){return gr(n,32),z(r,n)}function O(r,n,e){var t=new Uint8Array(32);return k(t,e,n),y(r,pr,t,Br)}function F(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Kr(r,n,e,t,a)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function j(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function G(){var r,n=0,e=0;for(r=0;rn?(e=r.hi>>>n|r.lo<>>n|r.hi<n&&(e=r.lo>>>n|r.hi<>>n|r.lo<a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),Z(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,q(w[0]),V(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,dr),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)E(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();C(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(_(r[0],br),_(r[1],Ar),_(r[2],Ar),_(r[3],br),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];_(e[0],Er),_(e[1],xr),_(e[2],Ar),Y(e[3],Er,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*Cr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*Cr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*Cr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return _(r[2],Ar),S(r[1],n),L(o,r[1]),Y(i,o,_r),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),R(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],br,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==Rr)throw new Error("bad key size");if(n.length!==kr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Nr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;nn;n++)e.push(String.fromCharCode(r[n]));return btoa(e.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var n,e=atob(r),t=new Uint8Array(e.length);for(n=0;nt)return null;for(var o=new Uint8Array(t),i=0;it;t++)o[t]=n[t];for(t=0;t=0},r.sign.keyPair=function(){var r=new Uint8Array(qr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(qr),e=0;et;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=qr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Vr,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?n=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(n=window.msCrypto),n&&r.setPRNG(function(r,e){var t,o=new Uint8Array(e);for(n.getRandomValues(o),t=0;e>t;t++)r[t]=o[t];sr(o)})):"undefined"!=typeof require&&(n=require("crypto"),n&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json deleted file mode 100644 index 3243f41a555..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/tweetnacl/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "_args": [ - [ - "tweetnacl@~0.13.0", - "/Users/eshanker/Code/fsevents/node_modules/sshpk" - ] - ], - "_from": "tweetnacl@>=0.13.0 <0.14.0", - "_id": "tweetnacl@0.13.3", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/tweetnacl", - "_nodeVersion": "4.2.3", - "_npmUser": { - "email": "dmitry@codingrobots.com", - "name": "dchest" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "name": "tweetnacl", - "raw": "tweetnacl@~0.13.0", - "rawSpec": "~0.13.0", - "scope": null, - "spec": ">=0.13.0 <0.14.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/sshpk" - ], - "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", - "_shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56", - "_shrinkwrap": null, - "_spec": "tweetnacl@~0.13.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/sshpk", - "author": { - "name": "TweetNaCl-js contributors" - }, - "browser": { - "buffer": false, - "crypto": false - }, - "bugs": { - "url": "https://github.com/dchest/tweetnacl-js/issues" - }, - "dependencies": {}, - "description": "Port of TweetNaCl cryptographic library to JavaScript", - "devDependencies": { - "browserify": "^10.1.3", - "eslint": "^1.4.3", - "faucet": "0.0.1", - "tap-browser-color": "^0.1.2", - "tape": "^4.0.0", - "testling": "^1.7.1", - "uglify-js": "^2.4.21" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56", - "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz" - }, - "gitHead": "2bb422cb707fba4a5ec9654688564a4fb861b068", - "homepage": "https://dchest.github.io/tweetnacl-js", - "keywords": [ - "crypto", - "cryptography", - "curve25519", - "ed25519", - "encrypt", - "hash", - "key", - "nacl", - "poly1305", - "public", - "salsa20", - "signatures" - ], - "license": "Public domain", - "main": "nacl-fast.js", - "maintainers": [ - { - "email": "dmitry@codingrobots.com", - "name": "dchest" - } - ], - "name": "tweetnacl", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/dchest/tweetnacl-js.git" - }, - "scripts": { - "bench": "node test/benchmark/bench.js", - "browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null", - "browser-quick": "browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", - "build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js", - "chrome": "browserify test/browser/testling_init.js test/*.js | testling -x google-chrome | faucet", - "firefox": "browserify test/browser/testling_init.js test/*.js | testling -x firefox | faucet", - "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js", - "test": "tape test/*.js | faucet", - "testall": "make -C test/c && tape test/*.js test/c/*.js | faucet", - "testling": "browserify test/browser/testling_init.js test/*.js | testling | faucet" - }, - "testling": { - "browsers": [ - "android-browser/latest", - "chrome/22..latest", - "firefox/16..latest", - "ipad/6..latest", - "iphone/6..latest", - "opera/11.0..latest", - "safari/latest" - ], - "files": "test/*.js" - }, - "version": "0.13.3" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE deleted file mode 100644 index 05eeeb88c2e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md deleted file mode 100644 index 81166753aba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Use this module to convert a username/groupname to a uid/gid number. - -Usage: - -``` -npm install uid-number -``` - -Then, in your node program: - -```javascript -var uidNumber = require("uid-number") -uidNumber("isaacs", function (er, uid, gid) { - // gid is null because we didn't ask for a group name - // uid === 24561 because that's my number. -}) -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js deleted file mode 100755 index 0b391748a93..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/get-uid-gid.js +++ /dev/null @@ -1,24 +0,0 @@ -if (module !== require.main) { - throw new Error("This file should not be loaded with require()") -} - -if (!process.getuid || !process.getgid) { - throw new Error("this file should not be called without uid/gid support") -} - -var argv = process.argv.slice(2) - , user = argv[0] || process.getuid() - , group = argv[1] || process.getgid() - -if (!isNaN(user)) user = +user -if (!isNaN(group)) group = +group - -console.error([user, group]) - -try { - process.setgid(group) - process.setuid(user) - console.log(JSON.stringify({uid:+process.getuid(), gid:+process.getgid()})) -} catch (ex) { - console.log(JSON.stringify({error:ex.message,errno:ex.errno})) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json deleted file mode 100644 index e374169bc7a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_args": [ - [ - "uid-number@~0.0.6", - "/Users/eshanker/Code/fsevents/node_modules/tar-pack" - ] - ], - "_from": "uid-number@>=0.0.6 <0.1.0", - "_id": "uid-number@0.0.6", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/uid-number", - "_nodeVersion": "0.10.31", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "2.1.3", - "_phantomChildren": {}, - "_requested": { - "name": "uid-number", - "raw": "uid-number@~0.0.6", - "rawSpec": "~0.0.6", - "scope": null, - "spec": ">=0.0.6 <0.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/tar-pack" - ], - "_resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "_shasum": "0ea10e8035e8eb5b8e4449f06da1c730663baa81", - "_shrinkwrap": null, - "_spec": "uid-number@~0.0.6", - "_where": "/Users/eshanker/Code/fsevents/node_modules/tar-pack", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/uid-number/issues" - }, - "dependencies": {}, - "description": "Convert a username/group name to a uid/gid number", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "0ea10e8035e8eb5b8e4449f06da1c730663baa81", - "tarball": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" - }, - "engines": { - "node": "*" - }, - "gitHead": "aab48f5d6bda85794946b26d945d2ee452e0e9ab", - "homepage": "https://github.com/isaacs/uid-number", - "license": "ISC", - "main": "uid-number.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - } - ], - "name": "uid-number", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/uid-number.git" - }, - "scripts": {}, - "version": "0.0.6" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js deleted file mode 100644 index bd62184fda7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/uid-number/uid-number.js +++ /dev/null @@ -1,59 +0,0 @@ -module.exports = uidNumber - -// This module calls into get-uid-gid.js, which sets the -// uid and gid to the supplied argument, in order to find out their -// numeric value. This can't be done in the main node process, -// because otherwise node would be running as that user from this -// point on. - -var child_process = require("child_process") - , path = require("path") - , uidSupport = process.getuid && process.setuid - , uidCache = {} - , gidCache = {} - -function uidNumber (uid, gid, cb) { - if (!uidSupport) return cb() - if (typeof cb !== "function") cb = gid, gid = null - if (typeof cb !== "function") cb = uid, uid = null - if (gid == null) gid = process.getgid() - if (uid == null) uid = process.getuid() - if (!isNaN(gid)) gid = gidCache[gid] = +gid - if (!isNaN(uid)) uid = uidCache[uid] = +uid - - if (uidCache.hasOwnProperty(uid)) uid = uidCache[uid] - if (gidCache.hasOwnProperty(gid)) gid = gidCache[gid] - - if (typeof gid === "number" && typeof uid === "number") { - return process.nextTick(cb.bind(null, null, uid, gid)) - } - - var getter = require.resolve("./get-uid-gid.js") - - child_process.execFile( process.execPath - , [getter, uid, gid] - , function (code, out, stderr) { - if (code) { - var er = new Error("could not get uid/gid\n" + stderr) - er.code = code - return cb(er) - } - - try { - out = JSON.parse(out+"") - } catch (ex) { - return cb(ex) - } - - if (out.error) { - var er = new Error(out.error) - er.errno = out.errno - return cb(er) - } - - if (isNaN(out.uid) || isNaN(out.gid)) return cb(new Error( - "Could not get uid/gid: "+JSON.stringify(out))) - - cb(null, uidCache[uid] = +out.uid, gidCache[gid] = +out.gid) - }) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675372e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c225c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7c25..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f065e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5ddd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json deleted file mode 100644 index 0d1e3f94aa7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - "util-deprecate@~1.0.1", - "/Users/eshanker/Code/fsevents/node_modules/readable-stream" - ] - ], - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_id": "util-deprecate@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/util-deprecate", - "_nodeVersion": "4.1.2", - "_npmUser": { - "email": "nathan@tootallnate.net", - "name": "tootallnate" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "name": "util-deprecate", - "raw": "util-deprecate@~1.0.1", - "rawSpec": "~1.0.1", - "scope": null, - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/bl/readable-stream", - "/fsevents/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_shrinkwrap": null, - "_spec": "util-deprecate@~1.0.1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/readable-stream", - "author": { - "email": "nathan@tootallnate.net", - "name": "Nathan Rajlich", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "dependencies": {}, - "description": "The Node.js `util.deprecate()` function with browser support", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "browser", - "browserify", - "deprecate", - "node", - "util" - ], - "license": "MIT", - "main": "node.js", - "maintainers": [ - { - "email": "nathan@tootallnate.net", - "name": "tootallnate" - } - ], - "name": "util-deprecate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.gitmodules b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.gitmodules deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore deleted file mode 100644 index 3c3629e647f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE deleted file mode 100644 index cbc0bb3ba3b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012, Joyent, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile deleted file mode 100644 index 00faa97de52..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2012, Joyent, Inc. All rights reserved. -# -# Makefile: top-level Makefile -# -# This Makefile contains only repo-specific logic and uses included makefiles -# to supply common targets (javascriptlint, jsstyle, restdown, etc.), which are -# used by other repos as well. -# - -# -# Tools -# -NPM = npm - -# -# Files -# -JS_FILES := $(shell find lib examples tests -name '*.js') -JSL_FILES_NODE = $(JS_FILES) -JSSTYLE_FILES = $(JS_FILES) -JSL_CONF_NODE = jsl.node.conf - -.PHONY: all -all: - $(NPM) install - -.PHONY: test -test: - node tests/tst.inherit.js - node tests/tst.verror.js - node tests/tst.werror.js - @echo all tests passed - -include ./Makefile.targ diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ deleted file mode 100644 index 2a64fe7e950..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/Makefile.targ +++ /dev/null @@ -1,285 +0,0 @@ -# -*- mode: makefile -*- -# -# Copyright (c) 2012, Joyent, Inc. All rights reserved. -# -# Makefile.targ: common targets. -# -# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped -# into other repos as-is without requiring any modifications. If you find -# yourself changing this file, you should instead update the original copy in -# eng.git and then update your repo to use the new version. -# -# This Makefile defines several useful targets and rules. You can use it by -# including it from a Makefile that specifies some of the variables below. -# -# Targets defined in this Makefile: -# -# check Checks JavaScript files for lint and style -# Checks bash scripts for syntax -# Checks SMF manifests for validity against the SMF DTD -# -# clean Removes built files -# -# docs Builds restdown documentation in docs/ -# -# prepush Depends on "check" and "test" -# -# test Does nothing (you should override this) -# -# xref Generates cscope (source cross-reference index) -# -# For details on what these targets are supposed to do, see the Joyent -# Engineering Guide. -# -# To make use of these targets, you'll need to set some of these variables. Any -# variables left unset will simply not be used. -# -# BASH_FILES Bash scripts to check for syntax -# (paths relative to top-level Makefile) -# -# CLEAN_FILES Files to remove as part of the "clean" target. Note -# that files generated by targets in this Makefile are -# automatically included in CLEAN_FILES. These include -# restdown-generated HTML and JSON files. -# -# DOC_FILES Restdown (documentation source) files. These are -# assumed to be contained in "docs/", and must NOT -# contain the "docs/" prefix. -# -# JSL_CONF_NODE Specify JavaScriptLint configuration files -# JSL_CONF_WEB (paths relative to top-level Makefile) -# -# Node.js and Web configuration files are separate -# because you'll usually want different global variable -# configurations. If no file is specified, none is given -# to jsl, which causes it to use a default configuration, -# which probably isn't what you want. -# -# JSL_FILES_NODE JavaScript files to check with Node config file. -# JSL_FILES_WEB JavaScript files to check with Web config file. -# -# You can also override these variables: -# -# BASH Path to bash (default: bash) -# -# CSCOPE_DIRS Directories to search for source files for the cscope -# index. (default: ".") -# -# JSL Path to JavaScriptLint (default: "jsl") -# -# JSL_FLAGS_NODE Additional flags to pass through to JSL -# JSL_FLAGS_WEB -# JSL_FLAGS -# -# JSSTYLE Path to jsstyle (default: jsstyle) -# -# JSSTYLE_FLAGS Additional flags to pass through to jsstyle -# - -# -# Defaults for the various tools we use. -# -BASH ?= bash -BASHSTYLE ?= tools/bashstyle -CP ?= cp -CSCOPE ?= cscope -CSCOPE_DIRS ?= . -JSL ?= jsl -JSSTYLE ?= jsstyle -MKDIR ?= mkdir -p -MV ?= mv -RESTDOWN_FLAGS ?= -RMTREE ?= rm -rf -JSL_FLAGS ?= --nologo --nosummary - -ifeq ($(shell uname -s),SunOS) - TAR ?= gtar -else - TAR ?= tar -endif - - -# -# Defaults for other fixed values. -# -BUILD = build -DISTCLEAN_FILES += $(BUILD) -DOC_BUILD = $(BUILD)/docs/public - -# -# Configure JSL_FLAGS_{NODE,WEB} based on JSL_CONF_{NODE,WEB}. -# -ifneq ($(origin JSL_CONF_NODE), undefined) - JSL_FLAGS_NODE += --conf=$(JSL_CONF_NODE) -endif - -ifneq ($(origin JSL_CONF_WEB), undefined) - JSL_FLAGS_WEB += --conf=$(JSL_CONF_WEB) -endif - -# -# Targets. For descriptions on what these are supposed to do, see the -# Joyent Engineering Guide. -# - -# -# Instruct make to keep around temporary files. We have rules below that -# automatically update git submodules as needed, but they employ a deps/*/.git -# temporary file. Without this directive, make tries to remove these .git -# directories after the build has completed. -# -.SECONDARY: $($(wildcard deps/*):%=%/.git) - -# -# This rule enables other rules that use files from a git submodule to have -# those files depend on deps/module/.git and have "make" automatically check -# out the submodule as needed. -# -deps/%/.git: - git submodule update --init deps/$* - -# -# These recipes make heavy use of dynamically-created phony targets. The parent -# Makefile defines a list of input files like BASH_FILES. We then say that each -# of these files depends on a fake target called filename.bashchk, and then we -# define a pattern rule for those targets that runs bash in check-syntax-only -# mode. This mechanism has the nice properties that if you specify zero files, -# the rule becomes a noop (unlike a single rule to check all bash files, which -# would invoke bash with zero files), and you can check individual files from -# the command line with "make filename.bashchk". -# -.PHONY: check-bash -check-bash: $(BASH_FILES:%=%.bashchk) $(BASH_FILES:%=%.bashstyle) - -%.bashchk: % - $(BASH) -n $^ - -%.bashstyle: % - $(BASHSTYLE) $^ - -.PHONY: check-jsl check-jsl-node check-jsl-web -check-jsl: check-jsl-node check-jsl-web - -check-jsl-node: $(JSL_FILES_NODE:%=%.jslnodechk) - -check-jsl-web: $(JSL_FILES_WEB:%=%.jslwebchk) - -%.jslnodechk: % $(JSL_EXEC) - $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_NODE) $< - -%.jslwebchk: % $(JSL_EXEC) - $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_WEB) $< - -.PHONY: check-jsstyle -check-jsstyle: $(JSSTYLE_FILES:%=%.jsstylechk) - -%.jsstylechk: % $(JSSTYLE_EXEC) - $(JSSTYLE) $(JSSTYLE_FLAGS) $< - -.PHONY: check -check: check-jsl check-jsstyle check-bash - @echo check ok - -.PHONY: clean -clean:: - -$(RMTREE) $(CLEAN_FILES) - -.PHONY: distclean -distclean:: clean - -$(RMTREE) $(DISTCLEAN_FILES) - -CSCOPE_FILES = cscope.in.out cscope.out cscope.po.out -CLEAN_FILES += $(CSCOPE_FILES) - -.PHONY: xref -xref: cscope.files - $(CSCOPE) -bqR - -.PHONY: cscope.files -cscope.files: - find $(CSCOPE_DIRS) -name '*.c' -o -name '*.h' -o -name '*.cc' \ - -o -name '*.js' -o -name '*.s' -o -name '*.cpp' > $@ - -# -# The "docs" target is complicated because we do several things here: -# -# (1) Use restdown to build HTML and JSON files from each of DOC_FILES. -# -# (2) Copy these files into $(DOC_BUILD) (build/docs/public), which -# functions as a complete copy of the documentation that could be -# mirrored or served over HTTP. -# -# (3) Then copy any directories and media from docs/media into -# $(DOC_BUILD)/media. This allows projects to include their own media, -# including files that will override same-named files provided by -# restdown. -# -# Step (3) is the surprisingly complex part: in order to do this, we need to -# identify the subdirectories in docs/media, recreate them in -# $(DOC_BUILD)/media, then do the same with the files. -# -DOC_MEDIA_DIRS := $(shell find docs/media -type d 2>/dev/null | grep -v "^docs/media$$") -DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/media/%=%) -DOC_MEDIA_DIRS_BUILD := $(DOC_MEDIA_DIRS:%=$(DOC_BUILD)/media/%) - -DOC_MEDIA_FILES := $(shell find docs/media -type f 2>/dev/null) -DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/media/%=%) -DOC_MEDIA_FILES_BUILD := $(DOC_MEDIA_FILES:%=$(DOC_BUILD)/media/%) - -# -# Like the other targets, "docs" just depends on the final files we want to -# create in $(DOC_BUILD), leveraging other targets and recipes to define how -# to get there. -# -.PHONY: docs -docs: \ - $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.html) \ - $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.json) \ - $(DOC_MEDIA_FILES_BUILD) - -# -# We keep the intermediate files so that the next build can see whether the -# files in DOC_BUILD are up to date. -# -.PRECIOUS: \ - $(DOC_FILES:%.restdown=docs/%.html) \ - $(DOC_FILES:%.restdown=docs/%json) - -# -# We do clean those intermediate files, as well as all of DOC_BUILD. -# -CLEAN_FILES += \ - $(DOC_BUILD) \ - $(DOC_FILES:%.restdown=docs/%.html) \ - $(DOC_FILES:%.restdown=docs/%.json) - -# -# Before installing the files, we must make sure the directories exist. The | -# syntax tells make that the dependency need only exist, not be up to date. -# Otherwise, it might try to rebuild spuriously because the directory itself -# appears out of date. -# -$(DOC_MEDIA_FILES_BUILD): | $(DOC_MEDIA_DIRS_BUILD) - -$(DOC_BUILD)/%: docs/% | $(DOC_BUILD) - $(CP) $< $@ - -docs/%.json docs/%.html: docs/%.restdown | $(DOC_BUILD) $(RESTDOWN_EXEC) - $(RESTDOWN) $(RESTDOWN_FLAGS) -m $(DOC_BUILD) $< - -$(DOC_BUILD): - $(MKDIR) $@ - -$(DOC_MEDIA_DIRS_BUILD): - $(MKDIR) $@ - -# -# The default "test" target does nothing. This should usually be overridden by -# the parent Makefile. It's included here so we can define "prepush" without -# requiring the repo to define "test". -# -.PHONY: test -test: - -.PHONY: prepush -prepush: check test diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md deleted file mode 100644 index e9b5497851c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# verror: richer JavaScript errors - -This module provides two classes: VError, for accretive errors, and WError, for -wrapping errors. Both support printf-style error messages using extsprintf. - -## Printf-style errors - -At the most basic level, VError is just like JavaScript's Error class, but with -printf-style arguments: - - var verror = require('verror'); - - var opname = 'read'; - var err = new verror.VError('"%s" operation failed', opname); - console.log(err.message); - console.log(err.stack); - -This prints: - - "read" operation failed - "read" operation failed - at Object. (/Users/dap/node-verror/examples/varargs.js:4:11) - at Module._compile (module.js:449:26) - at Object.Module._extensions..js (module.js:467:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Module.runMain (module.js:492:10) - at process.startup.processNextTick.process._tickCallback (node.js:244:9) - - -## VError for accretive error messages - -More interestingly, you can use VError to build up an error describing what -happened at various levels in the stack. For example, suppose you have a -request handler that stats a file and fails if it doesn't exist: - - var fs = require('fs'); - var verror = require('verror'); - - function checkFile(filename, callback) { - fs.stat(filename, function (err) { - if (err) - /* Annotate the "stat" error with what we were doing. */ - return (callback(new verror.VError(err, - 'failed to check "%s"', filename))); - - /* ... */ - }); - } - - function handleRequest(filename, callback) { - checkFile('/nonexistent', function (err) { - if (err) { - /* Annotate the "checkFile" error with what we were doing. */ - return (callback(new verror.VError(err, 'request failed'))); - } - - /* ... */ - }); - } - - handleRequest('/nonexistent', function (err) { - if (err) - console.log(err.message); - /* ... */ - }); - -Since the file "/nonexistent" doesn't exist, this prints out: - - request failed: failed to check "/nonexistent": ENOENT, stat '/nonexistent' - -The idea here is that the lowest level (Node's "fs.stat" function) generates an -arbitrary error, and each higher level (request handler and stat callback) -creates a new VError that annotates the previous error with what it was doing, -so that the result is a clear message explaining what failed at each level. - -This plays nicely with extsprintf's "%r" specifier, which prints out a -Java-style stacktrace with the whole chain of exceptions: - - EXCEPTION: VError: request failed: failed to check "/nonexistent": ENOENT, stat '/nonexistent' - at /Users/dap/work/node-verror/examples/levels.js:21:21 - at /Users/dap/work/node-verror/examples/levels.js:9:12 - at Object.oncomplete (fs.js:297:15) - Caused by: EXCEPTION: VError: failed to check "/nonexistent": ENOENT, stat '/nonexistent' - at /Users/dap/work/node-verror/examples/levels.js:9:21 - at Object.oncomplete (fs.js:297:15) - Caused by: EXCEPTION: Error: Error: ENOENT, stat '/nonexistent' - - -## WError for wrapped errors - -Sometimes you don't want an Error's "message" field to include the details of -all of the low-level errors, but you still want to be able to get at them -programmatically. For example, in an HTTP server, you probably don't want to -spew all of the low-level errors back to the client, but you do want to include -them in the audit log entry for the request. In that case, you can use a -WError, which is created exactly like VError (and also supports both -printf-style arguments and an optional cause), but the resulting "message" only -contains the top-level error. It's also more verbose, including the class -associated with each error in the cause chain. Using the same example above, -but replacing the VError in handleRequest with WError, we get this output: - - request failed - -That's what we wanted -- just a high-level summary for the client. But we can -get the object's toString() for the full details: - - WError: request failed; caused by WError: failed to check "/nonexistent"; - caused by Error: ENOENT, stat '/nonexistent' - -# Contributing - -Contributions welcome. Code should be "make check" clean. To run "make check", -you'll need these tools: - -* https://github.com/davepacheco/jsstyle -* https://github.com/davepacheco/javascriptlint - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js deleted file mode 100644 index 53a7022c6cd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-verror.js +++ /dev/null @@ -1,36 +0,0 @@ -var extsprintf = require('extsprintf'); -var fs = require('fs'); -var verror = require('../lib/verror'); - -function checkFile(filename, callback) { - fs.stat(filename, function (err) { - if (err) - /* Annotate the "stat" error with what we were doing. */ - return (callback(new verror.VError(err, - 'failed to check "%s"', filename))); - - /* ... */ - return (callback()); - }); -} - -function handleRequest(filename, callback) { - checkFile('/nonexistent', function (err) { - if (err) - /* Annotate the "checkFile" error. */ - return (callback(new verror.VError( - err, 'request failed'))); - - /* ... */ - return (callback()); - }); -} - -handleRequest('/nonexistent', function (err) { - if (err) { - console.log(err.message); - console.log(extsprintf.sprintf('%r', err)); - } - - /* ... */ -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js deleted file mode 100644 index 7e570756ebc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/levels-werror.js +++ /dev/null @@ -1,34 +0,0 @@ -var extsprintf = require('extsprintf'); -var fs = require('fs'); -var verror = require('../lib/verror'); - -function checkFile(filename, callback) { - fs.stat(filename, function (err) { - if (err) - /* Annotate the "stat" error with what we were doing. */ - return (callback(new verror.VError(err, - 'failed to check "%s"', filename))); - - /* ... */ - return (callback()); - }); -} - -function handleRequest(filename, callback) { - checkFile('/nonexistent', function (err) { - if (err) - /* Wrap the "checkFile" error. */ - return (callback(new verror.WError( - err, 'request failed'))); - - /* ... */ - return (callback()); - }); -} - -handleRequest('/nonexistent', function (err) { - if (err) { - console.log(err.message); - console.log(err.toString()); - } -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js deleted file mode 100644 index 2e14ee48c5a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/varargs.js +++ /dev/null @@ -1,6 +0,0 @@ -var verror = require('../lib/verror'); - -var opname = 'read'; -var err = new verror.VError('"%s" operation failed', opname); -console.log(err.message); -console.log(err.stack); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js deleted file mode 100644 index 887b181b056..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/verror.js +++ /dev/null @@ -1,13 +0,0 @@ -var mod_fs = require('fs'); -var mod_verror = require('../lib/verror'); - -var filename = '/nonexistent'; - -mod_fs.stat(filename, function (err1) { - var err2 = new mod_verror.VError(err1, 'failed to stat "%s"', filename); - - /* The following would normally be higher up the stack. */ - var err3 = new mod_verror.VError(err2, 'failed to handle request'); - console.log(err3.message); - console.log(err3.stack); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js deleted file mode 100644 index f55e5322ead..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/examples/werror.js +++ /dev/null @@ -1,14 +0,0 @@ -var mod_fs = require('fs'); -var mod_verror = require('../lib/verror'); - -var filename = '/nonexistent'; - -mod_fs.stat(filename, function (err1) { - var err2 = new mod_verror.WError(err1, 'failed to stat "%s"', filename); - - /* The following would normally be higher up the stack. */ - var err3 = new mod_verror.WError(err2, 'failed to handle request'); - console.log(err3.message); - console.log(err3.toString()); - console.log(err3.stack); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf deleted file mode 100644 index bd724a2c784..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/jsl.node.conf +++ /dev/null @@ -1,139 +0,0 @@ -# -# Configuration File for JavaScript Lint -# -# This configuration file can be used to lint a collection of scripts, or to enable -# or disable warnings for scripts that are linted via the command line. -# - -### Warnings -# Enable or disable warnings based on requirements. -# Use "+WarningName" to display or "-WarningName" to suppress. -# -+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent -+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity -+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement -+anon_no_return_value # anonymous function does not always return value -+assign_to_function_call # assignment to a function call --block_without_braces # block statement without curly braces -+comma_separated_stmts # multiple statements separated by commas (use semicolons?) -+comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) -+default_not_at_end # the default case is not at the end of the switch statement -+dup_option_explicit # duplicate "option explicit" control comment -+duplicate_case_in_switch # duplicate case in switch statement -+duplicate_formal # duplicate formal argument {name} -+empty_statement # empty statement or extra semicolon -+identifier_hides_another # identifer {name} hides an identifier in a parent scope --inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement -+incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version. -+invalid_fallthru # unexpected "fallthru" control comment -+invalid_pass # unexpected "pass" control comment -+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax -+leading_decimal_point # leading decimal point may indicate a number or an object member -+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax -+meaningless_block # meaningless block; curly braces have no impact -+mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence -+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma -+missing_break # missing break statement -+missing_break_for_last_case # missing break statement for last case in switch -+missing_default_case # missing default case in switch statement -+missing_option_explicit # the "option explicit" control comment is missing -+missing_semicolon # missing semicolon -+missing_semicolon_for_lambda # missing semicolon for lambda assignment -+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs -+nested_comment # nested comment -+no_return_value # function {name} does not always return a value -+octal_number # leading zeros make an octal number -+parseint_missing_radix # parseInt missing radix parameter -+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag -+redeclared_var # redeclaration of {name} -+trailing_comma_in_array # extra comma is not recommended in array initializers -+trailing_decimal_point # trailing decimal point may indicate a number or an object member -+undeclared_identifier # undeclared identifier: {name} -+unreachable_code # unreachable code --unreferenced_argument # argument declared but never referenced: {name} --unreferenced_function # function is declared but never referenced: {name} -+unreferenced_variable # variable is declared but never referenced: {name} -+unsupported_version # JavaScript {version} is not supported -+use_of_label # use of label -+useless_assign # useless assignment -+useless_comparison # useless comparison; comparing identical expressions --useless_quotes # the quotation marks are unnecessary -+useless_void # use of the void type may be unnecessary (void is always undefined) -+var_hides_arg # variable {name} hides argument -+want_assign_or_call # expected an assignment or function call -+with_statement # with statement hides undeclared variables; use temporary variable instead - - -### Output format -# Customize the format of the error message. -# __FILE__ indicates current file path -# __FILENAME__ indicates current file name -# __LINE__ indicates current line -# __COL__ indicates current column -# __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__) -# __ERROR_NAME__ indicates error name (used in configuration file) -# __ERROR_PREFIX__ indicates error prefix -# __ERROR_MSG__ indicates error message -# -# For machine-friendly output, the output format can be prefixed with -# "encode:". If specified, all items will be encoded with C-slashes. -# -# Visual Studio syntax (default): -+output-format __FILE__(__LINE__): __ERROR__ -# Alternative syntax: -#+output-format __FILE__:__LINE__: __ERROR__ - - -### Context -# Show the in-line position of the error. -# Use "+context" to display or "-context" to suppress. -# -+context - - -### Control Comments -# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for -# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is -# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason, -# although legacy control comments are enabled by default for backward compatibility. -# --legacy_control_comments - - -### Defining identifiers -# By default, "option explicit" is enabled on a per-file basis. -# To enable this for all files, use "+always_use_option_explicit" --always_use_option_explicit - -# Define certain identifiers of which the lint is not aware. -# (Use this in conjunction with the "undeclared identifier" warning.) -# -# Common uses for webpages might be: -+define __dirname -+define clearInterval -+define clearTimeout -+define console -+define exports -+define global -+define process -+define require -+define setInterval -+define setTimeout -+define Buffer -+define JSON -+define Math -+define __dirname -+define __filename - -### JavaScript Version -# To change the default JavaScript version: -#+default-type text/javascript;version=1.5 -#+default-type text/javascript;e4x=1 - -### Files -# Specify which files to lint -# Use "+recurse" to enable recursion (disabled by default). -# To add a set of files, use "+process FileName", "+process Folder\Path\*.js", -# or "+process Folder\Path\*.htm". -# - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js deleted file mode 100644 index 9ca087b170d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/lib/verror.js +++ /dev/null @@ -1,157 +0,0 @@ -/* - * verror.js: richer JavaScript errors - */ - -var mod_assert = require('assert'); -var mod_util = require('util'); - -var mod_extsprintf = require('extsprintf'); - -/* - * Public interface - */ -exports.VError = VError; -exports.WError = WError; -exports.MultiError = MultiError; - -/* - * Like JavaScript's built-in Error class, but supports a "cause" argument and a - * printf-style message. The cause argument can be null. - */ -function VError(options) -{ - var args, causedBy, ctor, tailmsg; - - if (options instanceof Error || typeof (options) === 'object') { - args = Array.prototype.slice.call(arguments, 1); - } else { - args = Array.prototype.slice.call(arguments, 0); - options = undefined; - } - - tailmsg = args.length > 0 ? - mod_extsprintf.sprintf.apply(null, args) : ''; - this.jse_shortmsg = tailmsg; - this.jse_summary = tailmsg; - - if (options) { - causedBy = options.cause; - - if (!causedBy || !(options.cause instanceof Error)) - causedBy = options; - - if (causedBy && (causedBy instanceof Error)) { - this.jse_cause = causedBy; - this.jse_summary += ': ' + causedBy.message; - } - } - - this.message = this.jse_summary; - Error.call(this, this.jse_summary); - - if (Error.captureStackTrace) { - ctor = options ? options.constructorOpt : undefined; - ctor = ctor || arguments.callee; - Error.captureStackTrace(this, ctor); - } -} - -mod_util.inherits(VError, Error); -VError.prototype.name = 'VError'; - -VError.prototype.toString = function ve_toString() -{ - var str = (this.hasOwnProperty('name') && this.name || - this.constructor.name || this.constructor.prototype.name); - if (this.message) - str += ': ' + this.message; - - return (str); -}; - -VError.prototype.cause = function ve_cause() -{ - return (this.jse_cause); -}; - - -/* - * Represents a collection of errors for the purpose of consumers that generally - * only deal with one error. Callers can extract the individual errors - * contained in this object, but may also just treat it as a normal single - * error, in which case a summary message will be printed. - */ -function MultiError(errors) -{ - mod_assert.ok(errors.length > 0); - this.ase_errors = errors; - - VError.call(this, errors[0], 'first of %d error%s', - errors.length, errors.length == 1 ? '' : 's'); -} - -mod_util.inherits(MultiError, VError); - - - -/* - * Like JavaScript's built-in Error class, but supports a "cause" argument which - * is wrapped, not "folded in" as with VError. Accepts a printf-style message. - * The cause argument can be null. - */ -function WError(options) -{ - Error.call(this); - - var args, cause, ctor; - if (typeof (options) === 'object') { - args = Array.prototype.slice.call(arguments, 1); - } else { - args = Array.prototype.slice.call(arguments, 0); - options = undefined; - } - - if (args.length > 0) { - this.message = mod_extsprintf.sprintf.apply(null, args); - } else { - this.message = ''; - } - - if (options) { - if (options instanceof Error) { - cause = options; - } else { - cause = options.cause; - ctor = options.constructorOpt; - } - } - - Error.captureStackTrace(this, ctor || this.constructor); - if (cause) - this.cause(cause); - -} - -mod_util.inherits(WError, Error); -WError.prototype.name = 'WError'; - - -WError.prototype.toString = function we_toString() -{ - var str = (this.hasOwnProperty('name') && this.name || - this.constructor.name || this.constructor.prototype.name); - if (this.message) - str += ': ' + this.message; - if (this.we_cause && this.we_cause.message) - str += '; caused by ' + this.we_cause.toString(); - - return (str); -}; - -WError.prototype.cause = function we_cause(c) -{ - if (c instanceof Error) - this.we_cause = c; - - return (this.we_cause); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json deleted file mode 100644 index e4aa71c198a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "verror@1.3.6", - "/Users/eshanker/Code/fsevents/node_modules/jsprim" - ] - ], - "_from": "verror@1.3.6", - "_id": "verror@1.3.6", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/verror", - "_npmUser": { - "email": "dap@cs.brown.edu", - "name": "dap" - }, - "_npmVersion": "1.1.65", - "_phantomChildren": {}, - "_requested": { - "name": "verror", - "raw": "verror@1.3.6", - "rawSpec": "1.3.6", - "scope": null, - "spec": "1.3.6", - "type": "version" - }, - "_requiredBy": [ - "/fsevents/jsprim" - ], - "_resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "_shasum": "cff5df12946d297d2baaefaa2689e25be01c005c", - "_shrinkwrap": null, - "_spec": "verror@1.3.6", - "_where": "/Users/eshanker/Code/fsevents/node_modules/jsprim", - "bugs": { - "url": "https://github.com/davepacheco/node-verror/issues" - }, - "dependencies": { - "extsprintf": "1.0.2" - }, - "description": "richer JavaScript errors", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "cff5df12946d297d2baaefaa2689e25be01c005c", - "tarball": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz" - }, - "engines": [ - "node >=0.6.0" - ], - "homepage": "https://github.com/davepacheco/node-verror#readme", - "main": "./lib/verror.js", - "maintainers": [ - { - "email": "dap@cs.brown.edu", - "name": "dap" - } - ], - "name": "verror", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/davepacheco/node-verror.git" - }, - "scripts": { - "test": "make test" - }, - "version": "1.3.6" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js deleted file mode 100644 index 0f0d70b5f63..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.inherit.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - * tst.inherit.js: test that inheriting from VError and WError work as expected. - */ - -var mod_assert = require('assert'); -var mod_util = require('util'); - -var mod_verror = require('../lib/verror'); - -var VError = mod_verror.VError; -var WError = mod_verror.WError; -var err, suberr; - -function VErrorChild() -{ - VError.apply(this, Array.prototype.slice.call(arguments)); -} - -mod_util.inherits(VErrorChild, VError); -VErrorChild.prototype.name = 'VErrorChild'; - - -function WErrorChild() -{ - WError.apply(this, Array.prototype.slice.call(arguments)); -} - -mod_util.inherits(WErrorChild, WError); -WErrorChild.prototype.name = 'WErrorChild'; - - -suberr = new Error('root cause'); -err = new VErrorChild(suberr, 'top'); -mod_assert.ok(err instanceof Error); -mod_assert.ok(err instanceof VError); -mod_assert.ok(err instanceof VErrorChild); -mod_assert.equal(err.cause(), suberr); -mod_assert.equal(err.message, 'top: root cause'); -mod_assert.equal(err.toString(), 'VErrorChild: top: root cause'); -mod_assert.equal(err.stack.split('\n')[0], 'VErrorChild: top: root cause'); - -suberr = new Error('root cause'); -err = new WErrorChild(suberr, 'top'); -mod_assert.ok(err instanceof Error); -mod_assert.ok(err instanceof WError); -mod_assert.ok(err instanceof WErrorChild); -mod_assert.equal(err.cause(), suberr); -mod_assert.equal(err.message, 'top'); -mod_assert.equal(err.toString(), - 'WErrorChild: top; caused by Error: root cause'); -mod_assert.equal(err.stack.split('\n')[0], - 'WErrorChild: top; caused by Error: root cause'); - - -// Test that `.toString()` uses the ctor name. I.e. setting -// `.prototype.name` isn't necessary. -function VErrorChildNoName() { - VError.apply(this, Array.prototype.slice.call(arguments)); -} -mod_util.inherits(VErrorChildNoName, VError); -err = new VErrorChildNoName('top'); -mod_assert.equal(err.toString(), 'VErrorChildNoName: top'); - -function WErrorChildNoName() { - WError.apply(this, Array.prototype.slice.call(arguments)); -} -mod_util.inherits(WErrorChildNoName, WError); -err = new WErrorChildNoName('top'); -mod_assert.equal(err.toString(), 'WErrorChildNoName: top'); - - -// Test that `.prototype.name` can be used for the `.toString()` -// when the ctor is anonymous. -var VErrorChildAnon = function () { - VError.apply(this, Array.prototype.slice.call(arguments)); -}; -mod_util.inherits(VErrorChildAnon, VError); -VErrorChildAnon.prototype.name = 'VErrorChildAnon'; -err = new VErrorChildAnon('top'); -mod_assert.equal(err.toString(), 'VErrorChildAnon: top'); - -var WErrorChildAnon = function () { - WError.apply(this, Array.prototype.slice.call(arguments)); -}; -mod_util.inherits(WErrorChildAnon, WError); -WErrorChildAnon.prototype.name = 'WErrorChildAnon'; -err = new WErrorChildAnon('top'); -mod_assert.equal(err.toString(), 'WErrorChildAnon: top'); - - -// Test get appropriate exception name in `.toString()` when reconstituting -// an error instance a la: -// https://github.com/mcavage/node-fast/blob/master/lib/client.js#L215 -err = new VError('top'); -err.name = 'CustomNameError'; -mod_assert.equal(err.toString(), 'CustomNameError: top'); - -err = new WError('top'); -err.name = 'CustomNameError'; -mod_assert.equal(err.toString(), 'CustomNameError: top'); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js deleted file mode 100644 index ee937cd00db..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.verror.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - * tst.verror.js: tests basic functionality of the VError class. - */ - -var mod_assert = require('assert'); -var mod_verror = require('../lib/verror'); - -var VError = mod_verror.VError; -var WError = mod_verror.WError; - -var err, suberr, stack, substack; - -/* - * Remove full paths and relative line numbers from stack traces so that we can - * compare against "known-good" output. - */ -function cleanStack(stacktxt) -{ - var re = new RegExp(__filename + ':\\d+:\\d+', 'gm'); - stacktxt = stacktxt.replace(re, 'tst.verror.js'); - return (stacktxt); -} - -/* - * Save the generic parts of all stack traces so we can avoid hardcoding - * Node-specific implementation details in our testing of stack traces. - */ -var nodestack = new Error().stack.split('\n').slice(2).join('\n'); - -/* no arguments */ -err = new VError(); -mod_assert.equal(err.name, 'VError'); -mod_assert.ok(err instanceof Error); -mod_assert.ok(err instanceof VError); -mod_assert.equal(err.message, ''); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); - -/* options-argument form */ -err = new VError({}); -mod_assert.equal(err.message, ''); -mod_assert.ok(err.cause() === undefined); - -/* simple message */ -err = new VError('my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError: my error', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); - -err = new VError({}, 'my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.ok(err.cause() === undefined); - -/* printf-style message */ -err = new VError('%s error: %3d problems', 'very bad', 15); -mod_assert.equal(err.message, 'very bad error: 15 problems'); -mod_assert.ok(err.cause() === undefined); - -err = new VError({}, '%s error: %3d problems', 'very bad', 15); -mod_assert.equal(err.message, 'very bad error: 15 problems'); -mod_assert.ok(err.cause() === undefined); - -/* caused by another error, with no additional message */ -suberr = new Error('root cause'); -err = new VError(suberr); -mod_assert.equal(err.message, ': root cause'); -mod_assert.ok(err.cause() === suberr); - -err = new VError({ 'cause': suberr }); -mod_assert.equal(err.message, ': root cause'); -mod_assert.ok(err.cause() === suberr); - -/* caused by another error, with annotation */ -err = new VError(suberr, 'proximate cause: %d issues', 3); -mod_assert.equal(err.message, 'proximate cause: 3 issues: root cause'); -mod_assert.ok(err.cause() === suberr); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError: proximate cause: 3 issues: root cause', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); - -err = new VError({ 'cause': suberr }, 'proximate cause: %d issues', 3); -mod_assert.equal(err.message, 'proximate cause: 3 issues: root cause'); -mod_assert.ok(err.cause() === suberr); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError: proximate cause: 3 issues: root cause', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); - -/* caused by another VError, with annotation. */ -suberr = err; -err = new VError(suberr, 'top'); -mod_assert.equal(err.message, 'top: proximate cause: 3 issues: root cause'); -mod_assert.ok(err.cause() === suberr); - -err = new VError({ 'cause': suberr }, 'top'); -mod_assert.equal(err.message, 'top: proximate cause: 3 issues: root cause'); -mod_assert.ok(err.cause() === suberr); - -/* caused by a WError */ -suberr = new WError(new Error('root cause'), 'mid'); -err = new VError(suberr, 'top'); -mod_assert.equal(err.message, 'top: mid'); -mod_assert.ok(err.cause() === suberr); - -/* null cause (for backwards compatibility with older versions) */ -err = new VError(null, 'my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError: my error', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); - -err = new VError({ 'cause': null }, 'my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.ok(err.cause() === undefined); - -err = new VError(null); -mod_assert.equal(err.message, ''); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); - -/* constructorOpt */ -function makeErr(options) { - return (new VError(options, 'test error')); -} -err = makeErr({}); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError: test error', - ' at makeErr (tst.verror.js)', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); - -err = makeErr({ 'constructorOpt': makeErr }); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'VError: test error', - ' at Object. (tst.verror.js)' -].join('\n') + '\n' + nodestack); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js deleted file mode 100644 index c8cdc615afa..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/verror/tests/tst.werror.js +++ /dev/null @@ -1,179 +0,0 @@ -/* - * tst.werror.js: tests basic functionality of the WError class. - */ - -var mod_assert = require('assert'); -var mod_verror = require('../lib/verror'); - -var VError = mod_verror.VError; -var WError = mod_verror.WError; - -var err, suberr, stack, substack; - -/* - * Remove full paths and relative line numbers from stack traces so that we can - * compare against "known-good" output. - */ -function cleanStack(stacktxt) -{ - var re = new RegExp(__filename + ':\\d+:\\d+', 'gm'); - stacktxt = stacktxt.replace(re, 'tst.werror.js'); - return (stacktxt); -} - -/* - * Save the generic parts of all stack traces so we can avoid hardcoding - * Node-specific implementation details in our testing of stack traces. - */ -var nodestack = new Error().stack.split('\n').slice(2).join('\n'); - -/* no arguments */ -err = new WError(); -mod_assert.equal(err.name, 'WError'); -mod_assert.ok(err instanceof Error); -mod_assert.ok(err instanceof WError); -mod_assert.equal(err.message, ''); -mod_assert.equal(err.toString(), 'WError'); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); - -/* options-argument form */ -err = new WError({}); -mod_assert.equal(err.message, ''); -mod_assert.equal(err.toString(), 'WError'); -mod_assert.ok(err.cause() === undefined); - -/* simple message */ -err = new WError('my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.equal(err.toString(), 'WError: my error'); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError: my error', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); - -err = new WError({}, 'my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.equal(err.toString(), 'WError: my error'); -mod_assert.ok(err.cause() === undefined); - -/* printf-style message */ -err = new WError('%s error: %3d problems', 'very bad', 15); -mod_assert.equal(err.message, 'very bad error: 15 problems'); -mod_assert.equal(err.toString(), 'WError: very bad error: 15 problems'); -mod_assert.ok(err.cause() === undefined); - -err = new WError({}, '%s error: %3d problems', 'very bad', 15); -mod_assert.equal(err.message, 'very bad error: 15 problems'); -mod_assert.equal(err.toString(), 'WError: very bad error: 15 problems'); -mod_assert.ok(err.cause() === undefined); - -/* caused by another error, with no additional message */ -suberr = new Error('root cause'); -err = new WError(suberr); -mod_assert.equal(err.message, ''); -mod_assert.equal(err.toString(), 'WError; caused by Error: root cause'); -mod_assert.ok(err.cause() === suberr); - -err = new WError({ 'cause': suberr }); -mod_assert.equal(err.message, ''); -mod_assert.equal(err.toString(), 'WError; caused by Error: root cause'); -mod_assert.ok(err.cause() === suberr); - -/* caused by another error, with annotation */ -err = new WError(suberr, 'proximate cause: %d issues', 3); -mod_assert.equal(err.message, 'proximate cause: 3 issues'); -mod_assert.equal(err.toString(), 'WError: proximate cause: 3 issues; ' + - 'caused by Error: root cause'); -mod_assert.ok(err.cause() === suberr); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError: proximate cause: 3 issues; caused by Error: root cause', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); - -err = new WError({ 'cause': suberr }, 'proximate cause: %d issues', 3); -mod_assert.equal(err.message, 'proximate cause: 3 issues'); -mod_assert.equal(err.toString(), 'WError: proximate cause: 3 issues; ' + - 'caused by Error: root cause'); -mod_assert.ok(err.cause() === suberr); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError: proximate cause: 3 issues; caused by Error: root cause', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); - -/* caused by another WError, with annotation. */ -suberr = err; -err = new WError(suberr, 'top'); -mod_assert.equal(err.message, 'top'); -mod_assert.equal(err.toString(), 'WError: top; caused by WError: ' + - 'proximate cause: 3 issues; caused by Error: root cause'); -mod_assert.ok(err.cause() === suberr); - -err = new WError({ 'cause': suberr }, 'top'); -mod_assert.equal(err.message, 'top'); -mod_assert.equal(err.toString(), 'WError: top; caused by WError: ' + - 'proximate cause: 3 issues; caused by Error: root cause'); -mod_assert.ok(err.cause() === suberr); - -/* caused by a VError */ -suberr = new VError(new Error('root cause'), 'mid'); -err = new WError(suberr, 'top'); -mod_assert.equal(err.message, 'top'); -mod_assert.equal(err.toString(), - 'WError: top; caused by VError: mid: root cause'); -mod_assert.ok(err.cause() === suberr); - -/* null cause (for backwards compatibility with older versions) */ -err = new WError(null, 'my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.equal(err.toString(), 'WError: my error'); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError: my error', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); - -err = new WError({ 'cause': null }, 'my error'); -mod_assert.equal(err.message, 'my error'); -mod_assert.equal(err.toString(), 'WError: my error'); -mod_assert.ok(err.cause() === undefined); - -err = new WError(null); -mod_assert.equal(err.message, ''); -mod_assert.equal(err.toString(), 'WError'); -mod_assert.ok(err.cause() === undefined); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); - -/* constructorOpt */ -function makeErr(options) { - return (new WError(options, 'test error')); -} -err = makeErr({}); -mod_assert.equal(err.toString(), 'WError: test error'); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError: test error', - ' at makeErr (tst.werror.js)', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); - -err = makeErr({ 'constructorOpt': makeErr }); -mod_assert.equal(err.toString(), 'WError: test error'); -stack = cleanStack(err.stack); -mod_assert.equal(stack, [ - 'WError: test error', - ' at Object. (tst.werror.js)' -].join('\n') + '\n' + nodestack); diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore deleted file mode 100644 index d1a6b0054bc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -*~ -/node_modules -.#* -/.nyc_output -/coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE deleted file mode 100644 index f4be44d881b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md deleted file mode 100644 index 32f1be04f09..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/README.md +++ /dev/null @@ -1,47 +0,0 @@ -wide-align ----------- - -A wide-character aware text alignment function for use in terminals / on the -console. - -### Usage - -``` -var align = require('wide-align') - -// Note that if you view this on a unicode console, all of the slashes are -// aligned. This is because on a console, all narrow characters are -// an en wide and all wide characters are an em. In browsers, this isn't -// held to and wide characters like "古" can be less than two narrow -// characters even with a fixed width font. - -console.log(align.center('abc', 10)) // ' abc ' -console.log(align.center('古古古', 10)) // ' 古古古 ' -console.log(align.left('abc', 10)) // 'abc ' -console.log(align.left('古古古', 10)) // '古古古 ' -console.log(align.right('abc', 10)) // ' abc' -console.log(align.right('古古古', 10)) // ' 古古古' -``` - -### Functions - -#### `align.center(str, length)` → `str` - -Returns *str* with spaces added to both sides such that that it is *length* -chars long and centered in the spaces. - -#### `align.left(str, length)` → `str` - -Returns *str* with spaces to the right such that it is *length* chars long. - -### `align.right(str, length)` → `str` - -Returns *str* with spaces to the left such that it is *length* chars long. - -### Origins - -These functions were originally taken from -[cliui](https://npmjs.com/package/cliui). Changes include switching to the -MUCH faster pad generation function from -[lodash](https://npmjs.com/package/lodash), making center alignment pad -both sides and adding left alignment. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js deleted file mode 100644 index 4f94ca4cde1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/align.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict' -var stringWidth = require('string-width') - -exports.center = alignCenter -exports.left = alignLeft -exports.right = alignRight - -// lodash's way of generating pad characters. - -function createPadding (width) { - var result = '' - var string = ' ' - var n = width - do { - if (n % 2) { - result += string; - } - n = Math.floor(n / 2); - string += string; - } while (n); - - return result; -} - -function alignLeft (str, width) { - var trimmed = str.trimRight() - if (trimmed.length === 0 && str.length >= width) return str - var padding = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - padding = createPadding(width - strWidth) - } - - return trimmed + padding -} - -function alignRight (str, width) { - var trimmed = str.trimLeft() - if (trimmed.length === 0 && str.length >= width) return str - var padding = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - padding = createPadding(width - strWidth) - } - - return padding + trimmed -} - -function alignCenter (str, width) { - var trimmed = str.trim() - if (trimmed.length === 0 && str.length >= width) return str - var padLeft = '' - var padRight = '' - var strWidth = stringWidth(trimmed) - - if (strWidth < width) { - var padLeftBy = parseInt((width - strWidth) / 2, 10) - padLeft = createPadding(padLeftBy) - padRight = createPadding(width - (strWidth + padLeftBy)) - } - - return padLeft + trimmed + padRight -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json deleted file mode 100644 index ecf0663559b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "wide-align@^1.1.0", - "/Users/eshanker/Code/fsevents/node_modules/gauge" - ] - ], - "_from": "wide-align@>=1.1.0 <2.0.0", - "_id": "wide-align@1.1.0", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/wide-align", - "_nodeVersion": "4.2.2", - "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" - }, - "_npmVersion": "3.5.3", - "_phantomChildren": {}, - "_requested": { - "name": "wide-align", - "raw": "wide-align@^1.1.0", - "rawSpec": "^1.1.0", - "scope": null, - "spec": ">=1.1.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/gauge" - ], - "_resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", - "_shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", - "_shrinkwrap": null, - "_spec": "wide-align@^1.1.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/gauge", - "author": { - "email": "me@re-becca.org", - "name": "Rebecca Turner", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/iarna/wide-align/issues" - }, - "dependencies": { - "string-width": "^1.0.1" - }, - "description": "A wide-character aware text alignment function for use on the console or with fixed width fonts.", - "devDependencies": { - "tap": "^2.3.2" - }, - "directories": {}, - "dist": { - "shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", - "tarball": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz" - }, - "gitHead": "fe3f7f210650913d5bee702d7e19938f6977bc8a", - "homepage": "https://github.com/iarna/wide-align#readme", - "keywords": [ - "align", - "cjkv", - "double", - "pad", - "unicode", - "wide" - ], - "license": "ISC", - "main": "align.js", - "maintainers": [ - { - "email": "me@re-becca.org", - "name": "iarna" - } - ], - "name": "wide-align", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/wide-align.git" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "version": "1.1.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js deleted file mode 100644 index 64e9f9dbda4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wide-align/test/align.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict' -var test = require('tap').test -var align = require('..') - -test('align', function (t) { - t.is(align.center('abc', 10), ' abc ', 'center narrow') - t.is(align.center('古古古', 10), ' 古古古 ', 'center wide') - t.is(align.left('abc', 10), 'abc ', 'left narrow') - t.is(align.left('古古古', 10), '古古古 ', 'left wide') - t.is(align.right('abc', 10), ' abc', 'right narrow') - t.is(align.right('古古古', 10), ' 古古古', 'right wide') - - t.is(align.center('abc', 2), 'abc', 'center narrow overflow') - t.is(align.center('古古古', 4), '古古古', 'center wide overflow') - t.is(align.left('abc', 2), 'abc', 'left narrow overflow') - t.is(align.left('古古古', 4), '古古古', 'left wide overflow') - t.is(align.right('abc', 2), 'abc', 'right narrow overflow') - t.is(align.right('古古古', 4), '古古古', 'right wide overflow') - - t.is(align.left('', 5), ' ', 'left align nothing') - t.is(align.center('', 5), ' ', 'center align nothing') - t.is(align.right('', 5), ' ', 'right align nothing') - - t.is(align.left(' ', 5), ' ', 'left align whitespace') - t.is(align.center(' ', 5), ' ', 'center align whitespace') - t.is(align.right(' ', 5), ' ', 'right align whitespace') - - t.is(align.left(' ', 2), ' ', 'left align whitespace overflow') - t.is(align.center(' ', 2), ' ', 'center align whitespace overflow') - t.is(align.right(' ', 2), ' ', 'right align whitespace overflow') - - t.is(align.left('x ', 10), 'x ', 'left align whitespace mix') - t.is(align.center('x ', 10), ' x ', 'center align whitespace mix') - t.is(align.right('x ', 10), ' x', 'right align whitespace mix') - - t.end() -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md deleted file mode 100644 index 98eab2522b8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json deleted file mode 100644 index 28e40b50e85..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "wrappy@1", - "/Users/eshanker/Code/fsevents/node_modules/inflight" - ] - ], - "_from": "wrappy@>=1.0.0 <2.0.0", - "_id": "wrappy@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/wrappy", - "_nodeVersion": "5.10.1", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" - }, - "_npmUser": { - "email": "kat@sykosomatic.org", - "name": "zkat" - }, - "_npmVersion": "3.9.1", - "_phantomChildren": {}, - "_requested": { - "name": "wrappy", - "raw": "wrappy@1", - "rawSpec": "1", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/inflight", - "/fsevents/once" - ], - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_shrinkwrap": null, - "_spec": "wrappy@1", - "_where": "/Users/eshanker/Code/fsevents/node_modules/inflight", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "dependencies": {}, - "description": "Callback wrapping utility", - "devDependencies": { - "tap": "^2.3.1" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - }, - "files": [ - "wrappy.js" - ], - "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", - "homepage": "https://github.com/npm/wrappy", - "license": "ISC", - "main": "wrappy.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - }, - { - "email": "kat@sykosomatic.org", - "name": "zkat" - } - ], - "name": "wrappy", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "version": "1.0.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6fcf7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc deleted file mode 100644 index 77887b5f0f2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "maxdepth": 4, - "maxstatements": 200, - "maxcomplexity": 12, - "maxlen": 80, - "maxparams": 5, - - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": false, - "noarg": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "trailing": true, - - "quotmark": true, - "expr": true, - "asi": true, - - "browser": false, - "esnext": true, - "devel": false, - "node": false, - "nonstandard": false, - - "predef": ["require", "module", "__dirname", "__filename"] -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e647f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b437e87..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf49dc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md deleted file mode 100644 index 093cb2978e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# xtend - -[![browser support][3]][4] - -[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a", - b: 'c' -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - -## Stability status: Locked - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js deleted file mode 100644 index 94889c9de11..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/immutable.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js deleted file mode 100644 index 72debede6ca..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/mutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json deleted file mode 100644 index 5498e6b6d22..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - "xtend@^4.0.0", - "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid" - ] - ], - "_from": "xtend@>=4.0.0 <5.0.0", - "_id": "xtend@4.0.1", - "_inCache": true, - "_installable": true, - "_location": "/fsevents/xtend", - "_nodeVersion": "0.10.32", - "_npmUser": { - "email": "raynos2@gmail.com", - "name": "raynos" - }, - "_npmVersion": "2.14.1", - "_phantomChildren": {}, - "_requested": { - "name": "xtend", - "raw": "xtend@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents/is-my-json-valid" - ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "_shrinkwrap": null, - "_spec": "xtend@^4.0.0", - "_where": "/Users/eshanker/Code/fsevents/node_modules/is-my-json-valid", - "author": { - "email": "raynos2@gmail.com", - "name": "Raynos" - }, - "bugs": { - "email": "raynos2@gmail.com", - "url": "https://github.com/Raynos/xtend/issues" - }, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "dependencies": {}, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "directories": {}, - "dist": { - "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "engines": { - "node": ">=0.4" - }, - "gitHead": "23dc302a89756da89c1897bc732a752317e35390", - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "array", - "extend", - "merge", - "object", - "options", - "opts" - ], - "license": "MIT", - "main": "immutable", - "maintainers": [ - { - "email": "raynos2@gmail.com", - "name": "raynos" - } - ], - "name": "xtend", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, - "testling": { - "browsers": [ - "chrome/22..latest", - "chrome/canary", - "firefox/16..latest", - "firefox/nightly", - "ie/7..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "opera/12..latest", - "opera/next", - "safari/5.1..latest" - ], - "files": "test.js" - }, - "version": "4.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js b/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js deleted file mode 100644 index 093a2b061e8..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/node_modules/xtend/test.js +++ /dev/null @@ -1,83 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("null prototype", function(assert) { - var a = { a: "foo" } - var b = Object.create(null) - b.b = "bar"; - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("null prototype mutable", function (assert) { - var a = { foo: "bar" } - var b = Object.create(null) - b.bar = "baz"; - - mutableExtend(a, b) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/package.json b/src/filesystem/impls/appshell/node/node_modules/fsevents/package.json deleted file mode 100644 index bb7a0278e5d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_args": [ - [ - "fsevents@^1.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "fsevents@>=1.0.0 <2.0.0", - "_id": "fsevents@1.0.14", - "_inCache": true, - "_installable": true, - "_location": "/fsevents", - "_nodeVersion": "5.6.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/fsevents-1.0.14.tgz_1468846610948_0.4684492303058505" - }, - "_npmUser": { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "fsevents", - "raw": "fsevents@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar" - ], - "_resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.14.tgz", - "_shasum": "558e8cc38643d8ef40fe45158486d0d25758eee4", - "_shrinkwrap": null, - "_spec": "fsevents@^1.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "author": { - "email": "pip@pipobscure.com", - "name": "Philipp Dunkel" - }, - "binary": { - "host": "https://fsevents-binaries.s3-us-west-2.amazonaws.com", - "module_name": "fse", - "module_path": "./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/", - "package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz", - "remote_path": "./v{version}/" - }, - "bugs": { - "url": "https://github.com/strongloop/fsevents/issues" - }, - "bundleDependencies": [ - "node-pre-gyp" - ], - "dependencies": { - "nan": "^2.3.0", - "node-pre-gyp": "^0.6.29" - }, - "description": "Native Access to Mac OS-X FSEvents", - "devDependencies": { - "tap": "~0.4.8" - }, - "directories": {}, - "dist": { - "shasum": "558e8cc38643d8ef40fe45158486d0d25758eee4", - "tarball": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.14.tgz" - }, - "engines": { - "node": ">=0.8.0" - }, - "gitHead": "fe059ea77fae15ed289271eecc881a2b7fb54edd", - "homepage": "https://github.com/strongloop/fsevents", - "keywords": [ - "fsevents", - "mac" - ], - "license": "MIT", - "main": "fsevents.js", - "maintainers": [ - { - "email": "miro.bajtos@gmail.com", - "name": "bajtos" - }, - { - "email": "info@bnoordhuis.nl", - "name": "bnoordhuis" - }, - { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - }, - { - "email": "pip@pipobscure.com", - "name": "pipobscure" - }, - { - "email": "callback@strongloop.com", - "name": "strongloop" - } - ], - "name": "fsevents", - "optionalDependencies": {}, - "os": [ - "darwin" - ], - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/strongloop/fsevents.git" - }, - "scripts": { - "install": "node-pre-gyp install --fallback-to-build", - "prepublish": "if [ $(npm -v | head -c 1) -lt 3 ]; then exit 1; fi && npm dedupe", - "test": "tap ./test" - }, - "version": "1.0.14" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc deleted file mode 100644 index d5129940666..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/async.cc +++ /dev/null @@ -1,43 +0,0 @@ -/* -** © 2014 by Philipp Dunkel -** Licensed under MIT License. -*/ - - -void async_propagate(uv_async_t *async) { - if (!async->data) return; - FSEvents *fse = (FSEvents *)async->data; - CFIndex idx, cnt; - fse_event *event; - char pathbuf[1024]; - const char *pathptr = NULL; - fse->lock(); - cnt = fse->events.size(); - for (idx=0; idxevents.at(idx); - if (event == NULL) continue; - pathptr = CFStringGetCStringPtr(event->path, kCFStringEncodingUTF8); - if (!pathptr) CFStringGetCString(event->path, pathbuf, 1024, kCFStringEncodingUTF8); - fse->emitEvent(pathptr ? pathptr : pathbuf, event->flags, event->id); - delete event; - } - if (cnt>0) fse->events.clear(); - fse->unlock(); -} - -void FSEvents::asyncStart() { - if (async.data == this) return; - async.data = this; - uv_async_init(uv_default_loop(), &async, (uv_async_cb) async_propagate); -} - -void FSEvents::asyncTrigger() { - if (async.data != this) return; - uv_async_send(&async); -} - -void FSEvents::asyncStop() { - if (async.data != this) return; - async.data = NULL; - uv_close((uv_handle_t *) &async, NULL); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc deleted file mode 100644 index fbd61ee9bcd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/constants.cc +++ /dev/null @@ -1,110 +0,0 @@ -/* -** © 2014 by Philipp Dunkel -** Licensed under MIT License. -*/ - -// constants from https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/index.html#//apple_ref/doc/constant_group/FSEventStreamEventFlags -#ifndef kFSEventStreamEventFlagNone -#define kFSEventStreamEventFlagNone 0x00000000 -#endif - -#ifndef kFSEventStreamEventFlagMustScanSubDirs -#define kFSEventStreamEventFlagMustScanSubDirs 0x00000001 -#endif - -#ifndef kFSEventStreamEventFlagUserDropped -#define kFSEventStreamEventFlagUserDropped 0x00000002 -#endif - -#ifndef kFSEventStreamEventFlagKernelDropped -#define kFSEventStreamEventFlagKernelDropped 0x00000004 -#endif - -#ifndef kFSEventStreamEventFlagEventIdsWrapped -#define kFSEventStreamEventFlagEventIdsWrapped 0x00000008 -#endif - -#ifndef kFSEventStreamEventFlagHistoryDone -#define kFSEventStreamEventFlagHistoryDone 0x00000010 -#endif - -#ifndef kFSEventStreamEventFlagRootChanged -#define kFSEventStreamEventFlagRootChanged 0x00000020 -#endif - -#ifndef kFSEventStreamEventFlagMount -#define kFSEventStreamEventFlagMount 0x00000040 -#endif - -#ifndef kFSEventStreamEventFlagUnmount -#define kFSEventStreamEventFlagUnmount 0x00000080 -#endif - -#ifndef kFSEventStreamEventFlagItemCreated -#define kFSEventStreamEventFlagItemCreated 0x00000100 -#endif - -#ifndef kFSEventStreamEventFlagItemRemoved -#define kFSEventStreamEventFlagItemRemoved 0x00000200 -#endif - -#ifndef kFSEventStreamEventFlagItemInodeMetaMod -#define kFSEventStreamEventFlagItemInodeMetaMod 0x00000400 -#endif - -#ifndef kFSEventStreamEventFlagItemRenamed -#define kFSEventStreamEventFlagItemRenamed 0x00000800 -#endif - -#ifndef kFSEventStreamEventFlagItemModified -#define kFSEventStreamEventFlagItemModified 0x00001000 -#endif - -#ifndef kFSEventStreamEventFlagItemFinderInfoMod -#define kFSEventStreamEventFlagItemFinderInfoMod 0x00002000 -#endif - -#ifndef kFSEventStreamEventFlagItemChangeOwner -#define kFSEventStreamEventFlagItemChangeOwner 0x00004000 -#endif - -#ifndef kFSEventStreamEventFlagItemXattrMod -#define kFSEventStreamEventFlagItemXattrMod 0x00008000 -#endif - -#ifndef kFSEventStreamEventFlagItemIsFile -#define kFSEventStreamEventFlagItemIsFile 0x00010000 -#endif - -#ifndef kFSEventStreamEventFlagItemIsDir -#define kFSEventStreamEventFlagItemIsDir 0x00020000 -#endif - -#ifndef kFSEventStreamEventFlagItemIsSymlink -#define kFSEventStreamEventFlagItemIsSymlink 0x00040000 -#endif - -static v8::Local Constants() { - v8::Local object = Nan::New(); - object->Set(Nan::New("kFSEventStreamEventFlagNone").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagNone)); - object->Set(Nan::New("kFSEventStreamEventFlagMustScanSubDirs").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagMustScanSubDirs)); - object->Set(Nan::New("kFSEventStreamEventFlagUserDropped").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagUserDropped)); - object->Set(Nan::New("kFSEventStreamEventFlagKernelDropped").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagKernelDropped)); - object->Set(Nan::New("kFSEventStreamEventFlagEventIdsWrapped").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagEventIdsWrapped)); - object->Set(Nan::New("kFSEventStreamEventFlagHistoryDone").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagHistoryDone)); - object->Set(Nan::New("kFSEventStreamEventFlagRootChanged").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagRootChanged)); - object->Set(Nan::New("kFSEventStreamEventFlagMount").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagMount)); - object->Set(Nan::New("kFSEventStreamEventFlagUnmount").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagUnmount)); - object->Set(Nan::New("kFSEventStreamEventFlagItemCreated").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemCreated)); - object->Set(Nan::New("kFSEventStreamEventFlagItemRemoved").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemRemoved)); - object->Set(Nan::New("kFSEventStreamEventFlagItemInodeMetaMod").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemInodeMetaMod)); - object->Set(Nan::New("kFSEventStreamEventFlagItemRenamed").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemRenamed)); - object->Set(Nan::New("kFSEventStreamEventFlagItemModified").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemModified)); - object->Set(Nan::New("kFSEventStreamEventFlagItemFinderInfoMod").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemFinderInfoMod)); - object->Set(Nan::New("kFSEventStreamEventFlagItemChangeOwner").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemChangeOwner)); - object->Set(Nan::New("kFSEventStreamEventFlagItemXattrMod").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemXattrMod)); - object->Set(Nan::New("kFSEventStreamEventFlagItemIsFile").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemIsFile)); - object->Set(Nan::New("kFSEventStreamEventFlagItemIsDir").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemIsDir)); - object->Set(Nan::New("kFSEventStreamEventFlagItemIsSymlink").ToLocalChecked(), Nan::New(kFSEventStreamEventFlagItemIsSymlink)); - return object; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc deleted file mode 100644 index 271208022ea..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/locking.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* -** © 2014 by Philipp Dunkel -** Licensed under MIT License. -*/ - -void FSEvents::lockingStart() { - if (lockStarted) return; - lockStarted = true; - pthread_mutex_init(&lockmutex, NULL); -} - -void FSEvents::lock() { - if (!lockStarted) return; - pthread_mutex_lock(&lockmutex); -} - -void FSEvents::unlock() { - if (!lockStarted) return; - pthread_mutex_unlock(&lockmutex); -} - -void FSEvents::lockingStop() { - if (!lockStarted) return; - lockStarted = false; - - pthread_mutex_destroy(&lockmutex); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc deleted file mode 100644 index 976c9597e64..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/methods.cc +++ /dev/null @@ -1,42 +0,0 @@ -/* -** © 2014 by Philipp Dunkel -** Licensed under MIT License. -*/ - -void FSEvents::emitEvent(const char *path, UInt32 flags, UInt64 id) { - if (!handler) return; - Nan::HandleScope handle_scope; - v8::Local argv[] = { - Nan::New(path).ToLocalChecked(), - Nan::New(flags), - Nan::New(id) - }; - handler->Call(3, argv); -} - -NAN_METHOD(FSEvents::New) { - Nan::Utf8String *path = new Nan::Utf8String(info[0]); - Nan::Callback *callback = new Nan::Callback(info[1].As()); - - FSEvents *fse = new FSEvents(**path, callback); - fse->Wrap(info.This()); - - info.GetReturnValue().Set(info.This()); -} - -NAN_METHOD(FSEvents::Stop) { - FSEvents* fse = node::ObjectWrap::Unwrap(info.This()); - - fse->threadStop(); - fse->asyncStop(); - - info.GetReturnValue().Set(info.This()); -} - -NAN_METHOD(FSEvents::Start) { - FSEvents* fse = node::ObjectWrap::Unwrap(info.This()); - fse->asyncStart(); - fse->threadStart(); - - info.GetReturnValue().Set(info.This()); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc deleted file mode 100644 index 9dc558818f7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/storage.cc +++ /dev/null @@ -1,27 +0,0 @@ -/* - ** © 2014 by Philipp Dunkel - ** Licensed under MIT License. - */ - -struct fse_event { - UInt64 id; - UInt32 flags; - CFStringRef path; - - fse_event(CFStringRef eventPath, UInt32 eventFlag, UInt64 eventId) { - this->path = eventPath; - this->flags = eventFlag; - this->id = eventId; - if (this->path != NULL) - CFRetain(this->path); - } - - ~fse_event() { - if (this->path != NULL) - CFRelease(this->path); - } - -private: - fse_event(const fse_event&); - void operator=(const fse_event&); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc b/src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc deleted file mode 100644 index 4813fdc56eb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/fsevents/src/thread.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -** © 2014 by Philipp Dunkel -** Licensed under MIT License. -*/ - -// constants from https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/index.html#//apple_ref/doc/constant_group/FSEventStreamCreateFlags -#ifndef kFSEventStreamCreateFlagNone -#define kFSEventStreamCreateFlagNone 0x00000000 -#endif - -#ifndef kFSEventStreamCreateFlagUseCFTypes -#define kFSEventStreamCreateFlagUseCFTypes 0x00000001 -#endif - -#ifndef kFSEventStreamCreateFlagNoDefer -#define kFSEventStreamCreateFlagNoDefer 0x00000002 -#endif - -#ifndef kFSEventStreamCreateFlagWatchRoot -#define kFSEventStreamCreateFlagWatchRoot 0x00000004 -#endif - -#ifndef kFSEventStreamCreateFlagIgnoreSelf -#define kFSEventStreamCreateFlagIgnoreSelf 0x00000008 -#endif - -#ifndef kFSEventStreamCreateFlagFileEvents -#define kFSEventStreamCreateFlagFileEvents 0x00000010 -#endif - -void FSEvents::threadStart() { - if (threadloop) return; - pthread_create(&thread, NULL, &FSEvents::threadRun, this); -} - -void HandleStreamEvents(ConstFSEventStreamRef stream, void *ctx, size_t numEvents, void *eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) { - FSEvents * fse = (FSEvents *)ctx; - size_t idx; - fse->lock(); - for (idx=0; idx < numEvents; idx++) { - fse_event *event = new fse_event( - (CFStringRef)CFArrayGetValueAtIndex((CFArrayRef)eventPaths, idx), - eventFlags[idx], - eventIds[idx] - ); - fse->events.push_back(event); - } - fse->asyncTrigger(); - fse->unlock(); -} - -void *FSEvents::threadRun(void *ctx) { - FSEvents *fse = (FSEvents*)ctx; - FSEventStreamContext context = { 0, ctx, NULL, NULL, NULL }; - fse->threadloop = CFRunLoopGetCurrent(); - FSEventStreamRef stream = FSEventStreamCreate(NULL, &HandleStreamEvents, &context, fse->paths, kFSEventStreamEventIdSinceNow, (CFAbsoluteTime) 0.1, kFSEventStreamCreateFlagNone | kFSEventStreamCreateFlagWatchRoot | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagUseCFTypes); - FSEventStreamScheduleWithRunLoop(stream, fse->threadloop, kCFRunLoopDefaultMode); - FSEventStreamStart(stream); - CFRunLoopRun(); - FSEventStreamStop(stream); - FSEventStreamUnscheduleFromRunLoop(stream, fse->threadloop, kCFRunLoopDefaultMode); - FSEventStreamInvalidate(stream); - FSEventStreamRelease(stream); - fse->threadloop = NULL; - return NULL; -} - -void FSEvents::threadStop() { - if (!threadloop) return; - CFRunLoopStop(threadloop); - pthread_join(thread, NULL); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE b/src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE deleted file mode 100644 index 65f90aca8c2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-base/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/README.md b/src/filesystem/impls/appshell/node/node_modules/glob-base/README.md deleted file mode 100644 index 1da2e82f15b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-base/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# glob-base [![NPM version](https://badge.fury.io/js/glob-base.svg)](http://badge.fury.io/js/glob-base) [![Build Status](https://travis-ci.org/jonschlinkert/glob-base.svg)](https://travis-ci.org/jonschlinkert/glob-base) - -> Returns an object with the (non-glob) base path and the actual pattern. - -Use [glob-parent](https://github.com/es128/glob-parent) if you just want the base path. - -## Install with [npm](npmjs.org) - -```bash -npm i glob-base --save -``` - -## Related projects -* [glob-parent](https://github.com/es128/glob-parent): Strips glob magic from a string to provide the parent path -* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. -* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. -* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. -* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. -* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. -* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. - -## Usage - -```js -var globBase = require('glob-base'); - -globBase('a/b/.git/'); -//=> { base: 'a/b/.git/', isGlob: false, glob: '' }) - -globBase('a/b/**/e'); -//=> { base: 'a/b', isGlob: true, glob: '**/e' } - -globBase('a/b/*.{foo,bar}'); -//=> { base: 'a/b', isGlob: true, glob: '*.{foo,bar}' } - -globBase('a/b/.git/**'); -//=> { base: 'a/b/.git', isGlob: true, glob: '**' } - -globBase('a/b/c/*.md'); -//=> { base: 'a/b/c', isGlob: true, glob: '*.md' } - -globBase('a/b/c/.*.md'); -//=> { base: 'a/b/c', isGlob: true, glob: '.*.md' } - -globBase('a/b/{c,d}'); -//=> { base: 'a/b', isGlob: true, glob: '{c,d}' } - -globBase('!*.min.js'); -//=> { base: '.', isGlob: true, glob: '!*.min.js' } - -globBase('!foo'); -//=> { base: '.', isGlob: true, glob: '!foo' } - -globBase('!foo/(a|b).min.js'); -//=> { base: '.', isGlob: true, glob: '!foo/(a|b).min.js' } - -globBase(''); -//=> { base: '.', isGlob: false, glob: '' } - -globBase('**/*.md'); -//=> { base: '.', isGlob: true, glob: '**/*.md' } - -globBase('**/*.min.js'); -//=> { base: '.', isGlob: true, glob: '**/*.min.js' } - -globBase('**/.*'); -//=> { base: '.', isGlob: true, glob: '**/.*' } - -globBase('**/d'); -//=> { base: '.', isGlob: true, glob: '**/d' } - -globBase('*.*'); -//=> { base: '.', isGlob: true, glob: '*.*' } - -globBase('*.min.js'); -//=> { base: '.', isGlob: true, glob: '*.min.js' } - -globBase('*/*'); -//=> { base: '.', isGlob: true, glob: '*/*' } - -globBase('*b'); -//=> { base: '.', isGlob: true, glob: '*b' } - -globBase('.'); -//=> { base: '.', isGlob: false, glob: '.' } - -globBase('.*'); -//=> { base: '.', isGlob: true, glob: '.*' } - -globBase('./*'); -//=> { base: '.', isGlob: true, glob: '*' } - -globBase('/a'); -//=> { base: '/', isGlob: false, glob: 'a' } - -globBase('@(a|b)/e.f.g/'); -//=> { base: '.', isGlob: true, glob: '@(a|b)/e.f.g/' } - -globBase('[a-c]b*'); -//=> { base: '.', isGlob: true, glob: '[a-c]b*' } - -globBase('a'); -//=> { base: '.', isGlob: false, glob: 'a' } - -globBase('a.min.js'); -//=> { base: '.', isGlob: false, glob: 'a.min.js' } - -globBase('a/'); -//=> { base: 'a/', isGlob: false, glob: '' } - -globBase('a/**/j/**/z/*.md'); -//=> { base: 'a', isGlob: true, glob: '**/j/**/z/*.md' } - -globBase('a/*/c/*.md'); -//=> { base: 'a', isGlob: true, glob: '*/c/*.md' } - -globBase('a/?/c.md'); -//=> { base: 'a', isGlob: true, glob: '?/c.md' } - -globBase('a/??/c.js'); -//=> { base: 'a', isGlob: true, glob: '??/c.js' } - -globBase('a?b'); -//=> { base: '.', isGlob: true, glob: 'a?b' } - -globBase('bb'); -//=> { base: '.', isGlob: false, glob: 'bb' } - -globBase('c.md'); -//=> { base: '.', isGlob: false, glob: 'c.md' } -``` - -## Running tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/glob-base/issues) - - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 08, 2015._ diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/index.js b/src/filesystem/impls/appshell/node/node_modules/glob-base/index.js deleted file mode 100644 index 564b4a8854f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-base/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/*! - * glob-base - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var path = require('path'); -var parent = require('glob-parent'); -var isGlob = require('is-glob'); - -module.exports = function globBase(pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('glob-base expects a string.'); - } - - var res = {}; - res.base = parent(pattern); - res.isGlob = isGlob(pattern); - - if (res.base !== '.') { - res.glob = pattern.substr(res.base.length); - if (res.glob.charAt(0) === '/') { - res.glob = res.glob.substr(1); - } - } else { - res.glob = pattern; - } - - if (!res.isGlob) { - res.base = dirname(pattern); - res.glob = res.base !== '.' - ? pattern.substr(res.base.length) - : pattern; - } - - if (res.glob.substr(0, 2) === './') { - res.glob = res.glob.substr(2); - } - if (res.glob.charAt(0) === '/') { - res.glob = res.glob.substr(1); - } - return res; -}; - -function dirname(glob) { - if (glob.slice(-1) === '/') return glob; - return path.dirname(glob); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-base/package.json b/src/filesystem/impls/appshell/node/node_modules/glob-base/package.json deleted file mode 100644 index 9c082ae14b2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-base/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - "glob-base@^0.3.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob" - ] - ], - "_from": "glob-base@>=0.3.0 <0.4.0", - "_id": "glob-base@0.3.0", - "_inCache": true, - "_installable": true, - "_location": "/glob-base", - "_nodeVersion": "0.12.7", - "_npmUser": { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - }, - "_npmVersion": "2.11.3", - "_phantomChildren": {}, - "_requested": { - "name": "glob-base", - "raw": "glob-base@^0.3.0", - "rawSpec": "^0.3.0", - "scope": null, - "spec": ">=0.3.0 <0.4.0", - "type": "range" - }, - "_requiredBy": [ - "/parse-glob" - ], - "_resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "_shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "_shrinkwrap": null, - "_spec": "glob-base@^0.3.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/glob-base/issues" - }, - "dependencies": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "description": "Returns an object with the (non-glob) base path and the actual pattern.", - "devDependencies": { - "mocha": "*", - "should": "^5.1.0" - }, - "directories": {}, - "dist": { - "shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "tarball": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "adbc0ab07ec8a85f76ffd1b54dd41cdb9d1d0b83", - "homepage": "https://github.com/jonschlinkert/glob-base", - "keywords": [ - "base", - "directory", - "dirname", - "expression", - "glob", - "parent", - "path", - "pattern", - "regex", - "regular", - "root" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - }, - { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - }, - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "glob-base", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/glob-base.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.3.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore b/src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore deleted file mode 100644 index 33e391f0e08..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-parent/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.DS_Store -npm-debug.log -coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml deleted file mode 100644 index 18fc42f69f5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-parent/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "4" - - "iojs-v3" - - "iojs-v2" - - "iojs-v1" - - "0.12" - - "0.10" diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE b/src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE deleted file mode 100644 index 734076d8aff..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-parent/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015 Elan Shanker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md b/src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md deleted file mode 100644 index ff5310d3b4c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-parent/README.md +++ /dev/null @@ -1,43 +0,0 @@ -glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) -====== -Javascript module to extract the non-magic parent path from a glob string. - -[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) -[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) - -Usage ------ -```sh -npm install glob-parent --save -``` - -```js -var globParent = require('glob-parent'); - -globParent('path/to/*.js'); // 'path/to' -globParent('/root/path/to/*.js'); // '/root/path/to' -globParent('/*.js'); // '/' -globParent('*.js'); // '.' -globParent('**/*.js'); // '.' -globParent('path/{to,from}'); // 'path' -globParent('path/!(to|from)'); // 'path' -globParent('path/?(to|from)'); // 'path' -globParent('path/+(to|from)'); // 'path' -globParent('path/*(to|from)'); // 'path' -globParent('path/@(to|from)'); // 'path' -globParent('path/**/*'); // 'path' - -// if provided a non-glob path, returns the nearest dir -globParent('path/foo/bar.js'); // 'path/foo' -globParent('path/foo/'); // 'path/foo' -globParent('path/foo'); // 'path' (see issue #3 for details) - -``` - -Change Log ----------- -[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) - -License -------- -[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js b/src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js deleted file mode 100644 index 61615f1ac06..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-parent/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var path = require('path'); -var isglob = require('is-glob'); - -module.exports = function globParent(str) { - str += 'a'; // preserves full path in case of trailing path separator - do {str = path.dirname(str)} while (isglob(str)); - return str; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json b/src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json deleted file mode 100644 index eacfafc583c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-parent/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_args": [ - [ - "glob-parent@^2.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "glob-parent@>=2.0.0 <3.0.0", - "_id": "glob-parent@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/glob-parent", - "_nodeVersion": "3.0.0", - "_npmUser": { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - }, - "_npmVersion": "2.13.3", - "_phantomChildren": {}, - "_requested": { - "name": "glob-parent", - "raw": "glob-parent@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar", - "/glob-base" - ], - "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "_shasum": "81383d72db054fcccf5336daa902f182f6edbb28", - "_shrinkwrap": null, - "_spec": "glob-parent@^2.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "author": { - "name": "Elan Shanker" - }, - "bugs": { - "url": "https://github.com/es128/glob-parent/issues" - }, - "dependencies": { - "is-glob": "^2.0.0" - }, - "description": "Strips glob magic from a string to provide the parent path", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "mocha": "^2.1.0" - }, - "directories": {}, - "dist": { - "shasum": "81383d72db054fcccf5336daa902f182f6edbb28", - "tarball": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" - }, - "gitHead": "a956910c7ccb5eafd1b3fe900ceb6335cc5b6d3d", - "homepage": "https://github.com/es128/glob-parent", - "keywords": [ - "glob", - "parent", - "strip", - "path", - "directory", - "base" - ], - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - } - ], - "name": "glob-parent", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/glob-parent.git" - }, - "scripts": { - "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" - }, - "version": "2.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js b/src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js deleted file mode 100644 index 01156d2ff0d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/glob-parent/test.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var gp = require('./'); -var assert = require('assert'); - -describe('glob-parent', function() { - it('should strip glob magic to return parent path', function() { - assert.equal(gp('path/to/*.js'), 'path/to'); - assert.equal(gp('/root/path/to/*.js'), '/root/path/to'); - assert.equal(gp('/*.js'), '/'); - assert.equal(gp('*.js'), '.'); - assert.equal(gp('**/*.js'), '.'); - assert.equal(gp('path/{to,from}'), 'path'); - assert.equal(gp('path/!(to|from)'), 'path'); - assert.equal(gp('path/?(to|from)'), 'path'); - assert.equal(gp('path/+(to|from)'), 'path'); - assert.equal(gp('path/*(to|from)'), 'path'); - assert.equal(gp('path/@(to|from)'), 'path'); - assert.equal(gp('path/**/*'), 'path'); - assert.equal(gp('path/**/subdir/foo.*'), 'path'); - }); - - it('should return parent dirname from non-glob paths', function() { - assert.equal(gp('path/foo/bar.js'), 'path/foo'); - assert.equal(gp('path/foo/'), 'path/foo'); - assert.equal(gp('path/foo'), 'path'); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 9d2c8036969..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md deleted file mode 100644 index 5273a50ad6a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over [fs module](https://nodejs.org/api/fs.html) - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## USAGE - -```javascript -// use just like fs -var fs = require('graceful-fs') - -// now go and do stuff with it... -fs.readFileSync('some-file-or-whatever') -``` - -## Global Patching - -If you want to patch the global fs module (or any other fs-like -module) you can do this: - -```javascript -// Make sure to read the caveat below. -var realFs = require('fs') -var gracefulFs = require('graceful-fs') -gracefulFs.gracefulify(realFs) -``` - -This should only ever be done at the top-level application layer, in -order to delay on EMFILE errors from any fs-using dependencies. You -should **not** do this in a library, because it can cause unexpected -delays in other parts of the program. - -## Changes - -This module is fairly stable at this point, and used by a lot of -things. That being said, because it implements a subtle behavior -change in a core part of the node API, even modest changes can be -extremely breaking, and the versioning is thus biased towards -bumping the major when in doubt. - -The main change between major versions has been switching between -providing a fully-patched `fs` module vs monkey-patching the node core -builtin, and the approach by which a non-monkey-patched `fs` was -created. - -The goal is to trade `EMFILE` errors for slower fs operations. So, if -you try to open a zillion files, rather than crashing, `open` -operations will be queued up and wait for something else to `close`. - -There are advantages to each approach. Monkey-patching the fs means -that no `EMFILE` errors can possibly occur anywhere in your -application, because everything is using the same core `fs` module, -which is patched. However, it can also obviously cause undesirable -side-effects, especially if the module is loaded multiple times. - -Implementing a separate-but-identical patched `fs` module is more -surgical (and doesn't run the risk of patching multiple times), but -also imposes the challenge of keeping in sync with the core module. - -The current approach loads the `fs` module, and then creates a -lookalike object that has all the same methods, except a few that are -patched. It is safe to use in all versions of Node from 0.8 through -7.0. - -### v4 - -* Do not monkey-patch the fs module. This module may now be used as a - drop-in dep, and users can opt into monkey-patching the fs builtin - if their app requires it. - -### v3 - -* Monkey-patch fs, because the eval approach no longer works on recent - node. -* fixed possible type-error throw if rename fails on windows -* verify that we *never* get EMFILE errors -* Ignore ENOSYS from chmod/chown -* clarify that graceful-fs must be used as a drop-in - -### v2.1.0 - -* Use eval rather than monkey-patching fs. -* readdir: Always sort the results -* win32: requeue a file if error has an OK status - -### v2.0 - -* A return to monkey patching -* wrap process.cwd - -### v1.1 - -* wrap readFile -* Wrap fs.writeFile. -* readdir protection -* Don't clobber the fs builtin -* Handle fs.read EAGAIN errors by trying again -* Expose the curOpen counter -* No-op lchown/lchmod if not implemented -* fs.rename patch only for win32 -* Patch fs.rename to handle AV software on Windows -* Close #4 Chown should not fail on einval or eperm if non-root -* Fix isaacs/fstream#1 Only wrap fs one time -* Fix #3 Start at 1024 max files, then back off on EMFILE -* lutimes that doens't blow up on Linux -* A full on-rewrite using a queue instead of just swallowing the EMFILE error -* Wrap Read/Write streams as well - -### 1.0 - -* Update engines for node 0.6 -* Be lstat-graceful on Windows -* first diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js deleted file mode 100644 index 8ad4a383965..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/fs.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict' - -var fs = require('fs') - -module.exports = clone(fs) - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: obj.__proto__ } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 9bf803e686c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,253 +0,0 @@ -var fs = require('fs') -var polyfills = require('./polyfills.js') -var legacy = require('./legacy-streams.js') -var queue = [] - -var util = require('util') - -function noop () {} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(queue) - require('assert').equal(queue.length, 0) - }) -} - -module.exports = patch(require('./fs.js')) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { - module.exports = patch(fs) -} - -// Always patch fs.close/closeSync, because we want to -// retry() whenever a close happens *anywhere* in the program. -// This is essential when multiple graceful-fs instances are -// in play at the same time. -module.exports.close = -fs.close = (function (fs$close) { return function (fd, cb) { - return fs$close.call(fs, fd, function (err) { - if (!err) - retry() - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) -}})(fs.close) - -module.exports.closeSync = -fs.closeSync = (function (fs$closeSync) { return function (fd) { - // Note that graceful-fs also retries when fs.closeSync() fails. - // Looks like a bug to me, although it's probably a harmless one. - var rval = fs$closeSync.apply(fs, arguments) - retry() - return rval -}})(fs.closeSync) - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - fs.FileReadStream = ReadStream; // Legacy name. - fs.FileWriteStream = WriteStream; // Legacy name. - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - function readdir (path, cb) { - return go$readdir(path, cb) - - function go$readdir () { - return fs$readdir(path, function (err, files) { - if (files && files.sort) - files.sort(); // Backwards compatibility with graceful-fs. - - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [path, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - - var fs$WriteStream = fs.WriteStream - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - - fs.ReadStream = ReadStream - fs.WriteStream = WriteStream - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - queue.push(elem) -} - -function retry () { - var elem = queue.shift() - if (elem) { - debug('RETRY', elem[0].name, elem[1]) - elem[0].apply(null, elem[1]) - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js deleted file mode 100644 index d617b50fc08..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/legacy-streams.js +++ /dev/null @@ -1,118 +0,0 @@ -var Stream = require('stream').Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json deleted file mode 100644 index 3739aa2afdc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - "graceful-fs@^4.1.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" - ] - ], - "_from": "graceful-fs@>=4.1.2 <5.0.0", - "_id": "graceful-fs@4.1.5", - "_inCache": true, - "_installable": true, - "_location": "/graceful-fs", - "_nodeVersion": "4.4.4", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/graceful-fs-4.1.5.tgz_1469558843062_0.986795610981062" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.10.6", - "_phantomChildren": {}, - "_requested": { - "name": "graceful-fs", - "raw": "graceful-fs@^4.1.2", - "rawSpec": "^4.1.2", - "scope": null, - "spec": ">=4.1.2 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/readdirp" - ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz", - "_shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0", - "_shrinkwrap": null, - "_spec": "graceful-fs@^4.1.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "dependencies": {}, - "description": "A drop-in replacement for fs, making various improvements.", - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^5.4.2" - }, - "directories": { - "test": "test" - }, - "dist": { - "shasum": "f4745e8caed5e0dd2ef21bb5e2d229a32e8093c0", - "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.5.tgz" - }, - "engines": { - "node": ">=0.4.0" - }, - "files": [ - "fs.js", - "graceful-fs.js", - "legacy-streams.js", - "polyfills.js" - ], - "gitHead": "d170f3f2ceb56adb4d6bd50df4b535bed54120c0", - "homepage": "https://github.com/isaacs/node-graceful-fs#readme", - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "ISC", - "main": "graceful-fs.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - } - ], - "name": "graceful-fs", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/node-graceful-fs.git" - }, - "scripts": { - "test": "node test.js | tap -" - }, - "version": "4.1.5" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js b/src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index 1cc74c8236b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,275 +0,0 @@ -var fs = require('./fs.js') -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 1 second. - if (process.platform === "win32") { - fs.rename = (function (fs$rename) { return function (from, to, cb) { - var start = Date.now() - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return fs$rename(from, to, CB) - } - if (cb) cb(er) - }) - }})(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - }})(fs.read) - - fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) -} - -function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } -} - -function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - -function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er, res) { - if (chownErOk(er)) er = null - if (cb) cb(er, res) - }) - } -} - -function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - if (cb) cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -// ENOSYS means that the fs doesn't support the op. Just ignore -// that, because it doesn't matter. -// -// if there's no getuid, or if getuid() is something other -// than 0, and the error is EINVAL or EPERM, then just ignore -// it. -// -// This specific case is a silent failure in cp, install, tar, -// and most other unix tools that manage permissions. -// -// When running as root, or if other types of errors are -// encountered, then it's strict. -function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false -} diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE b/src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d671..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/README.md b/src/filesystem/impls/appshell/node/node_modules/inherits/README.md deleted file mode 100644 index b1c56658557..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js b/src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f57b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js b/src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75e6b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/package.json b/src/filesystem/impls/appshell/node/node_modules/inherits/package.json deleted file mode 100644 index 999d5ab60f5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/inherits/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "inherits@^2.0.1", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "inherits@>=2.0.1 <3.0.0", - "_id": "inherits@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/inherits", - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "1.3.8", - "_phantomChildren": {}, - "_requested": { - "name": "inherits", - "raw": "inherits@^2.0.1", - "rawSpec": "^2.0.1", - "scope": null, - "spec": ">=2.0.1 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar", - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "_shrinkwrap": null, - "_spec": "inherits@^2.0.1", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "browser": "./inherits_browser.js", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "dependencies": {}, - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", - "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "homepage": "https://github.com/isaacs/inherits#readme", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "license": "ISC", - "main": "./inherits.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - } - ], - "name": "inherits", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "scripts": { - "test": "node test" - }, - "version": "2.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/inherits/test.js b/src/filesystem/impls/appshell/node/node_modules/inherits/test.js deleted file mode 100644 index fc53012d31c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js deleted file mode 100644 index 6c8c7e72841..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; -var path = require('path'); -var binaryExtensions = require('binary-extensions'); -var exts = Object.create(null); - -binaryExtensions.forEach(function (el) { - exts[el] = true; -}); - -module.exports = function (filepath) { - return path.extname(filepath).slice(1).toLowerCase() in exts; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/license b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json deleted file mode 100644 index d11fd647ae1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - "is-binary-path@^1.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "is-binary-path@>=1.0.0 <2.0.0", - "_id": "is-binary-path@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/is-binary-path", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "is-binary-path", - "raw": "is-binary-path@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar" - ], - "_resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "_shasum": "75f16642b480f187a711c814161fd3a4a7655898", - "_shrinkwrap": null, - "_spec": "is-binary-path@^1.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/is-binary-path/issues" - }, - "dependencies": { - "binary-extensions": "^1.0.0" - }, - "description": "Check if a filepath is a binary file", - "devDependencies": { - "ava": "0.0.4" - }, - "directories": {}, - "dist": { - "shasum": "75f16642b480f187a711c814161fd3a4a7655898", - "tarball": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "ed26bd7be5e29dad159c2771cb99dd48913f9de0", - "homepage": "https://github.com/sindresorhus/is-binary-path", - "keywords": [ - "bin", - "binary", - "ext", - "extensions", - "extension", - "file", - "path", - "check", - "detect", - "is" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - { - "email": "paul@paulmillr.com", - "name": "paulmillr" - }, - { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - } - ], - "name": "is-binary-path", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-binary-path.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md b/src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md deleted file mode 100644 index a17d6a245d1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-binary-path/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) - -> Check if a filepath is a binary file - - -## Install - -``` -$ npm install --save is-binary-path -``` - - -## Usage - -```js -var isBinaryPath = require('is-binary-path'); - -isBinaryPath('src/unicorn.png'); -//=> true - -isBinaryPath('src/unicorn.txt'); -//=> false -``` - - -## Related - -- [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions -- [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml deleted file mode 100644 index 8803fc1945b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-buffer/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: -- 'iojs' -env: - global: - - secure: du27W3wTgZ3G183axW7w0I01lOIurx8kilMH9p45VMfNXCu8lo6FLtLIQZxJ1FYMoJLQ1yfJTu2G0rq39SotDfJumsk6tF7BjTY/HKCocZaHqCMgw0W2bcylb5kMAdLhBNPlzejpPoWa1x1axbAHNFOLQNVosG/Bavu3/kuIIps= - - secure: Ax/5aekM40o67NuTkvQqx1DhfP86ZlHTtKbv5yI+WFmbjD3FQM8b8G1J/o7doaBDev7Mp+1zDJOK2pFGtt+JGRl0lM2JUmLh6yh/b28obXyei5iuUkqzKJLfKZHMbY5QW/1i4DUM+zSXe6Kava0qnqYg5wBBnrF6gLdsVsCGNQk= diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml b/src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml deleted file mode 100644 index dc1efbaa6bd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-buffer/.zuul.yml +++ /dev/null @@ -1,16 +0,0 @@ -ui: tape -browsers: - - name: chrome - version: 39..latest - - name: firefox - version: 34..latest - - name: safari - version: 5..latest - - name: microsoftedge - version: latest - - name: ie - version: 8..latest - - name: opera - version: 11..latest - - name: android - version: 5.0..latest diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE deleted file mode 100644 index 0c068ceecbd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md b/src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md deleted file mode 100644 index e6eb61adb59..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-buffer/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] - -#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (incl. [browser Buffers](https://github.com/feross/buffer)) - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/is-buffer -[npm-image]: https://img.shields.io/npm/v/is-buffer.svg -[npm-url]: https://npmjs.org/package/is-buffer -[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg -[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg -[saucelabs-url]: https://saucelabs.com/u/is-buffer - -## Why not use `Buffer.isBuffer`? - -This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). - -It's future-proof and works in node too! - -## install - -```bash -npm install is-buffer -``` - -## usage - -```js -var isBuffer = require('is-buffer') - -isBuffer(new Buffer(4)) // true - -isBuffer(undefined) // false -isBuffer(null) // false -isBuffer('') // false -isBuffer(true) // false -isBuffer(false) // false -isBuffer(0) // false -isBuffer(1) // false -isBuffer(1.0) // false -isBuffer('string') // false -isBuffer({}) // false -isBuffer(function foo () {}) // false -``` - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js b/src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js deleted file mode 100644 index ef028240a80..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-buffer/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Determine if an object is Buffer - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install is-buffer` - */ - -module.exports = function (obj) { - return !!(obj != null && - (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) - (obj.constructor && - typeof obj.constructor.isBuffer === 'function' && - obj.constructor.isBuffer(obj)) - )) -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json b/src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json deleted file mode 100644 index 5ef9715a913..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-buffer/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - "is-buffer@^1.0.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/kind-of" - ] - ], - "_from": "is-buffer@>=1.0.2 <2.0.0", - "_id": "is-buffer@1.1.3", - "_inCache": true, - "_installable": true, - "_location": "/is-buffer", - "_nodeVersion": "4.3.2", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/is-buffer-1.1.3.tgz_1457390977775_0.6384289276320487" - }, - "_npmUser": { - "email": "feross@feross.org", - "name": "feross" - }, - "_npmVersion": "2.14.12", - "_phantomChildren": {}, - "_requested": { - "name": "is-buffer", - "raw": "is-buffer@^1.0.2", - "rawSpec": "^1.0.2", - "scope": null, - "spec": ">=1.0.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/kind-of" - ], - "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.3.tgz", - "_shasum": "db897fc3f7aca2d50de94b6c8c2896a4771627af", - "_shrinkwrap": null, - "_spec": "is-buffer@^1.0.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/kind-of", - "author": { - "email": "feross@feross.org", - "name": "Feross Aboukhadijeh", - "url": "http://feross.org/" - }, - "bugs": { - "url": "https://github.com/feross/is-buffer/issues" - }, - "dependencies": {}, - "description": "Determine if an object is Buffer", - "devDependencies": { - "standard": "^6.0.5", - "tape": "^4.0.0", - "zuul": "^3.0.0" - }, - "directories": {}, - "dist": { - "shasum": "db897fc3f7aca2d50de94b6c8c2896a4771627af", - "tarball": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.3.tgz" - }, - "engines": { - "node": ">=0.12" - }, - "gitHead": "dfd658d887e6b63254b89d22af1a755a39313455", - "homepage": "https://github.com/feross/is-buffer", - "keywords": [ - "buffer", - "buffers", - "type", - "core buffer", - "browser buffer", - "browserify", - "typed array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "feross@feross.org", - "name": "feross" - } - ], - "name": "is-buffer", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/feross/is-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "zuul -- test/*.js", - "test-browser-local": "zuul --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "testling": { - "files": "test/*.js" - }, - "version": "1.1.3", - "warnings": [ - { - "code": "ENOTSUP", - "pkgid": "is-buffer@1.1.3", - "required": { - "node": ">=0.12" - } - } - ] -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js b/src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js deleted file mode 100644 index 38d883b0745..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-buffer/test/basic.js +++ /dev/null @@ -1,20 +0,0 @@ -var isBuffer = require('../') -var test = require('tape') - -test('is-buffer', function (t) { - t.ok(isBuffer(new Buffer(4)), 'new Buffer(4)') - - t.notOk(isBuffer(undefined), 'undefined') - t.notOk(isBuffer(null), 'null') - t.notOk(isBuffer(''), 'empty string') - t.notOk(isBuffer(true), 'true') - t.notOk(isBuffer(false), 'false') - t.notOk(isBuffer(0), '0') - t.notOk(isBuffer(1), '1') - t.notOk(isBuffer(1.0), '1.0') - t.notOk(isBuffer('string'), 'string') - t.notOk(isBuffer({}), '{}') - t.notOk(isBuffer(function foo () {}), 'function foo () {}') - - t.end() -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE deleted file mode 100644 index 33754daecd9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md deleted file mode 100644 index d17b55ccb71..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# is-dotfile [![NPM version](https://badge.fury.io/js/is-dotfile.svg)](http://badge.fury.io/js/is-dotfile) - -> Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i is-dotfile --save -``` - -## Usage - -```js -var isDotfile = require('is-dotfile'); -``` - -**false** - -All of the following return `false`: - -```js -isDotfile('a/b/c.js'); -isDotfile('/.git/foo'); -isDotfile('a/b/c/.git/foo'); -//=> false -``` - -**true** - -All of the following return `true`: - -```js -isDotfile('a/b/.gitignore'); -isDotfile('.gitignore'); -isDotfile('/.gitignore'); -//=> true -``` - -## Related projects - -* [dotfile-regex](https://www.npmjs.com/package/dotfile-regex): Regular expresson for matching dotfiles. | [homepage](https://github.com/regexps/dotfile-regex) -* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob) -* [is-dotdir](https://www.npmjs.com/package/is-dotdir): Returns true if a path is a dot-directory. | [homepage](https://github.com/jonschlinkert/is-dotdir) -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-dotfile/issues/new). - -## Authors - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 20, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js deleted file mode 100644 index 5a0a0caa8d1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/*! - * is-dotfile - * - * Copyright (c) 2015 Jon Schlinkert, contributors. - * Licensed under the MIT license. - */ - -module.exports = function(str) { - if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) { - return true; - } - - var last = str.lastIndexOf('/'); - return last !== -1 ? str.charCodeAt(last + 1) === 46 /* . */ : false; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json b/src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json deleted file mode 100644 index c23108e28c1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-dotfile/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - "is-dotfile@^1.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob" - ] - ], - "_from": "is-dotfile@>=1.0.0 <2.0.0", - "_id": "is-dotfile@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/is-dotfile", - "_nodeVersion": "4.2.1", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.14.7", - "_phantomChildren": {}, - "_requested": { - "name": "is-dotfile", - "raw": "is-dotfile@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/parse-glob" - ], - "_resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz", - "_shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", - "_shrinkwrap": null, - "_spec": "is-dotfile@^1.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/parse-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-dotfile/issues" - }, - "dependencies": {}, - "description": "Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.", - "devDependencies": { - "benchmarked": "^0.1.3", - "dotfile-regex": "^0.1.2", - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "2c132383f39199f8edc268ca01b9b007d205cc4d", - "tarball": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "df258600b0afa6403a2a840f2ec486c9d350492f", - "homepage": "https://github.com/jonschlinkert/is-dotfile", - "keywords": [ - "detect", - "dot", - "dotfile", - "expression", - "file", - "filepath", - "find", - "fs", - "is", - "match", - "path", - "regex", - "regexp", - "regular" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "is-dotfile", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-dotfile.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "has-glob", - "is-glob", - "dotfile-regex", - "is-dotdir" - ] - } - }, - "version": "1.0.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE deleted file mode 100644 index 65f90aca8c2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md deleted file mode 100644 index 11422761f1c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# is-equal-shallow [![NPM version](https://badge.fury.io/js/is-equal-shallow.svg)](http://badge.fury.io/js/is-equal-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/is-equal-shallow.svg)](https://travis-ci.org/jonschlinkert/is-equal-shallow) - -> Does a shallow comparison of two objects, returning false if the keys or values differ. - -The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives. - -* only compares objects. -* only compares the first level of each object -* values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned. - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i is-equal-shallow --save -``` - -## Usage - -```js -var equals = require('is-equal-shallow'); -equals(object_a, object_b); -``` - -**Examples** - -```js -equals({a: true, b: true}, {a: true, b: true}); -//=> 'true' - -equals({a: true, b: false}, {c: false, b: false}); -//=> 'false' - -equals({a: true, b: false}, {a: false, b: false}); -//=> 'false' -``` - -Strict comparison for equality: - -```js -equals({a: true, b: true}, {a: true, b: 'true'}); -//=> 'false' -``` - -When values are not primitives, `false` is always returned: - -```js -equals({ b: {}}, { b: {}}); -//=> 'false' - -equals({ b: []}, { b: []}); -//=> 'false' -``` - -## Related projects - -Other object utils: - -* [clone-deep](https://github.com/jonschlinkert/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. -* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) -* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) -* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. -* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-equal-shallow/issues/new) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js deleted file mode 100644 index 1006eef10f4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/*! - * is-equal-shallow - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isPrimitive = require('is-primitive'); - -module.exports = function isEqual(a, b) { - if (!a && !b) { return true; } - if (!a && b || a && !b) { return false; } - - var numKeysA = 0, numKeysB = 0, key; - for (key in b) { - numKeysB++; - if (!isPrimitive(b[key]) || !a.hasOwnProperty(key) || (a[key] !== b[key])) { - return false; - } - } - for (key in a) { - numKeysA++; - } - return numKeysA === numKeysB; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json b/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json deleted file mode 100644 index df1a012b7b1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-equal-shallow/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - "is-equal-shallow@^0.1.3", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache" - ] - ], - "_from": "is-equal-shallow@>=0.1.3 <0.2.0", - "_id": "is-equal-shallow@0.1.3", - "_inCache": true, - "_installable": true, - "_location": "/is-equal-shallow", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "is-equal-shallow", - "raw": "is-equal-shallow@^0.1.3", - "rawSpec": "^0.1.3", - "scope": null, - "spec": ">=0.1.3 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/regex-cache" - ], - "_resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "_shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534", - "_shrinkwrap": null, - "_spec": "is-equal-shallow@^0.1.3", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-equal-shallow/issues" - }, - "dependencies": { - "is-primitive": "^2.0.0" - }, - "description": "Does a shallow comparison of two objects, returning false if the keys or values differ.", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "2238098fc221de0bcfa5d9eac4c45d638aa1c534", - "tarball": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "dceb47dd9c9c21066958116e3b54b3c8c251ee4a", - "homepage": "https://github.com/jonschlinkert/is-equal-shallow", - "keywords": [ - "compare", - "comparison", - "equal", - "equals", - "is", - "is-equal", - "key", - "object", - "same", - "shallow", - "value" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - } - ], - "name": "is-equal-shallow", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/is-equal-shallow.git" - }, - "scripts": { - "test": "mocha" - }, - "verbiage": { - "related": { - "description": "Other object utils:", - "list": [ - "is-plain-object", - "isobject", - "for-in", - "for-own", - "clone-deep" - ] - } - }, - "version": "0.1.3" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE deleted file mode 100644 index 65f90aca8c2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extendable/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md b/src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md deleted file mode 100644 index e4cfaebcb79..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extendable/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# is-extendable [![NPM version](https://badge.fury.io/js/is-extendable.svg)](http://badge.fury.io/js/is-extendable) - -> Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?" - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i is-extendable --save -``` - -## Usage - -```js -var isExtendable = require('is-extendable'); -``` - -Returns true if the value is any of the following: - -* `array` -* `regexp` -* `plain object` -* `function` -* `date` -* `error` - -## Notes - -All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and: - -* the value is not a primitive, or -* that the object is an `object`, `function` - -Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`. - -## Related projects - -* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. -* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. -* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. -* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. -* [is-equal-shallow](https://github.com/jonschlinkert/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. -* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extendable/issues/new) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 04, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js b/src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js deleted file mode 100644 index 4ee71a44a3a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extendable/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * is-extendable - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -module.exports = function isExtendable(val) { - return typeof val !== 'undefined' && val !== null - && (typeof val === 'object' || typeof val === 'function'); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json b/src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json deleted file mode 100644 index a7a9b97c1d4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extendable/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "is-extendable@^0.1.1", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/object.omit" - ] - ], - "_from": "is-extendable@>=0.1.1 <0.2.0", - "_id": "is-extendable@0.1.1", - "_inCache": true, - "_installable": true, - "_location": "/is-extendable", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "is-extendable", - "raw": "is-extendable@^0.1.1", - "rawSpec": "^0.1.1", - "scope": null, - "spec": ">=0.1.1 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/object.omit" - ], - "_resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "_shasum": "62b110e289a471418e3ec36a617d472e301dfc89", - "_shrinkwrap": null, - "_spec": "is-extendable@^0.1.1", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/object.omit", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-extendable/issues" - }, - "dependencies": {}, - "description": "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. \"can the value have keys?\"", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "62b110e289a471418e3ec36a617d472e301dfc89", - "tarball": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "c36a0732e6a76931c6f66c5931d1f3e54fa44380", - "homepage": "https://github.com/jonschlinkert/is-extendable", - "keywords": [ - "array", - "assign", - "check", - "date", - "extend", - "extensible", - "function", - "is", - "object", - "regex", - "test" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "is-extendable", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-extendable.git" - }, - "scripts": { - "test": "mocha" - }, - "verbiage": { - "related": { - "list": [ - "isobject", - "is-plain-object", - "kind-of", - "is-extendable", - "is-equal-shallow", - "extend-shallow", - "assign-deep" - ] - } - }, - "version": "0.1.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE deleted file mode 100644 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extglob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md b/src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md deleted file mode 100644 index 80e7128d64d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extglob/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# is-extglob [![NPM version](https://badge.fury.io/js/is-extglob.svg)](http://badge.fury.io/js/is-extglob) [![Build Status](https://travis-ci.org/jonschlinkert/is-extglob.svg)](https://travis-ci.org/jonschlinkert/is-extglob) - -> Returns true if a string has an extglob. - -## Install with [npm](npmjs.org) - -```bash -npm i is-extglob --save -``` - -## Usage - -```js -var isExtglob = require('is-extglob'); -``` - -**True** - -```js -isExtglob('?(abc)'); -isExtglob('@(abc)'); -isExtglob('!(abc)'); -isExtglob('*(abc)'); -isExtglob('+(abc)'); -``` - -**False** - -Everything else... - -```js -isExtglob('foo.js'); -isExtglob('!foo.js'); -isExtglob('*.js'); -isExtglob('**/abc.js'); -isExtglob('abc/*.js'); -isExtglob('abc/(aaa|bbb).js'); -isExtglob('abc/[a-z].js'); -isExtglob('abc/{a,b}.js'); -isExtglob('abc/?.js'); -isExtglob('abc.js'); -isExtglob('abc/def/ghi.js'); -``` - -## Related -* [extglob](https://github.com/jonschlinkert/extglob): Extended globs. extglobs add the expressive power of regular expressions to glob patterns. -* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. -* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. - -## Run tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-extglob/issues) - - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 06, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js b/src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js deleted file mode 100644 index 803047f7485..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extglob/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * is-extglob - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - return typeof str === 'string' - && /[@?!+*]\(/.test(str); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json b/src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json deleted file mode 100644 index f87f2c0783b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-extglob/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - "is-extglob@^1.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "is-extglob@>=1.0.0 <2.0.0", - "_id": "is-extglob@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/is-extglob", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "is-extglob", - "raw": "is-extglob@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/extglob", - "/is-glob", - "/micromatch", - "/parse-glob" - ], - "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "_shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", - "_shrinkwrap": null, - "_spec": "is-extglob@^1.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-extglob/issues" - }, - "dependencies": {}, - "description": "Returns true if a string has an extglob.", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "ac468177c4943405a092fc8f29760c6ffc6206c0", - "tarball": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-extglob", - "keywords": [ - "bash", - "braces", - "check", - "exec", - "extglob", - "expression", - "glob", - "globbing", - "globstar", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "is-extglob", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-extglob.git" - }, - "scripts": { - "prepublish": "browserify -o browser.js -e index.js", - "test": "mocha" - }, - "version": "1.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE deleted file mode 100644 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/README.md b/src/filesystem/impls/appshell/node/node_modules/is-glob/README.md deleted file mode 100644 index b1625429314..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-glob/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# is-glob [![NPM version](https://badge.fury.io/js/is-glob.svg)](http://badge.fury.io/js/is-glob) [![Build Status](https://travis-ci.org/jonschlinkert/is-glob.svg)](https://travis-ci.org/jonschlinkert/is-glob) - -> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. - -Also take a look at [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i is-glob --save -``` - -## Usage - -```js -var isGlob = require('is-glob'); -``` - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js'); -isGlob('*.js'); -isGlob('**/abc.js'); -isGlob('abc/*.js'); -isGlob('abc/(aaa|bbb).js'); -isGlob('abc/[a-z].js'); -isGlob('abc/{a,b}.js'); -isGlob('abc/?.js'); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js'); -isGlob('abc/!(a).js'); -isGlob('abc/+(a).js'); -isGlob('abc/*(a).js'); -isGlob('abc/?(a).js'); -//=> true -``` - -**False** - -Patterns that do not have glob patterns return `false`: - -```js -isGlob('abc.js'); -isGlob('abc/def/ghi.js'); -isGlob('foo.js'); -isGlob('abc/@.js'); -isGlob('abc/+.js'); -isGlob(); -isGlob(null); -//=> false -``` - -Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): - -```js -isGlob(['**/*.js']); -isGlob(['foo.js']); -//=> false -``` - -## Related - -* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob) -* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) -* [is-posix-bracket](https://www.npmjs.com/package/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). | [homepage](https://github.com/jonschlinkert/is-posix-bracket) -* [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) - -## Run tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-glob/issues/new). - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 02, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/index.js b/src/filesystem/impls/appshell/node/node_modules/is-glob/index.js deleted file mode 100644 index ef27bba4fd7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-glob/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! - * is-glob - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -var isExtglob = require('is-extglob'); - -module.exports = function isGlob(str) { - return typeof str === 'string' - && (/[*!?{}(|)[\]]/.test(str) - || isExtglob(str)); -}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-glob/package.json b/src/filesystem/impls/appshell/node/node_modules/is-glob/package.json deleted file mode 100644 index 645fbf402ae..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-glob/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "_args": [ - [ - "is-glob@^2.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "is-glob@>=2.0.0 <3.0.0", - "_id": "is-glob@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/is-glob", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "is-glob", - "raw": "is-glob@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar", - "/glob-base", - "/glob-parent", - "/micromatch", - "/parse-glob" - ], - "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "_shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", - "_shrinkwrap": null, - "_spec": "is-glob@^2.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-glob/issues" - }, - "dependencies": { - "is-extglob": "^1.0.0" - }, - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet", - "devDependencies": { - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "d096f926a3ded5600f3fdfd91198cb0888c2d863", - "tarball": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "d7db1b2dd559b3d5a73f89dbe72d9e9f4d6587d7", - "homepage": "https://github.com/jonschlinkert/is-glob", - "keywords": [ - "bash", - "braces", - "check", - "exec", - "extglob", - "expression", - "glob", - "globbing", - "globstar", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - } - ], - "name": "is-glob", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-glob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "has-glob", - "is-extglob", - "is-posix-bracket", - "is-valid-glob", - "micromatch" - ] - } - }, - "version": "2.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE deleted file mode 100644 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-number/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/README.md b/src/filesystem/impls/appshell/node/node_modules/is-number/README.md deleted file mode 100644 index 8395f913179..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-number/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number) - -> Returns true if the value is a number. comprehensive tests. - -To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i is-number --save -``` - -## Usage - -```js -var isNumber = require('is-number'); -``` - -### true - -See the [tests](./test.js) for more examples. - -```js -isNumber(5e3) //=> 'true' -isNumber(0xff) //=> 'true' -isNumber(-1.1) //=> 'true' -isNumber(0) //=> 'true' -isNumber(1) //=> 'true' -isNumber(1.1) //=> 'true' -isNumber(10) //=> 'true' -isNumber(10.10) //=> 'true' -isNumber(100) //=> 'true' -isNumber('-1.1') //=> 'true' -isNumber('0') //=> 'true' -isNumber('012') //=> 'true' -isNumber('0xff') //=> 'true' -isNumber('1') //=> 'true' -isNumber('1.1') //=> 'true' -isNumber('10') //=> 'true' -isNumber('10.10') //=> 'true' -isNumber('100') //=> 'true' -isNumber('5e3') //=> 'true' -isNumber(parseInt('012')) //=> 'true' -isNumber(parseFloat('012')) //=> 'true' -``` - -### False - -See the [tests](./test.js) for more examples. - -```js -isNumber('foo') //=> 'false' -isNumber([1]) //=> 'false' -isNumber([]) //=> 'false' -isNumber(function () {}) //=> 'false' -isNumber(Infinity) //=> 'false' -isNumber(NaN) //=> 'false' -isNumber(new Array('abc')) //=> 'false' -isNumber(new Array(2)) //=> 'false' -isNumber(new Buffer('abc')) //=> 'false' -isNumber(null) //=> 'false' -isNumber(undefined) //=> 'false' -isNumber({abc: 'abc'}) //=> 'false' -``` - -## Other projects - -* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even) -* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even) -* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd) -* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive) -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) -* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues/new). - -## Run tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/index.js b/src/filesystem/impls/appshell/node/node_modules/is-number/index.js deleted file mode 100644 index 96ec66d5e2f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-number/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/*! - * is-number - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var typeOf = require('kind-of'); - -module.exports = function isNumber(num) { - var type = typeOf(num); - if (type !== 'number' && type !== 'string') { - return false; - } - var n = +num; - return (n - n + 1) >= 0 && num !== ''; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-number/package.json b/src/filesystem/impls/appshell/node/node_modules/is-number/package.json deleted file mode 100644 index 43232695f7a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-number/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_args": [ - [ - "is-number@^2.1.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" - ] - ], - "_from": "is-number@>=2.1.0 <3.0.0", - "_id": "is-number@2.1.0", - "_inCache": true, - "_installable": true, - "_location": "/is-number", - "_nodeVersion": "5.0.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "is-number", - "raw": "is-number@^2.1.0", - "rawSpec": "^2.1.0", - "scope": null, - "spec": ">=2.1.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fill-range", - "/randomatic" - ], - "_resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "_shasum": "01fcbbb393463a548f2f466cce16dece49db908f", - "_shrinkwrap": null, - "_spec": "is-number@^2.1.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-number/issues" - }, - "dependencies": { - "kind-of": "^3.0.2" - }, - "description": "Returns true if the value is a number. comprehensive tests.", - "devDependencies": { - "benchmarked": "^0.1.3", - "chalk": "^0.5.1", - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "01fcbbb393463a548f2f466cce16dece49db908f", - "tarball": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "d06c6e2cc048d3cad016cb8dfb055bb14d86fffa", - "homepage": "https://github.com/jonschlinkert/is-number", - "keywords": [ - "check", - "coerce", - "coercion", - "integer", - "is", - "is number", - "is-number", - "istype", - "kind of", - "math", - "number", - "test", - "type", - "typeof", - "value" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - } - ], - "name": "is-number", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-number.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "kind-of", - "is-primitive", - "even", - "odd", - "is-even", - "is-odd" - ] - } - }, - "version": "2.1.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE deleted file mode 100644 index 1e49edf81fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md deleted file mode 100644 index 1d06a4d9e0a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# is-posix-bracket [![NPM version](https://img.shields.io/npm/v/is-posix-bracket.svg?style=flat)](https://www.npmjs.com/package/is-posix-bracket) [![NPM downloads](https://img.shields.io/npm/dm/is-posix-bracket.svg?style=flat)](https://npmjs.org/package/is-posix-bracket) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-posix-bracket.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-posix-bracket) - -> Returns true if the given string is a POSIX bracket expression (POSIX character class). - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install is-posix-bracket --save -``` - -## Usage - -```js -var isPosixBracket = require('is-posix-bracket'); - -isPosixBracket('[foo:]]'); -//=> false -isPosixBracket('[xdigit:]]'); -//=> false -isPosixBracket('[[:xdigit:]]'); -//=> true -isPosixBracket('[[:xdigit:]]'); -//=> true -isPosixBracket('[[:alpha:]123]'); -//=> true -isPosixBracket('[[:alpha:]123]'); -//=> true -isPosixBracket('[a-c[:digit:]x-z]'); -//=> true -isPosixBracket('[:al:]'); -//=> true -isPosixBracket('[abc[:punct:][0-9]'); -//=> true -``` - -## Related projects - -You might also be interested in these projects: - -* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) -* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets) -* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-posix-bracket/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-posix-bracket/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v, on April 05, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js deleted file mode 100644 index 7cf1de55b62..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * is-posix-bracket - * - * Copyright (c) 2015-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isPosixBracket(str) { - return typeof str === 'string' && /\[([:.=+])(?:[^\[\]]|)+\1\]/.test(str); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json b/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json deleted file mode 100644 index 61b6c7d1e66..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-posix-bracket/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - "is-posix-bracket@^0.1.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/expand-brackets" - ] - ], - "_from": "is-posix-bracket@>=0.1.0 <0.2.0", - "_id": "is-posix-bracket@0.1.1", - "_inCache": true, - "_installable": true, - "_location": "/is-posix-bracket", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/is-posix-bracket-0.1.1.tgz_1459834297811_0.5273812564555556" - }, - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "is-posix-bracket", - "raw": "is-posix-bracket@^0.1.0", - "rawSpec": "^0.1.0", - "scope": null, - "spec": ">=0.1.0 <0.2.0", - "type": "range" - }, - "_requiredBy": [ - "/expand-brackets" - ], - "_resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "_shasum": "3334dc79774368e92f016e6fbc0a88f5cd6e6bc4", - "_shrinkwrap": null, - "_spec": "is-posix-bracket@^0.1.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/expand-brackets", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-posix-bracket/issues" - }, - "dependencies": {}, - "description": "Returns true if the given string is a POSIX bracket expression (POSIX character class).", - "devDependencies": { - "gulp-format-md": "^0.1.7", - "mocha": "^2.4.5" - }, - "directories": {}, - "dist": { - "shasum": "3334dc79774368e92f016e6fbc0a88f5cd6e6bc4", - "tarball": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "43972556cfdbb681a15072da75c97952c4e4deba", - "homepage": "https://github.com/jonschlinkert/is-posix-bracket", - "keywords": [ - "braces", - "brackets", - "character", - "character-class", - "class", - "expression", - "posix", - "regex", - "regexp", - "regular" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "is-posix-bracket", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-posix-bracket.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "related": { - "list": [ - "braces", - "expand-brackets", - "is-extglob", - "is-glob", - "micromatch" - ] - }, - "run": true, - "tasks": [ - "readme" - ], - "toc": false - }, - "version": "0.1.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE b/src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE deleted file mode 100644 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-primitive/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md b/src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md deleted file mode 100644 index e1c306428fd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-primitive/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# is-primitive [![NPM version](https://badge.fury.io/js/is-primitive.svg)](http://badge.fury.io/js/is-primitive) [![Build Status](https://travis-ci.org/jonschlinkert/is-primitive.svg)](https://travis-ci.org/jonschlinkert/is-primitive) - -> Returns `true` if the value is a primitive. - -## Install with [npm](npmjs.org) - -```bash -npm i is-primitive --save -``` - -## Running tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - -## Usage - -```js -var isPrimitive = require('is-primitive'); -isPrimitive('abc'); -//=> true - -isPrimitive(42); -//=> true - -isPrimitive(false); -//=> true - -isPrimitive(true); -//=> true - -isPrimitive({}); -//=> false - -isPrimitive([]); -//=> false - -isPrimitive(function(){}); -//=> false -``` - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2014-2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 16, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js b/src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js deleted file mode 100644 index 55f11cf05b4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-primitive/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * is-primitive - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -// see http://jsperf.com/testing-value-is-primitive/7 -module.exports = function isPrimitive(value) { - return value == null || (typeof value !== 'function' && typeof value !== 'object'); -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json b/src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json deleted file mode 100644 index c3b691d9662..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/is-primitive/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - "is-primitive@^2.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache" - ] - ], - "_from": "is-primitive@>=2.0.0 <3.0.0", - "_id": "is-primitive@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/is-primitive", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "is-primitive", - "raw": "is-primitive@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-equal-shallow", - "/regex-cache" - ], - "_resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "_shasum": "207bab91638499c07b2adf240a41a87210034575", - "_shrinkwrap": null, - "_spec": "is-primitive@^2.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/regex-cache", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-primitive/issues" - }, - "dependencies": {}, - "description": "Returns `true` if the value is a primitive. ", - "devDependencies": { - "mocha": "*", - "should": "^4.0.4" - }, - "directories": {}, - "dist": { - "shasum": "207bab91638499c07b2adf240a41a87210034575", - "tarball": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "c512b7c95fb049aa9b1f039ddc0670611b66cce2", - "homepage": "https://github.com/jonschlinkert/is-primitive", - "keywords": [ - "boolean", - "check", - "number", - "primitive", - "string", - "symbol", - "type", - "typeof", - "util" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/is-primitive/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "is-primitive", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/is-primitive.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore b/src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore deleted file mode 100644 index 3c3629e647f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml deleted file mode 100644 index cc4dba29d95..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/Makefile b/src/filesystem/impls/appshell/node/node_modules/isarray/Makefile deleted file mode 100644 index 787d56e1e98..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @node_modules/.bin/tape test.js - -.PHONY: test - diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/README.md b/src/filesystem/impls/appshell/node/node_modules/isarray/README.md deleted file mode 100644 index 16d2c59c619..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/README.md +++ /dev/null @@ -1,60 +0,0 @@ - -# isarray - -`Array#isArray` for older browsers. - -[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) -[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) - -[![browser support](https://ci.testling.com/juliangruber/isarray.png) -](https://ci.testling.com/juliangruber/isarray) - -## Usage - -```js -var isArray = require('isarray'); - -console.log(isArray([])); // => true -console.log(isArray({})); // => false -``` - -## Installation - -With [npm](http://npmjs.org) do - -```bash -$ npm install isarray -``` - -Then bundle for the browser with -[browserify](https://github.com/substack/browserify). - -With [component](http://component.io) do - -```bash -$ component install juliangruber/isarray -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/component.json b/src/filesystem/impls/appshell/node/node_modules/isarray/component.json deleted file mode 100644 index 9e31b683889..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name" : "isarray", - "description" : "Array#isArray for older browsers", - "version" : "0.0.1", - "repository" : "juliangruber/isarray", - "homepage": "https://github.com/juliangruber/isarray", - "main" : "index.js", - "scripts" : [ - "index.js" - ], - "dependencies" : {}, - "keywords": ["browser","isarray","array"], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/index.js b/src/filesystem/impls/appshell/node/node_modules/isarray/index.js deleted file mode 100644 index a57f6349594..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/package.json b/src/filesystem/impls/appshell/node/node_modules/isarray/package.json deleted file mode 100644 index 965800c9d5b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "isarray@1.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/isobject" - ] - ], - "_from": "isarray@1.0.0", - "_id": "isarray@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/isarray", - "_nodeVersion": "5.1.0", - "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" - }, - "_npmVersion": "3.3.12", - "_phantomChildren": {}, - "_requested": { - "name": "isarray", - "raw": "isarray@1.0.0", - "rawSpec": "1.0.0", - "scope": null, - "spec": "1.0.0", - "type": "version" - }, - "_requiredBy": [ - "/isobject", - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "_shrinkwrap": null, - "_spec": "isarray@1.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/isobject", - "author": { - "email": "mail@juliangruber.com", - "name": "Julian Gruber", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/isarray/issues" - }, - "dependencies": {}, - "description": "Array#isArray for older browsers", - "devDependencies": { - "tape": "~2.13.4" - }, - "directories": {}, - "dist": { - "shasum": "bb935d48582cba168c06834957a54a3e07124f11", - "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", - "homepage": "https://github.com/juliangruber/isarray", - "keywords": [ - "browser", - "isarray", - "array" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "julian@juliangruber.com", - "name": "juliangruber" - } - ], - "name": "isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/isarray.git" - }, - "scripts": { - "test": "tape test.js" - }, - "testling": { - "browsers": [ - "ie/8..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ], - "files": "test.js" - }, - "version": "1.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/isarray/test.js b/src/filesystem/impls/appshell/node/node_modules/isarray/test.js deleted file mode 100644 index e0c3444d85d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isarray/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./'); -var test = require('tape'); - -test('is array', function(t){ - t.ok(isArray([])); - t.notOk(isArray({})); - t.notOk(isArray(null)); - t.notOk(isArray(false)); - - var obj = {}; - obj[0] = true; - t.notOk(isArray(obj)); - - var arr = []; - arr.foo = 'bar'; - t.ok(isArray(arr)); - - t.end(); -}); - diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE b/src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE deleted file mode 100644 index 39245ac1c60..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isobject/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/README.md b/src/filesystem/impls/appshell/node/node_modules/isobject/README.md deleted file mode 100644 index 9dd897aa058..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isobject/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](https://travis-ci.org/jonschlinkert/isobject) - -Returns true if the value is an object and not an array or null. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install isobject --save -``` - -Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install isobject -``` - -Install with [bower](http://bower.io/) - -```sh -$ bower install isobject -``` - -## Usage - -```js -var isObject = require('isobject'); -``` - -**True** - -All of the following return `true`: - -```js -isObject({}); -isObject(Object.create({})); -isObject(Object.create(Object.prototype)); -isObject(Object.create(null)); -isObject({}); -isObject(new Foo); -isObject(/foo/); -``` - -**False** - -All of the following return `false`: - -```js -isObject(); -isObject(function () {}); -isObject(1); -isObject([]); -isObject(undefined); -isObject(null); -``` - -## Related projects - -You might also be interested in these projects: - -[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) - -* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object) -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/isobject/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/index.js b/src/filesystem/impls/appshell/node/node_modules/isobject/index.js deleted file mode 100644 index aa0dce0bbad..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isobject/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! - * isobject - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isArray = require('isarray'); - -module.exports = function isObject(val) { - return val != null && typeof val === 'object' && isArray(val) === false; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/isobject/package.json b/src/filesystem/impls/appshell/node/node_modules/isobject/package.json deleted file mode 100644 index 6b2eeb33f35..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/isobject/package.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "_args": [ - [ - "isobject@^2.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" - ] - ], - "_from": "isobject@>=2.0.0 <3.0.0", - "_id": "isobject@2.1.0", - "_inCache": true, - "_installable": true, - "_location": "/isobject", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/isobject-2.1.0.tgz_1461618425262_0.8524945541284978" - }, - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "isobject", - "raw": "isobject@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fill-range" - ], - "_resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "_shasum": "f065561096a3f1da2ef46272f815c840d87e0c89", - "_shrinkwrap": null, - "_spec": "isobject@^2.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/isobject/issues" - }, - "dependencies": { - "isarray": "1.0.0" - }, - "description": "Returns true if the value is an object and not an array or null.", - "devDependencies": { - "gulp-format-md": "^0.1.9", - "mocha": "^2.4.5" - }, - "directories": {}, - "dist": { - "shasum": "f065561096a3f1da2ef46272f815c840d87e0c89", - "tarball": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "d693ec8d31b02b42a19b2d806407a4ecb2f9fb73", - "homepage": "https://github.com/jonschlinkert/isobject", - "keywords": [ - "check", - "is", - "is-object", - "isobject", - "kind", - "kind-of", - "kindof", - "native", - "object", - "type", - "typeof", - "value" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - } - ], - "name": "isobject", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/isobject.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "related": { - "list": [ - "merge-deep", - "extend-shallow", - "is-plain-object", - "kind-of" - ] - }, - "tasks": [ - "readme" - ], - "toc": false - }, - "version": "2.1.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE b/src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE deleted file mode 100644 index 39245ac1c60..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/kind-of/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/README.md b/src/filesystem/impls/appshell/node/node_modules/kind-of/README.md deleted file mode 100644 index 4ac4f18b155..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/kind-of/README.md +++ /dev/null @@ -1,247 +0,0 @@ -# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat)](https://travis-ci.org/jonschlinkert/kind-of) - -Get the native type of a value. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save kind-of -``` - -Install with [bower](http://bower.io/) - -```sh -$ bower install kind-of --save -``` - -## Usage - -> es5, browser and es6 ready - -```js -var kindOf = require('kind-of'); - -kindOf(undefined); -//=> 'undefined' - -kindOf(null); -//=> 'null' - -kindOf(true); -//=> 'boolean' - -kindOf(false); -//=> 'boolean' - -kindOf(new Boolean(true)); -//=> 'boolean' - -kindOf(new Buffer('')); -//=> 'buffer' - -kindOf(42); -//=> 'number' - -kindOf(new Number(42)); -//=> 'number' - -kindOf('str'); -//=> 'string' - -kindOf(new String('str')); -//=> 'string' - -kindOf(arguments); -//=> 'arguments' - -kindOf({}); -//=> 'object' - -kindOf(Object.create(null)); -//=> 'object' - -kindOf(new Test()); -//=> 'object' - -kindOf(new Date()); -//=> 'date' - -kindOf([]); -//=> 'array' - -kindOf([1, 2, 3]); -//=> 'array' - -kindOf(new Array()); -//=> 'array' - -kindOf(/foo/); -//=> 'regexp' - -kindOf(new RegExp('foo')); -//=> 'regexp' - -kindOf(function () {}); -//=> 'function' - -kindOf(function * () {}); -//=> 'function' - -kindOf(new Function()); -//=> 'function' - -kindOf(new Map()); -//=> 'map' - -kindOf(new WeakMap()); -//=> 'weakmap' - -kindOf(new Set()); -//=> 'set' - -kindOf(new WeakSet()); -//=> 'weakset' - -kindOf(Symbol('str')); -//=> 'symbol' - -kindOf(new Int8Array()); -//=> 'int8array' - -kindOf(new Uint8Array()); -//=> 'uint8array' - -kindOf(new Uint8ClampedArray()); -//=> 'uint8clampedarray' - -kindOf(new Int16Array()); -//=> 'int16array' - -kindOf(new Uint16Array()); -//=> 'uint16array' - -kindOf(new Int32Array()); -//=> 'int32array' - -kindOf(new Uint32Array()); -//=> 'uint32array' - -kindOf(new Float32Array()); -//=> 'float32array' - -kindOf(new Float64Array()); -//=> 'float64array' -``` - -## Benchmarks - -Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). -Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. - -```bash -#1: array - current x 23,329,397 ops/sec ±0.82% (94 runs sampled) - lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) - lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) - -#2: boolean - current x 27,197,115 ops/sec ±0.85% (94 runs sampled) - lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) - lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) - -#3: date - current x 20,190,117 ops/sec ±0.86% (92 runs sampled) - lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) - lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) - -#4: function - current x 23,855,460 ops/sec ±0.60% (97 runs sampled) - lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) - lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) - -#5: null - current x 27,061,047 ops/sec ±0.97% (96 runs sampled) - lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) - lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) - -#6: number - current x 25,075,682 ops/sec ±0.53% (99 runs sampled) - lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) - lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) - -#7: object - current x 3,348,980 ops/sec ±0.49% (99 runs sampled) - lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) - lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) - -#8: regex - current x 21,284,827 ops/sec ±0.72% (96 runs sampled) - lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) - lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) - -#9: string - current x 25,379,234 ops/sec ±0.58% (96 runs sampled) - lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) - lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) - -#10: undef - current x 27,459,221 ops/sec ±1.01% (93 runs sampled) - lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) - lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) -``` - -## Optimizations - -In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: - -1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. -2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. -3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` - -## About - -### Related projects - -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") -* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/kind-of/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 29, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/index.js b/src/filesystem/impls/appshell/node/node_modules/kind-of/index.js deleted file mode 100644 index 87938c9a2ba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/kind-of/index.js +++ /dev/null @@ -1,113 +0,0 @@ -var isBuffer = require('is-buffer'); -var toString = Object.prototype.toString; - -/** - * Get the native `typeof` a value. - * - * @param {*} `val` - * @return {*} Native javascript type - */ - -module.exports = function kindOf(val) { - // primitivies - if (typeof val === 'undefined') { - return 'undefined'; - } - if (val === null) { - return 'null'; - } - if (val === true || val === false || val instanceof Boolean) { - return 'boolean'; - } - if (typeof val === 'string' || val instanceof String) { - return 'string'; - } - if (typeof val === 'number' || val instanceof Number) { - return 'number'; - } - - // functions - if (typeof val === 'function' || val instanceof Function) { - return 'function'; - } - - // array - if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { - return 'array'; - } - - // check for instances of RegExp and Date before calling `toString` - if (val instanceof RegExp) { - return 'regexp'; - } - if (val instanceof Date) { - return 'date'; - } - - // other objects - var type = toString.call(val); - - if (type === '[object RegExp]') { - return 'regexp'; - } - if (type === '[object Date]') { - return 'date'; - } - if (type === '[object Arguments]') { - return 'arguments'; - } - - // buffer - if (typeof Buffer !== 'undefined' && isBuffer(val)) { - return 'buffer'; - } - - // es6: Map, WeakMap, Set, WeakSet - if (type === '[object Set]') { - return 'set'; - } - if (type === '[object WeakSet]') { - return 'weakset'; - } - if (type === '[object Map]') { - return 'map'; - } - if (type === '[object WeakMap]') { - return 'weakmap'; - } - if (type === '[object Symbol]') { - return 'symbol'; - } - - // typed arrays - if (type === '[object Int8Array]') { - return 'int8array'; - } - if (type === '[object Uint8Array]') { - return 'uint8array'; - } - if (type === '[object Uint8ClampedArray]') { - return 'uint8clampedarray'; - } - if (type === '[object Int16Array]') { - return 'int16array'; - } - if (type === '[object Uint16Array]') { - return 'uint16array'; - } - if (type === '[object Int32Array]') { - return 'int32array'; - } - if (type === '[object Uint32Array]') { - return 'uint32array'; - } - if (type === '[object Float32Array]') { - return 'float32array'; - } - if (type === '[object Float64Array]') { - return 'float64array'; - } - - // must be a plain object - return 'object'; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/kind-of/package.json b/src/filesystem/impls/appshell/node/node_modules/kind-of/package.json deleted file mode 100644 index 394718a038d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/kind-of/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "_args": [ - [ - "kind-of@^3.0.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "kind-of@>=3.0.2 <4.0.0", - "_id": "kind-of@3.0.4", - "_inCache": true, - "_installable": true, - "_location": "/kind-of", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/kind-of-3.0.4.tgz_1469811230830_0.8813814013265073" - }, - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "name": "kind-of", - "raw": "kind-of@^3.0.2", - "rawSpec": "^3.0.2", - "scope": null, - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/is-number", - "/micromatch", - "/randomatic" - ], - "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", - "_shasum": "7b8ecf18a4e17f8269d73b501c9f232c96887a74", - "_shrinkwrap": null, - "_spec": "kind-of@^3.0.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/kind-of/issues" - }, - "dependencies": { - "is-buffer": "^1.0.2" - }, - "description": "Get the native type of a value.", - "devDependencies": { - "ansi-bold": "^0.1.1", - "benchmarked": "^0.2.5", - "browserify": "^13.1.0", - "glob": "^7.0.5", - "gulp-format-md": "^0.1.9", - "mocha": "^2.5.3", - "type-of": "^2.0.1", - "typeof": "^1.0.0" - }, - "directories": {}, - "dist": { - "shasum": "7b8ecf18a4e17f8269d73b501c9f232c96887a74", - "tarball": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "LICENSE", - "README.md" - ], - "gitHead": "8f93765a6bbbe350e1ba68e790d1ff337b91331a", - "homepage": "https://github.com/jonschlinkert/kind-of", - "keywords": [ - "arguments", - "array", - "boolean", - "check", - "date", - "function", - "is", - "is-type", - "is-type-of", - "kind", - "kind-of", - "number", - "object", - "of", - "regexp", - "string", - "test", - "type", - "type-of", - "typeof", - "types" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - } - ], - "name": "kind-of", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/kind-of.git" - }, - "scripts": { - "prepublish": "browserify -o browser.js -e index.js -s index --bare", - "test": "mocha" - }, - "verb": { - "layout": "default", - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "related": { - "list": [ - "is-glob", - "is-number", - "is-primitive" - ] - }, - "tasks": [ - "readme" - ], - "toc": false - }, - "version": "3.0.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE deleted file mode 100755 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/README.md b/src/filesystem/impls/appshell/node/node_modules/micromatch/README.md deleted file mode 100644 index 8fb391910c5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/README.md +++ /dev/null @@ -1,689 +0,0 @@ -# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Build Status](https://img.shields.io/travis/jonschlinkert/micromatch.svg?style=flat)](https://travis-ci.org/jonschlinkert/micromatch) - -> Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. - -Micromatch supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch). - -* [mm()](#usage) is the same as [multimatch()](https://github.com/sindresorhus/multimatch) -* [mm.match()](#match) is the same as [minimatch.match()](https://github.com/isaacs/minimatch) -* use [mm.isMatch()](#ismatch) instead of [minimatch()](https://github.com/isaacs/minimatch) - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save micromatch -``` - -## Start matching! - -```js -var mm = require('micromatch'); -console.log(mm([''])) -``` - -*** - -### Features - -* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) -* Built-in support for multiple glob patterns, like `['foo/*.js', '!bar.js']` -* [Brace Expansion](https://github.com/jonschlinkert/braces) (`foo/bar-{1..5}.md`, `one/{two,three}/four.md`) -* Typical glob patterns, like `**/*`, `a/b/*.js`, or `['foo/*.js', '!bar.js']` -* Methods like `.isMatch()`, `.contains()` and `.any()` - -**Extended globbing features:** - -* Logical `OR` (`foo/bar/(abc|xyz).js`) -* Regex character classes (`foo/bar/baz-[1-5].js`) -* POSIX [bracket expressions](https://github.com/jonschlinkert/expand-brackets) (`**/[[:alpha:][:digit:]]/`) -* [extglobs](https://github.com/jonschlinkert/extglob) (`**/+(x|y)`, `!(a|b)`, etc). - -You can combine these to create whatever matching patterns you need. - -**Example** - -```js -// double-negation! -mm(['fa', 'fb', 'f', 'fo'], '!(f!(o))'); -//=> ['fo'] -``` - -## Why switch to micromatch? - -* Native support for multiple glob patterns, no need for wrappers like [multimatch](https://github.com/sindresorhus/multimatch) -* [10-55x faster](#benchmarks) and more performant than [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch). This is achieved through a combination of caching and regex optimization strategies, a fundamentally different approach than minimatch. -* More extensive support for the Bash 4.3 specification -* More complete extglob support -* Extensive [unit tests](./test) (approx. 1,300 tests). Minimatch fails many of the tests. - -### Switch from minimatch - -Use `mm.isMatch()` instead of `minimatch()`: - -```js -mm.isMatch('foo', 'b*'); -//=> false -``` - -Use `mm.match()` instead of `minimatch.match()`: - -```js -mm.match(['foo', 'bar'], 'b*'); -//=> 'bar' -``` - -### Switch from multimatch - -Same signature: - -```js -mm(['foo', 'bar', 'baz'], ['f*', '*z']); -//=> ['foo', 'baz'] -``` - -*** - -## Usage - -Add micromatch to your node.js project: - -```js -var mm = require('micromatch'); -``` - -**Signature** - -```js -mm(array_of_strings, glob_patterns[, options]); -``` - -**Example** - -```js -mm(['foo', 'bar', 'baz'], 'b*'); -//=> ['bar', 'baz'] -``` - -### Usage examples - -**Brace expansion** - -Match files with `.js` or `.txt` extensions. - -```js -mm(['a.js', 'b.md', 'c.txt'], '*.{js,txt}'); -//=> ['a.js', 'c.txt'] -``` - -**Extglobs** - -Match anything except for files with the `.md` extension. - -```js -mm(files, '**/*.!(md)'); - -//=> ['a.js', 'c.txt'] -``` - -**Multiple patterns** - -Match using an array of patterns. - -```js -mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.md', '*.txt']); -//=> ['a.md', 'c.txt'] -``` - -**Negation patterns:** - -Behavior is designed to be what users would expect, based on conventions that are already well-established. - -* [minimatch](https://github.com/isaacs/minimatch) behavior is used when the pattern is a string, so patterns are **inclusive by default**. -* [multimatch](https://github.com/sindresorhus/multimatch) behavior is used when an array of patterns is passed, so patterns are **exclusive by default**. - -```js -mm(['a.js', 'b.md', 'c.txt'], '!*.{js,txt}'); -//=> ['b.md'] - -mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.*', '!*.{js,txt}']); -//=> ['a.md', 'd.json'] -``` - -*** - -## API methods - -```js -var mm = require('micromatch'); -``` - -### .match - -```js -mm.match(array, globString); -``` - -Return an array of files that match the given glob pattern. Useful if you only need to use a single glob pattern. - -**Example** - -```js -mm.match(['ab', 'a/b', 'bb', 'b/c'], '?b'); -//=> ['ab', 'bb'] - -mm.match(['ab', 'a/b', 'bb', 'b/c'], '*/b'); -//=> ['a/b'] -``` - -### .isMatch - -```js -mm.isMatch(filepath, globString); -``` - -Returns true if a file path matches the given glob pattern. - -**Example** - -```js -mm.isMatch('.verb.md', '*.md'); -//=> false - -mm.isMatch('.verb.md', '*.md', {dot: true}); -//=> true -``` - -### .contains - -Returns true if any part of a file path matches the given glob pattern. Think of this is "has path" versus "is path". - -**Example** - -`.isMatch()` would return false for both of the following: - -```js -mm.contains('a/b/c', 'a/b'); -//=> true - -mm.contains('a/b/c', 'a/*'); -//=> true -``` - -### .matcher - -Returns a function for matching using the supplied pattern. e.g. create your own "matcher". The advantage of this method is that the pattern can be compiled outside of a loop. - -**Pattern** - -Can be any of the following: - -* `glob/string` -* `regex` -* `function` - -**Example** - -```js -var isMatch = mm.matcher('*.md'); -var files = []; - -['a.md', 'b.txt', 'c.md'].forEach(function(fp) { - if (isMatch(fp)) { - files.push(fp); - } -}); -``` - -### .filter - -Returns a function that can be passed to `Array#filter()`. - -**Params** - -* `patterns` **{String|Array}**: - -**Examples** - -Single glob: - -```js -var fn = mm.filter('*.md'); -['a.js', 'b.txt', 'c.md'].filter(fn); -//=> ['c.md'] - -var fn = mm.filter('[a-c]'); -['a', 'b', 'c', 'd', 'e'].filter(fn); -//=> ['a', 'b', 'c'] -``` - -Array of glob patterns: - -```js -var arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; - -var fn = mm.filter(['{1..10}', '![7-9]', '!{3..4}']); -arr.filter(fn); -//=> [1, 2, 5, 6, 10] -``` - -_(Internally this function generates the matching function by using the [matcher](#matcher) method. You can use the [matcher](#matcher) method directly to create your own filter function)_ - -### .any - -Returns true if a file path matches any of the given patterns. - -```js -mm.any(filepath, patterns, options); -``` - -**Params** - -* filepath `{String}`: The file path to test. -* patterns `{String|Array}`: One or more glob patterns -* options: `{Object}`: options to pass to the `.matcher()` method. - -**Example** - -```js -mm.any('abc', ['!*z']); -//=> true -mm.any('abc', ['a*', 'z*']); -//=> true -mm.any('abc', 'a*'); -//=> true -mm.any('abc', ['z*']); -//=> false -``` - -### .expand - -Returns an object with a regex-compatible string and tokens. - -```js -mm.expand('*.js'); - -// when `track` is enabled (for debugging), the `history` array is used -// to record each mutation to the glob pattern as it's converted to regex -{ options: { track: false, dot: undefined, makeRe: true, negated: false }, - pattern: '(.*\\/|^)bar\\/(?:(?!(?:^|\\/)\\.).)*?', - history: [], - tokens: - { path: - { whole: '**/bar/**', - dirname: '**/bar/', - filename: '**', - basename: '**', - extname: '', - ext: '' }, - is: - { glob: true, - negated: false, - globstar: true, - dotfile: false, - dotdir: false }, - match: {}, - original: '**/bar/**', - pattern: '**/bar/**', - base: '' } } -``` - -### .makeRe - -Create a regular expression for matching file paths based on the given pattern: - -```js -mm.makeRe('*.js'); -//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ -``` - -## Options - -### options.unixify - -Normalize slashes in file paths and glob patterns to forward slashes. - -Type: `{Boolean}` - -Default: `undefined` on non-windows, `true` on windows. - -### options.dot - -Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch). - -Type: `{Boolean}` - -Default: `false` - -### options.unescape - -Unescape slashes in glob patterns. Use cautiously, especially on windows. - -Type: `{Boolean}` - -Default: `undefined` - -**Example** - -```js -mm.isMatch('abc', '\\a\\b\\c', {unescape: true}); -//=> true -``` - -### options.nodupes - -Remove duplicate elements from the result array. - -Type: `{Boolean}` - -Default: `undefined` - -**Example** - -Example of using the `unescape` and `nodupes` options together: - -```js -mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true}); -//=> ['abc', 'abc'] - -mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true, nodupes: true}); -//=> ['abc'] -``` - -### options.matchBase - -Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch). - -Type: `{Boolean}` - -Default: `false` - -**Example** - -```js -mm(['a/b.js', 'a/c.md'], '*.js'); -//=> [] - -mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true}); -//=> ['a/b.js'] -``` - -### options.nobraces - -Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) `nobrace`. - -Type: `{Boolean}` - -Default: `undefined` - -See [braces](https://github.com/jonschlinkert/braces) for more information about extended brace expansion. - -### options.nobrackets - -Don't expand POSIX bracket expressions. - -Type: `{Boolean}` - -Default: `undefined` - -See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. - -### options.noextglob - -Don't expand extended globs. - -Type: `{Boolean}` - -Default: `undefined` - -See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. - -### options.nocase - -Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). - -Type: `{Boolean}` - -Default: `false` - -### options.nonegate - -Disallow negation (`!`) patterns. - -Type: `{Boolean}` - -Default: `false` - -### options.nonull - -If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch). - -Type: `{Boolean}` - -Default: `false` - -### options.cache - -Cache the platform (e.g. `win32`) to prevent this from being looked up for every filepath. - -Type: `{Boolean}` - -Default: `true` - -*** - -## Other features - -Micromatch also supports the following. - -### Extended globbing - -#### extglobs - -Extended globbing, as described by the bash man page: - -| **pattern** | **regex equivalent** | **description** | -| --- | --- | --- | -| `?(pattern-list)` | `(... | ...)?` | Matches zero or one occurrence of the given patterns | -| `*(pattern-list)` | `(... | ...)*` | Matches zero or more occurrences of the given patterns | -| `+(pattern-list)` | `(... | ...)+` | Matches one or more occurrences of the given patterns | -| `@(pattern-list)` | `(... | ...)` * | Matches one of the given patterns | -| `!(pattern-list)` | N/A | Matches anything except one of the given patterns | - -* `@` isn't a RegEx character. - -Powered by [extglob](https://github.com/jonschlinkert/extglob). Visit that library for the full range of options or to report extglob related issues. - -See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs. - -#### brace expansion - -In simple cases, brace expansion appears to work the same way as the logical `OR` operator. For example, `(a|b)` will achieve the same result as `{a,b}`. - -Here are some powerful features unique to brace expansion (versus character classes): - -* range expansion: `a{1..3}b/*.js` expands to: `['a1b/*.js', 'a2b/*.js', 'a3b/*.js']` -* nesting: `a{c,{d,e}}b/*.js` expands to: `['acb/*.js', 'adb/*.js', 'aeb/*.js']` - -Visit [braces](https://github.com/jonschlinkert/braces) to ask questions and create an issue related to brace-expansion, or to see the full range of features and options related to brace expansion. - -#### regex character classes - -With the exception of brace expansion (`{a,b}`, `{1..5}`, etc), most of the special characters convert directly to regex, so you can expect them to follow the same rules and produce the same results as regex. - -For example, given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: - -* `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']` -* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` -* `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']` -* `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']` - -Learn about [regex character classes](http://www.regular-expressions.info/charclass.html). - -#### regex groups - -Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`: - -* `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']` -* `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']` -* `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']` - -As with regex, parenthese can be nested, so patterns like `((a|b)|c)/b` will work. But it might be easier to achieve your goal using brace expansion. - -#### POSIX bracket expressions - -**Example** - -```js -mm.isMatch('a1', '[[:alpha:][:digit:]]'); -//=> true -``` - -See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions. - -*** - -## Notes - -Whenever possible parsing behavior for patterns is based on globbing specifications in Bash 4.3. Patterns that aren't described by Bash follow wildmatch spec (used by git). - -## Benchmarks - -Run the [benchmarks](./benchmark): - -```bash -node benchmark -``` - -As of July 15, 2016: - -```bash -#1: basename-braces - micromatch x 26,420 ops/sec ±0.89% (91 runs sampled) - minimatch x 3,507 ops/sec ±0.64% (97 runs sampled) - -#2: basename - micromatch x 25,315 ops/sec ±0.82% (93 runs sampled) - minimatch x 4,398 ops/sec ±0.86% (94 runs sampled) - -#3: braces-no-glob - micromatch x 341,254 ops/sec ±0.78% (93 runs sampled) - minimatch x 30,197 ops/sec ±1.12% (91 runs sampled) - -#4: braces - micromatch x 54,649 ops/sec ±0.74% (94 runs sampled) - minimatch x 3,095 ops/sec ±0.82% (95 runs sampled) - -#5: immediate - micromatch x 16,719 ops/sec ±0.79% (95 runs sampled) - minimatch x 4,348 ops/sec ±0.86% (96 runs sampled) - -#6: large - micromatch x 721 ops/sec ±0.77% (94 runs sampled) - minimatch x 17.73 ops/sec ±1.08% (50 runs sampled) - -#7: long - micromatch x 5,051 ops/sec ±0.87% (97 runs sampled) - minimatch x 628 ops/sec ±0.83% (94 runs sampled) - -#8: mid - micromatch x 51,280 ops/sec ±0.80% (95 runs sampled) - minimatch x 1,923 ops/sec ±0.84% (95 runs sampled) - -#9: multi-patterns - micromatch x 22,440 ops/sec ±0.97% (94 runs sampled) - minimatch x 2,481 ops/sec ±1.10% (94 runs sampled) - -#10: no-glob - micromatch x 722,823 ops/sec ±1.30% (87 runs sampled) - minimatch x 52,967 ops/sec ±1.09% (94 runs sampled) - -#11: range - micromatch x 243,471 ops/sec ±0.79% (94 runs sampled) - minimatch x 11,736 ops/sec ±0.82% (96 runs sampled) - -#12: shallow - micromatch x 190,874 ops/sec ±0.98% (95 runs sampled) - minimatch x 21,699 ops/sec ±0.81% (97 runs sampled) - -#13: short - micromatch x 496,393 ops/sec ±3.86% (90 runs sampled) - minimatch x 53,765 ops/sec ±0.75% (95 runs sampled) -``` - -## Tests - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Coverage - -As of July 15, 2016: - -```sh -Statements : 100% (441/441) -Branches : 100% (270/270) -Functions : 100% (54/54) -Lines : 100% (429/429) -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -Please be sure to run the benchmarks before/after any code changes to judge the impact before you do a PR. thanks! - -## Related - -* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.") -* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") -* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.") -* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.") -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.") -* [gulp-micromatch](https://www.npmjs.com/package/gulp-micromatch): Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream. | [homepage](https://github.com/tunnckocore/gulp-micromatch#readme "Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [parse-glob](https://www.npmjs.com/package/parse-glob): Parse a glob pattern into an object of tokens. | [homepage](https://github.com/jonschlinkert/parse-glob "Parse a glob pattern into an object of tokens.") - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -## Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/micromatch/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 15, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/index.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/index.js deleted file mode 100755 index f898ec176ba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/index.js +++ /dev/null @@ -1,431 +0,0 @@ -/*! - * micromatch - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var expand = require('./lib/expand'); -var utils = require('./lib/utils'); - -/** - * The main function. Pass an array of filepaths, - * and a string or array of glob patterns - * - * @param {Array|String} `files` - * @param {Array|String} `patterns` - * @param {Object} `opts` - * @return {Array} Array of matches - */ - -function micromatch(files, patterns, opts) { - if (!files || !patterns) return []; - opts = opts || {}; - - if (typeof opts.cache === 'undefined') { - opts.cache = true; - } - - if (!Array.isArray(patterns)) { - return match(files, patterns, opts); - } - - var len = patterns.length, i = 0; - var omit = [], keep = []; - - while (len--) { - var glob = patterns[i++]; - if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) { - omit.push.apply(omit, match(files, glob.slice(1), opts)); - } else { - keep.push.apply(keep, match(files, glob, opts)); - } - } - return utils.diff(keep, omit); -} - -/** - * Return an array of files that match the given glob pattern. - * - * This function is called by the main `micromatch` function If you only - * need to pass a single pattern you might get very minor speed improvements - * using this function. - * - * @param {Array} `files` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Array} - */ - -function match(files, pattern, opts) { - if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { - throw new Error(msg('match', 'files', 'a string or array')); - } - - files = utils.arrayify(files); - opts = opts || {}; - - var negate = opts.negate || false; - var orig = pattern; - - if (typeof pattern === 'string') { - negate = pattern.charAt(0) === '!'; - if (negate) { - pattern = pattern.slice(1); - } - - // we need to remove the character regardless, - // so the above logic is still needed - if (opts.nonegate === true) { - negate = false; - } - } - - var _isMatch = matcher(pattern, opts); - var len = files.length, i = 0; - var res = []; - - while (i < len) { - var file = files[i++]; - var fp = utils.unixify(file, opts); - - if (!_isMatch(fp)) { continue; } - res.push(fp); - } - - if (res.length === 0) { - if (opts.failglob === true) { - throw new Error('micromatch.match() found no matches for: "' + orig + '".'); - } - - if (opts.nonull || opts.nullglob) { - res.push(utils.unescapeGlob(orig)); - } - } - - // if `negate` was defined, diff negated files - if (negate) { res = utils.diff(files, res); } - - // if `ignore` was defined, diff ignored filed - if (opts.ignore && opts.ignore.length) { - pattern = opts.ignore; - opts = utils.omit(opts, ['ignore']); - res = utils.diff(res, micromatch(res, pattern, opts)); - } - - if (opts.nodupes) { - return utils.unique(res); - } - return res; -} - -/** - * Returns a function that takes a glob pattern or array of glob patterns - * to be used with `Array#filter()`. (Internally this function generates - * the matching function using the [matcher] method). - * - * ```js - * var fn = mm.filter('[a-c]'); - * ['a', 'b', 'c', 'd', 'e'].filter(fn); - * //=> ['a', 'b', 'c'] - * ``` - * @param {String|Array} `patterns` Can be a glob or array of globs. - * @param {Options} `opts` Options to pass to the [matcher] method. - * @return {Function} Filter function to be passed to `Array#filter()`. - */ - -function filter(patterns, opts) { - if (!Array.isArray(patterns) && typeof patterns !== 'string') { - throw new TypeError(msg('filter', 'patterns', 'a string or array')); - } - - patterns = utils.arrayify(patterns); - var len = patterns.length, i = 0; - var patternMatchers = Array(len); - while (i < len) { - patternMatchers[i] = matcher(patterns[i++], opts); - } - - return function(fp) { - if (fp == null) return []; - var len = patternMatchers.length, i = 0; - var res = true; - - fp = utils.unixify(fp, opts); - while (i < len) { - var fn = patternMatchers[i++]; - if (!fn(fp)) { - res = false; - break; - } - } - return res; - }; -} - -/** - * Returns true if the filepath contains the given - * pattern. Can also return a function for matching. - * - * ```js - * isMatch('foo.md', '*.md', {}); - * //=> true - * - * isMatch('*.md', {})('foo.md') - * //=> true - * ``` - * @param {String} `fp` - * @param {String} `pattern` - * @param {Object} `opts` - * @return {Boolean} - */ - -function isMatch(fp, pattern, opts) { - if (typeof fp !== 'string') { - throw new TypeError(msg('isMatch', 'filepath', 'a string')); - } - - fp = utils.unixify(fp, opts); - if (utils.typeOf(pattern) === 'object') { - return matcher(fp, pattern); - } - return matcher(pattern, opts)(fp); -} - -/** - * Returns true if the filepath matches the - * given pattern. - */ - -function contains(fp, pattern, opts) { - if (typeof fp !== 'string') { - throw new TypeError(msg('contains', 'pattern', 'a string')); - } - - opts = opts || {}; - opts.contains = (pattern !== ''); - fp = utils.unixify(fp, opts); - - if (opts.contains && !utils.isGlob(pattern)) { - return fp.indexOf(pattern) !== -1; - } - return matcher(pattern, opts)(fp); -} - -/** - * Returns true if a file path matches any of the - * given patterns. - * - * @param {String} `fp` The filepath to test. - * @param {String|Array} `patterns` Glob patterns to use. - * @param {Object} `opts` Options to pass to the `matcher()` function. - * @return {String} - */ - -function any(fp, patterns, opts) { - if (!Array.isArray(patterns) && typeof patterns !== 'string') { - throw new TypeError(msg('any', 'patterns', 'a string or array')); - } - - patterns = utils.arrayify(patterns); - var len = patterns.length; - - fp = utils.unixify(fp, opts); - while (len--) { - var isMatch = matcher(patterns[len], opts); - if (isMatch(fp)) { - return true; - } - } - return false; -} - -/** - * Filter the keys of an object with the given `glob` pattern - * and `options` - * - * @param {Object} `object` - * @param {Pattern} `object` - * @return {Array} - */ - -function matchKeys(obj, glob, options) { - if (utils.typeOf(obj) !== 'object') { - throw new TypeError(msg('matchKeys', 'first argument', 'an object')); - } - - var fn = matcher(glob, options); - var res = {}; - - for (var key in obj) { - if (obj.hasOwnProperty(key) && fn(key)) { - res[key] = obj[key]; - } - } - return res; -} - -/** - * Return a function for matching based on the - * given `pattern` and `options`. - * - * @param {String} `pattern` - * @param {Object} `options` - * @return {Function} - */ - -function matcher(pattern, opts) { - // pattern is a function - if (typeof pattern === 'function') { - return pattern; - } - // pattern is a regex - if (pattern instanceof RegExp) { - return function(fp) { - return pattern.test(fp); - }; - } - - if (typeof pattern !== 'string') { - throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); - } - - // strings, all the way down... - pattern = utils.unixify(pattern, opts); - - // pattern is a non-glob string - if (!utils.isGlob(pattern)) { - return utils.matchPath(pattern, opts); - } - // pattern is a glob string - var re = makeRe(pattern, opts); - - // `matchBase` is defined - if (opts && opts.matchBase) { - return utils.hasFilename(re, opts); - } - // `matchBase` is not defined - return function(fp) { - fp = utils.unixify(fp, opts); - return re.test(fp); - }; -} - -/** - * Create and cache a regular expression for matching - * file paths. - * - * If the leading character in the `glob` is `!`, a negation - * regex is returned. - * - * @param {String} `glob` - * @param {Object} `options` - * @return {RegExp} - */ - -function toRegex(glob, options) { - // clone options to prevent mutating the original object - var opts = Object.create(options || {}); - var flags = opts.flags || ''; - if (opts.nocase && flags.indexOf('i') === -1) { - flags += 'i'; - } - - var parsed = expand(glob, opts); - - // pass in tokens to avoid parsing more than once - opts.negated = opts.negated || parsed.negated; - opts.negate = opts.negated; - glob = wrapGlob(parsed.pattern, opts); - var re; - - try { - re = new RegExp(glob, flags); - return re; - } catch (err) { - err.reason = 'micromatch invalid regex: (' + re + ')'; - if (opts.strict) throw new SyntaxError(err); - } - - // we're only here if a bad pattern was used and the user - // passed `options.silent`, so match nothing - return /$^/; -} - -/** - * Create the regex to do the matching. If the leading - * character in the `glob` is `!` a negation regex is returned. - * - * @param {String} `glob` - * @param {Boolean} `negate` - */ - -function wrapGlob(glob, opts) { - var prefix = (opts && !opts.contains) ? '^' : ''; - var after = (opts && !opts.contains) ? '$' : ''; - glob = ('(?:' + glob + ')' + after); - if (opts && opts.negate) { - return prefix + ('(?!^' + glob + ').*$'); - } - return prefix + glob; -} - -/** - * Create and cache a regular expression for matching file paths. - * If the leading character in the `glob` is `!`, a negation - * regex is returned. - * - * @param {String} `glob` - * @param {Object} `options` - * @return {RegExp} - */ - -function makeRe(glob, opts) { - if (utils.typeOf(glob) !== 'string') { - throw new Error(msg('makeRe', 'glob', 'a string')); - } - return utils.cache(toRegex, glob, opts); -} - -/** - * Make error messages consistent. Follows this format: - * - * ```js - * msg(methodName, argNumber, nativeType); - * // example: - * msg('matchKeys', 'first', 'an object'); - * ``` - * - * @param {String} `method` - * @param {String} `num` - * @param {String} `type` - * @return {String} - */ - -function msg(method, what, type) { - return 'micromatch.' + method + '(): ' + what + ' should be ' + type + '.'; -} - -/** - * Public methods - */ - -/* eslint no-multi-spaces: 0 */ -micromatch.any = any; -micromatch.braces = micromatch.braceExpand = utils.braces; -micromatch.contains = contains; -micromatch.expand = expand; -micromatch.filter = filter; -micromatch.isMatch = isMatch; -micromatch.makeRe = makeRe; -micromatch.match = match; -micromatch.matcher = matcher; -micromatch.matchKeys = matchKeys; - -/** - * Expose `micromatch` - */ - -module.exports = micromatch; diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js deleted file mode 100644 index a1ffe371418..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/chars.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -var chars = {}, unesc, temp; - -function reverse(object, prepender) { - return Object.keys(object).reduce(function(reversed, key) { - var newKey = prepender ? prepender + key : key; // Optionally prepend a string to key. - reversed[object[key]] = newKey; // Swap key and value. - return reversed; // Return the result. - }, {}); -} - -/** - * Regex for common characters - */ - -chars.escapeRegex = { - '?': /\?/g, - '@': /\@/g, - '!': /\!/g, - '+': /\+/g, - '*': /\*/g, - '(': /\(/g, - ')': /\)/g, - '[': /\[/g, - ']': /\]/g -}; - -/** - * Escape characters - */ - -chars.ESC = { - '?': '__UNESC_QMRK__', - '@': '__UNESC_AMPE__', - '!': '__UNESC_EXCL__', - '+': '__UNESC_PLUS__', - '*': '__UNESC_STAR__', - ',': '__UNESC_COMMA__', - '(': '__UNESC_LTPAREN__', - ')': '__UNESC_RTPAREN__', - '[': '__UNESC_LTBRACK__', - ']': '__UNESC_RTBRACK__' -}; - -/** - * Unescape characters - */ - -chars.UNESC = unesc || (unesc = reverse(chars.ESC, '\\')); - -chars.ESC_TEMP = { - '?': '__TEMP_QMRK__', - '@': '__TEMP_AMPE__', - '!': '__TEMP_EXCL__', - '*': '__TEMP_STAR__', - '+': '__TEMP_PLUS__', - ',': '__TEMP_COMMA__', - '(': '__TEMP_LTPAREN__', - ')': '__TEMP_RTPAREN__', - '[': '__TEMP_LTBRACK__', - ']': '__TEMP_RTBRACK__' -}; - -chars.TEMP = temp || (temp = reverse(chars.ESC_TEMP)); - -module.exports = chars; diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js deleted file mode 100644 index e99b081eb56..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/expand.js +++ /dev/null @@ -1,304 +0,0 @@ -/*! - * micromatch - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var utils = require('./utils'); -var Glob = require('./glob'); - -/** - * Expose `expand` - */ - -module.exports = expand; - -/** - * Expand a glob pattern to resolve braces and - * similar patterns before converting to regex. - * - * @param {String|Array} `pattern` - * @param {Array} `files` - * @param {Options} `opts` - * @return {Array} - */ - -function expand(pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('micromatch.expand(): argument should be a string.'); - } - - var glob = new Glob(pattern, options || {}); - var opts = glob.options; - - if (!utils.isGlob(pattern)) { - glob.pattern = glob.pattern.replace(/([\/.])/g, '\\$1'); - return glob; - } - - glob.pattern = glob.pattern.replace(/(\+)(?!\()/g, '\\$1'); - glob.pattern = glob.pattern.split('$').join('\\$'); - - if (typeof opts.braces !== 'boolean' && typeof opts.nobraces !== 'boolean') { - opts.braces = true; - } - - if (glob.pattern === '.*') { - return { - pattern: '\\.' + star, - tokens: tok, - options: opts - }; - } - - if (glob.pattern === '*') { - return { - pattern: oneStar(opts.dot), - tokens: tok, - options: opts - }; - } - - // parse the glob pattern into tokens - glob.parse(); - var tok = glob.tokens; - tok.is.negated = opts.negated; - - // dotfile handling - if ((opts.dotfiles === true || tok.is.dotfile) && opts.dot !== false) { - opts.dotfiles = true; - opts.dot = true; - } - - if ((opts.dotdirs === true || tok.is.dotdir) && opts.dot !== false) { - opts.dotdirs = true; - opts.dot = true; - } - - // check for braces with a dotfile pattern - if (/[{,]\./.test(glob.pattern)) { - opts.makeRe = false; - opts.dot = true; - } - - if (opts.nonegate !== true) { - opts.negated = glob.negated; - } - - // if the leading character is a dot or a slash, escape it - if (glob.pattern.charAt(0) === '.' && glob.pattern.charAt(1) !== '/') { - glob.pattern = '\\' + glob.pattern; - } - - /** - * Extended globs - */ - - // expand braces, e.g `{1..5}` - glob.track('before braces'); - if (tok.is.braces) { - glob.braces(); - } - glob.track('after braces'); - - // expand extglobs, e.g `foo/!(a|b)` - glob.track('before extglob'); - if (tok.is.extglob) { - glob.extglob(); - } - glob.track('after extglob'); - - // expand brackets, e.g `[[:alpha:]]` - glob.track('before brackets'); - if (tok.is.brackets) { - glob.brackets(); - } - glob.track('after brackets'); - - // special patterns - glob._replace('[!', '[^'); - glob._replace('(?', '(%~'); - glob._replace(/\[\]/, '\\[\\]'); - glob._replace('/[', '/' + (opts.dot ? dotfiles : nodot) + '[', true); - glob._replace('/?', '/' + (opts.dot ? dotfiles : nodot) + '[^/]', true); - glob._replace('/.', '/(?=.)\\.', true); - - // windows drives - glob._replace(/^(\w):([\\\/]+?)/gi, '(?=.)$1:$2', true); - - // negate slashes in exclusion ranges - if (glob.pattern.indexOf('[^') !== -1) { - glob.pattern = negateSlash(glob.pattern); - } - - if (opts.globstar !== false && glob.pattern === '**') { - glob.pattern = globstar(opts.dot); - - } else { - glob.pattern = balance(glob.pattern, '[', ']'); - glob.escape(glob.pattern); - - // if the pattern has `**` - if (tok.is.globstar) { - glob.pattern = collapse(glob.pattern, '/**'); - glob.pattern = collapse(glob.pattern, '**/'); - glob._replace('/**/', '(?:/' + globstar(opts.dot) + '/|/)', true); - glob._replace(/\*{2,}/g, '**'); - - // 'foo/*' - glob._replace(/(\w+)\*(?!\/)/g, '$1[^/]*?', true); - glob._replace(/\*\*\/\*(\w)/g, globstar(opts.dot) + '\\/' + (opts.dot ? dotfiles : nodot) + '[^/]*?$1', true); - - if (opts.dot !== true) { - glob._replace(/\*\*\/(.)/g, '(?:**\\/|)$1'); - } - - // 'foo/**' or '{**,*}', but not 'foo**' - if (tok.path.dirname !== '' || /,\*\*|\*\*,/.test(glob.orig)) { - glob._replace('**', globstar(opts.dot), true); - } - } - - // ends with /* - glob._replace(/\/\*$/, '\\/' + oneStar(opts.dot), true); - // ends with *, no slashes - glob._replace(/(?!\/)\*$/, star, true); - // has 'n*.' (partial wildcard w/ file extension) - glob._replace(/([^\/]+)\*/, '$1' + oneStar(true), true); - // has '*' - glob._replace('*', oneStar(opts.dot), true); - glob._replace('?.', '?\\.', true); - glob._replace('?:', '?:', true); - - glob._replace(/\?+/g, function(match) { - var len = match.length; - if (len === 1) { - return qmark; - } - return qmark + '{' + len + '}'; - }); - - // escape '.abc' => '\\.abc' - glob._replace(/\.([*\w]+)/g, '\\.$1'); - // fix '[^\\\\/]' - glob._replace(/\[\^[\\\/]+\]/g, qmark); - // '///' => '\/' - glob._replace(/\/+/g, '\\/'); - // '\\\\\\' => '\\' - glob._replace(/\\{2,}/g, '\\'); - } - - // unescape previously escaped patterns - glob.unescape(glob.pattern); - glob._replace('__UNESC_STAR__', '*'); - - // escape dots that follow qmarks - glob._replace('?.', '?\\.'); - - // remove unnecessary slashes in character classes - glob._replace('[^\\/]', qmark); - - if (glob.pattern.length > 1) { - if (/^[\[?*]/.test(glob.pattern)) { - // only prepend the string if we don't want to match dotfiles - glob.pattern = (opts.dot ? dotfiles : nodot) + glob.pattern; - } - } - - return glob; -} - -/** - * Collapse repeated character sequences. - * - * ```js - * collapse('a/../../../b', '../'); - * //=> 'a/../b' - * ``` - * - * @param {String} `str` - * @param {String} `ch` Character sequence to collapse - * @return {String} - */ - -function collapse(str, ch) { - var res = str.split(ch); - var isFirst = res[0] === ''; - var isLast = res[res.length - 1] === ''; - res = res.filter(Boolean); - if (isFirst) res.unshift(''); - if (isLast) res.push(''); - return res.join(ch); -} - -/** - * Negate slashes in exclusion ranges, per glob spec: - * - * ```js - * negateSlash('[^foo]'); - * //=> '[^\\/foo]' - * ``` - * - * @param {String} `str` glob pattern - * @return {String} - */ - -function negateSlash(str) { - return str.replace(/\[\^([^\]]*?)\]/g, function(match, inner) { - if (inner.indexOf('/') === -1) { - inner = '\\/' + inner; - } - return '[^' + inner + ']'; - }); -} - -/** - * Escape imbalanced braces/bracket. This is a very - * basic, naive implementation that only does enough - * to serve the purpose. - */ - -function balance(str, a, b) { - var aarr = str.split(a); - var alen = aarr.join('').length; - var blen = str.split(b).join('').length; - - if (alen !== blen) { - str = aarr.join('\\' + a); - return str.split(b).join('\\' + b); - } - return str; -} - -/** - * Special patterns to be converted to regex. - * Heuristics are used to simplify patterns - * and speed up processing. - */ - -/* eslint no-multi-spaces: 0 */ -var qmark = '[^/]'; -var star = qmark + '*?'; -var nodot = '(?!\\.)(?=.)'; -var dotfileGlob = '(?:\\/|^)\\.{1,2}($|\\/)'; -var dotfiles = '(?!' + dotfileGlob + ')(?=.)'; -var twoStarDot = '(?:(?!' + dotfileGlob + ').)*?'; - -/** - * Create a regex for `*`. - * - * If `dot` is true, or the pattern does not begin with - * a leading star, then return the simpler regex. - */ - -function oneStar(dotfile) { - return dotfile ? '(?!' + dotfileGlob + ')(?=.)' + star : (nodot + star); -} - -function globstar(dotfile) { - if (dotfile) { return twoStarDot; } - return '(?:(?!(?:\\/|^)\\.).)*?'; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js deleted file mode 100644 index c613326736c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/glob.js +++ /dev/null @@ -1,193 +0,0 @@ -'use strict'; - -var chars = require('./chars'); -var utils = require('./utils'); - -/** - * Expose `Glob` - */ - -var Glob = module.exports = function Glob(pattern, options) { - if (!(this instanceof Glob)) { - return new Glob(pattern, options); - } - this.options = options || {}; - this.pattern = pattern; - this.history = []; - this.tokens = {}; - this.init(pattern); -}; - -/** - * Initialize defaults - */ - -Glob.prototype.init = function(pattern) { - this.orig = pattern; - this.negated = this.isNegated(); - this.options.track = this.options.track || false; - this.options.makeRe = true; -}; - -/** - * Push a change into `glob.history`. Useful - * for debugging. - */ - -Glob.prototype.track = function(msg) { - if (this.options.track) { - this.history.push({msg: msg, pattern: this.pattern}); - } -}; - -/** - * Return true if `glob.pattern` was negated - * with `!`, also remove the `!` from the pattern. - * - * @return {Boolean} - */ - -Glob.prototype.isNegated = function() { - if (this.pattern.charCodeAt(0) === 33 /* '!' */) { - this.pattern = this.pattern.slice(1); - return true; - } - return false; -}; - -/** - * Expand braces in the given glob pattern. - * - * We only need to use the [braces] lib when - * patterns are nested. - */ - -Glob.prototype.braces = function() { - if (this.options.nobraces !== true && this.options.nobrace !== true) { - // naive/fast check for imbalanced characters - var a = this.pattern.match(/[\{\(\[]/g); - var b = this.pattern.match(/[\}\)\]]/g); - - // if imbalanced, don't optimize the pattern - if (a && b && (a.length !== b.length)) { - this.options.makeRe = false; - } - - // expand brace patterns and join the resulting array - var expanded = utils.braces(this.pattern, this.options); - this.pattern = expanded.join('|'); - } -}; - -/** - * Expand bracket expressions in `glob.pattern` - */ - -Glob.prototype.brackets = function() { - if (this.options.nobrackets !== true) { - this.pattern = utils.brackets(this.pattern); - } -}; - -/** - * Expand bracket expressions in `glob.pattern` - */ - -Glob.prototype.extglob = function() { - if (this.options.noextglob === true) return; - - if (utils.isExtglob(this.pattern)) { - this.pattern = utils.extglob(this.pattern, {escape: true}); - } -}; - -/** - * Parse the given pattern - */ - -Glob.prototype.parse = function(pattern) { - this.tokens = utils.parseGlob(pattern || this.pattern, true); - return this.tokens; -}; - -/** - * Replace `a` with `b`. Also tracks the change before and - * after each replacement. This is disabled by default, but - * can be enabled by setting `options.track` to true. - * - * Also, when the pattern is a string, `.split()` is used, - * because it's much faster than replace. - * - * @param {RegExp|String} `a` - * @param {String} `b` - * @param {Boolean} `escape` When `true`, escapes `*` and `?` in the replacement. - * @return {String} - */ - -Glob.prototype._replace = function(a, b, escape) { - this.track('before (find): "' + a + '" (replace with): "' + b + '"'); - if (escape) b = esc(b); - if (a && b && typeof a === 'string') { - this.pattern = this.pattern.split(a).join(b); - } else { - this.pattern = this.pattern.replace(a, b); - } - this.track('after'); -}; - -/** - * Escape special characters in the given string. - * - * @param {String} `str` Glob pattern - * @return {String} - */ - -Glob.prototype.escape = function(str) { - this.track('before escape: '); - var re = /["\\](['"]?[^"'\\]['"]?)/g; - - this.pattern = str.replace(re, function($0, $1) { - var o = chars.ESC; - var ch = o && o[$1]; - if (ch) { - return ch; - } - if (/[a-z]/i.test($0)) { - return $0.split('\\').join(''); - } - return $0; - }); - - this.track('after escape: '); -}; - -/** - * Unescape special characters in the given string. - * - * @param {String} `str` - * @return {String} - */ - -Glob.prototype.unescape = function(str) { - var re = /__([A-Z]+)_([A-Z]+)__/g; - this.pattern = str.replace(re, function($0, $1) { - return chars[$1][$0]; - }); - this.pattern = unesc(this.pattern); -}; - -/** - * Escape/unescape utils - */ - -function esc(str) { - str = str.split('?').join('%~'); - str = str.split('*').join('%%'); - return str; -} - -function unesc(str) { - str = str.split('%~').join('?'); - str = str.split('%%').join('*'); - return str; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js b/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js deleted file mode 100644 index 7c24a510643..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/lib/utils.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -var win32 = process && process.platform === 'win32'; -var path = require('path'); -var fileRe = require('filename-regex'); -var utils = module.exports; - -/** - * Module dependencies - */ - -utils.diff = require('arr-diff'); -utils.unique = require('array-unique'); -utils.braces = require('braces'); -utils.brackets = require('expand-brackets'); -utils.extglob = require('extglob'); -utils.isExtglob = require('is-extglob'); -utils.isGlob = require('is-glob'); -utils.typeOf = require('kind-of'); -utils.normalize = require('normalize-path'); -utils.omit = require('object.omit'); -utils.parseGlob = require('parse-glob'); -utils.cache = require('regex-cache'); - -/** - * Get the filename of a filepath - * - * @param {String} `string` - * @return {String} - */ - -utils.filename = function filename(fp) { - var seg = fp.match(fileRe()); - return seg && seg[0]; -}; - -/** - * Returns a function that returns true if the given - * pattern is the same as a given `filepath` - * - * @param {String} `pattern` - * @return {Function} - */ - -utils.isPath = function isPath(pattern, opts) { - opts = opts || {}; - return function(fp) { - var unixified = utils.unixify(fp, opts); - if(opts.nocase){ - return pattern.toLowerCase() === unixified.toLowerCase(); - } - return pattern === unixified; - }; -}; - -/** - * Returns a function that returns true if the given - * pattern contains a `filepath` - * - * @param {String} `pattern` - * @return {Function} - */ - -utils.hasPath = function hasPath(pattern, opts) { - return function(fp) { - return utils.unixify(pattern, opts).indexOf(fp) !== -1; - }; -}; - -/** - * Returns a function that returns true if the given - * pattern matches or contains a `filepath` - * - * @param {String} `pattern` - * @return {Function} - */ - -utils.matchPath = function matchPath(pattern, opts) { - var fn = (opts && opts.contains) - ? utils.hasPath(pattern, opts) - : utils.isPath(pattern, opts); - return fn; -}; - -/** - * Returns a function that returns true if the given - * regex matches the `filename` of a file path. - * - * @param {RegExp} `re` - * @return {Boolean} - */ - -utils.hasFilename = function hasFilename(re) { - return function(fp) { - var name = utils.filename(fp); - return name && re.test(name); - }; -}; - -/** - * Coerce `val` to an array - * - * @param {*} val - * @return {Array} - */ - -utils.arrayify = function arrayify(val) { - return !Array.isArray(val) - ? [val] - : val; -}; - -/** - * Normalize all slashes in a file path or glob pattern to - * forward slashes. - */ - -utils.unixify = function unixify(fp, opts) { - if (opts && opts.unixify === false) return fp; - if (opts && opts.unixify === true || win32 || path.sep === '\\') { - return utils.normalize(fp, false); - } - if (opts && opts.unescape === true) { - return fp ? fp.toString().replace(/\\(\w)/g, '$1') : ''; - } - return fp; -}; - -/** - * Escape/unescape utils - */ - -utils.escapePath = function escapePath(fp) { - return fp.replace(/[\\.]/g, '\\$&'); -}; - -utils.unescapeGlob = function unescapeGlob(fp) { - return fp.replace(/[\\"']/g, ''); -}; - -utils.escapeRe = function escapeRe(str) { - return str.replace(/[-[\\$*+?.#^\s{}(|)\]]/g, '\\$&'); -}; - -/** - * Expose `utils` - */ - -module.exports = utils; diff --git a/src/filesystem/impls/appshell/node/node_modules/micromatch/package.json b/src/filesystem/impls/appshell/node/node_modules/micromatch/package.json deleted file mode 100644 index 357f6a92379..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/micromatch/package.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "_args": [ - [ - "micromatch@^2.1.5", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch" - ] - ], - "_from": "micromatch@>=2.1.5 <3.0.0", - "_id": "micromatch@2.3.11", - "_inCache": true, - "_installable": true, - "_location": "/micromatch", - "_nodeVersion": "6.3.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/micromatch-2.3.11.tgz_1468602931475_0.3629888044670224" - }, - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.10.3", - "_phantomChildren": {}, - "_requested": { - "name": "micromatch", - "raw": "micromatch@^2.1.5", - "rawSpec": "^2.1.5", - "scope": null, - "spec": ">=2.1.5 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/anymatch" - ], - "_resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "_shasum": "86677c97d1720b363431d04d0d15293bd38c1565", - "_shrinkwrap": null, - "_spec": "micromatch@^2.1.5", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/anymatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/micromatch/issues" - }, - "dependencies": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - }, - "description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.", - "devDependencies": { - "benchmarked": "^0.1.4", - "chalk": "^1.1.1", - "gulp": "^3.9.0", - "gulp-eslint": "^1.1.1", - "gulp-format-md": "^0.1.8", - "gulp-istanbul": "^0.10.1", - "gulp-mocha": "^2.1.3", - "minimatch": "^3.0.0", - "minimist": "^1.2.0", - "mocha": "^2", - "multimatch": "^2.0.0", - "should": "^8", - "write": "^0.2.1" - }, - "directories": {}, - "dist": { - "shasum": "86677c97d1720b363431d04d0d15293bd38c1565", - "tarball": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "lib" - ], - "gitHead": "f194c187d04677b03047bb7d8d25643725f7a577", - "homepage": "https://github.com/jonschlinkert/micromatch", - "keywords": [ - "bash", - "expand", - "expansion", - "expression", - "file", - "files", - "filter", - "find", - "glob", - "globbing", - "globs", - "globstar", - "match", - "matcher", - "matches", - "matching", - "minimatch", - "multimatch", - "path", - "pattern", - "patterns", - "regex", - "regexp", - "regular", - "shell", - "wildcard" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - }, - { - "email": "elan.shanker+npm@gmail.com", - "name": "es128" - } - ], - "name": "micromatch", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/micromatch.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": false, - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "braces", - "expand-brackets", - "extglob", - "minimatch", - "multimatch", - "verb" - ], - "related": { - "list": [ - "braces", - "expand-brackets", - "expand-range", - "extglob", - "fill-range", - "gulp-micromatch", - "is-glob", - "parse-glob" - ] - }, - "tasks": [ - "readme" - ], - "toc": false - }, - "version": "2.3.11" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE b/src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e315fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/README.md b/src/filesystem/impls/appshell/node/node_modules/minimatch/README.md deleted file mode 100644 index ad72b8133ea..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/minimatch/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instantiating the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js b/src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js deleted file mode 100644 index 830a27246cd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,924 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } - - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var plType - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - plType = stateChar - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - re += ')' - var pl = patternListStack.pop() - plType = pl.type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case '!': - negativeLists.push(pl) - re += ')[^/]*?)' - pl.reEnd = re.length - break - case '?': - case '+': - case '*': - re += plType - break - case '@': break // the default anyway - } - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/src/filesystem/impls/appshell/node/node_modules/minimatch/package.json b/src/filesystem/impls/appshell/node/node_modules/minimatch/package.json deleted file mode 100644 index f5addbba30b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/minimatch/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "minimatch@^3.0.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" - ] - ], - "_from": "minimatch@>=3.0.2 <4.0.0", - "_id": "minimatch@3.0.2", - "_inCache": true, - "_installable": true, - "_location": "/minimatch", - "_nodeVersion": "4.4.4", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957" - }, - "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" - }, - "_npmVersion": "3.9.1", - "_phantomChildren": {}, - "_requested": { - "name": "minimatch", - "raw": "minimatch@^3.0.2", - "rawSpec": "^3.0.2", - "scope": null, - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/readdirp" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz", - "_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", - "_shrinkwrap": null, - "_spec": "minimatch@^3.0.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", - "author": { - "email": "i@izs.me", - "name": "Isaac Z. Schlueter", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "dependencies": { - "brace-expansion": "^1.0.0" - }, - "description": "a glob matcher in javascript", - "devDependencies": { - "standard": "^3.7.2", - "tap": "^5.6.0" - }, - "directories": {}, - "dist": { - "shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a", - "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz" - }, - "engines": { - "node": "*" - }, - "files": [ - "minimatch.js" - ], - "gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0", - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "maintainers": [ - { - "email": "i@izs.me", - "name": "isaacs" - } - ], - "name": "minimatch", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "posttest": "standard minimatch.js test/*.js", - "test": "tap test/*.js" - }, - "version": "3.0.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md b/src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md deleted file mode 100644 index 2519fbc4009..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/CHANGELOG.md +++ /dev/null @@ -1,430 +0,0 @@ -# NAN ChangeLog - -**Version 2.4.0: current Node 6.3.0, Node 12: 0.12.15, Node 10: 0.10.46, iojs: 3.3.1** - -### 2.4.0 Jul 10 2016 - - - Feature: Rewrite Callback to add Callback::Reset c4cf44d61f8275cd5f7b0c911d7a806d4004f649 - - Feature: AsyncProgressWorker: add template types for .send 1242c9a11a7ed481c8f08ec06316385cacc513d0 - - Bugfix: Add constness to old Persistent comparison operators bd43cb9982c7639605d60fd073efe8cae165d9b2 - -### 2.3.5 May 31 2016 - - - Bugfix: Replace NAN_INLINE with 'inline' keyword. 71819d8725f822990f439479c9aba3b240804909 - -### 2.3.4 May 31 2016 - - - Bugfix: Remove V8 deprecation warnings 0592fb0a47f3a1c7763087ebea8e1138829f24f9 - - Bugfix: Fix new versions not to use WeakCallbackInfo::IsFirstPass 615c19d9e03d4be2049c10db0151edbc3b229246 - - Bugfix: Make ObjectWrap::handle() const d19af99595587fe7a26bd850af6595c2a7145afc - - Bugfix: Fix compilation errors related to 0592fb0a47f3a1c7763087ebea8e1138829f24f9 e9191c525b94f652718325e28610a1adcf90fed8 - -### 2.3.3 May 4 2016 - - - Bugfix: Refactor SetMethod() to deal with v8::Templates (#566) b9083cf6d5de6ebe6bcb49c7502fbb7c0d9ddda8 - -### 2.3.2 Apr 27 2016 - - - Bugfix: Fix compilation on outdated versions due to Handle removal f8b7c875d04d425a41dfd4f3f8345bc3a11e6c52 - -### 2.3.1 Apr 27 2016 - - - Bugfix: Don't use deprecated v8::Template::Set() in SetMethod a90951e9ea70fa1b3836af4b925322919159100e - -### 2.3.0 Apr 27 2016 - - - Feature: added Signal() for invoking async callbacks without sending data from AsyncProgressWorker d8adba45f20e077d00561b20199133620c990b38 - - Bugfix: Don't use deprecated v8::Template::Set() 00dacf0a4b86027415867fa7f1059acc499dcece - -### 2.2.1 Mar 29 2016 - - - Bugfix: Use NewFromUnsigned in ReturnValue::Set(uint32_t i) for pre_12 3a18f9bdce29826e0e4c217854bc476918241a58 - - Performance: Remove unneeeded nullptr checks b715ef44887931c94f0d1605b3b1a4156eebece9 - -### 2.2.0 Jan 9 2016 - - - Feature: Add Function::Call wrapper 4c157474dacf284d125c324177b45aa5dabc08c6 - - Feature: Rename GC*logueCallback to GCCallback for > 4.0 3603435109f981606d300eb88004ca101283acec - - Bugfix: Fix Global::Pass for old versions 367e82a60fbaa52716232cc89db1cc3f685d77d9 - - Bugfix: Remove weird MaybeLocal wrapping of what already is a MaybeLocal 23b4590db10c2ba66aee2338aebe9751c4cb190b - -### 2.1.0 Oct 8 2015 - - - Deprecation: Deprecate NanErrnoException in favor of ErrnoException 0af1ca4cf8b3f0f65ed31bc63a663ab3319da55c - - Feature: added helper class for accessing contents of typedarrays 17b51294c801e534479d5463697a73462d0ca555 - - Feature: [Maybe types] Add MakeMaybe(...) 48d7b53d9702b0c7a060e69ea10fea8fb48d814d - - Feature: new: allow utf16 string with length 66ac6e65c8ab9394ef588adfc59131b3b9d8347b - - Feature: Introduce SetCallHandler and SetCallAsFunctionHandler 7764a9a115d60ba10dc24d86feb0fbc9b4f75537 - - Bugfix: Enable creating Locals from Globals under Node 0.10. 9bf9b8b190821af889790fdc18ace57257e4f9ff - - Bugfix: Fix issue #462 where PropertyCallbackInfo data is not stored safely. 55f50adedd543098526c7b9f4fffd607d3f9861f - -### 2.0.9 Sep 8 2015 - - - Bugfix: EscapableHandleScope in Nan::NewBuffer for Node 0.8 and 0.10 b1654d7 - -### 2.0.8 Aug 28 2015 - - - Work around duplicate linking bug in clang 11902da - -### 2.0.7 Aug 26 2015 - - - Build: Repackage - -### 2.0.6 Aug 26 2015 - - - Bugfix: Properly handle null callback in FunctionTemplate factory 6e99cb1 - - Bugfix: Remove unused static std::map instances 525bddc - - Bugfix: Make better use of maybe versions of APIs bfba85b - - Bugfix: Fix shadowing issues with handle in ObjectWrap 0a9072d - -### 2.0.5 Aug 10 2015 - - - Bugfix: Reimplement weak callback in ObjectWrap 98d38c1 - - Bugfix: Make sure callback classes are not assignable, copyable or movable 81f9b1d - -### 2.0.4 Aug 6 2015 - - - Build: Repackage - -### 2.0.3 Aug 6 2015 - - - Bugfix: Don't use clang++ / g++ syntax extension. 231450e - -### 2.0.2 Aug 6 2015 - - - Build: Repackage - -### 2.0.1 Aug 6 2015 - - - Bugfix: Add workaround for missing REPLACE_INVALID_UTF8 60d6687 - - Bugfix: Reimplement ObjectWrap from scratch to prevent memory leaks 6484601 - - Bugfix: Fix Persistent leak in FunctionCallbackInfo and PropertyCallbackInfo 641ef5f - - Bugfix: Add missing overload for Nan::NewInstance that takes argc/argv 29450ed - -### 2.0.0 Jul 31 2015 - - - Change: Renamed identifiers with leading underscores b5932b4 - - Change: Replaced NanObjectWrapHandle with class NanObjectWrap 464f1e1 - - Change: Replace NanScope and NanEscpableScope macros with classes 47751c4 - - Change: Rename NanNewBufferHandle to NanNewBuffer 6745f99 - - Change: Rename NanBufferUse to NanNewBuffer 3e8b0a5 - - Change: Rename NanNewBuffer to NanCopyBuffer d6af78d - - Change: Remove Nan prefix from all names 72d1f67 - - Change: Update Buffer API for new upstream changes d5d3291 - - Change: Rename Scope and EscapableScope to HandleScope and EscapableHandleScope 21a7a6a - - Change: Get rid of Handles e6c0daf - - Feature: Support io.js 3 with V8 4.4 - - Feature: Introduce NanPersistent 7fed696 - - Feature: Introduce NanGlobal 4408da1 - - Feature: Added NanTryCatch 10f1ca4 - - Feature: Update for V8 v4.3 4b6404a - - Feature: Introduce NanNewOneByteString c543d32 - - Feature: Introduce namespace Nan 67ed1b1 - - Removal: Remove NanLocker and NanUnlocker dd6e401 - - Removal: Remove string converters, except NanUtf8String, which now follows the node implementation b5d00a9 - - Removal: Remove NanReturn* macros d90a25c - - Removal: Remove HasInstance e8f84fe - - -### 1.9.0 Jul 31 2015 - - - Feature: Added `NanFatalException` 81d4a2c - - Feature: Added more error types 4265f06 - - Feature: Added dereference and function call operators to NanCallback c4b2ed0 - - Feature: Added indexed GetFromPersistent and SaveToPersistent edd510c - - Feature: Added more overloads of SaveToPersistent and GetFromPersistent 8b1cef6 - - Feature: Added NanErrnoException dd87d9e - - Correctness: Prevent assign, copy, and move for classes that do not support it 1f55c59, 4b808cb, c96d9b2, fba4a29, 3357130 - - Deprecation: Deprecate `NanGetPointerSafe` and `NanSetPointerSafe` 81d4a2c - - Deprecation: Deprecate `NanBooleanOptionValue` and `NanUInt32OptionValue` 0ad254b - -### 1.8.4 Apr 26 2015 - - - Build: Repackage - -### 1.8.3 Apr 26 2015 - - - Bugfix: Include missing header 1af8648 - -### 1.8.2 Apr 23 2015 - - - Build: Repackage - -### 1.8.1 Apr 23 2015 - - - Bugfix: NanObjectWrapHandle should take a pointer 155f1d3 - -### 1.8.0 Apr 23 2015 - - - Feature: Allow primitives with NanReturnValue 2e4475e - - Feature: Added comparison operators to NanCallback 55b075e - - Feature: Backport thread local storage 15bb7fa - - Removal: Remove support for signatures with arguments 8a2069d - - Correcteness: Replaced NanObjectWrapHandle macro with function 0bc6d59 - -### 1.7.0 Feb 28 2015 - - - Feature: Made NanCallback::Call accept optional target 8d54da7 - - Feature: Support atom-shell 0.21 0b7f1bb - -### 1.6.2 Feb 6 2015 - - - Bugfix: NanEncode: fix argument type for node::Encode on io.js 2be8639 - -### 1.6.1 Jan 23 2015 - - - Build: version bump - -### 1.5.3 Jan 23 2015 - - - Build: repackage - -### 1.6.0 Jan 23 2015 - - - Deprecated `NanNewContextHandle` in favor of `NanNew` 49259af - - Support utility functions moved in newer v8 versions (Node 0.11.15, io.js 1.0) a0aa179 - - Added `NanEncode`, `NanDecodeBytes` and `NanDecodeWrite` 75e6fb9 - -### 1.5.2 Jan 23 2015 - - - Bugfix: Fix non-inline definition build error with clang++ 21d96a1, 60fadd4 - - Bugfix: Readded missing String constructors 18d828f - - Bugfix: Add overload handling NanNew(..) 5ef813b - - Bugfix: Fix uv_work_cb versioning 997e4ae - - Bugfix: Add function factory and test 4eca89c - - Bugfix: Add object template factory and test cdcb951 - - Correctness: Lifted an io.js related typedef c9490be - - Correctness: Make explicit downcasts of String lengths 00074e6 - - Windows: Limit the scope of disabled warning C4530 83d7deb - -### 1.5.1 Jan 15 2015 - - - Build: version bump - -### 1.4.3 Jan 15 2015 - - - Build: version bump - -### 1.4.2 Jan 15 2015 - - - Feature: Support io.js 0dbc5e8 - -### 1.5.0 Jan 14 2015 - - - Feature: Support io.js b003843 - - Correctness: Improved NanNew internals 9cd4f6a - - Feature: Implement progress to NanAsyncWorker 8d6a160 - -### 1.4.1 Nov 8 2014 - - - Bugfix: Handle DEBUG definition correctly - - Bugfix: Accept int as Boolean - -### 1.4.0 Nov 1 2014 - - - Feature: Added NAN_GC_CALLBACK 6a5c245 - - Performance: Removed unnecessary local handle creation 18a7243, 41fe2f8 - - Correctness: Added constness to references in NanHasInstance 02c61cd - - Warnings: Fixed spurious warnings from -Wundef and -Wshadow, 541b122, 99d8cb6 - - Windoze: Shut Visual Studio up when compiling 8d558c1 - - License: Switch to plain MIT from custom hacked MIT license 11de983 - - Build: Added test target to Makefile e232e46 - - Performance: Removed superfluous scope in NanAsyncWorker f4b7821 - - Sugar/Feature: Added NanReturnThis() and NanReturnHolder() shorthands 237a5ff, d697208 - - Feature: Added suitable overload of NanNew for v8::Integer::NewFromUnsigned b27b450 - -### 1.3.0 Aug 2 2014 - - - Added NanNew(std::string) - - Added NanNew(std::string&) - - Added NanAsciiString helper class - - Added NanUtf8String helper class - - Added NanUcs2String helper class - - Deprecated NanRawString() - - Deprecated NanCString() - - Added NanGetIsolateData(v8::Isolate *isolate) - - Added NanMakeCallback(v8::Handle target, v8::Handle func, int argc, v8::Handle* argv) - - Added NanMakeCallback(v8::Handle target, v8::Handle symbol, int argc, v8::Handle* argv) - - Added NanMakeCallback(v8::Handle target, const char* method, int argc, v8::Handle* argv) - - Added NanSetTemplate(v8::Handle templ, v8::Handle name , v8::Handle value, v8::PropertyAttribute attributes) - - Added NanSetPrototypeTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) - - Added NanSetInstanceTemplate(v8::Local templ, const char *name, v8::Handle value) - - Added NanSetInstanceTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) - -### 1.2.0 Jun 5 2014 - - - Add NanSetPrototypeTemplate - - Changed NAN_WEAK_CALLBACK internals, switched _NanWeakCallbackData to class, - introduced _NanWeakCallbackDispatcher - - Removed -Wno-unused-local-typedefs from test builds - - Made test builds Windows compatible ('Sleep()') - -### 1.1.2 May 28 2014 - - - Release to fix more stuff-ups in 1.1.1 - -### 1.1.1 May 28 2014 - - - Release to fix version mismatch in nan.h and lack of changelog entry for 1.1.0 - -### 1.1.0 May 25 2014 - - - Remove nan_isolate, use v8::Isolate::GetCurrent() internally instead - - Additional explicit overloads for NanNew(): (char*,int), (uint8_t*[,int]), - (uint16_t*[,int), double, int, unsigned int, bool, v8::String::ExternalStringResource*, - v8::String::ExternalAsciiStringResource* - - Deprecate NanSymbol() - - Added SetErrorMessage() and ErrorMessage() to NanAsyncWorker - -### 1.0.0 May 4 2014 - - - Heavy API changes for V8 3.25 / Node 0.11.13 - - Use cpplint.py - - Removed NanInitPersistent - - Removed NanPersistentToLocal - - Removed NanFromV8String - - Removed NanMakeWeak - - Removed NanNewLocal - - Removed NAN_WEAK_CALLBACK_OBJECT - - Removed NAN_WEAK_CALLBACK_DATA - - Introduce NanNew, replaces NanNewLocal, NanPersistentToLocal, adds many overloaded typed versions - - Introduce NanUndefined, NanNull, NanTrue and NanFalse - - Introduce NanEscapableScope and NanEscapeScope - - Introduce NanMakeWeakPersistent (requires a special callback to work on both old and new node) - - Introduce NanMakeCallback for node::MakeCallback - - Introduce NanSetTemplate - - Introduce NanGetCurrentContext - - Introduce NanCompileScript and NanRunScript - - Introduce NanAdjustExternalMemory - - Introduce NanAddGCEpilogueCallback, NanAddGCPrologueCallback, NanRemoveGCEpilogueCallback, NanRemoveGCPrologueCallback - - Introduce NanGetHeapStatistics - - Rename NanAsyncWorker#SavePersistent() to SaveToPersistent() - -### 0.8.0 Jan 9 2014 - - - NanDispose -> NanDisposePersistent, deprecate NanDispose - - Extract _NAN_*_RETURN_TYPE, pull up NAN_*() - -### 0.7.1 Jan 9 2014 - - - Fixes to work against debug builds of Node - - Safer NanPersistentToLocal (avoid reinterpret_cast) - - Speed up common NanRawString case by only extracting flattened string when necessary - -### 0.7.0 Dec 17 2013 - - - New no-arg form of NanCallback() constructor. - - NanCallback#Call takes Handle rather than Local - - Removed deprecated NanCallback#Run method, use NanCallback#Call instead - - Split off _NAN_*_ARGS_TYPE from _NAN_*_ARGS - - Restore (unofficial) Node 0.6 compatibility at NanCallback#Call() - - Introduce NanRawString() for char* (or appropriate void*) from v8::String - (replacement for NanFromV8String) - - Introduce NanCString() for null-terminated char* from v8::String - -### 0.6.0 Nov 21 2013 - - - Introduce NanNewLocal(v8::Handle value) for use in place of - v8::Local::New(...) since v8 started requiring isolate in Node 0.11.9 - -### 0.5.2 Nov 16 2013 - - - Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public - -### 0.5.1 Nov 12 2013 - - - Use node::MakeCallback() instead of direct v8::Function::Call() - -### 0.5.0 Nov 11 2013 - - - Added @TooTallNate as collaborator - - New, much simpler, "include_dirs" for binding.gyp - - Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros - -### 0.4.4 Nov 2 2013 - - - Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+ - -### 0.4.3 Nov 2 2013 - - - Include node_object_wrap.h, removed from node.h for Node 0.11.8. - -### 0.4.2 Nov 2 2013 - - - Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for - Node 0.11.8 release. - -### 0.4.1 Sep 16 2013 - - - Added explicit `#include ` as it was removed from node.h for v0.11.8 - -### 0.4.0 Sep 2 2013 - - - Added NAN_INLINE and NAN_DEPRECATED and made use of them - - Added NanError, NanTypeError and NanRangeError - - Cleaned up code - -### 0.3.2 Aug 30 2013 - - - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent - in NanAsyncWorker - -### 0.3.1 Aug 20 2013 - - - fix "not all control paths return a value" compile warning on some platforms - -### 0.3.0 Aug 19 2013 - - - Made NAN work with NPM - - Lots of fixes to NanFromV8String, pulling in features from new Node core - - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API - - Added optional error number argument for NanThrowError() - - Added NanInitPersistent() - - Added NanReturnNull() and NanReturnEmptyString() - - Added NanLocker and NanUnlocker - - Added missing scopes - - Made sure to clear disposed Persistent handles - - Changed NanAsyncWorker to allocate error messages on the heap - - Changed NanThrowError(Local) to NanThrowError(Handle) - - Fixed leak in NanAsyncWorker when errmsg is used - -### 0.2.2 Aug 5 2013 - - - Fixed usage of undefined variable with node::BASE64 in NanFromV8String() - -### 0.2.1 Aug 5 2013 - - - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for - NanFromV8String() - -### 0.2.0 Aug 5 2013 - - - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR, - NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY - - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS, - _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS, - _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS, - _NAN_PROPERTY_QUERY_ARGS - - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer - - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT, - NAN_WEAK_CALLBACK_DATA, NanMakeWeak - - Renamed THROW_ERROR to _NAN_THROW_ERROR - - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*) - - Added NanBufferUse(char*, uint32_t) - - Added NanNewContextHandle(v8::ExtensionConfiguration*, - v8::Handle, v8::Handle) - - Fixed broken NanCallback#GetFunction() - - Added optional encoding and size arguments to NanFromV8String() - - Added NanGetPointerSafe() and NanSetPointerSafe() - - Added initial test suite (to be expanded) - - Allow NanUInt32OptionValue to convert any Number object - -### 0.1.0 Jul 21 2013 - - - Added `NAN_GETTER`, `NAN_SETTER` - - Added `NanThrowError` with single Local argument - - Added `NanNewBufferHandle` with single uint32_t argument - - Added `NanHasInstance(Persistent&, Handle)` - - Added `Local NanCallback#GetFunction()` - - Added `NanCallback#Call(int, Local[])` - - Deprecated `NanCallback#Run(int, Local[])` in favour of Call diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md b/src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md deleted file mode 100644 index e4fc4127eb5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2016 NAN contributors ------------------------------------ - -*NAN contributors listed at * - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/README.md b/src/filesystem/impls/appshell/node/node_modules/nan/README.md deleted file mode 100644 index 7f163b6f093..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/README.md +++ /dev/null @@ -1,403 +0,0 @@ -Native Abstractions for Node.js -=============================== - -**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 4, 5 and 6.** - -***Current version: 2.4.0*** - -*(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* - -[![NPM](https://nodei.co/npm/nan.png?downloads=true&downloadRank=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6&height=3)](https://nodei.co/npm/nan/) - -[![Build Status](https://api.travis-ci.org/nodejs/nan.svg?branch=master)](http://travis-ci.org/nodejs/nan) -[![Build status](https://ci.appveyor.com/api/projects/status/kh73pbm9dsju7fgh)](https://ci.appveyor.com/project/RodVagg/nan) - -Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.12 to 4.0, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle. - -This project also contains some helper utilities that make addon development a bit more pleasant. - - * **[News & Updates](#news)** - * **[Usage](#usage)** - * **[Example](#example)** - * **[API](#api)** - * **[Tests](#tests)** - * **[Governance & Contributing](#governance)** - - -## News & Updates - - -## Usage - -Simply add **NAN** as a dependency in the *package.json* of your Node addon: - -``` bash -$ npm install --save nan -``` - -Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include ` in your *.cpp* files: - -``` python -"include_dirs" : [ - "` when compiling your addon. - - -## Example - -Just getting started with Nan? Take a look at the **[Node Add-on Examples](https://github.com/nodejs/node-addon-examples)**. - -Refer to a [quick-start **Nan** Boilerplate](https://github.com/fcanas/node-native-boilerplate) for a ready-to-go project that utilizes basic Nan functionality. - -For a simpler example, see the **[async pi estimation example](https://github.com/nodejs/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**. - -Yet another example is **[nan-example-eol](https://github.com/CodeCharmLtd/nan-example-eol)**. It shows newline detection implemented as a native addon. - -Also take a look at our comprehensive **[C++ test suite](https://github.com/nodejs/nan/tree/master/test/cpp)** which has a plehora of code snippets for your pasting pleasure. - - -## API - -Additional to the NAN documentation below, please consult: - -* [The V8 Getting Started Guide](https://developers.google.com/v8/get_started) -* [The V8 Embedders Guide](https://developers.google.com/v8/embed) -* [V8 API Documentation](http://v8docs.nodesource.com/) -* [Node Add-on Documentation](https://nodejs.org/api/addons.html) - - - -### JavaScript-accessible methods - -A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://developers.google.com/v8/embed#templates) for further information. - -In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type. - -* **Method argument types** - - Nan::FunctionCallbackInfo - - Nan::PropertyCallbackInfo - - Nan::ReturnValue -* **Method declarations** - - Method declaration - - Getter declaration - - Setter declaration - - Property getter declaration - - Property setter declaration - - Property enumerator declaration - - Property deleter declaration - - Property query declaration - - Index getter declaration - - Index setter declaration - - Index enumerator declaration - - Index deleter declaration - - Index query declaration -* Method and template helpers - - Nan::SetMethod() - - Nan::SetPrototypeMethod() - - Nan::SetAccessor() - - Nan::SetNamedPropertyHandler() - - Nan::SetIndexedPropertyHandler() - - Nan::SetTemplate() - - Nan::SetPrototypeTemplate() - - Nan::SetInstanceTemplate() - - Nan::SetCallHandler() - - Nan::SetCallAsFunctionHandler() - -### Scopes - -A _local handle_ is a pointer to an object. All V8 objects are accessed using handles, they are necessary because of the way the V8 garbage collector works. - -A handle scope can be thought of as a container for any number of handles. When you've finished with your handles, instead of deleting each one individually you can simply delete their scope. - -The creation of `HandleScope` objects is different across the supported versions of V8. Therefore, NAN provides its own implementations that can be used safely across these. - - - Nan::HandleScope - - Nan::EscapableHandleScope - -Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). - -### Persistent references - -An object reference that is independent of any `HandleScope` is a _persistent_ reference. Where a `Local` handle only lives as long as the `HandleScope` in which it was allocated, a `Persistent` handle remains valid until it is explicitly disposed. - -Due to the evolution of the V8 API, it is necessary for NAN to provide a wrapper implementation of the `Persistent` classes to supply compatibility across the V8 versions supported. - - - Nan::PersistentBase & v8::PersistentBase - - Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits - - Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits - - Nan::Persistent - - Nan::Global - - Nan::WeakCallbackInfo - - Nan::WeakCallbackType - -Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). - -### New - -NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8. - - - Nan::New() - - Nan::Undefined() - - Nan::Null() - - Nan::True() - - Nan::False() - - Nan::EmptyString() - - -### Converters - -NAN contains functions that convert `v8::Value`s to other `v8::Value` types and native types. Since type conversion is not guaranteed to succeed, they return `Nan::Maybe` types. These converters can be used in place of `value->ToX()` and `value->XValue()` (where `X` is one of the types, e.g. `Boolean`) in a way that provides a consistent interface across V8 versions. Newer versions of V8 use the new `v8::Maybe` and `v8::MaybeLocal` types for these conversions, older versions don't have this functionality so it is provided by NAN. - - - Nan::To() - -### Maybe Types - -The `Nan::MaybeLocal` and `Nan::Maybe` types are monads that encapsulate `v8::Local` handles that _may be empty_. - -* **Maybe Types** - - Nan::MaybeLocal - - Nan::Maybe - - Nan::Nothing - - Nan::Just -* **Maybe Helpers** - - Nan::Call() - - Nan::ToDetailString() - - Nan::ToArrayIndex() - - Nan::Equals() - - Nan::NewInstance() - - Nan::GetFunction() - - Nan::Set() - - Nan::ForceSet() - - Nan::Get() - - Nan::GetPropertyAttributes() - - Nan::Has() - - Nan::Delete() - - Nan::GetPropertyNames() - - Nan::GetOwnPropertyNames() - - Nan::SetPrototype() - - Nan::ObjectProtoToString() - - Nan::HasOwnProperty() - - Nan::HasRealNamedProperty() - - Nan::HasRealIndexedProperty() - - Nan::HasRealNamedCallbackProperty() - - Nan::GetRealNamedPropertyInPrototypeChain() - - Nan::GetRealNamedProperty() - - Nan::CallAsFunction() - - Nan::CallAsConstructor() - - Nan::GetSourceLine() - - Nan::GetLineNumber() - - Nan::GetStartColumn() - - Nan::GetEndColumn() - - Nan::CloneElementAt() - - Nan::MakeMaybe() - -### Script - -NAN provides a `v8::Script` helpers as the API has changed over the supported versions of V8. - - - Nan::CompileScript() - - Nan::RunScript() - - -### Errors - -NAN includes helpers for creating, throwing and catching Errors as much of this functionality varies across the supported versions of V8 and must be abstracted. - -Note that an Error object is simply a specialized form of `v8::Value`. - -Also consult the V8 Embedders Guide section on [Exceptions](https://developers.google.com/v8/embed#exceptions) for more information. - - - Nan::Error() - - Nan::RangeError() - - Nan::ReferenceError() - - Nan::SyntaxError() - - Nan::TypeError() - - Nan::ThrowError() - - Nan::ThrowRangeError() - - Nan::ThrowReferenceError() - - Nan::ThrowSyntaxError() - - Nan::ThrowTypeError() - - Nan::FatalException() - - Nan::ErrnoException() - - Nan::TryCatch - - -### Buffers - -NAN's `node::Buffer` helpers exist as the API has changed across supported Node versions. Use these methods to ensure compatibility. - - - Nan::NewBuffer() - - Nan::CopyBuffer() - - Nan::FreeCallback() - -### Nan::Callback - -`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution. - - - Nan::Callback - -### Asynchronous work helpers - -`Nan::AsyncWorker` and `Nan::AsyncProgressWorker` are helper classes that make working with asynchronous code easier. - - - Nan::AsyncWorker - - Nan::AsyncProgressWorkerBase & Nan::AsyncProgressWorker - - Nan::AsyncQueueWorker - -### Strings & Bytes - -Miscellaneous string & byte encoding and decoding functionality provided for compatibility across supported versions of V8 and Node. Implemented by NAN to ensure that all encoding types are supported, even for older versions of Node where they are missing. - - - Nan::Encoding - - Nan::Encode() - - Nan::DecodeBytes() - - Nan::DecodeWrite() - - -### Object Wrappers - -The `ObjectWrap` class can be used to make wrapped C++ objects and a factory of wrapped objects. - - - Nan::ObjectWrap - - -### V8 internals - -The hooks to access V8 internals—including GC and statistics—are different across the supported versions of V8, therefore NAN provides its own hooks that call the appropriate V8 methods. - - - NAN_GC_CALLBACK() - - Nan::AddGCEpilogueCallback() - - Nan::RemoveGCEpilogueCallback() - - Nan::AddGCPrologueCallback() - - Nan::RemoveGCPrologueCallback() - - Nan::GetHeapStatistics() - - Nan::SetCounterFunction() - - Nan::SetCreateHistogramFunction() - - Nan::SetAddHistogramSampleFunction() - - Nan::IdleNotification() - - Nan::LowMemoryNotification() - - Nan::ContextDisposedNotification() - - Nan::GetInternalFieldPointer() - - Nan::SetInternalFieldPointer() - - Nan::AdjustExternalMemory() - - -### Miscellaneous V8 Helpers - - - Nan::Utf8String - - Nan::GetCurrentContext() - - Nan::SetIsolateData() - - Nan::GetIsolateData() - - Nan::TypedArrayContents - - -### Miscellaneous Node Helpers - - - Nan::MakeCallback() - - NAN_MODULE_INIT() - - Nan::Export() - - - - - -### Tests - -To run the NAN tests do: - -``` sh -npm install -npm run-script rebuild-tests -npm test -``` - -Or just: - -``` sh -npm install -make test -``` - - -## Governance & Contributing - -NAN is governed by the [io.js](https://iojs.org/) Addon API Working Group - -### Addon API Working Group (WG) - -The NAN project is jointly governed by a Working Group which is responsible for high-level guidance of the project. - -Members of the WG are also known as Collaborators, there is no distinction between the two, unlike other io.js projects. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project [README.md](./README.md#collaborators). - -Individuals making significant and valuable contributions are made members of the WG and given commit-access to the project. These individuals are identified by the WG and their addition to the WG is discussed via GitHub and requires unanimous consensus amongst those WG members participating in the discussion with a quorum of 50% of WG members required for acceptance of the vote. - -_Note:_ If you make a significant contribution and are not considered for commit-access log an issue or contact a WG member directly. - -For the current list of WG members / Collaborators, see the project [README.md](./README.md#collaborators). - -### Consensus Seeking Process - -The WG follows a [Consensus Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) decision making model. - -Modifications of the contents of the NAN repository are made on a collaborative basis. Anybody with a GitHub account may propose a modification via pull request and it will be considered by the WG. All pull requests must be reviewed and accepted by a WG member with sufficient expertise who is able to take full responsibility for the change. In the case of pull requests proposed by an existing WG member, an additional WG member is required for sign-off. Consensus should be sought if additional WG members participate and there is disagreement around a particular modification. - -If a change proposal cannot reach a consensus, a WG member can call for a vote amongst the members of the WG. Simple majority wins. - - -## Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - - -### WG Members / Collaborators - - - - - - - - - -
Rod VaggGitHub/rvaggTwitter/@rvagg
Benjamin ByholmGitHub/kkoopa-
Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
Nathan RajlichGitHub/TooTallNateTwitter/@TooTallNate
Brett LawsonGitHub/brett19Twitter/@brett19x
Ben NoordhuisGitHub/bnoordhuisTwitter/@bnoordhuis
David SiegelGitHub/agnat-
- -## Licence & copyright - -Copyright (c) 2016 NAN WG Members / Collaborators (listed above). - -Native Abstractions for Node.js is licensed under an MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md deleted file mode 100644 index 6bc4cce229f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/asyncworker.md +++ /dev/null @@ -1,103 +0,0 @@ -## Asynchronous work helpers - -`Nan::AsyncWorker` and `Nan::AsyncProgressWorker` are helper classes that make working with asynchronous code easier. - - - Nan::AsyncWorker - - Nan::AsyncProgressWorker - - Nan::AsyncQueueWorker - - -### Nan::AsyncWorker - -`Nan::AsyncWorker` is an _abstract_ class that you can subclass to have much of the annoying asynchronous queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the asynchronous work is in progress. - -Definition: - -```c++ -class AsyncWorker { - public: - explicit AsyncWorker(Callback *callback_); - - virtual ~AsyncWorker(); - - virtual void WorkComplete(); - - void SaveToPersistent(const char *key, const v8::Local &value); - - void SaveToPersistent(const v8::Local &key, - const v8::Local &value); - - void SaveToPersistent(uint32_t index, - const v8::Local &value); - - v8::Local GetFromPersistent(const char *key) const; - - v8::Local GetFromPersistent(const v8::Local &key) const; - - v8::Local GetFromPersistent(uint32_t index) const; - - virtual void Execute() = 0; - - uv_work_t request; - - virtual void Destroy(); - - protected: - Persistent persistentHandle; - - Callback *callback; - - virtual void HandleOKCallback(); - - virtual void HandleErrorCallback(); - - void SetErrorMessage(const char *msg); - - const char* ErrorMessage(); -}; -``` - - -### Nan::AsyncProgressWorkerBase & Nan::AsyncProgressWorker - -`Nan::AsyncProgressWorkerBase` is an _abstract_ class template that extends `Nan::AsyncWorker` and adds additional progress reporting callbacks that can be used during the asynchronous work execution to provide progress data back to JavaScript. - -Previously the definiton of `Nan::AsyncProgressWorker` only allowed sending `const char` data. Now extending `Nan::AsyncProgressWorker` will yield an instance of the implicit `Nan::AsyncProgressWorkerBase` template with type `` for compatibility. - -Definition: - -```c++ -template -class AsyncProgressWorkerBase : public AsyncWorker { - public: - explicit AsyncProgressWorker(Callback *callback_); - - virtual ~AsyncProgressWorker(); - - void WorkProgress(); - - class ExecutionProgress { - public: - void Signal() const; - void Send(const T* data, size_t size) const; - }; - - virtual void Execute(const ExecutionProgress& progress) = 0; - - virtual void HandleProgressCallback(const T *data, size_t size) = 0; - - virtual void Destroy(); - -typedef AsyncProgressWorkerBase AsyncProgressWorker; -``` - - -### Nan::AsyncQueueWorker - -`Nan::AsyncQueueWorker` will run a `Nan::AsyncWorker` asynchronously via libuv. Both the `execute` and `after_work` steps are taken care of for you. Most of the logic for this is embedded in `Nan::AsyncWorker`. - -Definition: - -```c++ -void AsyncQueueWorker(AsyncWorker *); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md deleted file mode 100644 index 8d8d25cf75a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/buffers.md +++ /dev/null @@ -1,54 +0,0 @@ -## Buffers - -NAN's `node::Buffer` helpers exist as the API has changed across supported Node versions. Use these methods to ensure compatibility. - - - Nan::NewBuffer() - - Nan::CopyBuffer() - - Nan::FreeCallback() - - -### Nan::NewBuffer() - -Allocate a new `node::Buffer` object with the specified size and optional data. Calls `node::Buffer::New()`. - -Note that when creating a `Buffer` using `Nan::NewBuffer()` and an existing `char*`, it is assumed that the ownership of the pointer is being transferred to the new `Buffer` for management. -When a `node::Buffer` instance is garbage collected and a `FreeCallback` has not been specified, `data` will be disposed of via a call to `free()`. -You _must not_ free the memory space manually once you have created a `Buffer` in this way. - -Signature: - -```c++ -Nan::MaybeLocal Nan::NewBuffer(uint32_t size) -Nan::MaybeLocal Nan::NewBuffer(char* data, uint32_t size) -Nan::MaybeLocal Nan::NewBuffer(char *data, - size_t length, - Nan::FreeCallback callback, - void *hint) -``` - - - -### Nan::CopyBuffer() - -Similar to [`Nan::NewBuffer()`](#api_nan_new_buffer) except that an implicit memcpy will occur within Node. Calls `node::Buffer::Copy()`. - -Management of the `char*` is left to the user, you should manually free the memory space if necessary as the new `Buffer` will have its own copy. - -Signature: - -```c++ -Nan::MaybeLocal Nan::CopyBuffer(const char *data, uint32_t size) -``` - - - -### Nan::FreeCallback() - -A free callback that can be provided to [`Nan::NewBuffer()`](#api_nan_new_buffer). -The supplied callback will be invoked when the `Buffer` undergoes garbage collection. - -Signature: - -```c++ -typedef void (*FreeCallback)(char *data, void *hint); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md deleted file mode 100644 index 46de1d7172b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/callback.md +++ /dev/null @@ -1,56 +0,0 @@ -## Nan::Callback - -`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution. - - - Nan::Callback - - -### Nan::Callback - -```c++ -class Callback { - public: - Callback(); - - explicit Callback(const v8::Local &fn); - - ~Callback(); - - bool operator==(const Callback &other) const; - - bool operator!=(const Callback &other) const; - - v8::Local operator*() const; - - v8::Local operator()(v8::Local target, - int argc = 0, - v8::Local argv[] = 0) const; - - v8::Local operator()(int argc = 0, - v8::Local argv[] = 0) const; - - void SetFunction(const v8::Local &fn); - - v8::Local GetFunction() const; - - bool IsEmpty() const; - - void Reset(const v8::Local &fn); - - void Reset(); - - v8::Local Call(v8::Local target, - int argc, - v8::Local argv[]) const; - - v8::Local Call(int argc, v8::Local argv[]) const; -}; -``` - -Example usage: - -```c++ -v8::Local function; -Nan::Callback callback(function); -callback.Call(0, 0); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md deleted file mode 100644 index d20861b5935..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/converters.md +++ /dev/null @@ -1,41 +0,0 @@ -## Converters - -NAN contains functions that convert `v8::Value`s to other `v8::Value` types and native types. Since type conversion is not guaranteed to succeed, they return `Nan::Maybe` types. These converters can be used in place of `value->ToX()` and `value->XValue()` (where `X` is one of the types, e.g. `Boolean`) in a way that provides a consistent interface across V8 versions. Newer versions of V8 use the new `v8::Maybe` and `v8::MaybeLocal` types for these conversions, older versions don't have this functionality so it is provided by NAN. - - - Nan::To() - - -### Nan::To() - -Converts a `v8::Local` to a different subtype of `v8::Value` or to a native data type. Returns a `Nan::MaybeLocal<>` or a `Nan::Maybe<>` accordingly. - -See [maybe_types.md](./maybe_types.md) for more information on `Nan::Maybe` types. - -Signatures: - -```c++ -// V8 types -Nan::MaybeLocal Nan::To(v8::Local val); -Nan::MaybeLocal Nan::To(v8::Local val); -Nan::MaybeLocal Nan::To(v8::Local val); -Nan::MaybeLocal Nan::To(v8::Local val); -Nan::MaybeLocal Nan::To(v8::Local val); -Nan::MaybeLocal Nan::To(v8::Local val); -Nan::MaybeLocal Nan::To(v8::Local val); - -// Native types -Nan::Maybe Nan::To(v8::Local val); -Nan::Maybe Nan::To(v8::Local val); -Nan::Maybe Nan::To(v8::Local val); -Nan::Maybe Nan::To(v8::Local val); -Nan::Maybe Nan::To(v8::Local val); -``` - -### Example - -```c++ -v8::Local val; -Nan::MaybeLocal str = Nan::To(val); -Nan::Maybe d = Nan::To(val); -``` - diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md deleted file mode 100644 index aac6e087fc6..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/errors.md +++ /dev/null @@ -1,226 +0,0 @@ -## Errors - -NAN includes helpers for creating, throwing and catching Errors as much of this functionality varies across the supported versions of V8 and must be abstracted. - -Note that an Error object is simply a specialized form of `v8::Value`. - -Also consult the V8 Embedders Guide section on [Exceptions](https://developers.google.com/v8/embed#exceptions) for more information. - - - Nan::Error() - - Nan::RangeError() - - Nan::ReferenceError() - - Nan::SyntaxError() - - Nan::TypeError() - - Nan::ThrowError() - - Nan::ThrowRangeError() - - Nan::ThrowReferenceError() - - Nan::ThrowSyntaxError() - - Nan::ThrowTypeError() - - Nan::FatalException() - - Nan::ErrnoException() - - Nan::TryCatch - - - -### Nan::Error() - -Create a new Error object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. - -Note that an Error object is simply a specialized form of `v8::Value`. - -Signature: - -```c++ -v8::Local Nan::Error(const char *msg); -v8::Local Nan::Error(v8::Local msg); -``` - - - -### Nan::RangeError() - -Create a new RangeError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. - -Note that an RangeError object is simply a specialized form of `v8::Value`. - -Signature: - -```c++ -v8::Local Nan::RangeError(const char *msg); -v8::Local Nan::RangeError(v8::Local msg); -``` - - - -### Nan::ReferenceError() - -Create a new ReferenceError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. - -Note that an ReferenceError object is simply a specialized form of `v8::Value`. - -Signature: - -```c++ -v8::Local Nan::ReferenceError(const char *msg); -v8::Local Nan::ReferenceError(v8::Local msg); -``` - - - -### Nan::SyntaxError() - -Create a new SyntaxError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. - -Note that an SyntaxError object is simply a specialized form of `v8::Value`. - -Signature: - -```c++ -v8::Local Nan::SyntaxError(const char *msg); -v8::Local Nan::SyntaxError(v8::Local msg); -``` - - - -### Nan::TypeError() - -Create a new TypeError object using the [v8::Exception](https://v8docs.nodesource.com/io.js-3.0/da/d6a/classv8_1_1_exception.html) class in a way that is compatible across the supported versions of V8. - -Note that an TypeError object is simply a specialized form of `v8::Value`. - -Signature: - -```c++ -v8::Local Nan::TypeError(const char *msg); -v8::Local Nan::TypeError(v8::Local msg); -``` - - - -### Nan::ThrowError() - -Throw an Error object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new Error object will be created. - -Signature: - -```c++ -void Nan::ThrowError(const char *msg); -void Nan::ThrowError(v8::Local msg); -void Nan::ThrowError(v8::Local error); -``` - - - -### Nan::ThrowRangeError() - -Throw an RangeError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new RangeError object will be created. - -Signature: - -```c++ -void Nan::ThrowRangeError(const char *msg); -void Nan::ThrowRangeError(v8::Local msg); -void Nan::ThrowRangeError(v8::Local error); -``` - - - -### Nan::ThrowReferenceError() - -Throw an ReferenceError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new ReferenceError object will be created. - -Signature: - -```c++ -void Nan::ThrowReferenceError(const char *msg); -void Nan::ThrowReferenceError(v8::Local msg); -void Nan::ThrowReferenceError(v8::Local error); -``` - - - -### Nan::ThrowSyntaxError() - -Throw an SyntaxError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new SyntaxError object will be created. - -Signature: - -```c++ -void Nan::ThrowSyntaxError(const char *msg); -void Nan::ThrowSyntaxError(v8::Local msg); -void Nan::ThrowSyntaxError(v8::Local error); -``` - - - -### Nan::ThrowTypeError() - -Throw an TypeError object (a specialized `v8::Value` as above) in the current context. If a `msg` is provided, a new TypeError object will be created. - -Signature: - -```c++ -void Nan::ThrowTypeError(const char *msg); -void Nan::ThrowTypeError(v8::Local msg); -void Nan::ThrowTypeError(v8::Local error); -``` - - -### Nan::FatalException() - -Replaces `node::FatalException()` which has a different API across supported versions of Node. For use with [`Nan::TryCatch`](#api_nan_try_catch). - -Signature: - -```c++ -void Nan::FatalException(const Nan::TryCatch& try_catch); -``` - - -### Nan::ErrnoException() - -Replaces `node::ErrnoException()` which has a different API across supported versions of Node. - -Signature: - -```c++ -v8::Local Nan::ErrnoException(int errorno, - const char* syscall = NULL, - const char* message = NULL, - const char* path = NULL); -``` - - - -### Nan::TryCatch - -A simple wrapper around [`v8::TryCatch`](https://v8docs.nodesource.com/io.js-3.0/d4/dc6/classv8_1_1_try_catch.html) compatible with all supported versions of V8. Can be used as a direct replacement in most cases. See also [`Nan::FatalException()`](#api_nan_fatal_exception) for an internal use compatible with `node::FatalException`. - -Signature: - -```c++ -class Nan::TryCatch { - public: - Nan::TryCatch(); - - bool HasCaught() const; - - bool CanContinue() const; - - v8::Local ReThrow(); - - v8::Local Exception() const; - - // Nan::MaybeLocal for older versions of V8 - v8::MaybeLocal StackTrace() const; - - v8::Local Message() const; - - void Reset(); - - void SetVerbose(bool value); - - void SetCaptureMessage(bool value); -}; -``` - diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md deleted file mode 100644 index 9ca9ceecfd0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/maybe_types.md +++ /dev/null @@ -1,512 +0,0 @@ -## Maybe Types - -The `Nan::MaybeLocal` and `Nan::Maybe` types are monads that encapsulate `v8::Local` handles that _may be empty_. - -* **Maybe Types** - - Nan::MaybeLocal - - Nan::Maybe - - Nan::Nothing - - Nan::Just -* **Maybe Helpers** - - Nan::Call() - - Nan::ToDetailString() - - Nan::ToArrayIndex() - - Nan::Equals() - - Nan::NewInstance() - - Nan::GetFunction() - - Nan::Set() - - Nan::ForceSet() - - Nan::Get() - - Nan::GetPropertyAttributes() - - Nan::Has() - - Nan::Delete() - - Nan::GetPropertyNames() - - Nan::GetOwnPropertyNames() - - Nan::SetPrototype() - - Nan::ObjectProtoToString() - - Nan::HasOwnProperty() - - Nan::HasRealNamedProperty() - - Nan::HasRealIndexedProperty() - - Nan::HasRealNamedCallbackProperty() - - Nan::GetRealNamedPropertyInPrototypeChain() - - Nan::GetRealNamedProperty() - - Nan::CallAsFunction() - - Nan::CallAsConstructor() - - Nan::GetSourceLine() - - Nan::GetLineNumber() - - Nan::GetStartColumn() - - Nan::GetEndColumn() - - Nan::CloneElementAt() - - Nan::MakeMaybe() - - -### Nan::MaybeLocal - -A `Nan::MaybeLocal` is a wrapper around [`v8::Local`](https://v8docs.nodesource.com/io.js-3.0/de/deb/classv8_1_1_local.html) that enforces a check that determines whether the `v8::Local` is empty before it can be used. - -If an API method returns a `Nan::MaybeLocal`, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a `v8::TerminateExecution` exception was thrown. In that case, an empty `Nan::MaybeLocal` is returned. - -Definition: - -```c++ -template class Nan::MaybeLocal { - public: - MaybeLocal(); - - template MaybeLocal(v8::Local that); - - bool IsEmpty() const; - - template bool ToLocal(v8::Local *out); - - // Will crash if the MaybeLocal<> is empty. - v8::Local ToLocalChecked(); - - template v8::Local FromMaybe(v8::Local default_value) const; -}; -``` - -See the documentation for [`v8::MaybeLocal`](https://v8docs.nodesource.com/io.js-3.0/d8/d7d/classv8_1_1_maybe_local.html) for further details. - - -### Nan::Maybe - -A simple `Nan::Maybe` type, representing an object which may or may not have a value, see https://hackage.haskell.org/package/base/docs/Data-Maybe.html. - -If an API method returns a `Nan::Maybe<>`, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a `v8::TerminateExecution` exception was thrown. In that case, a "Nothing" value is returned. - -Definition: - -```c++ -template class Nan::Maybe { - public: - bool IsNothing() const; - bool IsJust() const; - - // Will crash if the Maybe<> is nothing. - T FromJust(); - - T FromMaybe(const T& default_value); - - bool operator==(const Maybe &other); - - bool operator!=(const Maybe &other); -}; -``` - -See the documentation for [`v8::Maybe`](https://v8docs.nodesource.com/io.js-3.0/d9/d4b/classv8_1_1_maybe.html) for further details. - - -### Nan::Nothing - -Construct an empty `Nan::Maybe` type representing _nothing_. - -```c++ -template Nan::Maybe Nan::Nothing(); -``` - - -### Nan::Just - -Construct a `Nan::Maybe` type representing _just_ a value. - -```c++ -template Nan::Maybe Nan::Just(const T &t); -``` - - -### Nan::Call() - -A helper method for calling [`v8::Function#Call()`](https://v8docs.nodesource.com/io.js-3.0/d5/d54/classv8_1_1_function.html#a468a89f737af0612db10132799c827c0) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::Call(v8::Local fun, v8::Local recv, int argc, v8::Local argv[]); -``` - - - -### Nan::ToDetailString() - -A helper method for calling [`v8::Value#ToDetailString()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#a2f9770296dc2c8d274bc8cc0dca243e5) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::ToDetailString(v8::Local val); -``` - - - -### Nan::ToArrayIndex() - -A helper method for calling [`v8::Value#ToArrayIndex()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#acc5bbef3c805ec458470c0fcd6f13493) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::ToArrayIndex(v8::Local val); -``` - - - -### Nan::Equals() - -A helper method for calling [`v8::Value#Equals()`](https://v8docs.nodesource.com/io.js-3.0/dc/d0a/classv8_1_1_value.html#a0d9616ab2de899d4e3047c30a10c9285) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::Equals(v8::Local a, v8::Local(b)); -``` - - - -### Nan::NewInstance() - -A helper method for calling [`v8::Function#NewInstance()`](https://v8docs.nodesource.com/io.js-3.0/d5/d54/classv8_1_1_function.html#a691b13f7a553069732cbacf5ac8c62ec) and [`v8::ObjectTemplate#NewInstance()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ad605a7543cfbc5dab54cdb0883d14ae4) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::NewInstance(v8::Local h); -Nan::MaybeLocal Nan::NewInstance(v8::Local h, int argc, v8::Local argv[]); -Nan::MaybeLocal Nan::NewInstance(v8::Local h); -``` - - - -### Nan::GetFunction() - -A helper method for calling [`v8::FunctionTemplate#GetFunction()`](https://v8docs.nodesource.com/io.js-3.0/d8/d83/classv8_1_1_function_template.html#a56d904662a86eca78da37d9bb0ed3705) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::GetFunction(v8::Local t); -``` - - - -### Nan::Set() - -A helper method for calling [`v8::Object#Set()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a67604ea3734f170c66026064ea808f20) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::Set(v8::Local obj, - v8::Local key, - v8::Local value) -Nan::Maybe Nan::Set(v8::Local obj, - uint32_t index, - v8::Local value); -``` - - - -### Nan::ForceSet() - -A helper method for calling [`v8::Object#ForceSet()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a796b7b682896fb64bf1872747734e836) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::ForceSet(v8::Local obj, - v8::Local key, - v8::Local value, - v8::PropertyAttribute attribs = v8::None); -``` - - - -### Nan::Get() - -A helper method for calling [`v8::Object#Get()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a2565f03e736694f6b1e1cf22a0b4eac2) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::Get(v8::Local obj, - v8::Local key); -Nan::MaybeLocal Nan::Get(v8::Local obj, uint32_t index); -``` - - - -### Nan::GetPropertyAttributes() - -A helper method for calling [`v8::Object#GetPropertyAttributes()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a9b898894da3d1db2714fd9325a54fe57) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::GetPropertyAttributes( - v8::Local obj, - v8::Local key); -``` - - - -### Nan::Has() - -A helper method for calling [`v8::Object#Has()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab3c3d89ea7c2f9afd08965bd7299a41d) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::Has(v8::Local obj, v8::Local key); -Nan::Maybe Nan::Has(v8::Local obj, uint32_t index); -``` - - - -### Nan::Delete() - -A helper method for calling [`v8::Object#Delete()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a2fa0f5a592582434ed1ceceff7d891ef) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::Delete(v8::Local obj, - v8::Local key); -Nan::Maybe Nan::Delete(v8::Local obj, uint32_t index); -``` - - - -### Nan::GetPropertyNames() - -A helper method for calling [`v8::Object#GetPropertyNames()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#aced885270cfd2c956367b5eedc7fbfe8) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::GetPropertyNames(v8::Local obj); -``` - - - -### Nan::GetOwnPropertyNames() - -A helper method for calling [`v8::Object#GetOwnPropertyNames()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a79a6e4d66049b9aa648ed4dfdb23e6eb) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::GetOwnPropertyNames(v8::Local obj); -``` - - - -### Nan::SetPrototype() - -A helper method for calling [`v8::Object#SetPrototype()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a442706b22fceda6e6d1f632122a9a9f4) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::SetPrototype(v8::Local obj, - v8::Local prototype); -``` - - - -### Nan::ObjectProtoToString() - -A helper method for calling [`v8::Object#ObjectProtoToString()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab7a92b4dcf822bef72f6c0ac6fea1f0b) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::ObjectProtoToString(v8::Local obj); -``` - - - -### Nan::HasOwnProperty() - -A helper method for calling [`v8::Object#HasOwnProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab7b7245442ca6de1e1c145ea3fd653ff) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::HasOwnProperty(v8::Local obj, - v8::Local key); -``` - - - -### Nan::HasRealNamedProperty() - -A helper method for calling [`v8::Object#HasRealNamedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ad8b80a59c9eb3c1e6c3cd6c84571f767) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::HasRealNamedProperty(v8::Local obj, - v8::Local key); -``` - - - -### Nan::HasRealIndexedProperty() - -A helper method for calling [`v8::Object#HasRealIndexedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#af94fc1135a5e74a2193fb72c3a1b9855) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::HasRealIndexedProperty(v8::Local obj, - uint32_t index); -``` - - - -### Nan::HasRealNamedCallbackProperty() - -A helper method for calling [`v8::Object#HasRealNamedCallbackProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#af743b7ea132b89f84d34d164d0668811) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::HasRealNamedCallbackProperty( - v8::Local obj, - v8::Local key); -``` - - - -### Nan::GetRealNamedPropertyInPrototypeChain() - -A helper method for calling [`v8::Object#GetRealNamedPropertyInPrototypeChain()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a8700b1862e6b4783716964ba4d5e6172) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::GetRealNamedPropertyInPrototypeChain( - v8::Local obj, - v8::Local key); -``` - - - -### Nan::GetRealNamedProperty() - -A helper method for calling [`v8::Object#GetRealNamedProperty()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a84471a824576a5994fdd0ffcbf99ccc0) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::GetRealNamedProperty(v8::Local obj, - v8::Local key); -``` - - - -### Nan::CallAsFunction() - -A helper method for calling [`v8::Object#CallAsFunction()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a9ef18be634e79b4f0cdffa1667a29f58) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::CallAsFunction(v8::Local obj, - v8::Local recv, - int argc, - v8::Local argv[]); -``` - - - -### Nan::CallAsConstructor() - -A helper method for calling [`v8::Object#CallAsConstructor()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a50d571de50d0b0dfb28795619d07a01b) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::CallAsConstructor(v8::Local obj, - int argc, - v8::Local argv[]); -``` - - - -### Nan::GetSourceLine() - -A helper method for calling [`v8::Message#GetSourceLine()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#a849f7a6c41549d83d8159825efccd23a) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::GetSourceLine(v8::Local msg); -``` - - - -### Nan::GetLineNumber() - -A helper method for calling [`v8::Message#GetLineNumber()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#adbe46c10a88a6565f2732a2d2adf99b9) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::GetLineNumber(v8::Local msg); -``` - - - -### Nan::GetStartColumn() - -A helper method for calling [`v8::Message#GetStartColumn()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#a60ede616ba3822d712e44c7a74487ba6) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::GetStartColumn(v8::Local msg); -``` - - - -### Nan::GetEndColumn() - -A helper method for calling [`v8::Message#GetEndColumn()`](https://v8docs.nodesource.com/io.js-3.0/d9/d28/classv8_1_1_message.html#aaa004cf19e529da980bc19fcb76d93be) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::Maybe Nan::GetEndColumn(v8::Local msg); -``` - - - -### Nan::CloneElementAt() - -A helper method for calling [`v8::Array#CloneElementAt()`](https://v8docs.nodesource.com/io.js-3.0/d3/d32/classv8_1_1_array.html#a1d3a878d4c1c7cae974dd50a1639245e) in a way compatible across supported versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::CloneElementAt(v8::Local array, uint32_t index); -``` - - -### Nan::MakeMaybe() - -Wraps a `v8::Local<>` in a `Nan::MaybeLocal<>`. When called with a `Nan::MaybeLocal<>` it just returns its argument. This is useful in generic template code that builds on NAN. - -Synopsis: - -```c++ - MaybeLocal someNumber = MakeMaybe(New(3.141592654)); - MaybeLocal someString = MakeMaybe(New("probably")); -``` - -Signature: - -```c++ -template class MaybeMaybe> -Nan::MaybeLocal Nan::MakeMaybe(MaybeMaybe v); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md deleted file mode 100644 index 0411a7056b5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/methods.md +++ /dev/null @@ -1,659 +0,0 @@ -## JavaScript-accessible methods - -A _template_ is a blueprint for JavaScript functions and objects in a context. You can use a template to wrap C++ functions and data structures within JavaScript objects so that they can be manipulated from JavaScript. See the V8 Embedders Guide section on [Templates](https://developers.google.com/v8/embed#templates) for further information. - -In order to expose functionality to JavaScript via a template, you must provide it to V8 in a form that it understands. Across the versions of V8 supported by NAN, JavaScript-accessible method signatures vary widely, NAN fully abstracts method declaration and provides you with an interface that is similar to the most recent V8 API but is backward-compatible with older versions that still use the now-deceased `v8::Argument` type. - -* **Method argument types** - - Nan::FunctionCallbackInfo - - Nan::PropertyCallbackInfo - - Nan::ReturnValue -* **Method declarations** - - Method declaration - - Getter declaration - - Setter declaration - - Property getter declaration - - Property setter declaration - - Property enumerator declaration - - Property deleter declaration - - Property query declaration - - Index getter declaration - - Index setter declaration - - Index enumerator declaration - - Index deleter declaration - - Index query declaration -* Method and template helpers - - Nan::SetMethod() - - Nan::SetPrototypeMethod() - - Nan::SetAccessor() - - Nan::SetNamedPropertyHandler() - - Nan::SetIndexedPropertyHandler() - - Nan::SetTemplate() - - Nan::SetPrototypeTemplate() - - Nan::SetInstanceTemplate() - - Nan::SetCallHandler() - - Nan::SetCallAsFunctionHandler() - - -### Nan::FunctionCallbackInfo - -`Nan::FunctionCallbackInfo` should be used in place of [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/dd/d0d/classv8_1_1_function_callback_info.html), even with older versions of Node where `v8::FunctionCallbackInfo` does not exist. - -Definition: - -```c++ -template class FunctionCallbackInfo { - public: - ReturnValue GetReturnValue() const; - v8::Local Callee(); - v8::Local Data(); - v8::Local Holder(); - bool IsConstructCall(); - int Length() const; - v8::Local operator[](int i) const; - v8::Local This() const; - v8::Isolate *GetIsolate() const; -}; -``` - -See the [`v8::FunctionCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/dd/d0d/classv8_1_1_function_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from methods. - - -### Nan::PropertyCallbackInfo - -`Nan::PropertyCallbackInfo` should be used in place of [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d7/dc5/classv8_1_1_property_callback_info.html), even with older versions of Node where `v8::PropertyCallbackInfo` does not exist. - -Definition: - -```c++ -template class PropertyCallbackInfo : public PropertyCallbackInfoBase { - public: - ReturnValue GetReturnValue() const; - v8::Isolate* GetIsolate() const; - v8::Local Data() const; - v8::Local This() const; - v8::Local Holder() const; -}; -``` - -See the [`v8::PropertyCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d7/dc5/classv8_1_1_property_callback_info.html) documentation for usage details on these. See [`Nan::ReturnValue`](#api_nan_return_value) for further information on how to set a return value from property accessor methods. - - -### Nan::ReturnValue - -`Nan::ReturnValue` is used in place of [`v8::ReturnValue`](https://v8docs.nodesource.com/io.js-3.0/da/da7/classv8_1_1_return_value.html) on both [`Nan::FunctionCallbackInfo`](#api_nan_function_callback_info) and [`Nan::PropertyCallbackInfo`](#api_nan_property_callback_info) as the return type of `GetReturnValue()`. - -Example usage: - -```c++ -void EmptyArray(const Nan::FunctionCallbackInfo& info) { - info.GetReturnValue().Set(Nan::New()); -} -``` - -Definition: - -```c++ -template class ReturnValue { - public: - // Handle setters - template void Set(const v8::Local &handle); - template void Set(const Nan::Global &handle); - - // Fast primitive setters - void Set(bool value); - void Set(double i); - void Set(int32_t i); - void Set(uint32_t i); - - // Fast JS primitive setters - void SetNull(); - void SetUndefined(); - void SetEmptyString(); - - // Convenience getter for isolate - v8::Isolate *GetIsolate() const; -}; -``` - -See the documentation on [`v8::ReturnValue`](https://v8docs.nodesource.com/io.js-3.0/da/da7/classv8_1_1_return_value.html) for further information on this. - - -### Method declaration - -JavaScript-accessible methods should be declared with the following signature to form a `Nan::FunctionCallback`: - -```c++ -typedef void(*FunctionCallback)(const FunctionCallbackInfo&); -``` - -Example: - -```c++ -void MethodName(const Nan::FunctionCallbackInfo& info) { - ... -} -``` - -You do not need to declare a new `HandleScope` within a method as one is implicitly created for you. - -**Example usage** - -```c++ -// .h: -class Foo : public Nan::ObjectWrap { - ... - - static void Bar(const Nan::FunctionCallbackInfo& info); - static void Baz(const Nan::FunctionCallbackInfo& info); -} - - -// .cc: -void Foo::Bar(const Nan::FunctionCallbackInfo& info) { - ... -} - -void Foo::Baz(const Nan::FunctionCallbackInfo& info) { - ... -} -``` - -A helper macro `NAN_METHOD(methodname)` exists, compatible with NAN v1 method declarations. - -**Example usage with `NAN_METHOD(methodname)`** - -```c++ -// .h: -class Foo : public Nan::ObjectWrap { - ... - - static NAN_METHOD(Bar); - static NAN_METHOD(Baz); -} - - -// .cc: -NAN_METHOD(Foo::Bar) { - ... -} - -NAN_METHOD(Foo::Baz) { - ... -} -``` - -Use [`Nan::SetPrototypeMethod`](#api_nan_set_prototype_method) to attach a method to a JavaScript function prototype or [`Nan::SetMethod`](#api_nan_set_method) to attach a method directly on a JavaScript object. - - -### Getter declaration - -JavaScript-accessible getters should be declared with the following signature to form a `Nan::GetterCallback`: - -```c++ -typedef void(*GetterCallback)(v8::Local, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void GetterName(v8::Local property, - const Nan::PropertyCallbackInfo& info) { - ... -} -``` - -You do not need to declare a new `HandleScope` within a getter as one is implicitly created for you. - -A helper macro `NAN_GETTER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors). - - -### Setter declaration - -JavaScript-accessible setters should be declared with the following signature to form a Nan::SetterCallback: - -```c++ -typedef void(*SetterCallback)(v8::Local, - v8::Local, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void SetterName(v8::Local property, - v8::Local value, - const Nan::PropertyCallbackInfo& info) { - ... -} -``` - -You do not need to declare a new `HandleScope` within a setter as one is implicitly created for you. - -A helper macro `NAN_SETTER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on [Accessors](https://developers.google.com/v8/embed#accesssors). - - -### Property getter declaration - -JavaScript-accessible property getters should be declared with the following signature to form a Nan::PropertyGetterCallback: - -```c++ -typedef void(*PropertyGetterCallback)(v8::Local, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void PropertyGetterName(v8::Local property, - const Nan::PropertyCallbackInfo& info) { - ... -} -``` - -You do not need to declare a new `HandleScope` within a property getter as one is implicitly created for you. - -A helper macro `NAN_PROPERTY_GETTER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Property setter declaration - -JavaScript-accessible property setters should be declared with the following signature to form a Nan::PropertySetterCallback: - -```c++ -typedef void(*PropertySetterCallback)(v8::Local, - v8::Local, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void PropertySetterName(v8::Local property, - v8::Local value, - const Nan::PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a property setter as one is implicitly created for you. - -A helper macro `NAN_PROPERTY_SETTER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Property enumerator declaration - -JavaScript-accessible property enumerators should be declared with the following signature to form a Nan::PropertyEnumeratorCallback: - -```c++ -typedef void(*PropertyEnumeratorCallback)(const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void PropertyEnumeratorName(const Nan::PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a property enumerator as one is implicitly created for you. - -A helper macro `NAN_PROPERTY_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Property deleter declaration - -JavaScript-accessible property deleters should be declared with the following signature to form a Nan::PropertyDeleterCallback: - -```c++ -typedef void(*PropertyDeleterCallback)(v8::Local, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void PropertyDeleterName(v8::Local property, - const Nan::PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a property deleter as one is implicitly created for you. - -A helper macro `NAN_PROPERTY_DELETER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Property query declaration - -JavaScript-accessible property query methods should be declared with the following signature to form a Nan::PropertyQueryCallback: - -```c++ -typedef void(*PropertyQueryCallback)(v8::Local, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void PropertyQueryName(v8::Local property, - const Nan::PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a property query method as one is implicitly created for you. - -A helper macro `NAN_PROPERTY_QUERY(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on named property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Index getter declaration - -JavaScript-accessible index getter methods should be declared with the following signature to form a Nan::IndexGetterCallback: - -```c++ -typedef void(*IndexGetterCallback)(uint32_t, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void IndexGetterName(uint32_t index, const PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a index getter as one is implicitly created for you. - -A helper macro `NAN_INDEX_GETTER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Index setter declaration - -JavaScript-accessible index setter methods should be declared with the following signature to form a Nan::IndexSetterCallback: - -```c++ -typedef void(*IndexSetterCallback)(uint32_t, - v8::Local, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void IndexSetterName(uint32_t index, - v8::Local value, - const PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a index setter as one is implicitly created for you. - -A helper macro `NAN_INDEX_SETTER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Index enumerator declaration - -JavaScript-accessible index enumerator methods should be declared with the following signature to form a Nan::IndexEnumeratorCallback: - -```c++ -typedef void(*IndexEnumeratorCallback)(const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void IndexEnumeratorName(const PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a index enumerator as one is implicitly created for you. - -A helper macro `NAN_INDEX_ENUMERATOR(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Index deleter declaration - -JavaScript-accessible index deleter methods should be declared with the following signature to form a Nan::IndexDeleterCallback: - -```c++ -typedef void(*IndexDeleterCallback)(uint32_t, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void IndexDeleterName(uint32_t index, const PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a index deleter as one is implicitly created for you. - -A helper macro `NAN_INDEX_DELETER(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Index query declaration - -JavaScript-accessible index query methods should be declared with the following signature to form a Nan::IndexQueryCallback: - -```c++ -typedef void(*IndexQueryCallback)(uint32_t, - const PropertyCallbackInfo&); -``` - -Example: - -```c++ -void IndexQueryName(uint32_t index, const PropertyCallbackInfo& info); -``` - -You do not need to declare a new `HandleScope` within a index query method as one is implicitly created for you. - -A helper macro `NAN_INDEX_QUERY(methodname)` exists, compatible with NAN v1 method declarations. - -Also see the V8 Embedders Guide documentation on indexed property [Interceptors](https://developers.google.com/v8/embed#interceptors). - - -### Nan::SetMethod() - -Sets a method with a given name directly on a JavaScript object where the method has the `Nan::FunctionCallback` signature (see Method declaration). - -Signature: - -```c++ -void Nan::SetMethod(v8::Local recv, - const char *name, - Nan::FunctionCallback callback) -void Nan::SetMethod(v8::Local templ, - const char *name, - Nan::FunctionCallback callback) -``` - - -### Nan::SetPrototypeMethod() - -Sets a method with a given name on a `FunctionTemplate`'s prototype where the method has the `Nan::FunctionCallback` signature (see Method declaration). - -Signature: - -```c++ -void Nan::SetPrototypeMethod(v8::Local recv, - const char* name, - Nan::FunctionCallback callback) -``` - - -### Nan::SetAccessor() - -Sets getters and setters for a property with a given name on an `ObjectTemplate` or a plain `Object`. Accepts getters with the `Nan::GetterCallback` signature (see Getter declaration) and setters with the `Nan::SetterCallback` signature (see Setter declaration). - -Signature: - -```c++ -void SetAccessor(v8::Local tpl, - v8::Local name, - Nan::GetterCallback getter, - Nan::SetterCallback setter = 0, - v8::Local data = v8::Local(), - v8::AccessControl settings = v8::DEFAULT, - v8::PropertyAttribute attribute = v8::None, - imp::Sig signature = imp::Sig()); -bool SetAccessor(v8::Local obj, - v8::Local name, - Nan::GetterCallback getter, - Nan::SetterCallback setter = 0, - v8::Local data = v8::Local(), - v8::AccessControl settings = v8::DEFAULT, - v8::PropertyAttribute attribute = v8::None) -``` - -See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#aa90691622f01269c6a11391d372ca0c5) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#a3f9dee085f5ec346465f1dc924325043) for further information about how to use `Nan::SetAccessor()`. - - -### Nan::SetNamedPropertyHandler() - -Sets named property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts: - -* Property getters with the `Nan::PropertyGetterCallback` signature (see Property getter declaration) -* Property setters with the `Nan::PropertySetterCallback` signature (see Property setter declaration) -* Property query methods with the `Nan::PropertyQueryCallback` signature (see Property query declaration) -* Property deleters with the `Nan::PropertyDeleterCallback` signature (see Property deleter declaration) -* Property enumerators with the `Nan::PropertyEnumeratorCallback` signature (see Property enumerator declaration) - -Signature: - -```c++ -void SetNamedPropertyHandler(v8::Local tpl, - Nan::PropertyGetterCallback getter, - Nan::PropertySetterCallback setter = 0, - Nan::PropertyQueryCallback query = 0, - Nan::PropertyDeleterCallback deleter = 0, - Nan::PropertyEnumeratorCallback enumerator = 0, - v8::Local data = v8::Local()) -``` - -See the V8 [`ObjectTemplate#SetNamedPropertyHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#a34d1cc45b642cd131706663801aadd76) for further information about how to use `Nan::SetNamedPropertyHandler()`. - - -### Nan::SetIndexedPropertyHandler() - -Sets indexed property getters, setters, query, deleter and enumerator methods on an `ObjectTemplate`. Accepts: - -* Indexed property getters with the `Nan::IndexGetterCallback` signature (see Index getter declaration) -* Indexed property setters with the `Nan::IndexSetterCallback` signature (see Index setter declaration) -* Indexed property query methods with the `Nan::IndexQueryCallback` signature (see Index query declaration) -* Indexed property deleters with the `Nan::IndexDeleterCallback` signature (see Index deleter declaration) -* Indexed property enumerators with the `Nan::IndexEnumeratorCallback` signature (see Index enumerator declaration) - -Signature: - -```c++ -void SetIndexedPropertyHandler(v8::Local tpl, - Nan::IndexGetterCallback getter, - Nan::IndexSetterCallback setter = 0, - Nan::IndexQueryCallback query = 0, - Nan::IndexDeleterCallback deleter = 0, - Nan::IndexEnumeratorCallback enumerator = 0, - v8::Local data = v8::Local()) -``` - -See the V8 [`ObjectTemplate#SetIndexedPropertyHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ac0234cbede45d51778bb5f6a32a9e125) for further information about how to use `Nan::SetIndexedPropertyHandler()`. - - -### Nan::SetTemplate() - -Adds properties on an `Object`'s or `Function`'s template. - -Signature: - -```c++ -void Nan::SetTemplate(v8::Local templ, - const char *name, - v8::Local value); -void Nan::SetTemplate(v8::Local templ, - v8::Local name, - v8::Local value, - v8::PropertyAttribute attributes) -``` - -Calls the `Template`'s [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). - - -### Nan::SetPrototypeTemplate() - -Adds properties on an `Object`'s or `Function`'s prototype template. - -Signature: - -```c++ -void Nan::SetPrototypeTemplate(v8::Local templ, - const char *name, - v8::Local value); -void Nan::SetPrototypeTemplate(v8::Local templ, - v8::Local name, - v8::Local value, - v8::PropertyAttribute attributes) -``` - -Calls the `FunctionTemplate`'s _PrototypeTemplate's_ [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). - - -### Nan::SetInstanceTemplate() - -Use to add instance properties on `FunctionTemplate`'s. - -Signature: - -```c++ -void Nan::SetInstanceTemplate(v8::Local templ, - const char *name, - v8::Local value); -void Nan::SetInstanceTemplate(v8::Local templ, - v8::Local name, - v8::Local value, - v8::PropertyAttribute attributes) -``` - -Calls the `FunctionTemplate`'s _InstanceTemplate's_ [`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf). - - -### Nan::SetCallHandler() - -Set the call-handler callback for a `v8::FunctionTemplate`. -This callback is called whenever the function created from this FunctionTemplate is called. - -Signature: - -```c++ -void Nan::SetCallHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) -``` - -Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/io.js-3.0/d8/d83/classv8_1_1_function_template.html#a26cf14e36aa1a47091b98536d08ea821). - - -### Nan::SetCallAsFunctionHandler() - -Sets the callback to be used when calling instances created from the `v8::ObjectTemplate` as a function. -If no callback is set, instances behave like normal JavaScript objects that cannot be called as a function. - -Signature: - -```c++ -void Nan::SetCallAsFunctionHandler(v8::Local templ, Nan::FunctionCallback callback, v8::Local data = v8::Local()) -``` - -Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ae0a0e72fb0c5e5f32e255fe5bcc7316a). - diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md deleted file mode 100644 index c0734bd7350..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/new.md +++ /dev/null @@ -1,147 +0,0 @@ -## New - -NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8. - - - Nan::New() - - Nan::Undefined() - - Nan::Null() - - Nan::True() - - Nan::False() - - Nan::EmptyString() - - - -### Nan::New() - -`Nan::New()` should be used to instantiate new JavaScript objects. - -Refer to the specific V8 type in the [V8 documentation](https://v8docs.nodesource.com/io.js-3.0/d1/d83/classv8_1_1_data.html) for information on the types of arguments required for instantiation. - -Signatures: - -Return types are mostly omitted from the signatures for simplicity. In most cases the type will be contained within a `v8::Local`. The following types will be contained within a `Nan::MaybeLocal`: `v8::String`, `v8::Date`, `v8::RegExp`, `v8::Script`, `v8::UnboundScript`. - -Empty objects: - -```c++ -Nan::New(); -``` - -Generic single and multiple-argument: - -```c++ -Nan::New(A0 arg0); -Nan::New(A0 arg0, A1 arg1); -Nan::New(A0 arg0, A1 arg1, A2 arg2); -Nan::New(A0 arg0, A1 arg1, A2 arg2, A3 arg3); -``` - -For creating `v8::FunctionTemplate` and `v8::Function` objects: - -_The definition of `Nan::FunctionCallback` can be found in the [Method declaration](./methods.md#api_nan_method) documentation._ - -```c++ -Nan::New(Nan::FunctionCallback callback, - v8::Local data = v8::Local()); -Nan::New(Nan::FunctionCallback callback, - v8::Local data = v8::Local(), - A2 a2 = A2()); -``` - -Native number types: - -```c++ -v8::Local Nan::New(bool value); -v8::Local Nan::New(int32_t value); -v8::Local Nan::New(uint32_t value); -v8::Local Nan::New(double value); -``` - -String types: - -```c++ -Nan::MaybeLocal Nan::New(std::string const& value); -Nan::MaybeLocal Nan::New(const char * value, int length); -Nan::MaybeLocal Nan::New(const char * value); -Nan::MaybeLocal Nan::New(const uint16_t * value); -Nan::MaybeLocal Nan::New(const uint16_t * value, int length); -``` - -Specialized types: - -```c++ -v8::Local Nan::New(v8::String::ExternalStringResource * value); -v8::Local Nan::New(Nan::ExternalOneByteStringResource * value); -v8::Local Nan::New(v8::Local pattern, v8::RegExp::Flags flags); -``` - -Note that `Nan::ExternalOneByteStringResource` maps to [`v8::String::ExternalOneByteStringResource`](https://v8docs.nodesource.com/io.js-3.0/d9/db3/classv8_1_1_string_1_1_external_one_byte_string_resource.html), and `v8::String::ExternalAsciiStringResource` in older versions of V8. - - - -### Nan::Undefined() - -A helper method to reference the `v8::Undefined` object in a way that is compatible across all supported versions of V8. - -Signature: - -```c++ -v8::Local Nan::Undefined() -``` - - -### Nan::Null() - -A helper method to reference the `v8::Null` object in a way that is compatible across all supported versions of V8. - -Signature: - -```c++ -v8::Local Nan::Null() -``` - - -### Nan::True() - -A helper method to reference the `v8::Boolean` object representing the `true` value in a way that is compatible across all supported versions of V8. - -Signature: - -```c++ -v8::Local Nan::True() -``` - - -### Nan::False() - -A helper method to reference the `v8::Boolean` object representing the `false` value in a way that is compatible across all supported versions of V8. - -Signature: - -```c++ -v8::Local Nan::False() -``` - - -### Nan::EmptyString() - -Call [`v8::String::Empty`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a7c1bc8886115d7ee46f1d571dd6ebc6d) to reference the empty string in a way that is compatible across all supported versions of V8. - -Signature: - -```c++ -v8::Local Nan::EmptyString() -``` - - - -### Nan::NewOneByteString() - -An implementation of [`v8::String::NewFromOneByte()`](https://v8docs.nodesource.com/io.js-3.0/d2/db3/classv8_1_1_string.html#a5264d50b96d2c896ce525a734dc10f09) provided for consistent availability and API across supported versions of V8. Allocates a new string from Latin-1 data. - -Signature: - -```c++ -Nan::MaybeLocal Nan::NewOneByteString(const uint8_t * value, - int length = -1) -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md deleted file mode 100644 index 8aa080f52c0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/node_misc.md +++ /dev/null @@ -1,63 +0,0 @@ -## Miscellaneous Node Helpers - - - Nan::MakeCallback() - - NAN_MODULE_INIT() - - Nan::Export() - - - -### Nan::MakeCallback() - -Wrappers around `node::MakeCallback()` providing a consistent API across all supported versions of Node. - -Use `MakeCallback()` rather than using `v8::Function#Call()` directly in order to properly process internal Node functionality including domains, async hooks, the microtask queue, and other debugging functionality. - -Signatures: - -```c++ -v8::Local Nan::MakeCallback(v8::Local target, - v8::Local func, - int argc, - v8::Local* argv); -v8::Local Nan::MakeCallback(v8::Local target, - v8::Local symbol, - int argc, - v8::Local* argv); -v8::Local Nan::MakeCallback(v8::Local target, - const char* method, - int argc, - v8::Local* argv); -``` - - - -### NAN_MODULE_INIT() - -Used to define the entry point function to a Node add-on. Creates a function with a given `name` that receives a `target` object representing the equivalent of the JavaScript `exports` object. - -See example below. - - -### Nan::Export() - -A simple helper to register a `v8::FunctionTemplate` from a JavaScript-accessible method (see [Methods](./methods.md)) as a property on an object. Can be used in a way similar to assigning properties to `module.exports` in JavaScript. - -Signature: - -```c++ -void Export(v8::Local target, const char *name, Nan::FunctionCallback f) -``` - -Also available as the shortcut `NAN_EXPORT` macro. - -Example: - -```c++ -NAN_METHOD(Foo) { - ... -} - -NAN_MODULE_INIT(Init) { - NAN_EXPORT(target, Foo); -} -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md deleted file mode 100644 index 27b0636ba57..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/object_wrappers.md +++ /dev/null @@ -1,263 +0,0 @@ -## Object Wrappers - -The `ObjectWrap` class can be used to make wrapped C++ objects and a factory of wrapped objects. - - - Nan::ObjectWrap - - - -### Nan::ObjectWrap() - -A reimplementation of `node::ObjectWrap` that adds some API not present in older versions of Node. Should be preferred over `node::ObjectWrap` in all cases for consistency. - -Definition: - -```c++ -class ObjectWrap { - public: - ObjectWrap(); - - virtual ~ObjectWrap(); - - template - static inline T* Unwrap(v8::Local handle); - - inline v8::Local handle(); - - inline Nan::Persistent& persistent(); - - protected: - inline void Wrap(v8::Local handle); - - inline void MakeWeak(); - - /* Ref() marks the object as being attached to an event loop. - * Refed objects will not be garbage collected, even if - * all references are lost. - */ - virtual void Ref(); - - /* Unref() marks an object as detached from the event loop. This is its - * default state. When an object with a "weak" reference changes from - * attached to detached state it will be freed. Be careful not to access - * the object after making this call as it might be gone! - * (A "weak reference" means an object that only has a - * persistant handle.) - * - * DO NOT CALL THIS FROM DESTRUCTOR - */ - virtual void Unref(); - - int refs_; // ro -}; -``` - -See the Node documentation on [Wrapping C++ Objects](https://nodejs.org/api/addons.html#addons_wrapping_c_objects) for more details. - -### This vs. Holder - -When calling `Unwrap`, it is important that the argument is indeed some JavaScript object which got wrapped by a `Wrap` call for this class or any derived class. -The `Signature` installed by [`Nan::SetPrototypeMethod()`](methods.md#api_nan_set_prototype_method) does ensure that `info.Holder()` is just such an instance. -In Node 0.12 and later, `info.This()` will also be of such a type, since otherwise the invocation will get rejected. -However, in Node 0.10 and before it was possible to invoke a method on a JavaScript object which just had the extension type in its prototype chain. -In such a situation, calling `Unwrap` on `info.This()` will likely lead to a failed assertion causing a crash, but could lead to even more serious corruption. - -On the other hand, calling `Unwrap` in an [accessor](methods.md#api_nan_set_accessor) should not use `Holder()` if the accessor is defined on the prototype. -So either define your accessors on the instance template, -or use `This()` after verifying that it is indeed a valid object. - -### Examples - -#### Basic - -```c++ -class MyObject : public Nan::ObjectWrap { - public: - static NAN_MODULE_INIT(Init) { - v8::Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("MyObject").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - SetPrototypeMethod(tpl, "getHandle", GetHandle); - SetPrototypeMethod(tpl, "getValue", GetValue); - - constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked()); - Nan::Set(target, Nan::New("MyObject").ToLocalChecked(), - Nan::GetFunction(tpl).ToLocalChecked()); - } - - private: - explicit MyObject(double value = 0) : value_(value) {} - ~MyObject() {} - - static NAN_METHOD(New) { - if (info.IsConstructCall()) { - double value = info[0]->IsUndefined() ? 0 : Nan::To(info[0]).FromJust(); - MyObject *obj = new MyObject(value); - obj->Wrap(info.This()); - info.GetReturnValue().Set(info.This()); - } else { - const int argc = 1; - v8::Local argv[argc] = {info[0]}; - v8::Local cons = Nan::New(constructor()); - info.GetReturnValue().Set(cons->NewInstance(argc, argv)); - } - } - - static NAN_METHOD(GetHandle) { - MyObject* obj = Nan::ObjectWrap::Unwrap(info.Holder()); - info.GetReturnValue().Set(obj->handle()); - } - - static NAN_METHOD(GetValue) { - MyObject* obj = Nan::ObjectWrap::Unwrap(info.Holder()); - info.GetReturnValue().Set(obj->value_); - } - - static inline Nan::Persistent & constructor() { - static Nan::Persistent my_constructor; - return my_constructor; - } - - double value_; -}; - -NODE_MODULE(objectwrapper, MyObject::Init) -``` - -To use in Javascript: - -```Javascript -var objectwrapper = require('bindings')('objectwrapper'); - -var obj = new objectwrapper.MyObject(5); -console.log('Should be 5: ' + obj.getValue()); -``` - -#### Factory of wrapped objects - -```c++ -class MyFactoryObject : public Nan::ObjectWrap { - public: - static NAN_MODULE_INIT(Init) { - v8::Local tpl = Nan::New(New); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Nan::SetPrototypeMethod(tpl, "getValue", GetValue); - - constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked()); - } - - static NAN_METHOD(NewInstance) { - v8::Local cons = Nan::New(constructor()); - double value = info[0]->IsNumber() ? Nan::To(info[0]).FromJust() : 0; - const int argc = 1; - v8::Local argv[1] = {Nan::New(value)}; - info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked()); - } - - // Needed for the next example: - inline double value() const { - return value_; - } - - private: - explicit MyFactoryObject(double value = 0) : value_(value) {} - ~MyFactoryObject() {} - - static NAN_METHOD(New) { - if (info.IsConstructCall()) { - double value = info[0]->IsNumber() ? Nan::To(info[0]).FromJust() : 0; - MyFactoryObject * obj = new MyFactoryObject(value); - obj->Wrap(info.This()); - info.GetReturnValue().Set(info.This()); - } else { - const int argc = 1; - v8::Local argv[argc] = {info[0]}; - v8::Local cons = Nan::New(constructor()); - info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked()); - } - } - - static NAN_METHOD(GetValue) { - MyFactoryObject* obj = ObjectWrap::Unwrap(info.Holder()); - info.GetReturnValue().Set(obj->value_); - } - - static inline Nan::Persistent & constructor() { - static Nan::Persistent my_constructor; - return my_constructor; - } - - double value_; -}; - -NAN_MODULE_INIT(Init) { - MyFactoryObject::Init(target); - Nan::Set(target, - Nan::New("newFactoryObjectInstance").ToLocalChecked(), - Nan::GetFunction( - Nan::New(MyFactoryObject::NewInstance)).ToLocalChecked() - ); -} - -NODE_MODULE(wrappedobjectfactory, Init) -``` - -To use in Javascript: - -```Javascript -var wrappedobjectfactory = require('bindings')('wrappedobjectfactory'); - -var obj = wrappedobjectfactory.newFactoryObjectInstance(10); -console.log('Should be 10: ' + obj.getValue()); -``` - -#### Passing wrapped objects around - -Use the `MyFactoryObject` class above along with the following: - -```c++ -static NAN_METHOD(Sum) { - Nan::MaybeLocal maybe1 = Nan::To(info[0]); - Nan::MaybeLocal maybe2 = Nan::To(info[1]); - - // Quick check: - if (maybe1.IsEmpty() || maybe2.IsEmpty()) { - // return value is undefined by default - return; - } - - MyFactoryObject* obj1 = - Nan::ObjectWrap::Unwrap(maybe1.ToLocalChecked()); - MyFactoryObject* obj2 = - Nan::ObjectWrap::Unwrap(maybe2.ToLocalChecked()); - - info.GetReturnValue().Set(Nan::New(obj1->value() + obj2->value())); -} - -NAN_MODULE_INIT(Init) { - MyFactoryObject::Init(target); - Nan::Set(target, - Nan::New("newFactoryObjectInstance").ToLocalChecked(), - Nan::GetFunction( - Nan::New(MyFactoryObject::NewInstance)).ToLocalChecked() - ); - Nan::Set(target, - Nan::New("sum").ToLocalChecked(), - Nan::GetFunction(Nan::New(Sum)).ToLocalChecked() - ); -} - -NODE_MODULE(myaddon, Init) -``` - -To use in Javascript: - -```Javascript -var myaddon = require('bindings')('myaddon'); - -var obj1 = myaddon.newFactoryObjectInstance(5); -var obj2 = myaddon.newFactoryObjectInstance(10); -console.log('sum of object values: ' + myaddon.sum(obj1, obj2)); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md deleted file mode 100644 index 743b44a4c1a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/persistent.md +++ /dev/null @@ -1,295 +0,0 @@ -## Persistent references - -An object reference that is independent of any `HandleScope` is a _persistent_ reference. Where a `Local` handle only lives as long as the `HandleScope` in which it was allocated, a `Persistent` handle remains valid until it is explicitly disposed. - -Due to the evolution of the V8 API, it is necessary for NAN to provide a wrapper implementation of the `Persistent` classes to supply compatibility across the V8 versions supported. - - - Nan::PersistentBase & v8::PersistentBase - - Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits - - Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits - - Nan::Persistent - - Nan::Global - - Nan::WeakCallbackInfo - - Nan::WeakCallbackType - -Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). - - -### Nan::PersistentBase & v8::PersistentBase - -A persistent handle contains a reference to a storage cell in V8 which holds an object value and which is updated by the garbage collector whenever the object is moved. A new storage cell can be created using the constructor or `Nan::PersistentBase::Reset()`. Existing handles can be disposed using an argument-less `Nan::PersistentBase::Reset()`. - -Definition: - -_(note: this is implemented as `Nan::PersistentBase` for older versions of V8 and the native `v8::PersistentBase` is used for newer versions of V8)_ - -```c++ -template class PersistentBase { - public: - /** - * If non-empty, destroy the underlying storage cell - */ - void Reset(); - - /** - * If non-empty, destroy the underlying storage cell and create a new one with - * the contents of another if it is also non-empty - */ - template void Reset(const v8::Local &other); - - /** - * If non-empty, destroy the underlying storage cell and create a new one with - * the contents of another if it is also non-empty - */ - template void Reset(const PersistentBase &other); - - /** - * If non-empty, destroy the underlying storage cell - * IsEmpty() will return true after this call. - */ - bool IsEmpty(); - - void Empty(); - - template bool operator==(const PersistentBase &that); - - template bool operator==(const v8::Local &that); - - template bool operator!=(const PersistentBase &that); - - template bool operator!=(const v8::Local &that); - - /** - * Install a finalization callback on this object. - * NOTE: There is no guarantee as to *when* or even *if* the callback is - * invoked. The invocation is performed solely on a best effort basis. - * As always, GC-based finalization should *not* be relied upon for any - * critical form of resource management! At the moment you can either - * specify a parameter for the callback or the location of two internal - * fields in the dying object. - */ - template - void SetWeak(P *parameter, - typename WeakCallbackInfo

::Callback callback, - WeakCallbackType type); - - void ClearWeak(); - - /** - * Marks the reference to this object independent. Garbage collector is free - * to ignore any object groups containing this object. Weak callback for an - * independent handle should not assume that it will be preceded by a global - * GC prologue callback or followed by a global GC epilogue callback. - */ - void MarkIndependent() const; - - bool IsIndependent() const; - - /** Checks if the handle holds the only reference to an object. */ - bool IsNearDeath() const; - - /** Returns true if the handle's reference is weak. */ - bool IsWeak() const -}; -``` - -See the V8 documentation for [`PersistentBase`](https://v8docs.nodesource.com/io.js-3.0/d4/dca/classv8_1_1_persistent_base.html) for further information. - -**Tip:** To get a `v8::Local` reference to the original object back from a `PersistentBase` or `Persistent` object: - -```c++ -v8::Local object = Nan::New(persistent); -``` - - -### Nan::NonCopyablePersistentTraits & v8::NonCopyablePersistentTraits - -Default traits for `Nan::Persistent`. This class does not allow use of the a copy constructor or assignment operator. At present `kResetInDestructor` is not set, but that will change in a future version. - -Definition: - -_(note: this is implemented as `Nan::NonCopyablePersistentTraits` for older versions of V8 and the native `v8::NonCopyablePersistentTraits` is used for newer versions of V8)_ - -```c++ -template class NonCopyablePersistentTraits { - public: - typedef Persistent > NonCopyablePersistent; - - static const bool kResetInDestructor = false; - - template - static void Copy(const Persistent &source, - NonCopyablePersistent *dest); - - template static void Uncompilable(); -}; -``` - -See the V8 documentation for [`NonCopyablePersistentTraits`](https://v8docs.nodesource.com/io.js-3.0/de/d73/classv8_1_1_non_copyable_persistent_traits.html) for further information. - - -### Nan::CopyablePersistentTraits & v8::CopyablePersistentTraits - -A helper class of traits to allow copying and assignment of `Persistent`. This will clone the contents of storage cell, but not any of the flags, etc.. - -Definition: - -_(note: this is implemented as `Nan::CopyablePersistentTraits` for older versions of V8 and the native `v8::NonCopyablePersistentTraits` is used for newer versions of V8)_ - -```c++ -template -class CopyablePersistentTraits { - public: - typedef Persistent > CopyablePersistent; - - static const bool kResetInDestructor = true; - - template - static void Copy(const Persistent &source, - CopyablePersistent *dest); -}; -``` - -See the V8 documentation for [`CopyablePersistentTraits`](https://v8docs.nodesource.com/io.js-3.0/da/d5c/structv8_1_1_copyable_persistent_traits.html) for further information. - - -### Nan::Persistent - -A type of `PersistentBase` which allows copy and assignment. Copy, assignment and destructor behavior is controlled by the traits class `M`. - -Definition: - -```c++ -template > -class Persistent; - -template class Persistent : public PersistentBase { - public: - /** - * A Persistent with no storage cell. - */ - Persistent(); - - /** - * Construct a Persistent from a v8::Local. When the v8::Local is non-empty, a - * new storage cell is created pointing to the same object, and no flags are - * set. - */ - template Persistent(v8::Local that); - - /** - * Construct a Persistent from a Persistent. When the Persistent is non-empty, - * a new storage cell is created pointing to the same object, and no flags are - * set. - */ - Persistent(const Persistent &that); - - /** - * The copy constructors and assignment operator create a Persistent exactly - * as the Persistent constructor, but the Copy function from the traits class - * is called, allowing the setting of flags based on the copied Persistent. - */ - Persistent &operator=(const Persistent &that); - - template - Persistent &operator=(const Persistent &that); - - /** - * The destructor will dispose the Persistent based on the kResetInDestructor - * flags in the traits class. Since not calling dispose can result in a - * memory leak, it is recommended to always set this flag. - */ - ~Persistent(); -}; -``` - -See the V8 documentation for [`Persistent`](https://v8docs.nodesource.com/io.js-3.0/d2/d78/classv8_1_1_persistent.html) for further information. - - -### Nan::Global - -A type of `PersistentBase` which has move semantics. - -```c++ -template class Global : public PersistentBase { - public: - /** - * A Global with no storage cell. - */ - Global(); - - /** - * Construct a Global from a v8::Local. When the v8::Local is non-empty, a new - * storage cell is created pointing to the same object, and no flags are set. - */ - template Global(v8::Local that); - /** - * Construct a Global from a PersistentBase. When the Persistent is non-empty, - * a new storage cell is created pointing to the same object, and no flags are - * set. - */ - template Global(const PersistentBase &that); - - /** - * Pass allows returning globals from functions, etc. - */ - Global Pass(); -}; -``` - -See the V8 documentation for [`Global`](https://v8docs.nodesource.com/io.js-3.0/d5/d40/classv8_1_1_global.html) for further information. - - -### Nan::WeakCallbackInfo - -`Nan::WeakCallbackInfo` is used as an argument when setting a persistent reference as weak. You may need to free any external resources attached to the object. It is a mirror of `v8:WeakCallbackInfo` as found in newer versions of V8. - -Definition: - -```c++ -template class WeakCallbackInfo { - public: - typedef void (*Callback)(const WeakCallbackInfo& data); - - v8::Isolate *GetIsolate() const; - - /** - * Get the parameter that was associated with the weak handle. - */ - T *GetParameter() const; - - /** - * Get pointer from internal field, index can be 0 or 1. - */ - void *GetInternalField(int index) const; -}; -``` - -Example usage: - -```c++ -void weakCallback(const WeakCallbackInfo &data) { - int *parameter = data.GetParameter(); - delete parameter; -} - -Persistent obj; -int *data = new int(0); -obj.SetWeak(data, callback, WeakCallbackType::kParameter); -``` - -See the V8 documentation for [`WeakCallbackInfo`](https://v8docs.nodesource.com/io.js-3.0/d8/d06/classv8_1_1_weak_callback_info.html) for further information. - - -### Nan::WeakCallbackType - -Represents the type of a weak callback. -A weak callback of type `kParameter` makes the supplied parameter to `Nan::PersistentBase::SetWeak` available through `WeakCallbackInfo::GetParameter`. -A weak callback of type `kInternalFields` uses up to two internal fields at indices 0 and 1 on the `Nan::PersistentBase` being made weak. -Note that only `v8::Object`s and derivatives can have internal fields. - -Definition: - -```c++ -enum class WeakCallbackType { kParameter, kInternalFields }; -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md deleted file mode 100644 index e9a35d0fe1c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/scopes.md +++ /dev/null @@ -1,73 +0,0 @@ -## Scopes - -A _local handle_ is a pointer to an object. All V8 objects are accessed using handles, they are necessary because of the way the V8 garbage collector works. - -A handle scope can be thought of as a container for any number of handles. When you've finished with your handles, instead of deleting each one individually you can simply delete their scope. - -The creation of `HandleScope` objects is different across the supported versions of V8. Therefore, NAN provides its own implementations that can be used safely across these. - - - Nan::HandleScope - - Nan::EscapableHandleScope - -Also see the V8 Embedders Guide section on [Handles and Garbage Collection](https://developers.google.com/v8/embed#handles). - - -### Nan::HandleScope - -A simple wrapper around [`v8::HandleScope`](https://v8docs.nodesource.com/io.js-3.0/d3/d95/classv8_1_1_handle_scope.html). - -Definition: - -```c++ -class Nan::HandleScope { - public: - Nan::HandleScope(); - static int NumberOfHandles(); -}; -``` - -Allocate a new `Nan::HandleScope` whenever you are creating new V8 JavaScript objects. Note that an implicit `HandleScope` is created for you on JavaScript-accessible methods so you do not need to insert one yourself. - -Example: - -```c++ -// new object is created, it needs a new scope: -void Pointless() { - Nan::HandleScope scope; - v8::Local obj = Nan::New(); -} - -// JavaScript-accessible method already has a HandleScope -NAN_METHOD(Pointless2) { - v8::Local obj = Nan::New(); -} -``` - - -### Nan::EscapableHandleScope - -Similar to [`Nan::HandleScope`](#api_nan_handle_scope) but should be used in cases where a function needs to return a V8 JavaScript type that has been created within it. - -Definition: - -```c++ -class Nan::EscapableHandleScope { - public: - Nan::EscapableHandleScope(); - static int NumberOfHandles(); - template v8::Local Escape(v8::Local value); -} -``` - -Use `Escape(value)` to return the object. - -Example: - -```c++ -v8::Local EmptyObj() { - Nan::EscapableHandleScope scope; - v8::Local obj = Nan::New(); - return scope.Escape(obj); -} -``` - diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md deleted file mode 100644 index 1267b5e7cfb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/script.md +++ /dev/null @@ -1,38 +0,0 @@ -## Script - -NAN provides a `v8::Script` helpers as the API has changed over the supported versions of V8. - - - Nan::CompileScript() - - Nan::RunScript() - - - -### Nan::CompileScript() - -A wrapper around [`v8::Script::Compile()`](https://v8docs.nodesource.com/io.js-3.0/da/da5/classv8_1_1_script_compiler.html#a93f5072a0db55d881b969e9fc98e564b). - -Note that `Nan::BoundScript` is an alias for `v8::Script`. - -Signature: - -```c++ -Nan::MaybeLocal Nan::CompileScript( - v8::Local s, - const v8::ScriptOrigin& origin); -Nan::MaybeLocal Nan::CompileScript(v8::Local s); -``` - - - -### Nan::RunScript() - -Calls `script->Run()` or `script->BindToCurrentContext()->Run(Nan::GetCurrentContext())`. - -Note that `Nan::BoundScript` is an alias for `v8::Script` and `Nan::UnboundScript` is an alias for `v8::UnboundScript` where available and `v8::Script` on older versions of V8. - -Signature: - -```c++ -Nan::MaybeLocal Nan::RunScript(v8::Local script) -Nan::MaybeLocal Nan::RunScript(v8::Local script) -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md deleted file mode 100644 index 7c1bd325047..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/string_bytes.md +++ /dev/null @@ -1,62 +0,0 @@ -## Strings & Bytes - -Miscellaneous string & byte encoding and decoding functionality provided for compatibility across supported versions of V8 and Node. Implemented by NAN to ensure that all encoding types are supported, even for older versions of Node where they are missing. - - - Nan::Encoding - - Nan::Encode() - - Nan::DecodeBytes() - - Nan::DecodeWrite() - - - -### Nan::Encoding - -An enum representing the supported encoding types. A copy of `node::encoding` that is consistent across versions of Node. - -Definition: - -```c++ -enum Nan::Encoding { ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER } -``` - - - -### Nan::Encode() - -A wrapper around `node::Encode()` that provides a consistent implementation across supported versions of Node. - -Signature: - -```c++ -v8::Local Nan::Encode(const void *buf, - size_t len, - enum Nan::Encoding encoding = BINARY); -``` - - - -### Nan::DecodeBytes() - -A wrapper around `node::DecodeBytes()` that provides a consistent implementation across supported versions of Node. - -Signature: - -```c++ -ssize_t Nan::DecodeBytes(v8::Local val, - enum Nan::Encoding encoding = BINARY); -``` - - - -### Nan::DecodeWrite() - -A wrapper around `node::DecodeWrite()` that provides a consistent implementation across supported versions of Node. - -Signature: - -```c++ -ssize_t Nan::DecodeWrite(char *buf, - size_t len, - v8::Local val, - enum Nan::Encoding encoding = BINARY); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md deleted file mode 100644 index 8e6319ba545..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_internals.md +++ /dev/null @@ -1,199 +0,0 @@ -## V8 internals - -The hooks to access V8 internals—including GC and statistics—are different across the supported versions of V8, therefore NAN provides its own hooks that call the appropriate V8 methods. - - - NAN_GC_CALLBACK() - - Nan::AddGCEpilogueCallback() - - Nan::RemoveGCEpilogueCallback() - - Nan::AddGCPrologueCallback() - - Nan::RemoveGCPrologueCallback() - - Nan::GetHeapStatistics() - - Nan::SetCounterFunction() - - Nan::SetCreateHistogramFunction() - - Nan::SetAddHistogramSampleFunction() - - Nan::IdleNotification() - - Nan::LowMemoryNotification() - - Nan::ContextDisposedNotification() - - Nan::GetInternalFieldPointer() - - Nan::SetInternalFieldPointer() - - Nan::AdjustExternalMemory() - - - -### NAN_GC_CALLBACK(callbackname) - -Use `NAN_GC_CALLBACK` to declare your callbacks for `Nan::AddGCPrologueCallback()` and `Nan::AddGCEpilogueCallback()`. Your new method receives the arguments `v8::GCType type` and `v8::GCCallbackFlags flags`. - -```c++ -static Nan::Persistent callback; - -NAN_GC_CALLBACK(gcPrologueCallback) { - v8::Local argv[] = { Nan::New("prologue").ToLocalChecked() }; - Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(callback), 1, argv); -} - -NAN_METHOD(Hook) { - callback.Reset(args[0].As()); - Nan::AddGCPrologueCallback(gcPrologueCallback); - info.GetReturnValue().Set(info.Holder()); -} -``` - - -### Nan::AddGCEpilogueCallback() - -Signature: - -```c++ -void Nan::AddGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback, v8::GCType gc_type_filter = v8::kGCTypeAll) -``` - -Calls V8's [`AddGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a90d1860babc76059c62514b422f56960). - - -### Nan::RemoveGCEpilogueCallback() - -Signature: - -```c++ -void Nan::RemoveGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback) -``` - -Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a05c60859fd4b8e96bfcd451281ed6c7c). - - -### Nan::AddGCPrologueCallback() - -Signature: - -```c++ -void Nan::AddGCPrologueCallback(v8::Isolate::GCPrologueCallback, v8::GCType gc_type_filter callback) -``` - -Calls V8's [`AddGCPrologueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ab4b87b8f9f8e5bf95eba4009357e001f). - - -### Nan::RemoveGCPrologueCallback() - -Signature: - -```c++ -void Nan::RemoveGCPrologueCallback(v8::Isolate::GCPrologueCallback callback) -``` - -Calls V8's [`RemoveGCEpilogueCallback()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a9f6c51932811593f81ff30b949124186). - - -### Nan::GetHeapStatistics() - -Signature: - -```c++ -void Nan::GetHeapStatistics(v8::HeapStatistics *heap_statistics) -``` - -Calls V8's [`GetHeapStatistics()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a5593ac74687b713095c38987e5950b34). - - -### Nan::SetCounterFunction() - -Signature: - -```c++ -void Nan::SetCounterFunction(v8::CounterLookupCallback cb) -``` - -Calls V8's [`SetCounterFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a045d7754e62fa0ec72ae6c259b29af94). - - -### Nan::SetCreateHistogramFunction() - -Signature: - -```c++ -void Nan::SetCreateHistogramFunction(v8::CreateHistogramCallback cb) -``` - -Calls V8's [`SetCreateHistogramFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a542d67e85089cb3f92aadf032f99e732). - - -### Nan::SetAddHistogramSampleFunction() - -Signature: - -```c++ -void Nan::SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) -``` - -Calls V8's [`SetAddHistogramSampleFunction()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#aeb420b690bc2c216882d6fdd00ddd3ea). - - -### Nan::IdleNotification() - -Signature: - -```c++ -void Nan::IdleNotification(v8::HeapStatistics *heap_statistics) -``` - -Calls V8's [`IdleNotification()` or `IdleNotificationDeadline()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad6a2a02657f5425ad460060652a5a118) depending on V8 version. - - -### Nan::LowMemoryNotification() - -Signature: - -```c++ -void Nan::LowMemoryNotification() -``` - -Calls V8's [`IdleNotification()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a24647f61d6b41f69668094bdcd6ea91f). - - -### Nan::ContextDisposedNotification() - -Signature: - -```c++ -void Nan::ContextDisposedNotification() -``` - -Calls V8's [`ContextDisposedNotification()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b). - - -### Nan::GetInternalFieldPointer() - -Gets a pointer to the internal field with at `index` from a V8 `Object` handle. - -Signature: - -```c++ -void* Nan::GetInternalFieldPointer(v8::Local object, int index) -``` - -Calls the Object's [`GetAlignedPointerFromInternalField()` or `GetPointerFromInternalField()`](https://v8docs.nodesource.com/io.js-3.0/db/d85/classv8_1_1_object.html#ab3c57184263cf29963ef0017bec82281) depending on the version of V8. - - -### Nan::SetInternalFieldPointer() - -Sets the value of the internal field at `index` on a V8 `Object` handle. - -Signature: - -```c++ -void Nan::SetInternalFieldPointer(v8::Local object, int index, void* value) -``` - -Calls the Object's [`SetAlignedPointerInInternalField()` or `SetPointerInInternalField()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ad7f5dc559866343fe6cd8db1f134d48b) depending on the version of V8. - - -### Nan::AdjustExternalMemory() - -Signature: - -```c++ -int Nan::AdjustExternalMemory(int bytesChange) -``` - -Calls V8's [`AdjustAmountOfExternalAllocatedMemory()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#ae1a59cac60409d3922582c4af675473e). - diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md b/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md deleted file mode 100644 index 64f736d6d16..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/doc/v8_misc.md +++ /dev/null @@ -1,85 +0,0 @@ -## Miscellaneous V8 Helpers - - - Nan::Utf8String - - Nan::GetCurrentContext() - - Nan::SetIsolateData() - - Nan::GetIsolateData() - - Nan::TypedArrayContents - - - -### Nan::Utf8String - -Converts an object to a UTF-8-encoded character array. If conversion to a string fails (e.g. due to an exception in the toString() method of the object) then the length() method returns 0 and the * operator returns NULL. The underlying memory used for this object is managed by the object. - -An implementation of [`v8::String::Utf8Value`](https://v8docs.nodesource.com/io.js-3.0/d4/d1b/classv8_1_1_string_1_1_utf8_value.html) that is consistent across all supported versions of V8. - -Definition: - -```c++ -class Nan::Utf8String { - public: - Nan::Utf8String(v8::Local from); - - int length() const; - - char* operator*(); - const char* operator*() const; -}; -``` - - -### Nan::GetCurrentContext() - -A call to [`v8::Isolate::GetCurrent()->GetCurrentContext()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a81c7a1ed7001ae2a65e89107f75fd053) that works across all supported versions of V8. - -Signature: - -```c++ -v8::Local Nan::GetCurrentContext() -``` - - -### Nan::SetIsolateData() - -A helper to provide a consistent API to [`v8::Isolate#SetData()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#a7acadfe7965997e9c386a05f098fbe36). - -Signature: - -```c++ -void Nan::SetIsolateData(v8::Isolate *isolate, T *data) -``` - - - -### Nan::GetIsolateData() - -A helper to provide a consistent API to [`v8::Isolate#GetData()`](https://v8docs.nodesource.com/io.js-3.0/d5/dda/classv8_1_1_isolate.html#aabd223436bc1100a787dadaa024c6257). - -Signature: - -```c++ -T *Nan::GetIsolateData(v8::Isolate *isolate) -``` - - -### Nan::TypedArrayContents - -A helper class for accessing the contents of an ArrayBufferView (aka a typedarray) from C++. If the input array is not a valid typedarray, then the data pointer of TypedArrayContents will default to `NULL` and the length will be 0. If the data pointer is not compatible with the alignment requirements of type, an assertion error will fail. - -Note that you must store a reference to the `array` object while you are accessing its contents. - -Definition: - -```c++ -template -class Nan::TypedArrayContents { - public: - TypedArrayContents(v8::Local array); - - size_t length() const; - - T* const operator*(); - const T* const operator*() const; -}; -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js b/src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js deleted file mode 100644 index 4f1dfb41667..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/include_dirs.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('path').relative('.', __dirname)); diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan.h deleted file mode 100644 index 7176da1719f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan.h +++ /dev/null @@ -1,2274 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors: - * - Rod Vagg - * - Benjamin Byholm - * - Trevor Norris - * - Nathan Rajlich - * - Brett Lawson - * - Ben Noordhuis - * - David Siegel - * - * MIT License - * - * Version 2.4.0: current Node 6.3.0, Node 12: 0.12.15, Node 10: 0.10.46, iojs: 3.3.1 - * - * See https://github.com/nodejs/nan for the latest update to this file - **********************************************************************************/ - -#ifndef NAN_H_ -#define NAN_H_ - -#include - -#define NODE_0_10_MODULE_VERSION 11 -#define NODE_0_12_MODULE_VERSION 14 -#define ATOM_0_21_MODULE_VERSION 41 -#define IOJS_1_0_MODULE_VERSION 42 -#define IOJS_1_1_MODULE_VERSION 43 -#define IOJS_2_0_MODULE_VERSION 44 -#define IOJS_3_0_MODULE_VERSION 45 -#define NODE_4_0_MODULE_VERSION 46 -#define NODE_5_0_MODULE_VERSION 47 -#define NODE_6_0_MODULE_VERSION 48 - -#ifdef _MSC_VER -# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800) -#else -# define NAN_HAS_CPLUSPLUS_11 (__cplusplus >= 201103L) -#endif - -#if NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION && !NAN_HAS_CPLUSPLUS_11 -# error This version of node/NAN/v8 requires a C++11 compiler -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#if defined(_MSC_VER) -# pragma warning( push ) -# pragma warning( disable : 4530 ) -# include -# include -# pragma warning( pop ) -#else -# include -# include -#endif - -// uv helpers -#ifdef UV_VERSION_MAJOR -# ifndef UV_VERSION_PATCH -# define UV_VERSION_PATCH 0 -# endif -# define NAUV_UVVERSION ((UV_VERSION_MAJOR << 16) | \ - (UV_VERSION_MINOR << 8) | \ - (UV_VERSION_PATCH)) -#else -# define NAUV_UVVERSION 0x000b00 -#endif - -#if NAUV_UVVERSION < 0x000b0b -# ifdef WIN32 -# include -# else -# include -# endif -#endif - -namespace Nan { - -#define NAN_INLINE inline // TODO(bnoordhuis) Remove in v3.0.0. - -#if defined(__GNUC__) && \ - !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) -# define NAN_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) && \ - !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) -# define NAN_DEPRECATED __declspec(deprecated) -#else -# define NAN_DEPRECATED -#endif - -#if NAN_HAS_CPLUSPLUS_11 -# define NAN_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&) = delete; -# define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete; -# define NAN_DISALLOW_MOVE(CLASS) \ - CLASS(CLASS&&) = delete; /* NOLINT(build/c++11) */ \ - void operator=(CLASS&&) = delete; -#else -# define NAN_DISALLOW_ASSIGN(CLASS) void operator=(const CLASS&); -# define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&); -# define NAN_DISALLOW_MOVE(CLASS) -#endif - -#define NAN_DISALLOW_ASSIGN_COPY(CLASS) \ - NAN_DISALLOW_ASSIGN(CLASS) \ - NAN_DISALLOW_COPY(CLASS) - -#define NAN_DISALLOW_ASSIGN_MOVE(CLASS) \ - NAN_DISALLOW_ASSIGN(CLASS) \ - NAN_DISALLOW_MOVE(CLASS) - -#define NAN_DISALLOW_COPY_MOVE(CLASS) \ - NAN_DISALLOW_COPY(CLASS) \ - NAN_DISALLOW_MOVE(CLASS) - -#define NAN_DISALLOW_ASSIGN_COPY_MOVE(CLASS) \ - NAN_DISALLOW_ASSIGN(CLASS) \ - NAN_DISALLOW_COPY(CLASS) \ - NAN_DISALLOW_MOVE(CLASS) - -#define TYPE_CHECK(T, S) \ - while (false) { \ - *(static_cast(0)) = static_cast(0); \ - } - -//=== RegistrationFunction ===================================================== - -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - typedef v8::Handle ADDON_REGISTER_FUNCTION_ARGS_TYPE; -#else - typedef v8::Local ADDON_REGISTER_FUNCTION_ARGS_TYPE; -#endif - -#define NAN_MODULE_INIT(name) \ - void name(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target) - -//=== CallbackInfo ============================================================= - -#include "nan_callbacks.h" // NOLINT(build/include) - -//============================================================================== - -#if (NODE_MODULE_VERSION < NODE_0_12_MODULE_VERSION) -typedef v8::Script UnboundScript; -typedef v8::Script BoundScript; -#else -typedef v8::UnboundScript UnboundScript; -typedef v8::Script BoundScript; -#endif - -#if (NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION) -typedef v8::String::ExternalAsciiStringResource - ExternalOneByteStringResource; -#else -typedef v8::String::ExternalOneByteStringResource - ExternalOneByteStringResource; -#endif - -#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) -template -class NonCopyablePersistentTraits : - public v8::NonCopyablePersistentTraits {}; -template -class CopyablePersistentTraits : - public v8::CopyablePersistentTraits {}; - -template -class PersistentBase : - public v8::PersistentBase {}; - -template > -class Persistent; -#else -template class NonCopyablePersistentTraits; -template class PersistentBase; -template class WeakCallbackData; -template > -class Persistent; -#endif // NODE_MODULE_VERSION - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -# include "nan_maybe_43_inl.h" // NOLINT(build/include) -#else -# include "nan_maybe_pre_43_inl.h" // NOLINT(build/include) -#endif - -#include "nan_converters.h" // NOLINT(build/include) -#include "nan_new.h" // NOLINT(build/include) - -#if NAUV_UVVERSION < 0x000b17 -#define NAUV_WORK_CB(func) \ - void func(uv_async_t *async, int) -#else -#define NAUV_WORK_CB(func) \ - void func(uv_async_t *async) -#endif - -#if NAUV_UVVERSION >= 0x000b0b - -typedef uv_key_t nauv_key_t; - -inline int nauv_key_create(nauv_key_t *key) { - return uv_key_create(key); -} - -inline void nauv_key_delete(nauv_key_t *key) { - uv_key_delete(key); -} - -inline void* nauv_key_get(nauv_key_t *key) { - return uv_key_get(key); -} - -inline void nauv_key_set(nauv_key_t *key, void *value) { - uv_key_set(key, value); -} - -#else - -/* Implement thread local storage for older versions of libuv. - * This is essentially a backport of libuv commit 5d2434bf - * written by Ben Noordhuis, adjusted for names and inline. - */ - -#ifndef WIN32 - -typedef pthread_key_t nauv_key_t; - -inline int nauv_key_create(nauv_key_t* key) { - return -pthread_key_create(key, NULL); -} - -inline void nauv_key_delete(nauv_key_t* key) { - if (pthread_key_delete(*key)) - abort(); -} - -inline void* nauv_key_get(nauv_key_t* key) { - return pthread_getspecific(*key); -} - -inline void nauv_key_set(nauv_key_t* key, void* value) { - if (pthread_setspecific(*key, value)) - abort(); -} - -#else - -typedef struct { - DWORD tls_index; -} nauv_key_t; - -inline int nauv_key_create(nauv_key_t* key) { - key->tls_index = TlsAlloc(); - if (key->tls_index == TLS_OUT_OF_INDEXES) - return UV_ENOMEM; - return 0; -} - -inline void nauv_key_delete(nauv_key_t* key) { - if (TlsFree(key->tls_index) == FALSE) - abort(); - key->tls_index = TLS_OUT_OF_INDEXES; -} - -inline void* nauv_key_get(nauv_key_t* key) { - void* value = TlsGetValue(key->tls_index); - if (value == NULL) - if (GetLastError() != ERROR_SUCCESS) - abort(); - return value; -} - -inline void nauv_key_set(nauv_key_t* key, void* value) { - if (TlsSetValue(key->tls_index, value) == FALSE) - abort(); -} - -#endif -#endif - -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION -template -v8::Local New(v8::Handle); -#endif - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - typedef v8::WeakCallbackType WeakCallbackType; -#else -struct WeakCallbackType { - enum E {kParameter, kInternalFields}; - E type; - WeakCallbackType(E other) : type(other) {} // NOLINT(runtime/explicit) - inline bool operator==(E other) { return other == this->type; } - inline bool operator!=(E other) { return !operator==(other); } -}; -#endif - -template class WeakCallbackInfo; - -#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION -# include "nan_persistent_12_inl.h" // NOLINT(build/include) -#else -# include "nan_persistent_pre_12_inl.h" // NOLINT(build/include) -#endif - -namespace imp { - static const size_t kMaxLength = 0x3fffffff; - // v8::String::REPLACE_INVALID_UTF8 was introduced - // in node.js v0.10.29 and v0.8.27. -#if NODE_MAJOR_VERSION > 0 || \ - NODE_MINOR_VERSION > 10 || \ - NODE_MINOR_VERSION == 10 && NODE_PATCH_VERSION >= 29 || \ - NODE_MINOR_VERSION == 8 && NODE_PATCH_VERSION >= 27 - static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8; -#else - static const unsigned kReplaceInvalidUtf8 = 0; -#endif -} // end of namespace imp - -//=== HandleScope ============================================================== - -class HandleScope { - v8::HandleScope scope; - - public: -#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION - inline HandleScope() : scope(v8::Isolate::GetCurrent()) {} - inline static int NumberOfHandles() { - return v8::HandleScope::NumberOfHandles(v8::Isolate::GetCurrent()); - } -#else - inline HandleScope() : scope() {} - inline static int NumberOfHandles() { - return v8::HandleScope::NumberOfHandles(); - } -#endif - - private: - // Make it hard to create heap-allocated or illegal handle scopes by - // disallowing certain operations. - HandleScope(const HandleScope &); - void operator=(const HandleScope &); - void *operator new(size_t size); - void operator delete(void *, size_t); -}; - -class EscapableHandleScope { - public: -#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION - inline EscapableHandleScope() : scope(v8::Isolate::GetCurrent()) {} - - inline static int NumberOfHandles() { - return v8::EscapableHandleScope::NumberOfHandles(v8::Isolate::GetCurrent()); - } - - template - inline v8::Local Escape(v8::Local value) { - return scope.Escape(value); - } - - private: - v8::EscapableHandleScope scope; -#else - inline EscapableHandleScope() : scope() {} - - inline static int NumberOfHandles() { - return v8::HandleScope::NumberOfHandles(); - } - - template - inline v8::Local Escape(v8::Local value) { - return scope.Close(value); - } - - private: - v8::HandleScope scope; -#endif - - private: - // Make it hard to create heap-allocated or illegal handle scopes by - // disallowing certain operations. - EscapableHandleScope(const EscapableHandleScope &); - void operator=(const EscapableHandleScope &); - void *operator new(size_t size); - void operator delete(void *, size_t); -}; - -//=== TryCatch ================================================================= - -class TryCatch { - v8::TryCatch try_catch_; - friend void FatalException(const TryCatch&); - - public: -#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION - TryCatch() : try_catch_(v8::Isolate::GetCurrent()) {} -#endif - - inline bool HasCaught() const { return try_catch_.HasCaught(); } - - inline bool CanContinue() const { return try_catch_.CanContinue(); } - - inline v8::Local ReThrow() { -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - return New(try_catch_.ReThrow()); -#else - return try_catch_.ReThrow(); -#endif - } - - inline v8::Local Exception() const { - return try_catch_.Exception(); - } - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - inline v8::MaybeLocal StackTrace() const { - return try_catch_.StackTrace(GetCurrentContext()); - } -#else - inline MaybeLocal StackTrace() const { - return MaybeLocal(try_catch_.StackTrace()); - } -#endif - - inline v8::Local Message() const { - return try_catch_.Message(); - } - - inline void Reset() { try_catch_.Reset(); } - - inline void SetVerbose(bool value) { try_catch_.SetVerbose(value); } - - inline void SetCaptureMessage(bool value) { - try_catch_.SetCaptureMessage(value); - } -}; - -//============ ================================================================= - -/* node 0.12 */ -#if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION - inline - void SetCounterFunction(v8::CounterLookupCallback cb) { - v8::Isolate::GetCurrent()->SetCounterFunction(cb); - } - - inline - void SetCreateHistogramFunction(v8::CreateHistogramCallback cb) { - v8::Isolate::GetCurrent()->SetCreateHistogramFunction(cb); - } - - inline - void SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) { - v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb); - } - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - inline bool IdleNotification(int idle_time_in_ms) { - return v8::Isolate::GetCurrent()->IdleNotificationDeadline( - idle_time_in_ms * 0.001); - } -# else - inline bool IdleNotification(int idle_time_in_ms) { - return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms); - } -#endif - - inline void LowMemoryNotification() { - v8::Isolate::GetCurrent()->LowMemoryNotification(); - } - - inline void ContextDisposedNotification() { - v8::Isolate::GetCurrent()->ContextDisposedNotification(); - } -#else - inline - void SetCounterFunction(v8::CounterLookupCallback cb) { - v8::V8::SetCounterFunction(cb); - } - - inline - void SetCreateHistogramFunction(v8::CreateHistogramCallback cb) { - v8::V8::SetCreateHistogramFunction(cb); - } - - inline - void SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) { - v8::V8::SetAddHistogramSampleFunction(cb); - } - - inline bool IdleNotification(int idle_time_in_ms) { - return v8::V8::IdleNotification(idle_time_in_ms); - } - - inline void LowMemoryNotification() { - v8::V8::LowMemoryNotification(); - } - - inline void ContextDisposedNotification() { - v8::V8::ContextDisposedNotification(); - } -#endif - -#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) // Node 0.12 - inline v8::Local Undefined() { -# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - EscapableHandleScope scope; - return scope.Escape(New(v8::Undefined(v8::Isolate::GetCurrent()))); -# else - return v8::Undefined(v8::Isolate::GetCurrent()); -# endif - } - - inline v8::Local Null() { -# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - EscapableHandleScope scope; - return scope.Escape(New(v8::Null(v8::Isolate::GetCurrent()))); -# else - return v8::Null(v8::Isolate::GetCurrent()); -# endif - } - - inline v8::Local True() { -# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - EscapableHandleScope scope; - return scope.Escape(New(v8::True(v8::Isolate::GetCurrent()))); -# else - return v8::True(v8::Isolate::GetCurrent()); -# endif - } - - inline v8::Local False() { -# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - EscapableHandleScope scope; - return scope.Escape(New(v8::False(v8::Isolate::GetCurrent()))); -# else - return v8::False(v8::Isolate::GetCurrent()); -# endif - } - - inline v8::Local EmptyString() { - return v8::String::Empty(v8::Isolate::GetCurrent()); - } - - inline int AdjustExternalMemory(int bc) { - return static_cast( - v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc)); - } - - inline void SetTemplate( - v8::Local templ - , const char *name - , v8::Local value) { - templ->Set(v8::Isolate::GetCurrent(), name, value); - } - - inline void SetTemplate( - v8::Local templ - , v8::Local name - , v8::Local value - , v8::PropertyAttribute attributes) { - templ->Set(name, value, attributes); - } - - inline v8::Local GetCurrentContext() { - return v8::Isolate::GetCurrent()->GetCurrentContext(); - } - - inline void* GetInternalFieldPointer( - v8::Local object - , int index) { - return object->GetAlignedPointerFromInternalField(index); - } - - inline void SetInternalFieldPointer( - v8::Local object - , int index - , void* value) { - object->SetAlignedPointerInInternalField(index, value); - } - -# define NAN_GC_CALLBACK(name) \ - void name(v8::Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags) - -#if NODE_MODULE_VERSION <= NODE_4_0_MODULE_VERSION - typedef v8::Isolate::GCEpilogueCallback GCEpilogueCallback; - typedef v8::Isolate::GCPrologueCallback GCPrologueCallback; -#else - typedef v8::Isolate::GCCallback GCEpilogueCallback; - typedef v8::Isolate::GCCallback GCPrologueCallback; -#endif - - inline void AddGCEpilogueCallback( - GCEpilogueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::Isolate::GetCurrent()->AddGCEpilogueCallback(callback, gc_type_filter); - } - - inline void RemoveGCEpilogueCallback( - GCEpilogueCallback callback) { - v8::Isolate::GetCurrent()->RemoveGCEpilogueCallback(callback); - } - - inline void AddGCPrologueCallback( - GCPrologueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::Isolate::GetCurrent()->AddGCPrologueCallback(callback, gc_type_filter); - } - - inline void RemoveGCPrologueCallback( - GCPrologueCallback callback) { - v8::Isolate::GetCurrent()->RemoveGCPrologueCallback(callback); - } - - inline void GetHeapStatistics( - v8::HeapStatistics *heap_statistics) { - v8::Isolate::GetCurrent()->GetHeapStatistics(heap_statistics); - } - -# define X(NAME) \ - inline v8::Local NAME(const char *msg) { \ - EscapableHandleScope scope; \ - return scope.Escape(v8::Exception::NAME(New(msg).ToLocalChecked())); \ - } \ - \ - inline \ - v8::Local NAME(v8::Local msg) { \ - return v8::Exception::NAME(msg); \ - } \ - \ - inline void Throw ## NAME(const char *msg) { \ - HandleScope scope; \ - v8::Isolate::GetCurrent()->ThrowException( \ - v8::Exception::NAME(New(msg).ToLocalChecked())); \ - } \ - \ - inline void Throw ## NAME(v8::Local msg) { \ - HandleScope scope; \ - v8::Isolate::GetCurrent()->ThrowException( \ - v8::Exception::NAME(msg)); \ - } - - X(Error) - X(RangeError) - X(ReferenceError) - X(SyntaxError) - X(TypeError) - -# undef X - - inline void ThrowError(v8::Local error) { - v8::Isolate::GetCurrent()->ThrowException(error); - } - - inline MaybeLocal NewBuffer( - char *data - , size_t length -#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION - , node::Buffer::FreeCallback callback -#else - , node::smalloc::FreeCallback callback -#endif - , void *hint - ) { - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - assert(length <= imp::kMaxLength && "too large buffer"); -#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION - return node::Buffer::New( - v8::Isolate::GetCurrent(), data, length, callback, hint); -#else - return MaybeLocal(node::Buffer::New( - v8::Isolate::GetCurrent(), data, length, callback, hint)); -#endif - } - - inline MaybeLocal CopyBuffer( - const char *data - , uint32_t size - ) { - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - assert(size <= imp::kMaxLength && "too large buffer"); -#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION - return node::Buffer::Copy( - v8::Isolate::GetCurrent(), data, size); -#else - return MaybeLocal(node::Buffer::New( - v8::Isolate::GetCurrent(), data, size)); -#endif - } - - inline MaybeLocal NewBuffer(uint32_t size) { - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - assert(size <= imp::kMaxLength && "too large buffer"); -#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION - return node::Buffer::New( - v8::Isolate::GetCurrent(), size); -#else - return MaybeLocal(node::Buffer::New( - v8::Isolate::GetCurrent(), size)); -#endif - } - - inline MaybeLocal NewBuffer( - char* data - , uint32_t size - ) { - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - assert(size <= imp::kMaxLength && "too large buffer"); -#if NODE_MODULE_VERSION > IOJS_2_0_MODULE_VERSION - return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); -#else - return MaybeLocal( - node::Buffer::Use(v8::Isolate::GetCurrent(), data, size)); -#endif - } - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - inline MaybeLocal - NewOneByteString(const uint8_t * value, int length = -1) { - return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), value, - v8::NewStringType::kNormal, length); - } - - inline MaybeLocal CompileScript( - v8::Local s - , const v8::ScriptOrigin& origin - ) { - v8::ScriptCompiler::Source source(s, origin); - return v8::ScriptCompiler::Compile(GetCurrentContext(), &source); - } - - inline MaybeLocal CompileScript( - v8::Local s - ) { - v8::ScriptCompiler::Source source(s); - return v8::ScriptCompiler::Compile(GetCurrentContext(), &source); - } - - inline MaybeLocal RunScript( - v8::Local script - ) { - return script->BindToCurrentContext()->Run(GetCurrentContext()); - } - - inline MaybeLocal RunScript( - v8::Local script - ) { - return script->Run(GetCurrentContext()); - } -#else - inline MaybeLocal - NewOneByteString(const uint8_t * value, int length = -1) { - return MaybeLocal( - v8::String::NewFromOneByte( - v8::Isolate::GetCurrent() - , value - , v8::String::kNormalString, length)); - } - - inline MaybeLocal CompileScript( - v8::Local s - , const v8::ScriptOrigin& origin - ) { - v8::ScriptCompiler::Source source(s, origin); - return MaybeLocal( - v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source)); - } - - inline MaybeLocal CompileScript( - v8::Local s - ) { - v8::ScriptCompiler::Source source(s); - return MaybeLocal( - v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source)); - } - - inline MaybeLocal RunScript( - v8::Local script - ) { - return MaybeLocal(script->BindToCurrentContext()->Run()); - } - - inline MaybeLocal RunScript( - v8::Local script - ) { - return MaybeLocal(script->Run()); - } -#endif - - inline v8::Local MakeCallback( - v8::Local target - , v8::Local func - , int argc - , v8::Local* argv) { -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - return New(node::MakeCallback( - v8::Isolate::GetCurrent(), target, func, argc, argv)); -#else - return node::MakeCallback( - v8::Isolate::GetCurrent(), target, func, argc, argv); -#endif - } - - inline v8::Local MakeCallback( - v8::Local target - , v8::Local symbol - , int argc - , v8::Local* argv) { -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - return New(node::MakeCallback( - v8::Isolate::GetCurrent(), target, symbol, argc, argv)); -#else - return node::MakeCallback( - v8::Isolate::GetCurrent(), target, symbol, argc, argv); -#endif - } - - inline v8::Local MakeCallback( - v8::Local target - , const char* method - , int argc - , v8::Local* argv) { -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - return New(node::MakeCallback( - v8::Isolate::GetCurrent(), target, method, argc, argv)); -#else - return node::MakeCallback( - v8::Isolate::GetCurrent(), target, method, argc, argv); -#endif - } - - inline void FatalException(const TryCatch& try_catch) { - node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_); - } - - inline v8::Local ErrnoException( - int errorno - , const char* syscall = NULL - , const char* message = NULL - , const char* path = NULL) { - return node::ErrnoException(v8::Isolate::GetCurrent(), errorno, syscall, - message, path); - } - - NAN_DEPRECATED inline v8::Local NanErrnoException( - int errorno - , const char* syscall = NULL - , const char* message = NULL - , const char* path = NULL) { - return ErrnoException(errorno, syscall, message, path); - } - - template - inline void SetIsolateData( - v8::Isolate *isolate - , T *data - ) { - isolate->SetData(0, data); - } - - template - inline T *GetIsolateData( - v8::Isolate *isolate - ) { - return static_cast(isolate->GetData(0)); - } - -class Utf8String { - public: - inline explicit Utf8String(v8::Local from) : - length_(0), str_(str_st_) { - if (!from.IsEmpty()) { - v8::Local string = from->ToString(); - if (!string.IsEmpty()) { - size_t len = 3 * string->Length() + 1; - assert(len <= INT_MAX); - if (len > sizeof (str_st_)) { - str_ = static_cast(malloc(len)); - assert(str_ != 0); - } - const int flags = - v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8; - length_ = string->WriteUtf8(str_, static_cast(len), 0, flags); - str_[length_] = '\0'; - } - } - } - - inline int length() const { - return length_; - } - - inline char* operator*() { return str_; } - inline const char* operator*() const { return str_; } - - inline ~Utf8String() { - if (str_ != str_st_) { - free(str_); - } - } - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String) - - int length_; - char *str_; - char str_st_[1024]; -}; - -#else // Node 0.8 and 0.10 - inline v8::Local Undefined() { - EscapableHandleScope scope; - return scope.Escape(New(v8::Undefined())); - } - - inline v8::Local Null() { - EscapableHandleScope scope; - return scope.Escape(New(v8::Null())); - } - - inline v8::Local True() { - EscapableHandleScope scope; - return scope.Escape(New(v8::True())); - } - - inline v8::Local False() { - EscapableHandleScope scope; - return scope.Escape(New(v8::False())); - } - - inline v8::Local EmptyString() { - return v8::String::Empty(); - } - - inline int AdjustExternalMemory(int bc) { - return static_cast(v8::V8::AdjustAmountOfExternalAllocatedMemory(bc)); - } - - inline void SetTemplate( - v8::Local templ - , const char *name - , v8::Local value) { - templ->Set(name, value); - } - - inline void SetTemplate( - v8::Local templ - , v8::Local name - , v8::Local value - , v8::PropertyAttribute attributes) { - templ->Set(name, value, attributes); - } - - inline v8::Local GetCurrentContext() { - return v8::Context::GetCurrent(); - } - - inline void* GetInternalFieldPointer( - v8::Local object - , int index) { - return object->GetPointerFromInternalField(index); - } - - inline void SetInternalFieldPointer( - v8::Local object - , int index - , void* value) { - object->SetPointerInInternalField(index, value); - } - -# define NAN_GC_CALLBACK(name) \ - void name(v8::GCType type, v8::GCCallbackFlags flags) - - inline void AddGCEpilogueCallback( - v8::GCEpilogueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::V8::AddGCEpilogueCallback(callback, gc_type_filter); - } - inline void RemoveGCEpilogueCallback( - v8::GCEpilogueCallback callback) { - v8::V8::RemoveGCEpilogueCallback(callback); - } - inline void AddGCPrologueCallback( - v8::GCPrologueCallback callback - , v8::GCType gc_type_filter = v8::kGCTypeAll) { - v8::V8::AddGCPrologueCallback(callback, gc_type_filter); - } - inline void RemoveGCPrologueCallback( - v8::GCPrologueCallback callback) { - v8::V8::RemoveGCPrologueCallback(callback); - } - inline void GetHeapStatistics( - v8::HeapStatistics *heap_statistics) { - v8::V8::GetHeapStatistics(heap_statistics); - } - -# define X(NAME) \ - inline v8::Local NAME(const char *msg) { \ - EscapableHandleScope scope; \ - return scope.Escape(v8::Exception::NAME(New(msg).ToLocalChecked())); \ - } \ - \ - inline \ - v8::Local NAME(v8::Local msg) { \ - return v8::Exception::NAME(msg); \ - } \ - \ - inline void Throw ## NAME(const char *msg) { \ - HandleScope scope; \ - v8::ThrowException(v8::Exception::NAME(New(msg).ToLocalChecked())); \ - } \ - \ - inline \ - void Throw ## NAME(v8::Local errmsg) { \ - v8::ThrowException(v8::Exception::NAME(errmsg)); \ - } - - X(Error) - X(RangeError) - X(ReferenceError) - X(SyntaxError) - X(TypeError) - -# undef X - - inline void ThrowError(v8::Local error) { - v8::ThrowException(error); - } - - inline MaybeLocal NewBuffer( - char *data - , size_t length - , node::Buffer::free_callback callback - , void *hint - ) { - EscapableHandleScope scope; - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - assert(length <= imp::kMaxLength && "too large buffer"); - return MaybeLocal(scope.Escape( - New(node::Buffer::New(data, length, callback, hint)->handle_))); - } - - inline MaybeLocal CopyBuffer( - const char *data - , uint32_t size - ) { - EscapableHandleScope scope; - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - assert(size <= imp::kMaxLength && "too large buffer"); -#if NODE_MODULE_VERSION >= NODE_0_10_MODULE_VERSION - return MaybeLocal( - scope.Escape(New(node::Buffer::New(data, size)->handle_))); -#else - return MaybeLocal(scope.Escape( - New(node::Buffer::New(const_cast(data), size)->handle_))); -#endif - } - - inline MaybeLocal NewBuffer(uint32_t size) { - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - EscapableHandleScope scope; - assert(size <= imp::kMaxLength && "too large buffer"); - return MaybeLocal( - scope.Escape(New(node::Buffer::New(size)->handle_))); - } - - inline void FreeData(char *data, void *hint) { - (void) hint; // unused - delete[] data; - } - - inline MaybeLocal NewBuffer( - char* data - , uint32_t size - ) { - EscapableHandleScope scope; - // arbitrary buffer lengths requires - // NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION - assert(size <= imp::kMaxLength && "too large buffer"); - return MaybeLocal(scope.Escape(New( - node::Buffer::New(data, size, FreeData, NULL)->handle_))); - } - -namespace imp { -inline void -widenString(std::vector *ws, const uint8_t *s, int l) { - size_t len = static_cast(l); - if (l < 0) { - len = strlen(reinterpret_cast(s)); - } - assert(len <= INT_MAX && "string too long"); - ws->resize(len); - std::copy(s, s + len, ws->begin()); // NOLINT(build/include_what_you_use) -} -} // end of namespace imp - - inline MaybeLocal - NewOneByteString(const uint8_t * value, int length = -1) { - std::vector wideString; // NOLINT(build/include_what_you_use) - imp::widenString(&wideString, value, length); - return imp::Factory::return_t(v8::String::New( - &wideString.front(), static_cast(wideString.size()))); - } - - inline MaybeLocal CompileScript( - v8::Local s - , const v8::ScriptOrigin& origin - ) { - return MaybeLocal( - v8::Script::Compile(s, const_cast(&origin))); - } - - inline MaybeLocal CompileScript( - v8::Local s - ) { - return MaybeLocal(v8::Script::Compile(s)); - } - - inline - MaybeLocal RunScript(v8::Local script) { - return MaybeLocal(script->Run()); - } - - inline v8::Local MakeCallback( - v8::Local target - , v8::Local func - , int argc - , v8::Local* argv) { - return New(node::MakeCallback(target, func, argc, argv)); - } - - inline v8::Local MakeCallback( - v8::Local target - , v8::Local symbol - , int argc - , v8::Local* argv) { - return New(node::MakeCallback(target, symbol, argc, argv)); - } - - inline v8::Local MakeCallback( - v8::Local target - , const char* method - , int argc - , v8::Local* argv) { - return New(node::MakeCallback(target, method, argc, argv)); - } - - inline void FatalException(const TryCatch& try_catch) { - node::FatalException(const_cast(try_catch.try_catch_)); - } - - inline v8::Local ErrnoException( - int errorno - , const char* syscall = NULL - , const char* message = NULL - , const char* path = NULL) { - return node::ErrnoException(errorno, syscall, message, path); - } - - NAN_DEPRECATED inline v8::Local NanErrnoException( - int errorno - , const char* syscall = NULL - , const char* message = NULL - , const char* path = NULL) { - return ErrnoException(errorno, syscall, message, path); - } - - - template - inline void SetIsolateData( - v8::Isolate *isolate - , T *data - ) { - isolate->SetData(data); - } - - template - inline T *GetIsolateData( - v8::Isolate *isolate - ) { - return static_cast(isolate->GetData()); - } - -class Utf8String { - public: - inline explicit Utf8String(v8::Local from) : - length_(0), str_(str_st_) { - if (!from.IsEmpty()) { - v8::Local string = from->ToString(); - if (!string.IsEmpty()) { - size_t len = 3 * string->Length() + 1; - assert(len <= INT_MAX); - if (len > sizeof (str_st_)) { - str_ = static_cast(malloc(len)); - assert(str_ != 0); - } - const int flags = - v8::String::NO_NULL_TERMINATION | imp::kReplaceInvalidUtf8; - length_ = string->WriteUtf8(str_, static_cast(len), 0, flags); - str_[length_] = '\0'; - } - } - } - - inline int length() const { - return length_; - } - - inline char* operator*() { return str_; } - inline const char* operator*() const { return str_; } - - inline ~Utf8String() { - if (str_ != str_st_) { - free(str_); - } - } - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String) - - int length_; - char *str_; - char str_st_[1024]; -}; - -#endif // NODE_MODULE_VERSION - -typedef void (*FreeCallback)(char *data, void *hint); - -typedef const FunctionCallbackInfo& NAN_METHOD_ARGS_TYPE; -typedef void NAN_METHOD_RETURN_TYPE; - -typedef const PropertyCallbackInfo& NAN_GETTER_ARGS_TYPE; -typedef void NAN_GETTER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& NAN_SETTER_ARGS_TYPE; -typedef void NAN_SETTER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_PROPERTY_GETTER_ARGS_TYPE; -typedef void NAN_PROPERTY_GETTER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_PROPERTY_SETTER_ARGS_TYPE; -typedef void NAN_PROPERTY_SETTER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_PROPERTY_ENUMERATOR_ARGS_TYPE; -typedef void NAN_PROPERTY_ENUMERATOR_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_PROPERTY_DELETER_ARGS_TYPE; -typedef void NAN_PROPERTY_DELETER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_PROPERTY_QUERY_ARGS_TYPE; -typedef void NAN_PROPERTY_QUERY_RETURN_TYPE; - -typedef const PropertyCallbackInfo& NAN_INDEX_GETTER_ARGS_TYPE; -typedef void NAN_INDEX_GETTER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& NAN_INDEX_SETTER_ARGS_TYPE; -typedef void NAN_INDEX_SETTER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_INDEX_ENUMERATOR_ARGS_TYPE; -typedef void NAN_INDEX_ENUMERATOR_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_INDEX_DELETER_ARGS_TYPE; -typedef void NAN_INDEX_DELETER_RETURN_TYPE; - -typedef const PropertyCallbackInfo& - NAN_INDEX_QUERY_ARGS_TYPE; -typedef void NAN_INDEX_QUERY_RETURN_TYPE; - -#define NAN_METHOD(name) \ - Nan::NAN_METHOD_RETURN_TYPE name(Nan::NAN_METHOD_ARGS_TYPE info) -#define NAN_GETTER(name) \ - Nan::NAN_GETTER_RETURN_TYPE name( \ - v8::Local property \ - , Nan::NAN_GETTER_ARGS_TYPE info) -#define NAN_SETTER(name) \ - Nan::NAN_SETTER_RETURN_TYPE name( \ - v8::Local property \ - , v8::Local value \ - , Nan::NAN_SETTER_ARGS_TYPE info) -#define NAN_PROPERTY_GETTER(name) \ - Nan::NAN_PROPERTY_GETTER_RETURN_TYPE name( \ - v8::Local property \ - , Nan::NAN_PROPERTY_GETTER_ARGS_TYPE info) -#define NAN_PROPERTY_SETTER(name) \ - Nan::NAN_PROPERTY_SETTER_RETURN_TYPE name( \ - v8::Local property \ - , v8::Local value \ - , Nan::NAN_PROPERTY_SETTER_ARGS_TYPE info) -#define NAN_PROPERTY_ENUMERATOR(name) \ - Nan::NAN_PROPERTY_ENUMERATOR_RETURN_TYPE name( \ - Nan::NAN_PROPERTY_ENUMERATOR_ARGS_TYPE info) -#define NAN_PROPERTY_DELETER(name) \ - Nan::NAN_PROPERTY_DELETER_RETURN_TYPE name( \ - v8::Local property \ - , Nan::NAN_PROPERTY_DELETER_ARGS_TYPE info) -#define NAN_PROPERTY_QUERY(name) \ - Nan::NAN_PROPERTY_QUERY_RETURN_TYPE name( \ - v8::Local property \ - , Nan::NAN_PROPERTY_QUERY_ARGS_TYPE info) -# define NAN_INDEX_GETTER(name) \ - Nan::NAN_INDEX_GETTER_RETURN_TYPE name( \ - uint32_t index \ - , Nan::NAN_INDEX_GETTER_ARGS_TYPE info) -#define NAN_INDEX_SETTER(name) \ - Nan::NAN_INDEX_SETTER_RETURN_TYPE name( \ - uint32_t index \ - , v8::Local value \ - , Nan::NAN_INDEX_SETTER_ARGS_TYPE info) -#define NAN_INDEX_ENUMERATOR(name) \ - Nan::NAN_INDEX_ENUMERATOR_RETURN_TYPE \ - name(Nan::NAN_INDEX_ENUMERATOR_ARGS_TYPE info) -#define NAN_INDEX_DELETER(name) \ - Nan::NAN_INDEX_DELETER_RETURN_TYPE name( \ - uint32_t index \ - , Nan::NAN_INDEX_DELETER_ARGS_TYPE info) -#define NAN_INDEX_QUERY(name) \ - Nan::NAN_INDEX_QUERY_RETURN_TYPE name( \ - uint32_t index \ - , Nan::NAN_INDEX_QUERY_ARGS_TYPE info) - -class Callback { - public: - Callback() {} - - explicit Callback(const v8::Local &fn) : handle_(fn) {} - - ~Callback() { - handle_.Reset(); - } - - bool operator==(const Callback &other) const { - return handle_ == other.handle_; - } - - bool operator!=(const Callback &other) const { - return !operator==(other); - } - - inline - v8::Local operator*() const { return GetFunction(); } - - inline v8::Local operator()( - v8::Local target - , int argc = 0 - , v8::Local argv[] = 0) const { - return this->Call(target, argc, argv); - } - - inline v8::Local operator()( - int argc = 0 - , v8::Local argv[] = 0) const { - return this->Call(argc, argv); - } - - // TODO(kkoopa): remove - inline void SetFunction(const v8::Local &fn) { - Reset(fn); - } - - inline void Reset(const v8::Local &fn) { - handle_.Reset(fn); - } - - inline void Reset() { - handle_.Reset(); - } - - inline v8::Local GetFunction() const { - return New(handle_); - } - - inline bool IsEmpty() const { - return handle_.IsEmpty(); - } - - inline v8::Local - Call(v8::Local target - , int argc - , v8::Local argv[]) const { -#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) - v8::Isolate *isolate = v8::Isolate::GetCurrent(); - return Call_(isolate, target, argc, argv); -#else - return Call_(target, argc, argv); -#endif - } - - inline v8::Local - Call(int argc, v8::Local argv[]) const { -#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) - v8::Isolate *isolate = v8::Isolate::GetCurrent(); - return Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv); -#else - return Call_(v8::Context::GetCurrent()->Global(), argc, argv); -#endif - } - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(Callback) - Persistent handle_; - -#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) - v8::Local Call_(v8::Isolate *isolate - , v8::Local target - , int argc - , v8::Local argv[]) const { - EscapableHandleScope scope; - - v8::Local callback = New(handle_); -# if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION - return scope.Escape(New(node::MakeCallback( - isolate - , target - , callback - , argc - , argv - ))); -# else - return scope.Escape(node::MakeCallback( - isolate - , target - , callback - , argc - , argv - )); -# endif - } -#else - v8::Local Call_(v8::Local target - , int argc - , v8::Local argv[]) const { - EscapableHandleScope scope; - - v8::Local callback = New(handle_); - return scope.Escape(New(node::MakeCallback( - target - , callback - , argc - , argv - ))); - } -#endif -}; - -/* abstract */ class AsyncWorker { - public: - explicit AsyncWorker(Callback *callback_) - : callback(callback_), errmsg_(NULL) { - request.data = this; - - HandleScope scope; - v8::Local obj = New(); - persistentHandle.Reset(obj); - } - - virtual ~AsyncWorker() { - HandleScope scope; - - if (!persistentHandle.IsEmpty()) - persistentHandle.Reset(); - delete callback; - delete[] errmsg_; - } - - virtual void WorkComplete() { - HandleScope scope; - - if (errmsg_ == NULL) - HandleOKCallback(); - else - HandleErrorCallback(); - delete callback; - callback = NULL; - } - - inline void SaveToPersistent( - const char *key, const v8::Local &value) { - HandleScope scope; - New(persistentHandle)->Set(New(key).ToLocalChecked(), value); - } - - inline void SaveToPersistent( - const v8::Local &key, const v8::Local &value) { - HandleScope scope; - New(persistentHandle)->Set(key, value); - } - - inline void SaveToPersistent( - uint32_t index, const v8::Local &value) { - HandleScope scope; - New(persistentHandle)->Set(index, value); - } - - inline v8::Local GetFromPersistent(const char *key) const { - EscapableHandleScope scope; - return scope.Escape( - New(persistentHandle)->Get(New(key).ToLocalChecked())); - } - - inline v8::Local - GetFromPersistent(const v8::Local &key) const { - EscapableHandleScope scope; - return scope.Escape(New(persistentHandle)->Get(key)); - } - - inline v8::Local GetFromPersistent(uint32_t index) const { - EscapableHandleScope scope; - return scope.Escape(New(persistentHandle)->Get(index)); - } - - virtual void Execute() = 0; - - uv_work_t request; - - virtual void Destroy() { - delete this; - } - - protected: - Persistent persistentHandle; - Callback *callback; - - virtual void HandleOKCallback() { - callback->Call(0, NULL); - } - - virtual void HandleErrorCallback() { - HandleScope scope; - - v8::Local argv[] = { - v8::Exception::Error(New(ErrorMessage()).ToLocalChecked()) - }; - callback->Call(1, argv); - } - - void SetErrorMessage(const char *msg) { - delete[] errmsg_; - - size_t size = strlen(msg) + 1; - errmsg_ = new char[size]; - memcpy(errmsg_, msg, size); - } - - const char* ErrorMessage() const { - return errmsg_; - } - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(AsyncWorker) - char *errmsg_; -}; - - -template -/* abstract */ class AsyncProgressWorkerBase : public AsyncWorker { - public: - explicit AsyncProgressWorkerBase(Callback *callback_) - : AsyncWorker(callback_), asyncdata_(NULL), asyncsize_(0) { - async = new uv_async_t; - uv_async_init( - uv_default_loop() - , async - , AsyncProgress_ - ); - async->data = this; - - uv_mutex_init(&async_lock); - } - - virtual ~AsyncProgressWorkerBase() { - uv_mutex_destroy(&async_lock); - - delete[] asyncdata_; - } - - void WorkProgress() { - uv_mutex_lock(&async_lock); - T *data = asyncdata_; - size_t size = asyncsize_; - asyncdata_ = NULL; - uv_mutex_unlock(&async_lock); - - // Don't send progress events after we've already completed. - if (callback) { - HandleProgressCallback(data, size); - } - delete[] data; - } - - class ExecutionProgress { - friend class AsyncProgressWorkerBase; - public: - void Signal() const { - uv_async_send(that_->async); - } - - void Send(const T* data, size_t size) const { - that_->SendProgress_(data, size); - } - - private: - explicit ExecutionProgress(AsyncProgressWorkerBase *that) : that_(that) {} - NAN_DISALLOW_ASSIGN_COPY_MOVE(ExecutionProgress) - AsyncProgressWorkerBase* const that_; - }; - - virtual void Execute(const ExecutionProgress& progress) = 0; - virtual void HandleProgressCallback(const T *data, size_t size) = 0; - - virtual void Destroy() { - uv_close(reinterpret_cast(async), AsyncClose_); - } - - private: - void Execute() /*final override*/ { - ExecutionProgress progress(this); - Execute(progress); - } - - void SendProgress_(const T *data, size_t size) { - T *new_data = new T[size]; - { - T *it = new_data; - std::copy(data, data + size, it); - } - - uv_mutex_lock(&async_lock); - T *old_data = asyncdata_; - asyncdata_ = new_data; - asyncsize_ = size; - uv_mutex_unlock(&async_lock); - - delete[] old_data; - uv_async_send(async); - } - - inline static NAUV_WORK_CB(AsyncProgress_) { - AsyncProgressWorkerBase *worker = - static_cast(async->data); - worker->WorkProgress(); - } - - inline static void AsyncClose_(uv_handle_t* handle) { - AsyncProgressWorkerBase *worker = - static_cast(handle->data); - delete reinterpret_cast(handle); - delete worker; - } - - uv_async_t *async; - uv_mutex_t async_lock; - T *asyncdata_; - size_t asyncsize_; -}; - -// This ensures compatibility to the previous un-templated AsyncProgressWorker -// class definition. -typedef AsyncProgressWorkerBase AsyncProgressWorker; - -inline void AsyncExecute (uv_work_t* req) { - AsyncWorker *worker = static_cast(req->data); - worker->Execute(); -} - -inline void AsyncExecuteComplete (uv_work_t* req) { - AsyncWorker* worker = static_cast(req->data); - worker->WorkComplete(); - worker->Destroy(); -} - -inline void AsyncQueueWorker (AsyncWorker* worker) { - uv_queue_work( - uv_default_loop() - , &worker->request - , AsyncExecute - , reinterpret_cast(AsyncExecuteComplete) - ); -} - -namespace imp { - -inline -ExternalOneByteStringResource const* -GetExternalResource(v8::Local str) { -#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION - return str->GetExternalAsciiStringResource(); -#else - return str->GetExternalOneByteStringResource(); -#endif -} - -inline -bool -IsExternal(v8::Local str) { -#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION - return str->IsExternalAscii(); -#else - return str->IsExternalOneByte(); -#endif -} - -} // end of namespace imp - -enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER}; - -#if NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION -# include "nan_string_bytes.h" // NOLINT(build/include) -#endif - -inline v8::Local Encode( - const void *buf, size_t len, enum Encoding encoding = BINARY) { -#if (NODE_MODULE_VERSION >= ATOM_0_21_MODULE_VERSION) - v8::Isolate* isolate = v8::Isolate::GetCurrent(); - node::encoding node_enc = static_cast(encoding); - - if (encoding == UCS2) { - return node::Encode( - isolate - , reinterpret_cast(buf) - , len / 2); - } else { - return node::Encode( - isolate - , reinterpret_cast(buf) - , len - , node_enc); - } -#elif (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) - return node::Encode( - v8::Isolate::GetCurrent() - , buf, len - , static_cast(encoding)); -#else -# if NODE_MODULE_VERSION >= NODE_0_10_MODULE_VERSION - return node::Encode(buf, len, static_cast(encoding)); -# else - return imp::Encode(reinterpret_cast(buf), len, encoding); -# endif -#endif -} - -inline ssize_t DecodeBytes( - v8::Local val, enum Encoding encoding = BINARY) { -#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) - return node::DecodeBytes( - v8::Isolate::GetCurrent() - , val - , static_cast(encoding)); -#else -# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION) - if (encoding == BUFFER) { - return node::DecodeBytes(val, node::BINARY); - } -# endif - return node::DecodeBytes(val, static_cast(encoding)); -#endif -} - -inline ssize_t DecodeWrite( - char *buf - , size_t len - , v8::Local val - , enum Encoding encoding = BINARY) { -#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) - return node::DecodeWrite( - v8::Isolate::GetCurrent() - , buf - , len - , val - , static_cast(encoding)); -#else -# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION) - if (encoding == BUFFER) { - return node::DecodeWrite(buf, len, val, node::BINARY); - } -# endif - return node::DecodeWrite( - buf - , len - , val - , static_cast(encoding)); -#endif -} - -inline void SetPrototypeTemplate( - v8::Local templ - , const char *name - , v8::Local value -) { - SetTemplate(templ->PrototypeTemplate(), name, value); -} - -inline void SetPrototypeTemplate( - v8::Local templ - , v8::Local name - , v8::Local value - , v8::PropertyAttribute attributes -) { - SetTemplate(templ->PrototypeTemplate(), name, value, attributes); -} - -inline void SetInstanceTemplate( - v8::Local templ - , const char *name - , v8::Local value -) { - SetTemplate(templ->InstanceTemplate(), name, value); -} - -inline void SetInstanceTemplate( - v8::Local templ - , v8::Local name - , v8::Local value - , v8::PropertyAttribute attributes -) { - SetTemplate(templ->InstanceTemplate(), name, value, attributes); -} - -namespace imp { - -// Note(@agnat): Helper to distinguish different receiver types. The first -// version deals with receivers derived from v8::Template. The second version -// handles everything else. The final argument only serves as discriminator and -// is unused. -template -inline -void -SetMethodAux(T recv, - v8::Local name, - v8::Local tpl, - v8::Template *) { - recv->Set(name, tpl); -} - -template -inline -void -SetMethodAux(T recv, - v8::Local name, - v8::Local tpl, - ...) { - recv->Set(name, GetFunction(tpl).ToLocalChecked()); -} - -} // end of namespace imp - -template class HandleType> -inline void SetMethod( - HandleType recv - , const char *name - , FunctionCallback callback) { - HandleScope scope; - v8::Local t = New(callback); - v8::Local fn_name = New(name).ToLocalChecked(); - t->SetClassName(fn_name); - // Note(@agnat): Pass an empty T* as discriminator. See note on - // SetMethodAux(...) above - imp::SetMethodAux(recv, fn_name, t, static_cast(0)); -} - -inline void SetPrototypeMethod( - v8::Local recv - , const char* name, FunctionCallback callback) { - HandleScope scope; - v8::Local t = New( - callback - , v8::Local() - , New(recv)); - v8::Local fn_name = New(name).ToLocalChecked(); - recv->PrototypeTemplate()->Set(fn_name, t); - t->SetClassName(fn_name); -} - -//=== Accessors and Such ======================================================= - -inline void SetAccessor( - v8::Local tpl - , v8::Local name - , GetterCallback getter - , SetterCallback setter = 0 - , v8::Local data = v8::Local() - , v8::AccessControl settings = v8::DEFAULT - , v8::PropertyAttribute attribute = v8::None - , imp::Sig signature = imp::Sig()) { - HandleScope scope; - - imp::NativeGetter getter_ = - imp::GetterCallbackWrapper; - imp::NativeSetter setter_ = - setter ? imp::SetterCallbackWrapper : 0; - - v8::Local otpl = New(); - otpl->SetInternalFieldCount(imp::kAccessorFieldCount); - v8::Local obj = NewInstance(otpl).ToLocalChecked(); - - obj->SetInternalField( - imp::kGetterIndex - , New(reinterpret_cast(getter))); - - if (setter != 0) { - obj->SetInternalField( - imp::kSetterIndex - , New(reinterpret_cast(setter))); - } - - if (!data.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, data); - } - - tpl->SetAccessor( - name - , getter_ - , setter_ - , obj - , settings - , attribute - , signature); -} - -inline bool SetAccessor( - v8::Local obj - , v8::Local name - , GetterCallback getter - , SetterCallback setter = 0 - , v8::Local data = v8::Local() - , v8::AccessControl settings = v8::DEFAULT - , v8::PropertyAttribute attribute = v8::None) { - EscapableHandleScope scope; - - imp::NativeGetter getter_ = - imp::GetterCallbackWrapper; - imp::NativeSetter setter_ = - setter ? imp::SetterCallbackWrapper : 0; - - v8::Local otpl = New(); - otpl->SetInternalFieldCount(imp::kAccessorFieldCount); - v8::Local dataobj = NewInstance(otpl).ToLocalChecked(); - - dataobj->SetInternalField( - imp::kGetterIndex - , New(reinterpret_cast(getter))); - - if (!data.IsEmpty()) { - dataobj->SetInternalField(imp::kDataIndex, data); - } - - if (setter) { - dataobj->SetInternalField( - imp::kSetterIndex - , New(reinterpret_cast(setter))); - } - -#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION) - return obj->SetAccessor( - GetCurrentContext() - , name - , getter_ - , setter_ - , dataobj - , settings - , attribute).FromMaybe(false); -#else - return obj->SetAccessor( - name - , getter_ - , setter_ - , dataobj - , settings - , attribute); -#endif -} - -inline void SetNamedPropertyHandler( - v8::Local tpl - , PropertyGetterCallback getter - , PropertySetterCallback setter = 0 - , PropertyQueryCallback query = 0 - , PropertyDeleterCallback deleter = 0 - , PropertyEnumeratorCallback enumerator = 0 - , v8::Local data = v8::Local()) { - HandleScope scope; - - imp::NativePropertyGetter getter_ = - imp::PropertyGetterCallbackWrapper; - imp::NativePropertySetter setter_ = - setter ? imp::PropertySetterCallbackWrapper : 0; - imp::NativePropertyQuery query_ = - query ? imp::PropertyQueryCallbackWrapper : 0; - imp::NativePropertyDeleter *deleter_ = - deleter ? imp::PropertyDeleterCallbackWrapper : 0; - imp::NativePropertyEnumerator enumerator_ = - enumerator ? imp::PropertyEnumeratorCallbackWrapper : 0; - - v8::Local otpl = New(); - otpl->SetInternalFieldCount(imp::kPropertyFieldCount); - v8::Local obj = NewInstance(otpl).ToLocalChecked(); - obj->SetInternalField( - imp::kPropertyGetterIndex - , New(reinterpret_cast(getter))); - - if (setter) { - obj->SetInternalField( - imp::kPropertySetterIndex - , New(reinterpret_cast(setter))); - } - - if (query) { - obj->SetInternalField( - imp::kPropertyQueryIndex - , New(reinterpret_cast(query))); - } - - if (deleter) { - obj->SetInternalField( - imp::kPropertyDeleterIndex - , New(reinterpret_cast(deleter))); - } - - if (enumerator) { - obj->SetInternalField( - imp::kPropertyEnumeratorIndex - , New(reinterpret_cast(enumerator))); - } - - if (!data.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, data); - } - -#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION - tpl->SetHandler(v8::NamedPropertyHandlerConfiguration( - getter_, setter_, query_, deleter_, enumerator_, obj)); -#else - tpl->SetNamedPropertyHandler( - getter_ - , setter_ - , query_ - , deleter_ - , enumerator_ - , obj); -#endif -} - -inline void SetIndexedPropertyHandler( - v8::Local tpl - , IndexGetterCallback getter - , IndexSetterCallback setter = 0 - , IndexQueryCallback query = 0 - , IndexDeleterCallback deleter = 0 - , IndexEnumeratorCallback enumerator = 0 - , v8::Local data = v8::Local()) { - HandleScope scope; - - imp::NativeIndexGetter getter_ = - imp::IndexGetterCallbackWrapper; - imp::NativeIndexSetter setter_ = - setter ? imp::IndexSetterCallbackWrapper : 0; - imp::NativeIndexQuery query_ = - query ? imp::IndexQueryCallbackWrapper : 0; - imp::NativeIndexDeleter deleter_ = - deleter ? imp::IndexDeleterCallbackWrapper : 0; - imp::NativeIndexEnumerator enumerator_ = - enumerator ? imp::IndexEnumeratorCallbackWrapper : 0; - - v8::Local otpl = New(); - otpl->SetInternalFieldCount(imp::kIndexPropertyFieldCount); - v8::Local obj = NewInstance(otpl).ToLocalChecked(); - obj->SetInternalField( - imp::kIndexPropertyGetterIndex - , New(reinterpret_cast(getter))); - - if (setter) { - obj->SetInternalField( - imp::kIndexPropertySetterIndex - , New(reinterpret_cast(setter))); - } - - if (query) { - obj->SetInternalField( - imp::kIndexPropertyQueryIndex - , New(reinterpret_cast(query))); - } - - if (deleter) { - obj->SetInternalField( - imp::kIndexPropertyDeleterIndex - , New(reinterpret_cast(deleter))); - } - - if (enumerator) { - obj->SetInternalField( - imp::kIndexPropertyEnumeratorIndex - , New(reinterpret_cast(enumerator))); - } - - if (!data.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, data); - } - -#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION - tpl->SetHandler(v8::IndexedPropertyHandlerConfiguration( - getter_, setter_, query_, deleter_, enumerator_, obj)); -#else - tpl->SetIndexedPropertyHandler( - getter_ - , setter_ - , query_ - , deleter_ - , enumerator_ - , obj); -#endif -} - -inline void SetCallHandler( - v8::Local tpl - , FunctionCallback callback - , v8::Local data = v8::Local()) { - HandleScope scope; - - v8::Local otpl = New(); - otpl->SetInternalFieldCount(imp::kFunctionFieldCount); - v8::Local obj = NewInstance(otpl).ToLocalChecked(); - - obj->SetInternalField( - imp::kFunctionIndex - , New(reinterpret_cast(callback))); - - if (!data.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, data); - } - - tpl->SetCallHandler(imp::FunctionCallbackWrapper, obj); -} - - -inline void SetCallAsFunctionHandler( - v8::Local tpl, - FunctionCallback callback, - v8::Local data = v8::Local()) { - HandleScope scope; - - v8::Local otpl = New(); - otpl->SetInternalFieldCount(imp::kFunctionFieldCount); - v8::Local obj = NewInstance(otpl).ToLocalChecked(); - - obj->SetInternalField( - imp::kFunctionIndex - , New(reinterpret_cast(callback))); - - if (!data.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, data); - } - - tpl->SetCallAsFunctionHandler(imp::FunctionCallbackWrapper, obj); -} - -//=== Weak Persistent Handling ================================================= - -#include "nan_weak.h" // NOLINT(build/include) - -//=== ObjectWrap =============================================================== - -#include "nan_object_wrap.h" // NOLINT(build/include) - -//=== Export ================================================================== - -inline -void -Export(ADDON_REGISTER_FUNCTION_ARGS_TYPE target, const char *name, - FunctionCallback f) { - Set(target, New(name).ToLocalChecked(), - GetFunction(New(f)).ToLocalChecked()); -} - -//=== Tap Reverse Binding ===================================================== - -struct Tap { - explicit Tap(v8::Local t) : t_() { - t_.Reset(To(t).ToLocalChecked()); - } - - ~Tap() { t_.Reset(); } // not sure if neccessary - - inline void plan(int i) { - v8::Local arg = New(i); - MakeCallback(New(t_), "plan", 1, &arg); - } - - inline void ok(bool isOk, const char *msg = NULL) { - v8::Local args[2]; - args[0] = New(isOk); - if (msg) args[1] = New(msg).ToLocalChecked(); - MakeCallback(New(t_), "ok", msg ? 2 : 1, args); - } - - inline void pass(const char * msg = NULL) { - v8::Local hmsg; - if (msg) hmsg = New(msg).ToLocalChecked(); - MakeCallback(New(t_), "pass", msg ? 1 : 0, &hmsg); - } - - private: - Persistent t_; -}; - -#define NAN_STRINGIZE2(x) #x -#define NAN_STRINGIZE(x) NAN_STRINGIZE2(x) -#define NAN_TEST_EXPRESSION(expression) \ - ( expression ), __FILE__ ":" NAN_STRINGIZE(__LINE__) ": " #expression - -#define NAN_EXPORT(target, function) Export(target, #function, function) - -#undef TYPE_CHECK - -//=== Generic Maybefication =================================================== - -namespace imp { - -template struct Maybefier; - -template struct Maybefier > { - static MaybeLocal convert(v8::Local v) { - return MaybeLocal(v); - } -}; - -template struct Maybefier > { - static MaybeLocal convert(MaybeLocal v) { - return v; - } -}; - -} // end of namespace imp - -template class MaybeMaybe> -MaybeLocal -MakeMaybe(MaybeMaybe v) { - return imp::Maybefier >::convert(v); -} - -//=== TypedArrayContents ======================================================= - -#include "nan_typedarray_contents.h" // NOLINT(build/include) - -} // end of namespace Nan - -#endif // NAN_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h deleted file mode 100644 index 851509fdef5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks.h +++ /dev/null @@ -1,88 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_CALLBACKS_H_ -#define NAN_CALLBACKS_H_ - -template class FunctionCallbackInfo; -template class PropertyCallbackInfo; -template class Global; - -typedef void(*FunctionCallback)(const FunctionCallbackInfo&); -typedef void(*GetterCallback) - (v8::Local, const PropertyCallbackInfo&); -typedef void(*SetterCallback)( - v8::Local, - v8::Local, - const PropertyCallbackInfo&); -typedef void(*PropertyGetterCallback)( - v8::Local, - const PropertyCallbackInfo&); -typedef void(*PropertySetterCallback)( - v8::Local, - v8::Local, - const PropertyCallbackInfo&); -typedef void(*PropertyEnumeratorCallback) - (const PropertyCallbackInfo&); -typedef void(*PropertyDeleterCallback)( - v8::Local, - const PropertyCallbackInfo&); -typedef void(*PropertyQueryCallback)( - v8::Local, - const PropertyCallbackInfo&); -typedef void(*IndexGetterCallback)( - uint32_t, - const PropertyCallbackInfo&); -typedef void(*IndexSetterCallback)( - uint32_t, - v8::Local, - const PropertyCallbackInfo&); -typedef void(*IndexEnumeratorCallback) - (const PropertyCallbackInfo&); -typedef void(*IndexDeleterCallback)( - uint32_t, - const PropertyCallbackInfo&); -typedef void(*IndexQueryCallback)( - uint32_t, - const PropertyCallbackInfo&); - -namespace imp { -typedef v8::Local Sig; - -static const int kDataIndex = 0; - -static const int kFunctionIndex = 1; -static const int kFunctionFieldCount = 2; - -static const int kGetterIndex = 1; -static const int kSetterIndex = 2; -static const int kAccessorFieldCount = 3; - -static const int kPropertyGetterIndex = 1; -static const int kPropertySetterIndex = 2; -static const int kPropertyEnumeratorIndex = 3; -static const int kPropertyDeleterIndex = 4; -static const int kPropertyQueryIndex = 5; -static const int kPropertyFieldCount = 6; - -static const int kIndexPropertyGetterIndex = 1; -static const int kIndexPropertySetterIndex = 2; -static const int kIndexPropertyEnumeratorIndex = 3; -static const int kIndexPropertyDeleterIndex = 4; -static const int kIndexPropertyQueryIndex = 5; -static const int kIndexPropertyFieldCount = 6; - -} // end of namespace imp - -#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION -# include "nan_callbacks_12_inl.h" // NOLINT(build/include) -#else -# include "nan_callbacks_pre_12_inl.h" // NOLINT(build/include) -#endif - -#endif // NAN_CALLBACKS_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h deleted file mode 100644 index bea12c71fb3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_12_inl.h +++ /dev/null @@ -1,512 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_CALLBACKS_12_INL_H_ -#define NAN_CALLBACKS_12_INL_H_ - -template -class ReturnValue { - v8::ReturnValue value_; - - public: - template - explicit inline ReturnValue(const v8::ReturnValue &value) : - value_(value) {} - template - explicit inline ReturnValue(const ReturnValue& that) - : value_(that.value_) { - TYPE_CHECK(T, S); - } - - // Handle setters - template inline void Set(const v8::Local &handle) { - TYPE_CHECK(T, S); - value_.Set(handle); - } - - template inline void Set(const Global &handle) { - TYPE_CHECK(T, S); -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && \ - (V8_MINOR_VERSION > 5 || (V8_MINOR_VERSION == 5 && \ - defined(V8_BUILD_NUMBER) && V8_BUILD_NUMBER >= 8)))) - value_.Set(handle); -#else - value_.Set(*reinterpret_cast*>(&handle)); - const_cast &>(handle).Reset(); -#endif - } - - // Fast primitive setters - inline void Set(bool value) { - TYPE_CHECK(T, v8::Boolean); - value_.Set(value); - } - - inline void Set(double i) { - TYPE_CHECK(T, v8::Number); - value_.Set(i); - } - - inline void Set(int32_t i) { - TYPE_CHECK(T, v8::Integer); - value_.Set(i); - } - - inline void Set(uint32_t i) { - TYPE_CHECK(T, v8::Integer); - value_.Set(i); - } - - // Fast JS primitive setters - inline void SetNull() { - TYPE_CHECK(T, v8::Primitive); - value_.SetNull(); - } - - inline void SetUndefined() { - TYPE_CHECK(T, v8::Primitive); - value_.SetUndefined(); - } - - inline void SetEmptyString() { - TYPE_CHECK(T, v8::String); - value_.SetEmptyString(); - } - - // Convenience getter for isolate - inline v8::Isolate *GetIsolate() const { - return value_.GetIsolate(); - } - - // Pointer setter: Uncompilable to prevent inadvertent misuse. - template - inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); } -}; - -template -class FunctionCallbackInfo { - const v8::FunctionCallbackInfo &info_; - const v8::Local data_; - - public: - explicit inline FunctionCallbackInfo( - const v8::FunctionCallbackInfo &info - , v8::Local data) : - info_(info) - , data_(data) {} - - inline ReturnValue GetReturnValue() const { - return ReturnValue(info_.GetReturnValue()); - } - - inline v8::Local Callee() const { return info_.Callee(); } - inline v8::Local Data() const { return data_; } - inline v8::Local Holder() const { return info_.Holder(); } - inline bool IsConstructCall() const { return info_.IsConstructCall(); } - inline int Length() const { return info_.Length(); } - inline v8::Local operator[](int i) const { return info_[i]; } - inline v8::Local This() const { return info_.This(); } - inline v8::Isolate *GetIsolate() const { return info_.GetIsolate(); } - - - protected: - static const int kHolderIndex = 0; - static const int kIsolateIndex = 1; - static const int kReturnValueDefaultValueIndex = 2; - static const int kReturnValueIndex = 3; - static const int kDataIndex = 4; - static const int kCalleeIndex = 5; - static const int kContextSaveIndex = 6; - static const int kArgsLength = 7; - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo) -}; - -template -class PropertyCallbackInfo { - const v8::PropertyCallbackInfo &info_; - const v8::Local data_; - - public: - explicit inline PropertyCallbackInfo( - const v8::PropertyCallbackInfo &info - , const v8::Local data) : - info_(info) - , data_(data) {} - - inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); } - inline v8::Local Data() const { return data_; } - inline v8::Local This() const { return info_.This(); } - inline v8::Local Holder() const { return info_.Holder(); } - inline ReturnValue GetReturnValue() const { - return ReturnValue(info_.GetReturnValue()); - } - - protected: - static const int kHolderIndex = 0; - static const int kIsolateIndex = 1; - static const int kReturnValueDefaultValueIndex = 2; - static const int kReturnValueIndex = 3; - static const int kDataIndex = 4; - static const int kThisIndex = 5; - static const int kArgsLength = 6; - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfo) -}; - -namespace imp { -static -void FunctionCallbackWrapper(const v8::FunctionCallbackInfo &info) { - v8::Local obj = info.Data().As(); - FunctionCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kFunctionIndex).As()->Value())); - FunctionCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - callback(cbinfo); -} - -typedef void (*NativeFunction)(const v8::FunctionCallbackInfo &); - -#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION -static -void GetterCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - GetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kGetterIndex).As()->Value())); - callback(property.As(), cbinfo); -} - -typedef void (*NativeGetter) - (v8::Local, const v8::PropertyCallbackInfo &); - -static -void SetterCallbackWrapper( - v8::Local property - , v8::Local value - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - SetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kSetterIndex).As()->Value())); - callback(property.As(), value, cbinfo); -} - -typedef void (*NativeSetter)( - v8::Local - , v8::Local - , const v8::PropertyCallbackInfo &); -#else -static -void GetterCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - GetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kGetterIndex).As()->Value())); - callback(property, cbinfo); -} - -typedef void (*NativeGetter) - (v8::Local, const v8::PropertyCallbackInfo &); - -static -void SetterCallbackWrapper( - v8::Local property - , v8::Local value - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - SetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kSetterIndex).As()->Value())); - callback(property, value, cbinfo); -} - -typedef void (*NativeSetter)( - v8::Local - , v8::Local - , const v8::PropertyCallbackInfo &); -#endif - -#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION -static -void PropertyGetterCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyGetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyGetterIndex) - .As()->Value())); - callback(property.As(), cbinfo); -} - -typedef void (*NativePropertyGetter) - (v8::Local, const v8::PropertyCallbackInfo &); - -static -void PropertySetterCallbackWrapper( - v8::Local property - , v8::Local value - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertySetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertySetterIndex) - .As()->Value())); - callback(property.As(), value, cbinfo); -} - -typedef void (*NativePropertySetter)( - v8::Local - , v8::Local - , const v8::PropertyCallbackInfo &); - -static -void PropertyEnumeratorCallbackWrapper( - const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyEnumeratorCallback callback = - reinterpret_cast(reinterpret_cast( - obj->GetInternalField(kPropertyEnumeratorIndex) - .As()->Value())); - callback(cbinfo); -} - -typedef void (*NativePropertyEnumerator) - (const v8::PropertyCallbackInfo &); - -static -void PropertyDeleterCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyDeleterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyDeleterIndex) - .As()->Value())); - callback(property.As(), cbinfo); -} - -typedef void (NativePropertyDeleter) - (v8::Local, const v8::PropertyCallbackInfo &); - -static -void PropertyQueryCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyQueryCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyQueryIndex) - .As()->Value())); - callback(property.As(), cbinfo); -} - -typedef void (*NativePropertyQuery) - (v8::Local, const v8::PropertyCallbackInfo &); -#else -static -void PropertyGetterCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyGetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyGetterIndex) - .As()->Value())); - callback(property, cbinfo); -} - -typedef void (*NativePropertyGetter) - (v8::Local, const v8::PropertyCallbackInfo &); - -static -void PropertySetterCallbackWrapper( - v8::Local property - , v8::Local value - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertySetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertySetterIndex) - .As()->Value())); - callback(property, value, cbinfo); -} - -typedef void (*NativePropertySetter)( - v8::Local - , v8::Local - , const v8::PropertyCallbackInfo &); - -static -void PropertyEnumeratorCallbackWrapper( - const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyEnumeratorCallback callback = - reinterpret_cast(reinterpret_cast( - obj->GetInternalField(kPropertyEnumeratorIndex) - .As()->Value())); - callback(cbinfo); -} - -typedef void (*NativePropertyEnumerator) - (const v8::PropertyCallbackInfo &); - -static -void PropertyDeleterCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyDeleterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyDeleterIndex) - .As()->Value())); - callback(property, cbinfo); -} - -typedef void (NativePropertyDeleter) - (v8::Local, const v8::PropertyCallbackInfo &); - -static -void PropertyQueryCallbackWrapper( - v8::Local property - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyQueryCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyQueryIndex) - .As()->Value())); - callback(property, cbinfo); -} - -typedef void (*NativePropertyQuery) - (v8::Local, const v8::PropertyCallbackInfo &); -#endif - -static -void IndexGetterCallbackWrapper( - uint32_t index, const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexGetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertyGetterIndex) - .As()->Value())); - callback(index, cbinfo); -} - -typedef void (*NativeIndexGetter) - (uint32_t, const v8::PropertyCallbackInfo &); - -static -void IndexSetterCallbackWrapper( - uint32_t index - , v8::Local value - , const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexSetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertySetterIndex) - .As()->Value())); - callback(index, value, cbinfo); -} - -typedef void (*NativeIndexSetter)( - uint32_t - , v8::Local - , const v8::PropertyCallbackInfo &); - -static -void IndexEnumeratorCallbackWrapper( - const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexEnumeratorCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField( - kIndexPropertyEnumeratorIndex).As()->Value())); - callback(cbinfo); -} - -typedef void (*NativeIndexEnumerator) - (const v8::PropertyCallbackInfo &); - -static -void IndexDeleterCallbackWrapper( - uint32_t index, const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexDeleterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertyDeleterIndex) - .As()->Value())); - callback(index, cbinfo); -} - -typedef void (*NativeIndexDeleter) - (uint32_t, const v8::PropertyCallbackInfo &); - -static -void IndexQueryCallbackWrapper( - uint32_t index, const v8::PropertyCallbackInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexQueryCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertyQueryIndex) - .As()->Value())); - callback(index, cbinfo); -} - -typedef void (*NativeIndexQuery) - (uint32_t, const v8::PropertyCallbackInfo &); -} // end of namespace imp - -#endif // NAN_CALLBACKS_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h deleted file mode 100644 index 5e2b8e2b2a3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_callbacks_pre_12_inl.h +++ /dev/null @@ -1,506 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_CALLBACKS_PRE_12_INL_H_ -#define NAN_CALLBACKS_PRE_12_INL_H_ - -namespace imp { -template class ReturnValueImp; -} // end of namespace imp - -template -class ReturnValue { - v8::Isolate *isolate_; - v8::Persistent *value_; - friend class imp::ReturnValueImp; - - public: - template - explicit inline ReturnValue(v8::Isolate *isolate, v8::Persistent *p) : - isolate_(isolate), value_(p) {} - template - explicit inline ReturnValue(const ReturnValue& that) - : isolate_(that.isolate_), value_(that.value_) { - TYPE_CHECK(T, S); - } - - // Handle setters - template inline void Set(const v8::Local &handle) { - TYPE_CHECK(T, S); - value_->Dispose(); - *value_ = v8::Persistent::New(handle); - } - - template inline void Set(const Global &handle) { - TYPE_CHECK(T, S); - value_->Dispose(); - *value_ = v8::Persistent::New(handle.persistent); - const_cast &>(handle).Reset(); - } - - // Fast primitive setters - inline void Set(bool value) { - TYPE_CHECK(T, v8::Boolean); - value_->Dispose(); - *value_ = v8::Persistent::New(v8::Boolean::New(value)); - } - - inline void Set(double i) { - TYPE_CHECK(T, v8::Number); - value_->Dispose(); - *value_ = v8::Persistent::New(v8::Number::New(i)); - } - - inline void Set(int32_t i) { - TYPE_CHECK(T, v8::Integer); - value_->Dispose(); - *value_ = v8::Persistent::New(v8::Int32::New(i)); - } - - inline void Set(uint32_t i) { - TYPE_CHECK(T, v8::Integer); - value_->Dispose(); - *value_ = v8::Persistent::New(v8::Uint32::NewFromUnsigned(i)); - } - - // Fast JS primitive setters - inline void SetNull() { - TYPE_CHECK(T, v8::Primitive); - value_->Dispose(); - *value_ = v8::Persistent::New(v8::Null()); - } - - inline void SetUndefined() { - TYPE_CHECK(T, v8::Primitive); - value_->Dispose(); - *value_ = v8::Persistent::New(v8::Undefined()); - } - - inline void SetEmptyString() { - TYPE_CHECK(T, v8::String); - value_->Dispose(); - *value_ = v8::Persistent::New(v8::String::Empty()); - } - - // Convenience getter for isolate - inline v8::Isolate *GetIsolate() const { - return isolate_; - } - - // Pointer setter: Uncompilable to prevent inadvertent misuse. - template - inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); } -}; - -template -class FunctionCallbackInfo { - const v8::Arguments &args_; - v8::Local data_; - ReturnValue return_value_; - v8::Persistent retval_; - - public: - explicit inline FunctionCallbackInfo( - const v8::Arguments &args - , v8::Local data) : - args_(args) - , data_(data) - , return_value_(args.GetIsolate(), &retval_) - , retval_(v8::Persistent::New(v8::Undefined())) {} - - inline ~FunctionCallbackInfo() { - retval_.Dispose(); - retval_.Clear(); - } - - inline ReturnValue GetReturnValue() const { - return ReturnValue(return_value_); - } - - inline v8::Local Callee() const { return args_.Callee(); } - inline v8::Local Data() const { return data_; } - inline v8::Local Holder() const { return args_.Holder(); } - inline bool IsConstructCall() const { return args_.IsConstructCall(); } - inline int Length() const { return args_.Length(); } - inline v8::Local operator[](int i) const { return args_[i]; } - inline v8::Local This() const { return args_.This(); } - inline v8::Isolate *GetIsolate() const { return args_.GetIsolate(); } - - - protected: - static const int kHolderIndex = 0; - static const int kIsolateIndex = 1; - static const int kReturnValueDefaultValueIndex = 2; - static const int kReturnValueIndex = 3; - static const int kDataIndex = 4; - static const int kCalleeIndex = 5; - static const int kContextSaveIndex = 6; - static const int kArgsLength = 7; - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo) -}; - -template -class PropertyCallbackInfoBase { - const v8::AccessorInfo &info_; - const v8::Local data_; - - public: - explicit inline PropertyCallbackInfoBase( - const v8::AccessorInfo &info - , const v8::Local data) : - info_(info) - , data_(data) {} - - inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); } - inline v8::Local Data() const { return data_; } - inline v8::Local This() const { return info_.This(); } - inline v8::Local Holder() const { return info_.Holder(); } - - protected: - static const int kHolderIndex = 0; - static const int kIsolateIndex = 1; - static const int kReturnValueDefaultValueIndex = 2; - static const int kReturnValueIndex = 3; - static const int kDataIndex = 4; - static const int kThisIndex = 5; - static const int kArgsLength = 6; - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfoBase) -}; - -template -class PropertyCallbackInfo : public PropertyCallbackInfoBase { - ReturnValue return_value_; - v8::Persistent retval_; - - public: - explicit inline PropertyCallbackInfo( - const v8::AccessorInfo &info - , const v8::Local data) : - PropertyCallbackInfoBase(info, data) - , return_value_(info.GetIsolate(), &retval_) - , retval_(v8::Persistent::New(v8::Undefined())) {} - - inline ~PropertyCallbackInfo() { - retval_.Dispose(); - retval_.Clear(); - } - - inline ReturnValue GetReturnValue() const { return return_value_; } -}; - -template<> -class PropertyCallbackInfo : - public PropertyCallbackInfoBase { - ReturnValue return_value_; - v8::Persistent retval_; - - public: - explicit inline PropertyCallbackInfo( - const v8::AccessorInfo &info - , const v8::Local data) : - PropertyCallbackInfoBase(info, data) - , return_value_(info.GetIsolate(), &retval_) - , retval_(v8::Persistent::New(v8::Local())) {} - - inline ~PropertyCallbackInfo() { - retval_.Dispose(); - retval_.Clear(); - } - - inline ReturnValue GetReturnValue() const { - return return_value_; - } -}; - -template<> -class PropertyCallbackInfo : - public PropertyCallbackInfoBase { - ReturnValue return_value_; - v8::Persistent retval_; - - public: - explicit inline PropertyCallbackInfo( - const v8::AccessorInfo &info - , const v8::Local data) : - PropertyCallbackInfoBase(info, data) - , return_value_(info.GetIsolate(), &retval_) - , retval_(v8::Persistent::New(v8::Local())) {} - - inline ~PropertyCallbackInfo() { - retval_.Dispose(); - retval_.Clear(); - } - - inline ReturnValue GetReturnValue() const { - return return_value_; - } -}; - -template<> -class PropertyCallbackInfo : - public PropertyCallbackInfoBase { - ReturnValue return_value_; - v8::Persistent retval_; - - public: - explicit inline PropertyCallbackInfo( - const v8::AccessorInfo &info - , const v8::Local data) : - PropertyCallbackInfoBase(info, data) - , return_value_(info.GetIsolate(), &retval_) - , retval_(v8::Persistent::New(v8::Local())) {} - - inline ~PropertyCallbackInfo() { - retval_.Dispose(); - retval_.Clear(); - } - - inline ReturnValue GetReturnValue() const { - return return_value_; - } -}; - -namespace imp { -template -class ReturnValueImp : public ReturnValue { - public: - explicit ReturnValueImp(ReturnValue that) : - ReturnValue(that) {} - inline v8::Handle Value() { - return *ReturnValue::value_; - } -}; - -static -v8::Handle FunctionCallbackWrapper(const v8::Arguments &args) { - v8::Local obj = args.Data().As(); - FunctionCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kFunctionIndex).As()->Value())); - FunctionCallbackInfo - cbinfo(args, obj->GetInternalField(kDataIndex)); - callback(cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativeFunction)(const v8::Arguments &); - -static -v8::Handle GetterCallbackWrapper( - v8::Local property, const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - GetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kGetterIndex).As()->Value())); - callback(property, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativeGetter) - (v8::Local, const v8::AccessorInfo &); - -static -void SetterCallbackWrapper( - v8::Local property - , v8::Local value - , const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - SetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kSetterIndex).As()->Value())); - callback(property, value, cbinfo); -} - -typedef void (*NativeSetter) - (v8::Local, v8::Local, const v8::AccessorInfo &); - -static -v8::Handle PropertyGetterCallbackWrapper( - v8::Local property, const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyGetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyGetterIndex) - .As()->Value())); - callback(property, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativePropertyGetter) - (v8::Local, const v8::AccessorInfo &); - -static -v8::Handle PropertySetterCallbackWrapper( - v8::Local property - , v8::Local value - , const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertySetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertySetterIndex) - .As()->Value())); - callback(property, value, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativePropertySetter) - (v8::Local, v8::Local, const v8::AccessorInfo &); - -static -v8::Handle PropertyEnumeratorCallbackWrapper( - const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyEnumeratorCallback callback = - reinterpret_cast(reinterpret_cast( - obj->GetInternalField(kPropertyEnumeratorIndex) - .As()->Value())); - callback(cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativePropertyEnumerator) - (const v8::AccessorInfo &); - -static -v8::Handle PropertyDeleterCallbackWrapper( - v8::Local property - , const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyDeleterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyDeleterIndex) - .As()->Value())); - callback(property, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (NativePropertyDeleter) - (v8::Local, const v8::AccessorInfo &); - -static -v8::Handle PropertyQueryCallbackWrapper( - v8::Local property, const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - PropertyQueryCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kPropertyQueryIndex) - .As()->Value())); - callback(property, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativePropertyQuery) - (v8::Local, const v8::AccessorInfo &); - -static -v8::Handle IndexGetterCallbackWrapper( - uint32_t index, const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexGetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertyGetterIndex) - .As()->Value())); - callback(index, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativeIndexGetter) - (uint32_t, const v8::AccessorInfo &); - -static -v8::Handle IndexSetterCallbackWrapper( - uint32_t index - , v8::Local value - , const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexSetterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertySetterIndex) - .As()->Value())); - callback(index, value, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativeIndexSetter) - (uint32_t, v8::Local, const v8::AccessorInfo &); - -static -v8::Handle IndexEnumeratorCallbackWrapper( - const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexEnumeratorCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertyEnumeratorIndex) - .As()->Value())); - callback(cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativeIndexEnumerator) - (const v8::AccessorInfo &); - -static -v8::Handle IndexDeleterCallbackWrapper( - uint32_t index, const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexDeleterCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertyDeleterIndex) - .As()->Value())); - callback(index, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativeIndexDeleter) - (uint32_t, const v8::AccessorInfo &); - -static -v8::Handle IndexQueryCallbackWrapper( - uint32_t index, const v8::AccessorInfo &info) { - v8::Local obj = info.Data().As(); - PropertyCallbackInfo - cbinfo(info, obj->GetInternalField(kDataIndex)); - IndexQueryCallback callback = reinterpret_cast( - reinterpret_cast( - obj->GetInternalField(kIndexPropertyQueryIndex) - .As()->Value())); - callback(index, cbinfo); - return ReturnValueImp(cbinfo.GetReturnValue()).Value(); -} - -typedef v8::Handle (*NativeIndexQuery) - (uint32_t, const v8::AccessorInfo &); -} // end of namespace imp - -#endif // NAN_CALLBACKS_PRE_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h deleted file mode 100644 index 7386c3beaa5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters.h +++ /dev/null @@ -1,64 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_CONVERTERS_H_ -#define NAN_CONVERTERS_H_ - -namespace imp { -template struct ToFactoryBase { - typedef MaybeLocal return_t; -}; -template struct ValueFactoryBase { typedef Maybe return_t; }; - -template struct ToFactory; - -#define X(TYPE) \ - template<> \ - struct ToFactory : ToFactoryBase { \ - static inline return_t convert(v8::Local val); \ - }; - -X(Boolean) -X(Number) -X(String) -X(Object) -X(Integer) -X(Uint32) -X(Int32) - -#undef X - -#define X(TYPE) \ - template<> \ - struct ToFactory : ValueFactoryBase { \ - static inline return_t convert(v8::Local val); \ - }; - -X(bool) -X(double) -X(int64_t) -X(uint32_t) -X(int32_t) - -#undef X -} // end of namespace imp - -template -inline -typename imp::ToFactory::return_t To(v8::Local val) { - return imp::ToFactory::convert(val); -} - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -# include "nan_converters_43_inl.h" -#else -# include "nan_converters_pre_43_inl.h" -#endif - -#endif // NAN_CONVERTERS_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h deleted file mode 100644 index e2eb032fd64..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_43_inl.h +++ /dev/null @@ -1,42 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_CONVERTERS_43_INL_H_ -#define NAN_CONVERTERS_43_INL_H_ - -#define X(TYPE) \ -imp::ToFactory::return_t \ -imp::ToFactory::convert(v8::Local val) { \ - return val->To ## TYPE(GetCurrentContext()); \ -} - -X(Boolean) -X(Number) -X(String) -X(Object) -X(Integer) -X(Uint32) -X(Int32) - -#undef X - -#define X(TYPE, NAME) \ -imp::ToFactory::return_t \ -imp::ToFactory::convert(v8::Local val) { \ - return val->NAME ## Value(GetCurrentContext()); \ -} - -X(bool, Boolean) -X(double, Number) -X(int64_t, Integer) -X(uint32_t, Uint32) -X(int32_t, Int32) - -#undef X - -#endif // NAN_CONVERTERS_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h deleted file mode 100644 index 177a74a2af5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_converters_pre_43_inl.h +++ /dev/null @@ -1,42 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_CONVERTERS_PRE_43_INL_H_ -#define NAN_CONVERTERS_PRE_43_INL_H_ - -#define X(TYPE) \ -imp::ToFactory::return_t \ -imp::ToFactory::convert(v8::Local val) { \ - return MaybeLocal(val->To ## TYPE()); \ -} - -X(Boolean) -X(Number) -X(String) -X(Object) -X(Integer) -X(Uint32) -X(Int32) - -#undef X - -#define X(TYPE, NAME) \ -imp::ToFactory::return_t \ -imp::ToFactory::convert(v8::Local val) { \ - return Just(val->NAME ##Value()); \ -} - -X(bool, Boolean) -X(double, Number) -X(int64_t, Integer) -X(uint32_t, Uint32) -X(int32_t, Int32) - -#undef X - -#endif // NAN_CONVERTERS_PRE_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h deleted file mode 100644 index be50fc67c46..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_12_inl.h +++ /dev/null @@ -1,409 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_IMPLEMENTATION_12_INL_H_ -#define NAN_IMPLEMENTATION_12_INL_H_ -//============================================================================== -// node v0.11 implementation -//============================================================================== - -namespace imp { - -//=== Array ==================================================================== - -Factory::return_t -Factory::New() { - return v8::Array::New(v8::Isolate::GetCurrent()); -} - -Factory::return_t -Factory::New(int length) { - return v8::Array::New(v8::Isolate::GetCurrent(), length); -} - -//=== Boolean ================================================================== - -Factory::return_t -Factory::New(bool value) { - return v8::Boolean::New(v8::Isolate::GetCurrent(), value); -} - -//=== Boolean Object =========================================================== - -Factory::return_t -Factory::New(bool value) { -#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION) - return v8::BooleanObject::New( - v8::Isolate::GetCurrent(), value).As(); -#else - return v8::BooleanObject::New(value).As(); -#endif -} - -//=== Context ================================================================== - -Factory::return_t -Factory::New( v8::ExtensionConfiguration* extensions - , v8::Local tmpl - , v8::Local obj) { - return v8::Context::New(v8::Isolate::GetCurrent(), extensions, tmpl, obj); -} - -//=== Date ===================================================================== - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -Factory::return_t -Factory::New(double value) { - v8::Local ret; - if (v8::Date::New(GetCurrentContext(), value). - ToLocal(reinterpret_cast*>(&ret))) { - return v8::MaybeLocal(ret); - } else { - return v8::MaybeLocal(ret); - } -} -#else -Factory::return_t -Factory::New(double value) { - return Factory::return_t( - v8::Date::New(v8::Isolate::GetCurrent(), value).As()); -} -#endif - -//=== External ================================================================= - -Factory::return_t -Factory::New(void * value) { - return v8::External::New(v8::Isolate::GetCurrent(), value); -} - -//=== Function ================================================================= - -Factory::return_t -Factory::New( FunctionCallback callback - , v8::Local data) { - v8::Isolate *isolate = v8::Isolate::GetCurrent(); - v8::EscapableHandleScope scope(isolate); - v8::Local tpl = v8::ObjectTemplate::New(isolate); - tpl->SetInternalFieldCount(imp::kFunctionFieldCount); - v8::Local obj = NewInstance(tpl).ToLocalChecked(); - - obj->SetInternalField( - imp::kFunctionIndex - , v8::External::New(isolate, reinterpret_cast(callback))); - - v8::Local val = v8::Local::New(isolate, data); - - if (!val.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, val); - } - - return scope.Escape(v8::Function::New( isolate - , imp::FunctionCallbackWrapper - , obj)); -} - -//=== Function Template ======================================================== - -Factory::return_t -Factory::New( FunctionCallback callback - , v8::Local data - , v8::Local signature) { - v8::Isolate *isolate = v8::Isolate::GetCurrent(); - if (callback) { - v8::EscapableHandleScope scope(isolate); - v8::Local tpl = v8::ObjectTemplate::New(isolate); - tpl->SetInternalFieldCount(imp::kFunctionFieldCount); - v8::Local obj = NewInstance(tpl).ToLocalChecked(); - - obj->SetInternalField( - imp::kFunctionIndex - , v8::External::New(isolate, reinterpret_cast(callback))); - v8::Local val = v8::Local::New(isolate, data); - - if (!val.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, val); - } - - return scope.Escape(v8::FunctionTemplate::New( isolate - , imp::FunctionCallbackWrapper - , obj - , signature)); - } else { - return v8::FunctionTemplate::New(isolate, 0, data, signature); - } -} - -//=== Number =================================================================== - -Factory::return_t -Factory::New(double value) { - return v8::Number::New(v8::Isolate::GetCurrent(), value); -} - -//=== Number Object ============================================================ - -Factory::return_t -Factory::New(double value) { - return v8::NumberObject::New( v8::Isolate::GetCurrent() - , value).As(); -} - -//=== Integer, Int32 and Uint32 ================================================ - -template -typename IntegerFactory::return_t -IntegerFactory::New(int32_t value) { - return To(T::New(v8::Isolate::GetCurrent(), value)); -} - -template -typename IntegerFactory::return_t -IntegerFactory::New(uint32_t value) { - return To(T::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); -} - -Factory::return_t -Factory::New(int32_t value) { - return To( - v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); -} - -Factory::return_t -Factory::New(uint32_t value) { - return To( - v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); -} - -//=== Object =================================================================== - -Factory::return_t -Factory::New() { - return v8::Object::New(v8::Isolate::GetCurrent()); -} - -//=== Object Template ========================================================== - -Factory::return_t -Factory::New() { - return v8::ObjectTemplate::New(v8::Isolate::GetCurrent()); -} - -//=== RegExp =================================================================== - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -Factory::return_t -Factory::New( - v8::Local pattern - , v8::RegExp::Flags flags) { - return v8::RegExp::New(GetCurrentContext(), pattern, flags); -} -#else -Factory::return_t -Factory::New( - v8::Local pattern - , v8::RegExp::Flags flags) { - return Factory::return_t(v8::RegExp::New(pattern, flags)); -} -#endif - -//=== Script =================================================================== - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -Factory::return_t -Factory::New( v8::Local source) { - v8::ScriptCompiler::Source src(source); - return v8::ScriptCompiler::Compile(GetCurrentContext(), &src); -} - -Factory::return_t -Factory::New( v8::Local source - , v8::ScriptOrigin const& origin) { - v8::ScriptCompiler::Source src(source, origin); - return v8::ScriptCompiler::Compile(GetCurrentContext(), &src); -} -#else -Factory::return_t -Factory::New( v8::Local source) { - v8::ScriptCompiler::Source src(source); - return Factory::return_t( - v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src)); -} - -Factory::return_t -Factory::New( v8::Local source - , v8::ScriptOrigin const& origin) { - v8::ScriptCompiler::Source src(source, origin); - return Factory::return_t( - v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src)); -} -#endif - -//=== Signature ================================================================ - -Factory::return_t -Factory::New(Factory::FTH receiver) { - return v8::Signature::New(v8::Isolate::GetCurrent(), receiver); -} - -//=== String =================================================================== - -Factory::return_t -Factory::New() { - return Factory::return_t( - v8::String::Empty(v8::Isolate::GetCurrent())); -} - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -Factory::return_t -Factory::New(const char * value, int length) { - return v8::String::NewFromUtf8( - v8::Isolate::GetCurrent(), value, v8::NewStringType::kNormal, length); -} - -Factory::return_t -Factory::New(std::string const& value) { - assert(value.size() <= INT_MAX && "string too long"); - return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), - value.data(), v8::NewStringType::kNormal, static_cast(value.size())); -} - -Factory::return_t -Factory::New(const uint16_t * value, int length) { - return v8::String::NewFromTwoByte(v8::Isolate::GetCurrent(), value, - v8::NewStringType::kNormal, length); -} - -Factory::return_t -Factory::New(v8::String::ExternalStringResource * value) { - return v8::String::NewExternalTwoByte(v8::Isolate::GetCurrent(), value); -} - -Factory::return_t -Factory::New(ExternalOneByteStringResource * value) { - return v8::String::NewExternalOneByte(v8::Isolate::GetCurrent(), value); -} -#else -Factory::return_t -Factory::New(const char * value, int length) { - return Factory::return_t( - v8::String::NewFromUtf8( - v8::Isolate::GetCurrent() - , value - , v8::String::kNormalString - , length)); -} - -Factory::return_t -Factory::New( - std::string const& value) /* NOLINT(build/include_what_you_use) */ { - assert(value.size() <= INT_MAX && "string too long"); - return Factory::return_t( - v8::String::NewFromUtf8( - v8::Isolate::GetCurrent() - , value.data() - , v8::String::kNormalString - , static_cast(value.size()))); -} - -Factory::return_t -Factory::New(const uint16_t * value, int length) { - return Factory::return_t( - v8::String::NewFromTwoByte( - v8::Isolate::GetCurrent() - , value - , v8::String::kNormalString - , length)); -} - -Factory::return_t -Factory::New(v8::String::ExternalStringResource * value) { - return Factory::return_t( - v8::String::NewExternal(v8::Isolate::GetCurrent(), value)); -} - -Factory::return_t -Factory::New(ExternalOneByteStringResource * value) { - return Factory::return_t( - v8::String::NewExternal(v8::Isolate::GetCurrent(), value)); -} -#endif - -//=== String Object ============================================================ - -Factory::return_t -Factory::New(v8::Local value) { - return v8::StringObject::New(value).As(); -} - -//=== Unbound Script =========================================================== - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -Factory::return_t -Factory::New(v8::Local source) { - v8::ScriptCompiler::Source src(source); - return v8::ScriptCompiler::CompileUnboundScript( - v8::Isolate::GetCurrent(), &src); -} - -Factory::return_t -Factory::New( v8::Local source - , v8::ScriptOrigin const& origin) { - v8::ScriptCompiler::Source src(source, origin); - return v8::ScriptCompiler::CompileUnboundScript( - v8::Isolate::GetCurrent(), &src); -} -#else -Factory::return_t -Factory::New(v8::Local source) { - v8::ScriptCompiler::Source src(source); - return Factory::return_t( - v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src)); -} - -Factory::return_t -Factory::New( v8::Local source - , v8::ScriptOrigin const& origin) { - v8::ScriptCompiler::Source src(source, origin); - return Factory::return_t( - v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src)); -} -#endif - -} // end of namespace imp - -//=== Presistents and Handles ================================================== - -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION -template -inline v8::Local New(v8::Handle h) { - return v8::Local::New(v8::Isolate::GetCurrent(), h); -} -#endif - -template -inline v8::Local New(v8::Persistent const& p) { - return v8::Local::New(v8::Isolate::GetCurrent(), p); -} - -template -inline v8::Local New(Persistent const& p) { - return v8::Local::New(v8::Isolate::GetCurrent(), p); -} - -template -inline v8::Local New(Global const& p) { - return v8::Local::New(v8::Isolate::GetCurrent(), p); -} - -#endif // NAN_IMPLEMENTATION_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h deleted file mode 100644 index f6642eece57..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_implementation_pre_12_inl.h +++ /dev/null @@ -1,264 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_IMPLEMENTATION_PRE_12_INL_H_ -#define NAN_IMPLEMENTATION_PRE_12_INL_H_ - -//============================================================================== -// node v0.10 implementation -//============================================================================== - -namespace imp { - -//=== Array ==================================================================== - -Factory::return_t -Factory::New() { - return v8::Array::New(); -} - -Factory::return_t -Factory::New(int length) { - return v8::Array::New(length); -} - -//=== Boolean ================================================================== - -Factory::return_t -Factory::New(bool value) { - return v8::Boolean::New(value)->ToBoolean(); -} - -//=== Boolean Object =========================================================== - -Factory::return_t -Factory::New(bool value) { - return v8::BooleanObject::New(value).As(); -} - -//=== Context ================================================================== - -Factory::return_t -Factory::New( v8::ExtensionConfiguration* extensions - , v8::Local tmpl - , v8::Local obj) { - v8::Persistent ctx = v8::Context::New(extensions, tmpl, obj); - v8::Local lctx = v8::Local::New(ctx); - ctx.Dispose(); - return lctx; -} - -//=== Date ===================================================================== - -Factory::return_t -Factory::New(double value) { - return Factory::return_t(v8::Date::New(value).As()); -} - -//=== External ================================================================= - -Factory::return_t -Factory::New(void * value) { - return v8::External::New(value); -} - -//=== Function ================================================================= - -Factory::return_t -Factory::New( FunctionCallback callback - , v8::Local data) { - return Factory::New( callback - , data - , v8::Local() - )->GetFunction(); -} - - -//=== FunctionTemplate ========================================================= - -Factory::return_t -Factory::New( FunctionCallback callback - , v8::Local data - , v8::Local signature) { - if (callback) { - v8::HandleScope scope; - - v8::Local tpl = v8::ObjectTemplate::New(); - tpl->SetInternalFieldCount(imp::kFunctionFieldCount); - v8::Local obj = tpl->NewInstance(); - - obj->SetInternalField( - imp::kFunctionIndex - , v8::External::New(reinterpret_cast(callback))); - - v8::Local val = v8::Local::New(data); - - if (!val.IsEmpty()) { - obj->SetInternalField(imp::kDataIndex, val); - } - - // Note(agnat): Emulate length argument here. Unfortunately, I couldn't find - // a way. Have at it though... - return scope.Close( - v8::FunctionTemplate::New(imp::FunctionCallbackWrapper - , obj - , signature)); - } else { - return v8::FunctionTemplate::New(0, data, signature); - } -} - -//=== Number =================================================================== - -Factory::return_t -Factory::New(double value) { - return v8::Number::New(value); -} - -//=== Number Object ============================================================ - -Factory::return_t -Factory::New(double value) { - return v8::NumberObject::New(value).As(); -} - -//=== Integer, Int32 and Uint32 ================================================ - -template -typename IntegerFactory::return_t -IntegerFactory::New(int32_t value) { - return To(T::New(value)); -} - -template -typename IntegerFactory::return_t -IntegerFactory::New(uint32_t value) { - return To(T::NewFromUnsigned(value)); -} - -Factory::return_t -Factory::New(int32_t value) { - return To(v8::Uint32::NewFromUnsigned(value)); -} - -Factory::return_t -Factory::New(uint32_t value) { - return To(v8::Uint32::NewFromUnsigned(value)); -} - - -//=== Object =================================================================== - -Factory::return_t -Factory::New() { - return v8::Object::New(); -} - -//=== Object Template ========================================================== - -Factory::return_t -Factory::New() { - return v8::ObjectTemplate::New(); -} - -//=== RegExp =================================================================== - -Factory::return_t -Factory::New( - v8::Local pattern - , v8::RegExp::Flags flags) { - return Factory::return_t(v8::RegExp::New(pattern, flags)); -} - -//=== Script =================================================================== - -Factory::return_t -Factory::New( v8::Local source) { - return Factory::return_t(v8::Script::New(source)); -} -Factory::return_t -Factory::New( v8::Local source - , v8::ScriptOrigin const& origin) { - return Factory::return_t( - v8::Script::New(source, const_cast(&origin))); -} - -//=== Signature ================================================================ - -Factory::return_t -Factory::New(Factory::FTH receiver) { - return v8::Signature::New(receiver); -} - -//=== String =================================================================== - -Factory::return_t -Factory::New() { - return Factory::return_t(v8::String::Empty()); -} - -Factory::return_t -Factory::New(const char * value, int length) { - return Factory::return_t(v8::String::New(value, length)); -} - -Factory::return_t -Factory::New( - std::string const& value) /* NOLINT(build/include_what_you_use) */ { - assert(value.size() <= INT_MAX && "string too long"); - return Factory::return_t( - v8::String::New( value.data(), static_cast(value.size()))); -} - -Factory::return_t -Factory::New(const uint16_t * value, int length) { - return Factory::return_t(v8::String::New(value, length)); -} - -Factory::return_t -Factory::New(v8::String::ExternalStringResource * value) { - return Factory::return_t(v8::String::NewExternal(value)); -} - -Factory::return_t -Factory::New(v8::String::ExternalAsciiStringResource * value) { - return Factory::return_t(v8::String::NewExternal(value)); -} - -//=== String Object ============================================================ - -Factory::return_t -Factory::New(v8::Local value) { - return v8::StringObject::New(value).As(); -} - -} // end of namespace imp - -//=== Presistents and Handles ================================================== - -template -inline v8::Local New(v8::Handle h) { - return v8::Local::New(h); -} - -template -inline v8::Local New(v8::Persistent const& p) { - return v8::Local::New(p); -} - -template -inline v8::Local New(Persistent const& p) { - return v8::Local::New(p.persistent); -} - -template -inline v8::Local New(Global const& p) { - return v8::Local::New(p.persistent); -} - -#endif // NAN_IMPLEMENTATION_PRE_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h deleted file mode 100644 index a8b432d5709..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_43_inl.h +++ /dev/null @@ -1,245 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_MAYBE_43_INL_H_ -#define NAN_MAYBE_43_INL_H_ - -template -using MaybeLocal = v8::MaybeLocal; - -template -using Maybe = v8::Maybe; - -template -inline Maybe Nothing() { - return v8::Nothing(); -} - -template -inline Maybe Just(const T& t) { - return v8::Just(t); -} - -v8::Local GetCurrentContext(); - -inline -MaybeLocal ToDetailString(v8::Local val) { - return val->ToDetailString(GetCurrentContext()); -} - -inline -MaybeLocal ToArrayIndex(v8::Local val) { - return val->ToArrayIndex(GetCurrentContext()); -} - -inline -Maybe Equals(v8::Local a, v8::Local(b)) { - return a->Equals(GetCurrentContext(), b); -} - -inline -MaybeLocal NewInstance(v8::Local h) { - return h->NewInstance(GetCurrentContext()); -} - -inline -MaybeLocal NewInstance( - v8::Local h - , int argc - , v8::Local argv[]) { - return h->NewInstance(GetCurrentContext(), argc, argv); -} - -inline -MaybeLocal NewInstance(v8::Local h) { - return h->NewInstance(GetCurrentContext()); -} - - -inline MaybeLocal GetFunction( - v8::Local t) { - return t->GetFunction(GetCurrentContext()); -} - -inline Maybe Set( - v8::Local obj - , v8::Local key - , v8::Local value) { - return obj->Set(GetCurrentContext(), key, value); -} - -inline Maybe Set( - v8::Local obj - , uint32_t index - , v8::Local value) { - return obj->Set(GetCurrentContext(), index, value); -} - -inline Maybe ForceSet( - v8::Local obj - , v8::Local key - , v8::Local value - , v8::PropertyAttribute attribs = v8::None) { - return obj->ForceSet(GetCurrentContext(), key, value, attribs); -} - -inline MaybeLocal Get( - v8::Local obj - , v8::Local key) { - return obj->Get(GetCurrentContext(), key); -} - -inline -MaybeLocal Get(v8::Local obj, uint32_t index) { - return obj->Get(GetCurrentContext(), index); -} - -inline v8::PropertyAttribute GetPropertyAttributes( - v8::Local obj - , v8::Local key) { - return obj->GetPropertyAttributes(GetCurrentContext(), key).FromJust(); -} - -inline Maybe Has( - v8::Local obj - , v8::Local key) { - return obj->Has(GetCurrentContext(), key); -} - -inline Maybe Has(v8::Local obj, uint32_t index) { - return obj->Has(GetCurrentContext(), index); -} - -inline Maybe Delete( - v8::Local obj - , v8::Local key) { - return obj->Delete(GetCurrentContext(), key); -} - -inline -Maybe Delete(v8::Local obj, uint32_t index) { - return obj->Delete(GetCurrentContext(), index); -} - -inline -MaybeLocal GetPropertyNames(v8::Local obj) { - return obj->GetPropertyNames(GetCurrentContext()); -} - -inline -MaybeLocal GetOwnPropertyNames(v8::Local obj) { - return obj->GetOwnPropertyNames(GetCurrentContext()); -} - -inline Maybe SetPrototype( - v8::Local obj - , v8::Local prototype) { - return obj->SetPrototype(GetCurrentContext(), prototype); -} - -inline MaybeLocal ObjectProtoToString( - v8::Local obj) { - return obj->ObjectProtoToString(GetCurrentContext()); -} - -inline Maybe HasOwnProperty( - v8::Local obj - , v8::Local key) { - return obj->HasOwnProperty(GetCurrentContext(), key); -} - -inline Maybe HasRealNamedProperty( - v8::Local obj - , v8::Local key) { - return obj->HasRealNamedProperty(GetCurrentContext(), key); -} - -inline Maybe HasRealIndexedProperty( - v8::Local obj - , uint32_t index) { - return obj->HasRealIndexedProperty(GetCurrentContext(), index); -} - -inline Maybe HasRealNamedCallbackProperty( - v8::Local obj - , v8::Local key) { - return obj->HasRealNamedCallbackProperty(GetCurrentContext(), key); -} - -inline MaybeLocal GetRealNamedPropertyInPrototypeChain( - v8::Local obj - , v8::Local key) { - return obj->GetRealNamedPropertyInPrototypeChain(GetCurrentContext(), key); -} - -inline MaybeLocal GetRealNamedProperty( - v8::Local obj - , v8::Local key) { - return obj->GetRealNamedProperty(GetCurrentContext(), key); -} - -inline MaybeLocal CallAsFunction( - v8::Local obj - , v8::Local recv - , int argc - , v8::Local argv[]) { - return obj->CallAsFunction(GetCurrentContext(), recv, argc, argv); -} - -inline MaybeLocal CallAsConstructor( - v8::Local obj - , int argc, v8::Local argv[]) { - return obj->CallAsConstructor(GetCurrentContext(), argc, argv); -} - -inline -MaybeLocal GetSourceLine(v8::Local msg) { - return msg->GetSourceLine(GetCurrentContext()); -} - -inline Maybe GetLineNumber(v8::Local msg) { - return msg->GetLineNumber(GetCurrentContext()); -} - -inline Maybe GetStartColumn(v8::Local msg) { - return msg->GetStartColumn(GetCurrentContext()); -} - -inline Maybe GetEndColumn(v8::Local msg) { - return msg->GetEndColumn(GetCurrentContext()); -} - -inline MaybeLocal CloneElementAt( - v8::Local array - , uint32_t index) { -#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION) - v8::EscapableHandleScope handle_scope(v8::Isolate::GetCurrent()); - v8::Local context = GetCurrentContext(); - v8::Local elem; - if (!array->Get(context, index).ToLocal(&elem)) { - return MaybeLocal(); - } - v8::Local obj; - if (!elem->ToObject(context).ToLocal(&obj)) { - return MaybeLocal(); - } - return MaybeLocal(handle_scope.Escape(obj->Clone())); -#else - return array->CloneElementAt(GetCurrentContext(), index); -#endif -} - -inline MaybeLocal Call( - v8::Local fun - , v8::Local recv - , int argc - , v8::Local argv[]) { - return fun->Call(GetCurrentContext(), recv, argc, argv); -} - -#endif // NAN_MAYBE_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h deleted file mode 100644 index c53868752ef..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_maybe_pre_43_inl.h +++ /dev/null @@ -1,303 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_MAYBE_PRE_43_INL_H_ -#define NAN_MAYBE_PRE_43_INL_H_ - -template -class MaybeLocal { - public: - inline MaybeLocal() : val_(v8::Local()) {} - - template -# if NODE_MODULE_VERSION >= NODE_0_12_MODULE_VERSION - inline MaybeLocal(v8::Local that) : val_(that) {} -# else - inline MaybeLocal(v8::Local that) : - val_(*reinterpret_cast*>(&that)) {} -# endif - - inline bool IsEmpty() const { return val_.IsEmpty(); } - - template - inline bool ToLocal(v8::Local *out) const { - *out = val_; - return !IsEmpty(); - } - - inline v8::Local ToLocalChecked() const { -#if defined(V8_ENABLE_CHECKS) - assert(!IsEmpty() && "ToLocalChecked is Empty"); -#endif // V8_ENABLE_CHECKS - return val_; - } - - template - inline v8::Local FromMaybe(v8::Local default_value) const { - return IsEmpty() ? default_value : val_; - } - - private: - v8::Local val_; -}; - -template -class Maybe { - public: - inline bool IsNothing() const { return !has_value_; } - inline bool IsJust() const { return has_value_; } - - inline T FromJust() const { -#if defined(V8_ENABLE_CHECKS) - assert(IsJust() && "FromJust is Nothing"); -#endif // V8_ENABLE_CHECKS - return value_; - } - - inline T FromMaybe(const T& default_value) const { - return has_value_ ? value_ : default_value; - } - - inline bool operator==(const Maybe &other) const { - return (IsJust() == other.IsJust()) && - (!IsJust() || FromJust() == other.FromJust()); - } - - inline bool operator!=(const Maybe &other) const { - return !operator==(other); - } - - private: - Maybe() : has_value_(false) {} - explicit Maybe(const T& t) : has_value_(true), value_(t) {} - bool has_value_; - T value_; - - template - friend Maybe Nothing(); - template - friend Maybe Just(const U& u); -}; - -template -inline Maybe Nothing() { - return Maybe(); -} - -template -inline Maybe Just(const T& t) { - return Maybe(t); -} - -inline -MaybeLocal ToDetailString(v8::Handle val) { - return MaybeLocal(val->ToDetailString()); -} - -inline -MaybeLocal ToArrayIndex(v8::Handle val) { - return MaybeLocal(val->ToArrayIndex()); -} - -inline -Maybe Equals(v8::Handle a, v8::Handle(b)) { - return Just(a->Equals(b)); -} - -inline -MaybeLocal NewInstance(v8::Handle h) { - return MaybeLocal(h->NewInstance()); -} - -inline -MaybeLocal NewInstance( - v8::Local h - , int argc - , v8::Local argv[]) { - return MaybeLocal(h->NewInstance(argc, argv)); -} - -inline -MaybeLocal NewInstance(v8::Handle h) { - return MaybeLocal(h->NewInstance()); -} - -inline -MaybeLocal GetFunction(v8::Handle t) { - return MaybeLocal(t->GetFunction()); -} - -inline Maybe Set( - v8::Handle obj - , v8::Handle key - , v8::Handle value) { - return Just(obj->Set(key, value)); -} - -inline Maybe Set( - v8::Handle obj - , uint32_t index - , v8::Handle value) { - return Just(obj->Set(index, value)); -} - -inline Maybe ForceSet( - v8::Handle obj - , v8::Handle key - , v8::Handle value - , v8::PropertyAttribute attribs = v8::None) { - return Just(obj->ForceSet(key, value, attribs)); -} - -inline MaybeLocal Get( - v8::Handle obj - , v8::Handle key) { - return MaybeLocal(obj->Get(key)); -} - -inline MaybeLocal Get( - v8::Handle obj - , uint32_t index) { - return MaybeLocal(obj->Get(index)); -} - -inline Maybe GetPropertyAttributes( - v8::Handle obj - , v8::Handle key) { - return Just(obj->GetPropertyAttributes(key)); -} - -inline Maybe Has( - v8::Handle obj - , v8::Handle key) { - return Just(obj->Has(key)); -} - -inline Maybe Has( - v8::Handle obj - , uint32_t index) { - return Just(obj->Has(index)); -} - -inline Maybe Delete( - v8::Handle obj - , v8::Handle key) { - return Just(obj->Delete(key)); -} - -inline Maybe Delete( - v8::Handle obj - , uint32_t index) { - return Just(obj->Delete(index)); -} - -inline -MaybeLocal GetPropertyNames(v8::Handle obj) { - return MaybeLocal(obj->GetPropertyNames()); -} - -inline -MaybeLocal GetOwnPropertyNames(v8::Handle obj) { - return MaybeLocal(obj->GetOwnPropertyNames()); -} - -inline Maybe SetPrototype( - v8::Handle obj - , v8::Handle prototype) { - return Just(obj->SetPrototype(prototype)); -} - -inline MaybeLocal ObjectProtoToString( - v8::Handle obj) { - return MaybeLocal(obj->ObjectProtoToString()); -} - -inline Maybe HasOwnProperty( - v8::Handle obj - , v8::Handle key) { - return Just(obj->HasOwnProperty(key)); -} - -inline Maybe HasRealNamedProperty( - v8::Handle obj - , v8::Handle key) { - return Just(obj->HasRealNamedProperty(key)); -} - -inline Maybe HasRealIndexedProperty( - v8::Handle obj - , uint32_t index) { - return Just(obj->HasRealIndexedProperty(index)); -} - -inline Maybe HasRealNamedCallbackProperty( - v8::Handle obj - , v8::Handle key) { - return Just(obj->HasRealNamedCallbackProperty(key)); -} - -inline MaybeLocal GetRealNamedPropertyInPrototypeChain( - v8::Handle obj - , v8::Handle key) { - return MaybeLocal( - obj->GetRealNamedPropertyInPrototypeChain(key)); -} - -inline MaybeLocal GetRealNamedProperty( - v8::Handle obj - , v8::Handle key) { - return MaybeLocal(obj->GetRealNamedProperty(key)); -} - -inline MaybeLocal CallAsFunction( - v8::Handle obj - , v8::Handle recv - , int argc - , v8::Handle argv[]) { - return MaybeLocal(obj->CallAsFunction(recv, argc, argv)); -} - -inline MaybeLocal CallAsConstructor( - v8::Handle obj - , int argc - , v8::Local argv[]) { - return MaybeLocal(obj->CallAsConstructor(argc, argv)); -} - -inline -MaybeLocal GetSourceLine(v8::Handle msg) { - return MaybeLocal(msg->GetSourceLine()); -} - -inline Maybe GetLineNumber(v8::Handle msg) { - return Just(msg->GetLineNumber()); -} - -inline Maybe GetStartColumn(v8::Handle msg) { - return Just(msg->GetStartColumn()); -} - -inline Maybe GetEndColumn(v8::Handle msg) { - return Just(msg->GetEndColumn()); -} - -inline MaybeLocal CloneElementAt( - v8::Handle array - , uint32_t index) { - return MaybeLocal(array->CloneElementAt(index)); -} - -inline MaybeLocal Call( - v8::Local fun - , v8::Local recv - , int argc - , v8::Local argv[]) { - return MaybeLocal(fun->Call(recv, argc, argv)); -} - -#endif // NAN_MAYBE_PRE_43_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h deleted file mode 100644 index 6c7d19fc12f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_new.h +++ /dev/null @@ -1,340 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_NEW_H_ -#define NAN_NEW_H_ - -namespace imp { // scnr - -// TODO(agnat): Generalize -template v8::Local To(v8::Local i); - -template <> -inline -v8::Local -To(v8::Local i) { - return Nan::To(i).ToLocalChecked(); -} - -template <> -inline -v8::Local -To(v8::Local i) { - return Nan::To(i).ToLocalChecked(); -} - -template <> -inline -v8::Local -To(v8::Local i) { - return Nan::To(i).ToLocalChecked(); -} - -template struct FactoryBase { - typedef v8::Local return_t; -}; - -template struct MaybeFactoryBase { - typedef MaybeLocal return_t; -}; - -template struct Factory; - -template <> -struct Factory : FactoryBase { - static inline return_t New(); - static inline return_t New(int length); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(bool value); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(bool value); -}; - -template <> -struct Factory : FactoryBase { - static inline - return_t - New( v8::ExtensionConfiguration* extensions = NULL - , v8::Local tmpl = v8::Local() - , v8::Local obj = v8::Local()); -}; - -template <> -struct Factory : MaybeFactoryBase { - static inline return_t New(double value); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(void *value); -}; - -template <> -struct Factory : FactoryBase { - static inline - return_t - New( FunctionCallback callback - , v8::Local data = v8::Local()); -}; - -template <> -struct Factory : FactoryBase { - static inline - return_t - New( FunctionCallback callback = NULL - , v8::Local data = v8::Local() - , v8::Local signature = v8::Local()); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(double value); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(double value); -}; - -template -struct IntegerFactory : FactoryBase { - typedef typename FactoryBase::return_t return_t; - static inline return_t New(int32_t value); - static inline return_t New(uint32_t value); -}; - -template <> -struct Factory : IntegerFactory {}; - -template <> -struct Factory : IntegerFactory {}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(int32_t value); - static inline return_t New(uint32_t value); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(); -}; - -template <> -struct Factory : MaybeFactoryBase { - static inline return_t New( - v8::Local pattern, v8::RegExp::Flags flags); -}; - -template <> -struct Factory : MaybeFactoryBase { - static inline return_t New( v8::Local source); - static inline return_t New( v8::Local source - , v8::ScriptOrigin const& origin); -}; - -template <> -struct Factory : FactoryBase { - typedef v8::Local FTH; - static inline return_t New(FTH receiver = FTH()); -}; - -template <> -struct Factory : MaybeFactoryBase { - static inline return_t New(); - static inline return_t New(const char *value, int length = -1); - static inline return_t New(const uint16_t *value, int length = -1); - static inline return_t New(std::string const& value); - - static inline return_t New(v8::String::ExternalStringResource * value); - static inline return_t New(ExternalOneByteStringResource * value); -}; - -template <> -struct Factory : FactoryBase { - static inline return_t New(v8::Local value); -}; - -} // end of namespace imp - -#if (NODE_MODULE_VERSION >= 12) - -namespace imp { - -template <> -struct Factory : MaybeFactoryBase { - static inline return_t New( v8::Local source); - static inline return_t New( v8::Local source - , v8::ScriptOrigin const& origin); -}; - -} // end of namespace imp - -# include "nan_implementation_12_inl.h" - -#else // NODE_MODULE_VERSION >= 12 - -# include "nan_implementation_pre_12_inl.h" - -#endif - -//=== API ====================================================================== - -template -typename imp::Factory::return_t -New() { - return imp::Factory::New(); -} - -template -typename imp::Factory::return_t -New(A0 arg0) { - return imp::Factory::New(arg0); -} - -template -typename imp::Factory::return_t -New(A0 arg0, A1 arg1) { - return imp::Factory::New(arg0, arg1); -} - -template -typename imp::Factory::return_t -New(A0 arg0, A1 arg1, A2 arg2) { - return imp::Factory::New(arg0, arg1, arg2); -} - -template -typename imp::Factory::return_t -New(A0 arg0, A1 arg1, A2 arg2, A3 arg3) { - return imp::Factory::New(arg0, arg1, arg2, arg3); -} - -// Note(agnat): When passing overloaded function pointers to template functions -// as generic arguments the compiler needs help in picking the right overload. -// These two functions handle New and New with -// all argument variations. - -// v8::Function and v8::FunctionTemplate with one or two arguments -template -typename imp::Factory::return_t -New( FunctionCallback callback - , v8::Local data = v8::Local()) { - return imp::Factory::New(callback, data); -} - -// v8::Function and v8::FunctionTemplate with three arguments -template -typename imp::Factory::return_t -New( FunctionCallback callback - , v8::Local data = v8::Local() - , A2 a2 = A2()) { - return imp::Factory::New(callback, data, a2); -} - -// Convenience - -#if NODE_MODULE_VERSION < IOJS_3_0_MODULE_VERSION -template inline v8::Local New(v8::Handle h); -#endif - -#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION -template - inline v8::Local New(v8::Persistent const& p); -#else -template inline v8::Local New(v8::Persistent const& p); -#endif -template -inline v8::Local New(Persistent const& p); -template -inline v8::Local New(Global const& p); - -inline -imp::Factory::return_t -New(bool value) { - return New(value); -} - -inline -imp::Factory::return_t -New(int32_t value) { - return New(value); -} - -inline -imp::Factory::return_t -New(uint32_t value) { - return New(value); -} - -inline -imp::Factory::return_t -New(double value) { - return New(value); -} - -inline -imp::Factory::return_t -New(std::string const& value) { // NOLINT(build/include_what_you_use) - return New(value); -} - -inline -imp::Factory::return_t -New(const char * value, int length) { - return New(value, length); -} - -inline -imp::Factory::return_t -New(const uint16_t * value, int length) { - return New(value, length); -} - -inline -imp::Factory::return_t -New(const char * value) { - return New(value); -} - -inline -imp::Factory::return_t -New(const uint16_t * value) { - return New(value); -} - -inline -imp::Factory::return_t -New(v8::String::ExternalStringResource * value) { - return New(value); -} - -inline -imp::Factory::return_t -New(ExternalOneByteStringResource * value) { - return New(value); -} - -inline -imp::Factory::return_t -New(v8::Local pattern, v8::RegExp::Flags flags) { - return New(pattern, flags); -} - -#endif // NAN_NEW_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h deleted file mode 100644 index f1cc156bf19..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_object_wrap.h +++ /dev/null @@ -1,155 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_OBJECT_WRAP_H_ -#define NAN_OBJECT_WRAP_H_ - -class ObjectWrap { - public: - ObjectWrap() { - refs_ = 0; - } - - - virtual ~ObjectWrap() { - if (persistent().IsEmpty()) { - return; - } - - assert(persistent().IsNearDeath()); - persistent().ClearWeak(); - persistent().Reset(); - } - - - template - static inline T* Unwrap(v8::Local object) { - assert(!object.IsEmpty()); - assert(object->InternalFieldCount() > 0); - // Cast to ObjectWrap before casting to T. A direct cast from void - // to T won't work right when T has more than one base class. - void* ptr = GetInternalFieldPointer(object, 0); - ObjectWrap* wrap = static_cast(ptr); - return static_cast(wrap); - } - - - inline v8::Local handle() const { - return New(handle_); - } - - - inline Persistent& persistent() { - return handle_; - } - - - protected: - inline void Wrap(v8::Local object) { - assert(persistent().IsEmpty()); - assert(object->InternalFieldCount() > 0); - SetInternalFieldPointer(object, 0, this); - persistent().Reset(object); - MakeWeak(); - } - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - - inline void MakeWeak() { - persistent().v8::PersistentBase::SetWeak( - this, WeakCallback, v8::WeakCallbackType::kParameter); - persistent().MarkIndependent(); - } - -#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION - - inline void MakeWeak() { - persistent().v8::PersistentBase::SetWeak(this, WeakCallback); - persistent().MarkIndependent(); - } - -#else - - inline void MakeWeak() { - persistent().persistent.MakeWeak(this, WeakCallback); - persistent().MarkIndependent(); - } - -#endif - - /* Ref() marks the object as being attached to an event loop. - * Refed objects will not be garbage collected, even if - * all references are lost. - */ - virtual void Ref() { - assert(!persistent().IsEmpty()); - persistent().ClearWeak(); - refs_++; - } - - /* Unref() marks an object as detached from the event loop. This is its - * default state. When an object with a "weak" reference changes from - * attached to detached state it will be freed. Be careful not to access - * the object after making this call as it might be gone! - * (A "weak reference" means an object that only has a - * persistant handle.) - * - * DO NOT CALL THIS FROM DESTRUCTOR - */ - virtual void Unref() { - assert(!persistent().IsEmpty()); - assert(!persistent().IsWeak()); - assert(refs_ > 0); - if (--refs_ == 0) - MakeWeak(); - } - - int refs_; // ro - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(ObjectWrap) -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - - static void - WeakCallback(v8::WeakCallbackInfo const& info) { - ObjectWrap* wrap = info.GetParameter(); - assert(wrap->refs_ == 0); - assert(wrap->handle_.IsNearDeath()); - wrap->handle_.Reset(); - delete wrap; - } - -#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION - - static void - WeakCallback(v8::WeakCallbackData const& data) { - ObjectWrap* wrap = data.GetParameter(); - assert(wrap->refs_ == 0); - assert(wrap->handle_.IsNearDeath()); - wrap->handle_.Reset(); - delete wrap; - } - -#else - - static void WeakCallback(v8::Persistent value, void *data) { - ObjectWrap *wrap = static_cast(data); - assert(wrap->refs_ == 0); - assert(wrap->handle_.IsNearDeath()); - wrap->handle_.Reset(); - delete wrap; - } - -#endif - Persistent handle_; -}; - - -#endif // NAN_OBJECT_WRAP_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h deleted file mode 100644 index eb4ff109f60..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_12_inl.h +++ /dev/null @@ -1,129 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_PERSISTENT_12_INL_H_ -#define NAN_PERSISTENT_12_INL_H_ - -template class Persistent : - public v8::Persistent { - public: - inline Persistent() : v8::Persistent() {} - - template inline Persistent(v8::Local that) : - v8::Persistent(v8::Isolate::GetCurrent(), that) {} - - template - inline Persistent(const v8::Persistent &that) : - v8::Persistent(v8::Isolate::GetCurrent(), that) {} - - inline void Reset() { v8::PersistentBase::Reset(); } - - template - inline void Reset(const v8::Local &other) { - v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); - } - - template - inline void Reset(const v8::PersistentBase &other) { - v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); - } - - template - inline void SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type); - - private: - inline T *operator*() const { return *PersistentBase::persistent; } - - template - inline void Copy(const Persistent &that) { - TYPE_CHECK(T, S); - - this->Reset(); - - if (!that.IsEmpty()) { - this->Reset(that); - M::Copy(that, this); - } - } -}; - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -template -class Global : public v8::Global { - public: - inline Global() : v8::Global() {} - - template inline Global(v8::Local that) : - v8::Global(v8::Isolate::GetCurrent(), that) {} - - template - inline Global(const v8::PersistentBase &that) : - v8::Global(v8::Isolate::GetCurrent(), that) {} - - inline void Reset() { v8::PersistentBase::Reset(); } - - template - inline void Reset(const v8::Local &other) { - v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); - } - - template - inline void Reset(const v8::PersistentBase &other) { - v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); - } - - template - inline void SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type) { - reinterpret_cast*>(this)->SetWeak( - parameter, callback, type); - } -}; -#else -template -class Global : public v8::UniquePersistent { - public: - inline Global() : v8::UniquePersistent() {} - - template inline Global(v8::Local that) : - v8::UniquePersistent(v8::Isolate::GetCurrent(), that) {} - - template - inline Global(const v8::PersistentBase &that) : - v8::UniquePersistent(v8::Isolate::GetCurrent(), that) {} - - inline void Reset() { v8::PersistentBase::Reset(); } - - template - inline void Reset(const v8::Local &other) { - v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); - } - - template - inline void Reset(const v8::PersistentBase &other) { - v8::PersistentBase::Reset(v8::Isolate::GetCurrent(), other); - } - - template - inline void SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type) { - reinterpret_cast*>(this)->SetWeak( - parameter, callback, type); - } -}; -#endif - -#endif // NAN_PERSISTENT_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h deleted file mode 100644 index 0d427edb182..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_persistent_pre_12_inl.h +++ /dev/null @@ -1,242 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_PERSISTENT_PRE_12_INL_H_ -#define NAN_PERSISTENT_PRE_12_INL_H_ - -template -class PersistentBase { - v8::Persistent persistent; - template - friend v8::Local New(const PersistentBase &p); - template - friend v8::Local New(const Persistent &p); - template - friend v8::Local New(const Global &p); - template friend class ReturnValue; - - public: - inline PersistentBase() : - persistent() {} - - inline void Reset() { - persistent.Dispose(); - persistent.Clear(); - } - - template - inline void Reset(const v8::Local &other) { - TYPE_CHECK(T, S); - - if (!persistent.IsEmpty()) { - persistent.Dispose(); - } - - if (other.IsEmpty()) { - persistent.Clear(); - } else { - persistent = v8::Persistent::New(other); - } - } - - template - inline void Reset(const PersistentBase &other) { - TYPE_CHECK(T, S); - - if (!persistent.IsEmpty()) { - persistent.Dispose(); - } - - if (other.IsEmpty()) { - persistent.Clear(); - } else { - persistent = v8::Persistent::New(other.persistent); - } - } - - inline bool IsEmpty() const { return persistent.IsEmpty(); } - - inline void Empty() { persistent.Clear(); } - - template - inline bool operator==(const PersistentBase &that) const { - return this->persistent == that.persistent; - } - - template - inline bool operator==(const v8::Local &that) const { - return this->persistent == that; - } - - template - inline bool operator!=(const PersistentBase &that) const { - return !operator==(that); - } - - template - inline bool operator!=(const v8::Local &that) const { - return !operator==(that); - } - - template - inline void SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type); - - inline void ClearWeak() { persistent.ClearWeak(); } - - inline void MarkIndependent() { persistent.MarkIndependent(); } - - inline bool IsIndependent() const { return persistent.IsIndependent(); } - - inline bool IsNearDeath() const { return persistent.IsNearDeath(); } - - inline bool IsWeak() const { return persistent.IsWeak(); } - - private: - inline explicit PersistentBase(v8::Persistent that) : - persistent(that) { } - inline explicit PersistentBase(T *val) : persistent(val) {} - template friend class Persistent; - template friend class Global; - friend class ObjectWrap; -}; - -template -class NonCopyablePersistentTraits { - public: - typedef Persistent > - NonCopyablePersistent; - static const bool kResetInDestructor = false; - template - inline static void Copy(const Persistent &source, - NonCopyablePersistent *dest) { - Uncompilable(); - } - - template inline static void Uncompilable() { - TYPE_CHECK(O, v8::Primitive); - } -}; - -template -struct CopyablePersistentTraits { - typedef Persistent > CopyablePersistent; - static const bool kResetInDestructor = true; - template - static inline void Copy(const Persistent &source, - CopyablePersistent *dest) {} -}; - -template class Persistent : - public PersistentBase { - public: - inline Persistent() {} - - template inline Persistent(v8::Handle that) - : PersistentBase(v8::Persistent::New(that)) { - TYPE_CHECK(T, S); - } - - inline Persistent(const Persistent &that) : PersistentBase() { - Copy(that); - } - - template - inline Persistent(const Persistent &that) : - PersistentBase() { - Copy(that); - } - - inline Persistent &operator=(const Persistent &that) { - Copy(that); - return *this; - } - - template - inline Persistent &operator=(const Persistent &that) { - Copy(that); - return *this; - } - - inline ~Persistent() { - if (M::kResetInDestructor) this->Reset(); - } - - private: - inline T *operator*() const { return *PersistentBase::persistent; } - - template - inline void Copy(const Persistent &that) { - TYPE_CHECK(T, S); - - this->Reset(); - - if (!that.IsEmpty()) { - this->persistent = v8::Persistent::New(that.persistent); - M::Copy(that, this); - } - } -}; - -template -class Global : public PersistentBase { - struct RValue { - inline explicit RValue(Global* obj) : object(obj) {} - Global* object; - }; - - public: - inline Global() : PersistentBase(0) { } - - template - inline Global(v8::Local that) - : PersistentBase(v8::Persistent::New(that)) { - TYPE_CHECK(T, S); - } - - template - inline Global(const PersistentBase &that) - : PersistentBase(that) { - TYPE_CHECK(T, S); - } - /** - * Move constructor. - */ - inline Global(RValue rvalue) - : PersistentBase(rvalue.object->persistent) { - rvalue.object->Reset(); - } - inline ~Global() { this->Reset(); } - /** - * Move via assignment. - */ - template - inline Global &operator=(Global rhs) { - TYPE_CHECK(T, S); - this->Reset(rhs.persistent); - rhs.Reset(); - return *this; - } - /** - * Cast operator for moves. - */ - inline operator RValue() { return RValue(this); } - /** - * Pass allows returning uniques from functions, etc. - */ - Global Pass() { return Global(RValue(this)); } - - private: - Global(Global &); - void operator=(Global &); - template friend class ReturnValue; -}; - -#endif // NAN_PERSISTENT_PRE_12_INL_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h deleted file mode 100644 index a2e6437d12b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_string_bytes.h +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef NAN_STRING_BYTES_H_ -#define NAN_STRING_BYTES_H_ - -// Decodes a v8::Local or Buffer to a raw char* - -namespace imp { - -using v8::Local; -using v8::Object; -using v8::String; -using v8::Value; - - -//// Base 64 //// - -#define base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) - - - -//// HEX //// - -static bool contains_non_ascii_slow(const char* buf, size_t len) { - for (size_t i = 0; i < len; ++i) { - if (buf[i] & 0x80) return true; - } - return false; -} - - -static bool contains_non_ascii(const char* src, size_t len) { - if (len < 16) { - return contains_non_ascii_slow(src, len); - } - - const unsigned bytes_per_word = sizeof(void*); - const unsigned align_mask = bytes_per_word - 1; - const unsigned unaligned = reinterpret_cast(src) & align_mask; - - if (unaligned > 0) { - const unsigned n = bytes_per_word - unaligned; - if (contains_non_ascii_slow(src, n)) return true; - src += n; - len -= n; - } - - -#if defined(__x86_64__) || defined(_WIN64) - const uintptr_t mask = 0x8080808080808080ll; -#else - const uintptr_t mask = 0x80808080l; -#endif - - const uintptr_t* srcw = reinterpret_cast(src); - - for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) { - if (srcw[i] & mask) return true; - } - - const unsigned remainder = len & align_mask; - if (remainder > 0) { - const size_t offset = len - remainder; - if (contains_non_ascii_slow(src + offset, remainder)) return true; - } - - return false; -} - - -static void force_ascii_slow(const char* src, char* dst, size_t len) { - for (size_t i = 0; i < len; ++i) { - dst[i] = src[i] & 0x7f; - } -} - - -static void force_ascii(const char* src, char* dst, size_t len) { - if (len < 16) { - force_ascii_slow(src, dst, len); - return; - } - - const unsigned bytes_per_word = sizeof(void*); - const unsigned align_mask = bytes_per_word - 1; - const unsigned src_unalign = reinterpret_cast(src) & align_mask; - const unsigned dst_unalign = reinterpret_cast(dst) & align_mask; - - if (src_unalign > 0) { - if (src_unalign == dst_unalign) { - const unsigned unalign = bytes_per_word - src_unalign; - force_ascii_slow(src, dst, unalign); - src += unalign; - dst += unalign; - len -= src_unalign; - } else { - force_ascii_slow(src, dst, len); - return; - } - } - -#if defined(__x86_64__) || defined(_WIN64) - const uintptr_t mask = ~0x8080808080808080ll; -#else - const uintptr_t mask = ~0x80808080l; -#endif - - const uintptr_t* srcw = reinterpret_cast(src); - uintptr_t* dstw = reinterpret_cast(dst); - - for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) { - dstw[i] = srcw[i] & mask; - } - - const unsigned remainder = len & align_mask; - if (remainder > 0) { - const size_t offset = len - remainder; - force_ascii_slow(src + offset, dst + offset, remainder); - } -} - - -static size_t base64_encode(const char* src, - size_t slen, - char* dst, - size_t dlen) { - // We know how much we'll write, just make sure that there's space. - assert(dlen >= base64_encoded_size(slen) && - "not enough space provided for base64 encode"); - - dlen = base64_encoded_size(slen); - - unsigned a; - unsigned b; - unsigned c; - unsigned i; - unsigned k; - unsigned n; - - static const char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; - - i = 0; - k = 0; - n = slen / 3 * 3; - - while (i < n) { - a = src[i + 0] & 0xff; - b = src[i + 1] & 0xff; - c = src[i + 2] & 0xff; - - dst[k + 0] = table[a >> 2]; - dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; - dst[k + 2] = table[((b & 0x0f) << 2) | (c >> 6)]; - dst[k + 3] = table[c & 0x3f]; - - i += 3; - k += 4; - } - - if (n != slen) { - switch (slen - n) { - case 1: - a = src[i + 0] & 0xff; - dst[k + 0] = table[a >> 2]; - dst[k + 1] = table[(a & 3) << 4]; - dst[k + 2] = '='; - dst[k + 3] = '='; - break; - - case 2: - a = src[i + 0] & 0xff; - b = src[i + 1] & 0xff; - dst[k + 0] = table[a >> 2]; - dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; - dst[k + 2] = table[(b & 0x0f) << 2]; - dst[k + 3] = '='; - break; - } - } - - return dlen; -} - - -static size_t hex_encode(const char* src, size_t slen, char* dst, size_t dlen) { - // We know how much we'll write, just make sure that there's space. - assert(dlen >= slen * 2 && - "not enough space provided for hex encode"); - - dlen = slen * 2; - for (uint32_t i = 0, k = 0; k < dlen; i += 1, k += 2) { - static const char hex[] = "0123456789abcdef"; - uint8_t val = static_cast(src[i]); - dst[k + 0] = hex[val >> 4]; - dst[k + 1] = hex[val & 15]; - } - - return dlen; -} - - - -static Local Encode(const char* buf, - size_t buflen, - enum Encoding encoding) { - assert(buflen <= node::Buffer::kMaxLength); - if (!buflen && encoding != BUFFER) - return New("").ToLocalChecked(); - - Local val; - switch (encoding) { - case BUFFER: - return CopyBuffer(buf, buflen).ToLocalChecked(); - - case ASCII: - if (contains_non_ascii(buf, buflen)) { - char* out = new char[buflen]; - force_ascii(buf, out, buflen); - val = New(out, buflen).ToLocalChecked(); - delete[] out; - } else { - val = New(buf, buflen).ToLocalChecked(); - } - break; - - case UTF8: - val = New(buf, buflen).ToLocalChecked(); - break; - - case BINARY: { - // TODO(isaacs) use ExternalTwoByteString? - const unsigned char *cbuf = reinterpret_cast(buf); - uint16_t * twobytebuf = new uint16_t[buflen]; - for (size_t i = 0; i < buflen; i++) { - // XXX is the following line platform independent? - twobytebuf[i] = cbuf[i]; - } - val = New(twobytebuf, buflen).ToLocalChecked(); - delete[] twobytebuf; - break; - } - - case BASE64: { - size_t dlen = base64_encoded_size(buflen); - char* dst = new char[dlen]; - - size_t written = base64_encode(buf, buflen, dst, dlen); - assert(written == dlen); - - val = New(dst, dlen).ToLocalChecked(); - delete[] dst; - break; - } - - case UCS2: { - const uint16_t* data = reinterpret_cast(buf); - val = New(data, buflen / 2).ToLocalChecked(); - break; - } - - case HEX: { - size_t dlen = buflen * 2; - char* dst = new char[dlen]; - size_t written = hex_encode(buf, buflen, dst, dlen); - assert(written == dlen); - - val = New(dst, dlen).ToLocalChecked(); - delete[] dst; - break; - } - - default: - assert(0 && "unknown encoding"); - break; - } - - return val; -} - -#undef base64_encoded_size - -} // end of namespace imp - -#endif // NAN_STRING_BYTES_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h deleted file mode 100644 index b7159619ac0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_typedarray_contents.h +++ /dev/null @@ -1,87 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_TYPEDARRAY_CONTENTS_H_ -#define NAN_TYPEDARRAY_CONTENTS_H_ - -template -class TypedArrayContents { - public: - inline explicit TypedArrayContents(v8::Local from) : - length_(0), data_(NULL) { - - size_t length = 0; - void* data = NULL; - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - - if (from->IsArrayBufferView()) { - v8::Local array = - v8::Local::Cast(from); - - const size_t byte_length = array->ByteLength(); - const ptrdiff_t byte_offset = array->ByteOffset(); - v8::Local buffer = array->Buffer(); - - length = byte_length / sizeof(T); - data = static_cast(buffer->GetContents().Data()) + byte_offset; - } - -#else - - if (from->IsObject() && !from->IsNull()) { - v8::Local array = v8::Local::Cast(from); - - MaybeLocal buffer = Get(array, - New("buffer").ToLocalChecked()); - MaybeLocal byte_length = Get(array, - New("byteLength").ToLocalChecked()); - MaybeLocal byte_offset = Get(array, - New("byteOffset").ToLocalChecked()); - - if (!buffer.IsEmpty() && - !byte_length.IsEmpty() && byte_length.ToLocalChecked()->IsUint32() && - !byte_offset.IsEmpty() && byte_offset.ToLocalChecked()->IsUint32()) { - data = array->GetIndexedPropertiesExternalArrayData(); - if(data) { - length = byte_length.ToLocalChecked()->Uint32Value() / sizeof(T); - } - } - } - -#endif - -#if defined(_MSC_VER) && _MSC_VER >= 1900 || __cplusplus >= 201103L - assert(reinterpret_cast(data) % alignof (T) == 0); -#elif defined(_MSC_VER) && _MSC_VER >= 1600 || defined(__GNUC__) - assert(reinterpret_cast(data) % __alignof(T) == 0); -#else - assert(reinterpret_cast(data) % sizeof (T) == 0); -#endif - - length_ = length; - data_ = static_cast(data); - } - - inline size_t length() const { return length_; } - inline T* operator*() { return data_; } - inline const T* operator*() const { return data_; } - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(TypedArrayContents) - - //Disable heap allocation - void *operator new(size_t size); - void operator delete(void *, size_t); - - size_t length_; - T* data_; -}; - -#endif // NAN_TYPEDARRAY_CONTENTS_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h b/src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h deleted file mode 100644 index 93f6fe86aba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/nan_weak.h +++ /dev/null @@ -1,432 +0,0 @@ -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -#ifndef NAN_WEAK_H_ -#define NAN_WEAK_H_ - -static const int kInternalFieldsInWeakCallback = 2; -static const int kNoInternalFieldIndex = -1; - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -# define NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ \ - v8::WeakCallbackInfo > const& -# define NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ \ - NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ -# define NAN_WEAK_PARAMETER_CALLBACK_SIG_ NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ -# define NAN_WEAK_TWOFIELD_CALLBACK_SIG_ NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ -#elif NODE_MODULE_VERSION > IOJS_1_1_MODULE_VERSION -# define NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ \ - v8::PhantomCallbackData > const& -# define NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ \ - NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ -# define NAN_WEAK_PARAMETER_CALLBACK_SIG_ NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ -# define NAN_WEAK_TWOFIELD_CALLBACK_SIG_ NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ -#elif NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION -# define NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ \ - v8::PhantomCallbackData > const& -# define NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ \ - v8::InternalFieldsCallbackData, void> const& -# define NAN_WEAK_PARAMETER_CALLBACK_SIG_ NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ -# define NAN_WEAK_TWOFIELD_CALLBACK_SIG_ NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ -#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION -# define NAN_WEAK_CALLBACK_DATA_TYPE_ \ - v8::WeakCallbackData > const& -# define NAN_WEAK_CALLBACK_SIG_ NAN_WEAK_CALLBACK_DATA_TYPE_ -#else -# define NAN_WEAK_CALLBACK_DATA_TYPE_ void * -# define NAN_WEAK_CALLBACK_SIG_ \ - v8::Persistent, NAN_WEAK_CALLBACK_DATA_TYPE_ -#endif - -template -class WeakCallbackInfo { - public: - typedef void (*Callback)(const WeakCallbackInfo& data); - WeakCallbackInfo( - Persistent *persistent - , Callback callback - , void *parameter - , void *field1 = 0 - , void *field2 = 0) : - callback_(callback), isolate_(0), parameter_(parameter) { - std::memcpy(&persistent_, persistent, sizeof (v8::Persistent)); - internal_fields_[0] = field1; - internal_fields_[1] = field2; - } - inline v8::Isolate *GetIsolate() const { return isolate_; } - inline T *GetParameter() const { return static_cast(parameter_); } - inline void *GetInternalField(int index) const { - assert((index == 0 || index == 1) && "internal field index out of bounds"); - if (index == 0) { - return internal_fields_[0]; - } else { - return internal_fields_[1]; - } - } - - private: - NAN_DISALLOW_ASSIGN_COPY_MOVE(WeakCallbackInfo) - Callback callback_; - v8::Isolate *isolate_; - void *parameter_; - void *internal_fields_[kInternalFieldsInWeakCallback]; - v8::Persistent persistent_; - template friend class Persistent; - template friend class PersistentBase; -#if NODE_MODULE_VERSION <= NODE_0_12_MODULE_VERSION -# if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION - template - static void invoke(NAN_WEAK_CALLBACK_SIG_ data); - template - static WeakCallbackInfo *unwrap(NAN_WEAK_CALLBACK_DATA_TYPE_ data); -# else - static void invoke(NAN_WEAK_CALLBACK_SIG_ data); - static WeakCallbackInfo *unwrap(NAN_WEAK_CALLBACK_DATA_TYPE_ data); -# endif -#else -# if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - template - static void invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data); - template - static void invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data); -# else - static void invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data); - static void invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data); -# endif - static WeakCallbackInfo *unwrapparameter( - NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ data); - static WeakCallbackInfo *unwraptwofield( - NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ data); -#endif -}; - - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) - -template -template -void -WeakCallbackInfo::invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data) { - WeakCallbackInfo *cbinfo = unwrapparameter(data); - if (isFirstPass) { - cbinfo->persistent_.Reset(); - data.SetSecondPassCallback(invokeparameter); - } else { - cbinfo->callback_(*cbinfo); - delete cbinfo; - } -} - -template -template -void -WeakCallbackInfo::invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data) { - WeakCallbackInfo *cbinfo = unwraptwofield(data); - if (isFirstPass) { - cbinfo->persistent_.Reset(); - data.SetSecondPassCallback(invoketwofield); - } else { - cbinfo->callback_(*cbinfo); - delete cbinfo; - } -} - -template -WeakCallbackInfo *WeakCallbackInfo::unwrapparameter( - NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ data) { - WeakCallbackInfo *cbinfo = - static_cast*>(data.GetParameter()); - cbinfo->isolate_ = data.GetIsolate(); - return cbinfo; -} - -template -WeakCallbackInfo *WeakCallbackInfo::unwraptwofield( - NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ data) { - WeakCallbackInfo *cbinfo = - static_cast*>(data.GetInternalField(0)); - cbinfo->isolate_ = data.GetIsolate(); - return cbinfo; -} - -#undef NAN_WEAK_PARAMETER_CALLBACK_SIG_ -#undef NAN_WEAK_TWOFIELD_CALLBACK_SIG_ -#undef NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ -#undef NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ -# elif NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION - -template -void -WeakCallbackInfo::invokeparameter(NAN_WEAK_PARAMETER_CALLBACK_SIG_ data) { - WeakCallbackInfo *cbinfo = unwrapparameter(data); - cbinfo->persistent_.Reset(); - cbinfo->callback_(*cbinfo); - delete cbinfo; -} - -template -void -WeakCallbackInfo::invoketwofield(NAN_WEAK_TWOFIELD_CALLBACK_SIG_ data) { - WeakCallbackInfo *cbinfo = unwraptwofield(data); - cbinfo->persistent_.Reset(); - cbinfo->callback_(*cbinfo); - delete cbinfo; -} - -template -WeakCallbackInfo *WeakCallbackInfo::unwrapparameter( - NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ data) { - WeakCallbackInfo *cbinfo = - static_cast*>(data.GetParameter()); - cbinfo->isolate_ = data.GetIsolate(); - return cbinfo; -} - -template -WeakCallbackInfo *WeakCallbackInfo::unwraptwofield( - NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ data) { - WeakCallbackInfo *cbinfo = - static_cast*>(data.GetInternalField1()); - cbinfo->isolate_ = data.GetIsolate(); - return cbinfo; -} - -#undef NAN_WEAK_PARAMETER_CALLBACK_SIG_ -#undef NAN_WEAK_TWOFIELD_CALLBACK_SIG_ -#undef NAN_WEAK_PARAMETER_CALLBACK_DATA_TYPE_ -#undef NAN_WEAK_TWOFIELD_CALLBACK_DATA_TYPE_ -#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION - -template -template -void WeakCallbackInfo::invoke(NAN_WEAK_CALLBACK_SIG_ data) { - WeakCallbackInfo *cbinfo = unwrap(data); - cbinfo->persistent_.Reset(); - cbinfo->callback_(*cbinfo); - delete cbinfo; -} - -template -template -WeakCallbackInfo *WeakCallbackInfo::unwrap( - NAN_WEAK_CALLBACK_DATA_TYPE_ data) { - void *parameter = data.GetParameter(); - WeakCallbackInfo *cbinfo = - static_cast*>(parameter); - cbinfo->isolate_ = data.GetIsolate(); - return cbinfo; -} - -#undef NAN_WEAK_CALLBACK_SIG_ -#undef NAN_WEAK_CALLBACK_DATA_TYPE_ -#else - -template -void WeakCallbackInfo::invoke(NAN_WEAK_CALLBACK_SIG_ data) { - WeakCallbackInfo *cbinfo = unwrap(data); - cbinfo->persistent_.Dispose(); - cbinfo->persistent_.Clear(); - cbinfo->callback_(*cbinfo); - delete cbinfo; -} - -template -WeakCallbackInfo *WeakCallbackInfo::unwrap( - NAN_WEAK_CALLBACK_DATA_TYPE_ data) { - WeakCallbackInfo *cbinfo = - static_cast*>(data); - cbinfo->isolate_ = v8::Isolate::GetCurrent(); - return cbinfo; -} - -#undef NAN_WEAK_CALLBACK_SIG_ -#undef NAN_WEAK_CALLBACK_DATA_TYPE_ -#endif - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ - (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) -template -template -inline void Persistent::SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type) { - WeakCallbackInfo

*wcbd; - if (type == WeakCallbackType::kParameter) { - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , parameter); - v8::PersistentBase::SetWeak( - wcbd - , WeakCallbackInfo

::template invokeparameter - , type); - } else { - v8::Local* self = reinterpret_cast*>(this); - assert((*self)->IsObject()); - int count = (*self)->InternalFieldCount(); - void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; - for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { - internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); - } - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , 0 - , internal_fields[0] - , internal_fields[1]); - (*self)->SetAlignedPointerInInternalField(0, wcbd); - v8::PersistentBase::SetWeak( - static_cast*>(0) - , WeakCallbackInfo

::template invoketwofield - , type); - } -} -#elif NODE_MODULE_VERSION > IOJS_1_1_MODULE_VERSION -template -template -inline void Persistent::SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type) { - WeakCallbackInfo

*wcbd; - if (type == WeakCallbackType::kParameter) { - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , parameter); - v8::PersistentBase::SetPhantom( - wcbd - , WeakCallbackInfo

::invokeparameter); - } else { - v8::Local* self = reinterpret_cast*>(this); - assert((*self)->IsObject()); - int count = (*self)->InternalFieldCount(); - void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; - for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { - internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); - } - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , 0 - , internal_fields[0] - , internal_fields[1]); - (*self)->SetAlignedPointerInInternalField(0, wcbd); - v8::PersistentBase::SetPhantom( - static_cast*>(0) - , WeakCallbackInfo

::invoketwofield - , 0 - , count > 1 ? 1 : kNoInternalFieldIndex); - } -} -#elif NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION -template -template -inline void Persistent::SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type) { - WeakCallbackInfo

*wcbd; - if (type == WeakCallbackType::kParameter) { - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , parameter); - v8::PersistentBase::SetPhantom( - wcbd - , WeakCallbackInfo

::invokeparameter); - } else { - v8::Local* self = reinterpret_cast*>(this); - assert((*self)->IsObject()); - int count = (*self)->InternalFieldCount(); - void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; - for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { - internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); - } - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , 0 - , internal_fields[0] - , internal_fields[1]); - (*self)->SetAlignedPointerInInternalField(0, wcbd); - v8::PersistentBase::SetPhantom( - WeakCallbackInfo

::invoketwofield - , 0 - , count > 1 ? 1 : kNoInternalFieldIndex); - } -} -#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION -template -template -inline void Persistent::SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type) { - WeakCallbackInfo

*wcbd; - if (type == WeakCallbackType::kParameter) { - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , parameter); - v8::PersistentBase::SetWeak(wcbd, WeakCallbackInfo

::invoke); - } else { - v8::Local* self = reinterpret_cast*>(this); - assert((*self)->IsObject()); - int count = (*self)->InternalFieldCount(); - void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; - for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { - internal_fields[i] = (*self)->GetAlignedPointerFromInternalField(i); - } - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , 0 - , internal_fields[0] - , internal_fields[1]); - v8::PersistentBase::SetWeak(wcbd, WeakCallbackInfo

::invoke); - } -} -#else -template -template -inline void PersistentBase::SetWeak( - P *parameter - , typename WeakCallbackInfo

::Callback callback - , WeakCallbackType type) { - WeakCallbackInfo

*wcbd; - if (type == WeakCallbackType::kParameter) { - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , parameter); - persistent.MakeWeak(wcbd, WeakCallbackInfo

::invoke); - } else { - v8::Local* self = reinterpret_cast*>(this); - assert((*self)->IsObject()); - int count = (*self)->InternalFieldCount(); - void *internal_fields[kInternalFieldsInWeakCallback] = {0, 0}; - for (int i = 0; i < count && i < kInternalFieldsInWeakCallback; i++) { - internal_fields[i] = (*self)->GetPointerFromInternalField(i); - } - wcbd = new WeakCallbackInfo

( - reinterpret_cast*>(this) - , callback - , 0 - , internal_fields[0] - , internal_fields[1]); - persistent.MakeWeak(wcbd, WeakCallbackInfo

::invoke); - } -} -#endif - -#endif // NAN_WEAK_H_ diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/package.json b/src/filesystem/impls/appshell/node/node_modules/nan/package.json deleted file mode 100644 index 8cd0a1c99cf..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "_args": [ - [ - "nan@^2.3.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fsevents" - ] - ], - "_from": "nan@>=2.3.0 <3.0.0", - "_id": "nan@2.4.0", - "_inCache": true, - "_installable": true, - "_location": "/nan", - "_nodeVersion": "5.0.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/nan-2.4.0.tgz_1468158679820_0.6951719264034182" - }, - "_npmUser": { - "email": "bbyholm@abo.fi", - "name": "kkoopa" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "nan", - "raw": "nan@^2.3.0", - "rawSpec": "^2.3.0", - "scope": null, - "spec": ">=2.3.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fsevents" - ], - "_resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz", - "_shasum": "fb3c59d45fe4effe215f0b890f8adf6eb32d2232", - "_shrinkwrap": null, - "_spec": "nan@^2.3.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fsevents", - "bugs": { - "url": "https://github.com/nodejs/nan/issues" - }, - "contributors": [ - { - "email": "r@va.gg", - "name": "Rod Vagg", - "url": "https://github.com/rvagg" - }, - { - "email": "bbyholm@abo.fi", - "name": "Benjamin Byholm", - "url": "https://github.com/kkoopa/" - }, - { - "email": "trev.norris@gmail.com", - "name": "Trevor Norris", - "url": "https://github.com/trevnorris" - }, - { - "email": "nathan@tootallnate.net", - "name": "Nathan Rajlich", - "url": "https://github.com/TooTallNate" - }, - { - "email": "brett19@gmail.com", - "name": "Brett Lawson", - "url": "https://github.com/brett19" - }, - { - "email": "info@bnoordhuis.nl", - "name": "Ben Noordhuis", - "url": "https://github.com/bnoordhuis" - }, - { - "email": "david@artcom.de", - "name": "David Siegel", - "url": "https://github.com/agnat" - } - ], - "dependencies": {}, - "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 6 compatibility", - "devDependencies": { - "bindings": "~1.2.1", - "commander": "^2.8.1", - "glob": "^5.0.14", - "node-gyp": "~3.0.1", - "readable-stream": "^2.1.4", - "tap": "~0.7.1", - "xtend": "~4.0.0" - }, - "directories": {}, - "dist": { - "shasum": "fb3c59d45fe4effe215f0b890f8adf6eb32d2232", - "tarball": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz" - }, - "homepage": "https://github.com/nodejs/nan#readme", - "license": "MIT", - "main": "include_dirs.js", - "maintainers": [ - { - "email": "rod@vagg.org", - "name": "rvagg" - }, - { - "email": "bbyholm@abo.fi", - "name": "kkoopa" - } - ], - "name": "nan", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/nan.git" - }, - "scripts": { - "docs": "doc/.build.sh", - "rebuild-tests": "node-gyp rebuild --msvs_version=2013 --directory test", - "test": "tap --gc --stderr test/js/*-test.js" - }, - "version": "2.4.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js b/src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js deleted file mode 100755 index b7498e438cc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/tools/1to2.js +++ /dev/null @@ -1,412 +0,0 @@ -#!/usr/bin/env node -/********************************************************************* - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2016 NAN contributors - * - * MIT License - ********************************************************************/ - -var commander = require('commander'), - fs = require('fs'), - glob = require('glob'), - groups = [], - total = 0, - warning1 = '/* ERROR: Rewrite using Buffer */\n', - warning2 = '\\/\\* ERROR\\: Rewrite using Buffer \\*\\/\\n', - length, - i; - -fs.readFile(__dirname + '/package.json', 'utf8', function (err, data) { - if (err) { - throw err; - } - - commander - .version(JSON.parse(data).version) - .usage('[options] ') - .parse(process.argv); - - if (!process.argv.slice(2).length) { - commander.outputHelp(); - } -}); - -/* construct strings representing regular expressions - each expression contains a unique group allowing for identification of the match - the index of this key group, relative to the regular expression in question, - is indicated by the first array member */ - -/* simple substistutions, key group is the entire match, 0 */ -groups.push([0, [ - '_NAN_', - 'NODE_SET_METHOD', - 'NODE_SET_PROTOTYPE_METHOD', - 'NanAsciiString', - 'NanEscapeScope', - 'NanReturnValue', - 'NanUcs2String'].join('|')]); - -/* substitutions of parameterless macros, key group is 1 */ -groups.push([1, ['(', [ - 'NanEscapableScope', - 'NanReturnNull', - 'NanReturnUndefined', - 'NanScope'].join('|'), ')\\(\\)'].join('')]); - -/* replace TryCatch with NanTryCatch once, gobbling possible namespace, key group 2 */ -groups.push([2, '(?:(?:v8\\:\\:)?|(Nan)?)(TryCatch)']); - -/* NanNew("string") will likely not fail a ToLocalChecked(), key group 1 */ -groups.push([1, ['(NanNew)', '(\\("[^\\"]*"[^\\)]*\\))(?!\\.ToLocalChecked\\(\\))'].join('')]); - -/* Removed v8 APIs, warn that the code needs rewriting using node::Buffer, key group 2 */ -groups.push([2, ['(', warning2, ')?', '^.*?(', [ - 'GetIndexedPropertiesExternalArrayDataLength', - 'GetIndexedPropertiesExternalArrayData', - 'GetIndexedPropertiesExternalArrayDataType', - 'GetIndexedPropertiesPixelData', - 'GetIndexedPropertiesPixelDataLength', - 'HasIndexedPropertiesInExternalArrayData', - 'HasIndexedPropertiesInPixelData', - 'SetIndexedPropertiesToExternalArrayData', - 'SetIndexedPropertiesToPixelData'].join('|'), ')'].join('')]); - -/* No need for NanScope in V8-exposed methods, key group 2 */ -groups.push([2, ['((', [ - 'NAN_METHOD', - 'NAN_GETTER', - 'NAN_SETTER', - 'NAN_PROPERTY_GETTER', - 'NAN_PROPERTY_SETTER', - 'NAN_PROPERTY_ENUMERATOR', - 'NAN_PROPERTY_DELETER', - 'NAN_PROPERTY_QUERY', - 'NAN_INDEX_GETTER', - 'NAN_INDEX_SETTER', - 'NAN_INDEX_ENUMERATOR', - 'NAN_INDEX_DELETER', - 'NAN_INDEX_QUERY'].join('|'), ')\\([^\\)]*\\)\\s*\\{)\\s*NanScope\\(\\)\\s*;'].join('')]); - -/* v8::Value::ToXXXXXXX returns v8::MaybeLocal, key group 3 */ -groups.push([3, ['([\\s\\(\\)])([^\\s\\(\\)]+)->(', [ - 'Boolean', - 'Number', - 'String', - 'Object', - 'Integer', - 'Uint32', - 'Int32'].join('|'), ')\\('].join('')]); - -/* v8::Value::XXXXXXXValue returns v8::Maybe, key group 3 */ -groups.push([3, ['([\\s\\(\\)])([^\\s\\(\\)]+)->((?:', [ - 'Boolean', - 'Number', - 'Integer', - 'Uint32', - 'Int32'].join('|'), ')Value)\\('].join('')]); - -/* NAN_WEAK_CALLBACK macro was removed, write out callback definition, key group 1 */ -groups.push([1, '(NAN_WEAK_CALLBACK)\\(([^\\s\\)]+)\\)']); - -/* node::ObjectWrap and v8::Persistent have been replaced with Nan implementations, key group 1 */ -groups.push([1, ['(', [ - 'NanDisposePersistent', - 'NanObjectWrapHandle'].join('|'), ')\\s*\\(\\s*([^\\s\\)]+)'].join('')]); - -/* Since NanPersistent there is no need for NanMakeWeakPersistent, key group 1 */ -groups.push([1, '(NanMakeWeakPersistent)\\s*\\(\\s*([^\\s,]+)\\s*,\\s*']); - -/* Many methods of v8::Object and others now return v8::MaybeLocal, key group 3 */ -groups.push([3, ['([\\s])([^\\s]+)->(', [ - 'GetEndColumn', - 'GetFunction', - 'GetLineNumber', - 'NewInstance', - 'GetPropertyNames', - 'GetOwnPropertyNames', - 'GetSourceLine', - 'GetStartColumn', - 'ObjectProtoToString', - 'ToArrayIndex', - 'ToDetailString', - 'CallAsConstructor', - 'CallAsFunction', - 'CloneElementAt', - 'Delete', - 'ForceSet', - 'Get', - 'GetPropertyAttributes', - 'GetRealNamedProperty', - 'GetRealNamedPropertyInPrototypeChain', - 'Has', - 'HasOwnProperty', - 'HasRealIndexedProperty', - 'HasRealNamedCallbackProperty', - 'HasRealNamedProperty', - 'Set', - 'SetAccessor', - 'SetIndexedPropertyHandler', - 'SetNamedPropertyHandler', - 'SetPrototype'].join('|'), ')\\('].join('')]); - -/* You should get an error if any of these fail anyways, - or handle the error better, it is indicated either way, key group 2 */ -groups.push([2, ['NanNew(<(?:v8\\:\\:)?(', ['Date', 'String', 'RegExp'].join('|'), ')>)(\\([^\\)]*\\))(?!\\.ToLocalChecked\\(\\))'].join('')]); - -/* v8::Value::Equals now returns a v8::Maybe, key group 3 */ -groups.push([3, '([\\s\\(\\)])([^\\s\\(\\)]+)->(Equals)\\(([^\\s\\)]+)']); - -/* NanPersistent makes this unnecessary, key group 1 */ -groups.push([1, '(NanAssignPersistent)(?:]+>)?\\(([^,]+),\\s*']); - -/* args has been renamed to info, key group 2 */ -groups.push([2, '(\\W)(args)(\\W)']) - -/* node::ObjectWrap was replaced with NanObjectWrap, key group 2 */ -groups.push([2, '(\\W)(?:node\\:\\:)?(ObjectWrap)(\\W)']); - -/* v8::Persistent was replaced with NanPersistent, key group 2 */ -groups.push([2, '(\\W)(?:v8\\:\\:)?(Persistent)(\\W)']); - -/* counts the number of capturing groups in a well-formed regular expression, - ignoring non-capturing groups and escaped parentheses */ -function groupcount(s) { - var positive = s.match(/\((?!\?)/g), - negative = s.match(/\\\(/g); - return (positive ? positive.length : 0) - (negative ? negative.length : 0); -} - -/* compute the absolute position of each key group in the joined master RegExp */ -for (i = 1, length = groups.length; i < length; i++) { - total += groupcount(groups[i - 1][1]); - groups[i][0] += total; -} - -/* create the master RegExp, whis is the union of all the groups' expressions */ -master = new RegExp(groups.map(function (a) { return a[1]; }).join('|'), 'gm'); - -/* replacement function for String.replace, receives 21 arguments */ -function replace() { - /* simple expressions */ - switch (arguments[groups[0][0]]) { - case '_NAN_': - return 'NAN_'; - case 'NODE_SET_METHOD': - return 'NanSetMethod'; - case 'NODE_SET_PROTOTYPE_METHOD': - return 'NanSetPrototypeMethod'; - case 'NanAsciiString': - return 'NanUtf8String'; - case 'NanEscapeScope': - return 'scope.Escape'; - case 'NanReturnNull': - return 'info.GetReturnValue().SetNull'; - case 'NanReturnValue': - return 'info.GetReturnValue().Set'; - case 'NanUcs2String': - return 'v8::String::Value'; - default: - } - - /* macros without arguments */ - switch (arguments[groups[1][0]]) { - case 'NanEscapableScope': - return 'NanEscapableScope scope' - case 'NanReturnUndefined': - return 'return'; - case 'NanScope': - return 'NanScope scope'; - default: - } - - /* TryCatch, emulate negative backref */ - if (arguments[groups[2][0]] === 'TryCatch') { - return arguments[groups[2][0] - 1] ? arguments[0] : 'NanTryCatch'; - } - - /* NanNew("foo") --> NanNew("foo").ToLocalChecked() */ - if (arguments[groups[3][0]] === 'NanNew') { - return [arguments[0], '.ToLocalChecked()'].join(''); - } - - /* insert warning for removed functions as comment on new line above */ - switch (arguments[groups[4][0]]) { - case 'GetIndexedPropertiesExternalArrayData': - case 'GetIndexedPropertiesExternalArrayDataLength': - case 'GetIndexedPropertiesExternalArrayDataType': - case 'GetIndexedPropertiesPixelData': - case 'GetIndexedPropertiesPixelDataLength': - case 'HasIndexedPropertiesInExternalArrayData': - case 'HasIndexedPropertiesInPixelData': - case 'SetIndexedPropertiesToExternalArrayData': - case 'SetIndexedPropertiesToPixelData': - return arguments[groups[4][0] - 1] ? arguments[0] : [warning1, arguments[0]].join(''); - default: - } - - /* remove unnecessary NanScope() */ - switch (arguments[groups[5][0]]) { - case 'NAN_GETTER': - case 'NAN_METHOD': - case 'NAN_SETTER': - case 'NAN_INDEX_DELETER': - case 'NAN_INDEX_ENUMERATOR': - case 'NAN_INDEX_GETTER': - case 'NAN_INDEX_QUERY': - case 'NAN_INDEX_SETTER': - case 'NAN_PROPERTY_DELETER': - case 'NAN_PROPERTY_ENUMERATOR': - case 'NAN_PROPERTY_GETTER': - case 'NAN_PROPERTY_QUERY': - case 'NAN_PROPERTY_SETTER': - return arguments[groups[5][0] - 1]; - default: - } - - /* Value converstion */ - switch (arguments[groups[6][0]]) { - case 'Boolean': - case 'Int32': - case 'Integer': - case 'Number': - case 'Object': - case 'String': - case 'Uint32': - return [arguments[groups[6][0] - 2], 'NanTo(', arguments[groups[6][0] - 1]].join(''); - default: - } - - /* other value conversion */ - switch (arguments[groups[7][0]]) { - case 'BooleanValue': - return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); - case 'Int32Value': - return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); - case 'IntegerValue': - return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); - case 'Uint32Value': - return [arguments[groups[7][0] - 2], 'NanTo(', arguments[groups[7][0] - 1]].join(''); - default: - } - - /* NAN_WEAK_CALLBACK */ - if (arguments[groups[8][0]] === 'NAN_WEAK_CALLBACK') { - return ['template\nvoid ', - arguments[groups[8][0] + 1], '(const NanWeakCallbackInfo &data)'].join(''); - } - - /* use methods on NAN classes instead */ - switch (arguments[groups[9][0]]) { - case 'NanDisposePersistent': - return [arguments[groups[9][0] + 1], '.Reset('].join(''); - case 'NanObjectWrapHandle': - return [arguments[groups[9][0] + 1], '->handle('].join(''); - default: - } - - /* use method on NanPersistent instead */ - if (arguments[groups[10][0]] === 'NanMakeWeakPersistent') { - return arguments[groups[10][0] + 1] + '.SetWeak('; - } - - /* These return Maybes, the upper ones take no arguments */ - switch (arguments[groups[11][0]]) { - case 'GetEndColumn': - case 'GetFunction': - case 'GetLineNumber': - case 'GetOwnPropertyNames': - case 'GetPropertyNames': - case 'GetSourceLine': - case 'GetStartColumn': - case 'NewInstance': - case 'ObjectProtoToString': - case 'ToArrayIndex': - case 'ToDetailString': - return [arguments[groups[11][0] - 2], 'Nan', arguments[groups[11][0]], '(', arguments[groups[11][0] - 1]].join(''); - case 'CallAsConstructor': - case 'CallAsFunction': - case 'CloneElementAt': - case 'Delete': - case 'ForceSet': - case 'Get': - case 'GetPropertyAttributes': - case 'GetRealNamedProperty': - case 'GetRealNamedPropertyInPrototypeChain': - case 'Has': - case 'HasOwnProperty': - case 'HasRealIndexedProperty': - case 'HasRealNamedCallbackProperty': - case 'HasRealNamedProperty': - case 'Set': - case 'SetAccessor': - case 'SetIndexedPropertyHandler': - case 'SetNamedPropertyHandler': - case 'SetPrototype': - return [arguments[groups[11][0] - 2], 'Nan', arguments[groups[11][0]], '(', arguments[groups[11][0] - 1], ', '].join(''); - default: - } - - /* Automatic ToLocalChecked(), take it or leave it */ - switch (arguments[groups[12][0]]) { - case 'Date': - case 'String': - case 'RegExp': - return ['NanNew', arguments[groups[12][0] - 1], arguments[groups[12][0] + 1], '.ToLocalChecked()'].join(''); - default: - } - - /* NanEquals is now required for uniformity */ - if (arguments[groups[13][0]] === 'Equals') { - return [arguments[groups[13][0] - 1], 'NanEquals(', arguments[groups[13][0] - 1], ', ', arguments[groups[13][0] + 1]].join(''); - } - - /* use method on replacement class instead */ - if (arguments[groups[14][0]] === 'NanAssignPersistent') { - return [arguments[groups[14][0] + 1], '.Reset('].join(''); - } - - /* args --> info */ - if (arguments[groups[15][0]] === 'args') { - return [arguments[groups[15][0] - 1], 'info', arguments[groups[15][0] + 1]].join(''); - } - - /* ObjectWrap --> NanObjectWrap */ - if (arguments[groups[16][0]] === 'ObjectWrap') { - return [arguments[groups[16][0] - 1], 'NanObjectWrap', arguments[groups[16][0] + 1]].join(''); - } - - /* Persistent --> NanPersistent */ - if (arguments[groups[17][0]] === 'Persistent') { - return [arguments[groups[17][0] - 1], 'NanPersistent', arguments[groups[17][0] + 1]].join(''); - } - - /* This should not happen. A switch is probably missing a case if it does. */ - throw 'Unhandled match: ' + arguments[0]; -} - -/* reads a file, runs replacement and writes it back */ -function processFile(file) { - fs.readFile(file, {encoding: 'utf8'}, function (err, data) { - if (err) { - throw err; - } - - /* run replacement twice, might need more runs */ - fs.writeFile(file, data.replace(master, replace).replace(master, replace), function (err) { - if (err) { - throw err; - } - }); - }); -} - -/* process file names from command line and process the identified files */ -for (i = 2, length = process.argv.length; i < length; i++) { - glob(process.argv[i], function (err, matches) { - if (err) { - throw err; - } - matches.forEach(processFile); - }); -} diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md b/src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md deleted file mode 100644 index 7f07e4b8256..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/tools/README.md +++ /dev/null @@ -1,14 +0,0 @@ -1to2 naively converts source code files from NAN 1 to NAN 2. There will be erroneous conversions, -false positives and missed opportunities. The input files are rewritten in place. Make sure that -you have backups. You will have to manually review the changes afterwards and do some touchups. - -```sh -$ tools/1to2.js - - Usage: 1to2 [options] - - Options: - - -h, --help output usage information - -V, --version output the version number -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json b/src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json deleted file mode 100644 index 2dcdd789394..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/nan/tools/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "1to2", - "version": "1.0.0", - "description": "NAN 1 -> 2 Migration Script", - "main": "1to2.js", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/nan.git" - }, - "contributors": [ - "Benjamin Byholm (https://github.com/kkoopa/)", - "Mathias Küsel (https://github.com/mathiask88/)" - ], - "dependencies": { - "glob": "~5.0.10", - "commander": "~2.8.1" - }, - "license": "MIT" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE b/src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE deleted file mode 100644 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/normalize-path/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md b/src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md deleted file mode 100644 index e75d4bd0a68..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/normalize-path/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# normalize-path [![NPM version](https://badge.fury.io/js/normalize-path.svg)](http://badge.fury.io/js/normalize-path) [![Build Status](https://travis-ci.org/jonschlinkert/normalize-path.svg)](https://travis-ci.org/jonschlinkert/normalize-path) - -> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i normalize-path --save -``` - -## Usage - -```js -var normalize = require('normalize-path'); - -normalize('\\foo\\bar\\baz\\'); -//=> '/foo/bar/baz' - -normalize('./foo/bar/baz/'); -//=> './foo/bar/baz' -``` - -Pass `false` as the last argument to **not** strip trailing slashes: - -```js -normalize('./foo/bar/baz/', false); -//=> './foo/bar/baz/' - -normalize('foo\\bar\\baz\\', false); -//=> 'foo/bar/baz/' -``` - -## Related - -Other useful libraries for working with paths in node.js: - -* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path) -* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://www.npmjs.com/package/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with) -* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute) -* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative) -* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath) -* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with) -* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments) -* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g … [more](https://www.npmjs.com/package/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext) -* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify) - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/normalize-path/issues/new). - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 17, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js b/src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js deleted file mode 100644 index 137f6015b1d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/normalize-path/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/*! - * normalize-path - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License - */ - -module.exports = function normalizePath(str, stripTrailing) { - if (typeof str !== 'string') { - throw new TypeError('expected a string'); - } - str = str.replace(/[\\\/]+/g, '/'); - if (stripTrailing !== false) { - str = str.replace(/\/$/, ''); - } - return str; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json b/src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json deleted file mode 100644 index 8bebc75b8f4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/normalize-path/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_args": [ - [ - "normalize-path@^2.0.1", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "normalize-path@>=2.0.1 <3.0.0", - "_id": "normalize-path@2.0.1", - "_inCache": true, - "_installable": true, - "_location": "/normalize-path", - "_nodeVersion": "5.0.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "normalize-path", - "raw": "normalize-path@^2.0.1", - "rawSpec": "^2.0.1", - "scope": null, - "spec": ">=2.0.1 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz", - "_shasum": "47886ac1662760d4261b7d979d241709d3ce3f7a", - "_shrinkwrap": null, - "_spec": "normalize-path@^2.0.1", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/normalize-path/issues" - }, - "dependencies": {}, - "description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes.", - "devDependencies": { - "benchmarked": "^0.1.1", - "minimist": "^1.2.0", - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "47886ac1662760d4261b7d979d241709d3ce3f7a", - "tarball": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "ca536e0e8755d3ed04f3ba4d21cc9e122e0f749f", - "homepage": "https://github.com/jonschlinkert/normalize-path", - "keywords": [ - "backslash", - "file", - "filepath", - "fix", - "forward", - "fp", - "fs", - "normalize", - "path", - "slash", - "slashes", - "trailing", - "unix", - "urix" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - }, - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "normalize-path", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/normalize-path.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "description": "Other useful libraries for working with paths in node.js:", - "list": [ - "rewrite-ext", - "contains-path", - "ends-with", - "path-ends-with", - "path-segments", - "is-absolute", - "is-relative", - "parse-filepath", - "unixify" - ] - } - }, - "version": "2.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE b/src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE deleted file mode 100644 index fa30c4cb3e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/object.omit/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/README.md b/src/filesystem/impls/appshell/node/node_modules/object.omit/README.md deleted file mode 100644 index 39251833961..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/object.omit/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# object.omit [![NPM version](https://badge.fury.io/js/object.omit.svg)](http://badge.fury.io/js/object.omit) - -> Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument. - -## Install - -```sh -$ npm i object.omit --save-dev -``` - -## Usage - -```js -var omit = require('object.omit'); -``` - -Pass a string `key` to omit: - -```js -omit({a: 'a', b: 'b', c: 'c'}, 'a') -//=> { b: 'b', c: 'c' } -``` - -Pass an array of `keys` to omit: - -```js -omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c']) -//=> { b: 'b' } -``` - -Returns the object if no keys are passed: - -```js -omit({a: 'a', b: 'b', c: 'c'}) -//=> {a: 'a', b: 'b', c: 'c'} -``` - -Returns an empty object if no value is passed. - -```js -omit() -//=> {} -``` - -### Filter function - -An optional filter function may be passed as the last argument, with or without keys passed on the arguments: - -**filter on keys** - -```js -var res = omit({a: 'a', b: 'b', c: 'c'}, function (val, key) { - return key === 'a'; -}); -//=> {a: 'a'} -``` - -**filter on values** - -```js -var fn = function() {}; -var obj = {a: 'a', b: 'b', c: fn}; - -var res = omit(obj, ['a'], function (val, key) { - return typeof val !== 'function'; -}); -//=> {b: 'b'} -``` - -### Other awesome javascript/node.js utils - -* [object.filter](https://github.com/jonschlinkert/object.filter): Create a new object filtered to have only properties for which the callback returns true. -* [object.pick](https://github.com/jonschlinkert/object.pick): Returns a filtered copy of an object with only the specified keys, like `pick` from… [more](https://github.com/jonschlinkert/object.pick) -* [object.pluck](https://github.com/jonschlinkert/object.pluck): Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with… [more](https://github.com/jonschlinkert/object.pluck) -* [object.reduce](https://github.com/jonschlinkert/object.reduce): Reduces an object to a value that is the accumulated result of running each property… [more](https://github.com/jonschlinkert/object.reduce) -* [object.defaults](https://github.com/jonschlinkert/object.defaults): Like `extend` but only copies missing properties/values to the target object. - -## Runing tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/object.omit/issues/new) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2014-2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/index.js b/src/filesystem/impls/appshell/node/node_modules/object.omit/index.js deleted file mode 100644 index 576a578f88d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/object.omit/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/*! - * object.omit - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isObject = require('is-extendable'); -var forOwn = require('for-own'); - -module.exports = function omit(obj, keys) { - if (!isObject(obj)) return {}; - - var keys = [].concat.apply([], [].slice.call(arguments, 1)); - var last = keys[keys.length - 1]; - var res = {}, fn; - - if (typeof last === 'function') { - fn = keys.pop(); - } - - var isFunction = typeof fn === 'function'; - if (!keys.length && !isFunction) { - return obj; - } - - forOwn(obj, function (value, key) { - if (keys.indexOf(key) === -1) { - - if (!isFunction) { - res[key] = value; - } else if (fn(value, key, obj)) { - res[key] = value; - } - } - }); - return res; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/object.omit/package.json b/src/filesystem/impls/appshell/node/node_modules/object.omit/package.json deleted file mode 100644 index 526e7926b79..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/object.omit/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_args": [ - [ - "object.omit@^2.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "object.omit@>=2.0.0 <3.0.0", - "_id": "object.omit@2.0.0", - "_inCache": true, - "_installable": true, - "_location": "/object.omit", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "object.omit", - "raw": "object.omit@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz", - "_shasum": "868597333d54e60662940bb458605dd6ae12fe94", - "_shrinkwrap": null, - "_spec": "object.omit@^2.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/object.omit/issues" - }, - "dependencies": { - "for-own": "^0.1.3", - "is-extendable": "^0.1.1" - }, - "description": "Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument.", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "868597333d54e60662940bb458605dd6ae12fe94", - "tarball": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "6e222f2cf39634faa26f642b06af4eb2050b5e75", - "homepage": "https://github.com/jonschlinkert/object.omit", - "keywords": [ - "clear", - "delete", - "key", - "value", - "object", - "omit", - "property", - "remove" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "object.omit", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/object.omit.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "object.filter", - "object.pick", - "object.pluck", - "object.reduce", - "object.defaults" - ] - } - }, - "version": "2.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE b/src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE deleted file mode 100644 index 65f90aca8c2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/parse-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md b/src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md deleted file mode 100644 index 000ccd99cb4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/parse-glob/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# parse-glob [![NPM version](https://badge.fury.io/js/parse-glob.svg)](http://badge.fury.io/js/parse-glob) [![Build Status](https://travis-ci.org/jonschlinkert/parse-glob.svg)](https://travis-ci.org/jonschlinkert/parse-glob) - -> Parse a glob pattern into an object of tokens. - -**Changes from v1.0.0 to v3.0.4** - -* all path-related properties are now on the `path` object -* all boolean properties are now on the `is` object -* adds `base` property - -See the [properties](#properties) section for details. - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i parse-glob --save -``` - -* parses 1,000+ glob patterns in 29ms (2.3 GHz Intel Core i7) -* Extensive [unit tests](./test.js) (more than 1,000 lines), covering wildcards, globstars, character classes, brace patterns, extglobs, dotfiles and other complex patterns. - -See the tests for [hundreds of examples](./test.js). - -## Usage - -```js -var parseGlob = require('parse-glob'); -``` - -**Example** - -```js -parseGlob('a/b/c/**/*.{yml,json}'); -``` - -**Returns:** - -```js -{ orig: 'a/b/c/**/*.{yml,json}', - is: - { glob: true, - negated: false, - extglob: false, - braces: true, - brackets: false, - globstar: true, - dotfile: false, - dotdir: false }, - glob: '**/*.{yml,json}', - base: 'a/b/c', - path: - { dirname: 'a/b/c/**/', - basename: '*.{yml,json}', - filename: '*', - extname: '.{yml,json}', - ext: '{yml,json}' } } -``` - -## Properties - -The object returned by parseGlob has the following properties: - -* `orig`: a copy of the original, unmodified glob pattern -* `is`: an object with boolean information about the glob: - - `glob`: true if the pattern actually a glob pattern - - `negated`: true if it's a negation pattern (`!**/foo.js`) - - `extglob`: true if it has extglobs (`@(foo|bar)`) - - `braces`: true if it has braces (`{1..2}` or `.{txt,md}`) - - `brackets`: true if it has POSIX brackets (`[[:alpha:]]`) - - `globstar`: true if the pattern has a globstar (double star, `**`) - - `dotfile`: true if the pattern should match dotfiles - - `dotdir`: true if the pattern should match dot-directories (like `.git`) -* `glob`: the glob pattern part of the string, if any -* `base`: the non-glob part of the string, if any -* `path`: file path segments - - `dirname`: directory - - `basename`: file name with extension - - `filename`: file name without extension - - `extname`: file extension with dot - - `ext`: file extension without dot - -## Related -* [glob-base](https://www.npmjs.com/package/glob-base): Returns an object with the (non-glob) base path and the actual pattern. | [homepage](https://github.com/jonschlinkert/glob-base) -* [glob-parent](https://www.npmjs.com/package/glob-parent): Strips glob magic from a string to provide the parent path | [homepage](https://github.com/es128/glob-parent) -* [glob-path-regex](https://www.npmjs.com/package/glob-path-regex): Regular expression for matching the parts of glob pattern. | [homepage](https://github.com/regexps/glob-path-regex) -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern. | [homepage](https://github.com/jonschlinkert/is-glob) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/parse-glob/issues/new). - -## Tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2014-2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 22, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js b/src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js deleted file mode 100644 index 4ab691afc7d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/parse-glob/index.js +++ /dev/null @@ -1,156 +0,0 @@ -/*! - * parse-glob - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isGlob = require('is-glob'); -var findBase = require('glob-base'); -var extglob = require('is-extglob'); -var dotfile = require('is-dotfile'); - -/** - * Expose `cache` - */ - -var cache = module.exports.cache = {}; - -/** - * Parse a glob pattern into tokens. - * - * When no paths or '**' are in the glob, we use a - * different strategy for parsing the filename, since - * file names can contain braces and other difficult - * patterns. such as: - * - * - `*.{a,b}` - * - `(**|*.js)` - */ - -module.exports = function parseGlob(glob) { - if (cache.hasOwnProperty(glob)) { - return cache[glob]; - } - - var tok = {}; - tok.orig = glob; - tok.is = {}; - - // unescape dots and slashes in braces/brackets - glob = escape(glob); - - var parsed = findBase(glob); - tok.is.glob = parsed.isGlob; - - tok.glob = parsed.glob; - tok.base = parsed.base; - var segs = /([^\/]*)$/.exec(glob); - - tok.path = {}; - tok.path.dirname = ''; - tok.path.basename = segs[1] || ''; - tok.path.dirname = glob.split(tok.path.basename).join('') || ''; - var basename = (tok.path.basename || '').split('.') || ''; - tok.path.filename = basename[0] || ''; - tok.path.extname = basename.slice(1).join('.') || ''; - tok.path.ext = ''; - - if (isGlob(tok.path.dirname) && !tok.path.basename) { - if (!/\/$/.test(tok.glob)) { - tok.path.basename = tok.glob; - } - tok.path.dirname = tok.base; - } - - if (glob.indexOf('/') === -1 && !tok.is.globstar) { - tok.path.dirname = ''; - tok.path.basename = tok.orig; - } - - var dot = tok.path.basename.indexOf('.'); - if (dot !== -1) { - tok.path.filename = tok.path.basename.slice(0, dot); - tok.path.extname = tok.path.basename.slice(dot); - } - - if (tok.path.extname.charAt(0) === '.') { - var exts = tok.path.extname.split('.'); - tok.path.ext = exts[exts.length - 1]; - } - - // unescape dots and slashes in braces/brackets - tok.glob = unescape(tok.glob); - tok.path.dirname = unescape(tok.path.dirname); - tok.path.basename = unescape(tok.path.basename); - tok.path.filename = unescape(tok.path.filename); - tok.path.extname = unescape(tok.path.extname); - - // Booleans - var is = (glob && tok.is.glob); - tok.is.negated = glob && glob.charAt(0) === '!'; - tok.is.extglob = glob && extglob(glob); - tok.is.braces = has(is, glob, '{'); - tok.is.brackets = has(is, glob, '[:'); - tok.is.globstar = has(is, glob, '**'); - tok.is.dotfile = dotfile(tok.path.basename) || dotfile(tok.path.filename); - tok.is.dotdir = dotdir(tok.path.dirname); - return (cache[glob] = tok); -} - -/** - * Returns true if the glob matches dot-directories. - * - * @param {Object} `tok` The tokens object - * @param {Object} `path` The path object - * @return {Object} - */ - -function dotdir(base) { - if (base.indexOf('/.') !== -1) { - return true; - } - if (base.charAt(0) === '.' && base.charAt(1) !== '/') { - return true; - } - return false; -} - -/** - * Returns true if the pattern has the given `ch`aracter(s) - * - * @param {Object} `glob` The glob pattern. - * @param {Object} `ch` The character to test for - * @return {Object} - */ - -function has(is, glob, ch) { - return is && glob.indexOf(ch) !== -1; -} - -/** - * Escape/unescape utils - */ - -function escape(str) { - var re = /\{([^{}]*?)}|\(([^()]*?)\)|\[([^\[\]]*?)\]/g; - return str.replace(re, function (outter, braces, parens, brackets) { - var inner = braces || parens || brackets; - if (!inner) { return outter; } - return outter.split(inner).join(esc(inner)); - }); -} - -function esc(str) { - str = str.split('/').join('__SLASH__'); - str = str.split('.').join('__DOT__'); - return str; -} - -function unescape(str) { - str = str.split('__SLASH__').join('/'); - str = str.split('__DOT__').join('.'); - return str; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json b/src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json deleted file mode 100644 index fef76859f5b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/parse-glob/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_args": [ - [ - "parse-glob@^3.0.4", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "parse-glob@>=3.0.4 <4.0.0", - "_id": "parse-glob@3.0.4", - "_inCache": true, - "_installable": true, - "_location": "/parse-glob", - "_nodeVersion": "0.12.4", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.10.1", - "_phantomChildren": {}, - "_requested": { - "name": "parse-glob", - "raw": "parse-glob@^3.0.4", - "rawSpec": "^3.0.4", - "scope": null, - "spec": ">=3.0.4 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "_shasum": "b2c376cfb11f35513badd173ef0bb6e3a388391c", - "_shrinkwrap": null, - "_spec": "parse-glob@^3.0.4", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/parse-glob/issues" - }, - "dependencies": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "description": "Parse a glob pattern into an object of tokens.", - "devDependencies": { - "browserify": "^9.0.3", - "lodash": "^3.3.1", - "mocha": "*" - }, - "directories": {}, - "dist": { - "shasum": "b2c376cfb11f35513badd173ef0bb6e3a388391c", - "tarball": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "9bfccb63acdeb3b1ed62035b3adef0e5081d8fc6", - "homepage": "https://github.com/jonschlinkert/parse-glob", - "keywords": [ - "glob", - "match", - "bash", - "expand", - "expansion", - "expression", - "file", - "files", - "filter", - "find", - "glob", - "globbing", - "globs", - "globstar", - "match", - "matcher", - "matches", - "matching", - "path", - "pattern", - "patterns", - "regex", - "regexp", - "regular", - "shell", - "wildcard" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "parse-glob", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/parse-glob.git" - }, - "scripts": { - "prepublish": "browserify -o browser.js -e index.js", - "test": "mocha" - }, - "version": "3.0.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js deleted file mode 100644 index 19f103f908a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -}; - -function win32(path) { - // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = !!device && device.charAt(1) !== ':'; - - // UNC paths are always absolute - return !!result[2] || isUnc; -}; - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license deleted file mode 100644 index 654d0bfe943..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json deleted file mode 100644 index 5544235057e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "path-is-absolute@^1.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "path-is-absolute@>=1.0.0 <2.0.0", - "_id": "path-is-absolute@1.0.0", - "_inCache": true, - "_installable": true, - "_location": "/path-is-absolute", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "path-is-absolute", - "raw": "path-is-absolute@^1.0.0", - "rawSpec": "^1.0.0", - "scope": null, - "spec": ">=1.0.0 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar" - ], - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", - "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "_shrinkwrap": null, - "_spec": "path-is-absolute@^1.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "dependencies": {}, - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", - "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", - "homepage": "https://github.com/sindresorhus/path-is-absolute", - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "path-is-absolute", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-is-absolute.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md b/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md deleted file mode 100644 index cdf94f4309a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/path-is-absolute/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) - -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill - -> Ponyfill: A polyfill that doesn't overwrite the native method - - -## Install - -``` -$ npm install --save path-is-absolute -``` - - -## Usage - -```js -var pathIsAbsolute = require('path-is-absolute'); - -// Linux -pathIsAbsolute('/home/foo'); -//=> true - -// Windows -pathIsAbsolute('C:/Users/'); -//=> true - -// Any OS -pathIsAbsolute.posix('/home/foo'); -//=> true -``` - - -## API - -See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). - -### pathIsAbsolute(path) - -### pathIsAbsolute.posix(path) - -The Posix specific version. - -### pathIsAbsolute.win32(path) - -The Windows specific version. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes b/src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes deleted file mode 100644 index 759c2c5afdc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/.gitattributes +++ /dev/null @@ -1,14 +0,0 @@ -# Enforce Unix newlines -*.* text eol=lf -*.css text eol=lf -*.html text eol=lf -*.js text eol=lf -*.json text eol=lf -*.less text eol=lf -*.md text eol=lf -*.yml text eol=lf - -*.jpg binary -*.gif binary -*.png binary -*.jpeg binary \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc b/src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc deleted file mode 100644 index e72045d2b3d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/.jshintrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "asi": false, - "boss": true, - "curly": true, - "eqeqeq": true, - "eqnull": true, - "esnext": true, - "immed": true, - "latedef": true, - "laxcomma": false, - "newcap": true, - "noarg": true, - "node": true, - "sub": true, - "undef": true, - "unused": true, - "globals": { - "define": true, - "before": true, - "after": true, - "describe": true, - "it": true - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore b/src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore deleted file mode 100644 index 1a2e47f0da0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/.npmignore +++ /dev/null @@ -1,53 +0,0 @@ -# Numerous always-ignore extensions -*.csv -*.dat -*.diff -*.err -*.gz -*.log -*.orig -*.out -*.pid -*.rar -*.rej -*.seed -*.swo -*.swp -*.vi -*.yo-rc.json -*.zip -*~ -.ruby-version -lib-cov -npm-debug.log - -# Always-ignore dirs -/bower_components/ -/node_modules/ -/temp/ -/tmp/ -/vendor/ -_gh_pages - -# OS or Editor folders -*.esproj -*.komodoproject -.komodotools -*.sublime-* -._* -.cache -.DS_Store -.idea -.project -.settings -.tmproj -nbproject -Thumbs.db - -# grunt-html-validation -validation-status.json -validation-report.json - -# misc -TODO.md -benchmark \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml deleted file mode 100644 index ff74a054e07..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - '0.10' \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md b/src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md deleted file mode 100644 index 72344a9eb30..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/.verb.md +++ /dev/null @@ -1,59 +0,0 @@ -# {%= name %} {%= badge("fury") %} - -> {%= description %} - -Useful for protecting tokens, like templates in HTML, from being mutated when the string is transformed in some way, like from a formatter/beautifier. - -**Example without `preserve`** - -Let's say you want to use [js-beautify] on a string of html with Lo-Dash/Underscore templates, such as: `

  • <%= name %>
`: - -js-beautify will render the template unusable (and apply incorrect formatting because of the unfamiliar syntax from the Lo-Dash template): - -```html -
    -
  • - <%=n ame %> -
  • -
-``` - -**Example with `preserve`** - -Correct. - -```html -
    -
  • <%= name %>
  • -
-``` - -For the record, this is just a random example, I've had very few issues with js-beautify in general. But with or without js-beautify, this kind of token mangling does happen sometimes when you use formatters, beautifiers or similar tools. - -## Install -{%= include("install-npm", {save: true}) %} - -## Run tests - -```bash -npm test -``` - -## API -{%= apidocs("index.js") %} - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %}) - -## Author -{%= include("author") %} - -## License -{%= copyright() %} -{%= license() %} - -*** - -{%= include("footer") %} - -[js-beautify]: https://github.com/beautify-web/js-beautify \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE b/src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE deleted file mode 100644 index 5a9956a75dd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/README.md b/src/filesystem/impls/appshell/node/node_modules/preserve/README.md deleted file mode 100644 index 75000b93349..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# preserve [![NPM version](https://badge.fury.io/js/preserve.svg)](http://badge.fury.io/js/preserve) - -> Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string. - -Useful for protecting tokens, like templates in HTML, from being mutated when the string is transformed in some way, like from a formatter/beautifier. - -**Example without `preserve`** - -Let's say you want to use [js-beautify] on a string of html with Lo-Dash/Underscore templates, such as: `
  • <%= name %>
`: - -js-beautify will render the template unusable (and apply incorrect formatting because of the unfamiliar syntax from the Lo-Dash template): - -```html -
    -
  • - <%=n ame %> -
  • -
-``` - -**Example with `preserve`** - -Correct. - -```html -
    -
  • <%= name %>
  • -
-``` - -For the record, this is just a random example, I've had very few issues with js-beautify in general. But with or without js-beautify, this kind of token mangling does happen sometimes when you use formatters, beautifiers or similar tools. - -## Install -## Install with [npm](npmjs.org) - -```bash -npm i preserve --save -``` - -## Run tests - -```bash -npm test -``` - -## API -### [.before](index.js#L23) - -Replace tokens in `str` with a temporary, heuristic placeholder. - -* `str` **{String}** -* `returns` **{String}**: String with placeholders. - -```js -tokens.before('{a\\,b}'); -//=> '{__ID1__}' -``` - -### [.after](index.js#L44) - -Replace placeholders in `str` with original tokens. - -* `str` **{String}**: String with placeholders -* `returns` **{String}** `str`: String with original tokens. - -```js -tokens.after('{__ID1__}'); -//=> '{a\\,b}' -``` - - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/preserve/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015-2015, Jon Schlinkert. -Released under the MIT license - -*** - -_This file was generated by [verb](https://github.com/assemble/verb) on January 10, 2015._ - -[js-beautify]: https://github.com/beautify-web/js-beautify \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/index.js b/src/filesystem/impls/appshell/node/node_modules/preserve/index.js deleted file mode 100644 index a6c5d481d45..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/*! - * preserve - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -/** - * Replace tokens in `str` with a temporary, heuristic placeholder. - * - * ```js - * tokens.before('{a\\,b}'); - * //=> '{__ID1__}' - * ``` - * - * @param {String} `str` - * @return {String} String with placeholders. - * @api public - */ - -exports.before = function before(str, re) { - return str.replace(re, function (match) { - var id = randomize(); - cache[id] = match; - return '__ID' + id + '__'; - }); -}; - -/** - * Replace placeholders in `str` with original tokens. - * - * ```js - * tokens.after('{__ID1__}'); - * //=> '{a\\,b}' - * ``` - * - * @param {String} `str` String with placeholders - * @return {String} `str` String with original tokens. - * @api public - */ - -exports.after = function after(str) { - return str.replace(/__ID(.{5})__/g, function (_, id) { - return cache[id]; - }); -}; - -function randomize() { - return Math.random().toString().slice(2, 7); -} - -var cache = {}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/package.json b/src/filesystem/impls/appshell/node/node_modules/preserve/package.json deleted file mode 100644 index f20c0591bde..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_args": [ - [ - "preserve@^0.2.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces" - ] - ], - "_from": "preserve@>=0.2.0 <0.3.0", - "_id": "preserve@0.2.0", - "_inCache": true, - "_installable": true, - "_location": "/preserve", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "name": "preserve", - "raw": "preserve@^0.2.0", - "rawSpec": "^0.2.0", - "scope": null, - "spec": ">=0.2.0 <0.3.0", - "type": "range" - }, - "_requiredBy": [ - "/braces" - ], - "_resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "_shasum": "815ed1f6ebc65926f865b310c0713bcb3315ce4b", - "_shrinkwrap": null, - "_spec": "preserve@^0.2.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/preserve/issues" - }, - "dependencies": {}, - "description": "Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string.", - "devDependencies": { - "benchmarked": "^0.1.3", - "chalk": "^0.5.1", - "js-beautify": "^1.5.4", - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "815ed1f6ebc65926f865b310c0713bcb3315ce4b", - "tarball": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "gitHead": "1bf405d35e4aea06a2ee83db2d34dc54abc0a1f9", - "homepage": "https://github.com/jonschlinkert/preserve", - "keywords": [ - "escape", - "format", - "placeholder", - "placeholders", - "prettify", - "regex", - "replace", - "template", - "templates", - "token", - "tokens" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/preserve/blob/master/LICENSE-MIT" - }, - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "preserve", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/preserve.git" - }, - "scripts": { - "test": "mocha -R spec" - }, - "version": "0.2.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/preserve/test.js b/src/filesystem/impls/appshell/node/node_modules/preserve/test.js deleted file mode 100644 index 9bf174f121c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/preserve/test.js +++ /dev/null @@ -1,48 +0,0 @@ -/*! - * preserve - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License - */ - -'use strict'; - -var should = require('should'); -var tokens = require('./'); - -var re = /<%=\s*[^>]+%>/g; -var pretty = function(str) { - return require('js-beautify').html(str, { - indent_char: ' ', - indent_size: 2, - }); -}; - -describe('preserve tokens', function () { - var testRe = /__ID.{5}__\n__ID.{5}__\n__ID.{5}__/; - var re = /<%=\s*[^>]+%>/g; - - it('should (e.g. shouldn\'t, but will) mangle tokens in the given string', function () { - var html = pretty('
  • <%= name %>
'); - html.should.equal('
    \n
  • \n <%=n ame %>\n
  • \n
'); - }); - - it('should preserve tokens in the given string', function () { - var html = tokens.after(pretty(tokens.before('
  • <%= name %>
', re))); - html.should.equal('
    \n
  • <%= name %>
  • \n
'); - }); - - describe('.before()', function () { - it('should replace matches with placeholder tokens:', function () { - tokens.before('<%= a %>\n<%= b %>\n<%= c %>', re).should.match(testRe); - }); - }); - - describe('tokens.after()', function () { - it('should replace placeholder tokens with original values:', function () { - var before = tokens.before('<%= a %>\n<%= b %>\n<%= c %>', re); - before.should.match(testRe); - tokens.after(before).should.equal('<%= a %>\n<%= b %>\n<%= c %>'); - }); - }); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml deleted file mode 100644 index 36201b10017..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.11" - - "0.12" - - "1.7.1" - - 1 - - 2 - - 3 - - 4 - - 5 diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js deleted file mode 100644 index a4f40f845fa..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md deleted file mode 100644 index c67e3532b54..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json deleted file mode 100644 index 8d87a648309..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "process-nextick-args@~1.0.6", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream" - ] - ], - "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_id": "process-nextick-args@1.0.7", - "_inCache": true, - "_installable": true, - "_location": "/process-nextick-args", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" - }, - "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "name": "process-nextick-args", - "raw": "process-nextick-args@~1.0.6", - "rawSpec": "~1.0.6", - "scope": null, - "spec": ">=1.0.6 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "_shrinkwrap": null, - "_spec": "process-nextick-args@~1.0.6", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream", - "author": "", - "bugs": { - "url": "https://github.com/calvinmetcalf/process-nextick-args/issues" - }, - "dependencies": {}, - "description": "process.nextTick but always with args", - "devDependencies": { - "tap": "~0.2.6" - }, - "directories": {}, - "dist": { - "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", - "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", - "homepage": "https://github.com/calvinmetcalf/process-nextick-args", - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - } - ], - "name": "process-nextick-args", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/calvinmetcalf/process-nextick-args.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.7" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md deleted file mode 100644 index 78e7cfaeb7a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -process-nextick-args -===== - -[![Build Status](https://travis-ci.org/calvinmetcalf/process-nextick-args.svg?branch=master)](https://travis-ci.org/calvinmetcalf/process-nextick-args) - -```bash -npm install --save process-nextick-args -``` - -Always be able to pass arguments to process.nextTick, no matter the platform - -```js -var nextTick = require('process-nextick-args'); - -nextTick(function (a, b, c) { - console.log(a, b, c); -}, 'step', 3, 'profit'); -``` diff --git a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js b/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js deleted file mode 100644 index ef15721584a..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/process-nextick-args/test.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require("tap").test; -var nextTick = require('./'); - -test('should work', function (t) { - t.plan(5); - nextTick(function (a) { - t.ok(a); - nextTick(function (thing) { - t.equals(thing, 7); - }, 7); - }, true); - nextTick(function (a, b, c) { - t.equals(a, 'step'); - t.equals(b, 3); - t.equals(c, 'profit'); - }, 'step', 3, 'profit'); -}); - -test('correct number of arguments', function (t) { - t.plan(1); - nextTick(function () { - t.equals(2, arguments.length, 'correct number'); - }, 1, 2); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE b/src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE deleted file mode 100755 index 6d53705b125..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/randomatic/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/README.md b/src/filesystem/impls/appshell/node/node_modules/randomatic/README.md deleted file mode 100644 index 28b1ae03131..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/randomatic/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# randomatic [![NPM version](https://img.shields.io/npm/v/randomatic.svg)](https://www.npmjs.com/package/randomatic) - -> Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i randomatic --save -``` - -Install with [bower](http://bower.io/) - -```sh -$ bower install randomatic --save -``` - -## Usage - -```js -var randomize = require('randomatic'); -``` - -## API - -```js -randomize(pattern, length, options); -``` - -* `pattern` **{String}**: The pattern to use for randomizing -* `length` **{Object}**: The length of the string to generate - -### pattern - -> The pattern to use for randomizing - -Patterns can contain any combination of the below characters, specified in any order. - -**Example:** - -To generate a 10-character randomized string using all available characters: - -```js -randomize('*', 10); -//=> - -randomize('Aa0!', 10); -//=> -``` - -* `a`: Lowercase alpha characters (`abcdefghijklmnopqrstuvwxyz'`) -* `A`: Uppercase alpha characters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ'`) -* `0`: Numeric characters (`0123456789'`) -* `!`: Special characters (`~!@#$%^&()_+-={}[];\',.`) -* `*`: All characters (all of the above combined) -* `?`: Custom characters (pass a string of custom characters to the options) - -### length - -> the length of the string to generate - -**Examples:** - -* `randomize('A', 5)` will generate a 5-character, uppercase, alphabetical, randomized string, e.g. `KDJWJ`. -* `randomize('0', 2)` will generate a 2-digit random number -* `randomize('0', 3)` will generate a 3-digit random number -* `randomize('0', 12)` will generate a 12-digit random number -* `randomize('A0', 16)` will generate a 16-character, alpha-numeric randomized string - -If `length` is left undefined, the length of the pattern in the first parameter will be used. For example: - -+ `randomize('00')` will generate a 2-digit random number -* `randomize('000')` will generate a 3-digit random number -* `randomize('0000')` will generate a 4-digit random number... -* `randomize('AAAAA')` will generate a 5-character, uppercase alphabetical random string... - -These are just examples, [see the tests](./test.js) for more use cases and examples. - -## options - -#### chars - -Type: `String` - -Default: `undefined` - -Define a custom string to be randomized. - -**Example:** - -* `randomize('?', 20, {chars: 'jonschlinkert'})` will generate a 20-character randomized string from the letters contained in `jonschlinkert`. -* `randomize('?', {chars: 'jonschlinkert'})` will generate a 13-character randomized string from the letters contained in `jonschlinkert`. - -## Usage Examples - -* `randomize('A', 4)` (_whitespace insenstive_) would result in randomized 4-digit uppercase letters, like, `ZAKH`, `UJSL`... etc. -* `randomize('AAAA')` is equivelant to `randomize('A', 4)` -* `randomize('AAA0')` and `randomize('AA00')` and `randomize('A0A0')` are equivelant to `randomize('A0', 4)` -* `randomize('aa')`: results in double-digit, randomized, lower-case letters (`abcdefghijklmnopqrstuvwxyz`) -* `randomize('AAA')`: results in triple-digit, randomized, upper-case letters (`ABCDEFGHIJKLMNOPQRSTUVWXYZ`) -* `randomize('0', 6)`: results in six-digit, randomized nubmers (`0123456789`) -* `randomize('!', 5)`: results in single-digit randomized, _valid_ non-letter characters (`~!@#$%^&()_+-={}[];\',.`) -* `randomize('A!a0', 9)`: results in nine-digit, randomized characters (any of the above) - -_The order in which the characters are defined is insignificant._ - -## Related - -* [pad-left](https://www.npmjs.com/package/pad-left): Left pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-left) -* [pad-right](https://www.npmjs.com/package/pad-right): Right pad a string with zeros or a specified string. Fastest implementation. | [homepage](https://github.com/jonschlinkert/pad-right) -* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/randomatic/issues/new). - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert) -Released under the MIT license. - -*** - -_This file was generated by [verb](https://github.com/verbose/verb) on December 10, 2015._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/index.js b/src/filesystem/impls/appshell/node/node_modules/randomatic/index.js deleted file mode 100644 index 85dbe21ca98..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/randomatic/index.js +++ /dev/null @@ -1,83 +0,0 @@ -/*! - * randomatic - * - * This was originally inspired by - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License (MIT) - */ - -'use strict'; - -var isNumber = require('is-number'); -var typeOf = require('kind-of'); - -/** - * Expose `randomatic` - */ - -module.exports = randomatic; - -/** - * Available mask characters - */ - -var type = { - lower: 'abcdefghijklmnopqrstuvwxyz', - upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - number: '0123456789', - special: '~!@#$%^&()_+-={}[];\',.' -}; - -type.all = type.lower + type.upper + type.number; - -/** - * Generate random character sequences of a specified `length`, - * based on the given `pattern`. - * - * @param {String} `pattern` The pattern to use for generating the random string. - * @param {String} `length` The length of the string to generate. - * @param {String} `options` - * @return {String} - * @api public - */ - -function randomatic(pattern, length, options) { - if (typeof pattern === 'undefined') { - throw new Error('randomatic expects a string or number.'); - } - - var custom = false; - if (arguments.length === 1) { - if (typeof pattern === 'string') { - length = pattern.length; - - } else if (isNumber(pattern)) { - options = {}; length = pattern; pattern = '*'; - } - } - - if (typeOf(length) === 'object' && length.hasOwnProperty('chars')) { - options = length; - pattern = options.chars; - length = pattern.length; - custom = true; - } - - var opts = options || {}; - var mask = ''; - var res = ''; - - // Characters to be used - if (pattern.indexOf('?') !== -1) mask += opts.chars; - if (pattern.indexOf('a') !== -1) mask += type.lower; - if (pattern.indexOf('A') !== -1) mask += type.upper; - if (pattern.indexOf('0') !== -1) mask += type.number; - if (pattern.indexOf('!') !== -1) mask += type.special; - if (pattern.indexOf('*') !== -1) mask += type.all; - if (custom) mask += pattern; - - while (length--) { - res += mask.charAt(parseInt(Math.random() * mask.length, 10)); - } - return res; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/randomatic/package.json b/src/filesystem/impls/appshell/node/node_modules/randomatic/package.json deleted file mode 100644 index 5794197712b..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/randomatic/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - "randomatic@^1.1.3", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" - ] - ], - "_from": "randomatic@>=1.1.3 <2.0.0", - "_id": "randomatic@1.1.5", - "_inCache": true, - "_installable": true, - "_location": "/randomatic", - "_nodeVersion": "5.0.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.3.6", - "_phantomChildren": {}, - "_requested": { - "name": "randomatic", - "raw": "randomatic@^1.1.3", - "rawSpec": "^1.1.3", - "scope": null, - "spec": ">=1.1.3 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fill-range" - ], - "_resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz", - "_shasum": "5e9ef5f2d573c67bd2b8124ae90b5156e457840b", - "_shrinkwrap": null, - "_spec": "randomatic@^1.1.3", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/randomatic/issues" - }, - "dependencies": { - "is-number": "^2.0.2", - "kind-of": "^3.0.2" - }, - "description": "Generate randomized strings of a specified length, fast. Only the length is necessary, but you can optionally generate patterns using any combination of numeric, alpha-numeric, alphabetical, special or custom characters.", - "devDependencies": { - "ansi-bold": "^0.1.1", - "benchmarked": "^0.1.4", - "glob": "^5.0.15", - "mocha": "*", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "5e9ef5f2d573c67bd2b8124ae90b5156e457840b", - "tarball": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz" - }, - "files": [ - "index.js" - ], - "gitHead": "8d74759d683a580412484e95ec5f1b87d93fd50c", - "homepage": "https://github.com/jonschlinkert/randomatic", - "keywords": [ - "alpha", - "alpha-numeric", - "alphanumeric", - "characters", - "chars", - "numeric", - "rand", - "random", - "randomize", - "randomized" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "randomatic", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/randomatic.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "repeat-string", - "pad-left", - "pad-right" - ] - } - }, - "version": "1.1.5" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore b/src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore deleted file mode 100644 index 265ff739e07..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js -.zuul.yml -.nyc_output -coverage diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml deleted file mode 100644 index ae0156a9bbb..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,54 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - npm install -g npm -notifications: - email: false -matrix: - fast_finish: true - allow_failures: - - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - include: - - node_js: '0.8' - env: TASK=test - - node_js: '0.10' - env: TASK=test - - node_js: '0.11' - env: TASK=test - - node_js: '0.12' - env: TASK=test - - node_js: 1 - env: TASK=test - - node_js: 2 - env: TASK=test - - node_js: 3 - env: TASK=test - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 5 - env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=ipad BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=iphone BROWSER_VERSION="6.0..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 5 - env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE b/src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695a4c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md b/src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md deleted file mode 100644 index 2233732a9ba..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# readable-stream - -***Node-core v6.1.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core, including [documentation](doc/stream.md). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams WG Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md b/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md deleted file mode 100644 index c907ca0e7b7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/stream.md +++ /dev/null @@ -1,1772 +0,0 @@ -# Stream - - Stability: 2 - Stable - -A stream is an abstract interface implemented by various objects in -Node.js. For example a [request to an HTTP server][http-incoming-message] is a -stream, as is [`process.stdout`][]. Streams are readable, writable, or both. All -streams are instances of [`EventEmitter`][]. - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for [Readable][] streams, [Writable][] -streams, [Duplex][] streams, and [Transform][] streams. - -This document is split up into 3 sections: - -1. The first section explains the parts of the API that you need to be - aware of to use streams in your programs. -2. The second section explains the parts of the API that you need to - use if you implement your own custom streams yourself. The API is designed to - make this easy for you to do. -3. The third section goes into more depth about how streams work, - including some of the internal mechanisms and functions that you - should probably not modify unless you definitely know what you are - doing. - - -## API for Stream Consumers - - - -Streams can be either [Readable][], [Writable][], or both ([Duplex][]). - -All streams are EventEmitters, but they also have other custom methods -and properties depending on whether they are Readable, Writable, or -Duplex. - -If a stream is both Readable and Writable, then it implements all of -the methods and events. So, a [Duplex][] or [Transform][] stream is -fully described by this API, though their implementation may be -somewhat different. - -It is not necessary to implement Stream interfaces in order to consume -streams in your programs. If you **are** implementing streaming -interfaces in your own program, please also refer to -[API for Stream Implementors][]. - -Almost all Node.js programs, no matter how simple, use Streams in some -way. Here is an example of using Streams in an Node.js program: - -```js -const http = require('http'); - -var server = http.createServer( (req, res) => { - // req is an http.IncomingMessage, which is a Readable Stream - // res is an http.ServerResponse, which is a Writable Stream - - var body = ''; - // we want to get the data as utf8 strings - // If you don't set an encoding, then you'll get Buffer objects - req.setEncoding('utf8'); - - // Readable streams emit 'data' events once a listener is added - req.on('data', (chunk) => { - body += chunk; - }); - - // the end event tells you that you have entire body - req.on('end', () => { - try { - var data = JSON.parse(body); - } catch (er) { - // uh oh! bad json! - res.statusCode = 400; - return res.end(`error: ${er.message}`); - } - - // write back something interesting to the user: - res.write(typeof data); - res.end(); - }); -}); - -server.listen(1337); - -// $ curl localhost:1337 -d '{}' -// object -// $ curl localhost:1337 -d '"foo"' -// string -// $ curl localhost:1337 -d 'not json' -// error: Unexpected token o -``` - -### Class: stream.Duplex - -Duplex streams are streams that implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Duplex streams include: - -* [TCP sockets][] -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Readable - - - -The Readable stream interface is the abstraction for a *source* of -data that you are reading from. In other words, data comes *out* of a -Readable stream. - -A Readable stream will not start emitting data until you indicate that -you are ready to receive it. - -Readable streams have two "modes": a **flowing mode** and a **paused -mode**. When in flowing mode, data is read from the underlying system -and provided to your program as fast as possible. In paused mode, you -must explicitly call [`stream.read()`][stream-read] to get chunks of data out. -Streams start out in paused mode. - -**Note**: If no data event handlers are attached, and there are no -[`stream.pipe()`][] destinations, and the stream is switched into flowing -mode, then data will be lost. - -You can switch to flowing mode by doing any of the following: - -* Adding a [`'data'`][] event handler to listen for data. -* Calling the [`stream.resume()`][stream-resume] method to explicitly open the - flow. -* Calling the [`stream.pipe()`][] method to send the data to a [Writable][]. - -You can switch back to paused mode by doing either of the following: - -* If there are no pipe destinations, by calling the - [`stream.pause()`][stream-pause] method. -* If there are pipe destinations, by removing any [`'data'`][] event - handlers, and removing all pipe destinations by calling the - [`stream.unpipe()`][] method. - -Note that, for backwards compatibility reasons, removing [`'data'`][] -event handlers will **not** automatically pause the stream. Also, if -there are piped destinations, then calling [`stream.pause()`][stream-pause] will -not guarantee that the stream will *remain* paused once those -destinations drain and ask for more data. - -Examples of readable streams include: - -* [HTTP responses, on the client][http-incoming-message] -* [HTTP requests, on the server][http-incoming-message] -* [fs read streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdout and stderr][] -* [`process.stdin`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file -descriptor, for example) have been closed. The event indicates that -no more events will be emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event as the `'close'` event is -optional. - -#### Event: 'data' - -* `chunk` {Buffer|String} The chunk of data. - -Attaching a `'data'` event listener to a stream that has not been -explicitly paused will switch the stream into flowing mode. Data will -then be passed as soon as it is available. - -If you just want to get all the data out of the stream as fast as -possible, this is the best way to do so. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -``` - -#### Event: 'end' - -This event fires when there will be no more data to read. - -Note that the `'end'` event **will not fire** unless the data is -completely consumed. This can be done by switching into flowing mode, -or by calling [`stream.read()`][stream-read] repeatedly until you get to the -end. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); -}); -readable.on('end', () => { - console.log('there will be no more data.'); -}); -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error receiving data. - -#### Event: 'readable' - -When a chunk of data can be read from the stream, it will emit a -`'readable'` event. - -In some cases, listening for a `'readable'` event will cause some data -to be read into the internal buffer from the underlying system, if it -hadn't already. - -```javascript -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - // there is some data to read now -}); -``` - -Once the internal buffer is drained, a `'readable'` event will fire -again when more data is available. - -The `'readable'` event is not emitted in the "flowing" mode with the -sole exception of the last one, on end-of-stream. - -The `'readable'` event indicates that the stream has new information: -either new data is available or the end of the stream has been reached. -In the former case, [`stream.read()`][stream-read] will return that data. In the -latter case, [`stream.read()`][stream-read] will return null. For instance, in -the following example, `foo.txt` is an empty file: - -```js -const fs = require('fs'); -var rr = fs.createReadStream('foo.txt'); -rr.on('readable', () => { - console.log('readable:', rr.read()); -}); -rr.on('end', () => { - console.log('end'); -}); -``` - -The output of running this script is: - -``` -$ node test.js -readable: null -end -``` - -#### readable.isPaused() - -* Return: {Boolean} - -This method returns whether or not the `readable` has been **explicitly** -paused by client code (using [`stream.pause()`][stream-pause] without a -corresponding [`stream.resume()`][stream-resume]). - -```js -var readable = new stream.Readable - -readable.isPaused() // === false -readable.pause() -readable.isPaused() // === true -readable.resume() -readable.isPaused() // === false -``` - -#### readable.pause() - -* Return: `this` - -This method will cause a stream in flowing mode to stop emitting -[`'data'`][] events, switching out of flowing mode. Any data that becomes -available will remain in the internal buffer. - -```js -var readable = getReadableStreamSomehow(); -readable.on('data', (chunk) => { - console.log('got %d bytes of data', chunk.length); - readable.pause(); - console.log('there will be no more data for 1 second'); - setTimeout(() => { - console.log('now data will start flowing again'); - readable.resume(); - }, 1000); -}); -``` - -#### readable.pipe(destination[, options]) - -* `destination` {stream.Writable} The destination for writing data -* `options` {Object} Pipe options - * `end` {Boolean} End the writer when the reader ends. Default = `true` - -This method pulls all the data out of a readable stream, and writes it -to the supplied destination, automatically managing the flow so that -the destination is not overwhelmed by a fast readable stream. - -Multiple destinations can be piped to safely. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt' -readable.pipe(writable); -``` - -This function returns the destination stream, so you can set up pipe -chains like so: - -```js -var r = fs.createReadStream('file.txt'); -var z = zlib.createGzip(); -var w = fs.createWriteStream('file.txt.gz'); -r.pipe(z).pipe(w); -``` - -For example, emulating the Unix `cat` command: - -```js -process.stdin.pipe(process.stdout); -``` - -By default [`stream.end()`][stream-end] is called on the destination when the -source stream emits [`'end'`][], so that `destination` is no longer writable. -Pass `{ end: false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - -```js -reader.pipe(writer, { end: false }); -reader.on('end', () => { - writer.end('Goodbye\n'); -}); -``` - -Note that [`process.stderr`][] and [`process.stdout`][] are never closed until -the process exits, regardless of the specified options. - -#### readable.read([size]) - -* `size` {Number} Optional argument to specify how much data to read. -* Return {String|Buffer|Null} - -The `read()` method pulls some data out of the internal buffer and -returns it. If there is no data available, then it will return -`null`. - -If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`, -unless we've ended, in which case it will return the data remaining -in the buffer. - -If you do not specify a `size` argument, then it will return all the -data in the internal buffer. - -This method should only be called in paused mode. In flowing mode, -this method is called automatically until the internal buffer is -drained. - -```js -var readable = getReadableStreamSomehow(); -readable.on('readable', () => { - var chunk; - while (null !== (chunk = readable.read())) { - console.log('got %d bytes of data', chunk.length); - } -}); -``` - -If this method returns a data chunk, then it will also trigger the -emission of a [`'data'`][] event. - -Note that calling [`stream.read([size])`][stream-read] after the [`'end'`][] -event has been triggered will return `null`. No runtime error will be raised. - -#### readable.resume() - -* Return: `this` - -This method will cause the readable stream to resume emitting [`'data'`][] -events. - -This method will switch the stream into flowing mode. If you do *not* -want to consume the data from a stream, but you *do* want to get to -its [`'end'`][] event, you can call [`stream.resume()`][stream-resume] to open -the flow of data. - -```js -var readable = getReadableStreamSomehow(); -readable.resume(); -readable.on('end', () => { - console.log('got to the end, but did not read anything'); -}); -``` - -#### readable.setEncoding(encoding) - -* `encoding` {String} The encoding to use. -* Return: `this` - -Call this function to cause the stream to return strings of the specified -encoding instead of Buffer objects. For example, if you do -`readable.setEncoding('utf8')`, then the output data will be interpreted as -UTF-8 data, and returned as strings. If you do `readable.setEncoding('hex')`, -then the data will be encoded in hexadecimal string format. - -This properly handles multi-byte characters that would otherwise be -potentially mangled if you simply pulled the Buffers directly and -called [`buf.toString(encoding)`][] on them. If you want to read the data -as strings, always use this method. - -Also you can disable any encoding at all with `readable.setEncoding(null)`. -This approach is very useful if you deal with binary data or with large -multi-byte strings spread out over multiple chunks. - -```js -var readable = getReadableStreamSomehow(); -readable.setEncoding('utf8'); -readable.on('data', (chunk) => { - assert.equal(typeof chunk, 'string'); - console.log('got %d characters of string data', chunk.length); -}); -``` - -#### readable.unpipe([destination]) - -* `destination` {stream.Writable} Optional specific stream to unpipe - -This method will remove the hooks set up for a previous [`stream.pipe()`][] -call. - -If the destination is not specified, then all pipes are removed. - -If the destination is specified, but no pipe is set up for it, then -this is a no-op. - -```js -var readable = getReadableStreamSomehow(); -var writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt', -// but only for the first second -readable.pipe(writable); -setTimeout(() => { - console.log('stop writing to file.txt'); - readable.unpipe(writable); - console.log('manually close the file stream'); - writable.end(); -}, 1000); -``` - -#### readable.unshift(chunk) - -* `chunk` {Buffer|String} Chunk of data to unshift onto the read queue - -This is useful in certain cases where a stream is being consumed by a -parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source, so that the stream can be -passed on to some other party. - -Note that `stream.unshift(chunk)` cannot be called after the [`'end'`][] event -has been triggered; a runtime error will be raised. - -If you find that you must often call `stream.unshift(chunk)` in your -programs, consider implementing a [Transform][] stream instead. (See [API -for Stream Implementors][].) - -```js -// Pull off a header delimited by \n\n -// use unshift() if we get too much -// Call the callback with (error, header, stream) -const StringDecoder = require('string_decoder').StringDecoder; -function parseHeader(stream, callback) { - stream.on('error', callback); - stream.on('readable', onReadable); - var decoder = new StringDecoder('utf8'); - var header = ''; - function onReadable() { - var chunk; - while (null !== (chunk = stream.read())) { - var str = decoder.write(chunk); - if (str.match(/\n\n/)) { - // found the header boundary - var split = str.split(/\n\n/); - header += split.shift(); - var remaining = split.join('\n\n'); - var buf = Buffer.from(remaining, 'utf8'); - if (buf.length) - stream.unshift(buf); - stream.removeListener('error', callback); - stream.removeListener('readable', onReadable); - // now the body of the message can be read from the stream. - callback(null, header, stream); - } else { - // still reading the header. - header += str; - } - } - } -} -``` - -Note that, unlike [`stream.push(chunk)`][stream-push], `stream.unshift(chunk)` -will not end the reading process by resetting the internal reading state of the -stream. This can cause unexpected results if `unshift()` is called during a -read (i.e. from within a [`stream._read()`][stream-_read] implementation on a -custom stream). Following the call to `unshift()` with an immediate -[`stream.push('')`][stream-push] will reset the reading state appropriately, -however it is best to simply avoid calling `unshift()` while in the process of -performing a read. - -#### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -Versions of Node.js prior to v0.10 had streams that did not implement the -entire Streams API as it is today. (See [Compatibility][] for -more information.) - -If you are using an older Node.js library that emits [`'data'`][] events and -has a [`stream.pause()`][stream-pause] method that is advisory only, then you -can use the `wrap()` method to create a [Readable][] stream that uses the old -stream as its data source. - -You will very rarely ever need to call this function, but it exists -as a convenience for interacting with old Node.js programs and libraries. - -For example: - -```js -const OldReader = require('./old-api-module.js').OldReader; -const Readable = require('stream').Readable; -const oreader = new OldReader; -const myReader = new Readable().wrap(oreader); - -myReader.on('readable', () => { - myReader.read(); // etc. -}); -``` - -### Class: stream.Transform - -Transform streams are [Duplex][] streams where the output is in some way -computed from the input. They implement both the [Readable][] and -[Writable][] interfaces. - -Examples of Transform streams include: - -* [zlib streams][zlib] -* [crypto streams][crypto] - -### Class: stream.Writable - - - -The Writable stream interface is an abstraction for a *destination* -that you are writing data *to*. - -Examples of writable streams include: - -* [HTTP requests, on the client][] -* [HTTP responses, on the server][] -* [fs write streams][] -* [zlib streams][zlib] -* [crypto streams][crypto] -* [TCP sockets][] -* [child process stdin][] -* [`process.stdout`][], [`process.stderr`][] - -#### Event: 'close' - -Emitted when the stream and any of its underlying resources (a file descriptor, -for example) have been closed. The event indicates that no more events will be -emitted, and no further computation will occur. - -Not all streams will emit the `'close'` event as the `'close'` event is -optional. - -#### Event: 'drain' - -If a [`stream.write(chunk)`][stream-write] call returns `false`, then the -`'drain'` event will indicate when it is appropriate to begin writing more data -to the stream. - -```js -// Write the data to the supplied writable stream one million times. -// Be attentive to back-pressure. -function writeOneMillionTimes(writer, data, encoding, callback) { - var i = 1000000; - write(); - function write() { - var ok = true; - do { - i -= 1; - if (i === 0) { - // last time! - writer.write(data, encoding, callback); - } else { - // see if we should continue, or wait - // don't pass the callback, because we're not done yet. - ok = writer.write(data, encoding); - } - } while (i > 0 && ok); - if (i > 0) { - // had to stop early! - // write some more once it drains - writer.once('drain', write); - } - } -} -``` - -#### Event: 'error' - -* {Error} - -Emitted if there was an error when writing or piping data. - -#### Event: 'finish' - -When the [`stream.end()`][stream-end] method has been called, and all data has -been flushed to the underlying system, this event is emitted. - -```javascript -var writer = getWritableStreamSomehow(); -for (var i = 0; i < 100; i ++) { - writer.write('hello, #${i}!\n'); -} -writer.end('this is the end\n'); -writer.on('finish', () => { - console.error('all writes are now complete.'); -}); -``` - -#### Event: 'pipe' - -* `src` {stream.Readable} source stream that is piping to this writable - -This is emitted whenever the [`stream.pipe()`][] method is called on a readable -stream, adding this writable to its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('pipe', (src) => { - console.error('something is piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -``` - -#### Event: 'unpipe' - -* `src` {[Readable][] Stream} The source stream that - [unpiped][`stream.unpipe()`] this writable - -This is emitted whenever the [`stream.unpipe()`][] method is called on a -readable stream, removing this writable from its set of destinations. - -```js -var writer = getWritableStreamSomehow(); -var reader = getReadableStreamSomehow(); -writer.on('unpipe', (src) => { - console.error('something has stopped piping into the writer'); - assert.equal(src, reader); -}); -reader.pipe(writer); -reader.unpipe(writer); -``` - -#### writable.cork() - -Forces buffering of all writes. - -Buffered data will be flushed either at [`stream.uncork()`][] or at -[`stream.end()`][stream-end] call. - -#### writable.end([chunk][, encoding][, callback]) - -* `chunk` {String|Buffer} Optional data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Optional callback for when the stream is finished - -Call this method when no more data will be written to the stream. If supplied, -the callback is attached as a listener on the [`'finish'`][] event. - -Calling [`stream.write()`][stream-write] after calling -[`stream.end()`][stream-end] will raise an error. - -```js -// write 'hello, ' and then end with 'world!' -var file = fs.createWriteStream('example.txt'); -file.write('hello, '); -file.end('world!'); -// writing more now is not allowed! -``` - -#### writable.setDefaultEncoding(encoding) - -* `encoding` {String} The new default encoding -* Return: `this` - -Sets the default encoding for a writable stream. - -#### writable.uncork() - -Flush all data, buffered since [`stream.cork()`][] call. - -#### writable.write(chunk[, encoding][, callback]) - -* `chunk` {String|Buffer} The data to write -* `encoding` {String} The encoding, if `chunk` is a String -* `callback` {Function} Callback for when this chunk of data is flushed -* Returns: {Boolean} `true` if the data was handled completely. - -This method writes some data to the underlying system, and calls the -supplied callback once the data has been fully handled. If an error -occurs, the callback may or may not be called with the error as its -first argument. To detect write errors, listen for the `'error'` event. - -The return value indicates if you should continue writing right now. -If the data had to be buffered internally, then it will return -`false`. Otherwise, it will return `true`. - -This return value is strictly advisory. You MAY continue to write, -even if it returns `false`. However, writes will be buffered in -memory, so it is best not to do this excessively. Instead, wait for -the [`'drain'`][] event before writing more data. - - -## API for Stream Implementors - - - -To implement any sort of stream, the pattern is the same: - -1. Extend the appropriate parent class in your own subclass. (The - [`util.inherits()`][] method is particularly helpful for this.) -2. Call the appropriate parent class constructor in your constructor, - to be sure that the internal mechanisms are set up properly. -3. Implement one or more specific methods, as detailed below. - -The class to extend and the method(s) to implement depend on the sort -of stream class you are writing: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Use-case

-
-

Class

-
-

Method(s) to implement

-
-

Reading only

-
-

[Readable](#stream_class_stream_readable_1)

-
-

[_read][stream-_read]

-
-

Writing only

-
-

[Writable](#stream_class_stream_writable_1)

-
-

[_write][stream-_write], [_writev][stream-_writev]

-
-

Reading and writing

-
-

[Duplex](#stream_class_stream_duplex_1)

-
-

[_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev]

-
-

Operate on written data, then read the result

-
-

[Transform](#stream_class_stream_transform_1)

-
-

[_transform][stream-_transform], [_flush][stream-_flush]

-
- -In your implementation code, it is very important to never call the methods -described in [API for Stream Consumers][]. Otherwise, you can potentially cause -adverse side effects in programs that consume your streaming interfaces. - -### Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a TCP -socket connection. - -Note that `stream.Duplex` is an abstract class designed to be extended -with an underlying implementation of the [`stream._read(size)`][stream-_read] -and [`stream._write(chunk, encoding, callback)`][stream-_write] methods as you -would with a Readable or Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this class -prototypally inherits from Readable, and then parasitically from Writable. It is -thus up to the user to implement both the low-level -[`stream._read(n)`][stream-_read] method as well as the low-level -[`stream._write(chunk, encoding, callback)`][stream-_write] method on extension -duplex classes. - -#### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default = `true`. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - * `readableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for readable side of the stream. Has no effect if `objectMode` - is `true`. - * `writableObjectMode` {Boolean} Default = `false`. Sets `objectMode` - for writable side of the stream. Has no effect if `objectMode` - is `true`. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### Class: stream.PassThrough - -This is a trivial implementation of a [Transform][] stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy as a building block for novel sorts of streams. - -### Class: stream.Readable - - - -`stream.Readable` is an abstract class designed to be extended with an -underlying implementation of the [`stream._read(size)`][stream-_read] method. - -Please see [API for Stream Consumers][] for how to consume -streams in your programs. What follows is an explanation of how to -implement Readable streams in your programs. - -#### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default = `16384` (16kb), or `16` for `objectMode` streams - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default = `null` - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns - a single value instead of a Buffer of size n. Default = `false` - * `read` {Function} Implementation for the [`stream._read()`][stream-_read] - method. - -In classes that extend the Readable class, make sure to call the -Readable constructor so that the buffering settings can be properly -initialized. - -#### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **Implement this method, but do NOT call it directly.** - -This method is prefixed with an underscore because it is internal to the -class that defines it and should only be called by the internal Readable -class methods. All Readable stream implementations must provide a \_read -method to fetch data from the underlying resource. - -When `_read()` is called, if data is available from the resource, the `_read()` -implementation should start pushing that data into the read queue by calling -[`this.push(dataChunk)`][stream-push]. `_read()` should continue reading from -the resource and pushing data until push returns `false`, at which point it -should stop reading from the resource. Only when `_read()` is called again after -it has stopped should it start reading more data from the resource and pushing -that data onto the queue. - -Note: once the `_read()` method is called, it will not be called again until -the [`stream.push()`][stream-push] method is called. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling [`stream.push(chunk)`][stream-push]. - -#### readable.push(chunk[, encoding]) - - -* `chunk` {Buffer|Null|String} Chunk of data to push into the read queue -* `encoding` {String} Encoding of String chunks. Must be a valid - Buffer encoding, such as `'utf8'` or `'ascii'` -* return {Boolean} Whether or not more pushes should be performed - -Note: **This method should be called by Readable implementors, NOT -by consumers of Readable streams.** - -If a value other than null is passed, The `push()` method adds a chunk of data -into the queue for subsequent stream processors to consume. If `null` is -passed, it signals the end of the stream (EOF), after which no more data -can be written. - -The data added with `push()` can be pulled out by calling the -[`stream.read()`][stream-read] method when the [`'readable'`][] event fires. - -This API is designed to be as flexible as possible. For example, -you may be wrapping a lower-level source which has some sort of -pause/resume mechanism, and a data callback. In those cases, you -could wrap the low-level source object by doing something like this: - -```js -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -util.inherits(SourceWrapper, Readable); - -function SourceWrapper(options) { - Readable.call(this, options); - - this._source = getLowlevelSourceObject(); - - // Every time there's data, we push it into the internal buffer. - this._source.ondata = (chunk) => { - // if push() returns false, then we need to stop reading from source - if (!this.push(chunk)) - this._source.readStop(); - }; - - // When the source ends, we push the EOF-signaling `null` chunk - this._source.onend = () => { - this.push(null); - }; -} - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -SourceWrapper.prototype._read = function(size) { - this._source.readStart(); -}; -``` - -#### Example: A Counting Stream - - - -This is a basic example of a Readable stream. It emits the numerals -from 1 to 1,000,000 in ascending order, and then ends. - -```js -const Readable = require('stream').Readable; -const util = require('util'); -util.inherits(Counter, Readable); - -function Counter(opt) { - Readable.call(this, opt); - this._max = 1000000; - this._index = 1; -} - -Counter.prototype._read = function() { - var i = this._index++; - if (i > this._max) - this.push(null); - else { - var str = '' + i; - var buf = Buffer.from(str, 'ascii'); - this.push(buf); - } -}; -``` - -#### Example: SimpleProtocol v1 (Sub-optimal) - -This is similar to the `parseHeader` function described -[here](#stream_readable_unshift_chunk), but implemented as a custom stream. -Also, note that this implementation does not convert the incoming data to a -string. - -However, this would be better implemented as a [Transform][] stream. See -[SimpleProtocol v2][] for a better implementation. - -```js -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// NOTE: This can be done more simply as a Transform stream! -// Using Readable directly for this is sub-optimal. See the -// alternative example below under the Transform section. - -const Readable = require('stream').Readable; -const util = require('util'); - -util.inherits(SimpleProtocol, Readable); - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(source, options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - source.on('end', () => { - this.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', () => { - this.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - // calling unshift by itself does not reset the reading state - // of the stream; since we're inside _read, doing an additional - // push('') will reset the state appropriately. - this.push(''); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -// var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a [zlib][] stream or a -[crypto][] stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will produce output -that is either much smaller or much larger than its input. - -Rather than implement the [`stream._read()`][stream-_read] and -[`stream._write()`][stream-_write] methods, Transform classes must implement the -[`stream._transform()`][stream-_transform] method, and may optionally -also implement the [`stream._flush()`][stream-_flush] method. (See below.) - -#### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `transform` {Function} Implementation for the - [`stream._transform()`][stream-_transform] method. - * `flush` {Function} Implementation for the [`stream._flush()`][stream-_flush] - method. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### Events: 'finish' and 'end' - -The [`'finish'`][] and [`'end'`][] events are from the parent Writable -and Readable classes respectively. The `'finish'` event is fired after -[`stream.end()`][stream-end] is called and all chunks have been processed by -[`stream._transform()`][stream-_transform], `'end'` is fired after all data has -been output which is after the callback in [`stream._flush()`][stream-_flush] -has been called. - -#### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush()` method, which will be -called at the very end, after all the written data is consumed, but -before emitting [`'end'`][] to signal the end of the readable side. Just -like with [`stream._transform()`][stream-_transform], call -`transform.push(chunk)` zero or more times, as appropriate, and call `callback` -when the flush operation is complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be transformed. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument and data) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform()` -method to accept input and produce output. - -`_transform()` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. If you supply a second argument to the callback -it will be passed to the push method. In other words the following are -equivalent: - -```js -transform.prototype._transform = function (data, encoding, callback) { - this.push(data); - callback(); -}; - -transform.prototype._transform = function (data, encoding, callback) { - callback(null, data); -}; -``` - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### Example: `SimpleProtocol` parser v2 - -The example [here](#stream_example_simpleprotocol_v1_sub_optimal) of a simple -protocol parser can be implemented simply by using the higher level -[Transform][] stream class, similar to the `parseHeader` and `SimpleProtocol -v1` examples. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node.js stream -approach. - -```javascript -const util = require('util'); -const Transform = require('stream').Transform; -util.inherits(SimpleProtocol, Transform); - -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(chunk.slice(split)); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(chunk); - } - done(); -}; - -// Usage: -// var parser = new SimpleProtocol(); -// source.pipe(parser) -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### Class: stream.Writable - - - -`stream.Writable` is an abstract class designed to be extended with an -underlying implementation of the -[`stream._write(chunk, encoding, callback)`][stream-_write] method. - -Please see [API for Stream Consumers][] for how to consume -writable streams in your programs. What follows is an explanation of -how to implement Writable streams in your programs. - -#### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when - [`stream.write()`][stream-write] starts returning `false`. Default = `16384` - (16kb), or `16` for `objectMode` streams. - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to [`stream._write()`][stream-_write]. - Default = `true` - * `objectMode` {Boolean} Whether or not the - [`stream.write(anyObj)`][stream-write] is a valid operation. If set you can - write arbitrary data instead of only `Buffer` / `String` data. - Default = `false` - * `write` {Function} Implementation for the - [`stream._write()`][stream-_write] method. - * `writev` {Function} Implementation for the - [`stream._writev()`][stream-_writev] method. - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -#### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer|String} The chunk to be written. Will **always** - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a -[`stream._write()`][stream-_write] method to send data to the underlying -resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -#### writable.\_writev(chunks, callback) - -* `chunks` {Array} The chunks to be written. Each chunk has following - format: `{ chunk: ..., encoding: ... }`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunks. - -Note: **This function MUST NOT be called directly.** It may be -implemented by child classes, and called by the internal Writable -class methods only. - -This function is completely optional to implement. In most cases it is -unnecessary. If implemented, it will be called with all the chunks -that are buffered in the write queue. - - -## Simplified Constructor API - - - -In simple cases there is now the added benefit of being able to construct a -stream without inheritance. - -This can be done by passing the appropriate methods as constructor options: - -Examples: - -### Duplex - -```js -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var duplex = new stream.Duplex({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - }, - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -### Readable - -```js -var readable = new stream.Readable({ - read: function(n) { - // sets this._read under the hood - - // push data onto the read queue, passing null - // will signal the end of the stream (EOF) - this.push(chunk); - } -}); -``` - -### Transform - -```js -var transform = new stream.Transform({ - transform: function(chunk, encoding, next) { - // sets this._transform under the hood - - // generate output as many times as needed - // this.push(chunk); - - // call when the current chunk is consumed - next(); - }, - flush: function(done) { - // sets this._flush under the hood - - // generate output as many times as needed - // this.push(chunk); - - done(); - } -}); -``` - -### Writable - -```js -var writable = new stream.Writable({ - write: function(chunk, encoding, next) { - // sets this._write under the hood - - // An optional error can be passed as the first argument - next() - } -}); - -// or - -var writable = new stream.Writable({ - writev: function(chunks, next) { - // sets this._writev under the hood - - // An optional error can be passed as the first argument - next() - } -}); -``` - -## Streams: Under the Hood - - - -### Buffering - - - -Both Writable and Readable streams will buffer data on an internal -object which can be retrieved from `_writableState.getBuffer()` or -`_readableState.buffer`, respectively. - -The amount of data that will potentially be buffered depends on the -`highWaterMark` option which is passed into the constructor. - -Buffering in Readable streams happens when the implementation calls -[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not -call [`stream.read()`][stream-read], then the data will sit in the internal -queue until it is consumed. - -Buffering in Writable streams happens when the user calls -[`stream.write(chunk)`][stream-write] repeatedly, even when it returns `false`. - -The purpose of streams, especially with the [`stream.pipe()`][] method, is to -limit the buffering of data to acceptable levels, so that sources and -destinations of varying speed will not overwhelm the available memory. - -### Compatibility with Older Node.js Versions - - - -In versions of Node.js prior to v0.10, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the [`stream.read()`][stream-read] method, - [`'data'`][] events would start emitting immediately. If you needed to do - some I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The [`stream.pause()`][stream-pause] method was advisory, rather than - guaranteed. This meant that you still had to be prepared to receive - [`'data'`][] events even when the stream was in a paused state. - -In Node.js v0.10, the [Readable][] class was added. -For backwards compatibility with older Node.js programs, Readable streams -switch into "flowing mode" when a [`'data'`][] event handler is added, or -when the [`stream.resume()`][stream-resume] method is called. The effect is -that, even if you are not using the new [`stream.read()`][stream-read] method -and [`'readable'`][] event, you no longer have to worry about losing -[`'data'`][] chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No [`'data'`][] event handler is added. -* The [`stream.resume()`][stream-resume] method is never called. -* The stream is not piped to any writable destination. - -For example, consider the following code: - -```js -// WARNING! BROKEN! -net.createServer((socket) => { - - // we add an 'end' method, but never consume the data - socket.on('end', () => { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of Node.js prior to v0.10, the incoming message data would be -simply discarded. However, in Node.js v0.10 and beyond, -the socket will remain paused forever. - -The workaround in this situation is to call the -[`stream.resume()`][stream-resume] method to start the flow of data: - -```js -// Workaround -net.createServer((socket) => { - - socket.on('end', () => { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into flowing mode, -pre-v0.10 style streams can be wrapped in a Readable class using the -[`stream.wrap()`][] method. - - -### Object Mode - - - -Normally, Streams operate on Strings and Buffers exclusively. - -Streams that are in **object mode** can emit generic JavaScript values -other than Buffers and Strings. - -A Readable stream in object mode will always return a single item from -a call to [`stream.read(size)`][stream-read], regardless of what the size -argument is. - -A Writable stream in object mode will always ignore the `encoding` -argument to [`stream.write(data, encoding)`][stream-write]. - -The special value `null` still retains its special value for object -mode streams. That is, for object mode readable streams, `null` as a -return value from [`stream.read()`][stream-read] indicates that there is no more -data, and [`stream.push(null)`][stream-push] will signal the end of stream data -(`EOF`). - -No streams in Node.js core are object mode streams. This pattern is only -used by userland streaming libraries. - -You should set `objectMode` in your stream child class constructor on -the options object. Setting `objectMode` mid-stream is not safe. - -For Duplex streams `objectMode` can be set exclusively for readable or -writable side with `readableObjectMode` and `writableObjectMode` -respectively. These options can be used to implement parsers and -serializers with Transform streams. - -```js -const util = require('util'); -const StringDecoder = require('string_decoder').StringDecoder; -const Transform = require('stream').Transform; -util.inherits(JSONParseStream, Transform); - -// Gets \n-delimited JSON string data, and emits the parsed objects -function JSONParseStream() { - if (!(this instanceof JSONParseStream)) - return new JSONParseStream(); - - Transform.call(this, { readableObjectMode : true }); - - this._buffer = ''; - this._decoder = new StringDecoder('utf8'); -} - -JSONParseStream.prototype._transform = function(chunk, encoding, cb) { - this._buffer += this._decoder.write(chunk); - // split on newlines - var lines = this._buffer.split(/\r?\n/); - // keep the last partial line buffered - this._buffer = lines.pop(); - for (var l = 0; l < lines.length; l++) { - var line = lines[l]; - try { - var obj = JSON.parse(line); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; - -JSONParseStream.prototype._flush = function(cb) { - // Just handle any leftover - var rem = this._buffer.trim(); - if (rem) { - try { - var obj = JSON.parse(rem); - } catch (er) { - this.emit('error', er); - return; - } - // push the parsed object out to the readable consumer - this.push(obj); - } - cb(); -}; -``` - -### `stream.read(0)` - -There are some cases where you want to trigger a refresh of the -underlying readable stream mechanisms, without actually consuming any -data. In that case, you can call `stream.read(0)`, which will always -return null. - -If the internal read buffer is below the `highWaterMark`, and the -stream is not currently reading, then calling `stream.read(0)` will trigger -a low-level [`stream._read()`][stream-_read] call. - -There is almost never a need to do this. However, you will see some -cases in Node.js's internals where this is done, particularly in the -Readable stream class internals. - -### `stream.push('')` - -Pushing a zero-byte string or Buffer (when not in [Object mode][]) has an -interesting side effect. Because it *is* a call to -[`stream.push()`][stream-push], it will end the `reading` process. However, it -does *not* add any data to the readable buffer, so there's nothing for -a user to consume. - -Very rarely, there are cases where you have no data to provide now, -but the consumer of your stream (or, perhaps, another bit of your own -code) will know when to check again, by calling [`stream.read(0)`][stream-read]. -In those cases, you *may* call `stream.push('')`. - -So far, the only use case for this functionality is in the -[`tls.CryptoStream`][] class, which is deprecated in Node.js/io.js v1.0. If you -find that you have to use `stream.push('')`, please consider another -approach, because it almost certainly indicates that something is -horribly wrong. - -[`'data'`]: #stream_event_data -[`'drain'`]: #stream_event_drain -[`'end'`]: #stream_event_end -[`'finish'`]: #stream_event_finish -[`'readable'`]: #stream_event_readable -[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.1.0/api/buffer.html#buffer_buf_tostring_encoding_start_end -[`EventEmitter`]: https://nodejs.org/docs/v6.1.0/api/events.html#events_class_eventemitter -[`process.stderr`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stderr -[`process.stdin`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdin -[`process.stdout`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdout -[`stream.cork()`]: #stream_writable_cork -[`stream.pipe()`]: #stream_readable_pipe_destination_options -[`stream.uncork()`]: #stream_writable_uncork -[`stream.unpipe()`]: #stream_readable_unpipe_destination -[`stream.wrap()`]: #stream_readable_wrap_stream -[`tls.CryptoStream`]: https://nodejs.org/docs/v6.1.0/api/tls.html#tls_class_cryptostream -[`util.inherits()`]: https://nodejs.org/docs/v6.1.0/api/util.html#util_util_inherits_constructor_superconstructor -[API for Stream Consumers]: #stream_api_for_stream_consumers -[API for Stream Implementors]: #stream_api_for_stream_implementors -[child process stdin]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdin -[child process stdout and stderr]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdout -[Compatibility]: #stream_compatibility_with_older_node_js_versions -[crypto]: crypto.html -[Duplex]: #stream_class_stream_duplex -[fs read streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_readstream -[fs write streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_writestream -[HTTP requests, on the client]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_clientrequest -[HTTP responses, on the server]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_serverresponse -[http-incoming-message]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_incomingmessage -[Object mode]: #stream_object_mode -[Readable]: #stream_class_stream_readable -[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2 -[stream-_flush]: #stream_transform_flush_callback -[stream-_read]: #stream_readable_read_size_1 -[stream-_transform]: #stream_transform_transform_chunk_encoding_callback -[stream-_write]: #stream_writable_write_chunk_encoding_callback_1 -[stream-_writev]: #stream_writable_writev_chunks_callback -[stream-end]: #stream_writable_end_chunk_encoding_callback -[stream-pause]: #stream_readable_pause -[stream-push]: #stream_readable_push_chunk_encoding -[stream-read]: #stream_readable_read_size -[stream-resume]: #stream_readable_resume -[stream-write]: #stream_writable_write_chunk_encoding_callback -[TCP sockets]: https://nodejs.org/docs/v6.1.0/api/net.html#net_class_net_socket -[Transform]: #stream_class_stream_transform -[Writable]: #stream_class_stream_writable -[zlib]: zlib.html diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index 83275f192e4..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,60 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section - - diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8762..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 736693b8400..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,75 +0,0 @@ -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index d06f71f1868..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,26 +0,0 @@ -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 79914fa684c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,893 +0,0 @@ -'use strict'; - -module.exports = Readable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var isArray = require('isarray'); -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var StringDecoder; - -util.inherits(Readable, Stream); - -var hasPrependListener = typeof EE.prototype.prependListener === 'function'; - -function prependListener(emitter, event, fn) { - if (hasPrependListener) return emitter.prependListener(event, fn); - - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. This is here - // only because this code needs to continue to work with older versions - // of Node.js that do not include the prependListener() method. The goal - // is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -var Duplex; -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -var Duplex; -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options && typeof options.read === 'function') this._read = options.read; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = bufferShim.from(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var _e = new Error('stream.unshift() after end event'); - stream.emit('error', _e); - } else { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; - } - - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) return 0; - - if (state.objectMode) return n === 0 ? 0 : 1; - - if (n === null || isNaN(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length; - } - - if (n <= 0) return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else { - return state.length; - } - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) endReadable(this); - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var _i = 0; _i < len; _i++) { - dests[_i].emit('unpipe', this); - }return this; - } - - // try to find the right one. - var i = indexOf(state.pipes, dest); - if (i === -1) return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && !this._readableState.endEmitted) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - processNextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - processNextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - forEach(events, function (ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) return null; - - if (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var _buf = list[0]; - var cpy = Math.min(n - c, _buf.length); - - if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy); - - if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - processNextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index dbc996ede62..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,180 +0,0 @@ -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) stream.push(data); - - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er) { - done(stream, er); - });else done(stream); - }); -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('Not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -function done(stream, er) { - if (er) return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index ed5efcbd203..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,526 +0,0 @@ -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/**/ -var processNextTick = require('process-nextick-args'); -/**/ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream; -(function () { - try { - Stream = require('st' + 'ream'); - } catch (_) {} finally { - if (!Stream) Stream = require('events').EventEmitter; - } -})(); -/**/ - -var Buffer = require('buffer').Buffer; -/**/ -var bufferShim = require('buffer-shims'); -/**/ - -util.inherits(Writable, Stream); - -function nop() {} - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -var Duplex; -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~ ~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function writableStateGetBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') - }); - } catch (_) {} -})(); - -var Duplex; -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - processNextTick(cb, er); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - // Always throw error if a null is written - // if we are not in object mode then throw - // if it is not a buffer, string, or undefined. - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - processNextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = bufferShim.from(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - while (entry) { - buffer[count] = entry; - entry = entry.next; - count += 1; - } - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequestCount = 0; - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else { - prefinish(stream, state); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; -} \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json b/src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json deleted file mode 100644 index 4612dcfa1de..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_args": [ - [ - "readable-stream@^2.0.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" - ] - ], - "_from": "readable-stream@>=2.0.2 <3.0.0", - "_id": "readable-stream@2.1.4", - "_inCache": true, - "_installable": true, - "_location": "/readable-stream", - "_nodeVersion": "5.11.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.1.4.tgz_1463679605032_0.6917394688352942" - }, - "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - }, - "_npmVersion": "3.8.6", - "_phantomChildren": {}, - "_requested": { - "name": "readable-stream", - "raw": "readable-stream@^2.0.2", - "rawSpec": "^2.0.2", - "scope": null, - "spec": ">=2.0.2 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/readdirp" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz", - "_shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", - "_shrinkwrap": null, - "_spec": "readable-stream@^2.0.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", - "browser": { - "util": false - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "dependencies": { - "buffer-shims": "^1.0.0", - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "~1.4.0", - "nyc": "^6.4.0", - "tap": "~0.7.1", - "tape": "~4.5.1", - "zuul": "~3.9.0", - "zuul-ngrok": "^4.0.0" - }, - "directories": {}, - "dist": { - "shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" - }, - "gitHead": "7752832fba237929388dea6c96911a0a6379abfc", - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "maintainers": [ - { - "email": "isaacs@npmjs.com", - "name": "isaacs" - }, - { - "email": "nathan@tootallnate.net", - "name": "tootallnate" - }, - { - "email": "rod@vagg.org", - "name": "rvagg" - }, - { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" - } - ], - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "browser": "npm run write-zuul && zuul -- test/browser.js", - "cover": "nyc npm test", - "local": "zuul --local -- test/browser.js", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\ntunnel: ngrok\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" - }, - "version": "2.1.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5516..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js deleted file mode 100644 index be2688a071d..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,16 +0,0 @@ -var Stream = (function (){ - try { - return require('st' + 'ream'); // hack to fix a circular dependency issue when used with browserify - } catch(_){} -}()); -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = Stream || exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); - -if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f0780e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js b/src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf3c1..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore b/src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore deleted file mode 100644 index 7dccd970766..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml b/src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml deleted file mode 100644 index 0cdb6c36056..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4.4" - - "6.2" diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE b/src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE deleted file mode 100644 index 8a63b80ba66..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -This software is released under the MIT license: - -Copyright (c) 2012-2015 Thorsten Lorenz - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/README.md b/src/filesystem/impls/appshell/node/node_modules/readdirp/README.md deleted file mode 100644 index b0c1626ac2f..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# readdirp [![Build Status](https://secure.travis-ci.org/thlorenz/readdirp.png)](http://travis-ci.org/thlorenz/readdirp) - -[![NPM](https://nodei.co/npm/readdirp.png?downloads=true&stars=true)](https://nodei.co/npm/readdirp/) - -Recursive version of [fs.readdir](http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback). Exposes a **stream api**. - -```javascript -var readdirp = require('readdirp') - , path = require('path') - , es = require('event-stream'); - -// print out all JavaScript files along with their size - -var stream = readdirp({ root: path.join(__dirname), fileFilter: '*.js' }); -stream - .on('warn', function (err) { - console.error('non-fatal error', err); - // optionally call stream.destroy() here in order to abort and cause 'close' to be emitted - }) - .on('error', function (err) { console.error('fatal error', err); }) - .pipe(es.mapSync(function (entry) { - return { path: entry.path, size: entry.stat.size }; - })) - .pipe(es.stringify()) - .pipe(process.stdout); -``` - -Meant to be one of the recursive versions of [fs](http://nodejs.org/docs/latest/api/fs.html) functions, e.g., like [mkdirp](https://github.com/substack/node-mkdirp). - -**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* - -- [Installation](#installation) -- [API](#api) - - [entry stream](#entry-stream) - - [options](#options) - - [entry info](#entry-info) - - [Filters](#filters) - - [Callback API](#callback-api) - - [allProcessed ](#allprocessed) - - [fileProcessed](#fileprocessed) -- [More Examples](#more-examples) - - [stream api](#stream-api) - - [stream api pipe](#stream-api-pipe) - - [grep](#grep) - - [using callback api](#using-callback-api) - - [tests](#tests) - - -# Installation - - npm install readdirp - -# API - -***var entryStream = readdirp (options)*** - -Reads given root recursively and returns a `stream` of [entry info](#entry-info)s. - -## entry stream - -Behaves as follows: - -- `emit('data')` passes an [entry info](#entry-info) whenever one is found -- `emit('warn')` passes a non-fatal `Error` that prevents a file/directory from being processed (i.e., if it is - inaccessible to the user) -- `emit('error')` passes a fatal `Error` which also ends the stream (i.e., when illegal options where passed) -- `emit('end')` called when all entries were found and no more will be emitted (i.e., we are done) -- `emit('close')` called when the stream is destroyed via `stream.destroy()` (which could be useful if you want to - manually abort even on a non fatal error) - at that point the stream is no longer `readable` and no more entries, - warning or errors are emitted -- to learn more about streams, consult the very detailed - [nodejs streams documentation](http://nodejs.org/api/stream.html) or the - [stream-handbook](https://github.com/substack/stream-handbook) - - -## options - -- **root**: path in which to start reading and recursing into subdirectories - -- **fileFilter**: filter to include/exclude files found (see [Filters](#filters) for more) - -- **directoryFilter**: filter to include/exclude directories found and to recurse into (see [Filters](#filters) for more) - -- **depth**: depth at which to stop recursing even if more subdirectories are found - -- **entryType**: determines if data events on the stream should be emitted for `'files'`, `'directories'`, `'both'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. Defaults to `'files'`. - -- **lstat**: if `true`, readdirp uses `fs.lstat` instead of `fs.stat` in order to stat files and includes symlink entries in the stream along with files. - -## entry info - -Has the following properties: - -- **parentDir** : directory in which entry was found (relative to given root) -- **fullParentDir** : full path to parent directory -- **name** : name of the file/directory -- **path** : path to the file/directory (relative to given root) -- **fullPath** : full path to the file/directory found -- **stat** : built in [stat object](http://nodejs.org/docs/v0.4.9/api/fs.html#fs.Stats) -- **Example**: (assuming root was `/User/dev/readdirp`) - - parentDir : 'test/bed/root_dir1', - fullParentDir : '/User/dev/readdirp/test/bed/root_dir1', - name : 'root_dir1_subdir1', - path : 'test/bed/root_dir1/root_dir1_subdir1', - fullPath : '/User/dev/readdirp/test/bed/root_dir1/root_dir1_subdir1', - stat : [ ... ] - -## Filters - -There are three different ways to specify filters for files and directories respectively. - -- **function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry - -- **glob string**: a string (e.g., `*.js`) which is matched using [minimatch](https://github.com/isaacs/minimatch), so go there for more - information. - - Globstars (`**`) are not supported since specifiying a recursive pattern for an already recursive function doesn't make sense. - - Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. - -- **array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. - - `[ '*.json', '*.js' ]` includes all JavaScript and Json files. - - - `[ '!.git', '!node_modules' ]` includes all directories except the '.git' and 'node_modules'. - -Directories that do not pass a filter will not be recursed into. - -## Callback API - -Although the stream api is recommended, readdirp also exposes a callback based api. - -***readdirp (options, callback1 [, callback2])*** - -If callback2 is given, callback1 functions as the **fileProcessed** callback, and callback2 as the **allProcessed** callback. - -If only callback1 is given, it functions as the **allProcessed** callback. - -### allProcessed - -- function with err and res parameters, e.g., `function (err, res) { ... }` -- **err**: array of errors that occurred during the operation, **res may still be present, even if errors occurred** -- **res**: collection of file/directory [entry infos](#entry-info) - -### fileProcessed - -- function with [entry info](#entry-info) parameter e.g., `function (entryInfo) { ... }` - - -# More Examples - -`on('error', ..)`, `on('warn', ..)` and `on('end', ..)` handling omitted for brevity - -```javascript -var readdirp = require('readdirp'); - -// Glob file filter -readdirp({ root: './test/bed', fileFilter: '*.js' }) - .on('data', function (entry) { - // do something with each JavaScript file entry - }); - -// Combined glob file filters -readdirp({ root: './test/bed', fileFilter: [ '*.js', '*.json' ] }) - .on('data', function (entry) { - // do something with each JavaScript and Json file entry - }); - -// Combined negated directory filters -readdirp({ root: './test/bed', directoryFilter: [ '!.git', '!*modules' ] }) - .on('data', function (entry) { - // do something with each file entry found outside '.git' or any modules directory - }); - -// Function directory filter -readdirp({ root: './test/bed', directoryFilter: function (di) { return di.name.length === 9; } }) - .on('data', function (entry) { - // do something with each file entry found inside directories whose name has length 9 - }); - -// Limiting depth -readdirp({ root: './test/bed', depth: 1 }) - .on('data', function (entry) { - // do something with each file entry found up to 1 subdirectory deep - }); - -// callback api -readdirp( - { root: '.' } - , function(fileInfo) { - // do something with file entry here - } - , function (err, res) { - // all done, move on or do final step for all file entries here - } -); -``` - -Try more examples by following [instructions](https://github.com/thlorenz/readdirp/blob/master/examples/Readme.md) -on how to get going. - -## stream api - -[stream-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api.js) - -Demonstrates error and data handling by listening to events emitted from the readdirp stream. - -## stream api pipe - -[stream-api-pipe.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api-pipe.js) - -Demonstrates error handling by listening to events emitted from the readdirp stream and how to pipe the data stream into -another destination stream. - -## grep - -[grep.js](https://github.com/thlorenz/readdirp/blob/master/examples/grep.js) - -Very naive implementation of grep, for demonstration purposes only. - -## using callback api - -[callback-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/callback-api.js) - -Shows how to pass callbacks in order to handle errors and/or data. - -## tests - -The [readdirp tests](https://github.com/thlorenz/readdirp/blob/master/test/readdirp.js) also will give you a good idea on -how things work. - diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md deleted file mode 100644 index 55fc4611bc7..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/Readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# readdirp examples - -## How to run the examples - -Assuming you installed readdirp (`npm install readdirp`), you can do the following: - -1. `npm explore readdirp` -2. `cd examples` -3. `npm install` - -At that point you can run the examples with node, i.e., `node grep`. - -## stream api - -[stream-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api.js) - -Demonstrates error and data handling by listening to events emitted from the readdirp stream. - -## stream api pipe - -[stream-api-pipe.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api-pipe.js) - -Demonstrates error handling by listening to events emitted from the readdirp stream and how to pipe the data stream into -another destination stream. - -## grep - -[grep.js](https://github.com/thlorenz/readdirp/blob/master/examples/grep.js) - -Very naive implementation of grep, for demonstration purposes only. - -## using callback api - -[callback-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/callback-api.js) - -Shows how to pass callbacks in order to handle errors and/or data. - diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js deleted file mode 100644 index 39bd2d79806..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/callback-api.js +++ /dev/null @@ -1,10 +0,0 @@ -var readdirp = require('..'); - -readdirp({ root: '.', fileFilter: '*.js' }, function (errors, res) { - if (errors) { - errors.forEach(function (err) { - console.error('Error: ', err); - }); - } - console.log('all javascript files', res); -}); diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js deleted file mode 100644 index 01d5f2954ca..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/grep.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; -var readdirp = require('..') - , util = require('util') - , fs = require('fs') - , path = require('path') - , es = require('event-stream') - ; - -function findLinesMatching (searchTerm) { - - return es.through(function (entry) { - var lineno = 0 - , matchingLines = [] - , fileStream = this; - - function filter () { - return es.mapSync(function (line) { - lineno++; - return ~line.indexOf(searchTerm) ? lineno + ': ' + line : undefined; - }); - } - - function aggregate () { - return es.through( - function write (data) { - matchingLines.push(data); - } - , function end () { - - // drop files that had no matches - if (matchingLines.length) { - var result = { file: entry, lines: matchingLines }; - - // pass result on to file stream - fileStream.emit('data', result); - } - this.emit('end'); - } - ); - } - - fs.createReadStream(entry.fullPath, { encoding: 'utf-8' }) - - // handle file contents line by line - .pipe(es.split('\n')) - - // keep only the lines that matched the term - .pipe(filter()) - - // aggregate all matching lines and delegate control back to the file stream - .pipe(aggregate()) - ; - }); -} - -console.log('grepping for "arguments"'); - -// create a stream of all javascript files found in this and all sub directories -readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) - - // find all lines matching the term for each file (if none found, that file is ignored) - .pipe(findLinesMatching('arguments')) - - // format the results and output - .pipe( - es.mapSync(function (res) { - return '\n\n' + res.file.path + '\n\t' + res.lines.join('\n\t'); - }) - ) - .pipe(process.stdout) - ; diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json deleted file mode 100644 index 2d9b3411973..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "readdirp-examples", - "version": "0.0.0", - "description": "Examples for readdirp.", - "dependencies": { - "tap-stream": "~0.1.0", - "event-stream": "~3.0.7" - } -} diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js deleted file mode 100644 index 4003be8d3a3..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api-pipe.js +++ /dev/null @@ -1,19 +0,0 @@ -var readdirp = require('..') - , path = require('path') - , through = require('through2') - -// print out all JavaScript files along with their size -readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) - .on('warn', function (err) { console.error('non-fatal error', err); }) - .on('error', function (err) { console.error('fatal error', err); }) - .pipe(through.obj(function (entry, _, cb) { - this.push({ path: entry.path, size: entry.stat.size }); - cb(); - })) - .pipe(through.obj( - function (res, _, cb) { - this.push(JSON.stringify(res) + '\n'); - cb(); - }) - ) - .pipe(process.stdout); diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js deleted file mode 100644 index 0f7b327eb06..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/examples/stream-api.js +++ /dev/null @@ -1,15 +0,0 @@ -var readdirp = require('..') - , path = require('path'); - -readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) - .on('warn', function (err) { - console.error('something went wrong when processing an entry', err); - }) - .on('error', function (err) { - console.error('something went fatally wrong and the stream was aborted', err); - }) - .on('data', function (entry) { - console.log('%s is ready for processing', entry.path); - // process entry here - }); - diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/package.json b/src/filesystem/impls/appshell/node/node_modules/readdirp/package.json deleted file mode 100644 index 7c00f77bc77..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "readdirp@^2.0.0", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar" - ] - ], - "_from": "readdirp@>=2.0.0 <3.0.0", - "_id": "readdirp@2.1.0", - "_inCache": true, - "_installable": true, - "_location": "/readdirp", - "_nodeVersion": "4.4.6", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/readdirp-2.1.0.tgz_1467053820730_0.8782131769694388" - }, - "_npmUser": { - "email": "thlorenz@gmx.de", - "name": "thlorenz" - }, - "_npmVersion": "2.15.6", - "_phantomChildren": {}, - "_requested": { - "name": "readdirp", - "raw": "readdirp@^2.0.0", - "rawSpec": "^2.0.0", - "scope": null, - "spec": ">=2.0.0 <3.0.0", - "type": "range" - }, - "_requiredBy": [ - "/chokidar" - ], - "_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "_shasum": "4ed0ad060df3073300c48440373f72d1cc642d78", - "_shrinkwrap": null, - "_spec": "readdirp@^2.0.0", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/chokidar", - "author": { - "email": "thlorenz@gmx.de", - "name": "Thorsten Lorenz", - "url": "thlorenz.com" - }, - "bugs": { - "url": "https://github.com/thlorenz/readdirp/issues" - }, - "dependencies": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - }, - "description": "Recursive version of fs.readdir with streaming api.", - "devDependencies": { - "nave": "^0.5.1", - "proxyquire": "^1.7.9", - "tap": "1.3.2", - "through2": "^2.0.0" - }, - "directories": {}, - "dist": { - "shasum": "4ed0ad060df3073300c48440373f72d1cc642d78", - "tarball": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz" - }, - "engines": { - "node": ">=0.6" - }, - "gitHead": "5a3751f86a1c2bbbb8e3a42685d4191992631e6c", - "homepage": "https://github.com/thlorenz/readdirp", - "keywords": [ - "recursive", - "fs", - "stream", - "streams", - "readdir", - "filesystem", - "find", - "filter" - ], - "license": "MIT", - "main": "readdirp.js", - "maintainers": [ - { - "email": "thlorenz@gmx.de", - "name": "thlorenz" - } - ], - "name": "readdirp", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/thlorenz/readdirp.git" - }, - "scripts": { - "test": "if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi", - "test-0.10": "nave use 0.10 npm run test-main", - "test-0.12": "nave use 0.12 npm run test-main", - "test-4": "nave use 4.4 npm run test-main", - "test-6": "nave use 6.2 npm run test-main", - "test-all": "npm run test-main && npm run test-0.10 && npm run test-0.12 && npm run test-4 && npm run test-6", - "test-main": "(cd test && set -e; for t in ./*.js; do node $t; done)" - }, - "version": "2.1.0" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js deleted file mode 100644 index b6b21e41838..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/readdirp.js +++ /dev/null @@ -1,300 +0,0 @@ -'use strict'; - -var fs = require('graceful-fs') - , path = require('path') - , minimatch = require('minimatch') - , toString = Object.prototype.toString - , si = require('set-immediate-shim') - ; - - -// Standard helpers -function isFunction (obj) { - return toString.call(obj) === '[object Function]'; -} - -function isString (obj) { - return toString.call(obj) === '[object String]'; -} - -function isRegExp (obj) { - return toString.call(obj) === '[object RegExp]'; -} - -function isUndefined (obj) { - return obj === void 0; -} - -/** - * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. - * @param { Object } opts Options to specify root (start directory), filters and recursion depth - * @param { function } callback1 When callback2 is given calls back for each processed file - function (fileInfo) { ... }, - * when callback2 is not given, it behaves like explained in callback2 - * @param { function } callback2 Calls back once all files have been processed with an array of errors and file infos - * function (err, fileInfos) { ... } - */ -function readdir(opts, callback1, callback2) { - var stream - , handleError - , handleFatalError - , pending = 0 - , errors = [] - , readdirResult = { - directories: [] - , files: [] - } - , fileProcessed - , allProcessed - , realRoot - , aborted = false - , paused = false - ; - - // If no callbacks were given we will use a streaming interface - if (isUndefined(callback1)) { - var api = require('./stream-api')(); - stream = api.stream; - callback1 = api.processEntry; - callback2 = api.done; - handleError = api.handleError; - handleFatalError = api.handleFatalError; - - stream.on('close', function () { aborted = true; }); - stream.on('pause', function () { paused = true; }); - stream.on('resume', function () { paused = false; }); - } else { - handleError = function (err) { errors.push(err); }; - handleFatalError = function (err) { - handleError(err); - allProcessed(errors, null); - }; - } - - if (isUndefined(opts)){ - handleFatalError(new Error ( - 'Need to pass at least one argument: opts! \n' + - 'https://github.com/thlorenz/readdirp#options' - ) - ); - return stream; - } - - opts.root = opts.root || '.'; - opts.fileFilter = opts.fileFilter || function() { return true; }; - opts.directoryFilter = opts.directoryFilter || function() { return true; }; - opts.depth = typeof opts.depth === 'undefined' ? 999999999 : opts.depth; - opts.entryType = opts.entryType || 'files'; - - var statfn = opts.lstat === true ? fs.lstat.bind(fs) : fs.stat.bind(fs); - - if (isUndefined(callback2)) { - fileProcessed = function() { }; - allProcessed = callback1; - } else { - fileProcessed = callback1; - allProcessed = callback2; - } - - function normalizeFilter (filter) { - - if (isUndefined(filter)) return undefined; - - function isNegated (filters) { - - function negated(f) { - return f.indexOf('!') === 0; - } - - var some = filters.some(negated); - if (!some) { - return false; - } else { - if (filters.every(negated)) { - return true; - } else { - // if we detect illegal filters, bail out immediately - throw new Error( - 'Cannot mix negated with non negated glob filters: ' + filters + '\n' + - 'https://github.com/thlorenz/readdirp#filters' - ); - } - } - } - - // Turn all filters into a function - if (isFunction(filter)) { - - return filter; - - } else if (isString(filter)) { - - return function (entryInfo) { - return minimatch(entryInfo.name, filter.trim()); - }; - - } else if (filter && Array.isArray(filter)) { - - if (filter) filter = filter.map(function (f) { - return f.trim(); - }); - - return isNegated(filter) ? - // use AND to concat multiple negated filters - function (entryInfo) { - return filter.every(function (f) { - return minimatch(entryInfo.name, f); - }); - } - : - // use OR to concat multiple inclusive filters - function (entryInfo) { - return filter.some(function (f) { - return minimatch(entryInfo.name, f); - }); - }; - } - } - - function processDir(currentDir, entries, callProcessed) { - if (aborted) return; - var total = entries.length - , processed = 0 - , entryInfos = [] - ; - - fs.realpath(currentDir, function(err, realCurrentDir) { - if (aborted) return; - if (err) { - handleError(err); - callProcessed(entryInfos); - return; - } - - var relDir = path.relative(realRoot, realCurrentDir); - - if (entries.length === 0) { - callProcessed([]); - } else { - entries.forEach(function (entry) { - - var fullPath = path.join(realCurrentDir, entry) - , relPath = path.join(relDir, entry); - - statfn(fullPath, function (err, stat) { - if (err) { - handleError(err); - } else { - entryInfos.push({ - name : entry - , path : relPath // relative to root - , fullPath : fullPath - - , parentDir : relDir // relative to root - , fullParentDir : realCurrentDir - - , stat : stat - }); - } - processed++; - if (processed === total) callProcessed(entryInfos); - }); - }); - } - }); - } - - function readdirRec(currentDir, depth, callCurrentDirProcessed) { - var args = arguments; - if (aborted) return; - if (paused) { - si(function () { - readdirRec.apply(null, args); - }) - return; - } - - fs.readdir(currentDir, function (err, entries) { - if (err) { - handleError(err); - callCurrentDirProcessed(); - return; - } - - processDir(currentDir, entries, function(entryInfos) { - - var subdirs = entryInfos - .filter(function (ei) { return ei.stat.isDirectory() && opts.directoryFilter(ei); }); - - subdirs.forEach(function (di) { - if(opts.entryType === 'directories' || opts.entryType === 'both' || opts.entryType === 'all') { - fileProcessed(di); - } - readdirResult.directories.push(di); - }); - - entryInfos - .filter(function(ei) { - var isCorrectType = opts.entryType === 'all' ? - !ei.stat.isDirectory() : ei.stat.isFile() || ei.stat.isSymbolicLink(); - return isCorrectType && opts.fileFilter(ei); - }) - .forEach(function (fi) { - if(opts.entryType === 'files' || opts.entryType === 'both' || opts.entryType === 'all') { - fileProcessed(fi); - } - readdirResult.files.push(fi); - }); - - var pendingSubdirs = subdirs.length; - - // Be done if no more subfolders exist or we reached the maximum desired depth - if(pendingSubdirs === 0 || depth === opts.depth) { - callCurrentDirProcessed(); - } else { - // recurse into subdirs, keeping track of which ones are done - // and call back once all are processed - subdirs.forEach(function (subdir) { - readdirRec(subdir.fullPath, depth + 1, function () { - pendingSubdirs = pendingSubdirs - 1; - if(pendingSubdirs === 0) { - callCurrentDirProcessed(); - } - }); - }); - } - }); - }); - } - - // Validate and normalize filters - try { - opts.fileFilter = normalizeFilter(opts.fileFilter); - opts.directoryFilter = normalizeFilter(opts.directoryFilter); - } catch (err) { - // if we detect illegal filters, bail out immediately - handleFatalError(err); - return stream; - } - - // If filters were valid get on with the show - fs.realpath(opts.root, function(err, res) { - if (err) { - handleFatalError(err); - return stream; - } - - realRoot = res; - readdirRec(opts.root, 0, function () { - // All errors are collected into the errors array - if (errors.length > 0) { - allProcessed(errors, readdirResult); - } else { - allProcessed(null, readdirResult); - } - }); - }); - - return stream; -} - -module.exports = readdir; diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js deleted file mode 100644 index 91c68084711..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/stream-api.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; - -var si = require('set-immediate-shim'); -var stream = require('readable-stream'); -var util = require('util'); - -var Readable = stream.Readable; - -module.exports = ReaddirpReadable; - -util.inherits(ReaddirpReadable, Readable); - -function ReaddirpReadable (opts) { - if (!(this instanceof ReaddirpReadable)) return new ReaddirpReadable(opts); - - opts = opts || {}; - - opts.objectMode = true; - Readable.call(this, opts); - - // backpressure not implemented at this point - this.highWaterMark = Infinity; - - this._destroyed = false; - this._paused = false; - this._warnings = []; - this._errors = []; - - this._pauseResumeErrors(); -} - -var proto = ReaddirpReadable.prototype; - -proto._pauseResumeErrors = function () { - var self = this; - self.on('pause', function () { self._paused = true }); - self.on('resume', function () { - if (self._destroyed) return; - self._paused = false; - - self._warnings.forEach(function (err) { self.emit('warn', err) }); - self._warnings.length = 0; - - self._errors.forEach(function (err) { self.emit('error', err) }); - self._errors.length = 0; - }) -} - -// called for each entry -proto._processEntry = function (entry) { - if (this._destroyed) return; - this.push(entry); -} - -proto._read = function () { } - -proto.destroy = function () { - // when stream is destroyed it will emit nothing further, not even errors or warnings - this.push(null); - this.readable = false; - this._destroyed = true; - this.emit('close'); -} - -proto._done = function () { - this.push(null); -} - -// we emit errors and warnings async since we may handle errors like invalid args -// within the initial event loop before any event listeners subscribed -proto._handleError = function (err) { - var self = this; - si(function () { - if (self._paused) return self._warnings.push(err); - if (!self._destroyed) self.emit('warn', err); - }); -} - -proto._handleFatalError = function (err) { - var self = this; - si(function () { - if (self._paused) return self._errors.push(err); - if (!self._destroyed) self.emit('error', err); - }); -} - -function createStreamAPI () { - var stream = new ReaddirpReadable(); - - return { - stream : stream - , processEntry : stream._processEntry.bind(stream) - , done : stream._done.bind(stream) - , handleError : stream._handleError.bind(stream) - , handleFatalError : stream._handleFatalError.bind(stream) - }; -} - -module.exports = createStreamAPI; diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file1.ext1 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file1.ext1 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file2.ext2 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file2.ext2 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file3.ext3 b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/bed/root_file3.ext3 deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js deleted file mode 100644 index c43d132d343..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp-stream.js +++ /dev/null @@ -1,338 +0,0 @@ -/*jshint asi:true */ - -var debug //= true; -var test = debug ? function () {} : require('tap').test -var test_ = !debug ? function () {} : require('tap').test - , path = require('path') - , fs = require('fs') - , util = require('util') - , TransformStream = require('readable-stream').Transform - , through = require('through2') - , proxyquire = require('proxyquire') - , streamapi = require('../stream-api') - , readdirp = require('..') - , root = path.join(__dirname, 'bed') - , totalDirs = 6 - , totalFiles = 12 - , ext1Files = 4 - , ext2Files = 3 - , ext3Files = 2 - ; - -// see test/readdirp.js for test bed layout - -function opts (extend) { - var o = { root: root }; - - if (extend) { - for (var prop in extend) { - o[prop] = extend[prop]; - } - } - return o; -} - -function capture () { - var result = { entries: [], errors: [], ended: false } - , dst = new TransformStream({ objectMode: true }); - - dst._transform = function (entry, _, cb) { - result.entries.push(entry); - cb(); - } - - dst._flush = function (cb) { - result.ended = true; - this.push(result); - cb(); - } - - return dst; -} - -test('\nintegrated', function (t) { - t.test('\n# reading root without filter', function (t) { - t.plan(2); - - readdirp(opts()) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, totalFiles, 'emits all files'); - t.ok(result.ended, 'ends stream'); - t.end(); - cb(); - } - )); - }) - - t.test('\n# normal: ["*.ext1", "*.ext3"]', function (t) { - t.plan(2); - - readdirp(opts( { fileFilter: [ '*.ext1', '*.ext3' ] } )) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); - t.ok(result.ended, 'ends stream'); - t.end(); - cb(); - } - )) - }) - - t.test('\n# files only', function (t) { - t.plan(2); - - readdirp(opts( { entryType: 'files' } )) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, totalFiles, 'returned files'); - t.ok(result.ended, 'ends stream'); - t.end(); - cb(); - } - )) - }) - - t.test('\n# directories only', function (t) { - t.plan(2); - - readdirp(opts( { entryType: 'directories' } )) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, totalDirs, 'returned directories'); - t.ok(result.ended, 'ends stream'); - t.end(); - cb(); - } - )) - }) - - t.test('\n# both directories + files', function (t) { - t.plan(2); - - readdirp(opts( { entryType: 'both' } )) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, totalDirs + totalFiles, 'returned everything'); - t.ok(result.ended, 'ends stream'); - t.end(); - cb(); - } - )) - }) - - t.test('\n# directory filter with directories only', function (t) { - t.plan(2); - - readdirp(opts( { entryType: 'directories', directoryFilter: [ 'root_dir1', '*dir1_subdir1' ] } )) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, 2, 'two directories'); - t.ok(result.ended, 'ends stream'); - t.end(); - cb(); - } - )) - }) - - t.test('\n# directory and file filters with both entries', function (t) { - t.plan(2); - - readdirp(opts( { entryType: 'both', directoryFilter: [ 'root_dir1', '*dir1_subdir1' ], fileFilter: [ '!*.ext1' ] } )) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, 6, '2 directories and 4 files'); - t.ok(result.ended, 'ends stream'); - t.end(); - cb(); - } - )) - }) - - t.test('\n# negated: ["!*.ext1", "!*.ext3"]', function (t) { - t.plan(2); - - readdirp(opts( { fileFilter: [ '!*.ext1', '!*.ext3' ] } )) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .pipe(capture()) - .pipe(through.obj( - function (result, _ , cb) { - t.equals(result.entries.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); - t.ok(result.ended, 'ends stream'); - t.end(); - } - )) - }) - - t.test('\n# no options given', function (t) { - t.plan(1); - readdirp() - .on('error', function (err) { - t.similar(err.toString() , /Need to pass at least one argument/ , 'emits meaningful error'); - t.end(); - }) - }) - - t.test('\n# mixed: ["*.ext1", "!*.ext3"]', function (t) { - t.plan(1); - - readdirp(opts( { fileFilter: [ '*.ext1', '!*.ext3' ] } )) - .on('error', function (err) { - t.similar(err.toString() , /Cannot mix negated with non negated glob filters/ , 'emits meaningful error'); - t.end(); - }) - }) -}) - - -test('\napi separately', function (t) { - - t.test('\n# handleError', function (t) { - t.plan(1); - - var api = streamapi() - , warning = new Error('some file caused problems'); - - api.stream - .on('warn', function (err) { - t.equals(err, warning, 'warns with the handled error'); - }) - api.handleError(warning); - }) - - t.test('\n# when stream is paused and then resumed', function (t) { - t.plan(6); - var api = streamapi() - , resumed = false - , fatalError = new Error('fatal!') - , nonfatalError = new Error('nonfatal!') - , processedData = 'some data' - ; - - api.stream - .on('warn', function (err) { - t.equals(err, nonfatalError, 'emits the buffered warning'); - t.ok(resumed, 'emits warning only after it was resumed'); - }) - .on('error', function (err) { - t.equals(err, fatalError, 'emits the buffered fatal error'); - t.ok(resumed, 'emits errors only after it was resumed'); - }) - .on('data', function (data) { - t.equals(data, processedData, 'emits the buffered data'); - t.ok(resumed, 'emits data only after it was resumed'); - }) - .pause() - - api.processEntry(processedData); - api.handleError(nonfatalError); - api.handleFatalError(fatalError); - - setTimeout(function () { - resumed = true; - api.stream.resume(); - }, 1) - }) - - t.test('\n# when a stream is paused it stops walking the fs', function (t) { - var resumed = false, - mockedAPI = streamapi(); - - mockedAPI.processEntry = function (entry) { - if (!resumed) t.notOk(true, 'should not emit while paused') - t.ok(entry, 'emitted while resumed') - }.bind(mockedAPI.stream) - - function wrapper () { - return mockedAPI - } - - var readdirp = proxyquire('../readdirp', {'./stream-api': wrapper}) - , stream = readdirp(opts()) - .on('error', function (err) { - t.fail('should not throw error', err); - }) - .on('end', function () { - t.end() - }) - .pause(); - - setTimeout(function () { - resumed = true; - stream.resume(); - }, 5) - }) - - t.test('\n# when a stream is destroyed, it emits "closed", but no longer emits "data", "warn" and "error"', function (t) { - var api = streamapi() - , fatalError = new Error('fatal!') - , nonfatalError = new Error('nonfatal!') - , processedData = 'some data' - , plan = 0; - - t.plan(6) - var stream = api.stream - .on('warn', function (err) { - t.ok(!stream._destroyed, 'emits warning until destroyed'); - }) - .on('error', function (err) { - t.ok(!stream._destroyed, 'emits errors until destroyed'); - }) - .on('data', function (data) { - t.ok(!stream._destroyed, 'emits data until destroyed'); - }) - .on('close', function () { - t.ok(stream._destroyed, 'emits close when stream is destroyed'); - }) - - - api.processEntry(processedData); - api.handleError(nonfatalError); - api.handleFatalError(fatalError); - - setTimeout(function () { - stream.destroy() - - t.notOk(stream.readable, 'stream is no longer readable after it is destroyed') - - api.processEntry(processedData); - api.handleError(nonfatalError); - api.handleFatalError(fatalError); - - process.nextTick(function () { - t.pass('emits no more data, warn or error events after it was destroyed') - t.end(); - }) - }, 10) - }) -}) diff --git a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js b/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js deleted file mode 100644 index 812afbbb998..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/readdirp/test/readdirp.js +++ /dev/null @@ -1,289 +0,0 @@ -/*jshint asi:true */ - -var test = require('tap').test - , path = require('path') - , fs = require('fs') - , util = require('util') - , net = require('net') - , readdirp = require('../readdirp.js') - , root = path.join(__dirname, '../test/bed') - , totalDirs = 6 - , totalFiles = 12 - , ext1Files = 4 - , ext2Files = 3 - , ext3Files = 2 - , rootDir2Files = 2 - , nameHasLength9Dirs = 2 - , depth1Files = 8 - , depth0Files = 3 - ; - -/* -Structure of test bed: - . - ├── root_dir1 - │   ├── root_dir1_file1.ext1 - │   ├── root_dir1_file2.ext2 - │   ├── root_dir1_file3.ext3 - │   ├── root_dir1_subdir1 - │   │   └── root1_dir1_subdir1_file1.ext1 - │   └── root_dir1_subdir2 - │   └── .gitignore - ├── root_dir2 - │   ├── root_dir2_file1.ext1 - │   ├── root_dir2_file2.ext2 - │   ├── root_dir2_subdir1 - │   │   └── .gitignore - │   └── root_dir2_subdir2 - │   └── .gitignore - ├── root_file1.ext1 - ├── root_file2.ext2 - └── root_file3.ext3 - - 6 directories, 13 files -*/ - -// console.log('\033[2J'); // clear console - -function opts (extend) { - var o = { root: root }; - - if (extend) { - for (var prop in extend) { - o[prop] = extend[prop]; - } - } - return o; -} - -test('\nreading root without filter', function (t) { - t.plan(2); - readdirp(opts(), function (err, res) { - t.equals(res.directories.length, totalDirs, 'all directories'); - t.equals(res.files.length, totalFiles, 'all files'); - t.end(); - }) -}) - -test('\nreading root without filter using lstat', function (t) { - t.plan(2); - readdirp(opts({ lstat: true }), function (err, res) { - t.equals(res.directories.length, totalDirs, 'all directories'); - t.equals(res.files.length, totalFiles, 'all files'); - t.end(); - }) -}) - -test('\nreading root with symlinks using lstat', function (t) { - t.plan(2); - fs.symlinkSync(path.join(root, 'root_dir1'), path.join(root, 'dirlink')); - fs.symlinkSync(path.join(root, 'root_file1.ext1'), path.join(root, 'link.ext1')); - readdirp(opts({ lstat: true }), function (err, res) { - t.equals(res.directories.length, totalDirs, 'all directories'); - t.equals(res.files.length, totalFiles + 2, 'all files + symlinks'); - fs.unlinkSync(path.join(root, 'dirlink')); - fs.unlinkSync(path.join(root, 'link.ext1')); - t.end(); - }) -}) - -test('\nreading non-standard fds', function (t) { - t.plan(2); - var server = net.createServer().listen(path.join(root, 'test.sock'), function(){ - readdirp(opts({ entryType: 'all' }), function (err, res) { - t.equals(res.files.length, totalFiles + 1, 'all files + socket'); - readdirp(opts({ entryType: 'both' }), function (err, res) { - t.equals(res.files.length, totalFiles, 'all regular files only'); - server.close(); - t.end(); - }) - }) - }); -}) - -test('\nreading root using glob filter', function (t) { - // normal - t.test('\n# "*.ext1"', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: '*.ext1' } ), function (err, res) { - t.equals(res.files.length, ext1Files, 'all ext1 files'); - t.end(); - }) - }) - t.test('\n# ["*.ext1", "*.ext3"]', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: [ '*.ext1', '*.ext3' ] } ), function (err, res) { - t.equals(res.files.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); - t.end(); - }) - }) - t.test('\n# "root_dir1"', function (t) { - t.plan(1); - readdirp(opts( { directoryFilter: 'root_dir1' }), function (err, res) { - t.equals(res.directories.length, 1, 'one directory'); - t.end(); - }) - }) - t.test('\n# ["root_dir1", "*dir1_subdir1"]', function (t) { - t.plan(1); - readdirp(opts( { directoryFilter: [ 'root_dir1', '*dir1_subdir1' ]}), function (err, res) { - t.equals(res.directories.length, 2, 'two directories'); - t.end(); - }) - }) - - t.test('\n# negated: "!*.ext1"', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: '!*.ext1' } ), function (err, res) { - t.equals(res.files.length, totalFiles - ext1Files, 'all but ext1 files'); - t.end(); - }) - }) - t.test('\n# negated: ["!*.ext1", "!*.ext3"]', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: [ '!*.ext1', '!*.ext3' ] } ), function (err, res) { - t.equals(res.files.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); - t.end(); - }) - }) - - t.test('\n# mixed: ["*.ext1", "!*.ext3"]', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: [ '*.ext1', '!*.ext3' ] } ), function (err, res) { - t.similar(err[0].toString(), /Cannot mix negated with non negated glob filters/, 'returns meaningfull error'); - t.end(); - }) - }) - - t.test('\n# leading and trailing spaces: [" *.ext1", "*.ext3 "]', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: [ ' *.ext1', '*.ext3 ' ] } ), function (err, res) { - t.equals(res.files.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); - t.end(); - }) - }) - t.test('\n# leading and trailing spaces: [" !*.ext1", " !*.ext3 "]', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: [ ' !*.ext1', ' !*.ext3' ] } ), function (err, res) { - t.equals(res.files.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); - t.end(); - }) - }) - - t.test('\n# ** glob pattern', function (t) { - t.plan(1); - readdirp(opts( { fileFilter: '**/*.ext1' } ), function (err, res) { - t.equals(res.files.length, ext1Files, 'ignores ** in **/*.ext1 -> only *.ext1 files'); - t.end(); - }) - }) -}) - -test('\n\nreading root using function filter', function (t) { - t.test('\n# file filter -> "contains root_dir2"', function (t) { - t.plan(1); - readdirp( - opts( { fileFilter: function (fi) { return fi.name.indexOf('root_dir2') >= 0; } }) - , function (err, res) { - t.equals(res.files.length, rootDir2Files, 'all rootDir2Files'); - t.end(); - } - ) - }) - - t.test('\n# directory filter -> "name has length 9"', function (t) { - t.plan(1); - readdirp( - opts( { directoryFilter: function (di) { return di.name.length === 9; } }) - , function (err, res) { - t.equals(res.directories.length, nameHasLength9Dirs, 'all all dirs with name length 9'); - t.end(); - } - ) - }) -}) - -test('\nreading root specifying maximum depth', function (t) { - t.test('\n# depth 1', function (t) { - t.plan(1); - readdirp(opts( { depth: 1 } ), function (err, res) { - t.equals(res.files.length, depth1Files, 'does not return files at depth 2'); - }) - }) -}) - -test('\nreading root with no recursion', function (t) { - t.test('\n# depth 0', function (t) { - t.plan(1); - readdirp(opts( { depth: 0 } ), function (err, res) { - t.equals(res.files.length, depth0Files, 'does not return files at depth 0'); - }) - }) -}) - -test('\nprogress callbacks', function (t) { - t.plan(2); - - var pluckName = function(fi) { return fi.name; } - , processedFiles = []; - - readdirp( - opts() - , function(fi) { - processedFiles.push(fi); - } - , function (err, res) { - t.equals(processedFiles.length, res.files.length, 'calls back for each file processed'); - t.deepEquals(processedFiles.map(pluckName).sort(),res.files.map(pluckName).sort(), 'same file names'); - t.end(); - } - ) -}) - -test('resolving of name, full and relative paths', function (t) { - var expected = { - name : 'root_dir1_file1.ext1' - , parentDirName : 'root_dir1' - , path : 'root_dir1/root_dir1_file1.ext1' - , fullPath : 'test/bed/root_dir1/root_dir1_file1.ext1' - } - , opts = [ - { root: './bed' , prefix: '' } - , { root: './bed/' , prefix: '' } - , { root: 'bed' , prefix: '' } - , { root: 'bed/' , prefix: '' } - , { root: '../test/bed/' , prefix: '' } - , { root: '.' , prefix: 'bed' } - ] - t.plan(opts.length); - - opts.forEach(function (op) { - op.fileFilter = 'root_dir1_file1.ext1'; - - t.test('\n' + util.inspect(op), function (t) { - t.plan(4); - - readdirp (op, function(err, res) { - t.equals(res.files[0].name, expected.name, 'correct name'); - t.equals(res.files[0].path, path.join(op.prefix, expected.path), 'correct path'); - }) - - fs.realpath(op.root, function(err, fullRoot) { - readdirp (op, function(err, res) { - t.equals( - res.files[0].fullParentDir - , path.join(fullRoot, op.prefix, expected.parentDirName) - , 'correct parentDir' - ); - t.equals( - res.files[0].fullPath - , path.join(fullRoot, op.prefix, expected.parentDirName, expected.name) - , 'correct fullPath' - ); - }) - }) - }) - }) -}) - - diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE b/src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE deleted file mode 100644 index 1e49edf81fe..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/regex-cache/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md b/src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md deleted file mode 100644 index ab19174fb62..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/regex-cache/README.md +++ /dev/null @@ -1,160 +0,0 @@ -# regex-cache [![NPM version](https://img.shields.io/npm/v/regex-cache.svg?style=flat)](https://www.npmjs.com/package/regex-cache) [![NPM downloads](https://img.shields.io/npm/dm/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![Build Status](https://img.shields.io/travis/jonschlinkert/regex-cache.svg?style=flat)](https://travis-ci.org/jonschlinkert/regex-cache) - -> Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in suprising performance improvements. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install regex-cache --save -``` - -* Read [what this does](#what-this-does). -* See [the benchmarks](#benchmarks) - -## Usage - -Wrap a function like this: - -```js -var cache = require('regex-cache'); -var someRegex = cache(require('some-regex-lib')); -``` - -**Caching a regex** - -If you want to cache a regex after calling `new RegExp()`, or you're requiring a module that returns a regex, wrap it with a function first: - -```js -var cache = require('regex-cache'); - -function yourRegex(str, opts) { - // do stuff to str and opts - return new RegExp(str, opts.flags); -} - -var regex = cache(yourRegex); -``` - -## Recommendations - -### Use this when... - -* **No options are passed** to the function that creates the regex. Regardless of how big or small the regex is, when zero options are passed, caching will be faster than not. -* **A few options are passed**, and the values are primitives. The limited benchmarks I did show that caching is beneficial when up to 8 or 9 options are passed. - -### Do not use this when... - -* **The values of options are not primitives**. When non-primitives must be compared for equality, the time to compare the options is most likely as long or longer than the time to just create a new regex. - -### Example benchmarks - -Performance results, with and without regex-cache: - -```bash -# no args passed (defaults) - with-cache x 8,699,231 ops/sec ±0.86% (93 runs sampled) - without-cache x 2,777,551 ops/sec ±0.63% (95 runs sampled) - -# string and six options passed - with-cache x 1,885,934 ops/sec ±0.80% (93 runs sampled) - without-cache x 1,256,893 ops/sec ±0.65% (97 runs sampled) - -# string only - with-cache x 7,723,256 ops/sec ±0.87% (92 runs sampled) - without-cache x 2,303,060 ops/sec ±0.47% (99 runs sampled) - -# one option passed - with-cache x 4,179,877 ops/sec ±0.53% (100 runs sampled) - without-cache x 2,198,422 ops/sec ±0.47% (95 runs sampled) - -# two options passed - with-cache x 3,256,222 ops/sec ±0.51% (99 runs sampled) - without-cache x 2,121,401 ops/sec ±0.79% (97 runs sampled) - -# six options passed - with-cache x 1,816,018 ops/sec ±1.08% (96 runs sampled) - without-cache x 1,157,176 ops/sec ±0.53% (100 runs sampled) - -# -# diminishing returns happen about here -# - -# ten options passed - with-cache x 1,210,598 ops/sec ±0.56% (92 runs sampled) - without-cache x 1,665,588 ops/sec ±1.07% (100 runs sampled) - -# twelve options passed - with-cache x 1,042,096 ops/sec ±0.68% (92 runs sampled) - without-cache x 1,389,414 ops/sec ±0.68% (97 runs sampled) - -# twenty options passed - with-cache x 661,125 ops/sec ±0.80% (93 runs sampled) - without-cache x 1,208,757 ops/sec ±0.65% (97 runs sampled) - -# -# when non-primitive values are compared -# - -# single value on the options is an object - with-cache x 1,398,313 ops/sec ±1.05% (95 runs sampled) - without-cache x 2,228,281 ops/sec ±0.56% (99 runs sampled) -``` - -## Run benchmarks - -Install dev dependencies: - -```bash -npm i -d && npm run benchmarks -``` - -## What this does - -If you're using `new RegExp('foo')` instead of a regex literal, it's probably because you need to dyamically generate a regex based on user options or some other potentially changing factors. - -When your function creates a string based on user inputs and passes it to the `RegExp` constructor, regex-cache caches the results. The next time the function is called if the key of a cached regex matches the user input (or no input was given), the cached regex is returned, avoiding unnecessary runtime compilation. - -Using the RegExp constructor offers a lot of flexibility, but the runtime compilation comes at a price - it's slow. Not specifically because of the call to the RegExp constructor, but **because you have to build up the string before `new RegExp()` is even called**. -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/regex-cache/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v, on April 01, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js b/src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js deleted file mode 100644 index 13d20226a81..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/regex-cache/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/*! - * regex-cache - * - * Copyright (c) 2015 Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -var isPrimitive = require('is-primitive'); -var equal = require('is-equal-shallow'); -var basic = {}; -var cache = {}; - -/** - * Expose `regexCache` - */ - -module.exports = regexCache; - -/** - * Memoize the results of a call to the new RegExp constructor. - * - * @param {Function} fn [description] - * @param {String} str [description] - * @param {Options} options [description] - * @param {Boolean} nocompare [description] - * @return {RegExp} - */ - -function regexCache(fn, str, opts) { - var key = '_default_', regex, cached; - - if (!str && !opts) { - if (typeof fn !== 'function') { - return fn; - } - return basic[key] || (basic[key] = fn(str)); - } - - var isString = typeof str === 'string'; - if (isString) { - if (!opts) { - return basic[str] || (basic[str] = fn(str)); - } - key = str; - } else { - opts = str; - } - - cached = cache[key]; - if (cached && equal(cached.opts, opts)) { - return cached.regex; - } - - memo(key, opts, (regex = fn(str, opts))); - return regex; -} - -function memo(key, opts, regex) { - cache[key] = {regex: regex, opts: opts}; -} - -/** - * Expose `cache` - */ - -module.exports.cache = cache; -module.exports.basic = basic; diff --git a/src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json b/src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json deleted file mode 100644 index 51a6eef3b68..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/regex-cache/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "_args": [ - [ - "regex-cache@^0.4.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch" - ] - ], - "_from": "regex-cache@>=0.4.2 <0.5.0", - "_id": "regex-cache@0.4.3", - "_inCache": true, - "_installable": true, - "_location": "/regex-cache", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/regex-cache-0.4.3.tgz_1459536604904_0.22530420310795307" - }, - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "regex-cache", - "raw": "regex-cache@^0.4.2", - "rawSpec": "^0.4.2", - "scope": null, - "spec": ">=0.4.2 <0.5.0", - "type": "range" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", - "_shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145", - "_shrinkwrap": null, - "_spec": "regex-cache@^0.4.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/regex-cache/issues" - }, - "dependencies": { - "is-equal-shallow": "^0.1.3", - "is-primitive": "^2.0.0" - }, - "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in suprising performance improvements.", - "devDependencies": { - "benchmarked": "^0.1.5", - "chalk": "^1.1.3", - "gulp-format-md": "^0.1.7", - "micromatch": "^2.3.7", - "should": "^8.3.0" - }, - "directories": {}, - "dist": { - "shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145", - "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "06ce46bda29a19064a968bd5d2d5596440be05ca", - "homepage": "https://github.com/jonschlinkert/regex-cache", - "keywords": [ - "cache", - "expression", - "regex", - "regexp", - "regular", - "regular expression", - "store", - "to-regex" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - } - ], - "name": "regex-cache", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/regex-cache.git" - }, - "scripts": { - "benchmarks": "node benchmark", - "test": "mocha" - }, - "verb": { - "layout": "default", - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "run": true, - "tasks": [ - "readme" - ], - "toc": false - }, - "version": "0.4.3" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE b/src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE deleted file mode 100644 index 33754daecd9..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-element/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md b/src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md deleted file mode 100644 index 008e20ead40..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-element/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# repeat-element [![NPM version](https://badge.fury.io/js/repeat-element.svg)](http://badge.fury.io/js/repeat-element) - -> Create an array by repeating the given value n times. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```bash -npm i repeat-element --save -``` - -## Usage - -```js -var repeat = require('repeat-element'); - -repeat('a', 5); -//=> ['a', 'a', 'a', 'a', 'a'] - -repeat('a', 1); -//=> ['a'] - -repeat('a', 0); -//=> [] - -repeat(null, 5) -//» [ null, null, null, null, null ] - -repeat({some: 'object'}, 5) -//» [ { some: 'object' }, -// { some: 'object' }, -// { some: 'object' }, -// { some: 'object' }, -// { some: 'object' } ] - -repeat(5, 5) -//» [ 5, 5, 5, 5, 5 ] -``` - -## Related projects - -[repeat-string](https://github.com/jonschlinkert/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. - -## Running tests - -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/repeat-element/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 06, 2015._ diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js b/src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js deleted file mode 100644 index 0ad45ab46d5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-element/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * repeat-element - * - * Copyright (c) 2015 Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -module.exports = function repeat(ele, num) { - var arr = new Array(num); - - for (var i = 0; i < num; i++) { - arr[i] = ele; - } - - return arr; -}; diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json b/src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json deleted file mode 100644 index 87f8bb68037..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-element/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "_args": [ - [ - "repeat-element@^1.1.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces" - ] - ], - "_from": "repeat-element@>=1.1.2 <2.0.0", - "_id": "repeat-element@1.1.2", - "_inCache": true, - "_installable": true, - "_location": "/repeat-element", - "_nodeVersion": "0.12.0", - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "2.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "repeat-element", - "raw": "repeat-element@^1.1.2", - "rawSpec": "^1.1.2", - "scope": null, - "spec": ">=1.1.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/braces", - "/fill-range" - ], - "_resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "_shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", - "_shrinkwrap": null, - "_spec": "repeat-element@^1.1.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/braces", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/repeat-element/issues" - }, - "dependencies": {}, - "description": "Create an array by repeating the given value n times.", - "devDependencies": { - "benchmarked": "^0.1.4", - "chalk": "^1.0.0", - "glob": "^5.0.5", - "minimist": "^1.1.1", - "mocha": "^2.2.4" - }, - "directories": {}, - "dist": { - "shasum": "ef089a178d1483baae4d93eb98b4f9e4e11d990a", - "tarball": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "7a6b21d58eafcc44fc8de133c70a8398ee9fdd8d", - "homepage": "https://github.com/jonschlinkert/repeat-element", - "keywords": [ - "array", - "element", - "repeat", - "string" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/repeat-element/blob/master/LICENSE" - }, - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - } - ], - "name": "repeat-element", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/repeat-element.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "1.1.2" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE b/src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE deleted file mode 100644 index 39245ac1c60..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-string/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md b/src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md deleted file mode 100644 index 975c2be6ae0..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-string/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# repeat-string [![NPM version](https://img.shields.io/npm/v/repeat-string.svg)](https://www.npmjs.com/package/repeat-string) [![Build Status](https://img.shields.io/travis/jonschlinkert/repeat-string.svg)](https://travis-ci.org/jonschlinkert/repeat-string) - -> Repeat the given string n times. Fastest implementation for repeating a string. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install repeat-string --save -``` - -## Usage - -### [repeat](index.js#L41) - -Repeat the given `string` the specified `number` of times. - -**Example:** - -**Params** - -* `string` **{String}**: The string to repeat -* `number` **{Number}**: The number of times to repeat the string -* `returns` **{String}**: Repeated string - -**Example** - -```js -var repeat = require('repeat-string'); -repeat('A', 5); -//=> AAAAA -``` - -## Benchmarks - -Repeat string is significantly faster than the native method (which is itself faster than [repeating](https://github.com/sindresorhus/repeating)): - -```sh -#1: 5 - native x 10,484,023 ops/sec ±1.24% (89 runs sampled) - repeat-string x 16,189,255 ops/sec ±1.05% (91 runs sampled) - repeating x 9,051,715 ops/sec ±1.18% (90 runs sampled) - -#2: 50 - native x 7,975,566 ops/sec ±1.29% (91 runs sampled) - repeat-string x 15,317,972 ops/sec ±1.16% (87 runs sampled) - repeating x 6,279,112 ops/sec ±1.29% (89 runs sampled) - -#3: 250 - native x 6,212,752 ops/sec ±1.33% (91 runs sampled) - repeat-string x 14,565,168 ops/sec ±0.83% (93 runs sampled) - repeating x 5,787,124 ops/sec ±1.25% (92 runs sampled) - -#4: 2000 - native x 4,912,163 ops/sec ±1.27% (91 runs sampled) - repeat-string x 17,129,748 ops/sec ±1.01% (91 runs sampled) - repeating x 4,613,043 ops/sec ±1.37% (91 runs sampled) - -#5: 20000 - native x 4,506,624 ops/sec ±1.33% (90 runs sampled) - repeat-string x 14,877,672 ops/sec ±1.00% (93 runs sampled) - repeating x 4,305,756 ops/sec ±1.36% (89 runs sampled) -``` - -**Run the benchmarks** - -Install dev dependencies: - -```sh -npm i -d && node benchmark -``` - -## Related projects - -[repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/repeat-string/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016 [Jon Schlinkert](http://github.com/jonschlinkert) -Released under the [MIT license](https://github.com/jonschlinkert/repeat-string/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 29, 2016._ \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js b/src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js deleted file mode 100644 index 496c6db2615..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-string/index.js +++ /dev/null @@ -1,68 +0,0 @@ -/*! - * repeat-string - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -/** - * Results cache - */ - -var res = ''; -var cache; - -/** - * Expose `repeat` - */ - -module.exports = repeat; - -/** - * Repeat the given `string` the specified `number` - * of times. - * - * **Example:** - * - * ```js - * var repeat = require('repeat-string'); - * repeat('A', 5); - * //=> AAAAA - * ``` - * - * @param {String} `string` The string to repeat - * @param {Number} `number` The number of times to repeat the string - * @return {String} Repeated string - * @api public - */ - -function repeat(str, num) { - if (typeof str !== 'string') { - throw new TypeError('repeat-string expects a string.'); - } - - // cover common, quick use cases - if (num === 1) return str; - if (num === 2) return str + str; - - var max = str.length * num; - if (cache !== str || typeof cache === 'undefined') { - cache = str; - res = ''; - } - - while (max > res.length && num > 0) { - if (num & 1) { - res += str; - } - - num >>= 1; - if (!num) break; - str += str; - } - - return res.substr(0, max); -} - diff --git a/src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json b/src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json deleted file mode 100644 index 86f982ae7cc..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/repeat-string/package.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "_args": [ - [ - "repeat-string@^1.5.2", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range" - ] - ], - "_from": "repeat-string@>=1.5.2 <2.0.0", - "_id": "repeat-string@1.5.4", - "_inCache": true, - "_installable": true, - "_location": "/repeat-string", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/repeat-string-1.5.4.tgz_1456747759357_0.14794702967628837" - }, - "_npmUser": { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - "_npmVersion": "3.6.0", - "_phantomChildren": {}, - "_requested": { - "name": "repeat-string", - "raw": "repeat-string@^1.5.2", - "rawSpec": "^1.5.2", - "scope": null, - "spec": ">=1.5.2 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/fill-range" - ], - "_resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz", - "_shasum": "64ec0c91e0f4b475f90d5b643651e3e6e5b6c2d5", - "_shrinkwrap": null, - "_spec": "repeat-string@^1.5.2", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/fill-range", - "author": { - "name": "Jon Schlinkert", - "url": "http://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/repeat-string/issues" - }, - "dependencies": {}, - "description": "Repeat the given string n times. Fastest implementation for repeating a string.", - "devDependencies": { - "benchmarked": "^0.1.5", - "chalk": "^1.1.1", - "glob": "^7.0.0", - "gulp-format-md": "^0.1.7", - "mocha": "*", - "repeating": "^2.0.0", - "should": "*" - }, - "directories": {}, - "dist": { - "shasum": "64ec0c91e0f4b475f90d5b643651e3e6e5b6c2d5", - "tarball": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" - }, - "engines": { - "node": ">=0.10" - }, - "files": [ - "index.js" - ], - "gitHead": "53b4ac32e4cfa5bf339aed73544fe86b0f3e9190", - "homepage": "https://github.com/jonschlinkert/repeat-string", - "keywords": [ - "fast", - "fastest", - "fill", - "left", - "left-pad", - "multiple", - "pad", - "padding", - "repeat", - "repeating", - "repetition", - "right", - "right-pad", - "string", - "times" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "github@sellside.com", - "name": "jonschlinkert" - }, - { - "email": "brian.woodward@gmail.com", - "name": "doowb" - } - ], - "name": "repeat-string", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/repeat-string.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "related": { - "list": [ - "repeat-element" - ] - }, - "tasks": [ - "readme" - ], - "toc": false - }, - "version": "1.5.4" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js deleted file mode 100644 index e690485ca03..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -module.exports = typeof setImmediate === 'function' ? setImmediate : - function setImmediate() { - var args = [].slice.apply(arguments); - args.splice(1, 0, 0); - setTimeout.apply(null, args); - }; diff --git a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json deleted file mode 100644 index 7d8ae5a68ab..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "set-immediate-shim@^1.0.1", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp" - ] - ], - "_from": "set-immediate-shim@>=1.0.1 <2.0.0", - "_id": "set-immediate-shim@1.0.1", - "_inCache": true, - "_installable": true, - "_location": "/set-immediate-shim", - "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - }, - "_npmVersion": "1.4.28", - "_phantomChildren": {}, - "_requested": { - "name": "set-immediate-shim", - "raw": "set-immediate-shim@^1.0.1", - "rawSpec": "^1.0.1", - "scope": null, - "spec": ">=1.0.1 <2.0.0", - "type": "range" - }, - "_requiredBy": [ - "/readdirp" - ], - "_resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "_shasum": "4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61", - "_shrinkwrap": null, - "_spec": "set-immediate-shim@^1.0.1", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readdirp", - "author": { - "email": "sindresorhus@gmail.com", - "name": "Sindre Sorhus", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/set-immediate-shim/issues" - }, - "dependencies": {}, - "description": "Simple setImmediate shim", - "devDependencies": { - "ava": "0.0.4", - "require-uncached": "^1.0.2" - }, - "directories": {}, - "dist": { - "shasum": "4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61", - "tarball": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "gitHead": "4c50df7ade5a368e106fee82351ee0a378c990f7", - "homepage": "https://github.com/sindresorhus/set-immediate-shim", - "keywords": [ - "setImmediate", - "immediate", - "setTimeout", - "timeout", - "shim", - "polyfill", - "ponyfill" - ], - "license": "MIT", - "maintainers": [ - { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" - } - ], - "name": "set-immediate-shim", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/set-immediate-shim.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.1" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md b/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md deleted file mode 100644 index 4ec864fa238..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/set-immediate-shim/readme.md +++ /dev/null @@ -1,31 +0,0 @@ -# set-immediate-shim [![Build Status](https://travis-ci.org/sindresorhus/set-immediate-shim.svg?branch=master)](https://travis-ci.org/sindresorhus/set-immediate-shim) - -> Simple [`setImmediate`](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) shim - - -## Install - -``` -$ npm install --save set-immediate-shim -``` - - -## Usage - -```js -var setImmediateShim = require('set-immediate-shim'); - -setImmediateShim(function () { - console.log('2'); -}); - -console.log('1'); - -//=> 1 -//=> 2 -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore b/src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc1d2..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE b/src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a48f5..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md b/src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001501..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js b/src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js deleted file mode 100644 index b00e54fb790..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/string_decoder/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json b/src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json deleted file mode 100644 index 3df0ef34504..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/string_decoder/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_args": [ - [ - "string_decoder@~0.10.x", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream" - ] - ], - "_from": "string_decoder@>=0.10.0 <0.11.0", - "_id": "string_decoder@0.10.31", - "_inCache": true, - "_installable": true, - "_location": "/string_decoder", - "_npmUser": { - "email": "rod@vagg.org", - "name": "rvagg" - }, - "_npmVersion": "1.4.23", - "_phantomChildren": {}, - "_requested": { - "name": "string_decoder", - "raw": "string_decoder@~0.10.x", - "rawSpec": "~0.10.x", - "scope": null, - "spec": ">=0.10.0 <0.11.0", - "type": "range" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "_shrinkwrap": null, - "_spec": "string_decoder@~0.10.x", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "dependencies": {}, - "description": "The string_decoder module from Node core", - "devDependencies": { - "tap": "~0.4.8" - }, - "directories": {}, - "dist": { - "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", - "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "mail@substack.net", - "name": "substack" - }, - { - "email": "rod@vagg.org", - "name": "rvagg" - } - ], - "name": "string_decoder", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "version": "0.10.31" -} diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675372e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c225c..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7c25..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f065e..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5ddd..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json b/src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json deleted file mode 100644 index 78f727bc233..00000000000 --- a/src/filesystem/impls/appshell/node/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "util-deprecate@~1.0.1", - "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream" - ] - ], - "_from": "util-deprecate@>=1.0.1 <1.1.0", - "_id": "util-deprecate@1.0.2", - "_inCache": true, - "_installable": true, - "_location": "/util-deprecate", - "_nodeVersion": "4.1.2", - "_npmUser": { - "email": "nathan@tootallnate.net", - "name": "tootallnate" - }, - "_npmVersion": "2.14.4", - "_phantomChildren": {}, - "_requested": { - "name": "util-deprecate", - "raw": "util-deprecate@~1.0.1", - "rawSpec": "~1.0.1", - "scope": null, - "spec": ">=1.0.1 <1.1.0", - "type": "range" - }, - "_requiredBy": [ - "/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "_shrinkwrap": null, - "_spec": "util-deprecate@~1.0.1", - "_where": "/Users/Filippo/Documents/git/brackets/src/filesystem/impls/appshell/node/node_modules/readable-stream", - "author": { - "email": "nathan@tootallnate.net", - "name": "Nathan Rajlich", - "url": "http://n8.io/" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "dependencies": {}, - "description": "The Node.js `util.deprecate()` function with browser support", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "tarball": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "gitHead": "475fb6857cd23fafff20c1be846c1350abf8e6d4", - "homepage": "https://github.com/TooTallNate/util-deprecate", - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "license": "MIT", - "main": "node.js", - "maintainers": [ - { - "email": "nathan@tootallnate.net", - "name": "tootallnate" - } - ], - "name": "util-deprecate", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.0.2" -} diff --git a/src/filesystem/impls/appshell/node/package.json b/src/filesystem/impls/appshell/node/package.json deleted file mode 100644 index 4227bd1da13..00000000000 --- a/src/filesystem/impls/appshell/node/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "brackets-files-watcher", - "dependencies": { - "chokidar": "1.6.0" - } -} From 63f58f852513a59cfc9320d14d73ffdf4e1bd35a Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 4 Aug 2016 14:22:10 +1000 Subject: [PATCH 08/37] do not ignore stuff by default in the domain --- src/filesystem/impls/appshell/AppshellFileSystem.js | 2 ++ src/filesystem/impls/appshell/node/FileWatcherDomain.js | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 8fcadafb7ee..a95bdc25ee4 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -115,6 +115,8 @@ define(function (require, exports, module) { * @private */ function _fileWatcherChange(evt, path, event, filename, stats) { + console.log('_fileWatcherChange', evt, path, event, filename, stats); + var change; stats.mtime = new Date(stats.mtime); diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 65f821082d5..6fbfc1bdd64 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -75,17 +75,11 @@ function watchPath(path, ignored) { } try { - console.log("Start watcher at: " + path); - - ignored = ignored || ["**/node_modules/**", "**/.git/**", "**/.svn/**"]; - console.log("ignored: " + ignored); - var watcher = chokidar.watch(path, { persistent: true, ignoreInitial: true, ignorePermissionErrors: true, followSymlinks: true, - // TODO: configurable? And maybe unwatch file/folder filtered in the current search ignored: ignored }); @@ -114,7 +108,6 @@ function watchPath(path, ignored) { return; } - console.log([parent, type, name, stats]); _domainManager.emitEvent("fileWatcher", "change", [parent, type, name, stats]); }); From 7733f4a41905d43b8ae95e8ebf99fab861263208 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 4 Aug 2016 14:26:34 +1000 Subject: [PATCH 09/37] propagate ignores from FileSystem.js --- src/filesystem/FileSystem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index da8921551b2..2557fc3f674 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -274,7 +274,7 @@ define(function (require, exports, module) { var impl = this._impl, recursiveWatch = impl.recursiveWatch, commandName = shouldWatch ? "watchPath" : "unwatchPath", - ignored = undefined;// PreferencesManager.get("fileWatchers.ignored"); + ignored = ["**/.git/**", "**/.svn/**", "**/bower_components/**", "**/node_modules/**"]; if (recursiveWatch) { // The impl can watch the entire subtree with one call on the root (we also fall into this case for From 2dc6a7045ef0dd8bdedc7e586692cd105dc47b52 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 4 Aug 2016 14:37:01 +1000 Subject: [PATCH 10/37] stats are not always available (deletes) --- src/filesystem/impls/appshell/AppshellFileSystem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index a95bdc25ee4..60016a0516d 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -119,7 +119,9 @@ define(function (require, exports, module) { var change; - stats.mtime = new Date(stats.mtime); + if (stats) { + stats.mtime = new Date(stats.mtime); + } if (event === "change") { // Only register change events if filename is passed From c9758b42845987df9cfc9f548942d8a5ca204550 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 4 Aug 2016 14:41:23 +1000 Subject: [PATCH 11/37] chokidar allows recursive watching in linux --- src/filesystem/impls/appshell/AppshellFileSystem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 60016a0516d..e356322d694 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -587,11 +587,11 @@ define(function (require, exports, module) { /** * Indicates whether or not recursive watching notifications are supported - * by the watchPath call. Currently, only Darwin supports recursive watching. + * by the watchPath call. With chokidar, every platform supports recursive watching. * * @type {boolean} */ - exports.recursiveWatch = (appshell.platform === "mac" || appshell.platform === "win"); + exports.recursiveWatch = true; /** * Indicates whether or not the filesystem should expect and normalize UNC From 7163ff79d13c65b9bc74a7ccfe3108f945ac07d9 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 4 Aug 2016 15:06:06 +1000 Subject: [PATCH 12/37] watchedRoot.filter should be used to ignore files from watching optimize simplify --- src/filesystem/FileSystem.js | 14 +------------- .../impls/appshell/node/FileWatcherDomain.js | 12 ++++++++---- src/nls/root/strings.js | 3 +-- src/project/ProjectModel.js | 1 + 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index 2557fc3f674..9a0da779939 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -96,18 +96,6 @@ define(function (require, exports, module) { WatchedRoot = require("filesystem/WatchedRoot"), EventDispatcher = require("utils/EventDispatcher"); -// var PreferencesManager = require("preferences/PreferencesManager"), -// Strings = require("strings"); -// -// var ignored = [ -// "**/node_modules/**", -// "**/.git/**", -// "**/.svn/**" -// ]; -// this._preferencesManager.definePreference("fileWatchers.ignored", "array", ignored, { -// description: Strings.DESCRIPTION_FILE_WATCHERS_IGNORED -// }); - /** * The FileSystem is not usable until init() signals its callback. * @constructor @@ -274,7 +262,7 @@ define(function (require, exports, module) { var impl = this._impl, recursiveWatch = impl.recursiveWatch, commandName = shouldWatch ? "watchPath" : "unwatchPath", - ignored = ["**/.git/**", "**/.svn/**", "**/bower_components/**", "**/node_modules/**"]; + ignored = null; // TODO: use watchedRoot.filter if (recursiveWatch) { // The impl can watch the entire subtree with one call on the root (we also fall into this case for diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 6fbfc1bdd64..423f0651c86 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -84,11 +84,7 @@ function watchPath(path, ignored) { }); watcher.on("all", function (event, filename, stats) { - var filename_ = filename.replace(/\\/g, "/"); - var parent = filename_ && (fspath.dirname(filename_) + "/"); - var name = filename_ && fspath.basename(filename_); var type; - switch (event) { case "change": case "ready": @@ -108,6 +104,14 @@ function watchPath(path, ignored) { return; } + if (!filename) { + return; + } + // make sure it's normalized + filename = filename.replace(/\\/g, "/"); + + var parent = fspath.dirname(filename) + "/"; + var name = fspath.basename(filename); _domainManager.emitEvent("fileWatcher", "change", [parent, type, name, stats]); }); diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index 0803d663e69..a0ee7f9e182 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -787,6 +787,5 @@ define({ "DEFAULT_PREFERENCES_JSON_DEFAULT" : "Default", "DESCRIPTION_PURE_CODING_SURFACE" : "true to enable code only mode and hide all other UI elements in {APP_NAME}", "DESCRIPTION_INDENT_LINE_COMMENT" : "true to enable indenting of line comments", - "DESCRIPTION_RECENT_FILES_NAV" : "Enable/disable navigation in recent files", - "DESCRIPTION_FILE_WATCHERS_IGNORED" : "Array of path to ignore during file watching" + "DESCRIPTION_RECENT_FILES_NAV" : "Enable/disable navigation in recent files" }); diff --git a/src/project/ProjectModel.js b/src/project/ProjectModel.js index 4483bda9ee3..9928192f1df 100644 --- a/src/project/ProjectModel.js +++ b/src/project/ProjectModel.js @@ -1346,6 +1346,7 @@ define(function (require, exports, module) { exports._addWelcomeProjectPath = _addWelcomeProjectPath; exports._isWelcomeProjectPath = _isWelcomeProjectPath; exports._ensureTrailingSlash = _ensureTrailingSlash; + exports._exclusionListRegEx = _exclusionListRegEx; exports._shouldShowName = _shouldShowName; exports._invalidChars = _invalidChars; From b59f7b8ac932d49adeff6984bf98a98356733205 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Fri, 5 Aug 2016 10:11:55 +1000 Subject: [PATCH 13/37] fix project switching blocker cleaning the code a bit --- .../impls/appshell/AppshellFileSystem.js | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index e356322d694..00d6d5e69a3 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -78,24 +78,16 @@ define(function (require, exports, module) { * Enqueue a file change event for eventual reporting back to the FileSystem. * * @param {string} changedPath The path that was changed - * @param {object} stats Stats coming from the underlying watcher, - * iff false the eventual change event should not include stats + * @param {object} stats Stats coming from the underlying watcher, if available * @private */ function _enqueueChange(changedPath, stats) { - var needsStats = stats !== false; - _pendingChanges[changedPath] = _pendingChanges[changedPath] || needsStats; - + _pendingChanges[changedPath] = stats; if (!_changeTimeout) { _changeTimeout = window.setTimeout(function () { if (_changeCallback) { Object.keys(_pendingChanges).forEach(function (path) { - var needsStats = _pendingChanges[path]; - if (needsStats) { - _changeCallback(path, stats); - } else { - _changeCallback(path); - } + _changeCallback(path, _pendingChanges[path]); }); } @@ -126,14 +118,14 @@ define(function (require, exports, module) { if (event === "change") { // Only register change events if filename is passed if (filename) { - // an existing file was modified; stats are needed + // an existing file was modified; stats are passed change = path + filename; _enqueueChange(change, stats); } } else if (event === "rename") { - // a new file was created; no stats are needed + // a new file was created; no stats are passed change = path; - _enqueueChange(change, false); + _enqueueChange(change, null); } } @@ -545,12 +537,14 @@ define(function (require, exports, module) { /** * Stop providing change notifications for the file or directory at the * given path, calling back asynchronously with a possibly null FileSystemError - * string when the operation is complete. + * string when the operation is complete. This function needs to mirror the + * signature of watchPath and hence the ignored argument is passed from + * FileSystem code * * @param {string} path * @param {function(?string)=} callback */ - function unwatchPath(path, callback) { + function unwatchPath(path, ignored, callback) { _nodeDomain.exec("unwatchPath", path) .then(callback, callback); } From 0d5c9dc947972cddbed569979406808760bc3600 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Fri, 5 Aug 2016 11:18:39 +1000 Subject: [PATCH 14/37] do not hide true event names from shell file system --- .../impls/appshell/node/FileWatcherDomain.js | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 423f0651c86..22a3c3f3920 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -84,35 +84,14 @@ function watchPath(path, ignored) { }); watcher.on("all", function (event, filename, stats) { - var type; - switch (event) { - case "change": - case "ready": - type = "change"; - break; - case "add": - case "addDir": - case "unlink": - case "unlinkDir": - type = "rename"; - break; - case "raw": - case "error": - return; - default: - console.error("Unknown watching event for file " + path + ": " + event); - return; - } - - if (!filename) { + if (event === "raw" || event === "error" || !filename) { return; } // make sure it's normalized filename = filename.replace(/\\/g, "/"); - var parent = fspath.dirname(filename) + "/"; var name = fspath.basename(filename); - _domainManager.emitEvent("fileWatcher", "change", [parent, type, name, stats]); + _domainManager.emitEvent("fileWatcher", "change", [parent, event, name, stats]); }); _watcherMap[path] = watcher; From 49c82fb1c0d70f4d8794831538478f2d0017431b Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Fri, 5 Aug 2016 12:04:51 +1000 Subject: [PATCH 15/37] correctly transfer stats from watcher domain update travis node_js --- .travis.yml | 2 +- src/filesystem/FileSystemStats.js | 2 +- .../impls/appshell/AppshellFileSystem.js | 41 ++++++++++--------- .../impls/appshell/node/FileWatcherDomain.js | 35 ++++++++++++---- 4 files changed, 51 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5f431ee20ee..464408502fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js sudo: false # use container-based Travis infrastructure node_js: - - "0.10" + - "6" before_script: - npm install -g grunt-cli - npm install -g jasmine-node diff --git a/src/filesystem/FileSystemStats.js b/src/filesystem/FileSystemStats.js index 16d75a65695..6c9878fc69a 100644 --- a/src/filesystem/FileSystemStats.js +++ b/src/filesystem/FileSystemStats.js @@ -36,7 +36,7 @@ define(function (require, exports, module) { this._isFile = isFile; this._isDirectory = !isFile; - this._mtime = options.mtime; + this._mtime = options.mtime instanceof Date ? options.mtime : new Date(options.mtime); this._size = options.size; this._hash = options.hash; diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 00d6d5e69a3..a118e93e446 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -99,33 +99,34 @@ define(function (require, exports, module) { /** * Event handler for the Node fileWatcher domain's change event. + * event values from chokidar: "change", "ready", "add", "addDir", "unlink", "unlinkDir" * * @param {jQuery.Event} The underlying change event - * @param {string} path The path that is reported to have changed * @param {string} event The type of the event: either "change" or "rename" - * @param {string=} filename The name of the file that changed. + * @param {string} parentDirPath The path to the directory holding entry that has changed + * @param {string=} entryName The name of the file/directory that has changed * @private */ - function _fileWatcherChange(evt, path, event, filename, stats) { - console.log('_fileWatcherChange', evt, path, event, filename, stats); + function _fileWatcherChange(evt, event, parentDirPath, entryName, statsObj) { + // console.log('_fileWatcherChange', event, parentDirPath, entryName, statsObj); var change; - - if (stats) { - stats.mtime = new Date(stats.mtime); - } - - if (event === "change") { - // Only register change events if filename is passed - if (filename) { - // an existing file was modified; stats are passed - change = path + filename; - _enqueueChange(change, stats); - } - } else if (event === "rename") { - // a new file was created; no stats are passed - change = path; - _enqueueChange(change, null); + switch (event) { + case "change": + case "ready": + // an existing file/directory was modified; stats are passed if available + var fsStats = statsObj ? new FileSystemStats(statsObj) : null; + _enqueueChange(parentDirPath + entryName, fsStats); + break; + case "add": + case "addDir": + case "unlink": + case "unlinkDir": + // file/directory was created/deleted; fire change on parent to reload contents + _enqueueChange(parentDirPath, null); + break; + default: + console.error("Unexpected 'change' event:", event); } } diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 22a3c3f3920..ce43e0633eb 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -64,6 +64,25 @@ function unwatchPath(path) { }); } +/** + * Transform Node's native fs.stats to a format that can be sent through domain + * @param {stats} Node's fs.stats result + * @return {object} Can be consumed by new FileSystemStats(object); in Brackets + */ +function normalizeStats(nodeFsStats) { + // from shell: If "filename" is a symlink, + // realPath should be the actual path to the linked object + // not implemented in shell yet + return { + isFile: nodeFsStats.isFile(), + isDirectory: nodeFsStats.isDirectory(), + mtime: nodeFsStats.mtime, + size: nodeFsStats.size, + realPath: null, + hash: nodeFsStats.mtime.getTime() + }; +} + /** * Watch a file or directory. * @param {string} path File or directory to watch. @@ -83,15 +102,17 @@ function watchPath(path, ignored) { ignored: ignored }); - watcher.on("all", function (event, filename, stats) { + watcher.on("all", function (event, filename, nodeFsStats) { if (event === "raw" || event === "error" || !filename) { return; } + // make sure stats are normalized for domain transfer + var statsObj = nodeFsStats ? normalizeStats(nodeFsStats) : null; // make sure it's normalized filename = filename.replace(/\\/g, "/"); - var parent = fspath.dirname(filename) + "/"; - var name = fspath.basename(filename); - _domainManager.emitEvent("fileWatcher", "change", [parent, event, name, stats]); + var parentDirPath = fspath.dirname(filename) + "/"; + var entryName = fspath.basename(filename); + _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, statsObj]); }); _watcherMap[path] = watcher; @@ -166,10 +187,10 @@ function init(domainManager) { "fileWatcher", "change", [ - {name: "path", type: "string"}, {name: "event", type: "string"}, - {name: "filename", type: "string"}, - {name: "stats", type: "object"} + {name: "parentDirPath", type: "string"}, + {name: "entryName", type: "string"}, + {name: "statsObj", type: "object"} ] ); From e8117a05113e7a1dada27cb5deff7503c2ee654c Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 16 Aug 2016 14:47:55 +1000 Subject: [PATCH 16/37] make stuff slightly faster using test instead of match --- src/project/ProjectModel.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/project/ProjectModel.js b/src/project/ProjectModel.js index 9928192f1df..8a42f8370a6 100644 --- a/src/project/ProjectModel.js +++ b/src/project/ProjectModel.js @@ -88,8 +88,10 @@ define(function (require, exports, module) { // Validate file name // Checks for valid Windows filenames: // See http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx - return !((filename.search(new RegExp("[" + invalidChars + "]+")) !== -1) || - filename.match(_illegalFilenamesRegEx)); + return !( + new RegExp("[" + invalidChars + "]+").test(filename) || + _illegalFilenamesRegEx.test(filename) + ); } /** @@ -97,7 +99,7 @@ define(function (require, exports, module) { * @see #shouldShow */ function _shouldShowName(name) { - return !name.match(_exclusionListRegEx); + return !_exclusionListRegEx.test(name); } /** From 412e5edbb74340c9410999fcf5d930d26987daae Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 16 Aug 2016 14:58:08 +1000 Subject: [PATCH 17/37] add node side filter to the watched root class --- src/filesystem/FileSystem.js | 12 ++++++++++-- src/filesystem/WatchedRoot.js | 9 ++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index 9a0da779939..dffa5fa73e6 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -852,11 +852,19 @@ define(function (require, exports, module) { * @param {function(string): boolean} filter - Returns true if a particular item should * be watched, given its name (not full path). Items that are ignored are also * filtered from Directory.getContents() results within this subtree. + * @param {string} nodeFilter - anymatch compatible definition for filtering out events + * on the node side. * @param {function(?string)=} callback - A function that is called when the watch has * completed. If the watch fails, the function will have a non-null FileSystemError * string parametr. */ - FileSystem.prototype.watch = function (entry, filter, callback) { + FileSystem.prototype.watch = function (entry, filter, nodeFilter, callback) { + // make nodeFilter an optional argument + if (typeof nodeFilter === "function" && typeof callback !== "function") { + callback = nodeFilter; + nodeFilter = null; + } + var fullPath = entry.fullPath; callback = callback || function () {}; @@ -883,7 +891,7 @@ define(function (require, exports, module) { return; } - var watchedRoot = new WatchedRoot(entry, filter); + var watchedRoot = new WatchedRoot(entry, filter, nodeFilter); this._watchedRoots[fullPath] = watchedRoot; diff --git a/src/filesystem/WatchedRoot.js b/src/filesystem/WatchedRoot.js index b92f07f9bf9..03facc7a961 100644 --- a/src/filesystem/WatchedRoot.js +++ b/src/filesystem/WatchedRoot.js @@ -37,10 +37,12 @@ define(function (require, exports, module) { * @constructor * @param {File|Directory} entry * @param {function(string, string):boolean} filter + * @param {string} nodeFilter */ - function WatchedRoot(entry, filter) { + function WatchedRoot(entry, filter, nodeFilter) { this.entry = entry; this.filter = filter; + this.nodeFilter = nodeFilter; } // Status constants @@ -58,6 +60,11 @@ define(function (require, exports, module) { */ WatchedRoot.prototype.filter = null; + /** + * @type {string} + */ + WatchedRoot.prototype.nodeFilter = null; + /** * @type {number} */ From 26301f54f57398a970fce686b10e3aab63c2cd5c Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 16 Aug 2016 15:12:03 +1000 Subject: [PATCH 18/37] pass exclusionGlob to WatchedRoot --- src/filesystem/FileSystem.js | 14 +++++++------- src/filesystem/WatchedRoot.js | 8 ++++---- src/project/ProjectManager.js | 2 +- src/project/ProjectModel.js | 8 ++++++++ 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index dffa5fa73e6..1551500a447 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -852,17 +852,17 @@ define(function (require, exports, module) { * @param {function(string): boolean} filter - Returns true if a particular item should * be watched, given its name (not full path). Items that are ignored are also * filtered from Directory.getContents() results within this subtree. - * @param {string} nodeFilter - anymatch compatible definition for filtering out events + * @param {string} globFilter - glob compatible string definition for filtering out events * on the node side. * @param {function(?string)=} callback - A function that is called when the watch has * completed. If the watch fails, the function will have a non-null FileSystemError * string parametr. */ - FileSystem.prototype.watch = function (entry, filter, nodeFilter, callback) { - // make nodeFilter an optional argument - if (typeof nodeFilter === "function" && typeof callback !== "function") { - callback = nodeFilter; - nodeFilter = null; + FileSystem.prototype.watch = function (entry, filter, globFilter, callback) { + // make globFilter an optional argument + if (typeof globFilter === "function" && typeof callback !== "function") { + callback = globFilter; + globFilter = null; } var fullPath = entry.fullPath; @@ -891,7 +891,7 @@ define(function (require, exports, module) { return; } - var watchedRoot = new WatchedRoot(entry, filter, nodeFilter); + var watchedRoot = new WatchedRoot(entry, filter, globFilter); this._watchedRoots[fullPath] = watchedRoot; diff --git a/src/filesystem/WatchedRoot.js b/src/filesystem/WatchedRoot.js index 03facc7a961..4cde822ad06 100644 --- a/src/filesystem/WatchedRoot.js +++ b/src/filesystem/WatchedRoot.js @@ -37,12 +37,12 @@ define(function (require, exports, module) { * @constructor * @param {File|Directory} entry * @param {function(string, string):boolean} filter - * @param {string} nodeFilter + * @param {string} globFilter */ - function WatchedRoot(entry, filter, nodeFilter) { + function WatchedRoot(entry, filter, globFilter) { this.entry = entry; this.filter = filter; - this.nodeFilter = nodeFilter; + this.globFilter = globFilter; } // Status constants @@ -63,7 +63,7 @@ define(function (require, exports, module) { /** * @type {string} */ - WatchedRoot.prototype.nodeFilter = null; + WatchedRoot.prototype.globFilter = null; /** * @type {number} diff --git a/src/project/ProjectManager.js b/src/project/ProjectManager.js index 39282187cef..166cb89b9f4 100644 --- a/src/project/ProjectManager.js +++ b/src/project/ProjectManager.js @@ -738,7 +738,7 @@ define(function (require, exports, module) { FileSystem.on("change", _fileSystemChange); FileSystem.on("rename", _fileSystemRename); - FileSystem.watch(FileSystem.getDirectoryForPath(rootPath), ProjectModel._shouldShowName, function (err) { + FileSystem.watch(FileSystem.getDirectoryForPath(rootPath), ProjectModel._shouldShowName, ProjectModel.exclusionGlob, function (err) { if (err === FileSystemError.TOO_MANY_ENTRIES) { if (!_projectWarnedForTooManyFiles) { _showErrorDialog(ERR_TYPE_MAX_FILES); diff --git a/src/project/ProjectModel.js b/src/project/ProjectModel.js index 8a42f8370a6..0a3045f9cdb 100644 --- a/src/project/ProjectModel.js +++ b/src/project/ProjectModel.js @@ -58,6 +58,13 @@ define(function (require, exports, module) { */ var _exclusionListRegEx = /\.pyc$|^\.git$|^\.gitmodules$|^\.svn$|^\.DS_Store$|^Thumbs\.db$|^\.hg$|^CVS$|^\.hgtags$|^\.idea$|^\.c9revisions$|^\.SyncArchive$|^\.SyncID$|^\.SyncIgnore$|\~$/; + /** + * @public + * Anymatch definition of files and folders that should be excluded directly + * node domain watching with chokidar + */ + var exclusionGlob = ".git"; + /** * @private * A string containing all invalid characters for a specific platform. @@ -1353,6 +1360,7 @@ define(function (require, exports, module) { exports._invalidChars = _invalidChars; exports.shouldShow = shouldShow; + exports.exclusionGlob = exclusionGlob; exports.isValidFilename = isValidFilename; exports.EVENT_CHANGE = EVENT_CHANGE; exports.EVENT_SHOULD_SELECT = EVENT_SHOULD_SELECT; From 3fe4876cd14738b42c4584f69f43537a53e8994f Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 16 Aug 2016 15:27:35 +1000 Subject: [PATCH 19/37] implemented and tested ignoring --- src/filesystem/FileSystem.js | 2 +- src/filesystem/impls/appshell/AppshellFileSystem.js | 2 -- src/project/ProjectModel.js | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index 1551500a447..09dc7a3330a 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -262,7 +262,7 @@ define(function (require, exports, module) { var impl = this._impl, recursiveWatch = impl.recursiveWatch, commandName = shouldWatch ? "watchPath" : "unwatchPath", - ignored = null; // TODO: use watchedRoot.filter + ignored = watchedRoot.globFilter; if (recursiveWatch) { // The impl can watch the entire subtree with one call on the root (we also fall into this case for diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index a118e93e446..82f898a58b9 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -108,8 +108,6 @@ define(function (require, exports, module) { * @private */ function _fileWatcherChange(evt, event, parentDirPath, entryName, statsObj) { - // console.log('_fileWatcherChange', event, parentDirPath, entryName, statsObj); - var change; switch (event) { case "change": diff --git a/src/project/ProjectModel.js b/src/project/ProjectModel.js index 0a3045f9cdb..cc83e12b495 100644 --- a/src/project/ProjectModel.js +++ b/src/project/ProjectModel.js @@ -60,10 +60,10 @@ define(function (require, exports, module) { /** * @public - * Anymatch definition of files and folders that should be excluded directly - * node domain watching with chokidar + * Glob definition of files and folders that should be excluded directly + * inside node domain watching with chokidar */ - var exclusionGlob = ".git"; + var exclusionGlob = "**/(.pyc|.git|.gitmodules|.svn|.DS_Store|Thumbs.db|.hg|CVS|.hgtags|.idea|.c9revisions|.SyncArchive|.SyncID|.SyncIgnore)"; /** * @private From 65bc4f8cecf05b7837a184ebb141de17588dc0cb Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 18 Aug 2016 10:36:56 +1000 Subject: [PATCH 20/37] exclude node_modules too usePolling on windows --- src/filesystem/impls/appshell/node/FileWatcherDomain.js | 3 ++- src/project/ProjectModel.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index ce43e0633eb..644592098b8 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -99,7 +99,8 @@ function watchPath(path, ignored) { ignoreInitial: true, ignorePermissionErrors: true, followSymlinks: true, - ignored: ignored + ignored: ignored, + usePolling: process.platform === "win32" }); watcher.on("all", function (event, filename, nodeFsStats) { diff --git a/src/project/ProjectModel.js b/src/project/ProjectModel.js index cc83e12b495..247253b8532 100644 --- a/src/project/ProjectModel.js +++ b/src/project/ProjectModel.js @@ -63,7 +63,7 @@ define(function (require, exports, module) { * Glob definition of files and folders that should be excluded directly * inside node domain watching with chokidar */ - var exclusionGlob = "**/(.pyc|.git|.gitmodules|.svn|.DS_Store|Thumbs.db|.hg|CVS|.hgtags|.idea|.c9revisions|.SyncArchive|.SyncID|.SyncIgnore)"; + var exclusionGlob = "**/(.pyc|.git|.gitmodules|.svn|.DS_Store|Thumbs.db|.hg|CVS|.hgtags|.idea|.c9revisions|.SyncArchive|.SyncID|.SyncIgnore|node_modules)"; /** * @private From c9b9dbb5063cc4b94ebb3c7e0191443994ae89c0 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 10:23:46 +1000 Subject: [PATCH 21/37] added npm-shrinkwrap --- npm-shrinkwrap.json | 281 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 npm-shrinkwrap.json diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json new file mode 100644 index 00000000000..8221cd368ff --- /dev/null +++ b/npm-shrinkwrap.json @@ -0,0 +1,281 @@ +{ + "name": "Brackets", + "version": "1.8.0-0", + "dependencies": { + "anymatch": { + "version": "1.3.0", + "from": "anymatch@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz" + }, + "arr-diff": { + "version": "2.0.0", + "from": "arr-diff@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" + }, + "arr-flatten": { + "version": "1.0.1", + "from": "arr-flatten@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" + }, + "array-unique": { + "version": "0.2.1", + "from": "array-unique@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" + }, + "arrify": { + "version": "1.0.1", + "from": "arrify@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + }, + "async-each": { + "version": "1.0.0", + "from": "async-each@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.0.tgz" + }, + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "binary-extensions": { + "version": "1.5.0", + "from": "binary-extensions@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.5.0.tgz" + }, + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" + }, + "braces": { + "version": "1.8.5", + "from": "braces@>=1.8.2 <2.0.0", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz" + }, + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "chokidar": { + "version": "1.6.0", + "from": "chokidar@1.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.0.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "expand-brackets": { + "version": "0.1.5", + "from": "expand-brackets@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz" + }, + "expand-range": { + "version": "1.8.2", + "from": "expand-range@>=1.8.1 <2.0.0", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz" + }, + "extglob": { + "version": "0.3.2", + "from": "extglob@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz" + }, + "filename-regex": { + "version": "2.0.0", + "from": "filename-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz" + }, + "fill-range": { + "version": "2.2.3", + "from": "fill-range@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" + }, + "for-in": { + "version": "0.1.5", + "from": "for-in@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.5.tgz" + }, + "for-own": { + "version": "0.1.4", + "from": "for-own@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz" + }, + "glob-base": { + "version": "0.3.0", + "from": "glob-base@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" + }, + "glob-parent": { + "version": "2.0.0", + "from": "glob-parent@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" + }, + "graceful-fs": { + "version": "4.1.6", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz" + }, + "inherits": { + "version": "2.0.1", + "from": "inherits@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "is-binary-path": { + "version": "1.0.1", + "from": "is-binary-path@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" + }, + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + }, + "is-dotfile": { + "version": "1.0.2", + "from": "is-dotfile@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" + }, + "is-equal-shallow": { + "version": "0.1.3", + "from": "is-equal-shallow@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + }, + "is-extendable": { + "version": "0.1.1", + "from": "is-extendable@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + }, + "is-extglob": { + "version": "1.0.0", + "from": "is-extglob@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + }, + "is-glob": { + "version": "2.0.1", + "from": "is-glob@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" + }, + "is-number": { + "version": "2.1.0", + "from": "is-number@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" + }, + "is-posix-bracket": { + "version": "0.1.1", + "from": "is-posix-bracket@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" + }, + "is-primitive": { + "version": "2.0.0", + "from": "is-primitive@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "isobject": { + "version": "2.1.0", + "from": "isobject@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz" + }, + "kind-of": { + "version": "3.0.4", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz" + }, + "micromatch": { + "version": "2.3.11", + "from": "micromatch@>=2.1.5 <3.0.0", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "minimatch@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" + }, + "normalize-path": { + "version": "2.0.1", + "from": "normalize-path@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" + }, + "object.omit": { + "version": "2.0.0", + "from": "object.omit@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz" + }, + "parse-glob": { + "version": "3.0.4", + "from": "parse-glob@>=3.0.4 <4.0.0", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz" + }, + "path-is-absolute": { + "version": "1.0.0", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "preserve": { + "version": "0.2.0", + "from": "preserve@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "randomatic": { + "version": "1.1.5", + "from": "randomatic@>=1.1.3 <2.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz" + }, + "readable-stream": { + "version": "2.1.5", + "from": "readable-stream@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz" + }, + "readdirp": { + "version": "2.1.0", + "from": "readdirp@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz" + }, + "regex-cache": { + "version": "0.4.3", + "from": "regex-cache@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz" + }, + "repeat-element": { + "version": "1.1.2", + "from": "repeat-element@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" + }, + "repeat-string": { + "version": "1.5.4", + "from": "repeat-string@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + }, + "set-immediate-shim": { + "version": "1.0.1", + "from": "set-immediate-shim@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } +} From b54781a7033df92cbe7916179eded905391d0963 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 10:31:42 +1000 Subject: [PATCH 22/37] more readable condition add note to a FileSystemStats constructor --- src/filesystem/FileSystem.js | 4 ++-- src/filesystem/FileSystemStats.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index 09dc7a3330a..5e8bd50bee5 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -859,8 +859,8 @@ define(function (require, exports, module) { * string parametr. */ FileSystem.prototype.watch = function (entry, filter, globFilter, callback) { - // make globFilter an optional argument - if (typeof globFilter === "function" && typeof callback !== "function") { + // make globFilter an optional argument to stay backwards compatible + if (typeof callback === "undefined" && typeof globFilter === "function") { callback = globFilter; globFilter = null; } diff --git a/src/filesystem/FileSystemStats.js b/src/filesystem/FileSystemStats.js index 6c9878fc69a..7f97277c247 100644 --- a/src/filesystem/FileSystemStats.js +++ b/src/filesystem/FileSystemStats.js @@ -36,6 +36,8 @@ define(function (require, exports, module) { this._isFile = isFile; this._isDirectory = !isFile; + // in case of stats transferred over a node-domain, + // mtime will have JSON-ified value which needs to be restored this._mtime = options.mtime instanceof Date ? options.mtime : new Date(options.mtime); this._size = options.size; this._hash = options.hash; From 9a6d16e4c89583d6e70bdee200ea5993ab114704 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 10:46:48 +1000 Subject: [PATCH 23/37] use simplified group of watch events --- .../impls/appshell/AppshellFileSystem.js | 11 ++++------ .../impls/appshell/node/FileWatcherDomain.js | 20 +++++++++++++++++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 82f898a58b9..17d77e46b74 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -99,7 +99,7 @@ define(function (require, exports, module) { /** * Event handler for the Node fileWatcher domain's change event. - * event values from chokidar: "change", "ready", "add", "addDir", "unlink", "unlinkDir" + * recognized event values: "changed", "created", "deleted" * * @param {jQuery.Event} The underlying change event * @param {string} event The type of the event: either "change" or "rename" @@ -110,16 +110,13 @@ define(function (require, exports, module) { function _fileWatcherChange(evt, event, parentDirPath, entryName, statsObj) { var change; switch (event) { - case "change": - case "ready": + case "changed": // an existing file/directory was modified; stats are passed if available var fsStats = statsObj ? new FileSystemStats(statsObj) : null; _enqueueChange(parentDirPath + entryName, fsStats); break; - case "add": - case "addDir": - case "unlink": - case "unlinkDir": + case "created": + case "deleted": // file/directory was created/deleted; fire change on parent to reload contents _enqueueChange(parentDirPath, null); break; diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 644592098b8..ba11b2f8182 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -103,8 +103,24 @@ function watchPath(path, ignored) { usePolling: process.platform === "win32" }); - watcher.on("all", function (event, filename, nodeFsStats) { - if (event === "raw" || event === "error" || !filename) { + watcher.on("all", function (type, filename, nodeFsStats) { + var event; + switch (type) { + case "change": + event = "changed"; + break; + case "add": + case "addDir": + event = "created"; + break; + case "unlink": + case "unlinkDir": + event = "deleted"; + break; + default: + event = null; + } + if (!event || !filename) { return; } // make sure stats are normalized for domain transfer From be4c7c84d8c3c1174387737f0ebc1bc0597de6d0 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 10:51:05 +1000 Subject: [PATCH 24/37] explain better forgotten arg name in jsdoc jsdoc comment do a bit of renaming remove unnecessary export refactor FileWatcherDomain --- src/filesystem/FileSystem.js | 22 ++--- src/filesystem/WatchedRoot.js | 8 +- .../impls/appshell/AppshellFileSystem.js | 8 +- .../impls/appshell/node/ChokidarWatcher.js | 78 +++++++++++++++++ .../impls/appshell/node/FileWatcherDomain.js | 83 ++----------------- src/project/ProjectManager.js | 2 +- src/project/ProjectModel.js | 9 +- 7 files changed, 112 insertions(+), 98 deletions(-) create mode 100644 src/filesystem/impls/appshell/node/ChokidarWatcher.js diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index 5e8bd50bee5..8a3227dec5f 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -262,7 +262,7 @@ define(function (require, exports, module) { var impl = this._impl, recursiveWatch = impl.recursiveWatch, commandName = shouldWatch ? "watchPath" : "unwatchPath", - ignored = watchedRoot.globFilter; + filterGlobs = watchedRoot.filterGlobs; if (recursiveWatch) { // The impl can watch the entire subtree with one call on the root (we also fall into this case for @@ -274,7 +274,7 @@ define(function (require, exports, module) { } else { // The impl will handle finding all subdirectories to watch. this._enqueueWatchRequest(function (requestCb) { - impl[commandName].call(impl, entry.fullPath, ignored, requestCb); + impl[commandName].call(impl, entry.fullPath, filterGlobs, requestCb); }.bind(this), callback); } } else if (shouldWatch) { @@ -315,7 +315,7 @@ define(function (require, exports, module) { }; entriesToWatch.forEach(function (entry) { - impl.watchPath(entry.fullPath, ignored, watchCallback); + impl.watchPath(entry.fullPath, filterGlobs, watchCallback); }); }); }, callback); @@ -852,17 +852,17 @@ define(function (require, exports, module) { * @param {function(string): boolean} filter - Returns true if a particular item should * be watched, given its name (not full path). Items that are ignored are also * filtered from Directory.getContents() results within this subtree. - * @param {string} globFilter - glob compatible string definition for filtering out events - * on the node side. + * @param {Array} filterGlobs - glob compatible string definitions for + * filtering out events on the node side. * @param {function(?string)=} callback - A function that is called when the watch has * completed. If the watch fails, the function will have a non-null FileSystemError * string parametr. */ - FileSystem.prototype.watch = function (entry, filter, globFilter, callback) { - // make globFilter an optional argument to stay backwards compatible - if (typeof callback === "undefined" && typeof globFilter === "function") { - callback = globFilter; - globFilter = null; + FileSystem.prototype.watch = function (entry, filter, filterGlobs, callback) { + // make filterGlobs an optional argument to stay backwards compatible + if (typeof callback === "undefined" && typeof filterGlobs === "function") { + callback = filterGlobs; + filterGlobs = null; } var fullPath = entry.fullPath; @@ -891,7 +891,7 @@ define(function (require, exports, module) { return; } - var watchedRoot = new WatchedRoot(entry, filter, globFilter); + var watchedRoot = new WatchedRoot(entry, filter, filterGlobs); this._watchedRoots[fullPath] = watchedRoot; diff --git a/src/filesystem/WatchedRoot.js b/src/filesystem/WatchedRoot.js index 4cde822ad06..f4582a3f701 100644 --- a/src/filesystem/WatchedRoot.js +++ b/src/filesystem/WatchedRoot.js @@ -37,12 +37,12 @@ define(function (require, exports, module) { * @constructor * @param {File|Directory} entry * @param {function(string, string):boolean} filter - * @param {string} globFilter + * @param {Array} filterGlobs */ - function WatchedRoot(entry, filter, globFilter) { + function WatchedRoot(entry, filter, filterGlobs) { this.entry = entry; this.filter = filter; - this.globFilter = globFilter; + this.filterGlobs = filterGlobs; } // Status constants @@ -63,7 +63,7 @@ define(function (require, exports, module) { /** * @type {string} */ - WatchedRoot.prototype.globFilter = null; + WatchedRoot.prototype.filterGlobs = null; /** * @type {number} diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 17d77e46b74..fb48557a57e 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -533,9 +533,9 @@ define(function (require, exports, module) { /** * Stop providing change notifications for the file or directory at the * given path, calling back asynchronously with a possibly null FileSystemError - * string when the operation is complete. This function needs to mirror the - * signature of watchPath and hence the ignored argument is passed from - * FileSystem code + * string when the operation is complete. + * This function needs to mirror the signature of watchPath + * because of FileSystem.prototype._watchOrUnwatchEntry implementation. * * @param {string} path * @param {function(?string)=} callback @@ -577,7 +577,7 @@ define(function (require, exports, module) { /** * Indicates whether or not recursive watching notifications are supported - * by the watchPath call. With chokidar, every platform supports recursive watching. + * by the watchPath call. * * @type {boolean} */ diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js new file mode 100644 index 00000000000..c67e6d4dba8 --- /dev/null +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -0,0 +1,78 @@ +var fspath = require("path"); +var chokidar = require('chokidar'); + +/** + * Transform Node's native fs.stats to a format that can be sent through domain + * @param {stats} nodeFsStats Node's fs.stats result + * @return {object} Can be consumed by new FileSystemStats(object); in Brackets + */ +function normalizeStats(nodeFsStats) { + // from shell: If "filename" is a symlink, + // realPath should be the actual path to the linked object + // not implemented in shell yet + return { + isFile: nodeFsStats.isFile(), + isDirectory: nodeFsStats.isDirectory(), + mtime: nodeFsStats.mtime, + size: nodeFsStats.size, + realPath: null, + hash: nodeFsStats.mtime.getTime() + }; +} + +function watchPath(path, ignored, _watcherMap) { + if (_watcherMap.hasOwnProperty(path)) { + return; + } + + try { + var watcher = chokidar.watch(path, { + persistent: true, + ignoreInitial: true, + ignorePermissionErrors: true, + followSymlinks: true, + ignored: ignored, + usePolling: process.platform === "win32" + }); + + watcher.on("all", function (type, filename, nodeFsStats) { + var event; + switch (type) { + case "change": + event = "changed"; + break; + case "add": + case "addDir": + event = "created"; + break; + case "unlink": + case "unlinkDir": + event = "deleted"; + break; + default: + event = null; + } + if (!event || !filename) { + return; + } + // make sure stats are normalized for domain transfer + var statsObj = nodeFsStats ? normalizeStats(nodeFsStats) : null; + // make sure it's normalized + filename = filename.replace(/\\/g, "/"); + var parentDirPath = fspath.dirname(filename) + "/"; + var entryName = fspath.basename(filename); + _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, statsObj]); + }); + + _watcherMap[path] = watcher; + + watcher.on("error", function (err) { + console.error("Error watching file " + path + ": " + (err && err.message)); + unwatchPath(path); + }); + } catch (err) { + console.warn("Failed to watch file " + path + ": " + (err && err.message)); + } +} + +exports.watchPath = watchPath; diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index ba11b2f8182..22bdb70936f 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -25,10 +25,13 @@ "use strict"; -var fspath = require("path"); -var fs = require("fs"); var os = require("os"); -var chokidar = require('chokidar'); +var watcherImpl; +if (process.platform === "win32") { + watcherImpl = require("./ChokidarWatcher"); // TODO: "./CSharpWatcher" +} else { + watcherImpl = require("./ChokidarWatcher"); +} var _domainManager, _watcherMap = {}; @@ -64,83 +67,13 @@ function unwatchPath(path) { }); } -/** - * Transform Node's native fs.stats to a format that can be sent through domain - * @param {stats} Node's fs.stats result - * @return {object} Can be consumed by new FileSystemStats(object); in Brackets - */ -function normalizeStats(nodeFsStats) { - // from shell: If "filename" is a symlink, - // realPath should be the actual path to the linked object - // not implemented in shell yet - return { - isFile: nodeFsStats.isFile(), - isDirectory: nodeFsStats.isDirectory(), - mtime: nodeFsStats.mtime, - size: nodeFsStats.size, - realPath: null, - hash: nodeFsStats.mtime.getTime() - }; -} - /** * Watch a file or directory. * @param {string} path File or directory to watch. - * @param {array} ignored List of File or directory to NOT watch. + * @param {array} ignored List of entries to ignore during watching. */ function watchPath(path, ignored) { - if (_watcherMap.hasOwnProperty(path)) { - return; - } - - try { - var watcher = chokidar.watch(path, { - persistent: true, - ignoreInitial: true, - ignorePermissionErrors: true, - followSymlinks: true, - ignored: ignored, - usePolling: process.platform === "win32" - }); - - watcher.on("all", function (type, filename, nodeFsStats) { - var event; - switch (type) { - case "change": - event = "changed"; - break; - case "add": - case "addDir": - event = "created"; - break; - case "unlink": - case "unlinkDir": - event = "deleted"; - break; - default: - event = null; - } - if (!event || !filename) { - return; - } - // make sure stats are normalized for domain transfer - var statsObj = nodeFsStats ? normalizeStats(nodeFsStats) : null; - // make sure it's normalized - filename = filename.replace(/\\/g, "/"); - var parentDirPath = fspath.dirname(filename) + "/"; - var entryName = fspath.basename(filename); - _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, statsObj]); - }); - - _watcherMap[path] = watcher; - - watcher.on("error", function (err) { - console.error("Error watching file " + path + ": " + (err && err.message)); - unwatchPath(path); - }); - } catch (err) { - console.warn("Failed to watch file " + path + ": " + (err && err.message)); - } + return watcherImpl.watchPath(path, ignored, _watcherMap); } /** diff --git a/src/project/ProjectManager.js b/src/project/ProjectManager.js index 166cb89b9f4..c004385e200 100644 --- a/src/project/ProjectManager.js +++ b/src/project/ProjectManager.js @@ -738,7 +738,7 @@ define(function (require, exports, module) { FileSystem.on("change", _fileSystemChange); FileSystem.on("rename", _fileSystemRename); - FileSystem.watch(FileSystem.getDirectoryForPath(rootPath), ProjectModel._shouldShowName, ProjectModel.exclusionGlob, function (err) { + FileSystem.watch(FileSystem.getDirectoryForPath(rootPath), ProjectModel._shouldShowName, ProjectModel.defaultIgnoreGlobs, function (err) { if (err === FileSystemError.TOO_MANY_ENTRIES) { if (!_projectWarnedForTooManyFiles) { _showErrorDialog(ERR_TYPE_MAX_FILES); diff --git a/src/project/ProjectModel.js b/src/project/ProjectModel.js index 247253b8532..d283d47a21b 100644 --- a/src/project/ProjectModel.js +++ b/src/project/ProjectModel.js @@ -63,7 +63,11 @@ define(function (require, exports, module) { * Glob definition of files and folders that should be excluded directly * inside node domain watching with chokidar */ - var exclusionGlob = "**/(.pyc|.git|.gitmodules|.svn|.DS_Store|Thumbs.db|.hg|CVS|.hgtags|.idea|.c9revisions|.SyncArchive|.SyncID|.SyncIgnore|node_modules)"; + var defaultIgnoreGlobs = [ + "**/(.pyc|.git|.gitmodules|.svn|.DS_Store|Thumbs.db|.hg|CVS|.hgtags|.idea|.c9revisions|.SyncArchive|.SyncID|.SyncIgnore)", + "**/bower_components", + "**/node_modules" + ]; /** * @private @@ -1355,12 +1359,11 @@ define(function (require, exports, module) { exports._addWelcomeProjectPath = _addWelcomeProjectPath; exports._isWelcomeProjectPath = _isWelcomeProjectPath; exports._ensureTrailingSlash = _ensureTrailingSlash; - exports._exclusionListRegEx = _exclusionListRegEx; exports._shouldShowName = _shouldShowName; exports._invalidChars = _invalidChars; exports.shouldShow = shouldShow; - exports.exclusionGlob = exclusionGlob; + exports.defaultIgnoreGlobs = defaultIgnoreGlobs; exports.isValidFilename = isValidFilename; exports.EVENT_CHANGE = EVENT_CHANGE; exports.EVENT_SHOULD_SELECT = EVENT_SHOULD_SELECT; From b4310428aedc982b999d8c74833c1385a0ca56d2 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 11:34:45 +1000 Subject: [PATCH 25/37] add c# file watcher executables from vscode --- .../impls/appshell/node/win32/CodeHelper.exe | Bin 0 -> 83968 bytes .../impls/appshell/node/win32/CodeHelper.md | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 src/filesystem/impls/appshell/node/win32/CodeHelper.exe create mode 100644 src/filesystem/impls/appshell/node/win32/CodeHelper.md diff --git a/src/filesystem/impls/appshell/node/win32/CodeHelper.exe b/src/filesystem/impls/appshell/node/win32/CodeHelper.exe new file mode 100644 index 0000000000000000000000000000000000000000..4d4b673782552467a10c962b2006c0a229878153 GIT binary patch literal 83968 zcmeFa2Ut`|(Yf^BNFy#IPzx zKv6Jb#H<8!fI(3}QEv5_85j|FefRzEcmMm`J-es6ySl2ny1F`^9vnJm38Er|Xz;eQ zAao2u{5X^FuYnMWc6q{xR0T3N*kV#6Ut>J|bKUC^-` zgffpa7{n@;7sUrctSbVYNgKHTSRbGpgtKLz7;IN~ux=DYN9tV>s@K7`qabw|vyw!= z0rDsU4npiyDl`p6po*h(95u&S3N;nliAJHNG9l=uFUEG$v7w^pARDyhXedyU!OpZ~ zEWlJzm13@j8O1m`%q)(AZD~E@#0d!sm%|60+2+8@U^DogAg)HU(B{zi8W5G2&|wvr zd`-YWh86_fpFC0E&@7pd)Q03ES$UlSAx^8OLLZ@7^bw~dG+2$)Hnq~A3N&*tAMgOA z@u4bglJ5zdWyz2;*TeF0^AV6kLBmm(L~)Z*Aa(BnVq+8Q*w9cjgy0UOJ$^8Sxju+c zqp8x&4Il#Lkk#fwyt@iTBNciLjlxI;IW&tQlw_RjK8TWx(`g`&HaU=C-Gibjrc1`n z5DPlT$cV`{0_~`Ls1(E85XAB!Eh&b|H^y;BDy}vq8QY`#Pyv{TA)?@&@P3xk@9 z$tlTTa~k7218@w18OSyVn^{;=G`dN$+NAQK|FAW?kut4;3d-OJz%mRq1_z{K9RyG& zn@#o&d8!&yLycv(3`*xPIjlbv7%XuOEP%!`LYlIKl%gD2Yc(269MU;7&7Qg(x>iq3 zhMbtGJCJo@%JHpmXwi>D)9R_jp=axXDZu0Dsh9*DA36vP6o8?J25yc6(g8ICQ(*+cqaBPs zG=V)x0>={P_k#pOlkb2712w)Q4k_Om;P4DVe@O5LNH8#LN-$0m42-D~jI#s-BP2sG z5OWQ}80dST5kugDF|HWHMM8x5Za6Bf3-k~?XL2aXq;fD$fY;MVmtau&?wFMgI0iXR z0u$~d@xa3b9&x^;CWC>LP33z)AcK)-SenX+R$yt8qFFMcS)^#@4|IxhS|pvESRko_ zoLB{E14={Cg$mJTAx%V4kE}CSZR{huCXCqAkgVdN4GtG^Ha6GnPi6 z7z>41EgaBeEg_JMfkQwYQ=6iXdhW%xq@%l82wRSVjR zhV-DPK$qtTz(-;1G55s;egG(oA}tvJv}`%%!yp~&51R3ZLrk+9MdJ@P!+Zq9yQ_*b zYax@t_a}2<{8|*LX{$`p{3F(sf?~`^0@{MmNX1p;!0`5+0WpSP6rj^!UKI}l;9d+t z0HA~zMdAgZ8zU7P3G+b65Cj5&U^D=ErY3(3giQWefN3xvi^YI>#gc^>MdB6GVCE6$ zf@p>Snu0CFC=#zIPzIzLjYDIwg z(1;;}2)r7B2N==xURE|%J#Bj0LKns(Kor0VIfRVUVC~9=B^mS{;}LPOkFEmL0Z6;jAU!CGABKtH0a7ABZ?l{n$UT&0-R04ToM+M@IDDYkWi6^Y0OC& zLK{e9pg0oFBr)qqc$s#LHW59A>M)QJy#{EkNVtKXO=qA#=~%Z<^eTw68CY{i5{8m+ zA_>iz7(a?xLsLR4m~)v7w1s&KDWRKW{4?aT(Oed;(GC(;k&q%c6zXEn#=L$cOku~c z87P;H@kdE`i;Z=73J?q_v7p!|RFF0-*6D!5|EWML4S{h99KlkTUoU&NCXOg|Ac4#&(Exh@4S}2}x**{$h<}lO&9%RH5Qp_91Oo$s&Gf7M$&}&mMSB#t$P^Qb>M}Ayv`An@q z!WPO}VMwM>5aA5#v_Kfu5XwMFggbcta@-jpHIEn$mbr$z30jI&nTrV~+C%0o)uOWE zC@fS!rZQQ}h(PE)C6ZJwF%D8?lGFhr6k71EBz2tNL8?NW0$nD9t<7xxrincB!ql9wZQgQAVLN>X>^$|;@EK}m`UTN)ko&771% zT0$44aNDHlqS@jUN}@jo58O*yP+Wo@IxJ410!9j7$1-lm@6;LivR; zpD;kLWNgMonq-YKksfO{g^Lc#*u@B)5~t8SIcM;4M^fudv_ft&_&Dx+Zz*_;`v{Og z-$?k0#51WFF9(nSPr^`52DU(Nq>#K+@GU6~1=RyyO5Y877DdAQJ8@%D&Ti;|QVFu< zisNFa!o)PPG7YJrC=k3Ul7!Ppm_))163!#xQWCBuVJ-=G0W3rZ$@p;+o+05yfalPC zfa6dlz{%jJ7%GtPHQGk6hWH-(8yE}D&>Ns#%jirP3m($dh$ciZvY?3MihTM)ZQRB8aX8E?1kF z#tcM`B*vD=VeTMYNg8ibA8&Mkd6V!)r?g-H6%Z)>xsJC1w)MAj_d}0_H3h`;gKz0=c!`GB32AF9?C;6__D6)<$VZB1# zge-`esDgymBt!(pP)W!op)(0xNElAS3=-y&@C*qN1#@vp=uE;85*CrLf`o{QX$TS; zl5ijidlHk0bA&hL6s4GQfzq8yg}wymQp7ZXEkr!@StiT^1Xux|Q^~=oPryh_N0*QY zx}5?MK#V7Hhyvmw@sd!atfkaZXhPf{Wgl<4c-17u5h$FD(xeCo30N87=SN%$^liKo zqCok$bQW2*Jj`3e&Ok9kW3qL9f%8BGh3#R4ia&88)G;bl5Jw{XBd7Aj!bik~#>Vj? zkRT>>s>>u^_!JUB=3`VqXlyj-3$cqaOZ?mG{$0W{;35}bCFrJJ!wh<4Q5*$1zG<*uE;U3A0ia?H- z;wNky10p3%4~>fF1qUM+kAXge-CU8&aJPZ}5JI!K;n3T6FiOB}?}rPHiRDd*O!VeO zPlN<%Nte*5s4ys2+CHAXq`QdQLFzPav9bJE(hvhueXucpWGF*UMd13Jr zC*tnaCPR#aW`a=;v}va-C>I05V`a4k1Zm>oFrFlmF+rO+N%Lbq$O?;$ij0#ndD{qz z90!C42fIcJVqj2mfw2UR87IU?hXcM>aBv)ag+h+9W5a;3;NTuo?OKO7G!#4x4^0O0R}UH7cYr4vL~K&hx4XFE203HoO#I8H#P#oh#zJf5;ur!#BgW; zuxKo_Oaw2{cLGdR>Ux}I613` zsBL1B%@q&+VtqlS=+LM^@e?M%PysVGX?XYes3@{d5TSXCMYGfJbju#B4cd+rDACgtk+dmMe* zIC}ja2XrS`SMgz}2#Af07v5yve$oR61r zq&-LayW5fN?i(K$6AxpWBo9-PWrznial5!mJSPbcL;_gK@neGBrp3d0DlQ3$$4|0Z zBym!%rvNXFCdR_36anKAtmR0wTQnZ=hKIr=6+KZh#tet$C0;@cPX?e+6pNx^Qyh&Z zqJD^rFeVO`;;{CC94_Pt0EWTG2LVcg7>rqxd@&Cfa$*3V0F-eMCLro9-L1D z&K2U`@cK(}%42~BmWa3vJ+5DI{PI?&@% ztPtw$M^a&9Vl(1qG9#t(fd=b^4Tg=5^~2_l11^Hoos^lYAygG`*a<=g87fg2@cEje#HA2o zG=@raE&&wsT)=5VL{C+L&ZSV4l&D<9qCp-DB1$-dF$9I7L^Ve&c$KIOjtaRoq!HlF zG`!uT!3h!KaH*<#N^K>m8Zx0oRa1@%SyWf7RCg!|wyi8ZQZfZ+a3X(HS`jM3A~_Tp za3w}p1*njo8UiY;CyR?ZsU{I*ItkJ=E}Q_6)x;GbAOqB;KpCovEH)P)sgNQK5rnQP zlP(sbszA}jQm`_JBb);)a1u^cQqt803NVgXpdwg=(A8oy>1010g?+=T;G z;XZM2P#hd#Fe$2fs^+-*U@7>1jLXAKgw05{3P3|>5dunPA{q{KK`!Y&T%;;I4eh2X zJj1}$!ZT#zJn%y^fJREXpfY%}xUj3BG)s%gR8ke*kabQ~bx^_5lR%xVeBAt7cUqQ` zO+kP7{?(g6{z~etS(25v5A4ZQF%P#jhYPgIa2O-AR)_Bp&?gXFuIe;2GCY@F_1hmCD-gt|gsw+rhP-aE8MSa-WH+dkcU+4iyT4y%$r z-Fr_6onY59d_q{C2>4E>Kp>_qe5Hf`ppFC_%isqhaKH->Tq1)CP&5K!Lt}hk=P8{x zVJhP%;LnldBfW!$nejC%6E}F_G5_k)+=cB2=RCB>k#7a?XMuj-?BkCsfQMX@G&3GRNI#i zoirWpE_Q&&eLCb9_{0wIxVRtYAY=b%n6p|+-fq<_R zZO^7~n7m}{VUtLpH{xa>i4>^#7RV_0G7}8Y4Go8wC-Q~uLNJ6r$Q|PNIZdnmF8;zH zWfq4{WUlxNhBQZlLaq=YKq_AMyTghbZ-Bi8o|FOM?ChG&ZgO^@6oLj4`mm(EvQ&uS_L3TG6mi@PRV${sTWl zL1H+_#p`~&6Ty1}OdSi<7|Lqn4Bx^oN1Odq#3AD00ceFdgW!b<=p^bkO@Qe2^ z(z@EhUc{#LMaUVx?h~Z7@MaNjVevMvP5X|@u>#6Oc=6+bRDs_cQWHr|OdkXF$5xyO z`>i;j`5DJWyTArq*gD$4HWXG!AP4K=E8)W}fc22J0Zxgn`FHx*k@oWgIe7ONPww&B zY9rRA{jL(%qZetnANkr_uf6T;NS=YvLU=zn6}&;b5B)nnT;4oCpTUak&Uo5T^z?9r zdu!OMVV#Hj__)}eFnl1n7?06#5lg8UzeFj2X9Vo2t36!@`X{b`|9EPQ`pAOPI)igd zXlqPf+!#h(hCG*a+Pnk}FJb4IHwyFEb1RHyvS#mFV4bIYq~Q9P{RwaLR=KNhJ4QKl zk~QCV8$D>KY4XSwM`$^$B%?v+RGeuuP425F23I^%SYESss^Jf=qgL?6wuNVEo8LN7P)o~M{|3XAeG2$f_qbo>b%vKA@m4; zIWGt;y>;pG<#f5`mk%C1NHe-y6|aE0nkF{7v^a!c*Hk7vv~!F3^@&?wzRGk!!w2=6 zb#?qe>l)-SV|v=2w*?jzO2VxZ`kYdZb`ahzY?AZp5>dU;;?R;+>qDAqZ$t)MUwoI! z9X&_qd&}PbiPv(jcE4CuYh5ai3`*F z?w23*$D(a&v4@{@vVmRrj!dU}qAMnk9IWIQTt0NeGcLXYO$?VYxVHf`1Q)>}HcsrP0VK<~KFulY>G11wUzn?m}| z$T^XL<5n%yS#Z;`u;i)=pyj$Lr5`wTm{>D*S;q6_v5rS9LXd~uoh+vnt8t-n+a8LT z^6%IhD<_0c`hqU+7xZ8NcFRXm)`{qdZZCp2&T+7Ec=}<=dKN)-9u(8Kuqk!knsm4A zQ%+KX)Rv4Zt?YZZ{KhP^$x2nroYEJ*z1t`3R)Ev_PcLoJvu;X-@ndy-LSB@dJ|=Q1 zIBQ&M;C%T;bZI(+>YP_8D(!N>;zG-Qz722atSz|K9wO#^+G`YP;qSA?U&|-L&ISQ!S;!6fG1>%L?{U zK=(^3S8Gz8j{;!{^1A|rz}-bRt+x$Q@2ynW44DQ{Vq~9H3X5C7|cepBK*lzNP2a!5($zD+AW;poH{l%w2r)xc=j5jdxzoa}iEr zIEcpStDe)$3RWJJfR?6J51z5_*4x}a?V7)+s3MD5h5PDgLw3Iroh|#bT`G#6;+VnA*DuODIsysDPu+1nW~=`Gs}~1{jym-E=|vaHSCBG|$5gq> zZ+;sT-P}^C+_?R;+BS=ZihYku&wf{!IBJiXQsKs`&gkSUgLkeCkyq|r&mR25N#*m) z^95s4r!{`+wAw`&c=XGt{=)<+!Obyjor%wlyW5`;P5c;B)K97KiLRovBh%?#d8V3H z{voCPk4Fn_zpLMhx1m)|YrMGB1)1f48P)sSy@m7kd=B|`&7e5%@@M7Y>RCBxode2G zt6ul|o&Btnebckb3Z3Rm^0D^Sq6LeZDB4C-dlRf zS9#rl!FO3PjTh&J6DszNxvNf}Hu%^lUu1l)uu8OC+c#D3p6C8|j`Q~fO~wvZTpB+Q zW#yb5)&~{cujP#UK2C4k z``Q76%R#xWV;<0v-B(W4TAhZfjD~`~sf(gGKy7(g!MSLJ!IAJwe=u}wmwm-LoFDQQ z=239rhp>E&w6x){R=zWrp1F z5H!9xQ%**o*qHjjnG0gu~{=h-!#o$_5RK`C8+u`@LY}A8EEhIk4Ot{&d}0zj`g9mLvG=-ThOu-wvK@-~95!SJk>3 zsdF0hEd*}XZe10evndH?Uk>fN1)hT&tZd}4iejkEIQzH*ueO|kd?DSiL#t+Z49EDX}uPCp2|S3eSo z&H0*DPcK`moX(yLPCTgT&6hP!gRWH8_U_l0ezMzwX{EfE3xei$#_aJTOe<1Y3x}){4m!Ip(G=f_qgh(Hx?$b%AXF%-qAQN;%!Y)bTaTE?)ebQ zL^y#7X5 zW7fnjl}8-pZAx;CW^|2kUW?ENH|O|U>|3JzwZ)BAg;`xYAt6UJzclaolGQI)31PdS zMJ#PDaE&?^u4P@;UCxvW`(7h&-5xCdqmf0mHD0dw5y}>>>t^;s^x=`}@P2TYT!r6t z-nWA<%5zUS=5Jl0jEY$2yoOEh0d7=uS>WZp05jZ*KHW=i3jgHnr;k^!?}JO(;n@3I zSkT6?oH2A1LVG9rs(P^LS_&Wxp$~`9!iIq(t+J;#`{#rmRsfl<;ow1#J?sGkvW+~4 z4k>ywHuJ-WN9~h2g6^7BS&G`Pp@K~Yc z*!mt9Ock6}HW(L8`S^Ao!O9J%CC>K^RuB>!j6|Y4nouoR7J2W~&!~S!i(0>-?6P3W zB7)^|hn4+F`P?e|Cdc!GKRneG&J8O?vvc1Jb)Ym@JStBdR6pFqhEa5``p(oLO6f%h z^KKohdG7A`;X84|%P>O=QGLtx&uuYi=FZU0OWgc|yM1qDQC;4xr8(Z0LeZeT&Gk0= z54PXspMUd0srkj)$MEez^Iy!^%b5 z_or2fbnq+|zUR$>*L!lnZ>l`rqEkn{YQfBJF++P}{N}H{@FIZuoTYb;B!H%Un;mYRlte6NXZ=p3+A?R1UqlyZh)i9XglHCEycFeN^?!& z=j9X2M)v)7!TQkL`s+ujYYOt_<>=SjZKK4TdfO{6=y6eH!`y~9i^CsX>X&lAyess+ zL2Hq2ZNG&Vt;@s9LX)m}eNCOWd9_NyP^anPRlEBKp01t?4NjO+R2r|g3_a;s7zur> zA}hQpW%NgN0ueSNIUQ<=HzQbz8)%yH0m<0k8zM3X}E^$Of zfA)P5$sthSw=!e%UAwF2xI4POL2+?8C5Mj;y{XUwOXjHHakG<5*S>5%?!&3*FL%oA z0hynzc(pO2P&e3j!>BcxWvey9vz^Y1rfo1PN>)wGg4OH6+|hq1uXmh&bxvYKO(ln4 zxNigvJy~8Pzg3~AK7QzMg~F$+=PGMvpEIy%UKPA$EG^NOa&W6W&P&|?{n#s>Yp-%A zm4~&~c%?6@!#j&3M~-~U*1y%Aa>^{jZa6*U$qS9Hndy~{mhbjjmRzqVG8Z$I2f%8j z!6YW97qKS)I31k1+YIf{Z6=>fy?SO=Z5x~U$AHpF71|j=AmZd!R?&xqG5wvIi+e8j z6V!TGT3+puy6FCc7+lIiryEQv=D1fCe?3zf=O9UH{ZrB z#2o`B{6ycGb|EOt2I?4WX;E^Uvuk_Vy!b}r(?NG}(RF9wst44pIsAr)!ex&hDUaUN z6?DpW4hFsd)DoK0eCnE(t+#)YKa=wc*H?)eGBD@?N|~NM?8=VDcVV_^KhYJ+Ed z9U8VD76CiWMU`)zvJa)sFSByrv>&|V*vC5>pgx1a&Cc3ifDEj(Uf=6F;G`B2e#&g% zI~am8Mx>;l_-u6R<+1+FOVjddaN~y+quDXl>N(@Hg$IlJ%jxfrRy(a8x!!CB5!55! zglfU>T=nK;^TFNw_Pq}X3i|H#Du-+)Hv#vz!#QsROQSNSaYi0g&iHor3zb_0P`m1s`&J*AMh z%^a<_2Cr@hPrN+;;_)FHs{UNyK=h~%MB5j6oQJ74*U$rImpy-es9PPW3G3ecO63sR zg}K$W#9a27SC7=+1&*1GcVzYUCzR5Wv2*U1JGXD2YYy8Ie%bF~XWxo5`*vGsQ6U()_;dAh3b)};oT$+UMj4!+c_D*3{HRIXHX>G^@G)5eK4+YKAP zTAmhHgKihg;u_IT<;X-~kXNdvq7i}o;HwP~C zad!?x;Ty5SYV{GYfga1{EaYNH3dY3!FK-E!^-<- z(2_k`#FTFAlwGw{C+Gh~lyS9`P@TV*K%QJXthhRN<@x$A9;~bU~Ttlslpa4ak z?DO01uj${V7`n>)Mm@OI zQs>W-_57v{&51$!IRv-Tf3Y*P)T7>gs11uQ4}!HOoB&i8Xu)a3%=sLx4eMr}=iOfu zu#9sjDY-9yE|_8BPSp%p+#K8AOD8}{FAB~fYG$6t2N9h!D%W}j_Au0G7`JrJ;Rycs zqkYffa|`v1vDQONZ_3$2=Np~2@KvsI30h*7WKT(oq#lS#(SVZ&w@-EBtQFG`)p_Id zBP?$V@8YUMQI7&wOlayIr28cVl=&}=8u-8uZGi>h!g(r>y^#S!c3xuD^S&GSgh^y#N}xy!S}n#*>ZZIQ`7 z4^CswcC|qNKTIEkq}%(qZ+EZnJU7aAzVqR@&R;@KS=xD)T@#g;mw&z$-$>|FmKa@8 zVqV#(Q~T+{OgOD_-+HF}TmESd99MPCbs&^d65(ts%Z0C}OmuJ<_P3{HQi5*=)|^wv zo{u^F9L@mY4yKQ5-k^|~I1Z0Fyw30n;gxp|TGJRzRLRaB0Rg}$CMrE@& z==y9mc-7I3ENygSt`54nfQxP|G)1=;nW5W@yP`WwyQA_Iw&?ykXY_EBCwjEi4?W&K z5Ykx5A77!bpWdP7 z&o$`Vmrv;X*GBZcxe0y$4xa=5eg3t;zZUpy3&7vG_-)$%PYD0Z;y~a3Mq`rwpGyGF z&Wc=XQp!KD24;s}AkwtEkrMt>Q%KlB0>SC>pG%No2MN+@{I(K5vddKC_YCn9duug* zi@!s55CQl$ewk<+l8pU|U6vncWQEB}_$7NAKgr#(0Gx%}y`x9UfoWR0Vjx?tRQF%9 zOUlQ5EoKUY4i4K1z^Gr9F0mgbvFe1?Q?bHvSqV7(Yj$z@Kw`)c*G{fo9sY*BmA}n4 zT+AZX;P2Qw;3w3{{`vQ&Ba0-<0?<}IbPck5f`E=n*O8@cv)>O`stM-oklpBql77KY z5S_6Ac-mQ>Vg940zvL&B$%bslE{7}jgQo55r`eXtgreH9i)FTv;1~!b?Igxp$#Uq+ zCLmu8SLm zFc61DRB0|^U102GM8=27zM~pZP_u|P=gu}v?mI?^JE4Q>1LDvM0Q~(B0K`=e` z7tWIpBGKJHk?7uGRQKQ*`tYO>-ZQAavIKp4QHDOhynz~Cm!pQa_fX@zhp4Hx0yT-M z;jH;NoHM^gUq8QZJ8S;;oLTG$|HA*LEC9pA|AzYhhf;z3KjCO;(N{6+|Jy7;ju(Zx zJ${cvLJl0iRY)7Tw2;5F=a1yT^4IqNiM)-zBgUV}rS!P&KXG(GE~W?4zFNA@?HD>D zC+S;SoDHEW>JC3JbVx3ycUAy$*#7sDVd$7#Oy8d*2Y{D&V*CDryd6Ekl`#BBZY-52 zwtq{je1gyd$HGe|(r3hEay?}7$y}K{Y*}Z|Ng$I0=_@x&BM}EiL_2 zT1#Nqkh=VpJ}oT{>aFy0WQQereo^0+7P~g_z(*d>{+0Y*a;?(I$lui0iuNNp3<-Vy zLLUn$br(ZvjQET8YV`-OOB)06OMj5a6#JVDgXS;%O-wKKXBh^$o*mkgq;KmlG7N-N zRUm2ePfU-!QQ9A68E~HXA?ck}$prhy{%$BC`5_?bTUt!P^goR!9WjvQgBJE3jaMBo zNc1I}vHjHdLpw;clF;KJ;pc(91BQ;s+8BRk_-lG7wOt+lhQ1wxZqL7?mto-i-lQr~ z35)();bhH$;WtG~4Ao)dv>EZ|*l#NGGb4$S7Kg)9a`10y$&iG|iQGqjho2^brC?tR z`y~h)C80!=A!r4x1pL_dywes!j1Xw^RET|OAEjl^Oq9-CR@r2 zVt$9RrA3{s+qSlma<>aX6ke^;H1MUJc6l;M2^n5bs2D=x7o;*|K*`pX(6uN3kqjus z1nuSiL?&LiwY2`t^Vu?SHDT+l%%56<(0g-H>oVL%fIHQ%0P=fCgZMtd8WJ&4p-;jrgY1~GJ zm*Qe9Kq*~IyPF~egZza2GhK^Bq9jL7e6_0sx)zzwyM&_T14>79GK3tg4u1X{y5B7K zH|z16c4@V9Tj?FzSzIyPZf%4ewHrw%_JcOUj{Tt3ui6MZ@+%oXZ6o}_&iX(3{m+D? z2mjoUej>zu2iozce%YQ-+{bW}OM4{_A=!>llK&%F2ZZejq*B{SRQMI0Y|#vLd=wy+ z&_0w(R55_qFR3Jzk<&5zYa&uQ7W9{*q&mnF0mnyNJcJdJu*g81M)+?!kzc*Y5P!Zx zs0o(&_z~f+Gw>9pSCAocDiVjvLUD+h@dLju|3C6b%a!UO(Mu@NQ>wSL9@2W@?F@d} z>fM5X!gJ&6Vh>GRV%o!;T^4y3;~xU{82 z@NW#n--Mzizblw7S&L_pzbR<_J;C+uvHPe886$=?&a5dWUw z-)}t9*7-O5*8>0BE%576S#~7uKn-C0H7_2cRM{H%T1yA4fP!q8plKX#$3n!}cnVjP ztgC+z)RqktI0s8mI><$AZ;{&V?nsHQUTf(p^tDRdImHT;u}Ja@M=l<{(}(n056t-Wnr0E zwzv$qWkZ(POx}CJr1z3h&JU=|1M4lazcUI0WKyOM{kat$ZXNS96@2B9qDfQJC z;aZD`|I-WrC+5 zrYhI$M+OoNIRxNkxLVPGH&IuUGPR)zGcz`v5E_xvWYB=e(%85h30ge&iSYzo$4rc- zb{3z&V7w*;SUQn(Yy-14yqO*o3xkJaVkV0>GZ23o?_>s#4855lC>d`HCKJ53{f29_B#wXxnh|?qx+@1i9Cie*1b|x}5xNetlIb{3ibj zYN~lE-apsBf%&PHoTJF!#(-vqqkF`%K(v;QO_5&^QcqoUo zc=FQ{5ACq@XDI+ui-mLX1_OYcRwsPM&5@*)2pU|-VW{IQoUeuNUCE1&<2y>Xr~gr2 zyYkxW(`wUJeWjR|AM1k|ac!#MErM4F<0z2IULBBfN<*B7X)rCx1HAwA?=Wk~N&gOW zQk?(DnGDhX-NWxU_zx5=Ss7)1X&HU>DA)1}p~D8!GTrVgPfo~*Jo&Jv)vfBt4M*ck zZ0GB92D+`ubU&|nTSM2)jpILNrkv|%z0ocngNA=(u25gO`_i6Ir;}?NzIu(=-z|TB zO7Q7zZ-Rt#e}2yKZYCqw+!rx+y4PCzto3fzX~?iv@;u+Wxh9bDzK(7f*~l)m&^Tk7 zV(7shQ(WuwsfXW}i_3K>iiH*<7ZmMnKyznSc5hA({8Rb7?>C{Dlf&#SiZ6TjUo_$Z zGcshzQT>Z&0vcOBE}vD{oPPNH?1y>Y#aCi=qOW+(EN__6=`(w4`b-nEeU%9T5ev>= zVe4$KzbNc(IOJpP@*@gcQ-+)5I~Uh>dk}VZjm2==EsqvuG`*?m0Gxf1L zHE+zyf-*vx?h#u>CznO;FN&cWQL=T?67KK1u_kCj@nc?}xS<;S{Y5IXxUr@~8pn^m z(k0v6^9)opv(q-#p8-V_t_#PuxyJQ@MF_DZ^nyxSfX1J4Bi$~p85TNtqo*aTRlIfC z7;Cg?Zg``^i`pPUUO2l*^mV^rbEkxrypS1d6`Nk$>gR_NODb)f&)BXN4y0dPGcvSz zjm1r?uZIogg$nT3toKzbe{!F^_xb7;<-^FXyWJeUV*WTw#J0$MdM^;E_faUUJBZ9J zwbE=4AoFKhY11Iss+D#Sf(Wg&ItWZ44@f2{6dnTx^~~TXVAm?P9-x8fvny9q<%P{9 zqRX@B&S{~I&(Bi0SGCfb4j>P;%wV5kGn9)o?>hB6eb;Yw8;$a&goCPu6hr0MHiethZk>TprXwFij9>b z`@QSeEH)au_ipJk!+|2Lv`?-ky)tM|#}C;{-=BT;{DqtT`xl>4W$6}MYZ#W(MH2(k z8#njcU&$0Me>ukX%^kf&QSrA)A3w}>G+`+e@6S7+OPO7z_jKLhyZS{XsfvNIgY|D# zKTv*J8Dn?MY?EH`{-aA6rt8lntX{1#t8bT16>qGj1?7iw8cReAF8gJn+(&orzS&Vd z^w^80sfqC)ZF8#GUo<`ESDJAzxClK8s*`WtyP0|MazfSH(-Z3=Mr!O`_1W}-%goPO zX|e2`s9vey+$>!{O2aq`h){1&{iR!V;Ce&-`a!6`}g5aoK$#=J3O^p3rJ z-+#@i6tm7_8#!UZO0!ypPw^FgGeF64Uz-;R_jl3*LxcJ)nv-;kaF5FgYZ@F zigs-uwfNx$e<(k4n=4^=`p75RrQK5wd=l9&&c7VvQ6yRpe@`9$Q4ELj+4EmcK9F*G z+Wv=g#{hYg*KzoVP%>Zi$sRjq@zc|Vn)`wZ##)Y%vuRdmnaUTv-k+m?wqj1a-OZRM z)$cd2K*hcp!%rX-GWA->MxpU=e%?l&v;xi z*R)8K{Bp`0yA!kNF~bCVsJ8-Y&Sv+Wp8NV#U75U1^TxG9i*mB!iq|b?*Xz$$Q8;Kb zcd2FL7xMzA>vKD)eZ0}%^u*)$?v0aei)+{RH)LNfc^MuuaM=?V4x<4%HcsYKzl^+# zRau<>HYrG0+3@a`6UWEh;O%WqiW;L2+EnZCec?BmH5l?zfkG zm-oX`2MoF*$`1%zd_F+nW&3@1-03W%UK&DoC*8@e=LHWB?0zx(?$ooxC<^Jx;mO-7 z_Z&BUb${2l;nSWOXb26APWR&!ryn=}Q_lDCvN?s1*Dl_w;I=)+o2Hi* zt?+d4TBcZIBzL^ILqF;NE96HoTl36 zs>LV!hdt?;bd}jLdwtG{f@=~A-()YY=~jR236)+ZqT8Ijnb)9_5}W4}SNkye`pwRd za0y<^!YvcShZEm>ILd4Ew62@8pi;i#VD4klSDl`p^xd;IHdWbR*PgXwtmBg>!@wa{ z*I&vmE=k&^^>}&kE4jYKnsBCQ(m~i=j&C~C!BlL zU)_{73<>Q_D{9}kDzwmVXsEqde5u4DT)^RXdQmn!anR|Tn^y?S@66NsE`Mmmmb%w_ z!-{iimoD|Aqq!p}&ZT?Qk~WWN%u??Xe(Th5{|HkoQ7!-p15K~rc;lMq&n~=3bL@3M z{z=Z5x!H+6Ub&iv@DizGlLf^zh|Jcw2R04 z4I4Raep#pa5gZ*}N%M{SYaaA_R~85@o)tzJ#B` zp#-X0DSYR?YI|7Sy>VMhKAimOZaR`cmV~j*I^keuLa{;gmDvSqJ4X!OYJr5No6N3V zwbtk=k3!^LRf0!b=J*x8K2A593M?5OCmJ63B!(qw?0Bh>eVY#d`pVhvh7Ypo`7dH- zL=W@~M#zghZpgcXjbG1Ee9F4pn6g34><9OPA`@Si>jK7(M`8x8xIf!0b7JM)yYV-Z z&DAMGI-w#}miuZGi&efCUe-TS9hQgCDrYX^nOW%lM#ngxXQl(znvVwYMFtH|m&|ig zetqfnanr3)SgA!OrGW<$qpWtkT(#yV*6GyimD*V=)#R_wx+U-$+C)Ktl$tIL7mL7P z>o<-iEQJdKDVi@{q|b0o@G0A;q9K%D>BV*E-Pxkcvn}gy2`uK&E8NekYK>WwZJO|G z+Kgy=UGO97$RR}$6#Y}XBRZ)rrA*cp;i0kon14+iAL_*&3ZZw8{D40*%vteVcm>5CVgRuSiH}{oY%NvQQxDR zCr{JU|31m-!Ku9g9v{MqL{Xy|v#yBwwO-%-p1p2S&VT{J-EQ%A(?6ejQf#Pq06lX2 z`kd1|ZDDg|!jbJY>R(3Pt$2G{5j@E#n_dz2J=1ti{^a~8#n;c*s9inweU3q0bEYxQ zolB3oVX<(%T^1euE zOe~GePMXRruFZ=7wByFhwVk1FyMtg>*8r4L<2Z}6KWeaXS?t&MMXxm!5)W#$oc?~` ziA%1^u-&N7yU3!s=M~azuI1Z{)+IEAJi0k!edLR`=KXl=km`azwGJIn+VRJjPx|xK zSMlu^eV9m2PN%a54fNZLj_O986S=`Z+A-B3R;g3j9r%;gPI(P}=FT@Yi=32uhgEnT zv3pQteR8&oi$JHudQWL;?Ym0Pk%Z@X^l)+S(0iBT71C+VWiPX)RWEP~d)hUqoBF)N z^aI}l)fgh>9-9m9Jr)++8CzGk=oZwp*Rn(C^Tw!>>#N^trRnJo5a`d+EU&8bRXTgd zm{PnvkIWQmP8rtHv+%;^)qR+v(%xTfz8ulBo3_X-XrcFR3QUIjE{~s#H!bZm-7f?P66`SIOY73 zIq~;Swd{T3a>L}>$Ft$yQdE*IxOz{w!iubk5?4C zhc`2KyFIL1$z48LV{2)}WqZ>#kIbr9=dAVi+f6Gteyq!xuSd*2>9Yq`khGiy`PCmE zho$t7kBIEn=bFX&k!z>Dj~=m)23@0S)%l0VyJQfo(dgZ>8gD3hY&D?Xb#h;B@;ww|(*V=(8=Ep{EhZ+wPl z@rQ@IS0a=WGi@kkm{N6wu|IM6sJ%^eWdA2mCNx)#_PH6#DrZNMu!&f=(%9&hBrw~Q}0&%NwdNltev9jx=9l$^*H=%^Gacx9cw=(D>-@T$vOyT(v(XUhiBvn%C8p6q^{>C|U$H=i?o zKMuLEW6G)0ho|*wlON=LE4yt;y!?aKP*}Knit6m8mGVUwPJZj6Cc1ESeBHHY`W_2D zrp)v85;;5wx}%DOW&`@q9w`4dM%1hDfu2&PHQF*{!JieUyUs~$oKU;Ev01Tj|JPmP zC~x2RZsGU7Yrq^|#%7;iKsQu1NItMBydVigC*;3d;>(C?6h5G``MD z>yy%FkJjYqZXznSeJC)R~mUuq^oL)7Gf`&=B*TTqC4~8 zu#Le-{pf{TO8t-1gz{5V{T=fcLM4#A^Q`r^CxJlPt;ilAj0)dbC(i0td8M2QlS}-3zJ^hslsQGU zaRI$zd&26(l%D(5^VN4GK6c+P`ugRYWrn<3u~Jarg3@yEsC|yL54%ks@>Jo9!ODep zQ=VP>z`PXEW3BF@%Pm(nn4%()L5>pc)G)G(p6g$;-b9y2&agY*F*vTFsU~u($l)OE z)Yy^5)~b=YDMXy_yps9zns#0oB08~cr-=M`PoX zw|zEeKAmUk{M~Om>hj5_R6aab#kz_Rm!;o&7G z&5={0h5pEtUkwjLYRr$TNL_4xArl$iN(oN+hol`PC&Y`LKEHeP2XHqDY*dGv~i z6-HX=Bl~GQ`eWAYNlmb>q@Ocx>)qJL{(+Ap?p!-M{Y6UL8_}3mbpw=cBlHiLcw%P!gkJXbhd}- znpJCKvpShp!?2bXJfQjgrww&C9?wxopDR+$ePE=z%I_V=#C_dC(a~|)?^nL~WUKYP zXqvCHW##~ysLORD^Y`it3VqF;Bh7-U}F(L=SK5#Rv4ry zT)xUE#!ltK^Zbi_R|)I1znE+qHOA+EwRa`pQ50!=0?4W2A|AL8n=ul>gZo!mf#noM zG%5=#y5c56knlr*1Xw`DL_|;#`8fn#1rKoXSj1yJ7J;a%peu)fTp~seIYbDD%bot; zx2CJ9?sWHb&rBx)t>^is?yuhO>+YJm>-=WN|8McRqjxp=_s8Ml*WcK_{N36up31xE z%-cd~b;tbeqbIL?D(^TYn}HtO+A3YzWA0jwud!!Sp2{1JfrGABCUH<< zYmW+>)01xPF|X3UF|si)quPbZHS#`wEH#~@3N4>%+jraSPYe2;y|i1MX9tZ=dF1W0 zsw}(b>Wq$^tM|EmUDH`j>g+jkLC&3ny4LJc(5C0)e@wqE`;&vse*0F}7Z+qNt`N?c zSLy!dPv?EqdQ#KBubl9k)XT=LoHu`Yh42gWDs6bXe#eY{_|E3Ob4i=loerFM=;@Y| zF$|MY?XE!`?oR2`ecj+=Q?tgs+xPL_b1wZdGil=7ZVmIN^r-Rj!KDSSS8qA;Xpe(y zdd|7`i#|yc_jJ2FAGJO>WgPFmbKHCV=2uT%wsYSdq25)SO>6t%*W({uu&U|&l@k{B z+;Y`-jcfgQ&%Dr*CcUr7zoO;hjI`NxCm)@4$?rc~xvy@c$F@Gy0wYPazv>dc^oxhz zy#3{jVYBO^1dXP{%9te^;mJ^qyIZS1+uyWZc??n`dnL&v%HK*s(!A zx@IqpeEA-*taxDZ^H+T_a_pw58I{{_T{b6m;&T^0u`~1PFB`mfar4h#Ju<3O^@Wqa zuiSC#7Y$O=n?y~9Kvlch}^s=88j^A=()MqsoT+yNCgsLmvt8{JsJDV;z{_*?= z(q28(c+30EM;1MYA-3CQbxBWeSBsC}U-w@A`frMdXV!VqZ zCof-cdGoXbd!I@@oYu8O1QGr$_ItcjDZ7AB?yn|1XQ?S4qxpGv?`S!*2R%TK?)Dy++l! ze&83aZksgi@3o4i-T1;^XK$T+>5)ozR(Q4Ycb#|Eza{4@ILB@}?=Mv+J@!Ve^rCOJ z)M&qQaKofWW|SOrHHCCMpk>T`XxGkp8)tHu**LA6^LK4Qd7vaQiw8%0(68o{)&M3Q z8iEQy{Xv|f{lyr_%PsIff}}YN$1G4g5ND)MTLbxc*26xKli7%f5uiG!n-U;Xd(Z)p zFgWvH!}@&{sOfzm*gPIX;Ch7O?rf`p;$*oSNo?p4rm4}yj@6M71h zwH>~(pn9jG9)O$A@F++atL&;CzPzu3hWjEk?8lJFtv2h-yFgV>1ziAVH;^~kmG^-< zarrjDQY!*Y0W~eJdH}XRgHC{iaeeL<+0}O<%C~{p`|@WXa3&~j*;PF_eH-OXddQt6 z9=QG!>vK2BZh1dc{?X(|S}Zux`hdO#-4HE(Jn`WFSCCI1<9Sz~D(Q>i z&IeU+%NI)=c#c%c(SnlQi~PV*4fF^|In7crdP< zg{`Xm1PpTou6|zSRns9KWuInnf}=EKx04@5*8uHRvEXb{4R>uBZA|7PVb6)iIE#4+ z{u-)$Zf>N-UKwpB$S|cPyMz4a7(n2_onacz^eG{`)B)}+)38Qa%|iDo(4}s2GY)Ae z`)rV5N>g?(@=H10?4_fspzrmJA%pJN5BrZ!IzU`y&^$e@uu5C@M9D98gFETa|1`R0 zQZ&|SrhX^QFm*>TsOJXDE2N;c<&IfWVO``DJ;O zt@s3oU+hghvSUA_hBFon#hDs(j*+pL`Oj1G_q2#cFk{GWl_Ub5a)ve0p$F1`DResSY_tgI9|G%Ay=h@5WcB;PriI83D;8d&s5-GdX!Kw29 z7liCm2j#u}6Qt}?2eiv$``3@`r(6H$m)`$X-%U67={o-5CbNv=_wh>{|8g1swQ1(-V!=+nE&SbW54s?Wi|(Fm0$k`&PDi4HI8o1x45i-;M&Ak z*FSI`+%$n)TJHhnl7_OY2I1{M8)Q7~fY-m2`Wg^bHdS`%Mm*=LM}zo$?F`pH)t2ew zvB8JyU>;Ws3Hm)y%W}hxbWZEvcuajl4ayp);tEm+YB|w_K-vnRzMxH@&e77x6A%9P zfeaIr4vYfehzD;Fc>!s-iZ2KqsQiPFAzq%q$9+wPNu&;NKBd8zj(D*Kl^@U&whkKS za%$hc++EwZ{=E`?)1dGtf-iK?6LbP3jNkWQ&6K9v&d(-k$9~=|Sy=5|iNF~o4*>SH z4`Ri`=W3hZ9-!g=d8@3_&;4UFK-Ys3{y!FkE`akEkkJ+?@g87p?l;eO)^JCnhBIQ3 zw1nXTy*Z#;K~;jl7&K4d<~WK;2e`*Z+g|X9c68rXM3pdHH1am+4$zrF<0}pRkfS}Q z#9~W?NyEBg0jL+KR%u`=?J^*joemZwd;o~o4xIJ|a$W=Cz7)2Vl23bq0~QcEJZXw_ zXJK;0QBWmf=jr=~LZLPczzN(U0!N0k|HhljgpH%bg5YKB%RL>jNsc&qT$}dEC_#F4cB? zG9G;c)39&3d?r@x>Kq6AcAMthq3z$as9Zi1H|(k$bh|y1viJ`CU{_@^JrgjYDQ)~H zGE&drJN2_}L6w7UY25H5O&HYDEsdWz@Ja~wX!ubM+b|q+WS`;~D9aB{yR_s165nDx zdY8{Z@WPL^ECgK#S|{So_3?Csxm`hEWo7u0FQM4&^p7%r3u0ef7~Dgq;Vv^#hbjB$ zK0@Sq1~3l}q)#|@2mIXQsGT@+P^|go8YlUz)=X`#9VyzvXqrM0ju($^kS-AH4*11+ zIV&Igoq=28r_Fg^+!06oG(1?xaXy=pAwDqdPWU-Dt75jgS^w_-l0#gE$%jk!8;l2n zut2fLieJjJ`JF-Pc)}90=nR z`}c45GwneO0zYBxS~69fv!FgdlN;l_+Y82eZqF;X&U*CcP6pz*Ve|8D zNz{#~bjiZelm>nleq?VU`b70T$$)!fwW4*V<#lC_|LFeh+M3BtJmFt4x|X(Y!~2ey z)riv2|Dhk(X_I3s4XwI8lR7w(|(v;D?-Ku?%$>ZWgAyh(hcC4lPzLE_)L z=1mRvA;*ke%Dig)C87?nlOZVlTo1}~f+U6#Hvhjq8s~Yh;Iap+i?e8~G6aD?TAPsn z2WtINVh+~kJ(BWsK3d(w9t3__mYvOc(nGt}N;Mkir}~j$?eyQH{kBc;C{6quW_D8l zOU>(1|04R2OP`nT3vKuQqfZ&^bmbH#LC8)k z{U?qc66br`<@svtg&OYAmD#-a-;u-5yJT0kU6=%-;1`P(ijN-^YZur?m-*IA{U4)` zgna(TPXds^2LIUzn+(Dv2IET*q z#A@OnKLp1_$soZ=+^UVZGeE;Zhd_xPzXiiY$N)CNsJN|eB)A0B${HT4AG{*tD{#as z16T+XE0$REq0ofLpu;cm{>O^TPrg`X;P}C&SML&MPnIQq%IZf3?i1Ph>66y;A;p}k zAH5|yt(y#Xy4H1GuI99@GPvm)Y0KrB0#ycG$I>cSx^{d26dB6pS^+ogG7d7d1o>X8 z!H2aRH7V`Ux*d8@_=`iy!ag3tief|`=4vk3MY>%`8>a#m&@OrqtCC=2DH0bPh4N~0 z)e`I~T*U;tB3Cu>-WslQqMfeWkU;p$%9c2EToR|mt;-?hl5$G9p^rl1SM(zFB=sis zsOfq&^h~{Tofhd5l|kgkk1QQdK96*ey1`}<{J7NGn?YJ)n+=K! z8*xg*lHsloS|r1cA2x>l81w@u>Ut%lsSJ7z6gM^%AGqa#xIaU*m3huO$9i|0$DG)o z9qgn<#1Y$DpoCzv;1g`^&OtAHqmOlu4fSJcOTf?l^z#LiXy2*JccH#}cKEFE($8@u z%Uww8faMDPy{G~A!bD^9gO6!>FHO<+sACV7kLg9;V?Kxv`Gd2R8LS2QOts!}r62Jjds- z^3l2&mtEp%?E=T2e_9c#5@nf*z(-zOKjDR!QyR`I9w_`o!ZK{9^lG?~Sa+y#bW0QK z+3s9F%<)(|V=c?hZ_Q^-qsIFkSK~Kob8m*h(pr|C-$<-GtZA(AUNOpV)S6%QTg$TZ ztLf>srm@DCXMA3lO1IJ619Hb^0}w+@}TNxC!Lu7-|!K6 zeK!;R|5gH@Q~SUNMp^fi;BC`Ju+|@Ld2HHOoC`hKzVd-F(d{dn_UU@Sk?m8?FGkv@ zJ}|oJLdJoe$?zVL6=TjfeUm=g_X)?SfEx)n=k&zd2edMXr8)5W*L_K&gxDYWm{mZEHdB}OP4+l@Y7GLGg@l#EsDjpTrrD4csT7Ycpdlewke9uY{c0rqnomVqrbNU70m}e3;=9yrMxSJlP;K4#+=d~#i zb|^V7V#^a_5`ODxguU-yi9_P58Nn%WOF5)m;&cWSa#HTdCkp-Kk%gkCLh6lkOkq%4 zkZ~SBpd-)nr5Vxnxc>}_ zxoo@gt@@##&r=z<=3K;ipu0d~bB~|rZRHOhCS#44e#<%d;@f7%Xk|wm-!T;qk1Ws5 z_Hz#(*Ft%@Thgt3yFKq-?t!r0dtxVx409`=YxAS&SMrgz-Muq1&d!cjKI6S&aJu)$ zu3Q=BrF<_K-0q!{W!c%MLiuH>f3Iar-6rz=E9>u1$|UVb{d01@$W1qisDEU+v_<`k zJ&3v~)%utJ#Ww#x9E(Z#{}1O1=CD3B4Y~tloH=5}jd6uGSf+?`261vB zmi8XPvR)3n$Q#zo&zhFa3UaEBv)p<5LVBvOYR~sOUI&WvgZQ<*o9!%EmU~p&vOds67kf zJdvwTxChb7!;L@VxRzHxb74i~9W1HuWqCDF_r5C5-SNVI*WxMW{rh6i`=jEFFKd1w zBhLS#;kiE6c>1N0arBGx4RBtB470O0&bm!Iet5sk?u$P&@w^|d*($+X$TLo?xipx= z;RiqS9p1gc^iCP&fd7tPN-t?fpE{*ZV2?C;I#18g9uufcl{?&QI9)!@|*l)NgvdSO>2q$J`TMKU?a^GgQBm z8#r9+JE?1=6aOzxeB8pF%5eLCbmM0ice0Gc|G&%fSO&G}GiEw~x< zE&P{B25@)6*y917WhwKhHsWbE^A47^)2!;h;xd*-yh{&i|PH9`Q2>biu(Pyp!%Y(FaDbl4a0iucJQpGmkpZ~{v*O* zke%B)WoS@{$}wHdhs8Vzfj5+0C|oz*8ZcgUaA z(!eSlHkftpotZr(Ysd%_qDD=KDm!BUiobb8yFr8cXZ6Y$0=$hf1`SGS9N{n|XK3z_ z&e?qidc@N#MdU--xtYC&=Aca7kC2?q!9#&Fv-hnzS;MmWXWpBc>yc}7$u$gflFxO+ zQ3es;lsPQ3f4Dz?Tc>2?cFrC)@P9LNQo=*C+V$#{nF}@c$>^V(sS72TG`2w_p*J>R oZ`IgP0ur=pET0fO;+6XK=XBRVTh;=h(8Q}xcR_!Z&rSpX56 Date: Tue, 23 Aug 2016 11:37:02 +1000 Subject: [PATCH 26/37] add useful options to chokidar --- src/filesystem/impls/appshell/node/ChokidarWatcher.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js index c67e6d4dba8..13cfb158b96 100644 --- a/src/filesystem/impls/appshell/node/ChokidarWatcher.js +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -32,7 +32,8 @@ function watchPath(path, ignored, _watcherMap) { ignorePermissionErrors: true, followSymlinks: true, ignored: ignored, - usePolling: process.platform === "win32" + interval: 1000, // while not used in normal cases, if any error causes chokidar to fallback to polling, increase its intervals + binaryInterval: 1000 }); watcher.on("all", function (type, filename, nodeFsStats) { From 2b2bfc14bf77dd33a63e8c83621a5b624f78155a Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 12:47:07 +1000 Subject: [PATCH 27/37] add glob --- npm-shrinkwrap.json | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 8221cd368ff..1949ba7a559 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -199,7 +199,7 @@ }, "minimatch": { "version": "3.0.3", - "from": "minimatch@>=3.0.2 <4.0.0", + "from": "minimatch@3.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" }, "normalize-path": { diff --git a/package.json b/package.json index ffa7253ee90..a33211f7915 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "SHA": "" }, "dependencies": { + "anymatch": "1.3.0", "chokidar": "1.6.0" }, "devDependencies": { From 48c200e50de478ca5137bdd5d2f18796763645f2 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 12:47:38 +1000 Subject: [PATCH 28/37] refactoring --- src/filesystem/impls/appshell/AppshellFileSystem.js | 7 ++++++- src/filesystem/impls/appshell/node/ChokidarWatcher.js | 11 +++++------ .../impls/appshell/node/FileWatcherDomain.js | 7 +++++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index fb48557a57e..fe4424112b6 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -112,7 +112,12 @@ define(function (require, exports, module) { switch (event) { case "changed": // an existing file/directory was modified; stats are passed if available - var fsStats = statsObj ? new FileSystemStats(statsObj) : null; + var fsStats; + if (statsObj) { + fsStats = new FileSystemStats(statsObj); + } else { + console.warn("FileWatcherDomain was expected to deliver stats for changed event!"); + } _enqueueChange(parentDirPath + entryName, fsStats); break; case "created": diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js index 13cfb158b96..b3db0981363 100644 --- a/src/filesystem/impls/appshell/node/ChokidarWatcher.js +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -1,5 +1,8 @@ +"use strict"; + var fspath = require("path"); -var chokidar = require('chokidar'); +var chokidar = require("chokidar"); +var unwatchPath = require("./FileWatcherDomain").unwatchPath; /** * Transform Node's native fs.stats to a format that can be sent through domain @@ -20,11 +23,7 @@ function normalizeStats(nodeFsStats) { }; } -function watchPath(path, ignored, _watcherMap) { - if (_watcherMap.hasOwnProperty(path)) { - return; - } - +function watchPath(path, ignored, _watcherMap, _domainManager) { try { var watcher = chokidar.watch(path, { persistent: true, diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 22bdb70936f..1f95d407654 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -28,7 +28,7 @@ var os = require("os"); var watcherImpl; if (process.platform === "win32") { - watcherImpl = require("./ChokidarWatcher"); // TODO: "./CSharpWatcher" + watcherImpl = require("./CSharpWatcher"); } else { watcherImpl = require("./ChokidarWatcher"); } @@ -73,7 +73,10 @@ function unwatchPath(path) { * @param {array} ignored List of entries to ignore during watching. */ function watchPath(path, ignored) { - return watcherImpl.watchPath(path, ignored, _watcherMap); + if (_watcherMap.hasOwnProperty(path)) { + return; + } + return watcherImpl.watchPath(path, ignored, _watcherMap, _domainManager); } /** From 8b7c0b10398d59438c5ea278b4346dc865ac2879 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 13:03:56 +1000 Subject: [PATCH 29/37] implement CSharpWatcher reverted node in travis update coment forgotten export --- .travis.yml | 2 +- .../impls/appshell/AppshellFileSystem.js | 3 +- .../impls/appshell/node/CSharpWatcher.js | 125 ++++++++++++++++++ .../impls/appshell/node/ChokidarWatcher.js | 2 + .../impls/appshell/node/FileWatcherDomain.js | 1 + 5 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 src/filesystem/impls/appshell/node/CSharpWatcher.js diff --git a/.travis.yml b/.travis.yml index 464408502fc..5f431ee20ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js sudo: false # use container-based Travis infrastructure node_js: - - "6" + - "0.10" before_script: - npm install -g grunt-cli - npm install -g jasmine-node diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index fe4424112b6..022dfe00fe2 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -99,10 +99,9 @@ define(function (require, exports, module) { /** * Event handler for the Node fileWatcher domain's change event. - * recognized event values: "changed", "created", "deleted" * * @param {jQuery.Event} The underlying change event - * @param {string} event The type of the event: either "change" or "rename" + * @param {string} event The type of the event: "changed", "created" or "deleted" * @param {string} parentDirPath The path to the directory holding entry that has changed * @param {string=} entryName The name of the file/directory that has changed * @private diff --git a/src/filesystem/impls/appshell/node/CSharpWatcher.js b/src/filesystem/impls/appshell/node/CSharpWatcher.js new file mode 100644 index 00000000000..816eb369cb9 --- /dev/null +++ b/src/filesystem/impls/appshell/node/CSharpWatcher.js @@ -0,0 +1,125 @@ +/* + * This copies the implementation of VSCode + * https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts + */ + +/*jslint node: true */ + +"use strict"; + +var fs = require("fs"); +var fspath = require("path"); +var cp = require("child_process"); +var anymatch = require('anymatch'); +var unwatchPath = require("./FileWatcherDomain").unwatchPath; + +function buildMatcher(ignored) { + // in case of a glob like **/.git we want also to ignore its contents **/.git/** + return anymatch(ignored.concat(ignored.map(function (glob) { + return glob + "/**"; + }))); +} + +function watchPath(path, ignored, _watcherMap, _domainManager) { + + var ignoreMatcher = buildMatcher(ignored); + + function processLine(line) { + if (line === "") { + return; + } + + var parts = line.split("|"); + if (parts.length !== 2) { + console.warn("CSharpWatcher unexpected line: '" + line + "'"); + return; + } + + var type = parseInt(parts[0], 10); + // convert it back to unix path and clear trailing whitespace + var absolutePath = parts[1].replace(/\\/g, "/").replace(/\s+$/g, ""); + + // convert type to an event + var event; + switch (type) { + case 0: + event = "changed"; + break; + case 1: + event = "created"; + break; + case 2: + event = "deleted"; + break; + default: + console.warn("CSharpWatcher event type: " + type); + return; + } + + // make sure ignored events are not emitted + if (ignoreMatcher(absolutePath)) { + return; + } + + var parentDirPath = fspath.dirname(absolutePath) + "/"; + var entryName = fspath.basename(absolutePath); + + // we need stats object for changed event + if (event === "changed") { + fs.stat(absolutePath, function (err, stats) { + if (err) { + console.warn("CSharpWatcher err getting stats: " + err.toString()); + } + _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, stats]); + }); + } else { + _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, null]); + } + } + + function onError(err) { + console.warn("CSharpWatcher process error: " + err.toString()); + unwatchPath(path); + } + + function onExit(code, signal) { + console.warn("CSharpWatcher terminated unexpectedly with code: " + code + ", signal: " + signal); + unwatchPath(path); + } + + try { + + var args = [ + // fspath.resolve will normalize slashes to windows format + fspath.resolve(path) + ]; + var handle = cp.spawn(fspath.resolve(__dirname, "win32", "CodeHelper.exe"), args); + + // Events over stdout + handle.stdout.on("data", function (buffer) { + var lines = buffer.toString("utf8").split("\n"); + while (lines.length > 0) { + processLine(lines.shift()); + } + }); + + // Errors + handle.on("error", onError); + handle.stderr.on("data", onError); + + // Exit + handle.on("exit", onExit); + + // Add handler for closing to the _watcherMap + _watcherMap[path] = { + close: function () { + handle.kill(); + } + }; + + } catch (err) { + console.warn("Failed to watch file " + path + ": " + (err && err.message)); + } +} + +exports.watchPath = watchPath; diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js index b3db0981363..83cb3c50a88 100644 --- a/src/filesystem/impls/appshell/node/ChokidarWatcher.js +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -1,3 +1,5 @@ +/*jslint node: true */ + "use strict"; var fspath = require("path"); diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index 1f95d407654..eb6314bc5de 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -151,3 +151,4 @@ function init(domainManager) { } exports.init = init; +exports.unwatchPath = unwatchPath; From 23f687e0f8ba71b7799a477dc48c1fdb28a00792 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 14:32:31 +1000 Subject: [PATCH 30/37] avoid circular dependency errors --- .../impls/appshell/node/CSharpWatcher.js | 2 +- .../impls/appshell/node/ChokidarWatcher.js | 2 +- .../impls/appshell/node/FileWatcherDomain.js | 71 ++--------------- .../impls/appshell/node/FileWatcherManager.js | 77 +++++++++++++++++++ 4 files changed, 86 insertions(+), 66 deletions(-) create mode 100644 src/filesystem/impls/appshell/node/FileWatcherManager.js diff --git a/src/filesystem/impls/appshell/node/CSharpWatcher.js b/src/filesystem/impls/appshell/node/CSharpWatcher.js index 816eb369cb9..18c845465b1 100644 --- a/src/filesystem/impls/appshell/node/CSharpWatcher.js +++ b/src/filesystem/impls/appshell/node/CSharpWatcher.js @@ -11,7 +11,7 @@ var fs = require("fs"); var fspath = require("path"); var cp = require("child_process"); var anymatch = require('anymatch'); -var unwatchPath = require("./FileWatcherDomain").unwatchPath; +var unwatchPath = require("./FileWatcherManager").unwatchPath; function buildMatcher(ignored) { // in case of a glob like **/.git we want also to ignore its contents **/.git/** diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js index 83cb3c50a88..b57fb2fb49b 100644 --- a/src/filesystem/impls/appshell/node/ChokidarWatcher.js +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -4,7 +4,7 @@ var fspath = require("path"); var chokidar = require("chokidar"); -var unwatchPath = require("./FileWatcherDomain").unwatchPath; +var unwatchPath = require("./FileWatcherManager").unwatchPath; /** * Transform Node's native fs.stats to a format that can be sent through domain diff --git a/src/filesystem/impls/appshell/node/FileWatcherDomain.js b/src/filesystem/impls/appshell/node/FileWatcherDomain.js index eb6314bc5de..73ecc3f7ec4 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherDomain.js +++ b/src/filesystem/impls/appshell/node/FileWatcherDomain.js @@ -26,6 +26,7 @@ "use strict"; var os = require("os"); +var watcherManager = require("./FileWatcherManager"); var watcherImpl; if (process.platform === "win32") { watcherImpl = require("./CSharpWatcher"); @@ -33,65 +34,6 @@ if (process.platform === "win32") { watcherImpl = require("./ChokidarWatcher"); } -var _domainManager, - _watcherMap = {}; - -/** - * @private - * Un-watch a file or directory. - * @param {string} path File or directory to unwatch. - */ -function _unwatchPath(path) { - var watcher = _watcherMap[path]; - - if (watcher) { - try { - watcher.close(); - } catch (err) { - console.warn("Failed to unwatch file " + path + ": " + (err && err.message)); - } finally { - delete _watcherMap[path]; - } - } -} - -/** - * Un-watch a file or directory. For directories, unwatch all descendants. - * @param {string} path File or directory to unwatch. - */ -function unwatchPath(path) { - Object.keys(_watcherMap).forEach(function (keyPath) { - if (keyPath.indexOf(path) === 0) { - _unwatchPath(keyPath); - } - }); -} - -/** - * Watch a file or directory. - * @param {string} path File or directory to watch. - * @param {array} ignored List of entries to ignore during watching. - */ -function watchPath(path, ignored) { - if (_watcherMap.hasOwnProperty(path)) { - return; - } - return watcherImpl.watchPath(path, ignored, _watcherMap, _domainManager); -} - -/** - * Un-watch all files and directories. - */ -function unwatchAll() { - var path; - - for (path in _watcherMap) { - if (_watcherMap.hasOwnProperty(path)) { - unwatchPath(path); - } - } -} - /** * Initialize the "fileWatcher" domain. * The fileWatcher domain handles watching and un-watching directories. @@ -104,7 +46,7 @@ function init(domainManager) { domainManager.registerCommand( "fileWatcher", "watchPath", - watchPath, + watcherManager.watchPath, false, "Start watching a file or directory", [{ @@ -120,7 +62,7 @@ function init(domainManager) { domainManager.registerCommand( "fileWatcher", "unwatchPath", - unwatchPath, + watcherManager.unwatchPath, false, "Stop watching a single file or a directory and it's descendants", [{ @@ -132,7 +74,7 @@ function init(domainManager) { domainManager.registerCommand( "fileWatcher", "unwatchAll", - unwatchAll, + watcherManager.unwatchAll, false, "Stop watching all files and directories" ); @@ -147,8 +89,9 @@ function init(domainManager) { ] ); - _domainManager = domainManager; + watcherManager.setDomainManager(domainManager); + watcherManager.setWatcherImpl(watcherImpl); + } exports.init = init; -exports.unwatchPath = unwatchPath; diff --git a/src/filesystem/impls/appshell/node/FileWatcherManager.js b/src/filesystem/impls/appshell/node/FileWatcherManager.js new file mode 100644 index 00000000000..c741c4a8072 --- /dev/null +++ b/src/filesystem/impls/appshell/node/FileWatcherManager.js @@ -0,0 +1,77 @@ +/*jslint node: true */ + +"use strict"; + +var _watcherMap = {}; +var _domainManager = null; +var _watcherImpl = null; + +function setDomainManager(dm) { + _domainManager = dm; +} + +function setWatcherImpl(impl) { + _watcherImpl = impl; +} + +/** + * @private + * Un-watch a file or directory. + * @param {string} path File or directory to unwatch. + */ +function _unwatchPath(path) { + var watcher = _watcherMap[path]; + + if (watcher) { + try { + watcher.close(); + } catch (err) { + console.warn("Failed to unwatch file " + path + ": " + (err && err.message)); + } finally { + delete _watcherMap[path]; + } + } +} + +/** + * Un-watch a file or directory. For directories, unwatch all descendants. + * @param {string} path File or directory to unwatch. + */ +function unwatchPath(path) { + Object.keys(_watcherMap).forEach(function (keyPath) { + if (keyPath.indexOf(path) === 0) { + _unwatchPath(keyPath); + } + }); +} + +/** + * Watch a file or directory. + * @param {string} path File or directory to watch. + * @param {array} ignored List of entries to ignore during watching. + */ +function watchPath(path, ignored) { + if (_watcherMap.hasOwnProperty(path)) { + return; + } + return _watcherImpl.watchPath(path, ignored, _watcherMap, _domainManager); +} + +/** + * Un-watch all files and directories. + */ +function unwatchAll() { + var path; + + for (path in _watcherMap) { + if (_watcherMap.hasOwnProperty(path)) { + unwatchPath(path); + } + } +} + +exports.setDomainManager = setDomainManager; +exports.setWatcherImpl = setWatcherImpl; +exports.unwatchPath = unwatchPath; +exports.watchPath = watchPath; +exports.unwatchAll = unwatchAll; From 68fe2f1938831b15a87f3339269633a1feeaf8d2 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 14:34:38 +1000 Subject: [PATCH 31/37] do not notify about terminations when closing watcher --- src/filesystem/impls/appshell/node/CSharpWatcher.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/filesystem/impls/appshell/node/CSharpWatcher.js b/src/filesystem/impls/appshell/node/CSharpWatcher.js index 18c845465b1..5eddefab144 100644 --- a/src/filesystem/impls/appshell/node/CSharpWatcher.js +++ b/src/filesystem/impls/appshell/node/CSharpWatcher.js @@ -23,6 +23,7 @@ function buildMatcher(ignored) { function watchPath(path, ignored, _watcherMap, _domainManager) { var ignoreMatcher = buildMatcher(ignored); + var closing = false; function processLine(line) { if (line === "") { @@ -83,7 +84,9 @@ function watchPath(path, ignored, _watcherMap, _domainManager) { } function onExit(code, signal) { - console.warn("CSharpWatcher terminated unexpectedly with code: " + code + ", signal: " + signal); + if (!closing || signal !== "SIGTERM") { + console.warn("CSharpWatcher terminated unexpectedly with code: " + code + ", signal: " + signal); + } unwatchPath(path); } @@ -113,6 +116,7 @@ function watchPath(path, ignored, _watcherMap, _domainManager) { // Add handler for closing to the _watcherMap _watcherMap[path] = { close: function () { + closing = true; handle.kill(); } }; From 1096f74e0900bf6e7bff3b0f1139718147c036f4 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 14:58:49 +1000 Subject: [PATCH 32/37] optimize: do not call domain function with an empty list --- src/search/FindInFiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/FindInFiles.js b/src/search/FindInFiles.js index 1375bad4cd9..eb703f42b22 100644 --- a/src/search/FindInFiles.js +++ b/src/search/FindInFiles.js @@ -658,7 +658,7 @@ define(function (require, exports, module) { * @param {array} fileList The list of files that changed. */ function filesChanged(fileList) { - if (FindUtils.isNodeSearchDisabled()) { + if (FindUtils.isNodeSearchDisabled() || fileList.length === 0) { return; } var updateObject = { From 3cf15ea17766fa03d626804bffadd7feb9db689a Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 15:19:44 +1000 Subject: [PATCH 33/37] ensure _hash is present in file system stats refactor, fix stats bug --- src/filesystem/FileSystemStats.js | 4 ++- .../impls/appshell/node/CSharpWatcher.js | 14 ++++----- .../impls/appshell/node/ChokidarWatcher.js | 29 +++---------------- .../impls/appshell/node/FileWatcherManager.js | 26 +++++++++++++++++ 4 files changed, 40 insertions(+), 33 deletions(-) diff --git a/src/filesystem/FileSystemStats.js b/src/filesystem/FileSystemStats.js index 7f97277c247..801b51b8de0 100644 --- a/src/filesystem/FileSystemStats.js +++ b/src/filesystem/FileSystemStats.js @@ -40,7 +40,9 @@ define(function (require, exports, module) { // mtime will have JSON-ified value which needs to be restored this._mtime = options.mtime instanceof Date ? options.mtime : new Date(options.mtime); this._size = options.size; - this._hash = options.hash; + // hash is a property introduced by brackets and it's calculated + // as a valueOf modification time -> calculate here if it's not present + this._hash = options.hash || this._mtime.valueOf(); var realPath = options.realPath; if (realPath) { diff --git a/src/filesystem/impls/appshell/node/CSharpWatcher.js b/src/filesystem/impls/appshell/node/CSharpWatcher.js index 5eddefab144..ae4a7cfb606 100644 --- a/src/filesystem/impls/appshell/node/CSharpWatcher.js +++ b/src/filesystem/impls/appshell/node/CSharpWatcher.js @@ -11,7 +11,7 @@ var fs = require("fs"); var fspath = require("path"); var cp = require("child_process"); var anymatch = require('anymatch'); -var unwatchPath = require("./FileWatcherManager").unwatchPath; +var fwm = require("./FileWatcherManager"); function buildMatcher(ignored) { // in case of a glob like **/.git we want also to ignore its contents **/.git/** @@ -20,7 +20,7 @@ function buildMatcher(ignored) { }))); } -function watchPath(path, ignored, _watcherMap, _domainManager) { +function watchPath(path, ignored, _watcherMap) { var ignoreMatcher = buildMatcher(ignored); var closing = false; @@ -67,27 +67,27 @@ function watchPath(path, ignored, _watcherMap, _domainManager) { // we need stats object for changed event if (event === "changed") { - fs.stat(absolutePath, function (err, stats) { + fs.stat(absolutePath, function (err, nodeFsStats) { if (err) { console.warn("CSharpWatcher err getting stats: " + err.toString()); } - _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, stats]); + fwm.emitChange(event, parentDirPath, entryName, nodeFsStats); }); } else { - _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, null]); + fwm.emitChange(event, parentDirPath, entryName, null); } } function onError(err) { console.warn("CSharpWatcher process error: " + err.toString()); - unwatchPath(path); + fwm.unwatchPath(path); } function onExit(code, signal) { if (!closing || signal !== "SIGTERM") { console.warn("CSharpWatcher terminated unexpectedly with code: " + code + ", signal: " + signal); } - unwatchPath(path); + fwm.unwatchPath(path); } try { diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js index b57fb2fb49b..4c0eebbaac4 100644 --- a/src/filesystem/impls/appshell/node/ChokidarWatcher.js +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -4,28 +4,9 @@ var fspath = require("path"); var chokidar = require("chokidar"); -var unwatchPath = require("./FileWatcherManager").unwatchPath; +var fwm = require("./FileWatcherManager"); -/** - * Transform Node's native fs.stats to a format that can be sent through domain - * @param {stats} nodeFsStats Node's fs.stats result - * @return {object} Can be consumed by new FileSystemStats(object); in Brackets - */ -function normalizeStats(nodeFsStats) { - // from shell: If "filename" is a symlink, - // realPath should be the actual path to the linked object - // not implemented in shell yet - return { - isFile: nodeFsStats.isFile(), - isDirectory: nodeFsStats.isDirectory(), - mtime: nodeFsStats.mtime, - size: nodeFsStats.size, - realPath: null, - hash: nodeFsStats.mtime.getTime() - }; -} - -function watchPath(path, ignored, _watcherMap, _domainManager) { +function watchPath(path, ignored, _watcherMap) { try { var watcher = chokidar.watch(path, { persistent: true, @@ -57,20 +38,18 @@ function watchPath(path, ignored, _watcherMap, _domainManager) { if (!event || !filename) { return; } - // make sure stats are normalized for domain transfer - var statsObj = nodeFsStats ? normalizeStats(nodeFsStats) : null; // make sure it's normalized filename = filename.replace(/\\/g, "/"); var parentDirPath = fspath.dirname(filename) + "/"; var entryName = fspath.basename(filename); - _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, statsObj]); + fwm.emitChange(event, parentDirPath, entryName, nodeFsStats); }); _watcherMap[path] = watcher; watcher.on("error", function (err) { console.error("Error watching file " + path + ": " + (err && err.message)); - unwatchPath(path); + fwm.unwatchPath(path); }); } catch (err) { console.warn("Failed to watch file " + path + ": " + (err && err.message)); diff --git a/src/filesystem/impls/appshell/node/FileWatcherManager.js b/src/filesystem/impls/appshell/node/FileWatcherManager.js index c741c4a8072..5a84c93825d 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherManager.js +++ b/src/filesystem/impls/appshell/node/FileWatcherManager.js @@ -14,6 +14,25 @@ function setWatcherImpl(impl) { _watcherImpl = impl; } +/** + * Transform Node's native fs.stats to a format that can be sent through domain + * @param {stats} nodeFsStats Node's fs.stats result + * @return {object} Can be consumed by new FileSystemStats(object); in Brackets + */ +function normalizeStats(nodeFsStats) { + // from shell: If "filename" is a symlink, + // realPath should be the actual path to the linked object + // not implemented in shell yet + return { + isFile: nodeFsStats.isFile(), + isDirectory: nodeFsStats.isDirectory(), + mtime: nodeFsStats.mtime, + size: nodeFsStats.size, + realPath: null, + hash: nodeFsStats.mtime.getTime() + }; +} + /** * @private * Un-watch a file or directory. @@ -70,8 +89,15 @@ function unwatchAll() { } } +function emitChange(event, parentDirPath, entryName, nodeFsStats) { + // make sure stats are normalized for domain transfer + var statsObj = nodeFsStats ? normalizeStats(nodeFsStats) : null; + _domainManager.emitEvent("fileWatcher", "change", [event, parentDirPath, entryName, statsObj]); +} + exports.setDomainManager = setDomainManager; exports.setWatcherImpl = setWatcherImpl; exports.unwatchPath = unwatchPath; exports.watchPath = watchPath; exports.unwatchAll = unwatchAll; +exports.emitChange = emitChange; From 9c78e36a0f3bf25bfe68ca2895de43995a7e8255 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 15:44:10 +1000 Subject: [PATCH 34/37] fix the bug with shell rounding the stats mtime causing false blind write notifications --- src/filesystem/impls/appshell/node/FileWatcherManager.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/filesystem/impls/appshell/node/FileWatcherManager.js b/src/filesystem/impls/appshell/node/FileWatcherManager.js index 5a84c93825d..1833b492995 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherManager.js +++ b/src/filesystem/impls/appshell/node/FileWatcherManager.js @@ -20,16 +20,21 @@ function setWatcherImpl(impl) { * @return {object} Can be consumed by new FileSystemStats(object); in Brackets */ function normalizeStats(nodeFsStats) { + // current shell's stat method floors the mtime to the nearest thousand + // which causes problems when comparing timestamps + // so we have to round mtime to the nearest thousand too + var mtime = Math.floor(nodeFsStats.mtime.getTime() / 1000) * 1000; + // from shell: If "filename" is a symlink, // realPath should be the actual path to the linked object // not implemented in shell yet return { isFile: nodeFsStats.isFile(), isDirectory: nodeFsStats.isDirectory(), - mtime: nodeFsStats.mtime, + mtime: mtime, size: nodeFsStats.size, realPath: null, - hash: nodeFsStats.mtime.getTime() + hash: mtime }; } From 84b5fa7b0331aba8ed63a302940f31545d7ee5ea Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 23 Aug 2016 19:56:07 +1000 Subject: [PATCH 35/37] add MS license for CodeHelper.exe fix jsdoc rename fwm to FileWatcherManager remove tabs update comment add missed param to jsdoc --- src/filesystem/WatchedRoot.js | 2 +- .../impls/appshell/AppshellFileSystem.js | 4 +++- .../impls/appshell/node/CSharpWatcher.js | 22 +++++++++---------- .../impls/appshell/node/ChokidarWatcher.js | 6 ++--- .../impls/appshell/node/FileWatcherManager.js | 4 ++-- .../impls/appshell/node/win32/LICENSE | 18 +++++++++++++++ src/project/ProjectModel.js | 1 - 7 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 src/filesystem/impls/appshell/node/win32/LICENSE diff --git a/src/filesystem/WatchedRoot.js b/src/filesystem/WatchedRoot.js index f4582a3f701..f8bd78fcb35 100644 --- a/src/filesystem/WatchedRoot.js +++ b/src/filesystem/WatchedRoot.js @@ -61,7 +61,7 @@ define(function (require, exports, module) { WatchedRoot.prototype.filter = null; /** - * @type {string} + * @type {Array} */ WatchedRoot.prototype.filterGlobs = null; diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 022dfe00fe2..a594b98a596 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -104,6 +104,7 @@ define(function (require, exports, module) { * @param {string} event The type of the event: "changed", "created" or "deleted" * @param {string} parentDirPath The path to the directory holding entry that has changed * @param {string=} entryName The name of the file/directory that has changed + * @param {object} statsObj Object that can be used to construct FileSystemStats * @private */ function _fileWatcherChange(evt, event, parentDirPath, entryName, statsObj) { @@ -513,7 +514,7 @@ define(function (require, exports, module) { * when the recursiveWatch property of this module is true. * * @param {string} path - * @param {array} ignored + * @param {Array} ignored * @param {function(?string)=} callback */ function watchPath(path, ignored, callback) { @@ -542,6 +543,7 @@ define(function (require, exports, module) { * because of FileSystem.prototype._watchOrUnwatchEntry implementation. * * @param {string} path + * @param {Array} ignored * @param {function(?string)=} callback */ function unwatchPath(path, ignored, callback) { diff --git a/src/filesystem/impls/appshell/node/CSharpWatcher.js b/src/filesystem/impls/appshell/node/CSharpWatcher.js index ae4a7cfb606..8daf4cc3511 100644 --- a/src/filesystem/impls/appshell/node/CSharpWatcher.js +++ b/src/filesystem/impls/appshell/node/CSharpWatcher.js @@ -1,6 +1,6 @@ /* - * This copies the implementation of VSCode - * https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts + * Code for working with CodeHelper.exe was inspired by: + * https://github.com/Microsoft/vscode/blob/314e122b16c5c1ca0288c8006e9c9c3039a51cd7/src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts */ /*jslint node: true */ @@ -11,7 +11,7 @@ var fs = require("fs"); var fspath = require("path"); var cp = require("child_process"); var anymatch = require('anymatch'); -var fwm = require("./FileWatcherManager"); +var FileWatcherManager = require("./FileWatcherManager"); function buildMatcher(ignored) { // in case of a glob like **/.git we want also to ignore its contents **/.git/** @@ -71,23 +71,23 @@ function watchPath(path, ignored, _watcherMap) { if (err) { console.warn("CSharpWatcher err getting stats: " + err.toString()); } - fwm.emitChange(event, parentDirPath, entryName, nodeFsStats); + FileWatcherManager.emitChange(event, parentDirPath, entryName, nodeFsStats); }); } else { - fwm.emitChange(event, parentDirPath, entryName, null); + FileWatcherManager.emitChange(event, parentDirPath, entryName, null); } } function onError(err) { console.warn("CSharpWatcher process error: " + err.toString()); - fwm.unwatchPath(path); + FileWatcherManager.unwatchPath(path); } function onExit(code, signal) { if (!closing || signal !== "SIGTERM") { console.warn("CSharpWatcher terminated unexpectedly with code: " + code + ", signal: " + signal); } - fwm.unwatchPath(path); + FileWatcherManager.unwatchPath(path); } try { @@ -107,11 +107,11 @@ function watchPath(path, ignored, _watcherMap) { }); // Errors - handle.on("error", onError); - handle.stderr.on("data", onError); + handle.on("error", onError); + handle.stderr.on("data", onError); - // Exit - handle.on("exit", onExit); + // Exit + handle.on("exit", onExit); // Add handler for closing to the _watcherMap _watcherMap[path] = { diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js index 4c0eebbaac4..a01760914d7 100644 --- a/src/filesystem/impls/appshell/node/ChokidarWatcher.js +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -4,7 +4,7 @@ var fspath = require("path"); var chokidar = require("chokidar"); -var fwm = require("./FileWatcherManager"); +var FileWatcherManager = require("./FileWatcherManager"); function watchPath(path, ignored, _watcherMap) { try { @@ -42,14 +42,14 @@ function watchPath(path, ignored, _watcherMap) { filename = filename.replace(/\\/g, "/"); var parentDirPath = fspath.dirname(filename) + "/"; var entryName = fspath.basename(filename); - fwm.emitChange(event, parentDirPath, entryName, nodeFsStats); + FileWatcherManager.emitChange(event, parentDirPath, entryName, nodeFsStats); }); _watcherMap[path] = watcher; watcher.on("error", function (err) { console.error("Error watching file " + path + ": " + (err && err.message)); - fwm.unwatchPath(path); + FileWatcherManager.unwatchPath(path); }); } catch (err) { console.warn("Failed to watch file " + path + ": " + (err && err.message)); diff --git a/src/filesystem/impls/appshell/node/FileWatcherManager.js b/src/filesystem/impls/appshell/node/FileWatcherManager.js index 1833b492995..b025802ab4b 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherManager.js +++ b/src/filesystem/impls/appshell/node/FileWatcherManager.js @@ -39,8 +39,8 @@ function normalizeStats(nodeFsStats) { } /** - * @private * Un-watch a file or directory. + * @private * @param {string} path File or directory to unwatch. */ function _unwatchPath(path) { @@ -72,7 +72,7 @@ function unwatchPath(path) { /** * Watch a file or directory. * @param {string} path File or directory to watch. - * @param {array} ignored List of entries to ignore during watching. + * @param {Array} ignored List of entries to ignore during watching. */ function watchPath(path, ignored) { if (_watcherMap.hasOwnProperty(path)) { diff --git a/src/filesystem/impls/appshell/node/win32/LICENSE b/src/filesystem/impls/appshell/node/win32/LICENSE new file mode 100644 index 00000000000..2be9200f4d6 --- /dev/null +++ b/src/filesystem/impls/appshell/node/win32/LICENSE @@ -0,0 +1,18 @@ + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/project/ProjectModel.js b/src/project/ProjectModel.js index d283d47a21b..a066909c307 100644 --- a/src/project/ProjectModel.js +++ b/src/project/ProjectModel.js @@ -59,7 +59,6 @@ define(function (require, exports, module) { var _exclusionListRegEx = /\.pyc$|^\.git$|^\.gitmodules$|^\.svn$|^\.DS_Store$|^Thumbs\.db$|^\.hg$|^CVS$|^\.hgtags$|^\.idea$|^\.c9revisions$|^\.SyncArchive$|^\.SyncID$|^\.SyncIgnore$|\~$/; /** - * @public * Glob definition of files and folders that should be excluded directly * inside node domain watching with chokidar */ From 9077970b91cb7121ba3f2040c0b86dc174b481bd Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 25 Aug 2016 07:29:10 +1000 Subject: [PATCH 36/37] add adobe license headers to new files --- .../impls/appshell/node/CSharpWatcher.js | 23 +++++++++++++++++++ .../impls/appshell/node/ChokidarWatcher.js | 23 +++++++++++++++++++ .../impls/appshell/node/FileWatcherManager.js | 23 +++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/src/filesystem/impls/appshell/node/CSharpWatcher.js b/src/filesystem/impls/appshell/node/CSharpWatcher.js index 8daf4cc3511..3f39037c432 100644 --- a/src/filesystem/impls/appshell/node/CSharpWatcher.js +++ b/src/filesystem/impls/appshell/node/CSharpWatcher.js @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + /* * Code for working with CodeHelper.exe was inspired by: * https://github.com/Microsoft/vscode/blob/314e122b16c5c1ca0288c8006e9c9c3039a51cd7/src/vs/workbench/services/files/node/watcher/win32/csharpWatcherService.ts diff --git a/src/filesystem/impls/appshell/node/ChokidarWatcher.js b/src/filesystem/impls/appshell/node/ChokidarWatcher.js index a01760914d7..f4c2910548f 100644 --- a/src/filesystem/impls/appshell/node/ChokidarWatcher.js +++ b/src/filesystem/impls/appshell/node/ChokidarWatcher.js @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + /*jslint node: true */ "use strict"; diff --git a/src/filesystem/impls/appshell/node/FileWatcherManager.js b/src/filesystem/impls/appshell/node/FileWatcherManager.js index b025802ab4b..2bc7d0ff948 100644 --- a/src/filesystem/impls/appshell/node/FileWatcherManager.js +++ b/src/filesystem/impls/appshell/node/FileWatcherManager.js @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + /*jslint node: true */ "use strict"; From 4e17c9826b9f1824b057d3f111ce6092004d90e5 Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 25 Aug 2016 08:01:42 +1000 Subject: [PATCH 37/37] add npm install --production script to grunt build --- Gruntfile.js | 1 + src/config.json | 4 ++++ tasks/npm-install.js | 52 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 tasks/npm-install.js diff --git a/Gruntfile.js b/Gruntfile.js index 0c90ee35763..b41ffd7283a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -347,6 +347,7 @@ module.exports = function (grunt) { /*'cssmin',*/ /*'uglify',*/ 'copy', + 'npm-install', 'cleanempty', 'usemin', 'build-config' diff --git a/src/config.json b/src/config.json index d770f6f108c..1d84d0ef8b8 100644 --- a/src/config.json +++ b/src/config.json @@ -35,6 +35,10 @@ "branch": "", "SHA": "" }, + "dependencies": { + "anymatch": "1.3.0", + "chokidar": "1.6.0" + }, "devDependencies": { "grunt": "0.4.5", "jasmine-node": "1.11.0", diff --git a/tasks/npm-install.js b/tasks/npm-install.js new file mode 100644 index 00000000000..504704fb008 --- /dev/null +++ b/tasks/npm-install.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +/*jslint node: true */ + +module.exports = function (grunt) { + "use strict"; + + var common = require("./lib/common")(grunt), + build = require("./build")(grunt); + + // task: write-config + grunt.registerTask("npm-install", "Install node_modules to the dist folder so it gets bundled with release", function () { + var packageJSON = grunt.file.readJSON("package.json"); + delete packageJSON.devDependencies; + delete packageJSON.scripts; // we don't want to run post-install scripts in dist folder + common.writeJSON(grunt, "dist/package.json", packageJSON); + + var exec = require('child_process').exec; + var done = this.async(); + exec('npm install --production', { cwd: './dist' }, function(err, stdout, stderr) { + if (err) { + grunt.log.error(stderr); + done(false); + } else { + grunt.log.writeln(stdout); + done(); + } + }); + }); + +};