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,530 @@
|
|
1
|
+
/*! https://mths.be/punycode v1.3.2 by @mathias */
|
2
|
+
;(function(root) {
|
3
|
+
|
4
|
+
/** Detect free variables */
|
5
|
+
var freeExports = typeof exports == 'object' && exports &&
|
6
|
+
!exports.nodeType && exports;
|
7
|
+
var freeModule = typeof module == 'object' && module &&
|
8
|
+
!module.nodeType && module;
|
9
|
+
var freeGlobal = typeof global == 'object' && global;
|
10
|
+
if (
|
11
|
+
freeGlobal.global === freeGlobal ||
|
12
|
+
freeGlobal.window === freeGlobal ||
|
13
|
+
freeGlobal.self === freeGlobal
|
14
|
+
) {
|
15
|
+
root = freeGlobal;
|
16
|
+
}
|
17
|
+
|
18
|
+
/**
|
19
|
+
* The `punycode` object.
|
20
|
+
* @name punycode
|
21
|
+
* @type Object
|
22
|
+
*/
|
23
|
+
var punycode,
|
24
|
+
|
25
|
+
/** Highest positive signed 32-bit float value */
|
26
|
+
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
|
27
|
+
|
28
|
+
/** Bootstring parameters */
|
29
|
+
base = 36,
|
30
|
+
tMin = 1,
|
31
|
+
tMax = 26,
|
32
|
+
skew = 38,
|
33
|
+
damp = 700,
|
34
|
+
initialBias = 72,
|
35
|
+
initialN = 128, // 0x80
|
36
|
+
delimiter = '-', // '\x2D'
|
37
|
+
|
38
|
+
/** Regular expressions */
|
39
|
+
regexPunycode = /^xn--/,
|
40
|
+
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
|
41
|
+
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
|
42
|
+
|
43
|
+
/** Error messages */
|
44
|
+
errors = {
|
45
|
+
'overflow': 'Overflow: input needs wider integers to process',
|
46
|
+
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
47
|
+
'invalid-input': 'Invalid input'
|
48
|
+
},
|
49
|
+
|
50
|
+
/** Convenience shortcuts */
|
51
|
+
baseMinusTMin = base - tMin,
|
52
|
+
floor = Math.floor,
|
53
|
+
stringFromCharCode = String.fromCharCode,
|
54
|
+
|
55
|
+
/** Temporary variable */
|
56
|
+
key;
|
57
|
+
|
58
|
+
/*--------------------------------------------------------------------------*/
|
59
|
+
|
60
|
+
/**
|
61
|
+
* A generic error utility function.
|
62
|
+
* @private
|
63
|
+
* @param {String} type The error type.
|
64
|
+
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
65
|
+
*/
|
66
|
+
function error(type) {
|
67
|
+
throw RangeError(errors[type]);
|
68
|
+
}
|
69
|
+
|
70
|
+
/**
|
71
|
+
* A generic `Array#map` utility function.
|
72
|
+
* @private
|
73
|
+
* @param {Array} array The array to iterate over.
|
74
|
+
* @param {Function} callback The function that gets called for every array
|
75
|
+
* item.
|
76
|
+
* @returns {Array} A new array of values returned by the callback function.
|
77
|
+
*/
|
78
|
+
function map(array, fn) {
|
79
|
+
var length = array.length;
|
80
|
+
var result = [];
|
81
|
+
while (length--) {
|
82
|
+
result[length] = fn(array[length]);
|
83
|
+
}
|
84
|
+
return result;
|
85
|
+
}
|
86
|
+
|
87
|
+
/**
|
88
|
+
* A simple `Array#map`-like wrapper to work with domain name strings or email
|
89
|
+
* addresses.
|
90
|
+
* @private
|
91
|
+
* @param {String} domain The domain name or email address.
|
92
|
+
* @param {Function} callback The function that gets called for every
|
93
|
+
* character.
|
94
|
+
* @returns {Array} A new string of characters returned by the callback
|
95
|
+
* function.
|
96
|
+
*/
|
97
|
+
function mapDomain(string, fn) {
|
98
|
+
var parts = string.split('@');
|
99
|
+
var result = '';
|
100
|
+
if (parts.length > 1) {
|
101
|
+
// In email addresses, only the domain name should be punycoded. Leave
|
102
|
+
// the local part (i.e. everything up to `@`) intact.
|
103
|
+
result = parts[0] + '@';
|
104
|
+
string = parts[1];
|
105
|
+
}
|
106
|
+
// Avoid `split(regex)` for IE8 compatibility. See #17.
|
107
|
+
string = string.replace(regexSeparators, '\x2E');
|
108
|
+
var labels = string.split('.');
|
109
|
+
var encoded = map(labels, fn).join('.');
|
110
|
+
return result + encoded;
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Creates an array containing the numeric code points of each Unicode
|
115
|
+
* character in the string. While JavaScript uses UCS-2 internally,
|
116
|
+
* this function will convert a pair of surrogate halves (each of which
|
117
|
+
* UCS-2 exposes as separate characters) into a single code point,
|
118
|
+
* matching UTF-16.
|
119
|
+
* @see `punycode.ucs2.encode`
|
120
|
+
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
121
|
+
* @memberOf punycode.ucs2
|
122
|
+
* @name decode
|
123
|
+
* @param {String} string The Unicode input string (UCS-2).
|
124
|
+
* @returns {Array} The new array of code points.
|
125
|
+
*/
|
126
|
+
function ucs2decode(string) {
|
127
|
+
var output = [],
|
128
|
+
counter = 0,
|
129
|
+
length = string.length,
|
130
|
+
value,
|
131
|
+
extra;
|
132
|
+
while (counter < length) {
|
133
|
+
value = string.charCodeAt(counter++);
|
134
|
+
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
135
|
+
// high surrogate, and there is a next character
|
136
|
+
extra = string.charCodeAt(counter++);
|
137
|
+
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
|
138
|
+
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
139
|
+
} else {
|
140
|
+
// unmatched surrogate; only append this code unit, in case the next
|
141
|
+
// code unit is the high surrogate of a surrogate pair
|
142
|
+
output.push(value);
|
143
|
+
counter--;
|
144
|
+
}
|
145
|
+
} else {
|
146
|
+
output.push(value);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
return output;
|
150
|
+
}
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Creates a string based on an array of numeric code points.
|
154
|
+
* @see `punycode.ucs2.decode`
|
155
|
+
* @memberOf punycode.ucs2
|
156
|
+
* @name encode
|
157
|
+
* @param {Array} codePoints The array of numeric code points.
|
158
|
+
* @returns {String} The new Unicode string (UCS-2).
|
159
|
+
*/
|
160
|
+
function ucs2encode(array) {
|
161
|
+
return map(array, function(value) {
|
162
|
+
var output = '';
|
163
|
+
if (value > 0xFFFF) {
|
164
|
+
value -= 0x10000;
|
165
|
+
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
|
166
|
+
value = 0xDC00 | value & 0x3FF;
|
167
|
+
}
|
168
|
+
output += stringFromCharCode(value);
|
169
|
+
return output;
|
170
|
+
}).join('');
|
171
|
+
}
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Converts a basic code point into a digit/integer.
|
175
|
+
* @see `digitToBasic()`
|
176
|
+
* @private
|
177
|
+
* @param {Number} codePoint The basic numeric code point value.
|
178
|
+
* @returns {Number} The numeric value of a basic code point (for use in
|
179
|
+
* representing integers) in the range `0` to `base - 1`, or `base` if
|
180
|
+
* the code point does not represent a value.
|
181
|
+
*/
|
182
|
+
function basicToDigit(codePoint) {
|
183
|
+
if (codePoint - 48 < 10) {
|
184
|
+
return codePoint - 22;
|
185
|
+
}
|
186
|
+
if (codePoint - 65 < 26) {
|
187
|
+
return codePoint - 65;
|
188
|
+
}
|
189
|
+
if (codePoint - 97 < 26) {
|
190
|
+
return codePoint - 97;
|
191
|
+
}
|
192
|
+
return base;
|
193
|
+
}
|
194
|
+
|
195
|
+
/**
|
196
|
+
* Converts a digit/integer into a basic code point.
|
197
|
+
* @see `basicToDigit()`
|
198
|
+
* @private
|
199
|
+
* @param {Number} digit The numeric value of a basic code point.
|
200
|
+
* @returns {Number} The basic code point whose value (when used for
|
201
|
+
* representing integers) is `digit`, which needs to be in the range
|
202
|
+
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
203
|
+
* used; else, the lowercase form is used. The behavior is undefined
|
204
|
+
* if `flag` is non-zero and `digit` has no uppercase form.
|
205
|
+
*/
|
206
|
+
function digitToBasic(digit, flag) {
|
207
|
+
// 0..25 map to ASCII a..z or A..Z
|
208
|
+
// 26..35 map to ASCII 0..9
|
209
|
+
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
210
|
+
}
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Bias adaptation function as per section 3.4 of RFC 3492.
|
214
|
+
* http://tools.ietf.org/html/rfc3492#section-3.4
|
215
|
+
* @private
|
216
|
+
*/
|
217
|
+
function adapt(delta, numPoints, firstTime) {
|
218
|
+
var k = 0;
|
219
|
+
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
220
|
+
delta += floor(delta / numPoints);
|
221
|
+
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
|
222
|
+
delta = floor(delta / baseMinusTMin);
|
223
|
+
}
|
224
|
+
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
225
|
+
}
|
226
|
+
|
227
|
+
/**
|
228
|
+
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
229
|
+
* symbols.
|
230
|
+
* @memberOf punycode
|
231
|
+
* @param {String} input The Punycode string of ASCII-only symbols.
|
232
|
+
* @returns {String} The resulting string of Unicode symbols.
|
233
|
+
*/
|
234
|
+
function decode(input) {
|
235
|
+
// Don't use UCS-2
|
236
|
+
var output = [],
|
237
|
+
inputLength = input.length,
|
238
|
+
out,
|
239
|
+
i = 0,
|
240
|
+
n = initialN,
|
241
|
+
bias = initialBias,
|
242
|
+
basic,
|
243
|
+
j,
|
244
|
+
index,
|
245
|
+
oldi,
|
246
|
+
w,
|
247
|
+
k,
|
248
|
+
digit,
|
249
|
+
t,
|
250
|
+
/** Cached calculation results */
|
251
|
+
baseMinusT;
|
252
|
+
|
253
|
+
// Handle the basic code points: let `basic` be the number of input code
|
254
|
+
// points before the last delimiter, or `0` if there is none, then copy
|
255
|
+
// the first basic code points to the output.
|
256
|
+
|
257
|
+
basic = input.lastIndexOf(delimiter);
|
258
|
+
if (basic < 0) {
|
259
|
+
basic = 0;
|
260
|
+
}
|
261
|
+
|
262
|
+
for (j = 0; j < basic; ++j) {
|
263
|
+
// if it's not a basic code point
|
264
|
+
if (input.charCodeAt(j) >= 0x80) {
|
265
|
+
error('not-basic');
|
266
|
+
}
|
267
|
+
output.push(input.charCodeAt(j));
|
268
|
+
}
|
269
|
+
|
270
|
+
// Main decoding loop: start just after the last delimiter if any basic code
|
271
|
+
// points were copied; start at the beginning otherwise.
|
272
|
+
|
273
|
+
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
|
274
|
+
|
275
|
+
// `index` is the index of the next character to be consumed.
|
276
|
+
// Decode a generalized variable-length integer into `delta`,
|
277
|
+
// which gets added to `i`. The overflow checking is easier
|
278
|
+
// if we increase `i` as we go, then subtract off its starting
|
279
|
+
// value at the end to obtain `delta`.
|
280
|
+
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
|
281
|
+
|
282
|
+
if (index >= inputLength) {
|
283
|
+
error('invalid-input');
|
284
|
+
}
|
285
|
+
|
286
|
+
digit = basicToDigit(input.charCodeAt(index++));
|
287
|
+
|
288
|
+
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
289
|
+
error('overflow');
|
290
|
+
}
|
291
|
+
|
292
|
+
i += digit * w;
|
293
|
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
294
|
+
|
295
|
+
if (digit < t) {
|
296
|
+
break;
|
297
|
+
}
|
298
|
+
|
299
|
+
baseMinusT = base - t;
|
300
|
+
if (w > floor(maxInt / baseMinusT)) {
|
301
|
+
error('overflow');
|
302
|
+
}
|
303
|
+
|
304
|
+
w *= baseMinusT;
|
305
|
+
|
306
|
+
}
|
307
|
+
|
308
|
+
out = output.length + 1;
|
309
|
+
bias = adapt(i - oldi, out, oldi == 0);
|
310
|
+
|
311
|
+
// `i` was supposed to wrap around from `out` to `0`,
|
312
|
+
// incrementing `n` each time, so we'll fix that now:
|
313
|
+
if (floor(i / out) > maxInt - n) {
|
314
|
+
error('overflow');
|
315
|
+
}
|
316
|
+
|
317
|
+
n += floor(i / out);
|
318
|
+
i %= out;
|
319
|
+
|
320
|
+
// Insert `n` at position `i` of the output
|
321
|
+
output.splice(i++, 0, n);
|
322
|
+
|
323
|
+
}
|
324
|
+
|
325
|
+
return ucs2encode(output);
|
326
|
+
}
|
327
|
+
|
328
|
+
/**
|
329
|
+
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
330
|
+
* Punycode string of ASCII-only symbols.
|
331
|
+
* @memberOf punycode
|
332
|
+
* @param {String} input The string of Unicode symbols.
|
333
|
+
* @returns {String} The resulting Punycode string of ASCII-only symbols.
|
334
|
+
*/
|
335
|
+
function encode(input) {
|
336
|
+
var n,
|
337
|
+
delta,
|
338
|
+
handledCPCount,
|
339
|
+
basicLength,
|
340
|
+
bias,
|
341
|
+
j,
|
342
|
+
m,
|
343
|
+
q,
|
344
|
+
k,
|
345
|
+
t,
|
346
|
+
currentValue,
|
347
|
+
output = [],
|
348
|
+
/** `inputLength` will hold the number of code points in `input`. */
|
349
|
+
inputLength,
|
350
|
+
/** Cached calculation results */
|
351
|
+
handledCPCountPlusOne,
|
352
|
+
baseMinusT,
|
353
|
+
qMinusT;
|
354
|
+
|
355
|
+
// Convert the input in UCS-2 to Unicode
|
356
|
+
input = ucs2decode(input);
|
357
|
+
|
358
|
+
// Cache the length
|
359
|
+
inputLength = input.length;
|
360
|
+
|
361
|
+
// Initialize the state
|
362
|
+
n = initialN;
|
363
|
+
delta = 0;
|
364
|
+
bias = initialBias;
|
365
|
+
|
366
|
+
// Handle the basic code points
|
367
|
+
for (j = 0; j < inputLength; ++j) {
|
368
|
+
currentValue = input[j];
|
369
|
+
if (currentValue < 0x80) {
|
370
|
+
output.push(stringFromCharCode(currentValue));
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
|
+
handledCPCount = basicLength = output.length;
|
375
|
+
|
376
|
+
// `handledCPCount` is the number of code points that have been handled;
|
377
|
+
// `basicLength` is the number of basic code points.
|
378
|
+
|
379
|
+
// Finish the basic string - if it is not empty - with a delimiter
|
380
|
+
if (basicLength) {
|
381
|
+
output.push(delimiter);
|
382
|
+
}
|
383
|
+
|
384
|
+
// Main encoding loop:
|
385
|
+
while (handledCPCount < inputLength) {
|
386
|
+
|
387
|
+
// All non-basic code points < n have been handled already. Find the next
|
388
|
+
// larger one:
|
389
|
+
for (m = maxInt, j = 0; j < inputLength; ++j) {
|
390
|
+
currentValue = input[j];
|
391
|
+
if (currentValue >= n && currentValue < m) {
|
392
|
+
m = currentValue;
|
393
|
+
}
|
394
|
+
}
|
395
|
+
|
396
|
+
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
|
397
|
+
// but guard against overflow
|
398
|
+
handledCPCountPlusOne = handledCPCount + 1;
|
399
|
+
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
400
|
+
error('overflow');
|
401
|
+
}
|
402
|
+
|
403
|
+
delta += (m - n) * handledCPCountPlusOne;
|
404
|
+
n = m;
|
405
|
+
|
406
|
+
for (j = 0; j < inputLength; ++j) {
|
407
|
+
currentValue = input[j];
|
408
|
+
|
409
|
+
if (currentValue < n && ++delta > maxInt) {
|
410
|
+
error('overflow');
|
411
|
+
}
|
412
|
+
|
413
|
+
if (currentValue == n) {
|
414
|
+
// Represent delta as a generalized variable-length integer
|
415
|
+
for (q = delta, k = base; /* no condition */; k += base) {
|
416
|
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
417
|
+
if (q < t) {
|
418
|
+
break;
|
419
|
+
}
|
420
|
+
qMinusT = q - t;
|
421
|
+
baseMinusT = base - t;
|
422
|
+
output.push(
|
423
|
+
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
|
424
|
+
);
|
425
|
+
q = floor(qMinusT / baseMinusT);
|
426
|
+
}
|
427
|
+
|
428
|
+
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
429
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
430
|
+
delta = 0;
|
431
|
+
++handledCPCount;
|
432
|
+
}
|
433
|
+
}
|
434
|
+
|
435
|
+
++delta;
|
436
|
+
++n;
|
437
|
+
|
438
|
+
}
|
439
|
+
return output.join('');
|
440
|
+
}
|
441
|
+
|
442
|
+
/**
|
443
|
+
* Converts a Punycode string representing a domain name or an email address
|
444
|
+
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
|
445
|
+
* it doesn't matter if you call it on a string that has already been
|
446
|
+
* converted to Unicode.
|
447
|
+
* @memberOf punycode
|
448
|
+
* @param {String} input The Punycoded domain name or email address to
|
449
|
+
* convert to Unicode.
|
450
|
+
* @returns {String} The Unicode representation of the given Punycode
|
451
|
+
* string.
|
452
|
+
*/
|
453
|
+
function toUnicode(input) {
|
454
|
+
return mapDomain(input, function(string) {
|
455
|
+
return regexPunycode.test(string)
|
456
|
+
? decode(string.slice(4).toLowerCase())
|
457
|
+
: string;
|
458
|
+
});
|
459
|
+
}
|
460
|
+
|
461
|
+
/**
|
462
|
+
* Converts a Unicode string representing a domain name or an email address to
|
463
|
+
* Punycode. Only the non-ASCII parts of the domain name will be converted,
|
464
|
+
* i.e. it doesn't matter if you call it with a domain that's already in
|
465
|
+
* ASCII.
|
466
|
+
* @memberOf punycode
|
467
|
+
* @param {String} input The domain name or email address to convert, as a
|
468
|
+
* Unicode string.
|
469
|
+
* @returns {String} The Punycode representation of the given domain name or
|
470
|
+
* email address.
|
471
|
+
*/
|
472
|
+
function toASCII(input) {
|
473
|
+
return mapDomain(input, function(string) {
|
474
|
+
return regexNonASCII.test(string)
|
475
|
+
? 'xn--' + encode(string)
|
476
|
+
: string;
|
477
|
+
});
|
478
|
+
}
|
479
|
+
|
480
|
+
/*--------------------------------------------------------------------------*/
|
481
|
+
|
482
|
+
/** Define the public API */
|
483
|
+
punycode = {
|
484
|
+
/**
|
485
|
+
* A string representing the current Punycode.js version number.
|
486
|
+
* @memberOf punycode
|
487
|
+
* @type String
|
488
|
+
*/
|
489
|
+
'version': '1.3.2',
|
490
|
+
/**
|
491
|
+
* An object of methods to convert from JavaScript's internal character
|
492
|
+
* representation (UCS-2) to Unicode code points, and back.
|
493
|
+
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
494
|
+
* @memberOf punycode
|
495
|
+
* @type Object
|
496
|
+
*/
|
497
|
+
'ucs2': {
|
498
|
+
'decode': ucs2decode,
|
499
|
+
'encode': ucs2encode
|
500
|
+
},
|
501
|
+
'decode': decode,
|
502
|
+
'encode': encode,
|
503
|
+
'toASCII': toASCII,
|
504
|
+
'toUnicode': toUnicode
|
505
|
+
};
|
506
|
+
|
507
|
+
/** Expose `punycode` */
|
508
|
+
// Some AMD build optimizers, like r.js, check for specific condition patterns
|
509
|
+
// like the following:
|
510
|
+
if (
|
511
|
+
typeof define == 'function' &&
|
512
|
+
typeof define.amd == 'object' &&
|
513
|
+
define.amd
|
514
|
+
) {
|
515
|
+
define('punycode', function() {
|
516
|
+
return punycode;
|
517
|
+
});
|
518
|
+
} else if (freeExports && freeModule) {
|
519
|
+
if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+
|
520
|
+
freeModule.exports = punycode;
|
521
|
+
} else { // in Narwhal or RingoJS v0.7.0-
|
522
|
+
for (key in punycode) {
|
523
|
+
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
|
524
|
+
}
|
525
|
+
}
|
526
|
+
} else { // in Rhino or a web browser
|
527
|
+
root.punycode = punycode;
|
528
|
+
}
|
529
|
+
|
530
|
+
}(this));
|