embeditor-rails 1.1.1 → 2.0.0.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +25 -17
- data/app/assets/javascripts/embeditor/adapter.js.coffee +21 -2
- data/app/assets/javascripts/embeditor/adapters/embedly.js.coffee +4 -40
- data/app/assets/javascripts/embeditor/adapters/oembed.js.coffee +37 -2
- data/app/assets/javascripts/embeditor/embeditor.js.coffee +16 -4
- data/lib/embeditor-rails/version.rb +1 -1
- data/lib/node_modules/npm/AUTHORS +158 -0
- data/lib/node_modules/npm/CONTRIBUTING.md +9 -0
- data/lib/node_modules/npm/LICENSE +235 -0
- data/lib/node_modules/npm/Makefile +216 -0
- data/lib/node_modules/npm/README.md +241 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp +2 -0
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd +1 -0
- data/lib/node_modules/npm/bin/npm +13 -0
- data/lib/node_modules/npm/bin/npm-cli.js +87 -0
- data/lib/node_modules/npm/bin/npm.cmd +6 -0
- data/lib/node_modules/npm/bin/read-package-json.js +22 -0
- data/lib/node_modules/npm/cli.js +2 -0
- data/lib/node_modules/npm/configure +33 -0
- data/lib/node_modules/npm/doc/api/npm-bin.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-bugs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-commands.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-config.md +45 -0
- data/lib/node_modules/npm/doc/api/npm-deprecate.md +34 -0
- data/lib/node_modules/npm/doc/api/npm-docs.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-edit.md +24 -0
- data/lib/node_modules/npm/doc/api/npm-explore.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-help-search.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-init.md +29 -0
- data/lib/node_modules/npm/doc/api/npm-install.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-link.md +33 -0
- data/lib/node_modules/npm/doc/api/npm-load.md +26 -0
- data/lib/node_modules/npm/doc/api/npm-ls.md +56 -0
- data/lib/node_modules/npm/doc/api/npm-outdated.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-owner.md +31 -0
- data/lib/node_modules/npm/doc/api/npm-pack.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-prefix.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-prune.md +17 -0
- data/lib/node_modules/npm/doc/api/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/api/npm-rebuild.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-repo.md +19 -0
- data/lib/node_modules/npm/doc/api/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/api/npm-root.md +15 -0
- data/lib/node_modules/npm/doc/api/npm-run-script.md +27 -0
- data/lib/node_modules/npm/doc/api/npm-search.md +35 -0
- data/lib/node_modules/npm/doc/api/npm-shrinkwrap.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-start.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-stop.md +13 -0
- data/lib/node_modules/npm/doc/api/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/api/npm-tag.md +23 -0
- data/lib/node_modules/npm/doc/api/npm-test.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-uninstall.md +16 -0
- data/lib/node_modules/npm/doc/api/npm-unpublish.md +20 -0
- data/lib/node_modules/npm/doc/api/npm-update.md +11 -0
- data/lib/node_modules/npm/doc/api/npm-version.md +18 -0
- data/lib/node_modules/npm/doc/api/npm-view.md +93 -0
- data/lib/node_modules/npm/doc/api/npm-whoami.md +15 -0
- data/lib/node_modules/npm/doc/api/npm.md +116 -0
- data/lib/node_modules/npm/doc/cli/npm-adduser.md +38 -0
- data/lib/node_modules/npm/doc/cli/npm-bin.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-bugs.md +42 -0
- data/lib/node_modules/npm/doc/cli/npm-build.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-bundle.md +14 -0
- data/lib/node_modules/npm/doc/cli/npm-cache.md +72 -0
- data/lib/node_modules/npm/doc/cli/npm-completion.md +29 -0
- data/lib/node_modules/npm/doc/cli/npm-config.md +71 -0
- data/lib/node_modules/npm/doc/cli/npm-dedupe.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-deprecate.md +26 -0
- data/lib/node_modules/npm/doc/cli/npm-docs.md +44 -0
- data/lib/node_modules/npm/doc/cli/npm-edit.md +37 -0
- data/lib/node_modules/npm/doc/cli/npm-explore.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-help-search.md +35 -0
- data/lib/node_modules/npm/doc/cli/npm-help.md +40 -0
- data/lib/node_modules/npm/doc/cli/npm-init.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-install.md +252 -0
- data/lib/node_modules/npm/doc/cli/npm-link.md +63 -0
- data/lib/node_modules/npm/doc/cli/npm-ls.md +80 -0
- data/lib/node_modules/npm/doc/cli/npm-outdated.md +58 -0
- data/lib/node_modules/npm/doc/cli/npm-owner.md +33 -0
- data/lib/node_modules/npm/doc/cli/npm-pack.md +27 -0
- data/lib/node_modules/npm/doc/cli/npm-prefix.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-prune.md +25 -0
- data/lib/node_modules/npm/doc/cli/npm-publish.md +30 -0
- data/lib/node_modules/npm/doc/cli/npm-rebuild.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-repo.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-restart.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-rm.md +23 -0
- data/lib/node_modules/npm/doc/cli/npm-root.md +19 -0
- data/lib/node_modules/npm/doc/cli/npm-run-script.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-search.md +36 -0
- data/lib/node_modules/npm/doc/cli/npm-shrinkwrap.md +185 -0
- data/lib/node_modules/npm/doc/cli/npm-star.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-stars.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-start.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-stop.md +18 -0
- data/lib/node_modules/npm/doc/cli/npm-submodule.md +28 -0
- data/lib/node_modules/npm/doc/cli/npm-tag.md +34 -0
- data/lib/node_modules/npm/doc/cli/npm-test.md +22 -0
- data/lib/node_modules/npm/doc/cli/npm-uninstall.md +21 -0
- data/lib/node_modules/npm/doc/cli/npm-unpublish.md +32 -0
- data/lib/node_modules/npm/doc/cli/npm-update.md +24 -0
- data/lib/node_modules/npm/doc/cli/npm-version.md +45 -0
- data/lib/node_modules/npm/doc/cli/npm-view.md +90 -0
- data/lib/node_modules/npm/doc/cli/npm-whoami.md +17 -0
- data/lib/node_modules/npm/doc/cli/npm.md +153 -0
- data/lib/node_modules/npm/doc/files/npm-folders.md +211 -0
- data/lib/node_modules/npm/doc/files/npmrc.md +59 -0
- data/lib/node_modules/npm/doc/files/package.json.md +576 -0
- data/lib/node_modules/npm/doc/misc/npm-coding-style.md +181 -0
- data/lib/node_modules/npm/doc/misc/npm-config.md +820 -0
- data/lib/node_modules/npm/doc/misc/npm-developers.md +207 -0
- data/lib/node_modules/npm/doc/misc/npm-disputes.md +99 -0
- data/lib/node_modules/npm/doc/misc/npm-faq.md +364 -0
- data/lib/node_modules/npm/doc/misc/npm-index.md +411 -0
- data/lib/node_modules/npm/doc/misc/npm-registry.md +69 -0
- data/lib/node_modules/npm/doc/misc/npm-scripts.md +245 -0
- data/lib/node_modules/npm/doc/misc/removing-npm.md +54 -0
- data/lib/node_modules/npm/doc/misc/semver.md +111 -0
- data/lib/node_modules/npm/html/doc/README.html +276 -0
- data/lib/node_modules/npm/html/doc/api/npm-bin.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-bugs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-commands.html +62 -0
- data/lib/node_modules/npm/html/doc/api/npm-config.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-deprecate.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-docs.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-edit.html +64 -0
- data/lib/node_modules/npm/html/doc/api/npm-explore.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-help-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-init.html +69 -0
- data/lib/node_modules/npm/html/doc/api/npm-install.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-link.html +73 -0
- data/lib/node_modules/npm/html/doc/api/npm-load.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-ls.html +93 -0
- data/lib/node_modules/npm/html/doc/api/npm-outdated.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/api/npm-pack.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-prefix.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-prune.html +57 -0
- data/lib/node_modules/npm/html/doc/api/npm-publish.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-rebuild.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-repo.html +59 -0
- data/lib/node_modules/npm/html/doc/api/npm-restart.html +61 -0
- data/lib/node_modules/npm/html/doc/api/npm-root.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm-run-script.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-search.html +66 -0
- data/lib/node_modules/npm/html/doc/api/npm-shrinkwrap.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-start.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-stop.html +53 -0
- data/lib/node_modules/npm/html/doc/api/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/api/npm-tag.html +63 -0
- data/lib/node_modules/npm/html/doc/api/npm-test.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/api/npm-unpublish.html +60 -0
- data/lib/node_modules/npm/html/doc/api/npm-update.html +52 -0
- data/lib/node_modules/npm/html/doc/api/npm-version.html +58 -0
- data/lib/node_modules/npm/html/doc/api/npm-view.html +133 -0
- data/lib/node_modules/npm/html/doc/api/npm-whoami.html +55 -0
- data/lib/node_modules/npm/html/doc/api/npm.html +126 -0
- data/lib/node_modules/npm/html/doc/cli/npm-adduser.html +73 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bin.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bugs.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-build.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-bundle.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-cache.html +100 -0
- data/lib/node_modules/npm/html/doc/cli/npm-completion.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-config.html +107 -0
- data/lib/node_modules/npm/html/doc/cli/npm-dedupe.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-deprecate.html +65 -0
- data/lib/node_modules/npm/html/doc/cli/npm-docs.html +75 -0
- data/lib/node_modules/npm/html/doc/cli/npm-edit.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-explore.html +74 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help-search.html +72 -0
- data/lib/node_modules/npm/html/doc/cli/npm-help.html +70 -0
- data/lib/node_modules/npm/html/doc/cli/npm-init.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-install.html +183 -0
- data/lib/node_modules/npm/html/doc/cli/npm-link.html +96 -0
- data/lib/node_modules/npm/html/doc/cli/npm-ls.html +108 -0
- data/lib/node_modules/npm/html/doc/cli/npm-outdated.html +92 -0
- data/lib/node_modules/npm/html/doc/cli/npm-owner.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-pack.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prefix.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-prune.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-publish.html +63 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rebuild.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-repo.html +66 -0
- data/lib/node_modules/npm/html/doc/cli/npm-restart.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-rm.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-root.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-run-script.html +57 -0
- data/lib/node_modules/npm/html/doc/cli/npm-search.html +71 -0
- data/lib/node_modules/npm/html/doc/cli/npm-shrinkwrap.html +217 -0
- data/lib/node_modules/npm/html/doc/cli/npm-star.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stars.html +59 -0
- data/lib/node_modules/npm/html/doc/cli/npm-start.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-stop.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm-submodule.html +67 -0
- data/lib/node_modules/npm/html/doc/cli/npm-tag.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-test.html +58 -0
- data/lib/node_modules/npm/html/doc/cli/npm-uninstall.html +56 -0
- data/lib/node_modules/npm/html/doc/cli/npm-unpublish.html +68 -0
- data/lib/node_modules/npm/html/doc/cli/npm-update.html +60 -0
- data/lib/node_modules/npm/html/doc/cli/npm-version.html +83 -0
- data/lib/node_modules/npm/html/doc/cli/npm-view.html +125 -0
- data/lib/node_modules/npm/html/doc/cli/npm-whoami.html +54 -0
- data/lib/node_modules/npm/html/doc/cli/npm.html +165 -0
- data/lib/node_modules/npm/html/doc/files/npm-folders.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-global.html +239 -0
- data/lib/node_modules/npm/html/doc/files/npm-json.html +580 -0
- data/lib/node_modules/npm/html/doc/files/npmrc.html +93 -0
- data/lib/node_modules/npm/html/doc/files/package.json.html +580 -0
- data/lib/node_modules/npm/html/doc/index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-coding-style.html +216 -0
- data/lib/node_modules/npm/html/doc/misc/npm-config.html +744 -0
- data/lib/node_modules/npm/html/doc/misc/npm-developers.html +208 -0
- data/lib/node_modules/npm/html/doc/misc/npm-disputes.html +126 -0
- data/lib/node_modules/npm/html/doc/misc/npm-faq.html +382 -0
- data/lib/node_modules/npm/html/doc/misc/npm-index.html +450 -0
- data/lib/node_modules/npm/html/doc/misc/npm-registry.html +105 -0
- data/lib/node_modules/npm/html/doc/misc/npm-scripts.html +257 -0
- data/lib/node_modules/npm/html/doc/misc/removing-npm.html +92 -0
- data/lib/node_modules/npm/html/doc/misc/semver.html +128 -0
- data/lib/node_modules/npm/html/docfoot-script.html +31 -0
- data/lib/node_modules/npm/html/docfoot.html +2 -0
- data/lib/node_modules/npm/html/dochead.html +8 -0
- data/lib/node_modules/npm/html/favicon.ico +0 -0
- data/lib/node_modules/npm/html/index.html +95 -0
- data/lib/node_modules/npm/html/static/style.css +329 -0
- data/lib/node_modules/npm/lib/adduser.js +138 -0
- data/lib/node_modules/npm/lib/bin.js +18 -0
- data/lib/node_modules/npm/lib/bugs.js +61 -0
- data/lib/node_modules/npm/lib/build.js +228 -0
- data/lib/node_modules/npm/lib/cache.js +1318 -0
- data/lib/node_modules/npm/lib/completion.js +253 -0
- data/lib/node_modules/npm/lib/config.js +285 -0
- data/lib/node_modules/npm/lib/dedupe.js +357 -0
- data/lib/node_modules/npm/lib/deprecate.js +47 -0
- data/lib/node_modules/npm/lib/docs.js +62 -0
- data/lib/node_modules/npm/lib/edit.js +32 -0
- data/lib/node_modules/npm/lib/explore.js +36 -0
- data/lib/node_modules/npm/lib/faq.js +8 -0
- data/lib/node_modules/npm/lib/get.js +12 -0
- data/lib/node_modules/npm/lib/help-search.js +218 -0
- data/lib/node_modules/npm/lib/help.js +231 -0
- data/lib/node_modules/npm/lib/init.js +36 -0
- data/lib/node_modules/npm/lib/install.js +979 -0
- data/lib/node_modules/npm/lib/link.js +173 -0
- data/lib/node_modules/npm/lib/ls.js +357 -0
- data/lib/node_modules/npm/lib/npm.js +528 -0
- data/lib/node_modules/npm/lib/outdated.js +303 -0
- data/lib/node_modules/npm/lib/owner.js +205 -0
- data/lib/node_modules/npm/lib/pack.js +65 -0
- data/lib/node_modules/npm/lib/prefix.js +11 -0
- data/lib/node_modules/npm/lib/prune.js +53 -0
- data/lib/node_modules/npm/lib/publish.js +118 -0
- data/lib/node_modules/npm/lib/rebuild.js +75 -0
- data/lib/node_modules/npm/lib/repo.js +54 -0
- data/lib/node_modules/npm/lib/restart.js +1 -0
- data/lib/node_modules/npm/lib/root.js +11 -0
- data/lib/node_modules/npm/lib/run-script.js +102 -0
- data/lib/node_modules/npm/lib/search.js +265 -0
- data/lib/node_modules/npm/lib/set.js +13 -0
- data/lib/node_modules/npm/lib/shrinkwrap.js +86 -0
- data/lib/node_modules/npm/lib/star.js +33 -0
- data/lib/node_modules/npm/lib/stars.js +27 -0
- data/lib/node_modules/npm/lib/start.js +1 -0
- data/lib/node_modules/npm/lib/stop.js +1 -0
- data/lib/node_modules/npm/lib/submodule.js +119 -0
- data/lib/node_modules/npm/lib/substack.js +20 -0
- data/lib/node_modules/npm/lib/tag.js +18 -0
- data/lib/node_modules/npm/lib/test.js +14 -0
- data/lib/node_modules/npm/lib/unbuild.js +112 -0
- data/lib/node_modules/npm/lib/uninstall.js +127 -0
- data/lib/node_modules/npm/lib/unpublish.js +83 -0
- data/lib/node_modules/npm/lib/update.js +43 -0
- data/lib/node_modules/npm/lib/utils/completion.sh +54 -0
- data/lib/node_modules/npm/lib/utils/completion/file-completion.js +26 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-deep.js +50 -0
- data/lib/node_modules/npm/lib/utils/completion/installed-shallow.js +79 -0
- data/lib/node_modules/npm/lib/utils/error-handler.js +343 -0
- data/lib/node_modules/npm/lib/utils/fetch.js +93 -0
- data/lib/node_modules/npm/lib/utils/find-prefix.js +57 -0
- data/lib/node_modules/npm/lib/utils/gently-rm.js +61 -0
- data/lib/node_modules/npm/lib/utils/is-git-url.js +13 -0
- data/lib/node_modules/npm/lib/utils/lifecycle.js +360 -0
- data/lib/node_modules/npm/lib/utils/link.js +39 -0
- data/lib/node_modules/npm/lib/utils/tar.js +323 -0
- data/lib/node_modules/npm/lib/version.js +120 -0
- data/lib/node_modules/npm/lib/view.js +246 -0
- data/lib/node_modules/npm/lib/visnup.js +42 -0
- data/lib/node_modules/npm/lib/whoami.js +13 -0
- data/lib/node_modules/npm/lib/xmas.js +56 -0
- data/lib/node_modules/npm/make.bat +3 -0
- data/lib/node_modules/npm/man/man1/npm-README.1 +328 -0
- data/lib/node_modules/npm/man/man1/npm-adduser.1 +63 -0
- data/lib/node_modules/npm/man/man1/npm-bin.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-bugs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-build.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-bundle.1 +23 -0
- data/lib/node_modules/npm/man/man1/npm-cache.1 +104 -0
- data/lib/node_modules/npm/man/man1/npm-completion.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-config.1 +113 -0
- data/lib/node_modules/npm/man/man1/npm-dedupe.1 +96 -0
- data/lib/node_modules/npm/man/man1/npm-deprecate.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-docs.1 +78 -0
- data/lib/node_modules/npm/man/man1/npm-edit.1 +66 -0
- data/lib/node_modules/npm/man/man1/npm-explore.1 +76 -0
- data/lib/node_modules/npm/man/man1/npm-help-search.1 +59 -0
- data/lib/node_modules/npm/man/man1/npm-help.1 +77 -0
- data/lib/node_modules/npm/man/man1/npm-init.1 +43 -0
- data/lib/node_modules/npm/man/man1/npm-install.1 +434 -0
- data/lib/node_modules/npm/man/man1/npm-link.1 +119 -0
- data/lib/node_modules/npm/man/man1/npm-ls.1 +146 -0
- data/lib/node_modules/npm/man/man1/npm-outdated.1 +102 -0
- data/lib/node_modules/npm/man/man1/npm-owner.1 +58 -0
- data/lib/node_modules/npm/man/man1/npm-pack.1 +48 -0
- data/lib/node_modules/npm/man/man1/npm-prefix.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-prune.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-publish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-rebuild.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-repo.1 +47 -0
- data/lib/node_modules/npm/man/man1/npm-restart.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-rm.1 +44 -0
- data/lib/node_modules/npm/man/man1/npm-root.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-run-script.1 +41 -0
- data/lib/node_modules/npm/man/man1/npm-search.1 +62 -0
- data/lib/node_modules/npm/man/man1/npm-shrinkwrap.1 +275 -0
- data/lib/node_modules/npm/man/man1/npm-star.1 +39 -0
- data/lib/node_modules/npm/man/man1/npm-stars.1 +40 -0
- data/lib/node_modules/npm/man/man1/npm-start.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-stop.1 +37 -0
- data/lib/node_modules/npm/man/man1/npm-submodule.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-tag.1 +74 -0
- data/lib/node_modules/npm/man/man1/npm-test.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-uninstall.1 +42 -0
- data/lib/node_modules/npm/man/man1/npm-unpublish.1 +53 -0
- data/lib/node_modules/npm/man/man1/npm-update.1 +45 -0
- data/lib/node_modules/npm/man/man1/npm-version.1 +75 -0
- data/lib/node_modules/npm/man/man1/npm-view.1 +186 -0
- data/lib/node_modules/npm/man/man1/npm-whoami.1 +34 -0
- data/lib/node_modules/npm/man/man1/npm.1 +230 -0
- data/lib/node_modules/npm/man/man3/npm-bin.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-bugs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-commands.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-config.3 +69 -0
- data/lib/node_modules/npm/man/man3/npm-deprecate.3 +57 -0
- data/lib/node_modules/npm/man/man3/npm-docs.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-edit.3 +35 -0
- data/lib/node_modules/npm/man/man3/npm-explore.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-help-search.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-init.3 +39 -0
- data/lib/node_modules/npm/man/man3/npm-install.3 +29 -0
- data/lib/node_modules/npm/man/man3/npm-link.3 +53 -0
- data/lib/node_modules/npm/man/man3/npm-load.3 +44 -0
- data/lib/node_modules/npm/man/man3/npm-ls.3 +86 -0
- data/lib/node_modules/npm/man/man3/npm-outdated.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-owner.3 +52 -0
- data/lib/node_modules/npm/man/man3/npm-pack.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-prefix.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-prune.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-publish.3 +51 -0
- data/lib/node_modules/npm/man/man3/npm-rebuild.3 +22 -0
- data/lib/node_modules/npm/man/man3/npm-repo.3 +28 -0
- data/lib/node_modules/npm/man/man3/npm-restart.3 +37 -0
- data/lib/node_modules/npm/man/man3/npm-root.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm-run-script.3 +48 -0
- data/lib/node_modules/npm/man/man3/npm-search.3 +64 -0
- data/lib/node_modules/npm/man/man3/npm-shrinkwrap.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-start.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-stop.3 +21 -0
- data/lib/node_modules/npm/man/man3/npm-submodule.3 +42 -0
- data/lib/node_modules/npm/man/man3/npm-tag.3 +31 -0
- data/lib/node_modules/npm/man/man3/npm-test.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-uninstall.3 +25 -0
- data/lib/node_modules/npm/man/man3/npm-unpublish.3 +30 -0
- data/lib/node_modules/npm/man/man3/npm-update.3 +18 -0
- data/lib/node_modules/npm/man/man3/npm-version.3 +27 -0
- data/lib/node_modules/npm/man/man3/npm-view.3 +176 -0
- data/lib/node_modules/npm/man/man3/npm-whoami.3 +24 -0
- data/lib/node_modules/npm/man/man3/npm.3 +162 -0
- data/lib/node_modules/npm/man/man5/npm-folders.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-global.5 +264 -0
- data/lib/node_modules/npm/man/man5/npm-json.5 +807 -0
- data/lib/node_modules/npm/man/man5/npmrc.5 +89 -0
- data/lib/node_modules/npm/man/man5/package.json.5 +807 -0
- data/lib/node_modules/npm/man/man7/npm-coding-style.7 +254 -0
- data/lib/node_modules/npm/man/man7/npm-config.7 +1445 -0
- data/lib/node_modules/npm/man/man7/npm-developers.7 +335 -0
- data/lib/node_modules/npm/man/man7/npm-disputes.7 +146 -0
- data/lib/node_modules/npm/man/man7/npm-faq.7 +479 -0
- data/lib/node_modules/npm/man/man7/npm-index.7 +307 -0
- data/lib/node_modules/npm/man/man7/npm-registry.7 +82 -0
- data/lib/node_modules/npm/man/man7/npm-scripts.7 +354 -0
- data/lib/node_modules/npm/man/man7/removing-npm.7 +107 -0
- data/lib/node_modules/npm/man/man7/semver.7 +172 -0
- data/lib/node_modules/npm/node_modules/abbrev/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/README.md +23 -0
- data/lib/node_modules/npm/node_modules/abbrev/lib/abbrev.js +111 -0
- data/lib/node_modules/npm/node_modules/abbrev/package.json +25 -0
- data/lib/node_modules/npm/node_modules/ansi/README.md +91 -0
- data/lib/node_modules/npm/node_modules/ansi/color-spaces.pl +67 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/beep/index.js +16 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/clear/index.js +15 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/cursorPosition.js +32 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/progress/index.js +87 -0
- data/lib/node_modules/npm/node_modules/ansi/examples/starwars.js +46 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/ansi.js +405 -0
- data/lib/node_modules/npm/node_modules/ansi/lib/newlines.js +71 -0
- data/lib/node_modules/npm/node_modules/ansi/package.json +50 -0
- data/lib/node_modules/npm/node_modules/ansicolors/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansicolors/README.md +62 -0
- data/lib/node_modules/npm/node_modules/ansicolors/ansicolors.js +65 -0
- data/lib/node_modules/npm/node_modules/ansicolors/package.json +34 -0
- data/lib/node_modules/npm/node_modules/ansistyles/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ansistyles/README.md +71 -0
- data/lib/node_modules/npm/node_modules/ansistyles/ansistyles.js +38 -0
- data/lib/node_modules/npm/node_modules/ansistyles/package.json +38 -0
- data/lib/node_modules/npm/node_modules/archy/README.markdown +92 -0
- data/lib/node_modules/npm/node_modules/archy/index.js +35 -0
- data/lib/node_modules/npm/node_modules/archy/package.json +52 -0
- data/lib/node_modules/npm/node_modules/block-stream/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/block-stream/README.md +14 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper-pause.js +70 -0
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper.js +68 -0
- data/lib/node_modules/npm/node_modules/block-stream/block-stream.js +209 -0
- data/lib/node_modules/npm/node_modules/block-stream/package.json +35 -0
- data/lib/node_modules/npm/node_modules/child-process-close/README.md +45 -0
- data/lib/node_modules/npm/node_modules/child-process-close/index.js +48 -0
- data/lib/node_modules/npm/node_modules/child-process-close/package.json +37 -0
- data/lib/node_modules/npm/node_modules/chmodr/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/chmodr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chmodr/chmodr.js +54 -0
- data/lib/node_modules/npm/node_modules/chmodr/package.json +28 -0
- data/lib/node_modules/npm/node_modules/chownr/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/chownr/README.md +3 -0
- data/lib/node_modules/npm/node_modules/chownr/chownr.js +41 -0
- data/lib/node_modules/npm/node_modules/chownr/package.json +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/README.md +42 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/index.js +180 -0
- data/lib/node_modules/npm/node_modules/cmd-shim/package.json +35 -0
- data/lib/node_modules/npm/node_modules/columnify/Readme.md +189 -0
- data/lib/node_modules/npm/node_modules/columnify/index.js +210 -0
- data/lib/node_modules/npm/node_modules/columnify/package.json +42 -0
- data/lib/node_modules/npm/node_modules/columnify/utils.js +76 -0
- data/lib/node_modules/npm/node_modules/editor/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/editor/README.markdown +54 -0
- data/lib/node_modules/npm/node_modules/editor/example/beep.json +5 -0
- data/lib/node_modules/npm/node_modules/editor/example/edit.js +4 -0
- data/lib/node_modules/npm/node_modules/editor/index.js +26 -0
- data/lib/node_modules/npm/node_modules/editor/package.json +43 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/README.md +18 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/bundle.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/example.js +12 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/ig-tar.js +19 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/example/tar.js +25 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/fstream-npm.js +323 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md +22 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js +13 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js +275 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json +40 -0
- data/lib/node_modules/npm/node_modules/fstream-npm/package.json +27 -0
- data/lib/node_modules/npm/node_modules/fstream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/fstream/README.md +76 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/filter-pipe.js +131 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/pipe.js +115 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/examples/symlink-write.js +24 -0
- data/lib/node_modules/npm/node_modules/fstream/fstream.js +31 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/abstract.js +85 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/collect.js +67 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-reader.js +251 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js +171 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-reader.js +147 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/file-writer.js +100 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/get-type.js +32 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-reader.js +54 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/link-writer.js +95 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-reader.js +93 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-writer.js +109 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/reader.js +260 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/socket-reader.js +38 -0
- data/lib/node_modules/npm/node_modules/fstream/lib/writer.js +389 -0
- data/lib/node_modules/npm/node_modules/fstream/package.json +43 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/History.md +10 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Makefile +5 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/Readme.md +41 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/index.js +12 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/package.json +31 -0
- data/lib/node_modules/npm/node_modules/github-url-from-git/test.js +40 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/README.md +14 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/index.js +9 -0
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/package.json +33 -0
- data/lib/node_modules/npm/node_modules/glob/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/glob/README.md +250 -0
- data/lib/node_modules/npm/node_modules/glob/examples/g.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/examples/usr-local.js +9 -0
- data/lib/node_modules/npm/node_modules/glob/glob.js +680 -0
- data/lib/node_modules/npm/node_modules/glob/package.json +39 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/README.md +26 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js +161 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/package.json +48 -0
- data/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js +228 -0
- data/lib/node_modules/npm/node_modules/inherits/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/inherits/README.md +42 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits.js +1 -0
- data/lib/node_modules/npm/node_modules/inherits/inherits_browser.js +23 -0
- data/lib/node_modules/npm/node_modules/inherits/package.json +32 -0
- data/lib/node_modules/npm/node_modules/inherits/test.js +25 -0
- data/lib/node_modules/npm/node_modules/ini/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/ini/README.md +79 -0
- data/lib/node_modules/npm/node_modules/ini/ini.js +166 -0
- data/lib/node_modules/npm/node_modules/ini/package.json +29 -0
- data/lib/node_modules/npm/node_modules/init-package-json/README.md +43 -0
- data/lib/node_modules/npm/node_modules/init-package-json/default-input.js +181 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-basic.js +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-default.js +7 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-npm.js +13 -0
- data/lib/node_modules/npm/node_modules/init-package-json/example/init/basic-init.js +1 -0
- data/lib/node_modules/npm/node_modules/init-package-json/init-package-json.js +129 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/README.md +133 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/index.js +11 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/README.md +8 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init-input.js +191 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init.js +37 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/package.json +10 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/substack-input.js +61 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/package.json +32 -0
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/promzard.js +216 -0
- data/lib/node_modules/npm/node_modules/init-package-json/package.json +48 -0
- data/lib/node_modules/npm/node_modules/lockfile/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/lockfile/README.md +81 -0
- data/lib/node_modules/npm/node_modules/lockfile/lockfile.js +272 -0
- data/lib/node_modules/npm/node_modules/lockfile/package.json +45 -0
- data/lib/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/lib/node_modules/npm/node_modules/lru-cache/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/lru-cache/README.md +97 -0
- data/lib/node_modules/npm/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/lib/node_modules/npm/node_modules/lru-cache/package.json +33 -0
- data/lib/node_modules/npm/node_modules/minimatch/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/minimatch/README.md +218 -0
- data/lib/node_modules/npm/node_modules/minimatch/minimatch.js +1055 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/lib/node_modules/npm/node_modules/minimatch/package.json +40 -0
- data/lib/node_modules/npm/node_modules/mkdirp/LICENSE +21 -0
- data/lib/node_modules/npm/node_modules/mkdirp/README.markdown +63 -0
- data/lib/node_modules/npm/node_modules/mkdirp/examples/pow.js +6 -0
- data/lib/node_modules/npm/node_modules/mkdirp/index.js +82 -0
- data/lib/node_modules/npm/node_modules/mkdirp/package.json +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/README.md +163 -0
- data/lib/node_modules/npm/node_modules/node-gyp/addon.gypi +59 -0
- data/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js +133 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/AUTHORS +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/DEPS +24 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/OWNERS +1 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/PRESUBMIT.py +115 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py +148 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/codereview.settings +10 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_dummy.c +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +18 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyptest.py +274 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1051 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1482 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +267 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +407 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +537 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +513 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +72 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +157 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +103 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +49 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1069 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +308 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +87 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2172 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3270 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +37 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2150 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +44 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1224 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +23 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +2809 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +90 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +264 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +870 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +176 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1324 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +2888 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +69 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylintrc +307 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples +81 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples.bat +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/setup.py +19 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/README +15 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/README +5 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/README +12 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +63 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el +252 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +7 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +1105 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py +100 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py +155 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py +168 -0
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +329 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/build.js +275 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/clean.js +22 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js +344 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/install.js +362 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/list.js +33 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js +225 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/rebuild.js +16 -0
- data/lib/node_modules/npm/node_modules/node-gyp/lib/remove.js +56 -0
- data/lib/node_modules/npm/node_modules/node-gyp/package.json +55 -0
- data/lib/node_modules/npm/node_modules/nopt/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/nopt/README.md +210 -0
- data/lib/node_modules/npm/node_modules/nopt/bin/nopt.js +51 -0
- data/lib/node_modules/npm/node_modules/nopt/examples/my-program.js +30 -0
- data/lib/node_modules/npm/node_modules/nopt/lib/nopt.js +407 -0
- data/lib/node_modules/npm/node_modules/nopt/package.json +39 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/LICENSE +234 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/README.md +25 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/index.js +146 -0
- data/lib/node_modules/npm/node_modules/npm-install-checks/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/README.md +176 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/index.js +55 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/adduser.js +138 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/bugs.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/deprecate.js +28 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js +184 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/publish.js +156 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js +270 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/star.js +29 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/stars.js +9 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/tag.js +6 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/unpublish.js +104 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js +22 -0
- data/lib/node_modules/npm/node_modules/npm-registry-client/package.json +43 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/README.md +6 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js +49 -0
- data/lib/node_modules/npm/node_modules/npm-user-validate/package.json +37 -0
- data/lib/node_modules/npm/node_modules/npmconf/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmconf/README.md +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/config-defs.js +353 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/LICENCE +22 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/index.js +282 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md +3 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json +33 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js +81 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/package.json +32 -0
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown +228 -0
- data/lib/node_modules/npm/node_modules/npmconf/npmconf.js +338 -0
- data/lib/node_modules/npm/node_modules/npmconf/package.json +50 -0
- data/lib/node_modules/npm/node_modules/npmlog/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/npmlog/README.md +153 -0
- data/lib/node_modules/npm/node_modules/npmlog/example.js +39 -0
- data/lib/node_modules/npm/node_modules/npmlog/log.js +154 -0
- data/lib/node_modules/npm/node_modules/npmlog/package.json +32 -0
- data/lib/node_modules/npm/node_modules/once/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/once/README.md +51 -0
- data/lib/node_modules/npm/node_modules/once/once.js +20 -0
- data/lib/node_modules/npm/node_modules/once/package.json +39 -0
- data/lib/node_modules/npm/node_modules/opener/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/opener/README.md +44 -0
- data/lib/node_modules/npm/node_modules/opener/opener.js +55 -0
- data/lib/node_modules/npm/node_modules/opener/package.json +34 -0
- data/lib/node_modules/npm/node_modules/osenv/LICENSE +25 -0
- data/lib/node_modules/npm/node_modules/osenv/README.md +63 -0
- data/lib/node_modules/npm/node_modules/osenv/osenv.js +80 -0
- data/lib/node_modules/npm/node_modules/osenv/package.json +38 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/LICENSE.txt +14 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/README.md +35 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/lib/path-is-inside.js +24 -0
- data/lib/node_modules/npm/node_modules/path-is-inside/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/LICENSE +16 -0
- data/lib/node_modules/npm/node_modules/read-installed/README.md +25 -0
- data/lib/node_modules/npm/node_modules/read-installed/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-installed/read-installed.js +338 -0
- data/lib/node_modules/npm/node_modules/read-package-json/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/read-package-json/README.md +166 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS +4 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE +30 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md +101 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json +29 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js +14 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js +392 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js +36 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js +9 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json +25 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json +28 -0
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json +53 -0
- data/lib/node_modules/npm/node_modules/read-package-json/package.json +39 -0
- data/lib/node_modules/npm/node_modules/read-package-json/read-json.js +368 -0
- data/lib/node_modules/npm/node_modules/read/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/read/README.md +53 -0
- data/lib/node_modules/npm/node_modules/read/example/example.js +13 -0
- data/lib/node_modules/npm/node_modules/read/lib/read.js +113 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/README.md +68 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/mute.js +140 -0
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/package.json +37 -0
- data/lib/node_modules/npm/node_modules/read/package.json +35 -0
- data/lib/node_modules/npm/node_modules/read/rs.js +4 -0
- data/lib/node_modules/npm/node_modules/request/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/README.md +364 -0
- data/lib/node_modules/npm/node_modules/request/index.js +157 -0
- data/lib/node_modules/npm/node_modules/request/lib/copy.js +8 -0
- data/lib/node_modules/npm/node_modules/request/lib/debug.js +7 -0
- data/lib/node_modules/npm/node_modules/request/lib/getSafe.js +34 -0
- data/lib/node_modules/npm/node_modules/request/lib/optional.js +5 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/index.js +119 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/Readme.md +163 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/lib/form_data.js +325 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md +1414 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/component.json +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +955 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +185 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +154 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +99 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +32 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/README.md +627 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/browser.js +485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/client.js +367 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/crypto.js +111 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/server.js +524 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/utils.js +183 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json +47 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +6 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +10 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +436 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +585 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +11 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +409 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +48 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/package.json +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/README.md +75 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/index.js +25 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/signer.js +179 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/util.js +249 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/verify.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +196 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +71 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +13 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +104 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +17 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +15 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +14 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +767 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +753 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +638 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +101 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +92 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +451 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +81 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +95 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +156 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +50 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +44 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +42 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +45 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +28 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/README.md +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/package.json +33 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/stringify.js +39 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/test.js +128 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/LICENSE +19 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/README.md +66 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/mime.js +114 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/package.json +36 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/test.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/mime.types +1588 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/node.types +77 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/LICENSE.md +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/README.md +207 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/component.json +18 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/package.json +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/uuid.js +245 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/index.js +43 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/package.json +31 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/test.js +49 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/Readme.md +58 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/index.js +366 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/package.json +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/LICENSE +78 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/README.md +380 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +230 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js +947 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/memstore.js +102 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +278 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +73 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +508 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +2 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +20 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +69 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +35 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +38 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +226 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +442 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +563 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/package.json +46 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/public-suffix.txt +5229 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/test.js +1340 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js +227 -0
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/package.json +28 -0
- data/lib/node_modules/npm/node_modules/request/package.json +57 -0
- data/lib/node_modules/npm/node_modules/request/request.js +1260 -0
- data/lib/node_modules/npm/node_modules/retry/License +21 -0
- data/lib/node_modules/npm/node_modules/retry/Makefile +7 -0
- data/lib/node_modules/npm/node_modules/retry/Readme.md +167 -0
- data/lib/node_modules/npm/node_modules/retry/equation.gif +0 -0
- data/lib/node_modules/npm/node_modules/retry/example/dns.js +31 -0
- data/lib/node_modules/npm/node_modules/retry/index.js +1 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry.js +50 -0
- data/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js +109 -0
- data/lib/node_modules/npm/node_modules/retry/package.json +29 -0
- data/lib/node_modules/npm/node_modules/rimraf/AUTHORS +6 -0
- data/lib/node_modules/npm/node_modules/rimraf/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/rimraf/README.md +30 -0
- data/lib/node_modules/npm/node_modules/rimraf/bin.js +33 -0
- data/lib/node_modules/npm/node_modules/rimraf/package.json +56 -0
- data/lib/node_modules/npm/node_modules/rimraf/rimraf.js +178 -0
- data/lib/node_modules/npm/node_modules/semver/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/semver/Makefile +24 -0
- data/lib/node_modules/npm/node_modules/semver/README.md +142 -0
- data/lib/node_modules/npm/node_modules/semver/bin/semver +124 -0
- data/lib/node_modules/npm/node_modules/semver/foot.js +6 -0
- data/lib/node_modules/npm/node_modules/semver/head.js +2 -0
- data/lib/node_modules/npm/node_modules/semver/package.json +32 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js +1007 -0
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/semver/semver.js +1011 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js +1 -0
- data/lib/node_modules/npm/node_modules/semver/semver.min.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/sha/LICENSE +46 -0
- data/lib/node_modules/npm/node_modules/sha/README.md +49 -0
- data/lib/node_modules/npm/node_modules/sha/index.js +120 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/LICENSE +27 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/README.md +768 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/duplex.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/float.patch +68 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js +69 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js +41 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +927 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +205 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +369 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/package.json +36 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/passthrough.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/readable.js +6 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/transform.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/writable.js +1 -0
- data/lib/node_modules/npm/node_modules/sha/package.json +32 -0
- data/lib/node_modules/npm/node_modules/slide/LICENSE +15 -0
- data/lib/node_modules/npm/node_modules/slide/README.md +143 -0
- data/lib/node_modules/npm/node_modules/slide/index.js +1 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map-ordered.js +65 -0
- data/lib/node_modules/npm/node_modules/slide/lib/async-map.js +56 -0
- data/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js +16 -0
- data/lib/node_modules/npm/node_modules/slide/lib/chain.js +20 -0
- data/lib/node_modules/npm/node_modules/slide/lib/slide.js +3 -0
- data/lib/node_modules/npm/node_modules/slide/package.json +35 -0
- data/lib/node_modules/npm/node_modules/tar/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/tar/README.md +46 -0
- data/lib/node_modules/npm/node_modules/tar/examples/extracter.js +11 -0
- data/lib/node_modules/npm/node_modules/tar/examples/reader.js +36 -0
- data/lib/node_modules/npm/node_modules/tar/lib/buffer-entry.js +30 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry-writer.js +169 -0
- data/lib/node_modules/npm/node_modules/tar/lib/entry.js +213 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header-writer.js +191 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header.js +140 -0
- data/lib/node_modules/npm/node_modules/tar/lib/extract.js +78 -0
- data/lib/node_modules/npm/node_modules/tar/lib/global-header-writer.js +14 -0
- data/lib/node_modules/npm/node_modules/tar/lib/header.js +385 -0
- data/lib/node_modules/npm/node_modules/tar/lib/pack.js +231 -0
- data/lib/node_modules/npm/node_modules/tar/lib/parse.js +270 -0
- data/lib/node_modules/npm/node_modules/tar/package.json +40 -0
- data/lib/node_modules/npm/node_modules/tar/tar.js +173 -0
- data/lib/node_modules/npm/node_modules/text-table/LICENSE +18 -0
- data/lib/node_modules/npm/node_modules/text-table/example/align.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/center.js +8 -0
- data/lib/node_modules/npm/node_modules/text-table/example/dotalign.js +9 -0
- data/lib/node_modules/npm/node_modules/text-table/example/doubledot.js +11 -0
- data/lib/node_modules/npm/node_modules/text-table/example/table.js +6 -0
- data/lib/node_modules/npm/node_modules/text-table/index.js +86 -0
- data/lib/node_modules/npm/node_modules/text-table/package.json +52 -0
- data/lib/node_modules/npm/node_modules/text-table/readme.markdown +134 -0
- data/lib/node_modules/npm/node_modules/uid-number/LICENCE +25 -0
- data/lib/node_modules/npm/node_modules/uid-number/README.md +17 -0
- data/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js +24 -0
- data/lib/node_modules/npm/node_modules/uid-number/package.json +35 -0
- data/lib/node_modules/npm/node_modules/uid-number/uid-number.js +54 -0
- data/lib/node_modules/npm/node_modules/which/LICENSE +23 -0
- data/lib/node_modules/npm/node_modules/which/README.md +5 -0
- data/lib/node_modules/npm/node_modules/which/bin/which +14 -0
- data/lib/node_modules/npm/node_modules/which/package.json +34 -0
- data/lib/node_modules/npm/node_modules/which/which.js +104 -0
- data/lib/node_modules/npm/package.json +155 -0
- data/lib/node_modules/npm/scripts/clean-old.sh +165 -0
- data/lib/node_modules/npm/scripts/doc-build.sh +84 -0
- data/lib/node_modules/npm/scripts/index-build.js +62 -0
- data/lib/node_modules/npm/scripts/install.sh +313 -0
- data/lib/node_modules/npm/scripts/release.sh +36 -0
- data/lib/node_modules/npm/scripts/relocate.sh +26 -0
- metadata +1052 -36
- checksums.yaml +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=H;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var o=n++;t[o]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var a=n++;t[a]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var f=n++;t[f]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var u=n++;t[u]="(?:"+t[i]+"|"+t[o]+")";var l=n++;t[l]="(?:"+t[s]+"|"+t[o]+")";var c=n++;t[c]="(?:-("+t[u]+"(?:\\."+t[u]+")*))";var p=n++;t[p]="(?:-?("+t[l]+"(?:\\."+t[l]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[a]+t[c]+"?"+t[v]+"?";t[m]="^"+g+"$";var w="[v=\\s]*"+t[f]+t[p]+"?"+t[v]+"?";var d=n++;t[d]="^"+w+"$";var y=n++;t[y]="((?:<|>)?=?)";var $=n++;t[$]=t[s]+"|x|X|\\*";var j=n++;t[j]=t[i]+"|x|X|\\*";var b=n++;t[b]="[v=\\s]*("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:("+t[c]+")"+")?)?)?";var E=n++;t[E]="[v=\\s]*("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:("+t[p]+")"+")?)?)?";var k=n++;t[k]="^"+t[y]+"\\s*"+t[b]+"$";var x=n++;t[x]="^"+t[y]+"\\s*"+t[E]+"$";var R=n++;t[R]="(?:~>?)";var S=n++;t[S]="(\\s*)"+t[R]+"\\s+";r[S]=new RegExp(t[S],"g");var V="$1~";var I=n++;t[I]="^"+t[R]+t[b]+"$";var A=n++;t[A]="^"+t[R]+t[E]+"$";var C=n++;t[C]="(?:\\^)";var T=n++;t[T]="(\\s*)"+t[C]+"\\s+";r[T]=new RegExp(t[T],"g");var M="$1^";var z=n++;t[z]="^"+t[C]+t[b]+"$";var P=n++;t[P]="^"+t[C]+t[E]+"$";var Z=n++;t[Z]="^"+t[y]+"\\s*("+w+")$|^$";var q=n++;t[q]="^"+t[y]+"\\s*("+g+")$|^$";var L=n++;t[L]="(\\s*)"+t[y]+"\\s*("+w+"|"+t[b]+")";r[L]=new RegExp(t[L],"g");var X="$1$2$3";var _=n++;t[_]="^\\s*("+t[b]+")"+"\\s+-\\s+"+"("+t[b]+")"+"\\s*$";var N=n++;t[N]="^\\s*("+t[E]+")"+"\\s+-\\s+"+"("+t[E]+")"+"\\s*$";var O=n++;t[O]="(<|>)?=?\\s*\\*";for(var B=0;B<n;B++){if(!r[B])r[B]=new RegExp(t[B])}e.parse=D;function D(e,t){var n=t?r[d]:r[m];return n.test(e)?new H(e,t):null}e.valid=F;function F(e,r){var t=D(e,r);return t?t.version:null}e.clean=G;function G(e,r){var t=D(e,r);return t?t.version:null}e.SemVer=H;function H(e,t){if(e instanceof H){if(e.loose===t)return e;else e=e.version}if(!(this instanceof H))return new H(e,t);this.loose=t;var n=e.trim().match(t?r[d]:r[m]);if(!n)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(!n[4])this.prerelease=[];else this.prerelease=n[4].split(".").map(function(e){return/^[0-9]+$/.test(e)?+e:e});this.build=n[5]?n[5].split("."):[];this.format()}H.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};H.prototype.inspect=function(){return'<SemVer "'+this+'">'};H.prototype.toString=function(){return this.version};H.prototype.compare=function(e){if(!(e instanceof H))e=new H(e,this.loose);return this.compareMain(e)||this.comparePre(e)};H.prototype.compareMain=function(e){if(!(e instanceof H))e=new H(e,this.loose);return Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)};H.prototype.comparePre=function(e){if(!(e instanceof H))e=new H(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.lenth&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return Q(t,n)}while(++r)};H.prototype.inc=function(e){switch(e){case"major":this.major++;this.minor=-1;case"minor":this.minor++;this.patch=-1;case"patch":this.patch++;this.prerelease=[];break;case"prerelease":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=J;function J(e,r,t){try{return new H(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,r){var t=K.test(e);var n=K.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:e<r?-1:e>r?1:0}e.rcompareIdentifiers=U;function U(e,r){return Q(r,e)}e.compare=W;function W(e,r,t){return new H(e,t).compare(r)}e.compareLoose=Y;function Y(e,r){return W(e,r,true)}e.rcompare=er;function er(e,r,t){return W(r,e,t)}e.sort=rr;function rr(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=tr;function tr(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=nr;function nr(e,r,t){return W(e,r,t)>0}e.lt=ir;function ir(e,r,t){return W(e,r,t)<0}e.eq=sr;function sr(e,r,t){return W(e,r,t)===0}e.neq=or;function or(e,r,t){return W(e,r,t)!==0}e.gte=ar;function ar(e,r,t){return W(e,r,t)>=0}e.lte=fr;function fr(e,r,t){return W(e,r,t)<=0}e.cmp=ur;function ur(e,r,t,n){var i;switch(r){case"===":i=e===t;break;case"!==":i=e!==t;break;case"":case"=":case"==":i=sr(e,t,n);break;case"!=":i=or(e,t,n);break;case">":i=nr(e,t,n);break;case">=":i=ar(e,t,n);break;case"<":i=ir(e,t,n);break;case"<=":i=fr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=lr;function lr(e,r){if(e instanceof lr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof lr))return new lr(e,r);this.loose=r;this.parse(e);if(this.semver===cr)this.value="";else this.value=this.operator+this.semver.version}var cr={};lr.prototype.parse=function(e){var t=this.loose?r[Z]:r[q];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(!n[2])this.semver=cr;else{this.semver=new H(n[2],this.loose);if(this.operator==="<"&&!this.semver.prerelease.length){this.semver.prerelease=["0"];this.semver.format()}}};lr.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'};lr.prototype.toString=function(){return this.value};lr.prototype.test=function(e){return this.semver===cr?true:ur(e,this.operator,this.semver,this.loose)};e.Range=pr;function pr(e,r){if(e instanceof pr&&e.loose===r)return e;if(!(this instanceof pr))return new pr(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}pr.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'};pr.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};pr.prototype.toString=function(){return this.range};pr.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[N]:r[_];e=e.replace(n,Er);e=e.replace(r[L],X);e=e.replace(r[S],V);e=e.replace(r[T],M);e=e.split(/\s+/).join(" ");var i=t?r[Z]:r[q];var s=e.split(" ").map(function(e){return vr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new lr(e,t)});return s};e.toComparators=hr;function hr(e,r){return new pr(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function vr(e,r){e=dr(e,r);e=gr(e,r);e=$r(e,r);e=br(e,r);return e}function mr(e){return!e||e.toLowerCase()==="x"||e==="*"}function gr(e,r){return e.trim().split(/\s+/).map(function(e){return wr(e,r)}).join(" ")}function wr(e,t){var n=t?r[A]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n))s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0";return s})}function dr(e,r){return e.trim().split(/\s+/).map(function(e){return yr(e,r)}).join(" ")}function yr(e,t){var n=t?r[P]:r[z];return e.replace(n,function(e,r,t,n,i){var s;if(mr(r))s="";else if(mr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(mr(n)){if(r==="0")s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else s=">="+r+"."+t+".0-0 <"+(+r+1)+".0.0-0"}else if(i){if(i.charAt(0)!=="-")i="-"+i;if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n+i;else s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+i+" <"+(+r+1)+".0.0-0"}else{if(r==="0"){if(t==="0")s="="+r+"."+t+"."+n;else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+(+r+1)+".0.0-0"}return s})}function $r(e,r){return e.split(/\s+/).map(function(e){return jr(e,r)}).join(" ")}function jr(e,t){e=e.trim();var n=t?r[x]:r[k];return e.replace(n,function(e,r,t,n,i,s){var o=mr(t);var a=o||mr(n);var f=a||mr(i);var u=f;if(r==="="&&u)r="";if(r&&u){if(o)t=0;if(a)n=0;if(f)i=0;if(r===">"){r=">=";if(o){}else if(a){t=+t+1;n=0;i=0}else if(f){n=+n+1;i=0}}e=r+t+"."+n+"."+i+"-0"}else if(o){e="*"}else if(a){e=">="+t+".0.0-0 <"+(+t+1)+".0.0-0"}else if(f){e=">="+t+"."+n+".0-0 <"+t+"."+(+n+1)+".0-0"}return e})}function br(e,t){return e.trim().replace(r[O],"")}function Er(e,r,t,n,i,s,o,a,f,u,l,c,p){if(mr(t))r="";else if(mr(n))r=">="+t+".0.0-0";else if(mr(i))r=">="+t+"."+n+".0-0";else r=">="+r;if(mr(f))a="";else if(mr(u))a="<"+(+f+1)+".0.0-0";else if(mr(l))a="<"+f+"."+(+u+1)+".0-0";else if(c)a="<="+f+"."+u+"."+l+"-"+c;else a="<="+a;return(r+" "+a).trim()}pr.prototype.test=function(e){if(!e)return false;for(var r=0;r<this.set.length;r++){if(kr(this.set[r],e))return true}return false};function kr(e,r){for(var t=0;t<e.length;t++){if(!e[t].test(r))return false}return true}e.satisfies=xr;function xr(e,r,t){try{r=new pr(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=Rr;function Rr(e,r,t){return e.filter(function(e){return xr(e,r,t)}).sort(function(e,r){return er(e,r,t)})[0]||null}e.validRange=Sr;function Sr(e,r){try{return new pr(e,r).range||"*"}catch(t){return null}}e.ltr=Vr;function Vr(e,r,t){return Ar(e,r,"<",t)}e.gtr=Ir;function Ir(e,r,t){return Ar(e,r,">",t)}e.outside=Ar;function Ar(e,r,t,n){e=new H(e,n);r=new pr(r,n);var i,s,o,a,f;switch(t){case">":i=nr;s=fr;o=ir;a=">";f=">=";break;case"<":i=ir;s=ar;o=nr;a="<";f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xr(e,r,n)){return false}for(var u=0;u<r.set.length;++u){var l=r.set[u];var c=null;var p=null;l.forEach(function(e){c=c||e;p=p||e;if(i(e.semver,c.semver,n)){c=e}else if(o(e.semver,p.semver,n)){p=e}});if(c.operator===a||c.operator===f){return false}if((!p.operator||p.operator===a)&&s(e,p.semver)){return false}else if(p.operator===f&&o(e,p.semver)){return false}}return true}if(typeof define==="function"&&define.amd)define(e)})(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={});
|
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Copyright (c) 2013 Forbes Lindesay
|
|
2
|
+
|
|
3
|
+
The BSD License
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions
|
|
7
|
+
are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright
|
|
10
|
+
notice, this list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
13
|
+
notice, this list of conditions and the following disclaimer in the
|
|
14
|
+
documentation and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
17
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
18
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
19
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
|
|
20
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
21
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
22
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
23
|
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
24
|
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
25
|
+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
26
|
+
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
The MIT License (MIT)
|
|
29
|
+
|
|
30
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
31
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
32
|
+
in the Software without restriction, including without limitation the rights
|
|
33
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
34
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
35
|
+
furnished to do so, subject to the following conditions:
|
|
36
|
+
|
|
37
|
+
The above copyright notice and this permission notice shall be included in
|
|
38
|
+
all copies or substantial portions of the Software.
|
|
39
|
+
|
|
40
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
41
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
42
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
43
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
44
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
45
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
46
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# sha
|
|
2
|
+
|
|
3
|
+
Check and get file hashes (using any algorithm)
|
|
4
|
+
|
|
5
|
+
[](https://travis-ci.org/ForbesLindesay/sha)
|
|
6
|
+
[](https://gemnasium.com/ForbesLindesay/sha)
|
|
7
|
+
[](http://badge.fury.io/js/sha)
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
$ npm install sha
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])
|
|
16
|
+
|
|
17
|
+
Asynchronously check that `fileName` has a "hash" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).
|
|
18
|
+
|
|
19
|
+
Options:
|
|
20
|
+
|
|
21
|
+
- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
|
|
22
|
+
|
|
23
|
+
### get(fileName, [options,] cb) / getSync(filename, [options])
|
|
24
|
+
|
|
25
|
+
Asynchronously get the "hash" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.
|
|
26
|
+
|
|
27
|
+
Options:
|
|
28
|
+
|
|
29
|
+
- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
|
|
30
|
+
|
|
31
|
+
### stream(expected, [options])
|
|
32
|
+
|
|
33
|
+
Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
fs.createReadStream('src')
|
|
37
|
+
.pipe(sha.stream('expected'))
|
|
38
|
+
.pipe(fs.createWriteStream('dest'))
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.
|
|
42
|
+
|
|
43
|
+
Options:
|
|
44
|
+
|
|
45
|
+
- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
You may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
var Transform = require('stream').Transform || require('readable-stream').Transform
|
|
4
|
+
var crypto = require('crypto')
|
|
5
|
+
var fs
|
|
6
|
+
try {
|
|
7
|
+
fs = require('graceful-fs')
|
|
8
|
+
} catch (ex) {
|
|
9
|
+
fs = require('fs')
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
process.binding('crypto')
|
|
13
|
+
} catch (e) {
|
|
14
|
+
var er = new Error( 'crypto binding not found.\n'
|
|
15
|
+
+ 'Please build node with openssl.\n'
|
|
16
|
+
+ e.message )
|
|
17
|
+
throw er
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.check = check
|
|
21
|
+
exports.checkSync = checkSync
|
|
22
|
+
exports.get = get
|
|
23
|
+
exports.getSync = getSync
|
|
24
|
+
exports.stream = stream
|
|
25
|
+
|
|
26
|
+
function check(file, expected, options, cb) {
|
|
27
|
+
if (typeof options === 'function') {
|
|
28
|
+
cb = options
|
|
29
|
+
options = undefined
|
|
30
|
+
}
|
|
31
|
+
expected = expected.toLowerCase().trim()
|
|
32
|
+
get(file, options, function (er, actual) {
|
|
33
|
+
if (er) {
|
|
34
|
+
if (er.message) er.message += ' while getting shasum for ' + file
|
|
35
|
+
return cb(er)
|
|
36
|
+
}
|
|
37
|
+
if (actual === expected) return cb(null)
|
|
38
|
+
cb(new Error(
|
|
39
|
+
'shasum check failed for ' + file + '\n'
|
|
40
|
+
+ 'Expected: ' + expected + '\n'
|
|
41
|
+
+ 'Actual: ' + actual))
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
function checkSync(file, expected, options) {
|
|
45
|
+
expected = expected.toLowerCase().trim()
|
|
46
|
+
var actual
|
|
47
|
+
try {
|
|
48
|
+
actual = getSync(file, options)
|
|
49
|
+
} catch (er) {
|
|
50
|
+
if (er.message) er.message += ' while getting shasum for ' + file
|
|
51
|
+
throw er
|
|
52
|
+
}
|
|
53
|
+
if (actual !== expected) {
|
|
54
|
+
var ex = new Error(
|
|
55
|
+
'shasum check failed for ' + file + '\n'
|
|
56
|
+
+ 'Expected: ' + expected + '\n'
|
|
57
|
+
+ 'Actual: ' + actual)
|
|
58
|
+
throw ex
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
function get(file, options, cb) {
|
|
64
|
+
if (typeof options === 'function') {
|
|
65
|
+
cb = options
|
|
66
|
+
options = undefined
|
|
67
|
+
}
|
|
68
|
+
options = options || {}
|
|
69
|
+
var algorithm = options.algorithm || 'sha1'
|
|
70
|
+
var hash = crypto.createHash(algorithm)
|
|
71
|
+
var source = fs.createReadStream(file)
|
|
72
|
+
var errState = null
|
|
73
|
+
source
|
|
74
|
+
.on('error', function (er) {
|
|
75
|
+
if (errState) return
|
|
76
|
+
return cb(errState = er)
|
|
77
|
+
})
|
|
78
|
+
.on('data', function (chunk) {
|
|
79
|
+
if (errState) return
|
|
80
|
+
hash.update(chunk)
|
|
81
|
+
})
|
|
82
|
+
.on('end', function () {
|
|
83
|
+
if (errState) return
|
|
84
|
+
var actual = hash.digest("hex").toLowerCase().trim()
|
|
85
|
+
cb(null, actual)
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function getSync(file, options) {
|
|
90
|
+
options = options || {}
|
|
91
|
+
var algorithm = options.algorithm || 'sha1'
|
|
92
|
+
var hash = crypto.createHash(algorithm)
|
|
93
|
+
var source = fs.readFileSync(file)
|
|
94
|
+
hash.update(source)
|
|
95
|
+
return hash.digest("hex").toLowerCase().trim()
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function stream(expected, options) {
|
|
99
|
+
expected = expected.toLowerCase().trim()
|
|
100
|
+
options = options || {}
|
|
101
|
+
var algorithm = options.algorithm || 'sha1'
|
|
102
|
+
var hash = crypto.createHash(algorithm)
|
|
103
|
+
|
|
104
|
+
var stream = new Transform()
|
|
105
|
+
stream._transform = function (chunk, encoding, callback) {
|
|
106
|
+
hash.update(chunk)
|
|
107
|
+
stream.push(chunk)
|
|
108
|
+
callback()
|
|
109
|
+
}
|
|
110
|
+
stream._flush = function (cb) {
|
|
111
|
+
var actual = hash.digest("hex").toLowerCase().trim()
|
|
112
|
+
if (actual === expected) return cb(null)
|
|
113
|
+
cb(new Error(
|
|
114
|
+
'shasum check failed for:\n'
|
|
115
|
+
+ ' Expected: ' + expected + '\n'
|
|
116
|
+
+ ' Actual: ' + actual))
|
|
117
|
+
this.push(null)
|
|
118
|
+
}
|
|
119
|
+
return stream
|
|
120
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright (c) Isaac Z. Schlueter ("Author")
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
The BSD License
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions
|
|
8
|
+
are met:
|
|
9
|
+
|
|
10
|
+
1. Redistributions of source code must retain the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer.
|
|
12
|
+
|
|
13
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
14
|
+
notice, this list of conditions and the following disclaimer in the
|
|
15
|
+
documentation and/or other materials provided with the distribution.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
18
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
19
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
20
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
|
|
21
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
22
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
23
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
24
|
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
25
|
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
26
|
+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
27
|
+
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,768 @@
|
|
|
1
|
+
# readable-stream
|
|
2
|
+
|
|
3
|
+
A new class of streams for Node.js
|
|
4
|
+
|
|
5
|
+
This module provides the new Stream base classes introduced in Node
|
|
6
|
+
v0.10, for use in Node v0.8. You can use it to have programs that
|
|
7
|
+
have to work with node v0.8, while being forward-compatible for v0.10
|
|
8
|
+
and beyond. When you drop support for v0.8, you can remove this
|
|
9
|
+
module, and only use the native streams.
|
|
10
|
+
|
|
11
|
+
This is almost exactly the same codebase as appears in Node v0.10.
|
|
12
|
+
However:
|
|
13
|
+
|
|
14
|
+
1. The exported object is actually the Readable class. Decorating the
|
|
15
|
+
native `stream` module would be global pollution.
|
|
16
|
+
2. In v0.10, you can safely use `base64` as an argument to
|
|
17
|
+
`setEncoding` in Readable streams. However, in v0.8, the
|
|
18
|
+
StringDecoder class has no `end()` method, which is problematic for
|
|
19
|
+
Base64. So, don't use that, because it'll break and be weird.
|
|
20
|
+
|
|
21
|
+
Other than that, the API is the same as `require('stream')` in v0.10,
|
|
22
|
+
so the API docs are reproduced below.
|
|
23
|
+
|
|
24
|
+
----------
|
|
25
|
+
|
|
26
|
+
Stability: 2 - Unstable
|
|
27
|
+
|
|
28
|
+
A stream is an abstract interface implemented by various objects in
|
|
29
|
+
Node. For example a request to an HTTP server is a stream, as is
|
|
30
|
+
stdout. Streams are readable, writable, or both. All streams are
|
|
31
|
+
instances of [EventEmitter][]
|
|
32
|
+
|
|
33
|
+
You can load the Stream base classes by doing `require('stream')`.
|
|
34
|
+
There are base classes provided for Readable streams, Writable
|
|
35
|
+
streams, Duplex streams, and Transform streams.
|
|
36
|
+
|
|
37
|
+
## Compatibility
|
|
38
|
+
|
|
39
|
+
In earlier versions of Node, the Readable stream interface was
|
|
40
|
+
simpler, but also less powerful and less useful.
|
|
41
|
+
|
|
42
|
+
* Rather than waiting for you to call the `read()` method, `'data'`
|
|
43
|
+
events would start emitting immediately. If you needed to do some
|
|
44
|
+
I/O to decide how to handle data, then you had to store the chunks
|
|
45
|
+
in some kind of buffer so that they would not be lost.
|
|
46
|
+
* The `pause()` method was advisory, rather than guaranteed. This
|
|
47
|
+
meant that you still had to be prepared to receive `'data'` events
|
|
48
|
+
even when the stream was in a paused state.
|
|
49
|
+
|
|
50
|
+
In Node v0.10, the Readable class described below was added. For
|
|
51
|
+
backwards compatibility with older Node programs, Readable streams
|
|
52
|
+
switch into "old mode" when a `'data'` event handler is added, or when
|
|
53
|
+
the `pause()` or `resume()` methods are called. The effect is that,
|
|
54
|
+
even if you are not using the new `read()` method and `'readable'`
|
|
55
|
+
event, you no longer have to worry about losing `'data'` chunks.
|
|
56
|
+
|
|
57
|
+
Most programs will continue to function normally. However, this
|
|
58
|
+
introduces an edge case in the following conditions:
|
|
59
|
+
|
|
60
|
+
* No `'data'` event handler is added.
|
|
61
|
+
* The `pause()` and `resume()` methods are never called.
|
|
62
|
+
|
|
63
|
+
For example, consider the following code:
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
// WARNING! BROKEN!
|
|
67
|
+
net.createServer(function(socket) {
|
|
68
|
+
|
|
69
|
+
// we add an 'end' method, but never consume the data
|
|
70
|
+
socket.on('end', function() {
|
|
71
|
+
// It will never get here.
|
|
72
|
+
socket.end('I got your message (but didnt read it)\n');
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
}).listen(1337);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
In versions of node prior to v0.10, the incoming message data would be
|
|
79
|
+
simply discarded. However, in Node v0.10 and beyond, the socket will
|
|
80
|
+
remain paused forever.
|
|
81
|
+
|
|
82
|
+
The workaround in this situation is to call the `resume()` method to
|
|
83
|
+
trigger "old mode" behavior:
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
// Workaround
|
|
87
|
+
net.createServer(function(socket) {
|
|
88
|
+
|
|
89
|
+
socket.on('end', function() {
|
|
90
|
+
socket.end('I got your message (but didnt read it)\n');
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// start the flow of data, discarding it.
|
|
94
|
+
socket.resume();
|
|
95
|
+
|
|
96
|
+
}).listen(1337);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
In addition to new Readable streams switching into old-mode, pre-v0.10
|
|
100
|
+
style streams can be wrapped in a Readable class using the `wrap()`
|
|
101
|
+
method.
|
|
102
|
+
|
|
103
|
+
## Class: stream.Readable
|
|
104
|
+
|
|
105
|
+
<!--type=class-->
|
|
106
|
+
|
|
107
|
+
A `Readable Stream` has the following methods, members, and events.
|
|
108
|
+
|
|
109
|
+
Note that `stream.Readable` is an abstract class designed to be
|
|
110
|
+
extended with an underlying implementation of the `_read(size)`
|
|
111
|
+
method. (See below.)
|
|
112
|
+
|
|
113
|
+
### new stream.Readable([options])
|
|
114
|
+
|
|
115
|
+
* `options` {Object}
|
|
116
|
+
* `highWaterMark` {Number} The maximum number of bytes to store in
|
|
117
|
+
the internal buffer before ceasing to read from the underlying
|
|
118
|
+
resource. Default=16kb
|
|
119
|
+
* `encoding` {String} If specified, then buffers will be decoded to
|
|
120
|
+
strings using the specified encoding. Default=null
|
|
121
|
+
* `objectMode` {Boolean} Whether this stream should behave
|
|
122
|
+
as a stream of objects. Meaning that stream.read(n) returns
|
|
123
|
+
a single value instead of a Buffer of size n
|
|
124
|
+
|
|
125
|
+
In classes that extend the Readable class, make sure to call the
|
|
126
|
+
constructor so that the buffering settings can be properly
|
|
127
|
+
initialized.
|
|
128
|
+
|
|
129
|
+
### readable.\_read(size)
|
|
130
|
+
|
|
131
|
+
* `size` {Number} Number of bytes to read asynchronously
|
|
132
|
+
|
|
133
|
+
Note: **This function should NOT be called directly.** It should be
|
|
134
|
+
implemented by child classes, and called by the internal Readable
|
|
135
|
+
class methods only.
|
|
136
|
+
|
|
137
|
+
All Readable stream implementations must provide a `_read` method
|
|
138
|
+
to fetch data from the underlying resource.
|
|
139
|
+
|
|
140
|
+
This method is prefixed with an underscore because it is internal to
|
|
141
|
+
the class that defines it, and should not be called directly by user
|
|
142
|
+
programs. However, you **are** expected to override this method in
|
|
143
|
+
your own extension classes.
|
|
144
|
+
|
|
145
|
+
When data is available, put it into the read queue by calling
|
|
146
|
+
`readable.push(chunk)`. If `push` returns false, then you should stop
|
|
147
|
+
reading. When `_read` is called again, you should start pushing more
|
|
148
|
+
data.
|
|
149
|
+
|
|
150
|
+
The `size` argument is advisory. Implementations where a "read" is a
|
|
151
|
+
single call that returns data can use this to know how much data to
|
|
152
|
+
fetch. Implementations where that is not relevant, such as TCP or
|
|
153
|
+
TLS, may ignore this argument, and simply provide data whenever it
|
|
154
|
+
becomes available. There is no need, for example to "wait" until
|
|
155
|
+
`size` bytes are available before calling `stream.push(chunk)`.
|
|
156
|
+
|
|
157
|
+
### readable.push(chunk)
|
|
158
|
+
|
|
159
|
+
* `chunk` {Buffer | null | String} Chunk of data to push into the read queue
|
|
160
|
+
* return {Boolean} Whether or not more pushes should be performed
|
|
161
|
+
|
|
162
|
+
Note: **This function should be called by Readable implementors, NOT
|
|
163
|
+
by consumers of Readable subclasses.** The `_read()` function will not
|
|
164
|
+
be called again until at least one `push(chunk)` call is made. If no
|
|
165
|
+
data is available, then you MAY call `push('')` (an empty string) to
|
|
166
|
+
allow a future `_read` call, without adding any data to the queue.
|
|
167
|
+
|
|
168
|
+
The `Readable` class works by putting data into a read queue to be
|
|
169
|
+
pulled out later by calling the `read()` method when the `'readable'`
|
|
170
|
+
event fires.
|
|
171
|
+
|
|
172
|
+
The `push()` method will explicitly insert some data into the read
|
|
173
|
+
queue. If it is called with `null` then it will signal the end of the
|
|
174
|
+
data.
|
|
175
|
+
|
|
176
|
+
In some cases, you may be wrapping a lower-level source which has some
|
|
177
|
+
sort of pause/resume mechanism, and a data callback. In those cases,
|
|
178
|
+
you could wrap the low-level source object by doing something like
|
|
179
|
+
this:
|
|
180
|
+
|
|
181
|
+
```javascript
|
|
182
|
+
// source is an object with readStop() and readStart() methods,
|
|
183
|
+
// and an `ondata` member that gets called when it has data, and
|
|
184
|
+
// an `onend` member that gets called when the data is over.
|
|
185
|
+
|
|
186
|
+
var stream = new Readable();
|
|
187
|
+
|
|
188
|
+
source.ondata = function(chunk) {
|
|
189
|
+
// if push() returns false, then we need to stop reading from source
|
|
190
|
+
if (!stream.push(chunk))
|
|
191
|
+
source.readStop();
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
source.onend = function() {
|
|
195
|
+
stream.push(null);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// _read will be called when the stream wants to pull more data in
|
|
199
|
+
// the advisory size argument is ignored in this case.
|
|
200
|
+
stream._read = function(n) {
|
|
201
|
+
source.readStart();
|
|
202
|
+
};
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### readable.unshift(chunk)
|
|
206
|
+
|
|
207
|
+
* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue
|
|
208
|
+
* return {Boolean} Whether or not more pushes should be performed
|
|
209
|
+
|
|
210
|
+
This is the corollary of `readable.push(chunk)`. Rather than putting
|
|
211
|
+
the data at the *end* of the read queue, it puts it at the *front* of
|
|
212
|
+
the read queue.
|
|
213
|
+
|
|
214
|
+
This is useful in certain use-cases where a stream is being consumed
|
|
215
|
+
by a parser, which needs to "un-consume" some data that it has
|
|
216
|
+
optimistically pulled out of the source.
|
|
217
|
+
|
|
218
|
+
```javascript
|
|
219
|
+
// A parser for a simple data protocol.
|
|
220
|
+
// The "header" is a JSON object, followed by 2 \n characters, and
|
|
221
|
+
// then a message body.
|
|
222
|
+
//
|
|
223
|
+
// Note: This can be done more simply as a Transform stream. See below.
|
|
224
|
+
|
|
225
|
+
function SimpleProtocol(source, options) {
|
|
226
|
+
if (!(this instanceof SimpleProtocol))
|
|
227
|
+
return new SimpleProtocol(options);
|
|
228
|
+
|
|
229
|
+
Readable.call(this, options);
|
|
230
|
+
this._inBody = false;
|
|
231
|
+
this._sawFirstCr = false;
|
|
232
|
+
|
|
233
|
+
// source is a readable stream, such as a socket or file
|
|
234
|
+
this._source = source;
|
|
235
|
+
|
|
236
|
+
var self = this;
|
|
237
|
+
source.on('end', function() {
|
|
238
|
+
self.push(null);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
// give it a kick whenever the source is readable
|
|
242
|
+
// read(0) will not consume any bytes
|
|
243
|
+
source.on('readable', function() {
|
|
244
|
+
self.read(0);
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
this._rawHeader = [];
|
|
248
|
+
this.header = null;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
SimpleProtocol.prototype = Object.create(
|
|
252
|
+
Readable.prototype, { constructor: { value: SimpleProtocol }});
|
|
253
|
+
|
|
254
|
+
SimpleProtocol.prototype._read = function(n) {
|
|
255
|
+
if (!this._inBody) {
|
|
256
|
+
var chunk = this._source.read();
|
|
257
|
+
|
|
258
|
+
// if the source doesn't have data, we don't have data yet.
|
|
259
|
+
if (chunk === null)
|
|
260
|
+
return this.push('');
|
|
261
|
+
|
|
262
|
+
// check if the chunk has a \n\n
|
|
263
|
+
var split = -1;
|
|
264
|
+
for (var i = 0; i < chunk.length; i++) {
|
|
265
|
+
if (chunk[i] === 10) { // '\n'
|
|
266
|
+
if (this._sawFirstCr) {
|
|
267
|
+
split = i;
|
|
268
|
+
break;
|
|
269
|
+
} else {
|
|
270
|
+
this._sawFirstCr = true;
|
|
271
|
+
}
|
|
272
|
+
} else {
|
|
273
|
+
this._sawFirstCr = false;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (split === -1) {
|
|
278
|
+
// still waiting for the \n\n
|
|
279
|
+
// stash the chunk, and try again.
|
|
280
|
+
this._rawHeader.push(chunk);
|
|
281
|
+
this.push('');
|
|
282
|
+
} else {
|
|
283
|
+
this._inBody = true;
|
|
284
|
+
var h = chunk.slice(0, split);
|
|
285
|
+
this._rawHeader.push(h);
|
|
286
|
+
var header = Buffer.concat(this._rawHeader).toString();
|
|
287
|
+
try {
|
|
288
|
+
this.header = JSON.parse(header);
|
|
289
|
+
} catch (er) {
|
|
290
|
+
this.emit('error', new Error('invalid simple protocol data'));
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
// now, because we got some extra data, unshift the rest
|
|
294
|
+
// back into the read queue so that our consumer will see it.
|
|
295
|
+
var b = chunk.slice(split);
|
|
296
|
+
this.unshift(b);
|
|
297
|
+
|
|
298
|
+
// and let them know that we are done parsing the header.
|
|
299
|
+
this.emit('header', this.header);
|
|
300
|
+
}
|
|
301
|
+
} else {
|
|
302
|
+
// from there on, just provide the data to our consumer.
|
|
303
|
+
// careful not to push(null), since that would indicate EOF.
|
|
304
|
+
var chunk = this._source.read();
|
|
305
|
+
if (chunk) this.push(chunk);
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
// Usage:
|
|
310
|
+
var parser = new SimpleProtocol(source);
|
|
311
|
+
// Now parser is a readable stream that will emit 'header'
|
|
312
|
+
// with the parsed header data.
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### readable.wrap(stream)
|
|
316
|
+
|
|
317
|
+
* `stream` {Stream} An "old style" readable stream
|
|
318
|
+
|
|
319
|
+
If you are using an older Node library that emits `'data'` events and
|
|
320
|
+
has a `pause()` method that is advisory only, then you can use the
|
|
321
|
+
`wrap()` method to create a Readable stream that uses the old stream
|
|
322
|
+
as its data source.
|
|
323
|
+
|
|
324
|
+
For example:
|
|
325
|
+
|
|
326
|
+
```javascript
|
|
327
|
+
var OldReader = require('./old-api-module.js').OldReader;
|
|
328
|
+
var oreader = new OldReader;
|
|
329
|
+
var Readable = require('stream').Readable;
|
|
330
|
+
var myReader = new Readable().wrap(oreader);
|
|
331
|
+
|
|
332
|
+
myReader.on('readable', function() {
|
|
333
|
+
myReader.read(); // etc.
|
|
334
|
+
});
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Event: 'readable'
|
|
338
|
+
|
|
339
|
+
When there is data ready to be consumed, this event will fire.
|
|
340
|
+
|
|
341
|
+
When this event emits, call the `read()` method to consume the data.
|
|
342
|
+
|
|
343
|
+
### Event: 'end'
|
|
344
|
+
|
|
345
|
+
Emitted when the stream has received an EOF (FIN in TCP terminology).
|
|
346
|
+
Indicates that no more `'data'` events will happen. If the stream is
|
|
347
|
+
also writable, it may be possible to continue writing.
|
|
348
|
+
|
|
349
|
+
### Event: 'data'
|
|
350
|
+
|
|
351
|
+
The `'data'` event emits either a `Buffer` (by default) or a string if
|
|
352
|
+
`setEncoding()` was used.
|
|
353
|
+
|
|
354
|
+
Note that adding a `'data'` event listener will switch the Readable
|
|
355
|
+
stream into "old mode", where data is emitted as soon as it is
|
|
356
|
+
available, rather than waiting for you to call `read()` to consume it.
|
|
357
|
+
|
|
358
|
+
### Event: 'error'
|
|
359
|
+
|
|
360
|
+
Emitted if there was an error receiving data.
|
|
361
|
+
|
|
362
|
+
### Event: 'close'
|
|
363
|
+
|
|
364
|
+
Emitted when the underlying resource (for example, the backing file
|
|
365
|
+
descriptor) has been closed. Not all streams will emit this.
|
|
366
|
+
|
|
367
|
+
### readable.setEncoding(encoding)
|
|
368
|
+
|
|
369
|
+
Makes the `'data'` event emit a string instead of a `Buffer`. `encoding`
|
|
370
|
+
can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.
|
|
371
|
+
|
|
372
|
+
The encoding can also be set by specifying an `encoding` field to the
|
|
373
|
+
constructor.
|
|
374
|
+
|
|
375
|
+
### readable.read([size])
|
|
376
|
+
|
|
377
|
+
* `size` {Number | null} Optional number of bytes to read.
|
|
378
|
+
* Return: {Buffer | String | null}
|
|
379
|
+
|
|
380
|
+
Note: **This function SHOULD be called by Readable stream users.**
|
|
381
|
+
|
|
382
|
+
Call this method to consume data once the `'readable'` event is
|
|
383
|
+
emitted.
|
|
384
|
+
|
|
385
|
+
The `size` argument will set a minimum number of bytes that you are
|
|
386
|
+
interested in. If not set, then the entire content of the internal
|
|
387
|
+
buffer is returned.
|
|
388
|
+
|
|
389
|
+
If there is no data to consume, or if there are fewer bytes in the
|
|
390
|
+
internal buffer than the `size` argument, then `null` is returned, and
|
|
391
|
+
a future `'readable'` event will be emitted when more is available.
|
|
392
|
+
|
|
393
|
+
Calling `stream.read(0)` will always return `null`, and will trigger a
|
|
394
|
+
refresh of the internal buffer, but otherwise be a no-op.
|
|
395
|
+
|
|
396
|
+
### readable.pipe(destination, [options])
|
|
397
|
+
|
|
398
|
+
* `destination` {Writable Stream}
|
|
399
|
+
* `options` {Object} Optional
|
|
400
|
+
* `end` {Boolean} Default=true
|
|
401
|
+
|
|
402
|
+
Connects this readable stream to `destination` WriteStream. Incoming
|
|
403
|
+
data on this stream gets written to `destination`. Properly manages
|
|
404
|
+
back-pressure so that a slow destination will not be overwhelmed by a
|
|
405
|
+
fast readable stream.
|
|
406
|
+
|
|
407
|
+
This function returns the `destination` stream.
|
|
408
|
+
|
|
409
|
+
For example, emulating the Unix `cat` command:
|
|
410
|
+
|
|
411
|
+
process.stdin.pipe(process.stdout);
|
|
412
|
+
|
|
413
|
+
By default `end()` is called on the destination when the source stream
|
|
414
|
+
emits `end`, so that `destination` is no longer writable. Pass `{ end:
|
|
415
|
+
false }` as `options` to keep the destination stream open.
|
|
416
|
+
|
|
417
|
+
This keeps `writer` open so that "Goodbye" can be written at the
|
|
418
|
+
end.
|
|
419
|
+
|
|
420
|
+
reader.pipe(writer, { end: false });
|
|
421
|
+
reader.on("end", function() {
|
|
422
|
+
writer.end("Goodbye\n");
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
Note that `process.stderr` and `process.stdout` are never closed until
|
|
426
|
+
the process exits, regardless of the specified options.
|
|
427
|
+
|
|
428
|
+
### readable.unpipe([destination])
|
|
429
|
+
|
|
430
|
+
* `destination` {Writable Stream} Optional
|
|
431
|
+
|
|
432
|
+
Undo a previously established `pipe()`. If no destination is
|
|
433
|
+
provided, then all previously established pipes are removed.
|
|
434
|
+
|
|
435
|
+
### readable.pause()
|
|
436
|
+
|
|
437
|
+
Switches the readable stream into "old mode", where data is emitted
|
|
438
|
+
using a `'data'` event rather than being buffered for consumption via
|
|
439
|
+
the `read()` method.
|
|
440
|
+
|
|
441
|
+
Ceases the flow of data. No `'data'` events are emitted while the
|
|
442
|
+
stream is in a paused state.
|
|
443
|
+
|
|
444
|
+
### readable.resume()
|
|
445
|
+
|
|
446
|
+
Switches the readable stream into "old mode", where data is emitted
|
|
447
|
+
using a `'data'` event rather than being buffered for consumption via
|
|
448
|
+
the `read()` method.
|
|
449
|
+
|
|
450
|
+
Resumes the incoming `'data'` events after a `pause()`.
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
## Class: stream.Writable
|
|
454
|
+
|
|
455
|
+
<!--type=class-->
|
|
456
|
+
|
|
457
|
+
A `Writable` Stream has the following methods, members, and events.
|
|
458
|
+
|
|
459
|
+
Note that `stream.Writable` is an abstract class designed to be
|
|
460
|
+
extended with an underlying implementation of the
|
|
461
|
+
`_write(chunk, encoding, cb)` method. (See below.)
|
|
462
|
+
|
|
463
|
+
### new stream.Writable([options])
|
|
464
|
+
|
|
465
|
+
* `options` {Object}
|
|
466
|
+
* `highWaterMark` {Number} Buffer level when `write()` starts
|
|
467
|
+
returning false. Default=16kb
|
|
468
|
+
* `decodeStrings` {Boolean} Whether or not to decode strings into
|
|
469
|
+
Buffers before passing them to `_write()`. Default=true
|
|
470
|
+
|
|
471
|
+
In classes that extend the Writable class, make sure to call the
|
|
472
|
+
constructor so that the buffering settings can be properly
|
|
473
|
+
initialized.
|
|
474
|
+
|
|
475
|
+
### writable.\_write(chunk, encoding, callback)
|
|
476
|
+
|
|
477
|
+
* `chunk` {Buffer | String} The chunk to be written. Will always
|
|
478
|
+
be a buffer unless the `decodeStrings` option was set to `false`.
|
|
479
|
+
* `encoding` {String} If the chunk is a string, then this is the
|
|
480
|
+
encoding type. Ignore chunk is a buffer. Note that chunk will
|
|
481
|
+
**always** be a buffer unless the `decodeStrings` option is
|
|
482
|
+
explicitly set to `false`.
|
|
483
|
+
* `callback` {Function} Call this function (optionally with an error
|
|
484
|
+
argument) when you are done processing the supplied chunk.
|
|
485
|
+
|
|
486
|
+
All Writable stream implementations must provide a `_write` method to
|
|
487
|
+
send data to the underlying resource.
|
|
488
|
+
|
|
489
|
+
Note: **This function MUST NOT be called directly.** It should be
|
|
490
|
+
implemented by child classes, and called by the internal Writable
|
|
491
|
+
class methods only.
|
|
492
|
+
|
|
493
|
+
Call the callback using the standard `callback(error)` pattern to
|
|
494
|
+
signal that the write completed successfully or with an error.
|
|
495
|
+
|
|
496
|
+
If the `decodeStrings` flag is set in the constructor options, then
|
|
497
|
+
`chunk` may be a string rather than a Buffer, and `encoding` will
|
|
498
|
+
indicate the sort of string that it is. This is to support
|
|
499
|
+
implementations that have an optimized handling for certain string
|
|
500
|
+
data encodings. If you do not explicitly set the `decodeStrings`
|
|
501
|
+
option to `false`, then you can safely ignore the `encoding` argument,
|
|
502
|
+
and assume that `chunk` will always be a Buffer.
|
|
503
|
+
|
|
504
|
+
This method is prefixed with an underscore because it is internal to
|
|
505
|
+
the class that defines it, and should not be called directly by user
|
|
506
|
+
programs. However, you **are** expected to override this method in
|
|
507
|
+
your own extension classes.
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
### writable.write(chunk, [encoding], [callback])
|
|
511
|
+
|
|
512
|
+
* `chunk` {Buffer | String} Data to be written
|
|
513
|
+
* `encoding` {String} Optional. If `chunk` is a string, then encoding
|
|
514
|
+
defaults to `'utf8'`
|
|
515
|
+
* `callback` {Function} Optional. Called when this chunk is
|
|
516
|
+
successfully written.
|
|
517
|
+
* Returns {Boolean}
|
|
518
|
+
|
|
519
|
+
Writes `chunk` to the stream. Returns `true` if the data has been
|
|
520
|
+
flushed to the underlying resource. Returns `false` to indicate that
|
|
521
|
+
the buffer is full, and the data will be sent out in the future. The
|
|
522
|
+
`'drain'` event will indicate when the buffer is empty again.
|
|
523
|
+
|
|
524
|
+
The specifics of when `write()` will return false, is determined by
|
|
525
|
+
the `highWaterMark` option provided to the constructor.
|
|
526
|
+
|
|
527
|
+
### writable.end([chunk], [encoding], [callback])
|
|
528
|
+
|
|
529
|
+
* `chunk` {Buffer | String} Optional final data to be written
|
|
530
|
+
* `encoding` {String} Optional. If `chunk` is a string, then encoding
|
|
531
|
+
defaults to `'utf8'`
|
|
532
|
+
* `callback` {Function} Optional. Called when the final chunk is
|
|
533
|
+
successfully written.
|
|
534
|
+
|
|
535
|
+
Call this method to signal the end of the data being written to the
|
|
536
|
+
stream.
|
|
537
|
+
|
|
538
|
+
### Event: 'drain'
|
|
539
|
+
|
|
540
|
+
Emitted when the stream's write queue empties and it's safe to write
|
|
541
|
+
without buffering again. Listen for it when `stream.write()` returns
|
|
542
|
+
`false`.
|
|
543
|
+
|
|
544
|
+
### Event: 'close'
|
|
545
|
+
|
|
546
|
+
Emitted when the underlying resource (for example, the backing file
|
|
547
|
+
descriptor) has been closed. Not all streams will emit this.
|
|
548
|
+
|
|
549
|
+
### Event: 'finish'
|
|
550
|
+
|
|
551
|
+
When `end()` is called and there are no more chunks to write, this
|
|
552
|
+
event is emitted.
|
|
553
|
+
|
|
554
|
+
### Event: 'pipe'
|
|
555
|
+
|
|
556
|
+
* `source` {Readable Stream}
|
|
557
|
+
|
|
558
|
+
Emitted when the stream is passed to a readable stream's pipe method.
|
|
559
|
+
|
|
560
|
+
### Event 'unpipe'
|
|
561
|
+
|
|
562
|
+
* `source` {Readable Stream}
|
|
563
|
+
|
|
564
|
+
Emitted when a previously established `pipe()` is removed using the
|
|
565
|
+
source Readable stream's `unpipe()` method.
|
|
566
|
+
|
|
567
|
+
## Class: stream.Duplex
|
|
568
|
+
|
|
569
|
+
<!--type=class-->
|
|
570
|
+
|
|
571
|
+
A "duplex" stream is one that is both Readable and Writable, such as a
|
|
572
|
+
TCP socket connection.
|
|
573
|
+
|
|
574
|
+
Note that `stream.Duplex` is an abstract class designed to be
|
|
575
|
+
extended with an underlying implementation of the `_read(size)`
|
|
576
|
+
and `_write(chunk, encoding, callback)` methods as you would with a Readable or
|
|
577
|
+
Writable stream class.
|
|
578
|
+
|
|
579
|
+
Since JavaScript doesn't have multiple prototypal inheritance, this
|
|
580
|
+
class prototypally inherits from Readable, and then parasitically from
|
|
581
|
+
Writable. It is thus up to the user to implement both the lowlevel
|
|
582
|
+
`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method
|
|
583
|
+
on extension duplex classes.
|
|
584
|
+
|
|
585
|
+
### new stream.Duplex(options)
|
|
586
|
+
|
|
587
|
+
* `options` {Object} Passed to both Writable and Readable
|
|
588
|
+
constructors. Also has the following fields:
|
|
589
|
+
* `allowHalfOpen` {Boolean} Default=true. If set to `false`, then
|
|
590
|
+
the stream will automatically end the readable side when the
|
|
591
|
+
writable side ends and vice versa.
|
|
592
|
+
|
|
593
|
+
In classes that extend the Duplex class, make sure to call the
|
|
594
|
+
constructor so that the buffering settings can be properly
|
|
595
|
+
initialized.
|
|
596
|
+
|
|
597
|
+
## Class: stream.Transform
|
|
598
|
+
|
|
599
|
+
A "transform" stream is a duplex stream where the output is causally
|
|
600
|
+
connected in some way to the input, such as a zlib stream or a crypto
|
|
601
|
+
stream.
|
|
602
|
+
|
|
603
|
+
There is no requirement that the output be the same size as the input,
|
|
604
|
+
the same number of chunks, or arrive at the same time. For example, a
|
|
605
|
+
Hash stream will only ever have a single chunk of output which is
|
|
606
|
+
provided when the input is ended. A zlib stream will either produce
|
|
607
|
+
much smaller or much larger than its input.
|
|
608
|
+
|
|
609
|
+
Rather than implement the `_read()` and `_write()` methods, Transform
|
|
610
|
+
classes must implement the `_transform()` method, and may optionally
|
|
611
|
+
also implement the `_flush()` method. (See below.)
|
|
612
|
+
|
|
613
|
+
### new stream.Transform([options])
|
|
614
|
+
|
|
615
|
+
* `options` {Object} Passed to both Writable and Readable
|
|
616
|
+
constructors.
|
|
617
|
+
|
|
618
|
+
In classes that extend the Transform class, make sure to call the
|
|
619
|
+
constructor so that the buffering settings can be properly
|
|
620
|
+
initialized.
|
|
621
|
+
|
|
622
|
+
### transform.\_transform(chunk, encoding, callback)
|
|
623
|
+
|
|
624
|
+
* `chunk` {Buffer | String} The chunk to be transformed. Will always
|
|
625
|
+
be a buffer unless the `decodeStrings` option was set to `false`.
|
|
626
|
+
* `encoding` {String} If the chunk is a string, then this is the
|
|
627
|
+
encoding type. (Ignore if `decodeStrings` chunk is a buffer.)
|
|
628
|
+
* `callback` {Function} Call this function (optionally with an error
|
|
629
|
+
argument) when you are done processing the supplied chunk.
|
|
630
|
+
|
|
631
|
+
Note: **This function MUST NOT be called directly.** It should be
|
|
632
|
+
implemented by child classes, and called by the internal Transform
|
|
633
|
+
class methods only.
|
|
634
|
+
|
|
635
|
+
All Transform stream implementations must provide a `_transform`
|
|
636
|
+
method to accept input and produce output.
|
|
637
|
+
|
|
638
|
+
`_transform` should do whatever has to be done in this specific
|
|
639
|
+
Transform class, to handle the bytes being written, and pass them off
|
|
640
|
+
to the readable portion of the interface. Do asynchronous I/O,
|
|
641
|
+
process things, and so on.
|
|
642
|
+
|
|
643
|
+
Call `transform.push(outputChunk)` 0 or more times to generate output
|
|
644
|
+
from this input chunk, depending on how much data you want to output
|
|
645
|
+
as a result of this chunk.
|
|
646
|
+
|
|
647
|
+
Call the callback function only when the current chunk is completely
|
|
648
|
+
consumed. Note that there may or may not be output as a result of any
|
|
649
|
+
particular input chunk.
|
|
650
|
+
|
|
651
|
+
This method is prefixed with an underscore because it is internal to
|
|
652
|
+
the class that defines it, and should not be called directly by user
|
|
653
|
+
programs. However, you **are** expected to override this method in
|
|
654
|
+
your own extension classes.
|
|
655
|
+
|
|
656
|
+
### transform.\_flush(callback)
|
|
657
|
+
|
|
658
|
+
* `callback` {Function} Call this function (optionally with an error
|
|
659
|
+
argument) when you are done flushing any remaining data.
|
|
660
|
+
|
|
661
|
+
Note: **This function MUST NOT be called directly.** It MAY be implemented
|
|
662
|
+
by child classes, and if so, will be called by the internal Transform
|
|
663
|
+
class methods only.
|
|
664
|
+
|
|
665
|
+
In some cases, your transform operation may need to emit a bit more
|
|
666
|
+
data at the end of the stream. For example, a `Zlib` compression
|
|
667
|
+
stream will store up some internal state so that it can optimally
|
|
668
|
+
compress the output. At the end, however, it needs to do the best it
|
|
669
|
+
can with what is left, so that the data will be complete.
|
|
670
|
+
|
|
671
|
+
In those cases, you can implement a `_flush` method, which will be
|
|
672
|
+
called at the very end, after all the written data is consumed, but
|
|
673
|
+
before emitting `end` to signal the end of the readable side. Just
|
|
674
|
+
like with `_transform`, call `transform.push(chunk)` zero or more
|
|
675
|
+
times, as appropriate, and call `callback` when the flush operation is
|
|
676
|
+
complete.
|
|
677
|
+
|
|
678
|
+
This method is prefixed with an underscore because it is internal to
|
|
679
|
+
the class that defines it, and should not be called directly by user
|
|
680
|
+
programs. However, you **are** expected to override this method in
|
|
681
|
+
your own extension classes.
|
|
682
|
+
|
|
683
|
+
### Example: `SimpleProtocol` parser
|
|
684
|
+
|
|
685
|
+
The example above of a simple protocol parser can be implemented much
|
|
686
|
+
more simply by using the higher level `Transform` stream class.
|
|
687
|
+
|
|
688
|
+
In this example, rather than providing the input as an argument, it
|
|
689
|
+
would be piped into the parser, which is a more idiomatic Node stream
|
|
690
|
+
approach.
|
|
691
|
+
|
|
692
|
+
```javascript
|
|
693
|
+
function SimpleProtocol(options) {
|
|
694
|
+
if (!(this instanceof SimpleProtocol))
|
|
695
|
+
return new SimpleProtocol(options);
|
|
696
|
+
|
|
697
|
+
Transform.call(this, options);
|
|
698
|
+
this._inBody = false;
|
|
699
|
+
this._sawFirstCr = false;
|
|
700
|
+
this._rawHeader = [];
|
|
701
|
+
this.header = null;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
SimpleProtocol.prototype = Object.create(
|
|
705
|
+
Transform.prototype, { constructor: { value: SimpleProtocol }});
|
|
706
|
+
|
|
707
|
+
SimpleProtocol.prototype._transform = function(chunk, encoding, done) {
|
|
708
|
+
if (!this._inBody) {
|
|
709
|
+
// check if the chunk has a \n\n
|
|
710
|
+
var split = -1;
|
|
711
|
+
for (var i = 0; i < chunk.length; i++) {
|
|
712
|
+
if (chunk[i] === 10) { // '\n'
|
|
713
|
+
if (this._sawFirstCr) {
|
|
714
|
+
split = i;
|
|
715
|
+
break;
|
|
716
|
+
} else {
|
|
717
|
+
this._sawFirstCr = true;
|
|
718
|
+
}
|
|
719
|
+
} else {
|
|
720
|
+
this._sawFirstCr = false;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
if (split === -1) {
|
|
725
|
+
// still waiting for the \n\n
|
|
726
|
+
// stash the chunk, and try again.
|
|
727
|
+
this._rawHeader.push(chunk);
|
|
728
|
+
} else {
|
|
729
|
+
this._inBody = true;
|
|
730
|
+
var h = chunk.slice(0, split);
|
|
731
|
+
this._rawHeader.push(h);
|
|
732
|
+
var header = Buffer.concat(this._rawHeader).toString();
|
|
733
|
+
try {
|
|
734
|
+
this.header = JSON.parse(header);
|
|
735
|
+
} catch (er) {
|
|
736
|
+
this.emit('error', new Error('invalid simple protocol data'));
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
// and let them know that we are done parsing the header.
|
|
740
|
+
this.emit('header', this.header);
|
|
741
|
+
|
|
742
|
+
// now, because we got some extra data, emit this first.
|
|
743
|
+
this.push(b);
|
|
744
|
+
}
|
|
745
|
+
} else {
|
|
746
|
+
// from there on, just provide the data to our consumer as-is.
|
|
747
|
+
this.push(b);
|
|
748
|
+
}
|
|
749
|
+
done();
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
var parser = new SimpleProtocol();
|
|
753
|
+
source.pipe(parser)
|
|
754
|
+
|
|
755
|
+
// Now parser is a readable stream that will emit 'header'
|
|
756
|
+
// with the parsed header data.
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
## Class: stream.PassThrough
|
|
761
|
+
|
|
762
|
+
This is a trivial implementation of a `Transform` stream that simply
|
|
763
|
+
passes the input bytes across to the output. Its purpose is mainly
|
|
764
|
+
for examples and testing, but there are occasionally use cases where
|
|
765
|
+
it can come in handy.
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
[EventEmitter]: events.html#events_class_events_eventemitter
|