embeditor-rails 1.1.1 → 2.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- 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,944 @@
|
|
1
|
+
/*
|
2
|
+
* rm - Feb 2011
|
3
|
+
* ctype.js
|
4
|
+
*
|
5
|
+
* This module provides a simple abstraction towards reading and writing
|
6
|
+
* different types of binary data. It is designed to use ctio.js and provide a
|
7
|
+
* richer and more expressive API on top of it.
|
8
|
+
*
|
9
|
+
* By default we support the following as built in basic types:
|
10
|
+
* int8_t
|
11
|
+
* int16_t
|
12
|
+
* int32_t
|
13
|
+
* uint8_t
|
14
|
+
* uint16_t
|
15
|
+
* uint32_t
|
16
|
+
* uint64_t
|
17
|
+
* float
|
18
|
+
* double
|
19
|
+
* char
|
20
|
+
* char[]
|
21
|
+
*
|
22
|
+
* Each type is returned as a Number, with the exception of char and char[]
|
23
|
+
* which are returned as Node Buffers. A char is considered a uint8_t.
|
24
|
+
*
|
25
|
+
* Requests to read and write data are specified as an array of JSON objects.
|
26
|
+
* This is also the same way that one declares structs. Even if just a single
|
27
|
+
* value is requested, it must be done as a struct. The array order determines
|
28
|
+
* the order that we try and read values. Each entry has the following format
|
29
|
+
* with values marked with a * being optional.
|
30
|
+
*
|
31
|
+
* { key: { type: /type/, value*: /value/, offset*: /offset/ }
|
32
|
+
*
|
33
|
+
* If offset is defined, we lseek(offset, SEEK_SET) before reading the next
|
34
|
+
* value. Value is defined when we're writing out data, otherwise it's ignored.
|
35
|
+
*
|
36
|
+
*/
|
37
|
+
|
38
|
+
var mod_ctf = require('./ctf.js');
|
39
|
+
var mod_ctio = require('./ctio.js');
|
40
|
+
var mod_assert = require('assert');
|
41
|
+
|
42
|
+
/*
|
43
|
+
* This is the set of basic types that we support.
|
44
|
+
*
|
45
|
+
* read The function to call to read in a value from a buffer
|
46
|
+
*
|
47
|
+
* write The function to call to write a value to a buffer
|
48
|
+
*
|
49
|
+
*/
|
50
|
+
var deftypes = {
|
51
|
+
'uint8_t': { read: ctReadUint8, write: ctWriteUint8 },
|
52
|
+
'uint16_t': { read: ctReadUint16, write: ctWriteUint16 },
|
53
|
+
'uint32_t': { read: ctReadUint32, write: ctWriteUint32 },
|
54
|
+
'uint64_t': { read: ctReadUint64, write: ctWriteUint64 },
|
55
|
+
'int8_t': { read: ctReadSint8, write: ctWriteSint8 },
|
56
|
+
'int16_t': { read: ctReadSint16, write: ctWriteSint16 },
|
57
|
+
'int32_t': { read: ctReadSint32, write: ctWriteSint32 },
|
58
|
+
'int64_t': { read: ctReadSint64, write: ctWriteSint64 },
|
59
|
+
'float': { read: ctReadFloat, write: ctWriteFloat },
|
60
|
+
'double': { read: ctReadDouble, write: ctWriteDouble },
|
61
|
+
'char': { read: ctReadChar, write: ctWriteChar },
|
62
|
+
'char[]': { read: ctReadCharArray, write: ctWriteCharArray }
|
63
|
+
};
|
64
|
+
|
65
|
+
/*
|
66
|
+
* The following are wrappers around the CType IO low level API. They encode
|
67
|
+
* knowledge about the size and return something in the expected format.
|
68
|
+
*/
|
69
|
+
function ctReadUint8(endian, buffer, offset)
|
70
|
+
{
|
71
|
+
var val = mod_ctio.ruint8(buffer, endian, offset);
|
72
|
+
return ({ value: val, size: 1 });
|
73
|
+
}
|
74
|
+
|
75
|
+
function ctReadUint16(endian, buffer, offset)
|
76
|
+
{
|
77
|
+
var val = mod_ctio.ruint16(buffer, endian, offset);
|
78
|
+
return ({ value: val, size: 2 });
|
79
|
+
}
|
80
|
+
|
81
|
+
function ctReadUint32(endian, buffer, offset)
|
82
|
+
{
|
83
|
+
var val = mod_ctio.ruint32(buffer, endian, offset);
|
84
|
+
return ({ value: val, size: 4 });
|
85
|
+
}
|
86
|
+
|
87
|
+
function ctReadUint64(endian, buffer, offset)
|
88
|
+
{
|
89
|
+
var val = mod_ctio.ruint64(buffer, endian, offset);
|
90
|
+
return ({ value: val, size: 8 });
|
91
|
+
}
|
92
|
+
|
93
|
+
function ctReadSint8(endian, buffer, offset)
|
94
|
+
{
|
95
|
+
var val = mod_ctio.rsint8(buffer, endian, offset);
|
96
|
+
return ({ value: val, size: 1 });
|
97
|
+
}
|
98
|
+
|
99
|
+
function ctReadSint16(endian, buffer, offset)
|
100
|
+
{
|
101
|
+
var val = mod_ctio.rsint16(buffer, endian, offset);
|
102
|
+
return ({ value: val, size: 2 });
|
103
|
+
}
|
104
|
+
|
105
|
+
function ctReadSint32(endian, buffer, offset)
|
106
|
+
{
|
107
|
+
var val = mod_ctio.rsint32(buffer, endian, offset);
|
108
|
+
return ({ value: val, size: 4 });
|
109
|
+
}
|
110
|
+
|
111
|
+
function ctReadSint64(endian, buffer, offset)
|
112
|
+
{
|
113
|
+
var val = mod_ctio.rsint64(buffer, endian, offset);
|
114
|
+
return ({ value: val, size: 8 });
|
115
|
+
}
|
116
|
+
|
117
|
+
function ctReadFloat(endian, buffer, offset)
|
118
|
+
{
|
119
|
+
var val = mod_ctio.rfloat(buffer, endian, offset);
|
120
|
+
return ({ value: val, size: 4 });
|
121
|
+
}
|
122
|
+
|
123
|
+
function ctReadDouble(endian, buffer, offset)
|
124
|
+
{
|
125
|
+
var val = mod_ctio.rdouble(buffer, endian, offset);
|
126
|
+
return ({ value: val, size: 8 });
|
127
|
+
}
|
128
|
+
|
129
|
+
/*
|
130
|
+
* Reads a single character into a node buffer
|
131
|
+
*/
|
132
|
+
function ctReadChar(endian, buffer, offset)
|
133
|
+
{
|
134
|
+
var res = new Buffer(1);
|
135
|
+
res[0] = mod_ctio.ruint8(buffer, endian, offset);
|
136
|
+
return ({ value: res, size: 1 });
|
137
|
+
}
|
138
|
+
|
139
|
+
function ctReadCharArray(length, endian, buffer, offset)
|
140
|
+
{
|
141
|
+
var ii;
|
142
|
+
var res = new Buffer(length);
|
143
|
+
|
144
|
+
for (ii = 0; ii < length; ii++)
|
145
|
+
res[ii] = mod_ctio.ruint8(buffer, endian, offset + ii);
|
146
|
+
|
147
|
+
return ({ value: res, size: length });
|
148
|
+
}
|
149
|
+
|
150
|
+
function ctWriteUint8(value, endian, buffer, offset)
|
151
|
+
{
|
152
|
+
mod_ctio.wuint8(value, endian, buffer, offset);
|
153
|
+
return (1);
|
154
|
+
}
|
155
|
+
|
156
|
+
function ctWriteUint16(value, endian, buffer, offset)
|
157
|
+
{
|
158
|
+
mod_ctio.wuint16(value, endian, buffer, offset);
|
159
|
+
return (2);
|
160
|
+
}
|
161
|
+
|
162
|
+
function ctWriteUint32(value, endian, buffer, offset)
|
163
|
+
{
|
164
|
+
mod_ctio.wuint32(value, endian, buffer, offset);
|
165
|
+
return (4);
|
166
|
+
}
|
167
|
+
|
168
|
+
function ctWriteUint64(value, endian, buffer, offset)
|
169
|
+
{
|
170
|
+
mod_ctio.wuint64(value, endian, buffer, offset);
|
171
|
+
return (8);
|
172
|
+
}
|
173
|
+
|
174
|
+
function ctWriteSint8(value, endian, buffer, offset)
|
175
|
+
{
|
176
|
+
mod_ctio.wsint8(value, endian, buffer, offset);
|
177
|
+
return (1);
|
178
|
+
}
|
179
|
+
|
180
|
+
function ctWriteSint16(value, endian, buffer, offset)
|
181
|
+
{
|
182
|
+
mod_ctio.wsint16(value, endian, buffer, offset);
|
183
|
+
return (2);
|
184
|
+
}
|
185
|
+
|
186
|
+
function ctWriteSint32(value, endian, buffer, offset)
|
187
|
+
{
|
188
|
+
mod_ctio.wsint32(value, endian, buffer, offset);
|
189
|
+
return (4);
|
190
|
+
}
|
191
|
+
|
192
|
+
function ctWriteSint64(value, endian, buffer, offset)
|
193
|
+
{
|
194
|
+
mod_ctio.wsint64(value, endian, buffer, offset);
|
195
|
+
return (8);
|
196
|
+
}
|
197
|
+
|
198
|
+
function ctWriteFloat(value, endian, buffer, offset)
|
199
|
+
{
|
200
|
+
mod_ctio.wfloat(value, endian, buffer, offset);
|
201
|
+
return (4);
|
202
|
+
}
|
203
|
+
|
204
|
+
function ctWriteDouble(value, endian, buffer, offset)
|
205
|
+
{
|
206
|
+
mod_ctio.wdouble(value, endian, buffer, offset);
|
207
|
+
return (8);
|
208
|
+
}
|
209
|
+
|
210
|
+
/*
|
211
|
+
* Writes a single character into a node buffer
|
212
|
+
*/
|
213
|
+
function ctWriteChar(value, endian, buffer, offset)
|
214
|
+
{
|
215
|
+
if (!(value instanceof Buffer))
|
216
|
+
throw (new Error('Input must be a buffer'));
|
217
|
+
|
218
|
+
mod_ctio.ruint8(value[0], endian, buffer, offset);
|
219
|
+
return (1);
|
220
|
+
}
|
221
|
+
|
222
|
+
/*
|
223
|
+
* We're going to write 0s into the buffer if the string is shorter than the
|
224
|
+
* length of the array.
|
225
|
+
*/
|
226
|
+
function ctWriteCharArray(value, length, endian, buffer, offset)
|
227
|
+
{
|
228
|
+
var ii;
|
229
|
+
|
230
|
+
if (!(value instanceof Buffer))
|
231
|
+
throw (new Error('Input must be a buffer'));
|
232
|
+
|
233
|
+
if (value.length > length)
|
234
|
+
throw (new Error('value length greater than array length'));
|
235
|
+
|
236
|
+
for (ii = 0; ii < value.length && ii < length; ii++)
|
237
|
+
mod_ctio.wuint8(value[ii], endian, buffer, offset + ii);
|
238
|
+
|
239
|
+
for (; ii < length; ii++)
|
240
|
+
mod_ctio.wuint8(0, endian, offset + ii);
|
241
|
+
|
242
|
+
|
243
|
+
return (length);
|
244
|
+
}
|
245
|
+
|
246
|
+
/*
|
247
|
+
* Each parser has their own set of types. We want to make sure that they each
|
248
|
+
* get their own copy as they may need to modify it.
|
249
|
+
*/
|
250
|
+
function ctGetBasicTypes()
|
251
|
+
{
|
252
|
+
var ret = {};
|
253
|
+
var key;
|
254
|
+
for (key in deftypes)
|
255
|
+
ret[key] = deftypes[key];
|
256
|
+
|
257
|
+
return (ret);
|
258
|
+
}
|
259
|
+
|
260
|
+
/*
|
261
|
+
* Given a string in the form of type[length] we want to split this into an
|
262
|
+
* object that extracts that information. We want to note that we could possibly
|
263
|
+
* have nested arrays so this should only check the furthest one. It may also be
|
264
|
+
* the case that we have no [] pieces, in which case we just return the current
|
265
|
+
* type.
|
266
|
+
*/
|
267
|
+
function ctParseType(str)
|
268
|
+
{
|
269
|
+
var begInd, endInd;
|
270
|
+
var type, len;
|
271
|
+
if (typeof (str) != 'string')
|
272
|
+
throw (new Error('type must be a Javascript string'));
|
273
|
+
|
274
|
+
endInd = str.lastIndexOf(']');
|
275
|
+
if (endInd == -1) {
|
276
|
+
if (str.lastIndexOf('[') != -1)
|
277
|
+
throw (new Error('found invalid type with \'[\' but ' +
|
278
|
+
'no corresponding \']\''));
|
279
|
+
|
280
|
+
return ({ type: str });
|
281
|
+
}
|
282
|
+
|
283
|
+
begInd = str.lastIndexOf('[');
|
284
|
+
if (begInd == -1)
|
285
|
+
throw (new Error('found invalid type with \']\' but ' +
|
286
|
+
'no corresponding \'[\''));
|
287
|
+
|
288
|
+
if (begInd >= endInd)
|
289
|
+
throw (new Error('malformed type, \']\' appears before \'[\''));
|
290
|
+
|
291
|
+
type = str.substring(0, begInd);
|
292
|
+
len = str.substring(begInd + 1, endInd);
|
293
|
+
|
294
|
+
return ({ type: type, len: len });
|
295
|
+
}
|
296
|
+
|
297
|
+
/*
|
298
|
+
* Given a request validate that all of the fields for it are valid and make
|
299
|
+
* sense. This includes verifying the following notions:
|
300
|
+
* - Each type requested is present in types
|
301
|
+
* - Only allow a name for a field to be specified once
|
302
|
+
* - If an array is specified, validate that the requested field exists and
|
303
|
+
* comes before it.
|
304
|
+
* - If fields is defined, check that each entry has the occurrence of field
|
305
|
+
*/
|
306
|
+
function ctCheckReq(def, types, fields)
|
307
|
+
{
|
308
|
+
var ii, jj;
|
309
|
+
var req, keys, key;
|
310
|
+
var found = {};
|
311
|
+
|
312
|
+
if (!(def instanceof Array))
|
313
|
+
throw (new Error('definition is not an array'));
|
314
|
+
|
315
|
+
if (def.length === 0)
|
316
|
+
throw (new Error('definition must have at least one element'));
|
317
|
+
|
318
|
+
for (ii = 0; ii < def.length; ii++) {
|
319
|
+
req = def[ii];
|
320
|
+
if (!(req instanceof Object))
|
321
|
+
throw (new Error('definition must be an array of' +
|
322
|
+
'objects'));
|
323
|
+
|
324
|
+
keys = Object.keys(req);
|
325
|
+
if (keys.length != 1)
|
326
|
+
throw (new Error('definition entry must only have ' +
|
327
|
+
'one key'));
|
328
|
+
|
329
|
+
if (keys[0] in found)
|
330
|
+
throw (new Error('Specified name already ' +
|
331
|
+
'specified: ' + keys[0]));
|
332
|
+
|
333
|
+
if (!('type' in req[keys[0]]))
|
334
|
+
throw (new Error('missing required type definition'));
|
335
|
+
|
336
|
+
key = ctParseType(req[keys[0]]['type']);
|
337
|
+
|
338
|
+
/*
|
339
|
+
* We may have nested arrays, we need to check the validity of
|
340
|
+
* the types until the len field is undefined in key. However,
|
341
|
+
* each time len is defined we need to verify it is either an
|
342
|
+
* integer or corresponds to an already seen key.
|
343
|
+
*/
|
344
|
+
while (key['len'] !== undefined) {
|
345
|
+
if (isNaN(parseInt(key['len'], 10))) {
|
346
|
+
if (!(key['len'] in found))
|
347
|
+
throw (new Error('Given an array ' +
|
348
|
+
'length without a matching type'));
|
349
|
+
|
350
|
+
}
|
351
|
+
|
352
|
+
key = ctParseType(key['type']);
|
353
|
+
}
|
354
|
+
|
355
|
+
/* Now we can validate if the type is valid */
|
356
|
+
if (!(key['type'] in types))
|
357
|
+
throw (new Error('type not found or typdefed: ' +
|
358
|
+
key['type']));
|
359
|
+
|
360
|
+
/* Check for any required fields */
|
361
|
+
if (fields !== undefined) {
|
362
|
+
for (jj = 0; jj < fields.length; jj++) {
|
363
|
+
if (!(fields[jj] in req[keys[0]]))
|
364
|
+
throw (new Error('Missing required ' +
|
365
|
+
'field: ' + fields[jj]));
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
found[keys[0]] = true;
|
370
|
+
}
|
371
|
+
}
|
372
|
+
|
373
|
+
|
374
|
+
/*
|
375
|
+
* Create a new instance of the parser. Each parser has its own store of
|
376
|
+
* typedefs and endianness. Conf is an object with the following required
|
377
|
+
* values:
|
378
|
+
*
|
379
|
+
* endian Either 'big' or 'little' do determine the endianness we
|
380
|
+
* want to read from or write to.
|
381
|
+
*
|
382
|
+
* And the following optional values:
|
383
|
+
*
|
384
|
+
* char-type Valid options here are uint8 and int8. If uint8 is
|
385
|
+
* specified this changes the default behavior of a single
|
386
|
+
* char from being a buffer of a single character to being
|
387
|
+
* a uint8_t. If int8, it becomes an int8_t instead.
|
388
|
+
*/
|
389
|
+
function CTypeParser(conf)
|
390
|
+
{
|
391
|
+
if (!conf) throw (new Error('missing required argument'));
|
392
|
+
|
393
|
+
if (!('endian' in conf))
|
394
|
+
throw (new Error('missing required endian value'));
|
395
|
+
|
396
|
+
if (conf['endian'] != 'big' && conf['endian'] != 'little')
|
397
|
+
throw (new Error('Invalid endian type'));
|
398
|
+
|
399
|
+
if ('char-type' in conf && (conf['char-type'] != 'uint8' &&
|
400
|
+
conf['char-type'] != 'int8'))
|
401
|
+
throw (new Error('invalid option for char-type: ' +
|
402
|
+
conf['char-type']));
|
403
|
+
|
404
|
+
this.endian = conf['endian'];
|
405
|
+
this.types = ctGetBasicTypes();
|
406
|
+
|
407
|
+
/*
|
408
|
+
* There may be a more graceful way to do this, but this will have to
|
409
|
+
* serve.
|
410
|
+
*/
|
411
|
+
if ('char-type' in conf && conf['char-type'] == 'uint8')
|
412
|
+
this.types['char'] = this.types['uint8_t'];
|
413
|
+
|
414
|
+
if ('char-type' in conf && conf['char-type'] == 'int8')
|
415
|
+
this.types['char'] = this.types['int8_t'];
|
416
|
+
}
|
417
|
+
|
418
|
+
/*
|
419
|
+
* Sets the current endian value for the Parser. If the value is not valid,
|
420
|
+
* throws an Error.
|
421
|
+
*
|
422
|
+
* endian Either 'big' or 'little' do determine the endianness we
|
423
|
+
* want to read from or write to.
|
424
|
+
*
|
425
|
+
*/
|
426
|
+
CTypeParser.prototype.setEndian = function (endian)
|
427
|
+
{
|
428
|
+
if (endian != 'big' && endian != 'little')
|
429
|
+
throw (new Error('invalid endian type, must be big or ' +
|
430
|
+
'little'));
|
431
|
+
|
432
|
+
this.endian = endian;
|
433
|
+
};
|
434
|
+
|
435
|
+
/*
|
436
|
+
* Returns the current value of the endian value for the parser.
|
437
|
+
*/
|
438
|
+
CTypeParser.prototype.getEndian = function ()
|
439
|
+
{
|
440
|
+
return (this.endian);
|
441
|
+
};
|
442
|
+
|
443
|
+
/*
|
444
|
+
* A user has requested to add a type, let us honor their request. Yet, if their
|
445
|
+
* request doth spurn us, send them unto the Hells which Dante describes.
|
446
|
+
*
|
447
|
+
* name The string for the type definition we're adding
|
448
|
+
*
|
449
|
+
* value Either a string that is a type/array name or an object
|
450
|
+
* that describes a struct.
|
451
|
+
*/
|
452
|
+
CTypeParser.prototype.typedef = function (name, value)
|
453
|
+
{
|
454
|
+
var type;
|
455
|
+
|
456
|
+
if (name === undefined)
|
457
|
+
throw (new (Error('missing required typedef argument: name')));
|
458
|
+
|
459
|
+
if (value === undefined)
|
460
|
+
throw (new (Error('missing required typedef argument: value')));
|
461
|
+
|
462
|
+
if (typeof (name) != 'string')
|
463
|
+
throw (new (Error('the name of a type must be a string')));
|
464
|
+
|
465
|
+
type = ctParseType(name);
|
466
|
+
|
467
|
+
if (type['len'] !== undefined)
|
468
|
+
throw (new Error('Cannot have an array in the typedef name'));
|
469
|
+
|
470
|
+
if (name in this.types)
|
471
|
+
throw (new Error('typedef name already present: ' + name));
|
472
|
+
|
473
|
+
if (typeof (value) != 'string' && !(value instanceof Array))
|
474
|
+
throw (new Error('typedef value must either be a string or ' +
|
475
|
+
'struct'));
|
476
|
+
|
477
|
+
if (typeof (value) == 'string') {
|
478
|
+
type = ctParseType(value);
|
479
|
+
if (type['len'] !== undefined) {
|
480
|
+
if (isNaN(parseInt(type['len'], 10)))
|
481
|
+
throw (new (Error('typedef value must use ' +
|
482
|
+
'fixed size array when outside of a ' +
|
483
|
+
'struct')));
|
484
|
+
}
|
485
|
+
|
486
|
+
this.types[name] = value;
|
487
|
+
} else {
|
488
|
+
/* We have a struct, validate it */
|
489
|
+
ctCheckReq(value, this.types);
|
490
|
+
this.types[name] = value;
|
491
|
+
}
|
492
|
+
};
|
493
|
+
|
494
|
+
/*
|
495
|
+
* Include all of the typedefs, but none of the built in types. This should be
|
496
|
+
* treated as read-only.
|
497
|
+
*/
|
498
|
+
CTypeParser.prototype.lstypes = function ()
|
499
|
+
{
|
500
|
+
var key;
|
501
|
+
var ret = {};
|
502
|
+
|
503
|
+
for (key in this.types) {
|
504
|
+
if (key in deftypes)
|
505
|
+
continue;
|
506
|
+
ret[key] = this.types[key];
|
507
|
+
}
|
508
|
+
|
509
|
+
return (ret);
|
510
|
+
};
|
511
|
+
|
512
|
+
/*
|
513
|
+
* Given a type string that may have array types that aren't numbers, try and
|
514
|
+
* fill them in from the values object. The object should be of the format where
|
515
|
+
* indexing into it should return a number for that type.
|
516
|
+
*
|
517
|
+
* str The type string
|
518
|
+
*
|
519
|
+
* values An object that can be used to fulfill type information
|
520
|
+
*/
|
521
|
+
function ctResolveArray(str, values)
|
522
|
+
{
|
523
|
+
var ret = '';
|
524
|
+
var type = ctParseType(str);
|
525
|
+
|
526
|
+
while (type['len'] !== undefined) {
|
527
|
+
if (isNaN(parseInt(type['len'], 10))) {
|
528
|
+
if (typeof (values[type['len']]) != 'number')
|
529
|
+
throw (new Error('cannot sawp in non-number ' +
|
530
|
+
'for array value'));
|
531
|
+
ret = '[' + values[type['len']] + ']' + ret;
|
532
|
+
} else {
|
533
|
+
ret = '[' + type['len'] + ']' + ret;
|
534
|
+
}
|
535
|
+
type = ctParseType(type['type']);
|
536
|
+
}
|
537
|
+
|
538
|
+
ret = type['type'] + ret;
|
539
|
+
|
540
|
+
return (ret);
|
541
|
+
}
|
542
|
+
|
543
|
+
/*
|
544
|
+
* [private] Either the typedef resolves to another type string or to a struct.
|
545
|
+
* If it resolves to a struct, we just pass it off to read struct. If not, we
|
546
|
+
* can just pass it off to read entry.
|
547
|
+
*/
|
548
|
+
CTypeParser.prototype.resolveTypedef = function (type, dispatch, buffer,
|
549
|
+
offset, value)
|
550
|
+
{
|
551
|
+
var pt;
|
552
|
+
|
553
|
+
mod_assert.ok(type in this.types);
|
554
|
+
if (typeof (this.types[type]) == 'string') {
|
555
|
+
pt = ctParseType(this.types[type]);
|
556
|
+
if (dispatch == 'read')
|
557
|
+
return (this.readEntry(pt, buffer, offset));
|
558
|
+
else if (dispatch == 'write')
|
559
|
+
return (this.writeEntry(value, pt, buffer, offset));
|
560
|
+
else
|
561
|
+
throw (new Error('invalid dispatch type to ' +
|
562
|
+
'resolveTypedef'));
|
563
|
+
} else {
|
564
|
+
if (dispatch == 'read')
|
565
|
+
return (this.readStruct(this.types[type], buffer,
|
566
|
+
offset));
|
567
|
+
else if (dispatch == 'write')
|
568
|
+
return (this.writeStruct(value, this.types[type],
|
569
|
+
buffer, offset));
|
570
|
+
else
|
571
|
+
throw (new Error('invalid dispatch type to ' +
|
572
|
+
'resolveTypedef'));
|
573
|
+
}
|
574
|
+
|
575
|
+
};
|
576
|
+
|
577
|
+
/*
|
578
|
+
* [private] Try and read in the specific entry.
|
579
|
+
*/
|
580
|
+
CTypeParser.prototype.readEntry = function (type, buffer, offset)
|
581
|
+
{
|
582
|
+
var parse, len;
|
583
|
+
|
584
|
+
/*
|
585
|
+
* Because we want to special case char[]s this is unfortunately
|
586
|
+
* a bit uglier than it really should be. We want to special
|
587
|
+
* case char[]s so that we return a node buffer, thus they are a
|
588
|
+
* first class type where as all other arrays just call into a
|
589
|
+
* generic array routine which calls their data-specific routine
|
590
|
+
* the specified number of times.
|
591
|
+
*
|
592
|
+
* The valid dispatch options we have are:
|
593
|
+
* - Array and char => char[] handler
|
594
|
+
* - Generic array handler
|
595
|
+
* - Generic typedef handler
|
596
|
+
* - Basic type handler
|
597
|
+
*/
|
598
|
+
if (type['len'] !== undefined) {
|
599
|
+
len = parseInt(type['len'], 10);
|
600
|
+
if (isNaN(len))
|
601
|
+
throw (new Error('somehow got a non-numeric length'));
|
602
|
+
|
603
|
+
if (type['type'] == 'char')
|
604
|
+
parse = this.types['char[]']['read'](len,
|
605
|
+
this.endian, buffer, offset);
|
606
|
+
else
|
607
|
+
parse = this.readArray(type['type'],
|
608
|
+
len, buffer, offset);
|
609
|
+
} else {
|
610
|
+
if (type['type'] in deftypes)
|
611
|
+
parse = this.types[type['type']]['read'](this.endian,
|
612
|
+
buffer, offset);
|
613
|
+
else
|
614
|
+
parse = this.resolveTypedef(type['type'], 'read',
|
615
|
+
buffer, offset);
|
616
|
+
}
|
617
|
+
|
618
|
+
return (parse);
|
619
|
+
};
|
620
|
+
|
621
|
+
/*
|
622
|
+
* [private] Read an array of data
|
623
|
+
*/
|
624
|
+
CTypeParser.prototype.readArray = function (type, length, buffer, offset)
|
625
|
+
{
|
626
|
+
var ii, ent, pt;
|
627
|
+
var baseOffset = offset;
|
628
|
+
var ret = new Array(length);
|
629
|
+
pt = ctParseType(type);
|
630
|
+
|
631
|
+
for (ii = 0; ii < length; ii++) {
|
632
|
+
ent = this.readEntry(pt, buffer, offset);
|
633
|
+
offset += ent['size'];
|
634
|
+
ret[ii] = ent['value'];
|
635
|
+
}
|
636
|
+
|
637
|
+
return ({ value: ret, size: offset - baseOffset });
|
638
|
+
};
|
639
|
+
|
640
|
+
/*
|
641
|
+
* [private] Read a single struct in.
|
642
|
+
*/
|
643
|
+
CTypeParser.prototype.readStruct = function (def, buffer, offset)
|
644
|
+
{
|
645
|
+
var parse, ii, type, entry, key;
|
646
|
+
var baseOffset = offset;
|
647
|
+
var ret = {};
|
648
|
+
|
649
|
+
/* Walk it and handle doing what's necessary */
|
650
|
+
for (ii = 0; ii < def.length; ii++) {
|
651
|
+
key = Object.keys(def[ii])[0];
|
652
|
+
entry = def[ii][key];
|
653
|
+
|
654
|
+
/* Resolve all array values */
|
655
|
+
type = ctParseType(ctResolveArray(entry['type'], ret));
|
656
|
+
|
657
|
+
if ('offset' in entry)
|
658
|
+
offset = baseOffset + entry['offset'];
|
659
|
+
|
660
|
+
parse = this.readEntry(type, buffer, offset);
|
661
|
+
|
662
|
+
offset += parse['size'];
|
663
|
+
ret[key] = parse['value'];
|
664
|
+
}
|
665
|
+
|
666
|
+
return ({ value: ret, size: (offset-baseOffset)});
|
667
|
+
};
|
668
|
+
|
669
|
+
/*
|
670
|
+
* This is what we were born to do. We read the data from a buffer and return it
|
671
|
+
* in an object whose keys match the values from the object.
|
672
|
+
*
|
673
|
+
* def The array definition of the data to read in
|
674
|
+
*
|
675
|
+
* buffer The buffer to read data from
|
676
|
+
*
|
677
|
+
* offset The offset to start writing to
|
678
|
+
*
|
679
|
+
* Returns an object where each key corresponds to an entry in def and the value
|
680
|
+
* is the read value.
|
681
|
+
*/
|
682
|
+
CTypeParser.prototype.readData = function (def, buffer, offset)
|
683
|
+
{
|
684
|
+
/* Sanity check for arguments */
|
685
|
+
if (def === undefined)
|
686
|
+
throw (new Error('missing definition for what we should be' +
|
687
|
+
'parsing'));
|
688
|
+
|
689
|
+
if (buffer === undefined)
|
690
|
+
throw (new Error('missing buffer for what we should be ' +
|
691
|
+
'parsing'));
|
692
|
+
|
693
|
+
if (offset === undefined)
|
694
|
+
throw (new Error('missing offset for what we should be ' +
|
695
|
+
'parsing'));
|
696
|
+
|
697
|
+
/* Sanity check the object definition */
|
698
|
+
ctCheckReq(def, this.types);
|
699
|
+
|
700
|
+
return (this.readStruct(def, buffer, offset)['value']);
|
701
|
+
};
|
702
|
+
|
703
|
+
/*
|
704
|
+
* [private] Write out an array of data
|
705
|
+
*/
|
706
|
+
CTypeParser.prototype.writeArray = function (value, type, length, buffer,
|
707
|
+
offset)
|
708
|
+
{
|
709
|
+
var ii, pt;
|
710
|
+
var baseOffset = offset;
|
711
|
+
if (!(value instanceof Array))
|
712
|
+
throw (new Error('asked to write an array, but value is not ' +
|
713
|
+
'an array'));
|
714
|
+
|
715
|
+
if (value.length != length)
|
716
|
+
throw (new Error('asked to write array of length ' + length +
|
717
|
+
' but that does not match value length: ' + value.length));
|
718
|
+
|
719
|
+
pt = ctParseType(type);
|
720
|
+
for (ii = 0; ii < length; ii++)
|
721
|
+
offset += this.writeEntry(value[ii], pt, buffer, offset);
|
722
|
+
|
723
|
+
return (offset - baseOffset);
|
724
|
+
};
|
725
|
+
|
726
|
+
/*
|
727
|
+
* [private] Write the specific entry
|
728
|
+
*/
|
729
|
+
CTypeParser.prototype.writeEntry = function (value, type, buffer, offset)
|
730
|
+
{
|
731
|
+
var len, ret;
|
732
|
+
|
733
|
+
if (type['len'] !== undefined) {
|
734
|
+
len = parseInt(type['len'], 10);
|
735
|
+
if (isNaN(len))
|
736
|
+
throw (new Error('somehow got a non-numeric length'));
|
737
|
+
|
738
|
+
if (type['type'] == 'char')
|
739
|
+
ret = this.types['char[]']['write'](value, len,
|
740
|
+
this.endian, buffer, offset);
|
741
|
+
else
|
742
|
+
ret = this.writeArray(value, type['type'],
|
743
|
+
len, buffer, offset);
|
744
|
+
} else {
|
745
|
+
if (type['type'] in deftypes)
|
746
|
+
ret = this.types[type['type']]['write'](value,
|
747
|
+
this.endian, buffer, offset);
|
748
|
+
else
|
749
|
+
ret = this.resolveTypedef(type['type'], 'write',
|
750
|
+
buffer, offset, value);
|
751
|
+
}
|
752
|
+
|
753
|
+
return (ret);
|
754
|
+
};
|
755
|
+
|
756
|
+
/*
|
757
|
+
* [private] Write a single struct out.
|
758
|
+
*/
|
759
|
+
CTypeParser.prototype.writeStruct = function (value, def, buffer, offset)
|
760
|
+
{
|
761
|
+
var ii, entry, type, key;
|
762
|
+
var baseOffset = offset;
|
763
|
+
var vals = {};
|
764
|
+
|
765
|
+
for (ii = 0; ii < def.length; ii++) {
|
766
|
+
key = Object.keys(def[ii])[0];
|
767
|
+
entry = def[ii][key];
|
768
|
+
|
769
|
+
type = ctParseType(ctResolveArray(entry['type'], vals));
|
770
|
+
|
771
|
+
if ('offset' in entry)
|
772
|
+
offset = baseOffset + entry['offset'];
|
773
|
+
|
774
|
+
offset += this.writeEntry(value[ii], type, buffer, offset);
|
775
|
+
/* Now that we've written it out, we can use it for arrays */
|
776
|
+
vals[key] = value[ii];
|
777
|
+
}
|
778
|
+
|
779
|
+
return (offset);
|
780
|
+
};
|
781
|
+
|
782
|
+
/*
|
783
|
+
* Unfortunately, we're stuck with the sins of an initial poor design. Because
|
784
|
+
* of that, we are going to have to support the old way of writing data via
|
785
|
+
* writeData. There we insert the values that you want to write into the
|
786
|
+
* definition. A little baroque. Internally, we use the new model. So we need to
|
787
|
+
* just get those values out of there. But to maintain the principle of least
|
788
|
+
* surprise, we're not going to modify the input data.
|
789
|
+
*/
|
790
|
+
function getValues(def)
|
791
|
+
{
|
792
|
+
var ii, out, key;
|
793
|
+
out = [];
|
794
|
+
for (ii = 0; ii < def.length; ii++) {
|
795
|
+
key = Object.keys(def[ii])[0];
|
796
|
+
mod_assert.ok('value' in def[ii][key]);
|
797
|
+
out.push(def[ii][key]['value']);
|
798
|
+
}
|
799
|
+
|
800
|
+
return (out);
|
801
|
+
}
|
802
|
+
|
803
|
+
/*
|
804
|
+
* This is the second half of what we were born to do, write out the data
|
805
|
+
* itself. Historically this function required you to put your values in the
|
806
|
+
* definition section. This was not the smartest thing to do and a bit of an
|
807
|
+
* oversight to be honest. As such, this function now takes a values argument.
|
808
|
+
* If values is non-null and non-undefined, it will be used to determine the
|
809
|
+
* values. This means that the old method is still supported, but is no longer
|
810
|
+
* acceptable.
|
811
|
+
*
|
812
|
+
* def The array definition of the data to write out with
|
813
|
+
* values
|
814
|
+
*
|
815
|
+
* buffer The buffer to write to
|
816
|
+
*
|
817
|
+
* offset The offset in the buffer to write to
|
818
|
+
*
|
819
|
+
* values An array of values to write.
|
820
|
+
*/
|
821
|
+
CTypeParser.prototype.writeData = function (def, buffer, offset, values)
|
822
|
+
{
|
823
|
+
var hv;
|
824
|
+
|
825
|
+
if (def === undefined)
|
826
|
+
throw (new Error('missing definition for what we should be' +
|
827
|
+
'parsing'));
|
828
|
+
|
829
|
+
if (buffer === undefined)
|
830
|
+
throw (new Error('missing buffer for what we should be ' +
|
831
|
+
'parsing'));
|
832
|
+
|
833
|
+
if (offset === undefined)
|
834
|
+
throw (new Error('missing offset for what we should be ' +
|
835
|
+
'parsing'));
|
836
|
+
|
837
|
+
hv = (values != null && values != undefined);
|
838
|
+
if (hv) {
|
839
|
+
if (!Array.isArray(values))
|
840
|
+
throw (new Error('missing values for writing'));
|
841
|
+
ctCheckReq(def, this.types);
|
842
|
+
} else {
|
843
|
+
ctCheckReq(def, this.types, [ 'value' ]);
|
844
|
+
}
|
845
|
+
|
846
|
+
this.writeStruct(hv ? values : getValues(def), def, buffer, offset);
|
847
|
+
};
|
848
|
+
|
849
|
+
/*
|
850
|
+
* Functions to go to and from 64 bit numbers in a way that is compatible with
|
851
|
+
* Javascript limitations. There are two sets. One where the user is okay with
|
852
|
+
* an approximation and one where they are definitely not okay with an
|
853
|
+
* approximation.
|
854
|
+
*/
|
855
|
+
|
856
|
+
/*
|
857
|
+
* Attempts to convert an array of two integers returned from rsint64 / ruint64
|
858
|
+
* into an absolute 64 bit number. If however the value would exceed 2^52 this
|
859
|
+
* will instead throw an error. The mantissa in a double is a 52 bit number and
|
860
|
+
* rather than potentially give you a value that is an approximation this will
|
861
|
+
* error. If you would rather an approximation, please see toApprox64.
|
862
|
+
*
|
863
|
+
* val An array of two 32-bit integers
|
864
|
+
*/
|
865
|
+
function toAbs64(val)
|
866
|
+
{
|
867
|
+
if (val === undefined)
|
868
|
+
throw (new Error('missing required arg: value'));
|
869
|
+
|
870
|
+
if (!Array.isArray(val))
|
871
|
+
throw (new Error('value must be an array'));
|
872
|
+
|
873
|
+
if (val.length != 2)
|
874
|
+
throw (new Error('value must be an array of length 2'));
|
875
|
+
|
876
|
+
/* We have 20 bits worth of precision in this range */
|
877
|
+
if (val[0] >= 0x100000)
|
878
|
+
throw (new Error('value would become approximated'));
|
879
|
+
|
880
|
+
return (val[0] * Math.pow(2, 32) + val[1]);
|
881
|
+
}
|
882
|
+
|
883
|
+
/*
|
884
|
+
* Will return the 64 bit value as returned in an array from rsint64 / ruint64
|
885
|
+
* to a value as close as it can. Note that Javascript stores all numbers as a
|
886
|
+
* double and the mantissa only has 52 bits. Thus this version may approximate
|
887
|
+
* the value.
|
888
|
+
*
|
889
|
+
* val An array of two 32-bit integers
|
890
|
+
*/
|
891
|
+
function toApprox64(val)
|
892
|
+
{
|
893
|
+
if (val === undefined)
|
894
|
+
throw (new Error('missing required arg: value'));
|
895
|
+
|
896
|
+
if (!Array.isArray(val))
|
897
|
+
throw (new Error('value must be an array'));
|
898
|
+
|
899
|
+
if (val.length != 2)
|
900
|
+
throw (new Error('value must be an array of length 2'));
|
901
|
+
|
902
|
+
return (Math.pow(2, 32) * val[0] + val[1]);
|
903
|
+
}
|
904
|
+
|
905
|
+
function parseCTF(json, conf)
|
906
|
+
{
|
907
|
+
var ctype = new CTypeParser(conf);
|
908
|
+
mod_ctf.ctfParseJson(json, ctype);
|
909
|
+
|
910
|
+
return (ctype);
|
911
|
+
}
|
912
|
+
|
913
|
+
/*
|
914
|
+
* Export the few things we actually want to. Currently this is just the CType
|
915
|
+
* Parser and ctio.
|
916
|
+
*/
|
917
|
+
exports.Parser = CTypeParser;
|
918
|
+
exports.toAbs64 = toAbs64;
|
919
|
+
exports.toApprox64 = toApprox64;
|
920
|
+
|
921
|
+
exports.parseCTF = parseCTF;
|
922
|
+
|
923
|
+
exports.ruint8 = mod_ctio.ruint8;
|
924
|
+
exports.ruint16 = mod_ctio.ruint16;
|
925
|
+
exports.ruint32 = mod_ctio.ruint32;
|
926
|
+
exports.ruint64 = mod_ctio.ruint64;
|
927
|
+
exports.wuint8 = mod_ctio.wuint8;
|
928
|
+
exports.wuint16 = mod_ctio.wuint16;
|
929
|
+
exports.wuint32 = mod_ctio.wuint32;
|
930
|
+
exports.wuint64 = mod_ctio.wuint64;
|
931
|
+
|
932
|
+
exports.rsint8 = mod_ctio.rsint8;
|
933
|
+
exports.rsint16 = mod_ctio.rsint16;
|
934
|
+
exports.rsint32 = mod_ctio.rsint32;
|
935
|
+
exports.rsint64 = mod_ctio.rsint64;
|
936
|
+
exports.wsint8 = mod_ctio.wsint8;
|
937
|
+
exports.wsint16 = mod_ctio.wsint16;
|
938
|
+
exports.wsint32 = mod_ctio.wsint32;
|
939
|
+
exports.wsint64 = mod_ctio.wsint64;
|
940
|
+
|
941
|
+
exports.rfloat = mod_ctio.rfloat;
|
942
|
+
exports.rdouble = mod_ctio.rdouble;
|
943
|
+
exports.wfloat = mod_ctio.wfloat;
|
944
|
+
exports.wdouble = mod_ctio.wdouble;
|