embeditor-rails 2.0.0.beta → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/embeditor-rails/version.rb +1 -1
- metadata +51 -1056
- data/lib/node_modules/npm/AUTHORS +0 -158
- data/lib/node_modules/npm/CONTRIBUTING.md +0 -9
- data/lib/node_modules/npm/LICENSE +0 -235
- data/lib/node_modules/npm/Makefile +0 -216
- data/lib/node_modules/npm/README.md +0 -241
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp +0 -2
- data/lib/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd +0 -1
- data/lib/node_modules/npm/bin/npm +0 -13
- data/lib/node_modules/npm/bin/npm-cli.js +0 -87
- data/lib/node_modules/npm/bin/npm.cmd +0 -6
- data/lib/node_modules/npm/bin/read-package-json.js +0 -22
- data/lib/node_modules/npm/cli.js +0 -2
- data/lib/node_modules/npm/configure +0 -33
- data/lib/node_modules/npm/doc/api/npm-bin.md +0 -13
- data/lib/node_modules/npm/doc/api/npm-bugs.md +0 -19
- data/lib/node_modules/npm/doc/api/npm-commands.md +0 -22
- data/lib/node_modules/npm/doc/api/npm-config.md +0 -45
- data/lib/node_modules/npm/doc/api/npm-deprecate.md +0 -34
- data/lib/node_modules/npm/doc/api/npm-docs.md +0 -19
- data/lib/node_modules/npm/doc/api/npm-edit.md +0 -24
- data/lib/node_modules/npm/doc/api/npm-explore.md +0 -18
- data/lib/node_modules/npm/doc/api/npm-help-search.md +0 -30
- data/lib/node_modules/npm/doc/api/npm-init.md +0 -29
- data/lib/node_modules/npm/doc/api/npm-install.md +0 -19
- data/lib/node_modules/npm/doc/api/npm-link.md +0 -33
- data/lib/node_modules/npm/doc/api/npm-load.md +0 -26
- data/lib/node_modules/npm/doc/api/npm-ls.md +0 -56
- data/lib/node_modules/npm/doc/api/npm-outdated.md +0 -13
- data/lib/node_modules/npm/doc/api/npm-owner.md +0 -31
- data/lib/node_modules/npm/doc/api/npm-pack.md +0 -19
- data/lib/node_modules/npm/doc/api/npm-prefix.md +0 -15
- data/lib/node_modules/npm/doc/api/npm-prune.md +0 -17
- data/lib/node_modules/npm/doc/api/npm-publish.md +0 -30
- data/lib/node_modules/npm/doc/api/npm-rebuild.md +0 -16
- data/lib/node_modules/npm/doc/api/npm-repo.md +0 -19
- data/lib/node_modules/npm/doc/api/npm-restart.md +0 -22
- data/lib/node_modules/npm/doc/api/npm-root.md +0 -15
- data/lib/node_modules/npm/doc/api/npm-run-script.md +0 -27
- data/lib/node_modules/npm/doc/api/npm-search.md +0 -35
- data/lib/node_modules/npm/doc/api/npm-shrinkwrap.md +0 -20
- data/lib/node_modules/npm/doc/api/npm-start.md +0 -13
- data/lib/node_modules/npm/doc/api/npm-stop.md +0 -13
- data/lib/node_modules/npm/doc/api/npm-submodule.md +0 -28
- data/lib/node_modules/npm/doc/api/npm-tag.md +0 -23
- data/lib/node_modules/npm/doc/api/npm-test.md +0 -16
- data/lib/node_modules/npm/doc/api/npm-uninstall.md +0 -16
- data/lib/node_modules/npm/doc/api/npm-unpublish.md +0 -20
- data/lib/node_modules/npm/doc/api/npm-update.md +0 -11
- data/lib/node_modules/npm/doc/api/npm-version.md +0 -18
- data/lib/node_modules/npm/doc/api/npm-view.md +0 -93
- data/lib/node_modules/npm/doc/api/npm-whoami.md +0 -15
- data/lib/node_modules/npm/doc/api/npm.md +0 -116
- data/lib/node_modules/npm/doc/cli/npm-adduser.md +0 -38
- data/lib/node_modules/npm/doc/cli/npm-bin.md +0 -19
- data/lib/node_modules/npm/doc/cli/npm-bugs.md +0 -42
- data/lib/node_modules/npm/doc/cli/npm-build.md +0 -22
- data/lib/node_modules/npm/doc/cli/npm-bundle.md +0 -14
- data/lib/node_modules/npm/doc/cli/npm-cache.md +0 -72
- data/lib/node_modules/npm/doc/cli/npm-completion.md +0 -29
- data/lib/node_modules/npm/doc/cli/npm-config.md +0 -71
- data/lib/node_modules/npm/doc/cli/npm-dedupe.md +0 -58
- data/lib/node_modules/npm/doc/cli/npm-deprecate.md +0 -26
- data/lib/node_modules/npm/doc/cli/npm-docs.md +0 -44
- data/lib/node_modules/npm/doc/cli/npm-edit.md +0 -37
- data/lib/node_modules/npm/doc/cli/npm-explore.md +0 -40
- data/lib/node_modules/npm/doc/cli/npm-help-search.md +0 -35
- data/lib/node_modules/npm/doc/cli/npm-help.md +0 -40
- data/lib/node_modules/npm/doc/cli/npm-init.md +0 -25
- data/lib/node_modules/npm/doc/cli/npm-install.md +0 -252
- data/lib/node_modules/npm/doc/cli/npm-link.md +0 -63
- data/lib/node_modules/npm/doc/cli/npm-ls.md +0 -80
- data/lib/node_modules/npm/doc/cli/npm-outdated.md +0 -58
- data/lib/node_modules/npm/doc/cli/npm-owner.md +0 -33
- data/lib/node_modules/npm/doc/cli/npm-pack.md +0 -27
- data/lib/node_modules/npm/doc/cli/npm-prefix.md +0 -19
- data/lib/node_modules/npm/doc/cli/npm-prune.md +0 -25
- data/lib/node_modules/npm/doc/cli/npm-publish.md +0 -30
- data/lib/node_modules/npm/doc/cli/npm-rebuild.md +0 -21
- data/lib/node_modules/npm/doc/cli/npm-repo.md +0 -28
- data/lib/node_modules/npm/doc/cli/npm-restart.md +0 -22
- data/lib/node_modules/npm/doc/cli/npm-rm.md +0 -23
- data/lib/node_modules/npm/doc/cli/npm-root.md +0 -19
- data/lib/node_modules/npm/doc/cli/npm-run-script.md +0 -21
- data/lib/node_modules/npm/doc/cli/npm-search.md +0 -36
- data/lib/node_modules/npm/doc/cli/npm-shrinkwrap.md +0 -185
- data/lib/node_modules/npm/doc/cli/npm-star.md +0 -22
- data/lib/node_modules/npm/doc/cli/npm-stars.md +0 -22
- data/lib/node_modules/npm/doc/cli/npm-start.md +0 -18
- data/lib/node_modules/npm/doc/cli/npm-stop.md +0 -18
- data/lib/node_modules/npm/doc/cli/npm-submodule.md +0 -28
- data/lib/node_modules/npm/doc/cli/npm-tag.md +0 -34
- data/lib/node_modules/npm/doc/cli/npm-test.md +0 -22
- data/lib/node_modules/npm/doc/cli/npm-uninstall.md +0 -21
- data/lib/node_modules/npm/doc/cli/npm-unpublish.md +0 -32
- data/lib/node_modules/npm/doc/cli/npm-update.md +0 -24
- data/lib/node_modules/npm/doc/cli/npm-version.md +0 -45
- data/lib/node_modules/npm/doc/cli/npm-view.md +0 -90
- data/lib/node_modules/npm/doc/cli/npm-whoami.md +0 -17
- data/lib/node_modules/npm/doc/cli/npm.md +0 -153
- data/lib/node_modules/npm/doc/files/npm-folders.md +0 -211
- data/lib/node_modules/npm/doc/files/npmrc.md +0 -59
- data/lib/node_modules/npm/doc/files/package.json.md +0 -576
- data/lib/node_modules/npm/doc/misc/npm-coding-style.md +0 -181
- data/lib/node_modules/npm/doc/misc/npm-config.md +0 -820
- data/lib/node_modules/npm/doc/misc/npm-developers.md +0 -207
- data/lib/node_modules/npm/doc/misc/npm-disputes.md +0 -99
- data/lib/node_modules/npm/doc/misc/npm-faq.md +0 -364
- data/lib/node_modules/npm/doc/misc/npm-index.md +0 -411
- data/lib/node_modules/npm/doc/misc/npm-registry.md +0 -69
- data/lib/node_modules/npm/doc/misc/npm-scripts.md +0 -245
- data/lib/node_modules/npm/doc/misc/removing-npm.md +0 -54
- data/lib/node_modules/npm/doc/misc/semver.md +0 -111
- data/lib/node_modules/npm/html/doc/README.html +0 -276
- data/lib/node_modules/npm/html/doc/api/npm-bin.html +0 -53
- data/lib/node_modules/npm/html/doc/api/npm-bugs.html +0 -59
- data/lib/node_modules/npm/html/doc/api/npm-commands.html +0 -62
- data/lib/node_modules/npm/html/doc/api/npm-config.html +0 -67
- data/lib/node_modules/npm/html/doc/api/npm-deprecate.html +0 -66
- data/lib/node_modules/npm/html/doc/api/npm-docs.html +0 -59
- data/lib/node_modules/npm/html/doc/api/npm-edit.html +0 -64
- data/lib/node_modules/npm/html/doc/api/npm-explore.html +0 -58
- data/lib/node_modules/npm/html/doc/api/npm-help-search.html +0 -66
- data/lib/node_modules/npm/html/doc/api/npm-init.html +0 -69
- data/lib/node_modules/npm/html/doc/api/npm-install.html +0 -59
- data/lib/node_modules/npm/html/doc/api/npm-link.html +0 -73
- data/lib/node_modules/npm/html/doc/api/npm-load.html +0 -66
- data/lib/node_modules/npm/html/doc/api/npm-ls.html +0 -93
- data/lib/node_modules/npm/html/doc/api/npm-outdated.html +0 -53
- data/lib/node_modules/npm/html/doc/api/npm-owner.html +0 -68
- data/lib/node_modules/npm/html/doc/api/npm-pack.html +0 -59
- data/lib/node_modules/npm/html/doc/api/npm-prefix.html +0 -55
- data/lib/node_modules/npm/html/doc/api/npm-prune.html +0 -57
- data/lib/node_modules/npm/html/doc/api/npm-publish.html +0 -66
- data/lib/node_modules/npm/html/doc/api/npm-rebuild.html +0 -56
- data/lib/node_modules/npm/html/doc/api/npm-repo.html +0 -59
- data/lib/node_modules/npm/html/doc/api/npm-restart.html +0 -61
- data/lib/node_modules/npm/html/doc/api/npm-root.html +0 -55
- data/lib/node_modules/npm/html/doc/api/npm-run-script.html +0 -63
- data/lib/node_modules/npm/html/doc/api/npm-search.html +0 -66
- data/lib/node_modules/npm/html/doc/api/npm-shrinkwrap.html +0 -60
- data/lib/node_modules/npm/html/doc/api/npm-start.html +0 -53
- data/lib/node_modules/npm/html/doc/api/npm-stop.html +0 -53
- data/lib/node_modules/npm/html/doc/api/npm-submodule.html +0 -67
- data/lib/node_modules/npm/html/doc/api/npm-tag.html +0 -63
- data/lib/node_modules/npm/html/doc/api/npm-test.html +0 -56
- data/lib/node_modules/npm/html/doc/api/npm-uninstall.html +0 -56
- data/lib/node_modules/npm/html/doc/api/npm-unpublish.html +0 -60
- data/lib/node_modules/npm/html/doc/api/npm-update.html +0 -52
- data/lib/node_modules/npm/html/doc/api/npm-version.html +0 -58
- data/lib/node_modules/npm/html/doc/api/npm-view.html +0 -133
- data/lib/node_modules/npm/html/doc/api/npm-whoami.html +0 -55
- data/lib/node_modules/npm/html/doc/api/npm.html +0 -126
- data/lib/node_modules/npm/html/doc/cli/npm-adduser.html +0 -73
- data/lib/node_modules/npm/html/doc/cli/npm-bin.html +0 -54
- data/lib/node_modules/npm/html/doc/cli/npm-bugs.html +0 -72
- data/lib/node_modules/npm/html/doc/cli/npm-build.html +0 -59
- data/lib/node_modules/npm/html/doc/cli/npm-bundle.html +0 -54
- data/lib/node_modules/npm/html/doc/cli/npm-cache.html +0 -100
- data/lib/node_modules/npm/html/doc/cli/npm-completion.html +0 -67
- data/lib/node_modules/npm/html/doc/cli/npm-config.html +0 -107
- data/lib/node_modules/npm/html/doc/cli/npm-dedupe.html +0 -96
- data/lib/node_modules/npm/html/doc/cli/npm-deprecate.html +0 -65
- data/lib/node_modules/npm/html/doc/cli/npm-docs.html +0 -75
- data/lib/node_modules/npm/html/doc/cli/npm-edit.html +0 -71
- data/lib/node_modules/npm/html/doc/cli/npm-explore.html +0 -74
- data/lib/node_modules/npm/html/doc/cli/npm-help-search.html +0 -72
- data/lib/node_modules/npm/html/doc/cli/npm-help.html +0 -70
- data/lib/node_modules/npm/html/doc/cli/npm-init.html +0 -63
- data/lib/node_modules/npm/html/doc/cli/npm-install.html +0 -183
- data/lib/node_modules/npm/html/doc/cli/npm-link.html +0 -96
- data/lib/node_modules/npm/html/doc/cli/npm-ls.html +0 -108
- data/lib/node_modules/npm/html/doc/cli/npm-outdated.html +0 -92
- data/lib/node_modules/npm/html/doc/cli/npm-owner.html +0 -68
- data/lib/node_modules/npm/html/doc/cli/npm-pack.html +0 -63
- data/lib/node_modules/npm/html/doc/cli/npm-prefix.html +0 -54
- data/lib/node_modules/npm/html/doc/cli/npm-prune.html +0 -63
- data/lib/node_modules/npm/html/doc/cli/npm-publish.html +0 -63
- data/lib/node_modules/npm/html/doc/cli/npm-rebuild.html +0 -60
- data/lib/node_modules/npm/html/doc/cli/npm-repo.html +0 -66
- data/lib/node_modules/npm/html/doc/cli/npm-restart.html +0 -58
- data/lib/node_modules/npm/html/doc/cli/npm-rm.html +0 -58
- data/lib/node_modules/npm/html/doc/cli/npm-root.html +0 -54
- data/lib/node_modules/npm/html/doc/cli/npm-run-script.html +0 -57
- data/lib/node_modules/npm/html/doc/cli/npm-search.html +0 -71
- data/lib/node_modules/npm/html/doc/cli/npm-shrinkwrap.html +0 -217
- data/lib/node_modules/npm/html/doc/cli/npm-star.html +0 -60
- data/lib/node_modules/npm/html/doc/cli/npm-stars.html +0 -59
- data/lib/node_modules/npm/html/doc/cli/npm-start.html +0 -54
- data/lib/node_modules/npm/html/doc/cli/npm-stop.html +0 -54
- data/lib/node_modules/npm/html/doc/cli/npm-submodule.html +0 -67
- data/lib/node_modules/npm/html/doc/cli/npm-tag.html +0 -68
- data/lib/node_modules/npm/html/doc/cli/npm-test.html +0 -58
- data/lib/node_modules/npm/html/doc/cli/npm-uninstall.html +0 -56
- data/lib/node_modules/npm/html/doc/cli/npm-unpublish.html +0 -68
- data/lib/node_modules/npm/html/doc/cli/npm-update.html +0 -60
- data/lib/node_modules/npm/html/doc/cli/npm-version.html +0 -83
- data/lib/node_modules/npm/html/doc/cli/npm-view.html +0 -125
- data/lib/node_modules/npm/html/doc/cli/npm-whoami.html +0 -54
- data/lib/node_modules/npm/html/doc/cli/npm.html +0 -165
- data/lib/node_modules/npm/html/doc/files/npm-folders.html +0 -239
- data/lib/node_modules/npm/html/doc/files/npm-global.html +0 -239
- data/lib/node_modules/npm/html/doc/files/npm-json.html +0 -580
- data/lib/node_modules/npm/html/doc/files/npmrc.html +0 -93
- data/lib/node_modules/npm/html/doc/files/package.json.html +0 -580
- data/lib/node_modules/npm/html/doc/index.html +0 -450
- data/lib/node_modules/npm/html/doc/misc/npm-coding-style.html +0 -216
- data/lib/node_modules/npm/html/doc/misc/npm-config.html +0 -744
- data/lib/node_modules/npm/html/doc/misc/npm-developers.html +0 -208
- data/lib/node_modules/npm/html/doc/misc/npm-disputes.html +0 -126
- data/lib/node_modules/npm/html/doc/misc/npm-faq.html +0 -382
- data/lib/node_modules/npm/html/doc/misc/npm-index.html +0 -450
- data/lib/node_modules/npm/html/doc/misc/npm-registry.html +0 -105
- data/lib/node_modules/npm/html/doc/misc/npm-scripts.html +0 -257
- data/lib/node_modules/npm/html/doc/misc/removing-npm.html +0 -92
- data/lib/node_modules/npm/html/doc/misc/semver.html +0 -128
- data/lib/node_modules/npm/html/docfoot-script.html +0 -31
- data/lib/node_modules/npm/html/docfoot.html +0 -2
- data/lib/node_modules/npm/html/dochead.html +0 -8
- data/lib/node_modules/npm/html/favicon.ico +0 -0
- data/lib/node_modules/npm/html/index.html +0 -95
- data/lib/node_modules/npm/html/static/style.css +0 -329
- data/lib/node_modules/npm/lib/adduser.js +0 -138
- data/lib/node_modules/npm/lib/bin.js +0 -18
- data/lib/node_modules/npm/lib/bugs.js +0 -61
- data/lib/node_modules/npm/lib/build.js +0 -228
- data/lib/node_modules/npm/lib/cache.js +0 -1318
- data/lib/node_modules/npm/lib/completion.js +0 -253
- data/lib/node_modules/npm/lib/config.js +0 -285
- data/lib/node_modules/npm/lib/dedupe.js +0 -357
- data/lib/node_modules/npm/lib/deprecate.js +0 -47
- data/lib/node_modules/npm/lib/docs.js +0 -62
- data/lib/node_modules/npm/lib/edit.js +0 -32
- data/lib/node_modules/npm/lib/explore.js +0 -36
- data/lib/node_modules/npm/lib/faq.js +0 -8
- data/lib/node_modules/npm/lib/get.js +0 -12
- data/lib/node_modules/npm/lib/help-search.js +0 -218
- data/lib/node_modules/npm/lib/help.js +0 -231
- data/lib/node_modules/npm/lib/init.js +0 -36
- data/lib/node_modules/npm/lib/install.js +0 -979
- data/lib/node_modules/npm/lib/link.js +0 -173
- data/lib/node_modules/npm/lib/ls.js +0 -357
- data/lib/node_modules/npm/lib/npm.js +0 -528
- data/lib/node_modules/npm/lib/outdated.js +0 -303
- data/lib/node_modules/npm/lib/owner.js +0 -205
- data/lib/node_modules/npm/lib/pack.js +0 -65
- data/lib/node_modules/npm/lib/prefix.js +0 -11
- data/lib/node_modules/npm/lib/prune.js +0 -53
- data/lib/node_modules/npm/lib/publish.js +0 -118
- data/lib/node_modules/npm/lib/rebuild.js +0 -75
- data/lib/node_modules/npm/lib/repo.js +0 -54
- data/lib/node_modules/npm/lib/restart.js +0 -1
- data/lib/node_modules/npm/lib/root.js +0 -11
- data/lib/node_modules/npm/lib/run-script.js +0 -102
- data/lib/node_modules/npm/lib/search.js +0 -265
- data/lib/node_modules/npm/lib/set.js +0 -13
- data/lib/node_modules/npm/lib/shrinkwrap.js +0 -86
- data/lib/node_modules/npm/lib/star.js +0 -33
- data/lib/node_modules/npm/lib/stars.js +0 -27
- data/lib/node_modules/npm/lib/start.js +0 -1
- data/lib/node_modules/npm/lib/stop.js +0 -1
- data/lib/node_modules/npm/lib/submodule.js +0 -119
- data/lib/node_modules/npm/lib/substack.js +0 -20
- data/lib/node_modules/npm/lib/tag.js +0 -18
- data/lib/node_modules/npm/lib/test.js +0 -14
- data/lib/node_modules/npm/lib/unbuild.js +0 -112
- data/lib/node_modules/npm/lib/uninstall.js +0 -127
- data/lib/node_modules/npm/lib/unpublish.js +0 -83
- data/lib/node_modules/npm/lib/update.js +0 -43
- data/lib/node_modules/npm/lib/utils/completion.sh +0 -54
- data/lib/node_modules/npm/lib/utils/completion/file-completion.js +0 -26
- data/lib/node_modules/npm/lib/utils/completion/installed-deep.js +0 -50
- data/lib/node_modules/npm/lib/utils/completion/installed-shallow.js +0 -79
- data/lib/node_modules/npm/lib/utils/error-handler.js +0 -343
- data/lib/node_modules/npm/lib/utils/fetch.js +0 -93
- data/lib/node_modules/npm/lib/utils/find-prefix.js +0 -57
- data/lib/node_modules/npm/lib/utils/gently-rm.js +0 -61
- data/lib/node_modules/npm/lib/utils/is-git-url.js +0 -13
- data/lib/node_modules/npm/lib/utils/lifecycle.js +0 -360
- data/lib/node_modules/npm/lib/utils/link.js +0 -39
- data/lib/node_modules/npm/lib/utils/tar.js +0 -323
- data/lib/node_modules/npm/lib/version.js +0 -120
- data/lib/node_modules/npm/lib/view.js +0 -246
- data/lib/node_modules/npm/lib/visnup.js +0 -42
- data/lib/node_modules/npm/lib/whoami.js +0 -13
- data/lib/node_modules/npm/lib/xmas.js +0 -56
- data/lib/node_modules/npm/make.bat +0 -3
- data/lib/node_modules/npm/man/man1/npm-README.1 +0 -328
- data/lib/node_modules/npm/man/man1/npm-adduser.1 +0 -63
- data/lib/node_modules/npm/man/man1/npm-bin.1 +0 -40
- data/lib/node_modules/npm/man/man1/npm-bugs.1 +0 -78
- data/lib/node_modules/npm/man/man1/npm-build.1 +0 -43
- data/lib/node_modules/npm/man/man1/npm-bundle.1 +0 -23
- data/lib/node_modules/npm/man/man1/npm-cache.1 +0 -104
- data/lib/node_modules/npm/man/man1/npm-completion.1 +0 -47
- data/lib/node_modules/npm/man/man1/npm-config.1 +0 -113
- data/lib/node_modules/npm/man/man1/npm-dedupe.1 +0 -96
- data/lib/node_modules/npm/man/man1/npm-deprecate.1 +0 -48
- data/lib/node_modules/npm/man/man1/npm-docs.1 +0 -78
- data/lib/node_modules/npm/man/man1/npm-edit.1 +0 -66
- data/lib/node_modules/npm/man/man1/npm-explore.1 +0 -76
- data/lib/node_modules/npm/man/man1/npm-help-search.1 +0 -59
- data/lib/node_modules/npm/man/man1/npm-help.1 +0 -77
- data/lib/node_modules/npm/man/man1/npm-init.1 +0 -43
- data/lib/node_modules/npm/man/man1/npm-install.1 +0 -434
- data/lib/node_modules/npm/man/man1/npm-link.1 +0 -119
- data/lib/node_modules/npm/man/man1/npm-ls.1 +0 -146
- data/lib/node_modules/npm/man/man1/npm-outdated.1 +0 -102
- data/lib/node_modules/npm/man/man1/npm-owner.1 +0 -58
- data/lib/node_modules/npm/man/man1/npm-pack.1 +0 -48
- data/lib/node_modules/npm/man/man1/npm-prefix.1 +0 -40
- data/lib/node_modules/npm/man/man1/npm-prune.1 +0 -42
- data/lib/node_modules/npm/man/man1/npm-publish.1 +0 -53
- data/lib/node_modules/npm/man/man1/npm-rebuild.1 +0 -37
- data/lib/node_modules/npm/man/man1/npm-repo.1 +0 -47
- data/lib/node_modules/npm/man/man1/npm-restart.1 +0 -42
- data/lib/node_modules/npm/man/man1/npm-rm.1 +0 -44
- data/lib/node_modules/npm/man/man1/npm-root.1 +0 -40
- data/lib/node_modules/npm/man/man1/npm-run-script.1 +0 -41
- data/lib/node_modules/npm/man/man1/npm-search.1 +0 -62
- data/lib/node_modules/npm/man/man1/npm-shrinkwrap.1 +0 -275
- data/lib/node_modules/npm/man/man1/npm-star.1 +0 -39
- data/lib/node_modules/npm/man/man1/npm-stars.1 +0 -40
- data/lib/node_modules/npm/man/man1/npm-start.1 +0 -37
- data/lib/node_modules/npm/man/man1/npm-stop.1 +0 -37
- data/lib/node_modules/npm/man/man1/npm-submodule.1 +0 -42
- data/lib/node_modules/npm/man/man1/npm-tag.1 +0 -74
- data/lib/node_modules/npm/man/man1/npm-test.1 +0 -42
- data/lib/node_modules/npm/man/man1/npm-uninstall.1 +0 -42
- data/lib/node_modules/npm/man/man1/npm-unpublish.1 +0 -53
- data/lib/node_modules/npm/man/man1/npm-update.1 +0 -45
- data/lib/node_modules/npm/man/man1/npm-version.1 +0 -75
- data/lib/node_modules/npm/man/man1/npm-view.1 +0 -186
- data/lib/node_modules/npm/man/man1/npm-whoami.1 +0 -34
- data/lib/node_modules/npm/man/man1/npm.1 +0 -230
- data/lib/node_modules/npm/man/man3/npm-bin.3 +0 -21
- data/lib/node_modules/npm/man/man3/npm-bugs.3 +0 -28
- data/lib/node_modules/npm/man/man3/npm-commands.3 +0 -35
- data/lib/node_modules/npm/man/man3/npm-config.3 +0 -69
- data/lib/node_modules/npm/man/man3/npm-deprecate.3 +0 -57
- data/lib/node_modules/npm/man/man3/npm-docs.3 +0 -28
- data/lib/node_modules/npm/man/man3/npm-edit.3 +0 -35
- data/lib/node_modules/npm/man/man3/npm-explore.3 +0 -28
- data/lib/node_modules/npm/man/man3/npm-help-search.3 +0 -51
- data/lib/node_modules/npm/man/man3/npm-init.3 +0 -39
- data/lib/node_modules/npm/man/man3/npm-install.3 +0 -29
- data/lib/node_modules/npm/man/man3/npm-link.3 +0 -53
- data/lib/node_modules/npm/man/man3/npm-load.3 +0 -44
- data/lib/node_modules/npm/man/man3/npm-ls.3 +0 -86
- data/lib/node_modules/npm/man/man3/npm-outdated.3 +0 -21
- data/lib/node_modules/npm/man/man3/npm-owner.3 +0 -52
- data/lib/node_modules/npm/man/man3/npm-pack.3 +0 -28
- data/lib/node_modules/npm/man/man3/npm-prefix.3 +0 -24
- data/lib/node_modules/npm/man/man3/npm-prune.3 +0 -27
- data/lib/node_modules/npm/man/man3/npm-publish.3 +0 -51
- data/lib/node_modules/npm/man/man3/npm-rebuild.3 +0 -22
- data/lib/node_modules/npm/man/man3/npm-repo.3 +0 -28
- data/lib/node_modules/npm/man/man3/npm-restart.3 +0 -37
- data/lib/node_modules/npm/man/man3/npm-root.3 +0 -24
- data/lib/node_modules/npm/man/man3/npm-run-script.3 +0 -48
- data/lib/node_modules/npm/man/man3/npm-search.3 +0 -64
- data/lib/node_modules/npm/man/man3/npm-shrinkwrap.3 +0 -30
- data/lib/node_modules/npm/man/man3/npm-start.3 +0 -21
- data/lib/node_modules/npm/man/man3/npm-stop.3 +0 -21
- data/lib/node_modules/npm/man/man3/npm-submodule.3 +0 -42
- data/lib/node_modules/npm/man/man3/npm-tag.3 +0 -31
- data/lib/node_modules/npm/man/man3/npm-test.3 +0 -25
- data/lib/node_modules/npm/man/man3/npm-uninstall.3 +0 -25
- data/lib/node_modules/npm/man/man3/npm-unpublish.3 +0 -30
- data/lib/node_modules/npm/man/man3/npm-update.3 +0 -18
- data/lib/node_modules/npm/man/man3/npm-version.3 +0 -27
- data/lib/node_modules/npm/man/man3/npm-view.3 +0 -176
- data/lib/node_modules/npm/man/man3/npm-whoami.3 +0 -24
- data/lib/node_modules/npm/man/man3/npm.3 +0 -162
- data/lib/node_modules/npm/man/man5/npm-folders.5 +0 -264
- data/lib/node_modules/npm/man/man5/npm-global.5 +0 -264
- data/lib/node_modules/npm/man/man5/npm-json.5 +0 -807
- data/lib/node_modules/npm/man/man5/npmrc.5 +0 -89
- data/lib/node_modules/npm/man/man5/package.json.5 +0 -807
- data/lib/node_modules/npm/man/man7/npm-coding-style.7 +0 -254
- data/lib/node_modules/npm/man/man7/npm-config.7 +0 -1445
- data/lib/node_modules/npm/man/man7/npm-developers.7 +0 -335
- data/lib/node_modules/npm/man/man7/npm-disputes.7 +0 -146
- data/lib/node_modules/npm/man/man7/npm-faq.7 +0 -479
- data/lib/node_modules/npm/man/man7/npm-index.7 +0 -307
- data/lib/node_modules/npm/man/man7/npm-registry.7 +0 -82
- data/lib/node_modules/npm/man/man7/npm-scripts.7 +0 -354
- data/lib/node_modules/npm/man/man7/removing-npm.7 +0 -107
- data/lib/node_modules/npm/man/man7/semver.7 +0 -172
- data/lib/node_modules/npm/node_modules/abbrev/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/abbrev/README.md +0 -23
- data/lib/node_modules/npm/node_modules/abbrev/lib/abbrev.js +0 -111
- data/lib/node_modules/npm/node_modules/abbrev/package.json +0 -25
- data/lib/node_modules/npm/node_modules/ansi/README.md +0 -91
- data/lib/node_modules/npm/node_modules/ansi/color-spaces.pl +0 -67
- data/lib/node_modules/npm/node_modules/ansi/examples/beep/index.js +0 -16
- data/lib/node_modules/npm/node_modules/ansi/examples/clear/index.js +0 -15
- data/lib/node_modules/npm/node_modules/ansi/examples/cursorPosition.js +0 -32
- data/lib/node_modules/npm/node_modules/ansi/examples/progress/index.js +0 -87
- data/lib/node_modules/npm/node_modules/ansi/examples/starwars.js +0 -46
- data/lib/node_modules/npm/node_modules/ansi/lib/ansi.js +0 -405
- data/lib/node_modules/npm/node_modules/ansi/lib/newlines.js +0 -71
- data/lib/node_modules/npm/node_modules/ansi/package.json +0 -50
- data/lib/node_modules/npm/node_modules/ansicolors/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/ansicolors/README.md +0 -62
- data/lib/node_modules/npm/node_modules/ansicolors/ansicolors.js +0 -65
- data/lib/node_modules/npm/node_modules/ansicolors/package.json +0 -34
- data/lib/node_modules/npm/node_modules/ansistyles/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/ansistyles/README.md +0 -71
- data/lib/node_modules/npm/node_modules/ansistyles/ansistyles.js +0 -38
- data/lib/node_modules/npm/node_modules/ansistyles/package.json +0 -38
- data/lib/node_modules/npm/node_modules/archy/README.markdown +0 -92
- data/lib/node_modules/npm/node_modules/archy/index.js +0 -35
- data/lib/node_modules/npm/node_modules/archy/package.json +0 -52
- data/lib/node_modules/npm/node_modules/block-stream/LICENCE +0 -25
- data/lib/node_modules/npm/node_modules/block-stream/README.md +0 -14
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream-pause.js +0 -70
- data/lib/node_modules/npm/node_modules/block-stream/bench/block-stream.js +0 -68
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper-pause.js +0 -70
- data/lib/node_modules/npm/node_modules/block-stream/bench/dropper.js +0 -68
- data/lib/node_modules/npm/node_modules/block-stream/block-stream.js +0 -209
- data/lib/node_modules/npm/node_modules/block-stream/package.json +0 -35
- data/lib/node_modules/npm/node_modules/child-process-close/README.md +0 -45
- data/lib/node_modules/npm/node_modules/child-process-close/index.js +0 -48
- data/lib/node_modules/npm/node_modules/child-process-close/package.json +0 -37
- data/lib/node_modules/npm/node_modules/chmodr/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/chmodr/README.md +0 -3
- data/lib/node_modules/npm/node_modules/chmodr/chmodr.js +0 -54
- data/lib/node_modules/npm/node_modules/chmodr/package.json +0 -28
- data/lib/node_modules/npm/node_modules/chownr/LICENCE +0 -25
- data/lib/node_modules/npm/node_modules/chownr/README.md +0 -3
- data/lib/node_modules/npm/node_modules/chownr/chownr.js +0 -41
- data/lib/node_modules/npm/node_modules/chownr/package.json +0 -42
- data/lib/node_modules/npm/node_modules/cmd-shim/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/cmd-shim/README.md +0 -42
- data/lib/node_modules/npm/node_modules/cmd-shim/index.js +0 -180
- data/lib/node_modules/npm/node_modules/cmd-shim/package.json +0 -35
- data/lib/node_modules/npm/node_modules/columnify/Readme.md +0 -189
- data/lib/node_modules/npm/node_modules/columnify/index.js +0 -210
- data/lib/node_modules/npm/node_modules/columnify/package.json +0 -42
- data/lib/node_modules/npm/node_modules/columnify/utils.js +0 -76
- data/lib/node_modules/npm/node_modules/editor/LICENSE +0 -18
- data/lib/node_modules/npm/node_modules/editor/README.markdown +0 -54
- data/lib/node_modules/npm/node_modules/editor/example/beep.json +0 -5
- data/lib/node_modules/npm/node_modules/editor/example/edit.js +0 -4
- data/lib/node_modules/npm/node_modules/editor/index.js +0 -26
- data/lib/node_modules/npm/node_modules/editor/package.json +0 -43
- data/lib/node_modules/npm/node_modules/fstream-npm/LICENCE +0 -25
- data/lib/node_modules/npm/node_modules/fstream-npm/README.md +0 -18
- data/lib/node_modules/npm/node_modules/fstream-npm/example/bundle.js +0 -13
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir-tar.js +0 -19
- data/lib/node_modules/npm/node_modules/fstream-npm/example/dir.js +0 -25
- data/lib/node_modules/npm/node_modules/fstream-npm/example/example.js +0 -12
- data/lib/node_modules/npm/node_modules/fstream-npm/example/ig-tar.js +0 -19
- data/lib/node_modules/npm/node_modules/fstream-npm/example/tar.js +0 -25
- data/lib/node_modules/npm/node_modules/fstream-npm/fstream-npm.js +0 -323
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md +0 -22
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js +0 -13
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js +0 -275
- data/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json +0 -40
- data/lib/node_modules/npm/node_modules/fstream-npm/package.json +0 -27
- data/lib/node_modules/npm/node_modules/fstream/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/fstream/README.md +0 -76
- data/lib/node_modules/npm/node_modules/fstream/examples/filter-pipe.js +0 -131
- data/lib/node_modules/npm/node_modules/fstream/examples/pipe.js +0 -115
- data/lib/node_modules/npm/node_modules/fstream/examples/reader.js +0 -54
- data/lib/node_modules/npm/node_modules/fstream/examples/symlink-write.js +0 -24
- data/lib/node_modules/npm/node_modules/fstream/fstream.js +0 -31
- data/lib/node_modules/npm/node_modules/fstream/lib/abstract.js +0 -85
- data/lib/node_modules/npm/node_modules/fstream/lib/collect.js +0 -67
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-reader.js +0 -251
- data/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js +0 -171
- data/lib/node_modules/npm/node_modules/fstream/lib/file-reader.js +0 -147
- data/lib/node_modules/npm/node_modules/fstream/lib/file-writer.js +0 -100
- data/lib/node_modules/npm/node_modules/fstream/lib/get-type.js +0 -32
- data/lib/node_modules/npm/node_modules/fstream/lib/link-reader.js +0 -54
- data/lib/node_modules/npm/node_modules/fstream/lib/link-writer.js +0 -95
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-reader.js +0 -93
- data/lib/node_modules/npm/node_modules/fstream/lib/proxy-writer.js +0 -109
- data/lib/node_modules/npm/node_modules/fstream/lib/reader.js +0 -260
- data/lib/node_modules/npm/node_modules/fstream/lib/socket-reader.js +0 -38
- data/lib/node_modules/npm/node_modules/fstream/lib/writer.js +0 -389
- data/lib/node_modules/npm/node_modules/fstream/package.json +0 -43
- data/lib/node_modules/npm/node_modules/github-url-from-git/History.md +0 -10
- data/lib/node_modules/npm/node_modules/github-url-from-git/Makefile +0 -5
- data/lib/node_modules/npm/node_modules/github-url-from-git/Readme.md +0 -41
- data/lib/node_modules/npm/node_modules/github-url-from-git/index.js +0 -12
- data/lib/node_modules/npm/node_modules/github-url-from-git/package.json +0 -31
- data/lib/node_modules/npm/node_modules/github-url-from-git/test.js +0 -40
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/README.md +0 -14
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/index.js +0 -9
- data/lib/node_modules/npm/node_modules/github-url-from-username-repo/package.json +0 -33
- data/lib/node_modules/npm/node_modules/glob/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/glob/README.md +0 -250
- data/lib/node_modules/npm/node_modules/glob/examples/g.js +0 -9
- data/lib/node_modules/npm/node_modules/glob/examples/usr-local.js +0 -9
- data/lib/node_modules/npm/node_modules/glob/glob.js +0 -680
- data/lib/node_modules/npm/node_modules/glob/package.json +0 -39
- data/lib/node_modules/npm/node_modules/graceful-fs/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/graceful-fs/README.md +0 -26
- data/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js +0 -161
- data/lib/node_modules/npm/node_modules/graceful-fs/package.json +0 -48
- data/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js +0 -228
- data/lib/node_modules/npm/node_modules/inherits/LICENSE +0 -16
- data/lib/node_modules/npm/node_modules/inherits/README.md +0 -42
- data/lib/node_modules/npm/node_modules/inherits/inherits.js +0 -1
- data/lib/node_modules/npm/node_modules/inherits/inherits_browser.js +0 -23
- data/lib/node_modules/npm/node_modules/inherits/package.json +0 -32
- data/lib/node_modules/npm/node_modules/inherits/test.js +0 -25
- data/lib/node_modules/npm/node_modules/ini/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/ini/README.md +0 -79
- data/lib/node_modules/npm/node_modules/ini/ini.js +0 -166
- data/lib/node_modules/npm/node_modules/ini/package.json +0 -29
- data/lib/node_modules/npm/node_modules/init-package-json/README.md +0 -43
- data/lib/node_modules/npm/node_modules/init-package-json/default-input.js +0 -181
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-basic.js +0 -8
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-default.js +0 -7
- data/lib/node_modules/npm/node_modules/init-package-json/example/example-npm.js +0 -13
- data/lib/node_modules/npm/node_modules/init-package-json/example/init/basic-init.js +0 -1
- data/lib/node_modules/npm/node_modules/init-package-json/init-package-json.js +0 -129
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/LICENSE +0 -15
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/README.md +0 -133
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/index.js +0 -11
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/README.md +0 -8
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init-input.js +0 -191
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/init.js +0 -37
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/npm-init/package.json +0 -10
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/substack-input.js +0 -61
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/package.json +0 -32
- data/lib/node_modules/npm/node_modules/init-package-json/node_modules/promzard/promzard.js +0 -216
- data/lib/node_modules/npm/node_modules/init-package-json/package.json +0 -48
- data/lib/node_modules/npm/node_modules/lockfile/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/lockfile/README.md +0 -81
- data/lib/node_modules/npm/node_modules/lockfile/lockfile.js +0 -272
- data/lib/node_modules/npm/node_modules/lockfile/package.json +0 -45
- data/lib/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS +0 -14
- data/lib/node_modules/npm/node_modules/lru-cache/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/lru-cache/README.md +0 -97
- data/lib/node_modules/npm/node_modules/lru-cache/lib/lru-cache.js +0 -252
- data/lib/node_modules/npm/node_modules/lru-cache/package.json +0 -33
- data/lib/node_modules/npm/node_modules/minimatch/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/minimatch/README.md +0 -218
- data/lib/node_modules/npm/node_modules/minimatch/minimatch.js +0 -1055
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/README.md +0 -53
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/bench.js +0 -283
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/package.json +0 -42
- data/lib/node_modules/npm/node_modules/minimatch/node_modules/sigmund/sigmund.js +0 -39
- data/lib/node_modules/npm/node_modules/minimatch/package.json +0 -40
- data/lib/node_modules/npm/node_modules/mkdirp/LICENSE +0 -21
- data/lib/node_modules/npm/node_modules/mkdirp/README.markdown +0 -63
- data/lib/node_modules/npm/node_modules/mkdirp/examples/pow.js +0 -6
- data/lib/node_modules/npm/node_modules/mkdirp/index.js +0 -82
- data/lib/node_modules/npm/node_modules/mkdirp/package.json +0 -33
- data/lib/node_modules/npm/node_modules/node-gyp/LICENSE +0 -24
- data/lib/node_modules/npm/node_modules/node-gyp/README.md +0 -163
- data/lib/node_modules/npm/node_modules/node-gyp/addon.gypi +0 -59
- data/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js +0 -133
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/AUTHORS +0 -10
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/DEPS +0 -24
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/OWNERS +0 -1
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/PRESUBMIT.py +0 -115
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py +0 -148
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/codereview.settings +0 -10
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +0 -12
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp +0 -7
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat +0 -5
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_dummy.c +0 -7
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +0 -18
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/gyptest.py +0 -274
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -340
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -208
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -1051
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -1482
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -58
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -147
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -267
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -407
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -537
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -513
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -72
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -157
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -103
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -49
- 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 +0 -1069
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -81
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -308
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -87
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -56
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -2172
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -3270
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -37
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -2150
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -44
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -1224
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -23
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -2809
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -90
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -264
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -870
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -160
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -176
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -1324
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -2888
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -69
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/pylintrc +0 -307
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples +0 -81
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples.bat +0 -5
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/setup.py +0 -19
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/README +0 -15
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/README +0 -5
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +0 -27
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +0 -226
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/README +0 -12
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +0 -63
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/gyp.el +0 -252
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +0 -7
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +0 -1105
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +0 -1107
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py +0 -100
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py +0 -155
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py +0 -168
- data/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +0 -329
- data/lib/node_modules/npm/node_modules/node-gyp/lib/build.js +0 -275
- data/lib/node_modules/npm/node_modules/node-gyp/lib/clean.js +0 -22
- data/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js +0 -344
- data/lib/node_modules/npm/node_modules/node-gyp/lib/install.js +0 -362
- data/lib/node_modules/npm/node_modules/node-gyp/lib/list.js +0 -33
- data/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js +0 -225
- data/lib/node_modules/npm/node_modules/node-gyp/lib/rebuild.js +0 -16
- data/lib/node_modules/npm/node_modules/node-gyp/lib/remove.js +0 -56
- data/lib/node_modules/npm/node_modules/node-gyp/package.json +0 -55
- data/lib/node_modules/npm/node_modules/nopt/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/nopt/README.md +0 -210
- data/lib/node_modules/npm/node_modules/nopt/bin/nopt.js +0 -51
- data/lib/node_modules/npm/node_modules/nopt/examples/my-program.js +0 -30
- data/lib/node_modules/npm/node_modules/nopt/lib/nopt.js +0 -407
- data/lib/node_modules/npm/node_modules/nopt/package.json +0 -39
- data/lib/node_modules/npm/node_modules/npm-install-checks/LICENSE +0 -234
- data/lib/node_modules/npm/node_modules/npm-install-checks/README.md +0 -25
- data/lib/node_modules/npm/node_modules/npm-install-checks/index.js +0 -146
- data/lib/node_modules/npm/node_modules/npm-install-checks/package.json +0 -43
- data/lib/node_modules/npm/node_modules/npm-registry-client/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/npm-registry-client/README.md +0 -176
- data/lib/node_modules/npm/node_modules/npm-registry-client/index.js +0 -55
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/adduser.js +0 -138
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/bugs.js +0 -9
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/deprecate.js +0 -28
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js +0 -184
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/publish.js +0 -156
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js +0 -270
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/star.js +0 -29
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/stars.js +0 -9
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/tag.js +0 -6
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/unpublish.js +0 -104
- data/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js +0 -22
- data/lib/node_modules/npm/node_modules/npm-registry-client/package.json +0 -43
- data/lib/node_modules/npm/node_modules/npm-user-validate/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/npm-user-validate/README.md +0 -6
- data/lib/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js +0 -49
- data/lib/node_modules/npm/node_modules/npm-user-validate/package.json +0 -37
- data/lib/node_modules/npm/node_modules/npmconf/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/npmconf/README.md +0 -33
- data/lib/node_modules/npm/node_modules/npmconf/config-defs.js +0 -353
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/LICENCE +0 -22
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/index.js +0 -282
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md +0 -3
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json +0 -33
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js +0 -81
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/package.json +0 -32
- data/lib/node_modules/npm/node_modules/npmconf/node_modules/config-chain/readme.markdown +0 -228
- data/lib/node_modules/npm/node_modules/npmconf/npmconf.js +0 -338
- data/lib/node_modules/npm/node_modules/npmconf/package.json +0 -50
- data/lib/node_modules/npm/node_modules/npmlog/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/npmlog/README.md +0 -153
- data/lib/node_modules/npm/node_modules/npmlog/example.js +0 -39
- data/lib/node_modules/npm/node_modules/npmlog/log.js +0 -154
- data/lib/node_modules/npm/node_modules/npmlog/package.json +0 -32
- data/lib/node_modules/npm/node_modules/once/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/once/README.md +0 -51
- data/lib/node_modules/npm/node_modules/once/once.js +0 -20
- data/lib/node_modules/npm/node_modules/once/package.json +0 -39
- data/lib/node_modules/npm/node_modules/opener/LICENSE.txt +0 -14
- data/lib/node_modules/npm/node_modules/opener/README.md +0 -44
- data/lib/node_modules/npm/node_modules/opener/opener.js +0 -55
- data/lib/node_modules/npm/node_modules/opener/package.json +0 -34
- data/lib/node_modules/npm/node_modules/osenv/LICENSE +0 -25
- data/lib/node_modules/npm/node_modules/osenv/README.md +0 -63
- data/lib/node_modules/npm/node_modules/osenv/osenv.js +0 -80
- data/lib/node_modules/npm/node_modules/osenv/package.json +0 -38
- data/lib/node_modules/npm/node_modules/path-is-inside/LICENSE.txt +0 -14
- data/lib/node_modules/npm/node_modules/path-is-inside/README.md +0 -35
- data/lib/node_modules/npm/node_modules/path-is-inside/lib/path-is-inside.js +0 -24
- data/lib/node_modules/npm/node_modules/path-is-inside/package.json +0 -39
- data/lib/node_modules/npm/node_modules/read-installed/LICENSE +0 -16
- data/lib/node_modules/npm/node_modules/read-installed/README.md +0 -25
- data/lib/node_modules/npm/node_modules/read-installed/package.json +0 -39
- data/lib/node_modules/npm/node_modules/read-installed/read-installed.js +0 -338
- data/lib/node_modules/npm/node_modules/read-package-json/LICENSE +0 -15
- data/lib/node_modules/npm/node_modules/read-package-json/README.md +0 -166
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS +0 -4
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/LICENSE +0 -30
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md +0 -101
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json +0 -29
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js +0 -14
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js +0 -392
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/normalize.js +0 -36
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/safe_format.js +0 -9
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/typos.json +0 -25
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/warning_messages.json +0 -28
- data/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json +0 -53
- data/lib/node_modules/npm/node_modules/read-package-json/package.json +0 -39
- data/lib/node_modules/npm/node_modules/read-package-json/read-json.js +0 -368
- data/lib/node_modules/npm/node_modules/read/LICENCE +0 -25
- data/lib/node_modules/npm/node_modules/read/README.md +0 -53
- data/lib/node_modules/npm/node_modules/read/example/example.js +0 -13
- data/lib/node_modules/npm/node_modules/read/lib/read.js +0 -113
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/README.md +0 -68
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/mute.js +0 -140
- data/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/package.json +0 -37
- data/lib/node_modules/npm/node_modules/read/package.json +0 -35
- data/lib/node_modules/npm/node_modules/read/rs.js +0 -4
- data/lib/node_modules/npm/node_modules/request/LICENSE +0 -55
- data/lib/node_modules/npm/node_modules/request/README.md +0 -364
- data/lib/node_modules/npm/node_modules/request/index.js +0 -157
- data/lib/node_modules/npm/node_modules/request/lib/copy.js +0 -8
- data/lib/node_modules/npm/node_modules/request/lib/debug.js +0 -7
- data/lib/node_modules/npm/node_modules/request/lib/getSafe.js +0 -34
- data/lib/node_modules/npm/node_modules/request/lib/optional.js +0 -5
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/LICENSE +0 -55
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/README.md +0 -4
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/index.js +0 -202
- data/lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/package.json +0 -28
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/LICENSE +0 -55
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/README.md +0 -4
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/index.js +0 -119
- data/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/package.json +0 -28
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/License +0 -19
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/Readme.md +0 -163
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/lib/form_data.js +0 -325
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +0 -19
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md +0 -1414
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/component.json +0 -11
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +0 -955
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async/package.json +0 -43
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +0 -19
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +0 -7
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +0 -132
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +0 -185
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +0 -19
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +0 -7
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +0 -154
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +0 -99
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +0 -31
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +0 -32
- data/lib/node_modules/npm/node_modules/request/node_modules/form-data/package.json +0 -46
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/LICENSE +0 -24
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/Makefile +0 -10
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/README.md +0 -627
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/example/usage.js +0 -78
- 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 +0 -1
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/browser.js +0 -485
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/client.js +0 -367
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/crypto.js +0 -111
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/index.js +0 -15
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/server.js +0 -524
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/lib/utils.js +0 -183
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +0 -24
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +0 -11
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md +0 -6
- 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 +0 -1
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +0 -207
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json +0 -47
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +0 -24
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +0 -11
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +0 -6
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +0 -1
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +0 -68
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +0 -48
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +0 -33
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +0 -10
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +0 -436
- 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 +0 -1
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +0 -132
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +0 -585
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +0 -49
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +0 -24
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +0 -11
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +0 -68
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +0 -16
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +0 -25
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +0 -1
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +0 -409
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +0 -48
- data/lib/node_modules/npm/node_modules/request/node_modules/hawk/package.json +0 -53
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/LICENSE +0 -18
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/README.md +0 -75
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/http_signing.md +0 -296
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/index.js +0 -25
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/parser.js +0 -304
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/signer.js +0 -179
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/util.js +0 -249
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/lib/verify.js +0 -42
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +0 -19
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +0 -50
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +0 -13
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +0 -27
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +0 -267
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +0 -36
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +0 -317
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +0 -20
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +0 -43
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +0 -172
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +0 -296
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +0 -126
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +0 -196
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +0 -20
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +0 -71
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +0 -24
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README +0 -82
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +0 -298
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +0 -245
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +0 -1485
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +0 -944
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +0 -18
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +0 -129
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +0 -839
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +0 -13
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +0 -13
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +0 -104
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +0 -19
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +0 -39
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +0 -14
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +0 -14
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +0 -17
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +0 -18
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +0 -15
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +0 -14
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +0 -767
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +0 -753
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +0 -638
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +0 -101
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +0 -53
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +0 -92
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +0 -451
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +0 -81
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +0 -95
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +0 -156
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +0 -50
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +0 -44
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +0 -42
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +0 -45
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +0 -28
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +0 -128
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +0 -28
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +0 -31
- data/lib/node_modules/npm/node_modules/request/node_modules/http-signature/package.json +0 -36
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/README.md +0 -49
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/package.json +0 -33
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/stringify.js +0 -39
- data/lib/node_modules/npm/node_modules/request/node_modules/json-stringify-safe/test.js +0 -128
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/LICENSE +0 -19
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/README.md +0 -66
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/mime.js +0 -114
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/package.json +0 -36
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/test.js +0 -84
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/mime.types +0 -1588
- data/lib/node_modules/npm/node_modules/request/node_modules/mime/types/node.types +0 -77
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/LICENSE.md +0 -2
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/README.md +0 -207
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/README.md +0 -53
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +0 -174
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +0 -34
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +0 -34
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +0 -84
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/component.json +0 -18
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/package.json +0 -35
- data/lib/node_modules/npm/node_modules/request/node_modules/node-uuid/uuid.js +0 -245
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/LICENSE +0 -55
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/README.md +0 -4
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/index.js +0 -43
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/package.json +0 -31
- data/lib/node_modules/npm/node_modules/request/node_modules/oauth-sign/test.js +0 -49
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/Readme.md +0 -58
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/index.js +0 -366
- data/lib/node_modules/npm/node_modules/request/node_modules/qs/package.json +0 -38
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/LICENSE +0 -78
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/README.md +0 -380
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +0 -230
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js +0 -947
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/memstore.js +0 -102
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +0 -69
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +0 -278
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +0 -20
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +0 -73
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +0 -508
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +0 -2
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +0 -20
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +0 -35
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +0 -69
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +0 -35
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +0 -38
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +0 -226
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +0 -442
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +0 -563
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/package.json +0 -46
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/public-suffix.txt +0 -5229
- data/lib/node_modules/npm/node_modules/request/node_modules/tough-cookie/test.js +0 -1340
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/LICENSE +0 -55
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/README.md +0 -4
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js +0 -227
- data/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/package.json +0 -28
- data/lib/node_modules/npm/node_modules/request/package.json +0 -57
- data/lib/node_modules/npm/node_modules/request/request.js +0 -1260
- data/lib/node_modules/npm/node_modules/retry/License +0 -21
- data/lib/node_modules/npm/node_modules/retry/Makefile +0 -7
- data/lib/node_modules/npm/node_modules/retry/Readme.md +0 -167
- data/lib/node_modules/npm/node_modules/retry/equation.gif +0 -0
- data/lib/node_modules/npm/node_modules/retry/example/dns.js +0 -31
- data/lib/node_modules/npm/node_modules/retry/index.js +0 -1
- data/lib/node_modules/npm/node_modules/retry/lib/retry.js +0 -50
- data/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js +0 -109
- data/lib/node_modules/npm/node_modules/retry/package.json +0 -29
- data/lib/node_modules/npm/node_modules/rimraf/AUTHORS +0 -6
- data/lib/node_modules/npm/node_modules/rimraf/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/rimraf/README.md +0 -30
- data/lib/node_modules/npm/node_modules/rimraf/bin.js +0 -33
- data/lib/node_modules/npm/node_modules/rimraf/package.json +0 -56
- data/lib/node_modules/npm/node_modules/rimraf/rimraf.js +0 -178
- data/lib/node_modules/npm/node_modules/semver/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/semver/Makefile +0 -24
- data/lib/node_modules/npm/node_modules/semver/README.md +0 -142
- data/lib/node_modules/npm/node_modules/semver/bin/semver +0 -124
- data/lib/node_modules/npm/node_modules/semver/foot.js +0 -6
- data/lib/node_modules/npm/node_modules/semver/head.js +0 -2
- data/lib/node_modules/npm/node_modules/semver/package.json +0 -32
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js +0 -1007
- data/lib/node_modules/npm/node_modules/semver/semver.browser.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/semver/semver.js +0 -1011
- data/lib/node_modules/npm/node_modules/semver/semver.min.js +0 -1
- data/lib/node_modules/npm/node_modules/semver/semver.min.js.gz +0 -0
- data/lib/node_modules/npm/node_modules/sha/LICENSE +0 -46
- data/lib/node_modules/npm/node_modules/sha/README.md +0 -49
- data/lib/node_modules/npm/node_modules/sha/index.js +0 -120
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/LICENSE +0 -27
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/README.md +0 -768
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/duplex.js +0 -1
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/float.patch +0 -68
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js +0 -69
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js +0 -41
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +0 -927
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +0 -205
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +0 -369
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/package.json +0 -36
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/passthrough.js +0 -1
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/readable.js +0 -6
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/transform.js +0 -1
- data/lib/node_modules/npm/node_modules/sha/node_modules/readable-stream/writable.js +0 -1
- data/lib/node_modules/npm/node_modules/sha/package.json +0 -32
- data/lib/node_modules/npm/node_modules/slide/LICENSE +0 -15
- data/lib/node_modules/npm/node_modules/slide/README.md +0 -143
- data/lib/node_modules/npm/node_modules/slide/index.js +0 -1
- data/lib/node_modules/npm/node_modules/slide/lib/async-map-ordered.js +0 -65
- data/lib/node_modules/npm/node_modules/slide/lib/async-map.js +0 -56
- data/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js +0 -16
- data/lib/node_modules/npm/node_modules/slide/lib/chain.js +0 -20
- data/lib/node_modules/npm/node_modules/slide/lib/slide.js +0 -3
- data/lib/node_modules/npm/node_modules/slide/package.json +0 -35
- data/lib/node_modules/npm/node_modules/tar/LICENCE +0 -25
- data/lib/node_modules/npm/node_modules/tar/README.md +0 -46
- data/lib/node_modules/npm/node_modules/tar/examples/extracter.js +0 -11
- data/lib/node_modules/npm/node_modules/tar/examples/reader.js +0 -36
- data/lib/node_modules/npm/node_modules/tar/lib/buffer-entry.js +0 -30
- data/lib/node_modules/npm/node_modules/tar/lib/entry-writer.js +0 -169
- data/lib/node_modules/npm/node_modules/tar/lib/entry.js +0 -213
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header-writer.js +0 -191
- data/lib/node_modules/npm/node_modules/tar/lib/extended-header.js +0 -140
- data/lib/node_modules/npm/node_modules/tar/lib/extract.js +0 -78
- data/lib/node_modules/npm/node_modules/tar/lib/global-header-writer.js +0 -14
- data/lib/node_modules/npm/node_modules/tar/lib/header.js +0 -385
- data/lib/node_modules/npm/node_modules/tar/lib/pack.js +0 -231
- data/lib/node_modules/npm/node_modules/tar/lib/parse.js +0 -270
- data/lib/node_modules/npm/node_modules/tar/package.json +0 -40
- data/lib/node_modules/npm/node_modules/tar/tar.js +0 -173
- data/lib/node_modules/npm/node_modules/text-table/LICENSE +0 -18
- data/lib/node_modules/npm/node_modules/text-table/example/align.js +0 -8
- data/lib/node_modules/npm/node_modules/text-table/example/center.js +0 -8
- data/lib/node_modules/npm/node_modules/text-table/example/dotalign.js +0 -9
- data/lib/node_modules/npm/node_modules/text-table/example/doubledot.js +0 -11
- data/lib/node_modules/npm/node_modules/text-table/example/table.js +0 -6
- data/lib/node_modules/npm/node_modules/text-table/index.js +0 -86
- data/lib/node_modules/npm/node_modules/text-table/package.json +0 -52
- data/lib/node_modules/npm/node_modules/text-table/readme.markdown +0 -134
- data/lib/node_modules/npm/node_modules/uid-number/LICENCE +0 -25
- data/lib/node_modules/npm/node_modules/uid-number/README.md +0 -17
- data/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js +0 -24
- data/lib/node_modules/npm/node_modules/uid-number/package.json +0 -35
- data/lib/node_modules/npm/node_modules/uid-number/uid-number.js +0 -54
- data/lib/node_modules/npm/node_modules/which/LICENSE +0 -23
- data/lib/node_modules/npm/node_modules/which/README.md +0 -5
- data/lib/node_modules/npm/node_modules/which/bin/which +0 -14
- data/lib/node_modules/npm/node_modules/which/package.json +0 -34
- data/lib/node_modules/npm/node_modules/which/which.js +0 -104
- data/lib/node_modules/npm/package.json +0 -155
- data/lib/node_modules/npm/scripts/clean-old.sh +0 -165
- data/lib/node_modules/npm/scripts/doc-build.sh +0 -84
- data/lib/node_modules/npm/scripts/index-build.js +0 -62
- data/lib/node_modules/npm/scripts/install.sh +0 -313
- data/lib/node_modules/npm/scripts/release.sh +0 -36
- data/lib/node_modules/npm/scripts/relocate.sh +0 -26
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = adduser
|
|
3
|
-
|
|
4
|
-
var log = require("npmlog")
|
|
5
|
-
, npm = require("./npm.js")
|
|
6
|
-
, registry = npm.registry
|
|
7
|
-
, read = require("read")
|
|
8
|
-
, userValidate = require("npm-user-validate")
|
|
9
|
-
, crypto
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
crypto = process.binding("crypto") && require("crypto")
|
|
13
|
-
} catch (ex) {}
|
|
14
|
-
|
|
15
|
-
adduser.usage = "npm adduser\nThen enter stuff at the prompts"
|
|
16
|
-
|
|
17
|
-
function adduser (args, cb) {
|
|
18
|
-
if (!crypto) return cb(new Error(
|
|
19
|
-
"You must compile node with ssl support to use the adduser feature"))
|
|
20
|
-
|
|
21
|
-
var c = { u : npm.config.get("username") || ""
|
|
22
|
-
, p : npm.config.get("_password") || ""
|
|
23
|
-
, e : npm.config.get("email") || ""
|
|
24
|
-
}
|
|
25
|
-
, changed = false
|
|
26
|
-
, u = {}
|
|
27
|
-
, fns = [readUsername, readPassword, readEmail, save]
|
|
28
|
-
|
|
29
|
-
loop()
|
|
30
|
-
function loop (er) {
|
|
31
|
-
if (er) return cb(er)
|
|
32
|
-
var fn = fns.shift()
|
|
33
|
-
if (fn) return fn(c, u, loop)
|
|
34
|
-
cb()
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function readUsername (c, u, cb) {
|
|
39
|
-
var v = userValidate.username
|
|
40
|
-
read({prompt: "Username: ", default: c.u || ""}, function (er, un) {
|
|
41
|
-
if (er) {
|
|
42
|
-
return cb(er.message === "cancelled" ? er.message : er)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// make sure it's valid. we have to do this here, because
|
|
46
|
-
// couchdb will only ever say "bad password" with a 401 when
|
|
47
|
-
// you try to PUT a _users record that the validate_doc_update
|
|
48
|
-
// rejects for *any* reason.
|
|
49
|
-
|
|
50
|
-
if (!un) {
|
|
51
|
-
return readUsername(c, u, cb)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
var error = v(un)
|
|
55
|
-
if (error) {
|
|
56
|
-
log.warn(error.message)
|
|
57
|
-
return readUsername(c, u, cb)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
c.changed = c.u !== un
|
|
61
|
-
u.u = un
|
|
62
|
-
cb(er)
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function readPassword (c, u, cb) {
|
|
67
|
-
var v = userValidate.pw
|
|
68
|
-
|
|
69
|
-
if (!c.changed) {
|
|
70
|
-
u.p = c.p
|
|
71
|
-
return cb()
|
|
72
|
-
}
|
|
73
|
-
read({prompt: "Password: ", silent: true}, function (er, pw) {
|
|
74
|
-
if (er) {
|
|
75
|
-
return cb(er.message === "cancelled" ? er.message : er)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (!pw) {
|
|
79
|
-
return readPassword(c, u, cb)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
var error = v(pw)
|
|
83
|
-
if (error) {
|
|
84
|
-
log.warn(error.message)
|
|
85
|
-
return readPassword(c, u, cb)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
u.p = pw
|
|
89
|
-
cb(er)
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function readEmail (c, u, cb) {
|
|
94
|
-
var v = userValidate.email
|
|
95
|
-
var r = { prompt: "Email: (this IS public) ", default: c.e || "" }
|
|
96
|
-
read(r, function (er, em) {
|
|
97
|
-
if (er) {
|
|
98
|
-
return cb(er.message === "cancelled" ? er.message : er)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (!em) {
|
|
102
|
-
return readEmail(c, u, cb)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
var error = v(em)
|
|
106
|
-
if (error) {
|
|
107
|
-
log.warn(error.message)
|
|
108
|
-
return readEmail(c, u, cb)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
u.e = em
|
|
112
|
-
cb(er)
|
|
113
|
-
})
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function save (c, u, cb) {
|
|
117
|
-
if (c.changed) {
|
|
118
|
-
delete registry.auth
|
|
119
|
-
delete registry.username
|
|
120
|
-
delete registry.password
|
|
121
|
-
registry.username = u.u
|
|
122
|
-
registry.password = u.p
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// save existing configs, but yank off for this PUT
|
|
126
|
-
registry.adduser(u.u, u.p, u.e, function (er) {
|
|
127
|
-
if (er) return cb(er)
|
|
128
|
-
registry.username = u.u
|
|
129
|
-
registry.password = u.p
|
|
130
|
-
registry.email = u.e
|
|
131
|
-
npm.config.set("username", u.u, "user")
|
|
132
|
-
npm.config.set("_password", u.p, "user")
|
|
133
|
-
npm.config.set("email", u.e, "user")
|
|
134
|
-
npm.config.del("_token", "user")
|
|
135
|
-
log.info("adduser", "Authorized user %s", u.u)
|
|
136
|
-
npm.config.save("user", cb)
|
|
137
|
-
})
|
|
138
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
module.exports = bin
|
|
2
|
-
|
|
3
|
-
var npm = require("./npm.js")
|
|
4
|
-
|
|
5
|
-
bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)"
|
|
6
|
-
|
|
7
|
-
function bin (args, silent, cb) {
|
|
8
|
-
if (typeof cb !== "function") cb = silent, silent = false
|
|
9
|
-
var b = npm.bin
|
|
10
|
-
, PATH = (process.env.PATH || "").split(":")
|
|
11
|
-
|
|
12
|
-
if (!silent) console.log(b)
|
|
13
|
-
process.nextTick(cb.bind(this, null, b))
|
|
14
|
-
|
|
15
|
-
if (npm.config.get("global") && PATH.indexOf(b) === -1) {
|
|
16
|
-
npm.config.get("logstream").write("(not in PATH env variable)\n")
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = bugs
|
|
3
|
-
|
|
4
|
-
bugs.usage = "npm bugs <pkgname>"
|
|
5
|
-
|
|
6
|
-
var npm = require("./npm.js")
|
|
7
|
-
, registry = npm.registry
|
|
8
|
-
, log = require("npmlog")
|
|
9
|
-
, opener = require("opener")
|
|
10
|
-
, path = require("path")
|
|
11
|
-
, readJson = require("read-package-json")
|
|
12
|
-
, fs = require("fs")
|
|
13
|
-
|
|
14
|
-
bugs.completion = function (opts, cb) {
|
|
15
|
-
if (opts.conf.argv.remain.length > 2) return cb()
|
|
16
|
-
registry.get("/-/short", 60000, function (er, list) {
|
|
17
|
-
return cb(null, list || [])
|
|
18
|
-
})
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function bugs (args, cb) {
|
|
22
|
-
var n = args.length && args[0].split("@").shift() || '.'
|
|
23
|
-
fs.stat(n, function (er, s) {
|
|
24
|
-
if (er && er.code === "ENOENT") return callRegistry(n, cb)
|
|
25
|
-
else if (er) return cb (er)
|
|
26
|
-
if (!s.isDirectory()) return callRegistry(n, cb)
|
|
27
|
-
readJson(path.resolve(n, "package.json"), function(er, d) {
|
|
28
|
-
if (er) return cb(er)
|
|
29
|
-
getUrlAndOpen(d, cb)
|
|
30
|
-
})
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function getUrlAndOpen (d, cb) {
|
|
35
|
-
var bugs = d.bugs
|
|
36
|
-
, repo = d.repository || d.repositories
|
|
37
|
-
, url
|
|
38
|
-
if (bugs) {
|
|
39
|
-
url = (typeof url === "string") ? bugs : bugs.url
|
|
40
|
-
} else if (repo) {
|
|
41
|
-
if (Array.isArray(repo)) repo = repo.shift()
|
|
42
|
-
if (repo.hasOwnProperty("url")) repo = repo.url
|
|
43
|
-
log.verbose("repository", repo)
|
|
44
|
-
if (bugs && bugs.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) {
|
|
45
|
-
url = bugs.replace(/^git(@|:\/\/)/, "https://")
|
|
46
|
-
.replace(/^https?:\/\/github.com:/, "https://github.com/")
|
|
47
|
-
.replace(/\.git$/, '')+"/issues"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (!url) {
|
|
51
|
-
url = "https://npmjs.org/package/" + d.name
|
|
52
|
-
}
|
|
53
|
-
opener(url, { command: npm.config.get("browser") }, cb)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function callRegistry (n, cb) {
|
|
57
|
-
registry.get(n + "/latest", 3600, function (er, d) {
|
|
58
|
-
if (er) return cb(er)
|
|
59
|
-
getUrlAndOpen (d, cb)
|
|
60
|
-
})
|
|
61
|
-
}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
// npm build command
|
|
2
|
-
|
|
3
|
-
// everything about the installation after the creation of
|
|
4
|
-
// the .npm/{name}/{version}/package folder.
|
|
5
|
-
// linking the modules into the npm.root,
|
|
6
|
-
// resolving dependencies, etc.
|
|
7
|
-
|
|
8
|
-
// This runs AFTER install or link are completed.
|
|
9
|
-
|
|
10
|
-
var npm = require("./npm.js")
|
|
11
|
-
, log = require("npmlog")
|
|
12
|
-
, chain = require("slide").chain
|
|
13
|
-
, fs = require("graceful-fs")
|
|
14
|
-
, path = require("path")
|
|
15
|
-
, lifecycle = require("./utils/lifecycle.js")
|
|
16
|
-
, readJson = require("read-package-json")
|
|
17
|
-
, link = require("./utils/link.js")
|
|
18
|
-
, linkIfExists = link.ifExists
|
|
19
|
-
, cmdShim = require("cmd-shim")
|
|
20
|
-
, cmdShimIfExists = cmdShim.ifExists
|
|
21
|
-
, asyncMap = require("slide").asyncMap
|
|
22
|
-
|
|
23
|
-
module.exports = build
|
|
24
|
-
build.usage = "npm build <folder>\n(this is plumbing)"
|
|
25
|
-
|
|
26
|
-
build._didBuild = {}
|
|
27
|
-
build._noLC = {}
|
|
28
|
-
function build (args, global, didPre, didRB, cb) {
|
|
29
|
-
if (typeof cb !== "function") cb = didRB, didRB = false
|
|
30
|
-
if (typeof cb !== "function") cb = didPre, didPre = false
|
|
31
|
-
if (typeof cb !== "function") {
|
|
32
|
-
cb = global, global = npm.config.get("global")
|
|
33
|
-
}
|
|
34
|
-
// it'd be nice to asyncMap these, but actually, doing them
|
|
35
|
-
// in parallel generally munges up the output from node-waf
|
|
36
|
-
var builder = build_(global, didPre, didRB)
|
|
37
|
-
chain(args.map(function (arg) { return function (cb) {
|
|
38
|
-
builder(arg, cb)
|
|
39
|
-
}}), cb)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function build_ (global, didPre, didRB) { return function (folder, cb) {
|
|
43
|
-
folder = path.resolve(folder)
|
|
44
|
-
build._didBuild[folder] = true
|
|
45
|
-
log.info("build", folder)
|
|
46
|
-
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
|
|
47
|
-
if (er) return cb(er)
|
|
48
|
-
chain
|
|
49
|
-
( [ !didPre && [lifecycle, pkg, "preinstall", folder]
|
|
50
|
-
, [linkStuff, pkg, folder, global, didRB]
|
|
51
|
-
, pkg.name === "npm" && [writeBuiltinConf, folder]
|
|
52
|
-
, didPre !== build._noLC && [lifecycle, pkg, "install", folder]
|
|
53
|
-
, didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder]
|
|
54
|
-
, didPre !== build._noLC
|
|
55
|
-
&& npm.config.get("npat")
|
|
56
|
-
&& [lifecycle, pkg, "test", folder] ]
|
|
57
|
-
, cb )
|
|
58
|
-
})
|
|
59
|
-
}}
|
|
60
|
-
|
|
61
|
-
function writeBuiltinConf (folder, cb) {
|
|
62
|
-
// the builtin config is "sticky". Any time npm installs itself,
|
|
63
|
-
// it puts its builtin config file there, as well.
|
|
64
|
-
if (!npm.config.usingBuiltin
|
|
65
|
-
|| folder !== path.dirname(__dirname)) {
|
|
66
|
-
return cb()
|
|
67
|
-
}
|
|
68
|
-
npm.config.save("builtin", cb)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function linkStuff (pkg, folder, global, didRB, cb) {
|
|
72
|
-
// allow to opt out of linking binaries.
|
|
73
|
-
if (npm.config.get("bin-links") === false) return cb()
|
|
74
|
-
|
|
75
|
-
// if it's global, and folder is in {prefix}/node_modules,
|
|
76
|
-
// then bins are in {prefix}/bin
|
|
77
|
-
// otherwise, then bins are in folder/../.bin
|
|
78
|
-
var parent = path.dirname(folder)
|
|
79
|
-
, gnm = global && npm.globalDir
|
|
80
|
-
, top = parent === npm.dir
|
|
81
|
-
, gtop = parent === gnm
|
|
82
|
-
|
|
83
|
-
log.verbose("linkStuff", [global, gnm, gtop, parent])
|
|
84
|
-
log.info("linkStuff", pkg._id)
|
|
85
|
-
|
|
86
|
-
shouldWarn(pkg, folder, global, function() {
|
|
87
|
-
asyncMap( [linkBins, linkMans, !didRB && rebuildBundles]
|
|
88
|
-
, function (fn, cb) {
|
|
89
|
-
if (!fn) return cb()
|
|
90
|
-
log.verbose(fn.name, pkg._id)
|
|
91
|
-
fn(pkg, folder, parent, gtop, cb)
|
|
92
|
-
}, cb)
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function shouldWarn(pkg, folder, global, cb) {
|
|
97
|
-
var parent = path.dirname(folder)
|
|
98
|
-
, top = parent === npm.dir
|
|
99
|
-
, cwd = process.cwd()
|
|
100
|
-
|
|
101
|
-
readJson(path.resolve(cwd, "package.json"), function(er, topPkg) {
|
|
102
|
-
if (er) return cb(er)
|
|
103
|
-
|
|
104
|
-
var linkedPkg = path.basename(cwd)
|
|
105
|
-
, currentPkg = path.basename(folder)
|
|
106
|
-
|
|
107
|
-
// current searched package is the linked package on first call
|
|
108
|
-
if (linkedPkg !== currentPkg) {
|
|
109
|
-
|
|
110
|
-
if (!topPkg.dependencies) return cb()
|
|
111
|
-
|
|
112
|
-
// don't generate a warning if it's listed in dependencies
|
|
113
|
-
if (Object.keys(topPkg.dependencies).indexOf(currentPkg) === -1) {
|
|
114
|
-
|
|
115
|
-
if (top && pkg.preferGlobal && !global) {
|
|
116
|
-
log.warn("prefer global", pkg._id + " should be installed with -g")
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
cb()
|
|
122
|
-
})
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function rebuildBundles (pkg, folder, parent, gtop, cb) {
|
|
126
|
-
if (!npm.config.get("rebuild-bundle")) return cb()
|
|
127
|
-
|
|
128
|
-
var deps = Object.keys(pkg.dependencies || {})
|
|
129
|
-
.concat(Object.keys(pkg.devDependencies || {}))
|
|
130
|
-
, bundles = pkg.bundleDependencies || pkg.bundledDependencies || []
|
|
131
|
-
|
|
132
|
-
fs.readdir(path.resolve(folder, "node_modules"), function (er, files) {
|
|
133
|
-
// error means no bundles
|
|
134
|
-
if (er) return cb()
|
|
135
|
-
|
|
136
|
-
log.verbose("rebuildBundles", files)
|
|
137
|
-
// don't asyncMap these, because otherwise build script output
|
|
138
|
-
// gets interleaved and is impossible to read
|
|
139
|
-
chain(files.filter(function (file) {
|
|
140
|
-
// rebuild if:
|
|
141
|
-
// not a .folder, like .bin or .hooks
|
|
142
|
-
return !file.match(/^[\._-]/)
|
|
143
|
-
// not some old 0.x style bundle
|
|
144
|
-
&& file.indexOf("@") === -1
|
|
145
|
-
// either not a dep, or explicitly bundled
|
|
146
|
-
&& (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1)
|
|
147
|
-
}).map(function (file) {
|
|
148
|
-
file = path.resolve(folder, "node_modules", file)
|
|
149
|
-
return function (cb) {
|
|
150
|
-
if (build._didBuild[file]) return cb()
|
|
151
|
-
log.verbose("rebuild bundle", file)
|
|
152
|
-
// if file is not a package dir, then don't do it.
|
|
153
|
-
fs.lstat(path.resolve(file, "package.json"), function (er, st) {
|
|
154
|
-
if (er) return cb()
|
|
155
|
-
build_(false)(file, cb)
|
|
156
|
-
})
|
|
157
|
-
}}), cb)
|
|
158
|
-
})
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function linkBins (pkg, folder, parent, gtop, cb) {
|
|
162
|
-
if (!pkg.bin || !gtop && path.basename(parent) !== "node_modules") {
|
|
163
|
-
return cb()
|
|
164
|
-
}
|
|
165
|
-
var binRoot = gtop ? npm.globalBin
|
|
166
|
-
: path.resolve(parent, ".bin")
|
|
167
|
-
log.verbose("link bins", [pkg.bin, binRoot, gtop])
|
|
168
|
-
|
|
169
|
-
asyncMap(Object.keys(pkg.bin), function (b, cb) {
|
|
170
|
-
linkBin( path.resolve(folder, pkg.bin[b])
|
|
171
|
-
, path.resolve(binRoot, b)
|
|
172
|
-
, gtop && folder
|
|
173
|
-
, function (er) {
|
|
174
|
-
if (er) return cb(er)
|
|
175
|
-
// bins should always be executable.
|
|
176
|
-
// XXX skip chmod on windows?
|
|
177
|
-
var src = path.resolve(folder, pkg.bin[b])
|
|
178
|
-
fs.chmod(src, npm.modes.exec, function (er) {
|
|
179
|
-
if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) {
|
|
180
|
-
return cb()
|
|
181
|
-
}
|
|
182
|
-
if (er || !gtop) return cb(er)
|
|
183
|
-
var dest = path.resolve(binRoot, b)
|
|
184
|
-
, out = npm.config.get("parseable")
|
|
185
|
-
? dest + "::" + src + ":BINFILE"
|
|
186
|
-
: dest + " -> " + src
|
|
187
|
-
console.log(out)
|
|
188
|
-
cb()
|
|
189
|
-
})
|
|
190
|
-
})
|
|
191
|
-
}, cb)
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function linkBin (from, to, gently, cb) {
|
|
195
|
-
if (process.platform !== "win32") {
|
|
196
|
-
return linkIfExists(from, to, gently, cb)
|
|
197
|
-
} else {
|
|
198
|
-
return cmdShimIfExists(from, to, cb)
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function linkMans (pkg, folder, parent, gtop, cb) {
|
|
203
|
-
if (!pkg.man || !gtop || process.platform === "win32") return cb()
|
|
204
|
-
|
|
205
|
-
var manRoot = path.resolve(npm.config.get("prefix"), "share", "man")
|
|
206
|
-
|
|
207
|
-
// make sure that the mans are unique.
|
|
208
|
-
// otherwise, if there are dupes, it'll fail with EEXIST
|
|
209
|
-
var set = pkg.man.reduce(function (acc, man) {
|
|
210
|
-
acc[path.basename(man)] = man
|
|
211
|
-
return acc
|
|
212
|
-
}, {})
|
|
213
|
-
pkg.man = pkg.man.filter(function (man) {
|
|
214
|
-
return set[path.basename(man)] === man
|
|
215
|
-
})
|
|
216
|
-
|
|
217
|
-
asyncMap(pkg.man, function (man, cb) {
|
|
218
|
-
if (typeof man !== "string") return cb()
|
|
219
|
-
var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
|
|
220
|
-
, stem = parseMan[1]
|
|
221
|
-
, sxn = parseMan[2]
|
|
222
|
-
, gz = parseMan[3] || ""
|
|
223
|
-
, bn = path.basename(stem)
|
|
224
|
-
, manDest = path.join(manRoot, "man" + sxn, bn)
|
|
225
|
-
|
|
226
|
-
linkIfExists(man, manDest, gtop && folder, cb)
|
|
227
|
-
}, cb)
|
|
228
|
-
}
|
|
@@ -1,1318 +0,0 @@
|
|
|
1
|
-
// XXX lib/utils/tar.js and this file need to be rewritten.
|
|
2
|
-
|
|
3
|
-
// URL-to-cache folder mapping:
|
|
4
|
-
// : -> !
|
|
5
|
-
// @ -> _
|
|
6
|
-
// http://registry.npmjs.org/foo/version -> cache/http!/...
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
fetching a url:
|
|
11
|
-
1. Check for url in inFlightUrls. If present, add cb, and return.
|
|
12
|
-
2. create inFlightURL list
|
|
13
|
-
3. Acquire lock at {cache}/{sha(url)}.lock
|
|
14
|
-
retries = {cache-lock-retries, def=3}
|
|
15
|
-
stale = {cache-lock-stale, def=30000}
|
|
16
|
-
wait = {cache-lock-wait, def=100}
|
|
17
|
-
4. if lock can't be acquired, then fail
|
|
18
|
-
5. fetch url, clear lock, call cbs
|
|
19
|
-
|
|
20
|
-
cache folders:
|
|
21
|
-
1. urls: http!/server.com/path/to/thing
|
|
22
|
-
2. c:\path\to\thing: file!/c!/path/to/thing
|
|
23
|
-
3. /path/to/thing: file!/path/to/thing
|
|
24
|
-
4. git@ private: git_github.com!npm/npm
|
|
25
|
-
5. git://public: git!/github.com/npm/npm
|
|
26
|
-
6. git+blah:// git-blah!/server.com/foo/bar
|
|
27
|
-
|
|
28
|
-
adding a folder:
|
|
29
|
-
1. tar into tmp/random/package.tgz
|
|
30
|
-
2. untar into tmp/random/contents/package, stripping one dir piece
|
|
31
|
-
3. tar tmp/random/contents/package to cache/n/v/package.tgz
|
|
32
|
-
4. untar cache/n/v/package.tgz into cache/n/v/package
|
|
33
|
-
5. rm tmp/random
|
|
34
|
-
|
|
35
|
-
Adding a url:
|
|
36
|
-
1. fetch to tmp/random/package.tgz
|
|
37
|
-
2. goto folder(2)
|
|
38
|
-
|
|
39
|
-
adding a name@version:
|
|
40
|
-
1. registry.get(name/version)
|
|
41
|
-
2. if response isn't 304, add url(dist.tarball)
|
|
42
|
-
|
|
43
|
-
adding a name@range:
|
|
44
|
-
1. registry.get(name)
|
|
45
|
-
2. Find a version that satisfies
|
|
46
|
-
3. add name@version
|
|
47
|
-
|
|
48
|
-
adding a local tarball:
|
|
49
|
-
1. untar to tmp/random/{blah}
|
|
50
|
-
2. goto folder(2)
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
exports = module.exports = cache
|
|
54
|
-
cache.read = read
|
|
55
|
-
cache.clean = clean
|
|
56
|
-
cache.unpack = unpack
|
|
57
|
-
cache.lock = lock
|
|
58
|
-
cache.unlock = unlock
|
|
59
|
-
|
|
60
|
-
var mkdir = require("mkdirp")
|
|
61
|
-
, spawn = require("child_process").spawn
|
|
62
|
-
, exec = require("child_process").execFile
|
|
63
|
-
, once = require("once")
|
|
64
|
-
, fetch = require("./utils/fetch.js")
|
|
65
|
-
, npm = require("./npm.js")
|
|
66
|
-
, fs = require("graceful-fs")
|
|
67
|
-
, rm = require("./utils/gently-rm.js")
|
|
68
|
-
, readJson = require("read-package-json")
|
|
69
|
-
, registry = npm.registry
|
|
70
|
-
, log = require("npmlog")
|
|
71
|
-
, path = require("path")
|
|
72
|
-
, sha = require("sha")
|
|
73
|
-
, asyncMap = require("slide").asyncMap
|
|
74
|
-
, semver = require("semver")
|
|
75
|
-
, tar = require("./utils/tar.js")
|
|
76
|
-
, fileCompletion = require("./utils/completion/file-completion.js")
|
|
77
|
-
, url = require("url")
|
|
78
|
-
, chownr = require("chownr")
|
|
79
|
-
, lockFile = require("lockfile")
|
|
80
|
-
, crypto = require("crypto")
|
|
81
|
-
, retry = require("retry")
|
|
82
|
-
, zlib = require("zlib")
|
|
83
|
-
, chmodr = require("chmodr")
|
|
84
|
-
, which = require("which")
|
|
85
|
-
, isGitUrl = require("./utils/is-git-url.js")
|
|
86
|
-
, pathIsInside = require("path-is-inside")
|
|
87
|
-
|
|
88
|
-
cache.usage = "npm cache add <tarball file>"
|
|
89
|
-
+ "\nnpm cache add <folder>"
|
|
90
|
-
+ "\nnpm cache add <tarball url>"
|
|
91
|
-
+ "\nnpm cache add <git url>"
|
|
92
|
-
+ "\nnpm cache add <name>@<version>"
|
|
93
|
-
+ "\nnpm cache ls [<path>]"
|
|
94
|
-
+ "\nnpm cache clean [<pkg>[@<version>]]"
|
|
95
|
-
|
|
96
|
-
cache.completion = function (opts, cb) {
|
|
97
|
-
|
|
98
|
-
var argv = opts.conf.argv.remain
|
|
99
|
-
if (argv.length === 2) {
|
|
100
|
-
return cb(null, ["add", "ls", "clean"])
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
switch (argv[2]) {
|
|
104
|
-
case "clean":
|
|
105
|
-
case "ls":
|
|
106
|
-
// cache and ls are easy, because the completion is
|
|
107
|
-
// what ls_ returns anyway.
|
|
108
|
-
// just get the partial words, minus the last path part
|
|
109
|
-
var p = path.dirname(opts.partialWords.slice(3).join("/"))
|
|
110
|
-
if (p === ".") p = ""
|
|
111
|
-
return ls_(p, 2, cb)
|
|
112
|
-
case "add":
|
|
113
|
-
// Same semantics as install and publish.
|
|
114
|
-
return npm.commands.install.completion(opts, cb)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function cache (args, cb) {
|
|
119
|
-
var cmd = args.shift()
|
|
120
|
-
switch (cmd) {
|
|
121
|
-
case "rm": case "clear": case "clean": return clean(args, cb)
|
|
122
|
-
case "list": case "sl": case "ls": return ls(args, cb)
|
|
123
|
-
case "add": return add(args, cb)
|
|
124
|
-
default: return cb(new Error(
|
|
125
|
-
"Invalid cache action: "+cmd))
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// if the pkg and ver are in the cache, then
|
|
130
|
-
// just do a readJson and return.
|
|
131
|
-
// if they're not, then fetch them from the registry.
|
|
132
|
-
function read (name, ver, forceBypass, cb) {
|
|
133
|
-
if (typeof cb !== "function") cb = forceBypass, forceBypass = true
|
|
134
|
-
var jsonFile = path.join(npm.cache, name, ver, "package", "package.json")
|
|
135
|
-
function c (er, data) {
|
|
136
|
-
if (data) deprCheck(data)
|
|
137
|
-
return cb(er, data)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (forceBypass && npm.config.get("force")) {
|
|
141
|
-
log.verbose("using force", "skipping cache")
|
|
142
|
-
return addNamed(name, ver, c)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
readJson(jsonFile, function (er, data) {
|
|
146
|
-
er = needName(er, data)
|
|
147
|
-
er = needVersion(er, data)
|
|
148
|
-
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
|
|
149
|
-
if (er) return addNamed(name, ver, c)
|
|
150
|
-
deprCheck(data)
|
|
151
|
-
c(er, data)
|
|
152
|
-
})
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// npm cache ls [<path>]
|
|
156
|
-
function ls (args, cb) {
|
|
157
|
-
args = args.join("/").split("@").join("/")
|
|
158
|
-
if (args.substr(-1) === "/") args = args.substr(0, args.length - 1)
|
|
159
|
-
var prefix = npm.config.get("cache")
|
|
160
|
-
if (0 === prefix.indexOf(process.env.HOME)) {
|
|
161
|
-
prefix = "~" + prefix.substr(process.env.HOME.length)
|
|
162
|
-
}
|
|
163
|
-
ls_(args, npm.config.get("depth"), function (er, files) {
|
|
164
|
-
console.log(files.map(function (f) {
|
|
165
|
-
return path.join(prefix, f)
|
|
166
|
-
}).join("\n").trim())
|
|
167
|
-
cb(er, files)
|
|
168
|
-
})
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Calls cb with list of cached pkgs matching show.
|
|
172
|
-
function ls_ (req, depth, cb) {
|
|
173
|
-
return fileCompletion(npm.cache, req, depth, cb)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// npm cache clean [<path>]
|
|
177
|
-
function clean (args, cb) {
|
|
178
|
-
if (!cb) cb = args, args = []
|
|
179
|
-
if (!args) args = []
|
|
180
|
-
args = args.join("/").split("@").join("/")
|
|
181
|
-
if (args.substr(-1) === "/") args = args.substr(0, args.length - 1)
|
|
182
|
-
var f = path.join(npm.cache, path.normalize(args))
|
|
183
|
-
if (f === npm.cache) {
|
|
184
|
-
fs.readdir(npm.cache, function (er, files) {
|
|
185
|
-
if (er) return cb()
|
|
186
|
-
asyncMap( files.filter(function (f) {
|
|
187
|
-
return npm.config.get("force") || f !== "-"
|
|
188
|
-
}).map(function (f) {
|
|
189
|
-
return path.join(npm.cache, f)
|
|
190
|
-
})
|
|
191
|
-
, rm, cb )
|
|
192
|
-
})
|
|
193
|
-
} else rm(path.join(npm.cache, path.normalize(args)), cb)
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// npm cache add <tarball-url>
|
|
197
|
-
// npm cache add <pkg> <ver>
|
|
198
|
-
// npm cache add <tarball>
|
|
199
|
-
// npm cache add <folder>
|
|
200
|
-
cache.add = function (pkg, ver, scrub, cb) {
|
|
201
|
-
if (typeof cb !== "function") cb = scrub, scrub = false
|
|
202
|
-
if (typeof cb !== "function") cb = ver, ver = null
|
|
203
|
-
if (scrub) {
|
|
204
|
-
return clean([], function (er) {
|
|
205
|
-
if (er) return cb(er)
|
|
206
|
-
add([pkg, ver], cb)
|
|
207
|
-
})
|
|
208
|
-
}
|
|
209
|
-
log.verbose("cache add", [pkg, ver])
|
|
210
|
-
return add([pkg, ver], cb)
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
function add (args, cb) {
|
|
214
|
-
// this is hot code. almost everything passes through here.
|
|
215
|
-
// the args can be any of:
|
|
216
|
-
// ["url"]
|
|
217
|
-
// ["pkg", "version"]
|
|
218
|
-
// ["pkg@version"]
|
|
219
|
-
// ["pkg", "url"]
|
|
220
|
-
// This is tricky, because urls can contain @
|
|
221
|
-
// Also, in some cases we get [name, null] rather
|
|
222
|
-
// that just a single argument.
|
|
223
|
-
|
|
224
|
-
var usage = "Usage:\n"
|
|
225
|
-
+ " npm cache add <tarball-url>\n"
|
|
226
|
-
+ " npm cache add <pkg>@<ver>\n"
|
|
227
|
-
+ " npm cache add <tarball>\n"
|
|
228
|
-
+ " npm cache add <folder>\n"
|
|
229
|
-
, name
|
|
230
|
-
, spec
|
|
231
|
-
|
|
232
|
-
if (args[1] === undefined) args[1] = null
|
|
233
|
-
|
|
234
|
-
// at this point the args length must ==2
|
|
235
|
-
if (args[1] !== null) {
|
|
236
|
-
name = args[0]
|
|
237
|
-
spec = args[1]
|
|
238
|
-
} else if (args.length === 2) {
|
|
239
|
-
spec = args[0]
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
log.verbose("cache add", "name=%j spec=%j args=%j", name, spec, args)
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
if (!name && !spec) return cb(usage)
|
|
246
|
-
|
|
247
|
-
// see if the spec is a url
|
|
248
|
-
// otherwise, treat as name@version
|
|
249
|
-
var p = url.parse(spec) || {}
|
|
250
|
-
log.verbose("parsed url", p)
|
|
251
|
-
|
|
252
|
-
// If there's a /, and it's a path, then install the path.
|
|
253
|
-
// If not, and there's a @, it could be that we got name@http://blah
|
|
254
|
-
// in that case, we will not have a protocol now, but if we
|
|
255
|
-
// split and check, we will.
|
|
256
|
-
if (!name && !p.protocol) {
|
|
257
|
-
if (spec.indexOf("/") !== -1 ||
|
|
258
|
-
process.platform === "win32" && spec.indexOf("\\") !== -1) {
|
|
259
|
-
return maybeFile(spec, p, cb)
|
|
260
|
-
} else if (spec.indexOf("@") !== -1) {
|
|
261
|
-
return maybeAt(spec, cb)
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
add_(name, spec, p, cb)
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
function maybeFile (spec, p, cb) {
|
|
269
|
-
fs.stat(spec, function (er, stat) {
|
|
270
|
-
if (!er) {
|
|
271
|
-
// definitely a local thing
|
|
272
|
-
addLocal(spec, cb)
|
|
273
|
-
} else if (er && spec.indexOf("@") !== -1) {
|
|
274
|
-
// bar@baz/loofa
|
|
275
|
-
maybeAt(spec, cb)
|
|
276
|
-
} else {
|
|
277
|
-
// Already know it's not a url, so must be local
|
|
278
|
-
addLocal(spec, cb)
|
|
279
|
-
}
|
|
280
|
-
})
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function maybeAt (spec, cb) {
|
|
284
|
-
var tmp = spec.split("@")
|
|
285
|
-
|
|
286
|
-
// split name@2.3.4 only if name is a valid package name,
|
|
287
|
-
// don't split in case of "./test@example.com/" (local path)
|
|
288
|
-
var name = tmp.shift()
|
|
289
|
-
spec = tmp.join("@")
|
|
290
|
-
return add([name, spec], cb)
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
function add_ (name, spec, p, cb) {
|
|
294
|
-
switch (p.protocol) {
|
|
295
|
-
case "http:":
|
|
296
|
-
case "https:":
|
|
297
|
-
return addRemoteTarball(spec, null, name, cb)
|
|
298
|
-
|
|
299
|
-
default:
|
|
300
|
-
if (isGitUrl(p))
|
|
301
|
-
return addRemoteGit(spec, p, name, false, cb)
|
|
302
|
-
|
|
303
|
-
// if we have a name and a spec, then try name@spec
|
|
304
|
-
// if not, then try just spec (which may try name@"" if not found)
|
|
305
|
-
if (name) {
|
|
306
|
-
addNamed(name, spec, cb)
|
|
307
|
-
} else {
|
|
308
|
-
addLocal(spec, cb)
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
function fetchAndShaCheck (u, tmp, shasum, cb) {
|
|
314
|
-
fetch(u, tmp, function (er, response) {
|
|
315
|
-
if (er) {
|
|
316
|
-
log.error("fetch failed", u)
|
|
317
|
-
return cb(er, response)
|
|
318
|
-
}
|
|
319
|
-
if (!shasum) return cb(null, response)
|
|
320
|
-
// validate that the url we just downloaded matches the expected shasum.
|
|
321
|
-
sha.check(tmp, shasum, function (er) {
|
|
322
|
-
if (er != null && er.message) {
|
|
323
|
-
// add original filename for better debuggability
|
|
324
|
-
er.message = er.message + '\n' + 'From: ' + u
|
|
325
|
-
}
|
|
326
|
-
return cb(er, response, shasum)
|
|
327
|
-
})
|
|
328
|
-
})
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// Only have a single download action at once for a given url
|
|
332
|
-
// additional calls stack the callbacks.
|
|
333
|
-
var inFlightURLs = {}
|
|
334
|
-
function addRemoteTarball (u, shasum, name, cb_) {
|
|
335
|
-
if (typeof cb_ !== "function") cb_ = name, name = ""
|
|
336
|
-
if (typeof cb_ !== "function") cb_ = shasum, shasum = null
|
|
337
|
-
|
|
338
|
-
if (!inFlightURLs[u]) inFlightURLs[u] = []
|
|
339
|
-
var iF = inFlightURLs[u]
|
|
340
|
-
iF.push(cb_)
|
|
341
|
-
if (iF.length > 1) return
|
|
342
|
-
|
|
343
|
-
function cb (er, data) {
|
|
344
|
-
if (data) {
|
|
345
|
-
data._from = u
|
|
346
|
-
data._resolved = u
|
|
347
|
-
}
|
|
348
|
-
unlock(u, function () {
|
|
349
|
-
var c
|
|
350
|
-
while (c = iF.shift()) c(er, data)
|
|
351
|
-
delete inFlightURLs[u]
|
|
352
|
-
})
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
var tmp = path.join(npm.tmp, Date.now()+"-"+Math.random(), "tmp.tgz")
|
|
356
|
-
|
|
357
|
-
lock(u, function (er) {
|
|
358
|
-
if (er) return cb(er)
|
|
359
|
-
|
|
360
|
-
log.verbose("addRemoteTarball", [u, shasum])
|
|
361
|
-
mkdir(path.dirname(tmp), function (er) {
|
|
362
|
-
if (er) return cb(er)
|
|
363
|
-
addRemoteTarball_(u, tmp, shasum, done)
|
|
364
|
-
})
|
|
365
|
-
})
|
|
366
|
-
|
|
367
|
-
function done (er, resp, shasum) {
|
|
368
|
-
if (er) return cb(er)
|
|
369
|
-
addLocalTarball(tmp, name, shasum, cb)
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
function addRemoteTarball_(u, tmp, shasum, cb) {
|
|
374
|
-
// Tuned to spread 3 attempts over about a minute.
|
|
375
|
-
// See formula at <https://github.com/tim-kos/node-retry>.
|
|
376
|
-
var operation = retry.operation
|
|
377
|
-
( { retries: npm.config.get("fetch-retries")
|
|
378
|
-
, factor: npm.config.get("fetch-retry-factor")
|
|
379
|
-
, minTimeout: npm.config.get("fetch-retry-mintimeout")
|
|
380
|
-
, maxTimeout: npm.config.get("fetch-retry-maxtimeout") })
|
|
381
|
-
|
|
382
|
-
operation.attempt(function (currentAttempt) {
|
|
383
|
-
log.info("retry", "fetch attempt " + currentAttempt
|
|
384
|
-
+ " at " + (new Date()).toLocaleTimeString())
|
|
385
|
-
fetchAndShaCheck(u, tmp, shasum, function (er, response, shasum) {
|
|
386
|
-
// Only retry on 408, 5xx or no `response`.
|
|
387
|
-
var sc = response && response.statusCode
|
|
388
|
-
var statusRetry = !sc || (sc === 408 || sc >= 500)
|
|
389
|
-
if (er && statusRetry && operation.retry(er)) {
|
|
390
|
-
log.info("retry", "will retry, error on last attempt: " + er)
|
|
391
|
-
return
|
|
392
|
-
}
|
|
393
|
-
cb(er, response, shasum)
|
|
394
|
-
})
|
|
395
|
-
})
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
// 1. cacheDir = path.join(cache,'_git-remotes',sha1(u))
|
|
399
|
-
// 2. checkGitDir(cacheDir) ? 4. : 3. (rm cacheDir if necessary)
|
|
400
|
-
// 3. git clone --mirror u cacheDir
|
|
401
|
-
// 4. cd cacheDir && git fetch -a origin
|
|
402
|
-
// 5. git archive /tmp/random.tgz
|
|
403
|
-
// 6. addLocalTarball(/tmp/random.tgz) <gitref> --format=tar --prefix=package/
|
|
404
|
-
// silent flag is used if this should error quietly
|
|
405
|
-
function addRemoteGit (u, parsed, name, silent, cb_) {
|
|
406
|
-
if (typeof cb_ !== "function") cb_ = name, name = null
|
|
407
|
-
|
|
408
|
-
if (!inFlightURLs[u]) inFlightURLs[u] = []
|
|
409
|
-
var iF = inFlightURLs[u]
|
|
410
|
-
iF.push(cb_)
|
|
411
|
-
if (iF.length > 1) return
|
|
412
|
-
|
|
413
|
-
// git is so tricky!
|
|
414
|
-
// if the path is like ssh://foo:22/some/path then it works, but
|
|
415
|
-
// it needs the ssh://
|
|
416
|
-
// If the path is like ssh://foo:some/path then it works, but
|
|
417
|
-
// only if you remove the ssh://
|
|
418
|
-
var origUrl = u
|
|
419
|
-
u = u.replace(/^git\+/, "")
|
|
420
|
-
.replace(/#.*$/, "")
|
|
421
|
-
|
|
422
|
-
// ssh paths that are scp-style urls don't need the ssh://
|
|
423
|
-
if (parsed.pathname.match(/^\/?:/)) {
|
|
424
|
-
u = u.replace(/^ssh:\/\//, "")
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
function cb (er, data) {
|
|
428
|
-
unlock(u, function () {
|
|
429
|
-
var c
|
|
430
|
-
while (c = iF.shift()) c(er, data)
|
|
431
|
-
delete inFlightURLs[origUrl]
|
|
432
|
-
})
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
lock(u, function (er) {
|
|
436
|
-
if (er) return cb(er)
|
|
437
|
-
|
|
438
|
-
// figure out what we should check out.
|
|
439
|
-
var co = parsed.hash && parsed.hash.substr(1) || "master"
|
|
440
|
-
|
|
441
|
-
var v = crypto.createHash("sha1").update(u).digest("hex").slice(0, 8)
|
|
442
|
-
v = u.replace(/[^a-zA-Z0-9]+/g, '-') + '-' + v
|
|
443
|
-
|
|
444
|
-
log.verbose("addRemoteGit", [u, co])
|
|
445
|
-
|
|
446
|
-
var p = path.join(npm.config.get("cache"), "_git-remotes", v)
|
|
447
|
-
|
|
448
|
-
checkGitDir(p, u, co, origUrl, silent, function(er, data) {
|
|
449
|
-
chmodr(p, npm.modes.file, function(erChmod) {
|
|
450
|
-
if (er) return cb(er, data)
|
|
451
|
-
return cb(erChmod, data)
|
|
452
|
-
})
|
|
453
|
-
})
|
|
454
|
-
})
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
function checkGitDir (p, u, co, origUrl, silent, cb) {
|
|
458
|
-
fs.stat(p, function (er, s) {
|
|
459
|
-
if (er) return cloneGitRemote(p, u, co, origUrl, silent, cb)
|
|
460
|
-
if (!s.isDirectory()) return rm(p, function (er){
|
|
461
|
-
if (er) return cb(er)
|
|
462
|
-
cloneGitRemote(p, u, co, origUrl, silent, cb)
|
|
463
|
-
})
|
|
464
|
-
|
|
465
|
-
var git = npm.config.get("git")
|
|
466
|
-
var args = [ "config", "--get", "remote.origin.url" ]
|
|
467
|
-
var env = gitEnv()
|
|
468
|
-
|
|
469
|
-
// check for git
|
|
470
|
-
which(git, function (err) {
|
|
471
|
-
if (err) {
|
|
472
|
-
err.code = "ENOGIT"
|
|
473
|
-
return cb(err)
|
|
474
|
-
}
|
|
475
|
-
exec(git, args, {cwd: p, env: env}, function (er, stdout, stderr) {
|
|
476
|
-
stdoutTrimmed = (stdout + "\n" + stderr).trim()
|
|
477
|
-
if (er || u !== stdout.trim()) {
|
|
478
|
-
log.warn( "`git config --get remote.origin.url` returned "
|
|
479
|
-
+ "wrong result ("+u+")", stdoutTrimmed )
|
|
480
|
-
return rm(p, function (er){
|
|
481
|
-
if (er) return cb(er)
|
|
482
|
-
cloneGitRemote(p, u, co, origUrl, silent, cb)
|
|
483
|
-
})
|
|
484
|
-
}
|
|
485
|
-
log.verbose("git remote.origin.url", stdoutTrimmed)
|
|
486
|
-
archiveGitRemote(p, u, co, origUrl, cb)
|
|
487
|
-
})
|
|
488
|
-
})
|
|
489
|
-
})
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
function cloneGitRemote (p, u, co, origUrl, silent, cb) {
|
|
493
|
-
mkdir(p, function (er) {
|
|
494
|
-
if (er) return cb(er)
|
|
495
|
-
|
|
496
|
-
var git = npm.config.get("git")
|
|
497
|
-
var args = [ "clone", "--mirror", u, p ]
|
|
498
|
-
var env = gitEnv()
|
|
499
|
-
|
|
500
|
-
// check for git
|
|
501
|
-
which(git, function (err) {
|
|
502
|
-
if (err) {
|
|
503
|
-
err.code = "ENOGIT"
|
|
504
|
-
return cb(err)
|
|
505
|
-
}
|
|
506
|
-
exec(git, args, {cwd: p, env: env}, function (er, stdout, stderr) {
|
|
507
|
-
stdout = (stdout + "\n" + stderr).trim()
|
|
508
|
-
if (er) {
|
|
509
|
-
if (silent) {
|
|
510
|
-
log.verbose("git clone " + u, stdout)
|
|
511
|
-
} else {
|
|
512
|
-
log.error("git clone " + u, stdout)
|
|
513
|
-
}
|
|
514
|
-
return cb(er)
|
|
515
|
-
}
|
|
516
|
-
log.verbose("git clone " + u, stdout)
|
|
517
|
-
archiveGitRemote(p, u, co, origUrl, cb)
|
|
518
|
-
})
|
|
519
|
-
})
|
|
520
|
-
})
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
function archiveGitRemote (p, u, co, origUrl, cb) {
|
|
524
|
-
var git = npm.config.get("git")
|
|
525
|
-
var archive = [ "fetch", "-a", "origin" ]
|
|
526
|
-
var resolve = [ "rev-list", "-n1", co ]
|
|
527
|
-
var env = gitEnv()
|
|
528
|
-
|
|
529
|
-
var errState = null
|
|
530
|
-
var n = 0
|
|
531
|
-
var resolved = null
|
|
532
|
-
var tmp
|
|
533
|
-
|
|
534
|
-
exec(git, archive, {cwd: p, env: env}, function (er, stdout, stderr) {
|
|
535
|
-
stdout = (stdout + "\n" + stderr).trim()
|
|
536
|
-
if (er) {
|
|
537
|
-
log.error("git fetch -a origin ("+u+")", stdout)
|
|
538
|
-
return cb(er)
|
|
539
|
-
}
|
|
540
|
-
log.verbose("git fetch -a origin ("+u+")", stdout)
|
|
541
|
-
tmp = path.join(npm.tmp, Date.now()+"-"+Math.random(), "tmp.tgz")
|
|
542
|
-
verifyOwnership()
|
|
543
|
-
})
|
|
544
|
-
|
|
545
|
-
function verifyOwnership() {
|
|
546
|
-
if (process.platform === "win32") {
|
|
547
|
-
log.silly("verifyOwnership", "skipping for windows")
|
|
548
|
-
resolveHead()
|
|
549
|
-
} else {
|
|
550
|
-
getCacheStat(function(er, cs) {
|
|
551
|
-
if (er) {
|
|
552
|
-
log.error("Could not get cache stat")
|
|
553
|
-
return cb(er)
|
|
554
|
-
}
|
|
555
|
-
chownr(p, cs.uid, cs.gid, function(er) {
|
|
556
|
-
if (er) {
|
|
557
|
-
log.error("Failed to change folder ownership under npm cache for %s", p)
|
|
558
|
-
return cb(er)
|
|
559
|
-
}
|
|
560
|
-
resolveHead()
|
|
561
|
-
})
|
|
562
|
-
})
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
function resolveHead () {
|
|
567
|
-
exec(git, resolve, {cwd: p, env: env}, function (er, stdout, stderr) {
|
|
568
|
-
stdout = (stdout + "\n" + stderr).trim()
|
|
569
|
-
if (er) {
|
|
570
|
-
log.error("Failed resolving git HEAD (" + u + ")", stderr)
|
|
571
|
-
return cb(er)
|
|
572
|
-
}
|
|
573
|
-
log.verbose("git rev-list -n1 " + co, stdout)
|
|
574
|
-
var parsed = url.parse(origUrl)
|
|
575
|
-
parsed.hash = stdout
|
|
576
|
-
resolved = url.format(parsed)
|
|
577
|
-
|
|
578
|
-
// https://github.com/npm/npm/issues/3224
|
|
579
|
-
// node incorrectly sticks a / at the start of the path
|
|
580
|
-
// We know that the host won't change, so split and detect this
|
|
581
|
-
var spo = origUrl.split(parsed.host)
|
|
582
|
-
var spr = resolved.split(parsed.host)
|
|
583
|
-
if (spo[1].charAt(0) === ':' && spr[1].charAt(0) === '/')
|
|
584
|
-
spr[1] = spr[1].slice(1)
|
|
585
|
-
resolved = spr.join(parsed.host)
|
|
586
|
-
|
|
587
|
-
log.verbose('resolved git url', resolved)
|
|
588
|
-
next()
|
|
589
|
-
})
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
function next () {
|
|
593
|
-
mkdir(path.dirname(tmp), function (er) {
|
|
594
|
-
if (er) return cb(er)
|
|
595
|
-
var gzip = zlib.createGzip({ level: 9 })
|
|
596
|
-
var git = npm.config.get("git")
|
|
597
|
-
var args = ["archive", co, "--format=tar", "--prefix=package/"]
|
|
598
|
-
var out = fs.createWriteStream(tmp)
|
|
599
|
-
var env = gitEnv()
|
|
600
|
-
cb = once(cb)
|
|
601
|
-
var cp = spawn(git, args, { env: env, cwd: p })
|
|
602
|
-
cp.on("error", cb)
|
|
603
|
-
cp.stderr.on("data", function(chunk) {
|
|
604
|
-
log.silly(chunk.toString(), "git archive")
|
|
605
|
-
})
|
|
606
|
-
|
|
607
|
-
cp.stdout.pipe(gzip).pipe(out).on("close", function() {
|
|
608
|
-
addLocalTarball(tmp, function(er, data) {
|
|
609
|
-
if (data) data._resolved = resolved
|
|
610
|
-
cb(er, data)
|
|
611
|
-
})
|
|
612
|
-
})
|
|
613
|
-
})
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
var gitEnv_
|
|
618
|
-
function gitEnv () {
|
|
619
|
-
// git responds to env vars in some weird ways in post-receive hooks
|
|
620
|
-
// so don't carry those along.
|
|
621
|
-
if (gitEnv_) return gitEnv_
|
|
622
|
-
gitEnv_ = {}
|
|
623
|
-
for (var k in process.env) {
|
|
624
|
-
if (!~['GIT_PROXY_COMMAND','GIT_SSH','GIT_SSL_NO_VERIFY'].indexOf(k) && k.match(/^GIT/)) continue
|
|
625
|
-
gitEnv_[k] = process.env[k]
|
|
626
|
-
}
|
|
627
|
-
return gitEnv_
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
// only have one request in flight for a given
|
|
632
|
-
// name@blah thing.
|
|
633
|
-
var inFlightNames = {}
|
|
634
|
-
function addNamed (name, x, data, cb_) {
|
|
635
|
-
if (typeof cb_ !== "function") cb_ = data, data = null
|
|
636
|
-
log.verbose("addNamed", [name, x])
|
|
637
|
-
|
|
638
|
-
var k = name + "@" + x
|
|
639
|
-
if (!inFlightNames[k]) inFlightNames[k] = []
|
|
640
|
-
var iF = inFlightNames[k]
|
|
641
|
-
iF.push(cb_)
|
|
642
|
-
if (iF.length > 1) return
|
|
643
|
-
|
|
644
|
-
function cb (er, data) {
|
|
645
|
-
if (data && !data._fromGithub) data._from = k
|
|
646
|
-
unlock(k, function () {
|
|
647
|
-
var c
|
|
648
|
-
while (c = iF.shift()) c(er, data)
|
|
649
|
-
delete inFlightNames[k]
|
|
650
|
-
})
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
log.verbose("addNamed", [semver.valid(x), semver.validRange(x)])
|
|
654
|
-
lock(k, function (er, fd) {
|
|
655
|
-
if (er) return cb(er)
|
|
656
|
-
|
|
657
|
-
var fn = ( semver.valid(x, true) ? addNameVersion
|
|
658
|
-
: semver.validRange(x, true) ? addNameRange
|
|
659
|
-
: addNameTag
|
|
660
|
-
)
|
|
661
|
-
fn(name, x, data, cb)
|
|
662
|
-
})
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
function addNameTag (name, tag, data, cb_) {
|
|
666
|
-
if (typeof cb_ !== "function") cb_ = data, data = null
|
|
667
|
-
log.info("addNameTag", [name, tag])
|
|
668
|
-
var explicit = true
|
|
669
|
-
if (!tag) {
|
|
670
|
-
explicit = false
|
|
671
|
-
tag = npm.config.get("tag")
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
function cb(er, data) {
|
|
675
|
-
// might be username/project
|
|
676
|
-
// in that case, try it as a github url.
|
|
677
|
-
if (er && tag.split("/").length === 2) {
|
|
678
|
-
return maybeGithub(tag, name, er, cb_)
|
|
679
|
-
}
|
|
680
|
-
return cb_(er, data)
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
registry.get(name, function (er, data, json, response) {
|
|
684
|
-
if (er) return cb(er)
|
|
685
|
-
engineFilter(data)
|
|
686
|
-
if (data["dist-tags"] && data["dist-tags"][tag]
|
|
687
|
-
&& data.versions[data["dist-tags"][tag]]) {
|
|
688
|
-
var ver = data["dist-tags"][tag]
|
|
689
|
-
return addNamed(name, ver, data.versions[ver], cb)
|
|
690
|
-
}
|
|
691
|
-
if (!explicit && Object.keys(data.versions).length) {
|
|
692
|
-
return addNamed(name, "*", data, cb)
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
er = installTargetsError(tag, data)
|
|
696
|
-
return cb(er)
|
|
697
|
-
})
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
function engineFilter (data) {
|
|
702
|
-
var npmv = npm.version
|
|
703
|
-
, nodev = npm.config.get("node-version")
|
|
704
|
-
, strict = npm.config.get("engine-strict")
|
|
705
|
-
|
|
706
|
-
if (!nodev || npm.config.get("force")) return data
|
|
707
|
-
|
|
708
|
-
Object.keys(data.versions || {}).forEach(function (v) {
|
|
709
|
-
var eng = data.versions[v].engines
|
|
710
|
-
if (!eng) return
|
|
711
|
-
if (!strict && !data.versions[v].engineStrict) return
|
|
712
|
-
if (eng.node && !semver.satisfies(nodev, eng.node, true)
|
|
713
|
-
|| eng.npm && !semver.satisfies(npmv, eng.npm, true)) {
|
|
714
|
-
delete data.versions[v]
|
|
715
|
-
}
|
|
716
|
-
})
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
function addNameRange (name, range, data, cb) {
|
|
720
|
-
if (typeof cb !== "function") cb = data, data = null
|
|
721
|
-
|
|
722
|
-
range = semver.validRange(range, true)
|
|
723
|
-
if (range === null) return cb(new Error(
|
|
724
|
-
"Invalid version range: "+range))
|
|
725
|
-
|
|
726
|
-
log.silly("addNameRange", {name:name, range:range, hasData:!!data})
|
|
727
|
-
|
|
728
|
-
if (data) return next()
|
|
729
|
-
registry.get(name, function (er, d, json, response) {
|
|
730
|
-
if (er) return cb(er)
|
|
731
|
-
data = d
|
|
732
|
-
next()
|
|
733
|
-
})
|
|
734
|
-
|
|
735
|
-
function next () {
|
|
736
|
-
log.silly( "addNameRange", "number 2"
|
|
737
|
-
, {name:name, range:range, hasData:!!data})
|
|
738
|
-
engineFilter(data)
|
|
739
|
-
|
|
740
|
-
log.silly("addNameRange", "versions"
|
|
741
|
-
, [data.name, Object.keys(data.versions || {})])
|
|
742
|
-
|
|
743
|
-
// if the tagged version satisfies, then use that.
|
|
744
|
-
var tagged = data["dist-tags"][npm.config.get("tag")]
|
|
745
|
-
if (tagged
|
|
746
|
-
&& data.versions[tagged]
|
|
747
|
-
&& semver.satisfies(tagged, range, true)) {
|
|
748
|
-
return addNamed(name, tagged, data.versions[tagged], cb)
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
// find the max satisfying version.
|
|
752
|
-
var versions = Object.keys(data.versions || {})
|
|
753
|
-
var ms = semver.maxSatisfying(versions, range, true)
|
|
754
|
-
if (!ms) {
|
|
755
|
-
return cb(installTargetsError(range, data))
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
// if we don't have a registry connection, try to see if
|
|
759
|
-
// there's a cached copy that will be ok.
|
|
760
|
-
addNamed(name, ms, data.versions[ms], cb)
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
function installTargetsError (requested, data) {
|
|
765
|
-
var targets = Object.keys(data["dist-tags"]).filter(function (f) {
|
|
766
|
-
return (data.versions || {}).hasOwnProperty(f)
|
|
767
|
-
}).concat(Object.keys(data.versions || {}))
|
|
768
|
-
|
|
769
|
-
requested = data.name + (requested ? "@'" + requested + "'" : "")
|
|
770
|
-
|
|
771
|
-
targets = targets.length
|
|
772
|
-
? "Valid install targets:\n" + JSON.stringify(targets) + "\n"
|
|
773
|
-
: "No valid targets found.\n"
|
|
774
|
-
+ "Perhaps not compatible with your version of node?"
|
|
775
|
-
|
|
776
|
-
var er = new Error( "No compatible version found: "
|
|
777
|
-
+ requested + "\n" + targets)
|
|
778
|
-
er.code = "ETARGET"
|
|
779
|
-
return er
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
function addNameVersion (name, v, data, cb) {
|
|
783
|
-
if (typeof cb !== "function") cb = data, data = null
|
|
784
|
-
|
|
785
|
-
var ver = semver.valid(v, true)
|
|
786
|
-
if (!ver) return cb(new Error("Invalid version: "+v))
|
|
787
|
-
|
|
788
|
-
var response
|
|
789
|
-
|
|
790
|
-
if (data) {
|
|
791
|
-
response = null
|
|
792
|
-
return next()
|
|
793
|
-
}
|
|
794
|
-
registry.get(name + "/" + ver, function (er, d, json, resp) {
|
|
795
|
-
if (er) return cb(er)
|
|
796
|
-
data = d
|
|
797
|
-
response = resp
|
|
798
|
-
next()
|
|
799
|
-
})
|
|
800
|
-
|
|
801
|
-
function next () {
|
|
802
|
-
deprCheck(data)
|
|
803
|
-
var dist = data.dist
|
|
804
|
-
|
|
805
|
-
if (!dist) return cb(new Error("No dist in "+data._id+" package"))
|
|
806
|
-
|
|
807
|
-
if (!dist.tarball) return cb(new Error(
|
|
808
|
-
"No dist.tarball in " + data._id + " package"))
|
|
809
|
-
|
|
810
|
-
if ((response && response.statusCode !== 304) || npm.config.get("force")) {
|
|
811
|
-
return fetchit()
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
// we got cached data, so let's see if we have a tarball.
|
|
815
|
-
var pkgroot = path.join(npm.cache, name, ver)
|
|
816
|
-
var pkgtgz = path.join(pkgroot, "package.tgz")
|
|
817
|
-
var pkgjson = path.join(pkgroot, "package", "package.json")
|
|
818
|
-
fs.stat(pkgtgz, function (er, s) {
|
|
819
|
-
if (!er) {
|
|
820
|
-
readJson(pkgjson, function (er, data) {
|
|
821
|
-
er = needName(er, data)
|
|
822
|
-
er = needVersion(er, data)
|
|
823
|
-
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR")
|
|
824
|
-
return cb(er)
|
|
825
|
-
if (er) return fetchit()
|
|
826
|
-
return cb(null, data)
|
|
827
|
-
})
|
|
828
|
-
} else return fetchit()
|
|
829
|
-
})
|
|
830
|
-
|
|
831
|
-
function fetchit () {
|
|
832
|
-
if (!npm.config.get("registry")) {
|
|
833
|
-
return cb(new Error("Cannot fetch: "+dist.tarball))
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
// use the same protocol as the registry.
|
|
837
|
-
// https registry --> https tarballs, but
|
|
838
|
-
// only if they're the same hostname, or else
|
|
839
|
-
// detached tarballs may not work.
|
|
840
|
-
var tb = url.parse(dist.tarball)
|
|
841
|
-
var rp = url.parse(npm.config.get("registry"))
|
|
842
|
-
if (tb.hostname === rp.hostname
|
|
843
|
-
&& tb.protocol !== rp.protocol) {
|
|
844
|
-
tb.protocol = url.parse(npm.config.get("registry")).protocol
|
|
845
|
-
delete tb.href
|
|
846
|
-
}
|
|
847
|
-
tb = url.format(tb)
|
|
848
|
-
|
|
849
|
-
// only add non-shasum'ed packages if --forced.
|
|
850
|
-
// only ancient things would lack this for good reasons nowadays.
|
|
851
|
-
if (!dist.shasum && !npm.config.get("force")) {
|
|
852
|
-
return cb(new Error("package lacks shasum: " + data._id))
|
|
853
|
-
}
|
|
854
|
-
return addRemoteTarball( tb
|
|
855
|
-
, dist.shasum
|
|
856
|
-
, name+"-"+ver
|
|
857
|
-
, cb )
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
function addLocal (p, name, cb_) {
|
|
863
|
-
if (typeof cb_ !== "function") cb_ = name, name = ""
|
|
864
|
-
|
|
865
|
-
function cb (er, data) {
|
|
866
|
-
unlock(p, function () {
|
|
867
|
-
if (er) {
|
|
868
|
-
// if it doesn't have a / in it, it might be a
|
|
869
|
-
// remote thing.
|
|
870
|
-
if (p.indexOf("/") === -1 && p.charAt(0) !== "."
|
|
871
|
-
&& (process.platform !== "win32" || p.indexOf("\\") === -1)) {
|
|
872
|
-
return addNamed(p, "", cb_)
|
|
873
|
-
}
|
|
874
|
-
log.error("addLocal", "Could not install %s", p)
|
|
875
|
-
return cb_(er)
|
|
876
|
-
}
|
|
877
|
-
if (data && !data._fromGithub) data._from = p
|
|
878
|
-
return cb_(er, data)
|
|
879
|
-
})
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
lock(p, function (er) {
|
|
883
|
-
if (er) return cb(er)
|
|
884
|
-
// figure out if this is a folder or file.
|
|
885
|
-
fs.stat(p, function (er, s) {
|
|
886
|
-
if (er) {
|
|
887
|
-
// might be username/project
|
|
888
|
-
// in that case, try it as a github url.
|
|
889
|
-
if (p.split("/").length === 2) {
|
|
890
|
-
return maybeGithub(p, name, er, cb)
|
|
891
|
-
}
|
|
892
|
-
return cb(er)
|
|
893
|
-
}
|
|
894
|
-
if (s.isDirectory()) addLocalDirectory(p, name, cb)
|
|
895
|
-
else addLocalTarball(p, name, cb)
|
|
896
|
-
})
|
|
897
|
-
})
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
function maybeGithub (p, name, er, cb) {
|
|
901
|
-
var u = "git://github.com/" + p
|
|
902
|
-
, up = url.parse(u)
|
|
903
|
-
log.info("maybeGithub", "Attempting %s from %s", p, u)
|
|
904
|
-
|
|
905
|
-
return addRemoteGit(u, up, name, true, function (er2, data) {
|
|
906
|
-
if (er2) {
|
|
907
|
-
var upriv = "git+ssh://git@github.com:" + p
|
|
908
|
-
, uppriv = url.parse(upriv)
|
|
909
|
-
|
|
910
|
-
log.info("maybeGithub", "Attempting %s from %s", p, upriv)
|
|
911
|
-
|
|
912
|
-
return addRemoteGit(upriv, uppriv, false, name, function (er3, data) {
|
|
913
|
-
if (er3) return cb(er)
|
|
914
|
-
success(upriv, data)
|
|
915
|
-
})
|
|
916
|
-
}
|
|
917
|
-
success(u, data)
|
|
918
|
-
})
|
|
919
|
-
|
|
920
|
-
function success (u, data) {
|
|
921
|
-
data._from = u
|
|
922
|
-
data._fromGithub = true
|
|
923
|
-
return cb(null, data)
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
function addLocalTarball (p, name, shasum, cb_) {
|
|
928
|
-
if (typeof cb_ !== "function") cb_ = shasum, shasum = null
|
|
929
|
-
if (typeof cb_ !== "function") cb_ = name, name = ""
|
|
930
|
-
// if it's a tar, and not in place,
|
|
931
|
-
// then unzip to .tmp, add the tmp folder, and clean up tmp
|
|
932
|
-
if (pathIsInside(p, npm.tmp))
|
|
933
|
-
return addTmpTarball(p, name, shasum, cb_)
|
|
934
|
-
|
|
935
|
-
if (pathIsInside(p, npm.cache)) {
|
|
936
|
-
if (path.basename(p) !== "package.tgz") return cb_(new Error(
|
|
937
|
-
"Not a valid cache tarball name: "+p))
|
|
938
|
-
return addPlacedTarball(p, name, shasum, cb_)
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
function cb (er, data) {
|
|
942
|
-
if (data) data._resolved = p
|
|
943
|
-
return cb_(er, data)
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
// just copy it over and then add the temp tarball file.
|
|
947
|
-
var tmp = path.join(npm.tmp, name + Date.now()
|
|
948
|
-
+ "-" + Math.random(), "tmp.tgz")
|
|
949
|
-
mkdir(path.dirname(tmp), function (er) {
|
|
950
|
-
if (er) return cb(er)
|
|
951
|
-
var from = fs.createReadStream(p)
|
|
952
|
-
, to = fs.createWriteStream(tmp)
|
|
953
|
-
, errState = null
|
|
954
|
-
function errHandler (er) {
|
|
955
|
-
if (errState) return
|
|
956
|
-
return cb(errState = er)
|
|
957
|
-
}
|
|
958
|
-
from.on("error", errHandler)
|
|
959
|
-
to.on("error", errHandler)
|
|
960
|
-
to.on("close", function () {
|
|
961
|
-
if (errState) return
|
|
962
|
-
log.verbose("chmod", tmp, npm.modes.file.toString(8))
|
|
963
|
-
fs.chmod(tmp, npm.modes.file, function (er) {
|
|
964
|
-
if (er) return cb(er)
|
|
965
|
-
addTmpTarball(tmp, name, shasum, cb)
|
|
966
|
-
})
|
|
967
|
-
})
|
|
968
|
-
from.pipe(to)
|
|
969
|
-
})
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
// to maintain the cache dir's permissions consistently.
|
|
973
|
-
var cacheStat = null
|
|
974
|
-
function getCacheStat (cb) {
|
|
975
|
-
if (cacheStat) return cb(null, cacheStat)
|
|
976
|
-
fs.stat(npm.cache, function (er, st) {
|
|
977
|
-
if (er) return makeCacheDir(cb)
|
|
978
|
-
if (!st.isDirectory()) {
|
|
979
|
-
log.error("getCacheStat", "invalid cache dir %j", npm.cache)
|
|
980
|
-
return cb(er)
|
|
981
|
-
}
|
|
982
|
-
return cb(null, cacheStat = st)
|
|
983
|
-
})
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
function makeCacheDir (cb) {
|
|
987
|
-
if (!process.getuid) return mkdir(npm.cache, cb)
|
|
988
|
-
|
|
989
|
-
var uid = +process.getuid()
|
|
990
|
-
, gid = +process.getgid()
|
|
991
|
-
|
|
992
|
-
if (uid === 0) {
|
|
993
|
-
if (process.env.SUDO_UID) uid = +process.env.SUDO_UID
|
|
994
|
-
if (process.env.SUDO_GID) gid = +process.env.SUDO_GID
|
|
995
|
-
}
|
|
996
|
-
if (uid !== 0 || !process.env.HOME) {
|
|
997
|
-
cacheStat = {uid: uid, gid: gid}
|
|
998
|
-
return mkdir(npm.cache, afterMkdir)
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
fs.stat(process.env.HOME, function (er, st) {
|
|
1002
|
-
if (er) {
|
|
1003
|
-
log.error("makeCacheDir", "homeless?")
|
|
1004
|
-
return cb(er)
|
|
1005
|
-
}
|
|
1006
|
-
cacheStat = st
|
|
1007
|
-
log.silly("makeCacheDir", "cache dir uid, gid", [st.uid, st.gid])
|
|
1008
|
-
return mkdir(npm.cache, afterMkdir)
|
|
1009
|
-
})
|
|
1010
|
-
|
|
1011
|
-
function afterMkdir (er, made) {
|
|
1012
|
-
if (er || !cacheStat || isNaN(cacheStat.uid) || isNaN(cacheStat.gid)) {
|
|
1013
|
-
return cb(er, cacheStat)
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
if (!made) return cb(er, cacheStat)
|
|
1017
|
-
|
|
1018
|
-
// ensure that the ownership is correct.
|
|
1019
|
-
chownr(made, cacheStat.uid, cacheStat.gid, function (er) {
|
|
1020
|
-
return cb(er, cacheStat)
|
|
1021
|
-
})
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
function addPlacedTarball (p, name, shasum, cb) {
|
|
1029
|
-
if (!cb) cb = name, name = ""
|
|
1030
|
-
getCacheStat(function (er, cs) {
|
|
1031
|
-
if (er) return cb(er)
|
|
1032
|
-
return addPlacedTarball_(p, name, cs.uid, cs.gid, shasum, cb)
|
|
1033
|
-
})
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// Resolved sum is the shasum from the registry dist object, but
|
|
1037
|
-
// *not* necessarily the shasum of this tarball, because for stupid
|
|
1038
|
-
// historical reasons, npm re-packs each package an extra time through
|
|
1039
|
-
// a temp directory, so all installed packages are actually built with
|
|
1040
|
-
// *this* version of npm, on this machine.
|
|
1041
|
-
//
|
|
1042
|
-
// Once upon a time, this meant that we could change package formats
|
|
1043
|
-
// around and fix junk that might be added by incompatible tar
|
|
1044
|
-
// implementations. Then, for a while, it was a way to correct bs
|
|
1045
|
-
// added by bugs in our own tar implementation. Now, it's just
|
|
1046
|
-
// garbage, but cleaning it up is a pain, and likely to cause issues
|
|
1047
|
-
// if anything is overlooked, so it's not high priority.
|
|
1048
|
-
//
|
|
1049
|
-
// If you're bored, and looking to make npm go faster, and you've
|
|
1050
|
-
// already made it this far in this file, here's a better methodology:
|
|
1051
|
-
//
|
|
1052
|
-
// cache.add should really be cache.place. That is, it should take
|
|
1053
|
-
// a set of arguments like it does now, but then also a destination
|
|
1054
|
-
// folder.
|
|
1055
|
-
//
|
|
1056
|
-
// cache.add('foo@bar', '/path/node_modules/foo', cb)
|
|
1057
|
-
//
|
|
1058
|
-
// 1. Resolve 'foo@bar' to some specific:
|
|
1059
|
-
// - git url
|
|
1060
|
-
// - local folder
|
|
1061
|
-
// - local tarball
|
|
1062
|
-
// - tarball url
|
|
1063
|
-
// 2. If resolved through the registry, then pick up the dist.shasum
|
|
1064
|
-
// along the way.
|
|
1065
|
-
// 3. Acquire request() stream fetching bytes: FETCH
|
|
1066
|
-
// 4. FETCH.pipe(tar unpack stream to dest)
|
|
1067
|
-
// 5. FETCH.pipe(shasum generator)
|
|
1068
|
-
// When the tar and shasum streams both finish, make sure that the
|
|
1069
|
-
// shasum matches dist.shasum, and if not, clean up and bail.
|
|
1070
|
-
//
|
|
1071
|
-
// publish(cb)
|
|
1072
|
-
//
|
|
1073
|
-
// 1. read package.json
|
|
1074
|
-
// 2. get root package object (for rev, and versions)
|
|
1075
|
-
// 3. update root package doc with version info
|
|
1076
|
-
// 4. remove _attachments object
|
|
1077
|
-
// 5. remove versions object
|
|
1078
|
-
// 5. jsonify, remove last }
|
|
1079
|
-
// 6. get stream: registry.put(/package)
|
|
1080
|
-
// 7. write trailing-}-less JSON
|
|
1081
|
-
// 8. write "_attachments":
|
|
1082
|
-
// 9. JSON.stringify(attachments), remove trailing }
|
|
1083
|
-
// 10. Write start of attachments (stubs)
|
|
1084
|
-
// 11. JSON(filename)+':{"type":"application/octet-stream","data":"'
|
|
1085
|
-
// 12. acquire tar packing stream, PACK
|
|
1086
|
-
// 13. PACK.pipe(PUT)
|
|
1087
|
-
// 14. PACK.pipe(shasum generator)
|
|
1088
|
-
// 15. when PACK finishes, get shasum
|
|
1089
|
-
// 16. PUT.write('"}},') (finish _attachments
|
|
1090
|
-
// 17. update "versions" object with current package version
|
|
1091
|
-
// (including dist.shasum and dist.tarball)
|
|
1092
|
-
// 18. write '"versions":' + JSON(versions)
|
|
1093
|
-
// 19. write '}}' (versions, close main doc)
|
|
1094
|
-
|
|
1095
|
-
function addPlacedTarball_ (p, name, uid, gid, resolvedSum, cb) {
|
|
1096
|
-
// now we know it's in place already as .cache/name/ver/package.tgz
|
|
1097
|
-
// unpack to .cache/name/ver/package/, read the package.json,
|
|
1098
|
-
// and fire cb with the json data.
|
|
1099
|
-
var target = path.dirname(p)
|
|
1100
|
-
, folder = path.join(target, "package")
|
|
1101
|
-
|
|
1102
|
-
lock(folder, function (er) {
|
|
1103
|
-
if (er) return cb(er)
|
|
1104
|
-
rmUnpack()
|
|
1105
|
-
})
|
|
1106
|
-
|
|
1107
|
-
function rmUnpack () {
|
|
1108
|
-
rm(folder, function (er) {
|
|
1109
|
-
unlock(folder, function () {
|
|
1110
|
-
if (er) {
|
|
1111
|
-
log.error("addPlacedTarball", "Could not remove %j", folder)
|
|
1112
|
-
return cb(er)
|
|
1113
|
-
}
|
|
1114
|
-
thenUnpack()
|
|
1115
|
-
})
|
|
1116
|
-
})
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
function thenUnpack () {
|
|
1120
|
-
tar.unpack(p, folder, null, null, uid, gid, function (er) {
|
|
1121
|
-
if (er) {
|
|
1122
|
-
log.error("addPlacedTarball", "Could not unpack %j to %j", p, target)
|
|
1123
|
-
return cb(er)
|
|
1124
|
-
}
|
|
1125
|
-
// calculate the sha of the file that we just unpacked.
|
|
1126
|
-
// this is so that the data is available when publishing.
|
|
1127
|
-
sha.get(p, function (er, shasum) {
|
|
1128
|
-
if (er) {
|
|
1129
|
-
log.error("addPlacedTarball", "shasum fail", p)
|
|
1130
|
-
return cb(er)
|
|
1131
|
-
}
|
|
1132
|
-
readJson(path.join(folder, "package.json"), function (er, data) {
|
|
1133
|
-
er = needName(er, data)
|
|
1134
|
-
er = needVersion(er, data)
|
|
1135
|
-
if (er) {
|
|
1136
|
-
log.error("addPlacedTarball", "Couldn't read json in %j"
|
|
1137
|
-
, folder)
|
|
1138
|
-
return cb(er)
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
data.dist = data.dist || {}
|
|
1142
|
-
data.dist.shasum = shasum
|
|
1143
|
-
deprCheck(data)
|
|
1144
|
-
asyncMap([p], function (f, cb) {
|
|
1145
|
-
log.verbose("chmod", f, npm.modes.file.toString(8))
|
|
1146
|
-
fs.chmod(f, npm.modes.file, cb)
|
|
1147
|
-
}, function (f, cb) {
|
|
1148
|
-
if (process.platform === "win32") {
|
|
1149
|
-
log.silly("chown", "skipping for windows", f)
|
|
1150
|
-
cb()
|
|
1151
|
-
} else if (typeof uid === "number"
|
|
1152
|
-
&& typeof gid === "number"
|
|
1153
|
-
&& parseInt(uid, 10) === uid
|
|
1154
|
-
&& parseInt(gid, 10) === gid) {
|
|
1155
|
-
log.verbose("chown", f, [uid, gid])
|
|
1156
|
-
fs.chown(f, uid, gid, cb)
|
|
1157
|
-
} else {
|
|
1158
|
-
log.verbose("chown", "skip for invalid uid/gid", [f, uid, gid])
|
|
1159
|
-
cb()
|
|
1160
|
-
}
|
|
1161
|
-
}, function (er) {
|
|
1162
|
-
cb(er, data)
|
|
1163
|
-
})
|
|
1164
|
-
})
|
|
1165
|
-
})
|
|
1166
|
-
})
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
// At this point, if shasum is set, it's something that we've already
|
|
1171
|
-
// read and checked. Just stashing it in the data at this point.
|
|
1172
|
-
function addLocalDirectory (p, name, shasum, cb) {
|
|
1173
|
-
if (typeof cb !== "function") cb = shasum, shasum = ""
|
|
1174
|
-
if (typeof cb !== "function") cb = name, name = ""
|
|
1175
|
-
// if it's a folder, then read the package.json,
|
|
1176
|
-
// tar it to the proper place, and add the cache tar
|
|
1177
|
-
if (pathIsInside(p, npm.cache)) return cb(new Error(
|
|
1178
|
-
"Adding a cache directory to the cache will make the world implode."))
|
|
1179
|
-
readJson(path.join(p, "package.json"), false, function (er, data) {
|
|
1180
|
-
er = needName(er, data)
|
|
1181
|
-
er = needVersion(er, data)
|
|
1182
|
-
if (er) return cb(er)
|
|
1183
|
-
deprCheck(data)
|
|
1184
|
-
var random = Date.now() + "-" + Math.random()
|
|
1185
|
-
, tmp = path.join(npm.tmp, random)
|
|
1186
|
-
, tmptgz = path.resolve(tmp, "tmp.tgz")
|
|
1187
|
-
, placed = path.resolve( npm.cache, data.name
|
|
1188
|
-
, data.version, "package.tgz" )
|
|
1189
|
-
, placeDirect = path.basename(p) === "package"
|
|
1190
|
-
, tgz = placeDirect ? placed : tmptgz
|
|
1191
|
-
getCacheStat(function (er, cs) {
|
|
1192
|
-
mkdir(path.dirname(tgz), function (er, made) {
|
|
1193
|
-
if (er) return cb(er)
|
|
1194
|
-
|
|
1195
|
-
var fancy = !pathIsInside(p, npm.tmp)
|
|
1196
|
-
&& !pathIsInside(p, npm.cache)
|
|
1197
|
-
tar.pack(tgz, p, data, fancy, function (er) {
|
|
1198
|
-
if (er) {
|
|
1199
|
-
log.error( "addLocalDirectory", "Could not pack %j to %j"
|
|
1200
|
-
, p, tgz )
|
|
1201
|
-
return cb(er)
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
// if we don't get a cache stat, or if the gid/uid is not
|
|
1205
|
-
// a number, then just move on. chown would fail anyway.
|
|
1206
|
-
if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) return cb()
|
|
1207
|
-
|
|
1208
|
-
chownr(made || tgz, cs.uid, cs.gid, function (er) {
|
|
1209
|
-
if (er) return cb(er)
|
|
1210
|
-
addLocalTarball(tgz, name, shasum, cb)
|
|
1211
|
-
})
|
|
1212
|
-
})
|
|
1213
|
-
})
|
|
1214
|
-
})
|
|
1215
|
-
})
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
function addTmpTarball (tgz, name, shasum, cb) {
|
|
1219
|
-
if (!cb) cb = name, name = ""
|
|
1220
|
-
getCacheStat(function (er, cs) {
|
|
1221
|
-
if (er) return cb(er)
|
|
1222
|
-
var contents = path.dirname(tgz)
|
|
1223
|
-
tar.unpack( tgz, path.resolve(contents, "package")
|
|
1224
|
-
, null, null
|
|
1225
|
-
, cs.uid, cs.gid
|
|
1226
|
-
, function (er) {
|
|
1227
|
-
if (er) {
|
|
1228
|
-
return cb(er)
|
|
1229
|
-
}
|
|
1230
|
-
addLocalDirectory(path.resolve(contents, "package"), name, shasum, cb)
|
|
1231
|
-
})
|
|
1232
|
-
})
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) {
|
|
1236
|
-
if (typeof cb !== "function") cb = gid, gid = null
|
|
1237
|
-
if (typeof cb !== "function") cb = uid, uid = null
|
|
1238
|
-
if (typeof cb !== "function") cb = fMode, fMode = null
|
|
1239
|
-
if (typeof cb !== "function") cb = dMode, dMode = null
|
|
1240
|
-
|
|
1241
|
-
read(pkg, ver, false, function (er, data) {
|
|
1242
|
-
if (er) {
|
|
1243
|
-
log.error("unpack", "Could not read data for %s", pkg + "@" + ver)
|
|
1244
|
-
return cb(er)
|
|
1245
|
-
}
|
|
1246
|
-
npm.commands.unbuild([unpackTarget], true, function (er) {
|
|
1247
|
-
if (er) return cb(er)
|
|
1248
|
-
tar.unpack( path.join(npm.cache, pkg, ver, "package.tgz")
|
|
1249
|
-
, unpackTarget
|
|
1250
|
-
, dMode, fMode
|
|
1251
|
-
, uid, gid
|
|
1252
|
-
, cb )
|
|
1253
|
-
})
|
|
1254
|
-
})
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
var deprecated = {}
|
|
1258
|
-
, deprWarned = {}
|
|
1259
|
-
function deprCheck (data) {
|
|
1260
|
-
if (deprecated[data._id]) data.deprecated = deprecated[data._id]
|
|
1261
|
-
if (data.deprecated) deprecated[data._id] = data.deprecated
|
|
1262
|
-
else return
|
|
1263
|
-
if (!deprWarned[data._id]) {
|
|
1264
|
-
deprWarned[data._id] = true
|
|
1265
|
-
log.warn("deprecated", "%s: %s", data._id, data.deprecated)
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
function lockFileName (u) {
|
|
1270
|
-
var c = u.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "")
|
|
1271
|
-
, h = crypto.createHash("sha1").update(u).digest("hex")
|
|
1272
|
-
h = h.substr(0, 8)
|
|
1273
|
-
c = c.substr(-32)
|
|
1274
|
-
log.silly("lockFile", h + "-" + c, u)
|
|
1275
|
-
return path.resolve(npm.config.get("cache"), h + "-" + c + ".lock")
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
var myLocks = {}
|
|
1279
|
-
function lock (u, cb) {
|
|
1280
|
-
// the cache dir needs to exist already for this.
|
|
1281
|
-
getCacheStat(function (er, cs) {
|
|
1282
|
-
if (er) return cb(er)
|
|
1283
|
-
var opts = { stale: npm.config.get("cache-lock-stale")
|
|
1284
|
-
, retries: npm.config.get("cache-lock-retries")
|
|
1285
|
-
, wait: npm.config.get("cache-lock-wait") }
|
|
1286
|
-
var lf = lockFileName(u)
|
|
1287
|
-
log.verbose("lock", u, lf)
|
|
1288
|
-
lockFile.lock(lf, opts, function(er) {
|
|
1289
|
-
if (!er) myLocks[lf] = true
|
|
1290
|
-
cb(er)
|
|
1291
|
-
})
|
|
1292
|
-
})
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
function unlock (u, cb) {
|
|
1296
|
-
var lf = lockFileName(u)
|
|
1297
|
-
, locked = myLocks[lf]
|
|
1298
|
-
if (locked === false) {
|
|
1299
|
-
return process.nextTick(cb)
|
|
1300
|
-
} else if (locked === true) {
|
|
1301
|
-
myLocks[lf] = false
|
|
1302
|
-
lockFile.unlock(lockFileName(u), cb)
|
|
1303
|
-
} else {
|
|
1304
|
-
throw new Error("Attempt to unlock " + u + ", which hasn't been locked")
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
function needName(er, data) {
|
|
1309
|
-
return er ? er
|
|
1310
|
-
: (data && !data.name) ? new Error("No name provided")
|
|
1311
|
-
: null
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
function needVersion(er, data) {
|
|
1315
|
-
return er ? er
|
|
1316
|
-
: (data && !data.version) ? new Error("No version provided")
|
|
1317
|
-
: null
|
|
1318
|
-
}
|