freezerwatch 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/freezerwatch +9 -0
- data/bin/setup +7 -0
- data/freezerwatch.gemspec +23 -0
- data/lib/freezerwatch.rb +5 -0
- data/lib/freezerwatch/version.rb +3 -0
- data/node_modules/.bin/freezerwatch +139 -0
- data/node_modules/freezerwatch/.npmignore +3 -0
- data/node_modules/freezerwatch/.ruby-version +1 -0
- data/node_modules/freezerwatch/Gemfile +4 -0
- data/node_modules/freezerwatch/Gemfile.lock +79 -0
- data/node_modules/freezerwatch/LICENSE +23 -0
- data/node_modules/freezerwatch/README.md +41 -0
- data/node_modules/freezerwatch/Rakefile +13 -0
- data/node_modules/freezerwatch/freezerwatch.js +139 -0
- data/node_modules/freezerwatch/metrics/bigfiles_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/cane_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flay_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/flog_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/punchlist_high_water_mark +2 -0
- data/node_modules/freezerwatch/metrics/reek_high_water_mark +1 -0
- data/node_modules/freezerwatch/metrics/rubocop_high_water_mark +1 -0
- data/node_modules/freezerwatch/node_modules/async/.jshintrc +25 -0
- data/node_modules/freezerwatch/node_modules/async/.travis.yml +6 -0
- data/node_modules/freezerwatch/node_modules/async/CHANGELOG.md +65 -0
- data/node_modules/freezerwatch/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/async/README.md +1803 -0
- data/node_modules/freezerwatch/node_modules/async/bower.json +43 -0
- data/node_modules/freezerwatch/node_modules/async/component.json +17 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/base.css +182 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/async.js.html +3900 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov-report/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lcov.info +1452 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/async.js.html +3597 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/lib/index.html +73 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.css +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/prettify.js +1 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sort-arrow-sprite.png +0 -0
- data/node_modules/freezerwatch/node_modules/async/coverage/sorter.js +156 -0
- data/node_modules/freezerwatch/node_modules/async/lib/async.js +1191 -0
- data/node_modules/freezerwatch/node_modules/async/nyc_output/5074.json +1 -0
- data/node_modules/freezerwatch/node_modules/async/package.json +96 -0
- data/node_modules/freezerwatch/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/.npmignore +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Client.js +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/Device.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceRawReadStream.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceSingleRawReadStream.js +29 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/DeviceStream.js +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/LICENSE +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/README.md +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/.travis.yml +12 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/README.md +364 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/index.js +156 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/copy.js +8 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/debug.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/getSafe.js +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/lib/optional.js +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/.bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/aws-sign2/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/forever-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/Readme.md +175 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/lib/form_data.js +351 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/README.md +1647 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/bower.json +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/component.json +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +1123 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/package.json +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +188 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +38 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +60 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/form-data/package.json +80 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/README.md +627 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/package.json +64 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +101 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +1078 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +5 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +359 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/browser.js +771 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/client.js +206 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/crypto.js +86 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/index.js +316 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/message.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/readme.js +98 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/server.js +686 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/uri.js +456 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/hawk/test/utils.js +120 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.dir-locals.el +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/README.md +79 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/index.js +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/signer.js +178 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/util.js +304 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +42 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/http-signature/package.json +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/.npmignore +1 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/Makefile +35 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/README.md +52 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/package.json +68 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/stringify.js +27 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/README.md +66 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/mime.js +114 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/package.json +57 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/test.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/.npmignore +2 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/LICENSE.md +21 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/README.md +243 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bin/uuid +26 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/bower.json +23 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/package.json +65 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/compare_v1.js +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.html +17 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/test/test.js +228 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/node-uuid/uuid.js +247 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/package.json +48 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.gitmodules +6 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/.npmignore +7 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/index.js +366 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/qs/package.json +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.jshintrc +72 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/.npmignore +3 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md +176 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +81 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +530 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/package.json +63 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/node_modules/tunnel-agent/package.json +45 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/package.json +74 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/node_modules/request/request.js +1244 -0
- data/node_modules/freezerwatch/node_modules/lacrosse/package.json +34 -0
- data/node_modules/freezerwatch/node_modules/optparse/README.md +163 -0
- data/node_modules/freezerwatch/node_modules/optparse/TODO +1 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/browser-test.html +75 -0
- data/node_modules/freezerwatch/node_modules/optparse/examples/nodejs-test.js +86 -0
- data/node_modules/freezerwatch/node_modules/optparse/lib/optparse.js +309 -0
- data/node_modules/freezerwatch/node_modules/optparse/package.json +46 -0
- data/node_modules/freezerwatch/node_modules/optparse/seed.yml +5 -0
- data/node_modules/freezerwatch/node_modules/osenv/.npmignore +13 -0
- data/node_modules/freezerwatch/node_modules/osenv/.travis.yml +9 -0
- data/node_modules/freezerwatch/node_modules/osenv/LICENSE +15 -0
- data/node_modules/freezerwatch/node_modules/osenv/README.md +63 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/index.js +24 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-homedir/readme.md +33 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/index.js +25 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/license +21 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/package.json +70 -0
- data/node_modules/freezerwatch/node_modules/osenv/node_modules/os-tmpdir/readme.md +36 -0
- data/node_modules/freezerwatch/node_modules/osenv/osenv.js +72 -0
- data/node_modules/freezerwatch/node_modules/osenv/package.json +76 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/unix.js +71 -0
- data/node_modules/freezerwatch/node_modules/osenv/test/windows.js +74 -0
- data/node_modules/freezerwatch/node_modules/osenv/x.tap +39 -0
- data/node_modules/freezerwatch/package.json +37 -0
- metadata +384 -0
@@ -0,0 +1,84 @@
|
|
1
|
+
{
|
2
|
+
"name": "async",
|
3
|
+
"description": "Higher-order functions and common patterns for asynchronous code",
|
4
|
+
"main": "lib/async.js",
|
5
|
+
"author": {
|
6
|
+
"name": "Caolan McMahon"
|
7
|
+
},
|
8
|
+
"version": "0.9.2",
|
9
|
+
"keywords": [
|
10
|
+
"async",
|
11
|
+
"callback",
|
12
|
+
"utility",
|
13
|
+
"module"
|
14
|
+
],
|
15
|
+
"repository": {
|
16
|
+
"type": "git",
|
17
|
+
"url": "git+https://github.com/caolan/async.git"
|
18
|
+
},
|
19
|
+
"bugs": {
|
20
|
+
"url": "https://github.com/caolan/async/issues"
|
21
|
+
},
|
22
|
+
"license": "MIT",
|
23
|
+
"devDependencies": {
|
24
|
+
"nodeunit": ">0.0.0",
|
25
|
+
"uglify-js": "1.2.x",
|
26
|
+
"nodelint": ">0.0.0",
|
27
|
+
"lodash": ">=2.4.1"
|
28
|
+
},
|
29
|
+
"jam": {
|
30
|
+
"main": "lib/async.js",
|
31
|
+
"include": [
|
32
|
+
"lib/async.js",
|
33
|
+
"README.md",
|
34
|
+
"LICENSE"
|
35
|
+
],
|
36
|
+
"categories": [
|
37
|
+
"Utilities"
|
38
|
+
]
|
39
|
+
},
|
40
|
+
"scripts": {
|
41
|
+
"test": "nodeunit test/test-async.js"
|
42
|
+
},
|
43
|
+
"spm": {
|
44
|
+
"main": "lib/async.js"
|
45
|
+
},
|
46
|
+
"volo": {
|
47
|
+
"main": "lib/async.js",
|
48
|
+
"ignore": [
|
49
|
+
"**/.*",
|
50
|
+
"node_modules",
|
51
|
+
"bower_components",
|
52
|
+
"test",
|
53
|
+
"tests"
|
54
|
+
]
|
55
|
+
},
|
56
|
+
"gitHead": "de3a16091d5125384eff4a54deb3998b13c3814c",
|
57
|
+
"homepage": "https://github.com/caolan/async#readme",
|
58
|
+
"_id": "async@0.9.2",
|
59
|
+
"_shasum": "aea74d5e61c1f899613bf64bda66d4c78f2fd17d",
|
60
|
+
"_from": "async@>=0.9.0 <0.10.0",
|
61
|
+
"_npmVersion": "2.9.0",
|
62
|
+
"_nodeVersion": "2.0.1",
|
63
|
+
"_npmUser": {
|
64
|
+
"name": "beaugunderson",
|
65
|
+
"email": "beau@beaugunderson.com"
|
66
|
+
},
|
67
|
+
"maintainers": [
|
68
|
+
{
|
69
|
+
"name": "caolan",
|
70
|
+
"email": "caolan.mcmahon@gmail.com"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "beaugunderson",
|
74
|
+
"email": "beau@beaugunderson.com"
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"dist": {
|
78
|
+
"shasum": "aea74d5e61c1f899613bf64bda66d4c78f2fd17d",
|
79
|
+
"tarball": "http://registry.npmjs.org/async/-/async-0.9.2.tgz"
|
80
|
+
},
|
81
|
+
"directories": {},
|
82
|
+
"_resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
|
83
|
+
"readme": "ERROR: No README data found!"
|
84
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
// This should probably be its own module but complaints about bower/etc.
|
4
|
+
// support keep coming up and I'd rather just enable the workflow here for now
|
5
|
+
// and figure out where this should live later. -- @beaugunderson
|
6
|
+
|
7
|
+
var fs = require('fs');
|
8
|
+
var _ = require('lodash');
|
9
|
+
|
10
|
+
var packageJson = require('../package.json');
|
11
|
+
|
12
|
+
var IGNORES = ['**/.*', 'node_modules', 'bower_components', 'test', 'tests'];
|
13
|
+
var INCLUDES = ['lib/async.js', 'README.md', 'LICENSE'];
|
14
|
+
var REPOSITORY_NAME = 'caolan/async';
|
15
|
+
|
16
|
+
packageJson.jam = {
|
17
|
+
main: packageJson.main,
|
18
|
+
include: INCLUDES,
|
19
|
+
categories: ['Utilities']
|
20
|
+
};
|
21
|
+
|
22
|
+
packageJson.spm = {
|
23
|
+
main: packageJson.main
|
24
|
+
};
|
25
|
+
|
26
|
+
packageJson.volo = {
|
27
|
+
main: packageJson.main,
|
28
|
+
ignore: IGNORES
|
29
|
+
};
|
30
|
+
|
31
|
+
var bowerSpecific = {
|
32
|
+
moduleType: ['amd', 'globals', 'node'],
|
33
|
+
ignore: IGNORES,
|
34
|
+
authors: [packageJson.author]
|
35
|
+
};
|
36
|
+
|
37
|
+
var bowerInclude = ['name', 'description', 'version', 'main', 'keywords',
|
38
|
+
'license', 'homepage', 'repository', 'devDependencies'];
|
39
|
+
|
40
|
+
var componentSpecific = {
|
41
|
+
repository: REPOSITORY_NAME,
|
42
|
+
scripts: [packageJson.main]
|
43
|
+
};
|
44
|
+
|
45
|
+
var componentInclude = ['name', 'description', 'version', 'keywords',
|
46
|
+
'license'];
|
47
|
+
|
48
|
+
var bowerJson = _.merge({}, _.pick(packageJson, bowerInclude), bowerSpecific);
|
49
|
+
var componentJson = _.merge({}, _.pick(packageJson, componentInclude), componentSpecific);
|
50
|
+
|
51
|
+
fs.writeFileSync('./bower.json', JSON.stringify(bowerJson, null, 2));
|
52
|
+
fs.writeFileSync('./component.json', JSON.stringify(componentJson, null, 2));
|
53
|
+
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2011 Debuggable Limited <felix@debuggable.com>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -0,0 +1,132 @@
|
|
1
|
+
# combined-stream [![Build Status](https://travis-ci.org/felixge/node-combined-stream.svg?branch=master)](https://travis-ci.org/felixge/node-combined-stream)
|
2
|
+
|
3
|
+
A stream that emits multiple other streams one after another.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
``` bash
|
8
|
+
npm install combined-stream
|
9
|
+
```
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
Here is a simple example that shows how you can use combined-stream to combine
|
14
|
+
two files into one:
|
15
|
+
|
16
|
+
``` javascript
|
17
|
+
var CombinedStream = require('combined-stream');
|
18
|
+
var fs = require('fs');
|
19
|
+
|
20
|
+
var combinedStream = CombinedStream.create();
|
21
|
+
combinedStream.append(fs.createReadStream('file1.txt'));
|
22
|
+
combinedStream.append(fs.createReadStream('file2.txt'));
|
23
|
+
|
24
|
+
combinedStream.pipe(fs.createWriteStream('combined.txt'));
|
25
|
+
```
|
26
|
+
|
27
|
+
While the example above works great, it will pause all source streams until
|
28
|
+
they are needed. If you don't want that to happen, you can set `pauseStreams`
|
29
|
+
to `false`:
|
30
|
+
|
31
|
+
``` javascript
|
32
|
+
var CombinedStream = require('combined-stream');
|
33
|
+
var fs = require('fs');
|
34
|
+
|
35
|
+
var combinedStream = CombinedStream.create({pauseStreams: false});
|
36
|
+
combinedStream.append(fs.createReadStream('file1.txt'));
|
37
|
+
combinedStream.append(fs.createReadStream('file2.txt'));
|
38
|
+
|
39
|
+
combinedStream.pipe(fs.createWriteStream('combined.txt'));
|
40
|
+
```
|
41
|
+
|
42
|
+
However, what if you don't have all the source streams yet, or you don't want
|
43
|
+
to allocate the resources (file descriptors, memory, etc.) for them right away?
|
44
|
+
Well, in that case you can simply provide a callback that supplies the stream
|
45
|
+
by calling a `next()` function:
|
46
|
+
|
47
|
+
``` javascript
|
48
|
+
var CombinedStream = require('combined-stream');
|
49
|
+
var fs = require('fs');
|
50
|
+
|
51
|
+
var combinedStream = CombinedStream.create();
|
52
|
+
combinedStream.append(function(next) {
|
53
|
+
next(fs.createReadStream('file1.txt'));
|
54
|
+
});
|
55
|
+
combinedStream.append(function(next) {
|
56
|
+
next(fs.createReadStream('file2.txt'));
|
57
|
+
});
|
58
|
+
|
59
|
+
combinedStream.pipe(fs.createWriteStream('combined.txt'));
|
60
|
+
```
|
61
|
+
|
62
|
+
## API
|
63
|
+
|
64
|
+
### CombinedStream.create([options])
|
65
|
+
|
66
|
+
Returns a new combined stream object. Available options are:
|
67
|
+
|
68
|
+
* `maxDataSize`
|
69
|
+
* `pauseStreams`
|
70
|
+
|
71
|
+
The effect of those options is described below.
|
72
|
+
|
73
|
+
### combinedStream.pauseStreams = `true`
|
74
|
+
|
75
|
+
Whether to apply back pressure to the underlaying streams. If set to `false`,
|
76
|
+
the underlaying streams will never be paused. If set to `true`, the
|
77
|
+
underlaying streams will be paused right after being appended, as well as when
|
78
|
+
`delayedStream.pipe()` wants to throttle.
|
79
|
+
|
80
|
+
### combinedStream.maxDataSize = `2 * 1024 * 1024`
|
81
|
+
|
82
|
+
The maximum amount of bytes (or characters) to buffer for all source streams.
|
83
|
+
If this value is exceeded, `combinedStream` emits an `'error'` event.
|
84
|
+
|
85
|
+
### combinedStream.dataSize = `0`
|
86
|
+
|
87
|
+
The amount of bytes (or characters) currently buffered by `combinedStream`.
|
88
|
+
|
89
|
+
### combinedStream.append(stream)
|
90
|
+
|
91
|
+
Appends the given `stream` to the combinedStream object. If `pauseStreams` is
|
92
|
+
set to `true, this stream will also be paused right away.
|
93
|
+
|
94
|
+
`streams` can also be a function that takes one parameter called `next`. `next`
|
95
|
+
is a function that must be invoked in order to provide the `next` stream, see
|
96
|
+
example above.
|
97
|
+
|
98
|
+
Regardless of how the `stream` is appended, combined-stream always attaches an
|
99
|
+
`'error'` listener to it, so you don't have to do that manually.
|
100
|
+
|
101
|
+
Special case: `stream` can also be a String or Buffer.
|
102
|
+
|
103
|
+
### combinedStream.write(data)
|
104
|
+
|
105
|
+
You should not call this, `combinedStream` takes care of piping the appended
|
106
|
+
streams into itself for you.
|
107
|
+
|
108
|
+
### combinedStream.resume()
|
109
|
+
|
110
|
+
Causes `combinedStream` to start drain the streams it manages. The function is
|
111
|
+
idempotent, and also emits a `'resume'` event each time which usually goes to
|
112
|
+
the stream that is currently being drained.
|
113
|
+
|
114
|
+
### combinedStream.pause();
|
115
|
+
|
116
|
+
If `combinedStream.pauseStreams` is set to `false`, this does nothing.
|
117
|
+
Otherwise a `'pause'` event is emitted, this goes to the stream that is
|
118
|
+
currently being drained, so you can use it to apply back pressure.
|
119
|
+
|
120
|
+
### combinedStream.end();
|
121
|
+
|
122
|
+
Sets `combinedStream.writable` to false, emits an `'end'` event, and removes
|
123
|
+
all streams from the queue.
|
124
|
+
|
125
|
+
### combinedStream.destroy();
|
126
|
+
|
127
|
+
Same as `combinedStream.end()`, except it emits a `'close'` event instead of
|
128
|
+
`'end'`.
|
129
|
+
|
130
|
+
## License
|
131
|
+
|
132
|
+
combined-stream is licensed under the MIT license.
|
@@ -0,0 +1,188 @@
|
|
1
|
+
var util = require('util');
|
2
|
+
var Stream = require('stream').Stream;
|
3
|
+
var DelayedStream = require('delayed-stream');
|
4
|
+
|
5
|
+
module.exports = CombinedStream;
|
6
|
+
function CombinedStream() {
|
7
|
+
this.writable = false;
|
8
|
+
this.readable = true;
|
9
|
+
this.dataSize = 0;
|
10
|
+
this.maxDataSize = 2 * 1024 * 1024;
|
11
|
+
this.pauseStreams = true;
|
12
|
+
|
13
|
+
this._released = false;
|
14
|
+
this._streams = [];
|
15
|
+
this._currentStream = null;
|
16
|
+
}
|
17
|
+
util.inherits(CombinedStream, Stream);
|
18
|
+
|
19
|
+
CombinedStream.create = function(options) {
|
20
|
+
var combinedStream = new this();
|
21
|
+
|
22
|
+
options = options || {};
|
23
|
+
for (var option in options) {
|
24
|
+
combinedStream[option] = options[option];
|
25
|
+
}
|
26
|
+
|
27
|
+
return combinedStream;
|
28
|
+
};
|
29
|
+
|
30
|
+
CombinedStream.isStreamLike = function(stream) {
|
31
|
+
return (typeof stream !== 'function')
|
32
|
+
&& (typeof stream !== 'string')
|
33
|
+
&& (typeof stream !== 'boolean')
|
34
|
+
&& (typeof stream !== 'number')
|
35
|
+
&& (!Buffer.isBuffer(stream));
|
36
|
+
};
|
37
|
+
|
38
|
+
CombinedStream.prototype.append = function(stream) {
|
39
|
+
var isStreamLike = CombinedStream.isStreamLike(stream);
|
40
|
+
|
41
|
+
if (isStreamLike) {
|
42
|
+
if (!(stream instanceof DelayedStream)) {
|
43
|
+
var newStream = DelayedStream.create(stream, {
|
44
|
+
maxDataSize: Infinity,
|
45
|
+
pauseStream: this.pauseStreams,
|
46
|
+
});
|
47
|
+
stream.on('data', this._checkDataSize.bind(this));
|
48
|
+
stream = newStream;
|
49
|
+
}
|
50
|
+
|
51
|
+
this._handleErrors(stream);
|
52
|
+
|
53
|
+
if (this.pauseStreams) {
|
54
|
+
stream.pause();
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
this._streams.push(stream);
|
59
|
+
return this;
|
60
|
+
};
|
61
|
+
|
62
|
+
CombinedStream.prototype.pipe = function(dest, options) {
|
63
|
+
Stream.prototype.pipe.call(this, dest, options);
|
64
|
+
this.resume();
|
65
|
+
return dest;
|
66
|
+
};
|
67
|
+
|
68
|
+
CombinedStream.prototype._getNext = function() {
|
69
|
+
this._currentStream = null;
|
70
|
+
var stream = this._streams.shift();
|
71
|
+
|
72
|
+
|
73
|
+
if (typeof stream == 'undefined') {
|
74
|
+
this.end();
|
75
|
+
return;
|
76
|
+
}
|
77
|
+
|
78
|
+
if (typeof stream !== 'function') {
|
79
|
+
this._pipeNext(stream);
|
80
|
+
return;
|
81
|
+
}
|
82
|
+
|
83
|
+
var getStream = stream;
|
84
|
+
getStream(function(stream) {
|
85
|
+
var isStreamLike = CombinedStream.isStreamLike(stream);
|
86
|
+
if (isStreamLike) {
|
87
|
+
stream.on('data', this._checkDataSize.bind(this));
|
88
|
+
this._handleErrors(stream);
|
89
|
+
}
|
90
|
+
|
91
|
+
this._pipeNext(stream);
|
92
|
+
}.bind(this));
|
93
|
+
};
|
94
|
+
|
95
|
+
CombinedStream.prototype._pipeNext = function(stream) {
|
96
|
+
this._currentStream = stream;
|
97
|
+
|
98
|
+
var isStreamLike = CombinedStream.isStreamLike(stream);
|
99
|
+
if (isStreamLike) {
|
100
|
+
stream.on('end', this._getNext.bind(this));
|
101
|
+
stream.pipe(this, {end: false});
|
102
|
+
return;
|
103
|
+
}
|
104
|
+
|
105
|
+
var value = stream;
|
106
|
+
this.write(value);
|
107
|
+
this._getNext();
|
108
|
+
};
|
109
|
+
|
110
|
+
CombinedStream.prototype._handleErrors = function(stream) {
|
111
|
+
var self = this;
|
112
|
+
stream.on('error', function(err) {
|
113
|
+
self._emitError(err);
|
114
|
+
});
|
115
|
+
};
|
116
|
+
|
117
|
+
CombinedStream.prototype.write = function(data) {
|
118
|
+
this.emit('data', data);
|
119
|
+
};
|
120
|
+
|
121
|
+
CombinedStream.prototype.pause = function() {
|
122
|
+
if (!this.pauseStreams) {
|
123
|
+
return;
|
124
|
+
}
|
125
|
+
|
126
|
+
if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
|
127
|
+
this.emit('pause');
|
128
|
+
};
|
129
|
+
|
130
|
+
CombinedStream.prototype.resume = function() {
|
131
|
+
if (!this._released) {
|
132
|
+
this._released = true;
|
133
|
+
this.writable = true;
|
134
|
+
this._getNext();
|
135
|
+
}
|
136
|
+
|
137
|
+
if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
|
138
|
+
this.emit('resume');
|
139
|
+
};
|
140
|
+
|
141
|
+
CombinedStream.prototype.end = function() {
|
142
|
+
this._reset();
|
143
|
+
this.emit('end');
|
144
|
+
};
|
145
|
+
|
146
|
+
CombinedStream.prototype.destroy = function() {
|
147
|
+
this._reset();
|
148
|
+
this.emit('close');
|
149
|
+
};
|
150
|
+
|
151
|
+
CombinedStream.prototype._reset = function() {
|
152
|
+
this.writable = false;
|
153
|
+
this._streams = [];
|
154
|
+
this._currentStream = null;
|
155
|
+
};
|
156
|
+
|
157
|
+
CombinedStream.prototype._checkDataSize = function() {
|
158
|
+
this._updateDataSize();
|
159
|
+
if (this.dataSize <= this.maxDataSize) {
|
160
|
+
return;
|
161
|
+
}
|
162
|
+
|
163
|
+
var message =
|
164
|
+
'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
|
165
|
+
this._emitError(new Error(message));
|
166
|
+
};
|
167
|
+
|
168
|
+
CombinedStream.prototype._updateDataSize = function() {
|
169
|
+
this.dataSize = 0;
|
170
|
+
|
171
|
+
var self = this;
|
172
|
+
this._streams.forEach(function(stream) {
|
173
|
+
if (!stream.dataSize) {
|
174
|
+
return;
|
175
|
+
}
|
176
|
+
|
177
|
+
self.dataSize += stream.dataSize;
|
178
|
+
});
|
179
|
+
|
180
|
+
if (this._currentStream && this._currentStream.dataSize) {
|
181
|
+
this.dataSize += this._currentStream.dataSize;
|
182
|
+
}
|
183
|
+
};
|
184
|
+
|
185
|
+
CombinedStream.prototype._emitError = function(err) {
|
186
|
+
this._reset();
|
187
|
+
this.emit('error', err);
|
188
|
+
};
|