step-node-agent 3.17.2 → 3.18.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.
- package/node_modules/asn1/Jenkinsfile +65 -0
- package/node_modules/asn1/package.json +5 -5
- package/node_modules/body-parser/HISTORY.md +15 -0
- package/node_modules/body-parser/README.md +25 -12
- package/node_modules/body-parser/package.json +23 -23
- package/node_modules/bytes/History.md +5 -0
- package/node_modules/bytes/Readme.md +42 -16
- package/node_modules/bytes/index.js +5 -1
- package/node_modules/bytes/package.json +9 -8
- package/node_modules/content-disposition/HISTORY.md +5 -0
- package/node_modules/content-disposition/README.md +3 -9
- package/node_modules/content-disposition/index.js +1 -1
- package/node_modules/content-disposition/package.json +16 -16
- package/node_modules/cookie/HISTORY.md +5 -0
- package/node_modules/cookie/README.md +4 -0
- package/node_modules/cookie/index.js +5 -1
- package/node_modules/cookie/package.json +11 -11
- package/node_modules/express/History.md +33 -0
- package/node_modules/express/Readme.md +8 -5
- package/node_modules/express/lib/application.js +1 -1
- package/node_modules/express/lib/request.js +1 -1
- package/node_modules/express/lib/response.js +16 -11
- package/node_modules/express/lib/router/index.js +6 -0
- package/node_modules/express/lib/utils.js +2 -6
- package/node_modules/express/package.json +26 -25
- package/node_modules/graceful-fs/package.json +4 -4
- package/node_modules/graceful-fs/polyfills.js +4 -2
- package/node_modules/http-errors/HISTORY.md +16 -0
- package/node_modules/http-errors/README.md +12 -6
- package/node_modules/http-errors/index.js +35 -2
- package/node_modules/http-errors/package.json +19 -19
- package/node_modules/inherits/inherits.js +2 -0
- package/node_modules/inherits/inherits_browser.js +18 -14
- package/node_modules/inherits/package.json +6 -6
- package/node_modules/is-core-module/.eslintrc +0 -1
- package/node_modules/is-core-module/CHANGELOG.md +18 -0
- package/node_modules/is-core-module/core.json +7 -5
- package/node_modules/is-core-module/package.json +10 -10
- package/node_modules/is-core-module/test/index.js +1 -1
- package/node_modules/json-schema/LICENSE +195 -0
- package/node_modules/json-schema/README.md +2 -4
- package/node_modules/json-schema/lib/links.js +1 -2
- package/node_modules/json-schema/lib/validate.js +7 -9
- package/node_modules/json-schema/package.json +8 -14
- package/node_modules/jsprim/CHANGES.md +4 -0
- package/node_modules/jsprim/package.json +8 -8
- package/node_modules/mime-db/HISTORY.md +7 -0
- package/node_modules/mime-db/db.json +18 -0
- package/node_modules/mime-db/package.json +7 -7
- package/node_modules/mime-types/HISTORY.md +6 -3
- package/node_modules/mime-types/package.json +8 -8
- package/node_modules/npm/.eslintrc +3 -0
- package/node_modules/npm/CHANGELOG.md +14 -0
- package/node_modules/npm/docs/public/cli-commands/npm/index.html +3 -3
- package/node_modules/npm/docs/public/cli-commands/npm-access/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-adduser/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-audit/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bin/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bugs/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-build/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bundle/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-cache/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ci/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-completion/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-config/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-dedupe/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-deprecate/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-dist-tag/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-docs/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-doctor/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-edit/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-explore/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-fund/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-help/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-help-search/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-hook/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-init/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install-ci-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-link/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-logout/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ls/index.html +3 -3
- package/node_modules/npm/docs/public/cli-commands/npm-org/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-outdated/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-owner/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-pack/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ping/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-prefix/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-profile/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-prune/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-publish/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-rebuild/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-repo/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-restart/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-root/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-run-script/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-search/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-shrinkwrap/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-star/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-stars/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-start/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-stop/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-team/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-token/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-uninstall/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-unpublish/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-update/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-version/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-view/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-whoami/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/folders/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/install/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/npmrc/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-json/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-lock-json/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-locks/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/shrinkwrap-json/index.html +2 -2
- package/node_modules/npm/docs/public/index.html +1 -1
- package/node_modules/npm/docs/public/using-npm/config/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/developers/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/disputes/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/orgs/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/registry/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/removal/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/scope/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/scripts/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/semver/index.html +2 -2
- package/node_modules/npm/lib/auth/legacy.js +1 -1
- package/node_modules/npm/lib/profile.js +2 -2
- package/node_modules/npm/man/man1/npm-README.1 +1 -1
- package/node_modules/npm/man/man1/npm-access.1 +1 -1
- package/node_modules/npm/man/man1/npm-adduser.1 +1 -1
- package/node_modules/npm/man/man1/npm-audit.1 +1 -1
- package/node_modules/npm/man/man1/npm-bin.1 +1 -1
- package/node_modules/npm/man/man1/npm-bugs.1 +1 -1
- package/node_modules/npm/man/man1/npm-build.1 +1 -1
- package/node_modules/npm/man/man1/npm-bundle.1 +1 -1
- package/node_modules/npm/man/man1/npm-cache.1 +1 -1
- package/node_modules/npm/man/man1/npm-ci.1 +1 -1
- package/node_modules/npm/man/man1/npm-completion.1 +1 -1
- package/node_modules/npm/man/man1/npm-config.1 +1 -1
- package/node_modules/npm/man/man1/npm-dedupe.1 +1 -1
- package/node_modules/npm/man/man1/npm-deprecate.1 +1 -1
- package/node_modules/npm/man/man1/npm-dist-tag.1 +1 -1
- package/node_modules/npm/man/man1/npm-docs.1 +1 -1
- package/node_modules/npm/man/man1/npm-doctor.1 +1 -1
- package/node_modules/npm/man/man1/npm-edit.1 +1 -1
- package/node_modules/npm/man/man1/npm-explore.1 +1 -1
- package/node_modules/npm/man/man1/npm-fund.1 +1 -1
- package/node_modules/npm/man/man1/npm-help-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-help.1 +1 -1
- package/node_modules/npm/man/man1/npm-hook.1 +1 -1
- package/node_modules/npm/man/man1/npm-init.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-ci-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install.1 +1 -1
- package/node_modules/npm/man/man1/npm-link.1 +1 -1
- package/node_modules/npm/man/man1/npm-logout.1 +1 -1
- package/node_modules/npm/man/man1/npm-ls.1 +2 -2
- package/node_modules/npm/man/man1/npm-org.1 +1 -1
- package/node_modules/npm/man/man1/npm-outdated.1 +1 -1
- package/node_modules/npm/man/man1/npm-owner.1 +1 -1
- package/node_modules/npm/man/man1/npm-pack.1 +1 -1
- package/node_modules/npm/man/man1/npm-ping.1 +1 -1
- package/node_modules/npm/man/man1/npm-prefix.1 +1 -1
- package/node_modules/npm/man/man1/npm-profile.1 +1 -1
- package/node_modules/npm/man/man1/npm-prune.1 +1 -1
- package/node_modules/npm/man/man1/npm-publish.1 +1 -1
- package/node_modules/npm/man/man1/npm-rebuild.1 +1 -1
- package/node_modules/npm/man/man1/npm-repo.1 +1 -1
- package/node_modules/npm/man/man1/npm-restart.1 +1 -1
- package/node_modules/npm/man/man1/npm-root.1 +1 -1
- package/node_modules/npm/man/man1/npm-run-script.1 +1 -1
- package/node_modules/npm/man/man1/npm-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-shrinkwrap.1 +1 -1
- package/node_modules/npm/man/man1/npm-star.1 +1 -1
- package/node_modules/npm/man/man1/npm-stars.1 +1 -1
- package/node_modules/npm/man/man1/npm-start.1 +1 -1
- package/node_modules/npm/man/man1/npm-stop.1 +1 -1
- package/node_modules/npm/man/man1/npm-team.1 +1 -1
- package/node_modules/npm/man/man1/npm-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-token.1 +1 -1
- package/node_modules/npm/man/man1/npm-uninstall.1 +1 -1
- package/node_modules/npm/man/man1/npm-unpublish.1 +1 -1
- package/node_modules/npm/man/man1/npm-update.1 +1 -1
- package/node_modules/npm/man/man1/npm-version.1 +1 -1
- package/node_modules/npm/man/man1/npm-view.1 +1 -1
- package/node_modules/npm/man/man1/npm-whoami.1 +1 -1
- package/node_modules/npm/man/man1/npm.1 +2 -2
- package/node_modules/npm/man/man5/folders.5 +1 -1
- package/node_modules/npm/man/man5/install.5 +1 -1
- package/node_modules/npm/man/man5/npmrc.5 +1 -1
- package/node_modules/npm/man/man5/package-json.5 +1 -1
- package/node_modules/npm/man/man5/package-lock-json.5 +1 -1
- package/node_modules/npm/man/man5/package-locks.5 +1 -1
- package/node_modules/npm/man/man5/shrinkwrap-json.5 +1 -1
- package/node_modules/npm/man/man7/config.7 +1 -1
- package/node_modules/npm/man/man7/developers.7 +1 -1
- package/node_modules/npm/man/man7/disputes.7 +1 -1
- package/node_modules/npm/man/man7/orgs.7 +1 -1
- package/node_modules/npm/man/man7/registry.7 +1 -1
- package/node_modules/npm/man/man7/removal.7 +1 -1
- package/node_modules/npm/man/man7/scope.7 +1 -1
- package/node_modules/npm/man/man7/scripts.7 +1 -1
- package/node_modules/npm/man/man7/semver.7 +1 -1
- package/node_modules/npm/node_modules/json-schema/LICENSE +195 -0
- package/node_modules/npm/node_modules/json-schema/README.md +2 -4
- package/node_modules/npm/node_modules/json-schema/lib/links.js +1 -2
- package/node_modules/npm/node_modules/json-schema/lib/validate.js +7 -9
- package/node_modules/npm/node_modules/json-schema/package.json +16 -22
- package/node_modules/npm/node_modules/jsprim/CHANGES.md +4 -0
- package/node_modules/npm/node_modules/jsprim/CONTRIBUTING.md +19 -0
- package/node_modules/npm/node_modules/jsprim/package.json +16 -16
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- package/node_modules/npm/package.json +5 -4
- package/node_modules/qs/.editorconfig +9 -0
- package/node_modules/qs/.eslintignore +2 -1
- package/node_modules/qs/.eslintrc +15 -1
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +103 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +34 -0
- package/node_modules/qs/dist/qs.js +117 -67
- package/node_modules/qs/lib/formats.js +9 -4
- package/node_modules/qs/lib/parse.js +29 -14
- package/node_modules/qs/lib/stringify.js +55 -46
- package/node_modules/qs/lib/utils.js +23 -2
- package/node_modules/qs/package.json +31 -20
- package/node_modules/qs/test/parse.js +97 -1
- package/node_modules/qs/test/stringify.js +115 -1
- package/node_modules/qs/test/utils.js +1 -1
- package/node_modules/raw-body/HISTORY.md +14 -0
- package/node_modules/raw-body/README.md +3 -5
- package/node_modules/raw-body/package.json +21 -21
- package/node_modules/request/node_modules/qs/.editorconfig +14 -1
- package/node_modules/request/node_modules/qs/.eslintrc +21 -3
- package/node_modules/request/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/request/node_modules/qs/.nycrc +13 -0
- package/node_modules/request/node_modules/qs/CHANGELOG.md +24 -0
- package/node_modules/request/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/request/node_modules/qs/README.md +54 -19
- package/node_modules/request/node_modules/qs/bower.json +21 -0
- package/node_modules/request/node_modules/qs/component.json +15 -0
- package/node_modules/request/node_modules/qs/dist/qs.js +35 -25
- package/node_modules/request/node_modules/qs/lib/formats.js +1 -1
- package/node_modules/request/node_modules/qs/lib/parse.js +6 -5
- package/node_modules/request/node_modules/qs/lib/stringify.js +21 -14
- package/node_modules/request/node_modules/qs/lib/utils.js +7 -5
- package/node_modules/request/node_modules/qs/package.json +21 -19
- package/node_modules/request/node_modules/qs/test/parse.js +79 -4
- package/node_modules/request/node_modules/qs/test/stringify.js +45 -0
- package/node_modules/request/node_modules/qs/test/utils.js +31 -0
- package/node_modules/resolve/.eslintrc +34 -8
- package/node_modules/resolve/.github/FUNDING.yml +12 -0
- package/node_modules/resolve/appveyor.yml +4 -2
- package/node_modules/resolve/async.js +3 -0
- package/node_modules/resolve/bin/resolve +50 -0
- package/node_modules/resolve/lib/async.js +10 -1
- package/node_modules/resolve/lib/core.js +1 -2
- package/node_modules/resolve/lib/core.json +85 -16
- package/node_modules/resolve/lib/homedir.js +24 -0
- package/node_modules/resolve/lib/node-modules-paths.js +1 -1
- package/node_modules/resolve/lib/sync.js +14 -5
- package/node_modules/resolve/package.json +26 -15
- package/node_modules/resolve/readme.markdown +35 -13
- package/node_modules/resolve/sync.js +3 -0
- package/node_modules/resolve/test/home_paths.js +127 -0
- package/node_modules/resolve/test/home_paths_sync.js +114 -0
- package/node_modules/resolve/test/mock_sync.js +2 -4
- package/node_modules/resolve/test/node_path.js +1 -1
- package/node_modules/resolve/test/resolver/invalid_main/package.json +1 -1
- package/node_modules/resolve/test/resolver/malformed_package_json/index.js +0 -0
- package/node_modules/resolve/test/resolver/malformed_package_json/package.json +1 -0
- package/node_modules/resolve/test/resolver.js +99 -3
- package/node_modules/resolve/test/resolver_sync.js +310 -23
- package/node_modules/safe-buffer/index.js +3 -0
- package/node_modules/safe-buffer/package.json +21 -7
- package/node_modules/send/HISTORY.md +10 -0
- package/node_modules/send/README.md +4 -6
- package/node_modules/send/index.js +7 -3
- package/node_modules/send/node_modules/ms/index.js +3 -3
- package/node_modules/send/node_modules/ms/license.md +1 -1
- package/node_modules/send/node_modules/ms/package.json +8 -7
- package/node_modules/send/node_modules/ms/readme.md +1 -2
- package/node_modules/send/package.json +19 -19
- package/node_modules/serve-static/HISTORY.md +8 -0
- package/node_modules/serve-static/README.md +9 -11
- package/node_modules/serve-static/package.json +19 -19
- package/node_modules/setprototypeof/README.md +1 -1
- package/node_modules/setprototypeof/index.js +1 -1
- package/node_modules/setprototypeof/package.json +9 -7
- package/node_modules/shelljs/package.json +4 -4
- package/node_modules/shelljs/src/exec.js +19 -1
- package/node_modules/signal-exit/index.js +30 -8
- package/node_modules/signal-exit/package.json +10 -8
- package/node_modules/sshpk/Jenkinsfile +86 -0
- package/node_modules/sshpk/lib/formats/putty.js +99 -4
- package/node_modules/sshpk/lib/private-key.js +1 -0
- package/node_modules/sshpk/package.json +4 -4
- package/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
- package/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
- package/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
- package/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
- package/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
- package/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
- package/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
- package/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
- package/node_modules/supports-preserve-symlinks-flag/package.json +74 -0
- package/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/README.md +3 -3
- package/node_modules/toidentifier/index.js +2 -0
- package/node_modules/toidentifier/package.json +19 -15
- package/node_modules/underscore/amd/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/amd/_setup.js +1 -1
- package/node_modules/underscore/amd/sample.js +2 -2
- package/node_modules/underscore/cjs/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/cjs/_setup.js +1 -1
- package/node_modules/underscore/cjs/sample.js +2 -2
- package/node_modules/underscore/modules/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/modules/_setup.js +1 -1
- package/node_modules/underscore/modules/index.js +1 -1
- package/node_modules/underscore/modules/sample.js +2 -2
- package/node_modules/underscore/package.json +4 -4
- package/node_modules/underscore/underscore-esm-min.js +2 -2
- package/node_modules/underscore/underscore-esm-min.js.map +1 -1
- package/node_modules/underscore/underscore-esm.js +17 -17
- package/node_modules/underscore/underscore-esm.js.map +1 -1
- package/node_modules/underscore/underscore-min.js +2 -2
- package/node_modules/underscore/underscore-min.js.map +1 -1
- package/node_modules/underscore/underscore-node-f.cjs +17 -17
- package/node_modules/underscore/underscore-node-f.cjs.map +1 -1
- package/node_modules/underscore/underscore-node.cjs +1 -1
- package/node_modules/underscore/underscore-node.mjs +1 -1
- package/node_modules/underscore/underscore-umd-min.js +2 -2
- package/node_modules/underscore/underscore-umd-min.js.map +1 -1
- package/node_modules/underscore/underscore-umd.js +17 -17
- package/node_modules/underscore/underscore-umd.js.map +1 -1
- package/node_modules/underscore/underscore.js +17 -17
- package/package.json +9 -9
- package/node_modules/hosted-git-info/CHANGELOG.md +0 -151
- package/node_modules/hosted-git-info/LICENSE +0 -13
- package/node_modules/hosted-git-info/README.md +0 -133
- package/node_modules/hosted-git-info/git-host-info.js +0 -79
- package/node_modules/hosted-git-info/git-host.js +0 -156
- package/node_modules/hosted-git-info/index.js +0 -148
- package/node_modules/hosted-git-info/package.json +0 -44
- package/node_modules/is-core-module/.eslintignore +0 -1
- package/node_modules/json-parse-better-errors/CHANGELOG.md +0 -46
- package/node_modules/json-parse-better-errors/LICENSE.md +0 -7
- package/node_modules/json-parse-better-errors/README.md +0 -46
- package/node_modules/json-parse-better-errors/index.js +0 -38
- package/node_modules/json-parse-better-errors/package.json +0 -49
- package/node_modules/json-schema/draft-00/hyper-schema +0 -68
- package/node_modules/json-schema/draft-00/json-ref +0 -26
- package/node_modules/json-schema/draft-00/links +0 -33
- package/node_modules/json-schema/draft-00/schema +0 -155
- package/node_modules/json-schema/draft-01/hyper-schema +0 -68
- package/node_modules/json-schema/draft-01/json-ref +0 -26
- package/node_modules/json-schema/draft-01/links +0 -33
- package/node_modules/json-schema/draft-01/schema +0 -155
- package/node_modules/json-schema/draft-02/hyper-schema +0 -68
- package/node_modules/json-schema/draft-02/json-ref +0 -26
- package/node_modules/json-schema/draft-02/links +0 -35
- package/node_modules/json-schema/draft-02/schema +0 -166
- package/node_modules/json-schema/draft-03/examples/address +0 -20
- package/node_modules/json-schema/draft-03/examples/calendar +0 -53
- package/node_modules/json-schema/draft-03/examples/card +0 -105
- package/node_modules/json-schema/draft-03/examples/geo +0 -8
- package/node_modules/json-schema/draft-03/examples/interfaces +0 -23
- package/node_modules/json-schema/draft-03/hyper-schema +0 -60
- package/node_modules/json-schema/draft-03/json-ref +0 -26
- package/node_modules/json-schema/draft-03/links +0 -35
- package/node_modules/json-schema/draft-03/schema +0 -174
- package/node_modules/json-schema/draft-04/hyper-schema +0 -60
- package/node_modules/json-schema/draft-04/links +0 -41
- package/node_modules/json-schema/draft-04/schema +0 -189
- package/node_modules/json-schema/draft-zyp-json-schema-03.xml +0 -1120
- package/node_modules/json-schema/draft-zyp-json-schema-04.xml +0 -1072
- package/node_modules/json-schema/test/tests.js +0 -95
- package/node_modules/normalize-package-data/AUTHORS +0 -4
- package/node_modules/normalize-package-data/LICENSE +0 -30
- package/node_modules/normalize-package-data/README.md +0 -106
- package/node_modules/normalize-package-data/lib/extract_description.js +0 -14
- package/node_modules/normalize-package-data/lib/fixer.js +0 -418
- package/node_modules/normalize-package-data/lib/make_warning.js +0 -23
- package/node_modules/normalize-package-data/lib/normalize.js +0 -39
- package/node_modules/normalize-package-data/lib/safe_format.js +0 -9
- package/node_modules/normalize-package-data/lib/typos.json +0 -25
- package/node_modules/normalize-package-data/lib/warning_messages.json +0 -30
- package/node_modules/normalize-package-data/package.json +0 -35
- package/node_modules/npm/node_modules/json-schema/draft-00/hyper-schema +0 -68
- package/node_modules/npm/node_modules/json-schema/draft-00/json-ref +0 -26
- package/node_modules/npm/node_modules/json-schema/draft-00/links +0 -33
- package/node_modules/npm/node_modules/json-schema/draft-00/schema +0 -155
- package/node_modules/npm/node_modules/json-schema/draft-01/hyper-schema +0 -68
- package/node_modules/npm/node_modules/json-schema/draft-01/json-ref +0 -26
- package/node_modules/npm/node_modules/json-schema/draft-01/links +0 -33
- package/node_modules/npm/node_modules/json-schema/draft-01/schema +0 -155
- package/node_modules/npm/node_modules/json-schema/draft-02/hyper-schema +0 -68
- package/node_modules/npm/node_modules/json-schema/draft-02/json-ref +0 -26
- package/node_modules/npm/node_modules/json-schema/draft-02/links +0 -35
- package/node_modules/npm/node_modules/json-schema/draft-02/schema +0 -166
- package/node_modules/npm/node_modules/json-schema/draft-03/examples/address +0 -20
- package/node_modules/npm/node_modules/json-schema/draft-03/examples/calendar +0 -53
- package/node_modules/npm/node_modules/json-schema/draft-03/examples/card +0 -105
- package/node_modules/npm/node_modules/json-schema/draft-03/examples/geo +0 -8
- package/node_modules/npm/node_modules/json-schema/draft-03/examples/interfaces +0 -23
- package/node_modules/npm/node_modules/json-schema/draft-03/hyper-schema +0 -60
- package/node_modules/npm/node_modules/json-schema/draft-03/json-ref +0 -26
- package/node_modules/npm/node_modules/json-schema/draft-03/links +0 -35
- package/node_modules/npm/node_modules/json-schema/draft-03/schema +0 -174
- package/node_modules/npm/node_modules/json-schema/draft-04/hyper-schema +0 -60
- package/node_modules/npm/node_modules/json-schema/draft-04/links +0 -41
- package/node_modules/npm/node_modules/json-schema/draft-04/schema +0 -189
- package/node_modules/npm/node_modules/json-schema/draft-zyp-json-schema-03.xml +0 -1120
- package/node_modules/npm/node_modules/json-schema/draft-zyp-json-schema-04.xml +0 -1072
- package/node_modules/npm/node_modules/json-schema/test/tests.js +0 -95
- package/node_modules/qs/LICENSE +0 -28
- package/node_modules/qs/test/.eslintrc +0 -17
- package/node_modules/qs/test/index.js +0 -7
- package/node_modules/request/node_modules/qs/.eslintignore +0 -1
- package/node_modules/request/node_modules/qs/LICENSE +0 -28
- package/node_modules/request/node_modules/qs/test/.eslintrc +0 -15
- package/node_modules/resolve/.eslintignore +0 -1
- package/node_modules/resolve/test/.eslintrc +0 -5
- package/node_modules/spdx-correct/LICENSE +0 -202
- package/node_modules/spdx-correct/README.md +0 -14
- package/node_modules/spdx-correct/index.js +0 -364
- package/node_modules/spdx-correct/package.json +0 -43
- package/node_modules/spdx-exceptions/README.md +0 -36
- package/node_modules/spdx-exceptions/index.json +0 -40
- package/node_modules/spdx-exceptions/package.json +0 -21
- package/node_modules/spdx-expression-parse/AUTHORS +0 -4
- package/node_modules/spdx-expression-parse/LICENSE +0 -22
- package/node_modules/spdx-expression-parse/README.md +0 -91
- package/node_modules/spdx-expression-parse/index.js +0 -8
- package/node_modules/spdx-expression-parse/package.json +0 -43
- package/node_modules/spdx-expression-parse/parse.js +0 -138
- package/node_modules/spdx-expression-parse/scan.js +0 -131
- package/node_modules/spdx-license-ids/README.md +0 -52
- package/node_modules/spdx-license-ids/deprecated.json +0 -26
- package/node_modules/spdx-license-ids/index.json +0 -446
- package/node_modules/spdx-license-ids/package.json +0 -44
- package/node_modules/sshpk/.npmignore +0 -9
- package/node_modules/validate-npm-package-license/LICENSE +0 -202
- package/node_modules/validate-npm-package-license/README.md +0 -113
- package/node_modules/validate-npm-package-license/index.js +0 -86
- package/node_modules/validate-npm-package-license/package.json +0 -32
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# hosted-git-info
|
|
2
|
-
|
|
3
|
-
This will let you identify and transform various git hosts URLs between
|
|
4
|
-
protocols. It also can tell you what the URL is for the raw path for
|
|
5
|
-
particular file for direct access without git.
|
|
6
|
-
|
|
7
|
-
## Example
|
|
8
|
-
|
|
9
|
-
```javascript
|
|
10
|
-
var hostedGitInfo = require("hosted-git-info")
|
|
11
|
-
var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts)
|
|
12
|
-
/* info looks like:
|
|
13
|
-
{
|
|
14
|
-
type: "github",
|
|
15
|
-
domain: "github.com",
|
|
16
|
-
user: "npm",
|
|
17
|
-
project: "hosted-git-info"
|
|
18
|
-
}
|
|
19
|
-
*/
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
If the URL can't be matched with a git host, `null` will be returned. We
|
|
23
|
-
can match git, ssh and https urls. Additionally, we can match ssh connect
|
|
24
|
-
strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg,
|
|
25
|
-
`github:npm/hosted-git-info`). Github specifically, is detected in the case
|
|
26
|
-
of a third, unprefixed, form: `npm/hosted-git-info`.
|
|
27
|
-
|
|
28
|
-
If it does match, the returned object has properties of:
|
|
29
|
-
|
|
30
|
-
* info.type -- The short name of the service
|
|
31
|
-
* info.domain -- The domain for git protocol use
|
|
32
|
-
* info.user -- The name of the user/org on the git host
|
|
33
|
-
* info.project -- The name of the project on the git host
|
|
34
|
-
|
|
35
|
-
## Version Contract
|
|
36
|
-
|
|
37
|
-
The major version will be bumped any time…
|
|
38
|
-
|
|
39
|
-
* The constructor stops accepting URLs that it previously accepted.
|
|
40
|
-
* A method is removed.
|
|
41
|
-
* A method can no longer accept the number and type of arguments it previously accepted.
|
|
42
|
-
* A method can return a different type than it currently returns.
|
|
43
|
-
|
|
44
|
-
Implications:
|
|
45
|
-
|
|
46
|
-
* I do not consider the specific format of the urls returned from, say
|
|
47
|
-
`.https()` to be a part of the contract. The contract is that it will
|
|
48
|
-
return a string that can be used to fetch the repo via HTTPS. But what
|
|
49
|
-
that string looks like, specifically, can change.
|
|
50
|
-
* Dropping support for a hosted git provider would constitute a breaking
|
|
51
|
-
change.
|
|
52
|
-
|
|
53
|
-
## Usage
|
|
54
|
-
|
|
55
|
-
### var info = hostedGitInfo.fromUrl(gitSpecifier[, options])
|
|
56
|
-
|
|
57
|
-
* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one.
|
|
58
|
-
* *options* is an optional object. It can have the following properties:
|
|
59
|
-
* *noCommittish* — If true then committishes won't be included in generated URLs.
|
|
60
|
-
* *noGitPlus* — If true then `git+` won't be prefixed on URLs.
|
|
61
|
-
|
|
62
|
-
## Methods
|
|
63
|
-
|
|
64
|
-
All of the methods take the same options as the `fromUrl` factory. Options
|
|
65
|
-
provided to a method override those provided to the constructor.
|
|
66
|
-
|
|
67
|
-
* info.file(path, opts)
|
|
68
|
-
|
|
69
|
-
Given the path of a file relative to the repository, returns a URL for
|
|
70
|
-
directly fetching it from the githost. If no committish was set then
|
|
71
|
-
`master` will be used as the default.
|
|
72
|
-
|
|
73
|
-
For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")`
|
|
74
|
-
would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`
|
|
75
|
-
|
|
76
|
-
* info.shortcut(opts)
|
|
77
|
-
|
|
78
|
-
eg, `github:npm/hosted-git-info`
|
|
79
|
-
|
|
80
|
-
* info.browse(path, fragment, opts)
|
|
81
|
-
|
|
82
|
-
eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`,
|
|
83
|
-
`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`,
|
|
84
|
-
`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts`
|
|
85
|
-
|
|
86
|
-
* info.bugs(opts)
|
|
87
|
-
|
|
88
|
-
eg, `https://github.com/npm/hosted-git-info/issues`
|
|
89
|
-
|
|
90
|
-
* info.docs(opts)
|
|
91
|
-
|
|
92
|
-
eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`
|
|
93
|
-
|
|
94
|
-
* info.https(opts)
|
|
95
|
-
|
|
96
|
-
eg, `git+https://github.com/npm/hosted-git-info.git`
|
|
97
|
-
|
|
98
|
-
* info.sshurl(opts)
|
|
99
|
-
|
|
100
|
-
eg, `git+ssh://git@github.com/npm/hosted-git-info.git`
|
|
101
|
-
|
|
102
|
-
* info.ssh(opts)
|
|
103
|
-
|
|
104
|
-
eg, `git@github.com:npm/hosted-git-info.git`
|
|
105
|
-
|
|
106
|
-
* info.path(opts)
|
|
107
|
-
|
|
108
|
-
eg, `npm/hosted-git-info`
|
|
109
|
-
|
|
110
|
-
* info.tarball(opts)
|
|
111
|
-
|
|
112
|
-
eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz`
|
|
113
|
-
|
|
114
|
-
* info.getDefaultRepresentation()
|
|
115
|
-
|
|
116
|
-
Returns the default output type. The default output type is based on the
|
|
117
|
-
string you passed in to be parsed
|
|
118
|
-
|
|
119
|
-
* info.toString(opts)
|
|
120
|
-
|
|
121
|
-
Uses the getDefaultRepresentation to call one of the other methods to get a URL for
|
|
122
|
-
this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give
|
|
123
|
-
you a normalized version of the URL that still uses the same protocol.
|
|
124
|
-
|
|
125
|
-
Shortcuts will still be returned as shortcuts, but the special case github
|
|
126
|
-
form of `org/project` will be normalized to `github:org/project`.
|
|
127
|
-
|
|
128
|
-
SSH connect strings will be normalized into `git+ssh` URLs.
|
|
129
|
-
|
|
130
|
-
## Supported hosts
|
|
131
|
-
|
|
132
|
-
Currently this supports Github, Bitbucket and Gitlab. Pull requests for
|
|
133
|
-
additional hosts welcome.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
var gitHosts = module.exports = {
|
|
4
|
-
github: {
|
|
5
|
-
// First two are insecure and generally shouldn't be used any more, but
|
|
6
|
-
// they are still supported.
|
|
7
|
-
'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
|
|
8
|
-
'domain': 'github.com',
|
|
9
|
-
'treepath': 'tree',
|
|
10
|
-
'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}',
|
|
11
|
-
'bugstemplate': 'https://{domain}/{user}/{project}/issues',
|
|
12
|
-
'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}',
|
|
13
|
-
'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}'
|
|
14
|
-
},
|
|
15
|
-
bitbucket: {
|
|
16
|
-
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
|
|
17
|
-
'domain': 'bitbucket.org',
|
|
18
|
-
'treepath': 'src',
|
|
19
|
-
'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz'
|
|
20
|
-
},
|
|
21
|
-
gitlab: {
|
|
22
|
-
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
|
|
23
|
-
'domain': 'gitlab.com',
|
|
24
|
-
'treepath': 'tree',
|
|
25
|
-
'bugstemplate': 'https://{domain}/{user}/{project}/issues',
|
|
26
|
-
'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}',
|
|
27
|
-
'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}',
|
|
28
|
-
'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/
|
|
29
|
-
},
|
|
30
|
-
gist: {
|
|
31
|
-
'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ],
|
|
32
|
-
'domain': 'gist.github.com',
|
|
33
|
-
'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/,
|
|
34
|
-
'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}',
|
|
35
|
-
'bugstemplate': 'https://{domain}/{project}',
|
|
36
|
-
'gittemplate': 'git://{domain}/{project}.git{#committish}',
|
|
37
|
-
'sshtemplate': 'git@{domain}:/{project}.git{#committish}',
|
|
38
|
-
'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}',
|
|
39
|
-
'browsetemplate': 'https://{domain}/{project}{/committish}',
|
|
40
|
-
'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}',
|
|
41
|
-
'docstemplate': 'https://{domain}/{project}{/committish}',
|
|
42
|
-
'httpstemplate': 'git+https://{domain}/{project}.git{#committish}',
|
|
43
|
-
'shortcuttemplate': '{type}:{project}{#committish}',
|
|
44
|
-
'pathtemplate': '{project}{#committish}',
|
|
45
|
-
'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}',
|
|
46
|
-
'hashformat': function (fragment) {
|
|
47
|
-
return 'file-' + formatHashFragment(fragment)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
var gitHostDefaults = {
|
|
53
|
-
'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}',
|
|
54
|
-
'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}',
|
|
55
|
-
'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}',
|
|
56
|
-
'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}',
|
|
57
|
-
'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme',
|
|
58
|
-
'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}',
|
|
59
|
-
'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}',
|
|
60
|
-
'shortcuttemplate': '{type}:{user}/{project}{#committish}',
|
|
61
|
-
'pathtemplate': '{user}/{project}{#committish}',
|
|
62
|
-
'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,
|
|
63
|
-
'hashformat': formatHashFragment
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
Object.keys(gitHosts).forEach(function (name) {
|
|
67
|
-
Object.keys(gitHostDefaults).forEach(function (key) {
|
|
68
|
-
if (gitHosts[name][key]) return
|
|
69
|
-
gitHosts[name][key] = gitHostDefaults[key]
|
|
70
|
-
})
|
|
71
|
-
gitHosts[name].protocols_re = RegExp('^(' +
|
|
72
|
-
gitHosts[name].protocols.map(function (protocol) {
|
|
73
|
-
return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1')
|
|
74
|
-
}).join('|') + '):$')
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
function formatHashFragment (fragment) {
|
|
78
|
-
return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-')
|
|
79
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var gitHosts = require('./git-host-info.js')
|
|
3
|
-
/* eslint-disable node/no-deprecated-api */
|
|
4
|
-
|
|
5
|
-
// copy-pasta util._extend from node's source, to avoid pulling
|
|
6
|
-
// the whole util module into peoples' webpack bundles.
|
|
7
|
-
/* istanbul ignore next */
|
|
8
|
-
var extend = Object.assign || function _extend (target, source) {
|
|
9
|
-
// Don't do anything if source isn't an object
|
|
10
|
-
if (source === null || typeof source !== 'object') return target
|
|
11
|
-
|
|
12
|
-
var keys = Object.keys(source)
|
|
13
|
-
var i = keys.length
|
|
14
|
-
while (i--) {
|
|
15
|
-
target[keys[i]] = source[keys[i]]
|
|
16
|
-
}
|
|
17
|
-
return target
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
module.exports = GitHost
|
|
21
|
-
function GitHost (type, user, auth, project, committish, defaultRepresentation, opts) {
|
|
22
|
-
var gitHostInfo = this
|
|
23
|
-
gitHostInfo.type = type
|
|
24
|
-
Object.keys(gitHosts[type]).forEach(function (key) {
|
|
25
|
-
gitHostInfo[key] = gitHosts[type][key]
|
|
26
|
-
})
|
|
27
|
-
gitHostInfo.user = user
|
|
28
|
-
gitHostInfo.auth = auth
|
|
29
|
-
gitHostInfo.project = project
|
|
30
|
-
gitHostInfo.committish = committish
|
|
31
|
-
gitHostInfo.default = defaultRepresentation
|
|
32
|
-
gitHostInfo.opts = opts || {}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
GitHost.prototype.hash = function () {
|
|
36
|
-
return this.committish ? '#' + this.committish : ''
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
GitHost.prototype._fill = function (template, opts) {
|
|
40
|
-
if (!template) return
|
|
41
|
-
var vars = extend({}, opts)
|
|
42
|
-
vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : ''
|
|
43
|
-
opts = extend(extend({}, this.opts), opts)
|
|
44
|
-
var self = this
|
|
45
|
-
Object.keys(this).forEach(function (key) {
|
|
46
|
-
if (self[key] != null && vars[key] == null) vars[key] = self[key]
|
|
47
|
-
})
|
|
48
|
-
var rawAuth = vars.auth
|
|
49
|
-
var rawcommittish = vars.committish
|
|
50
|
-
var rawFragment = vars.fragment
|
|
51
|
-
var rawPath = vars.path
|
|
52
|
-
var rawProject = vars.project
|
|
53
|
-
Object.keys(vars).forEach(function (key) {
|
|
54
|
-
var value = vars[key]
|
|
55
|
-
if ((key === 'path' || key === 'project') && typeof value === 'string') {
|
|
56
|
-
vars[key] = value.split('/').map(function (pathComponent) {
|
|
57
|
-
return encodeURIComponent(pathComponent)
|
|
58
|
-
}).join('/')
|
|
59
|
-
} else {
|
|
60
|
-
vars[key] = encodeURIComponent(value)
|
|
61
|
-
}
|
|
62
|
-
})
|
|
63
|
-
vars['auth@'] = rawAuth ? rawAuth + '@' : ''
|
|
64
|
-
vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : ''
|
|
65
|
-
vars.fragment = vars.fragment ? vars.fragment : ''
|
|
66
|
-
vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : ''
|
|
67
|
-
vars['/path'] = vars.path ? '/' + vars.path : ''
|
|
68
|
-
vars.projectPath = rawProject.split('/').map(encodeURIComponent).join('/')
|
|
69
|
-
if (opts.noCommittish) {
|
|
70
|
-
vars['#committish'] = ''
|
|
71
|
-
vars['/tree/committish'] = ''
|
|
72
|
-
vars['/committish'] = ''
|
|
73
|
-
vars.committish = ''
|
|
74
|
-
} else {
|
|
75
|
-
vars['#committish'] = rawcommittish ? '#' + rawcommittish : ''
|
|
76
|
-
vars['/tree/committish'] = vars.committish
|
|
77
|
-
? '/' + vars.treepath + '/' + vars.committish
|
|
78
|
-
: ''
|
|
79
|
-
vars['/committish'] = vars.committish ? '/' + vars.committish : ''
|
|
80
|
-
vars.committish = vars.committish || 'master'
|
|
81
|
-
}
|
|
82
|
-
var res = template
|
|
83
|
-
Object.keys(vars).forEach(function (key) {
|
|
84
|
-
res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key])
|
|
85
|
-
})
|
|
86
|
-
if (opts.noGitPlus) {
|
|
87
|
-
return res.replace(/^git[+]/, '')
|
|
88
|
-
} else {
|
|
89
|
-
return res
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
GitHost.prototype.ssh = function (opts) {
|
|
94
|
-
return this._fill(this.sshtemplate, opts)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
GitHost.prototype.sshurl = function (opts) {
|
|
98
|
-
return this._fill(this.sshurltemplate, opts)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
GitHost.prototype.browse = function (P, F, opts) {
|
|
102
|
-
if (typeof P === 'string') {
|
|
103
|
-
if (typeof F !== 'string') {
|
|
104
|
-
opts = F
|
|
105
|
-
F = null
|
|
106
|
-
}
|
|
107
|
-
return this._fill(this.browsefiletemplate, extend({
|
|
108
|
-
fragment: F,
|
|
109
|
-
path: P
|
|
110
|
-
}, opts))
|
|
111
|
-
} else {
|
|
112
|
-
return this._fill(this.browsetemplate, P)
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
GitHost.prototype.docs = function (opts) {
|
|
117
|
-
return this._fill(this.docstemplate, opts)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
GitHost.prototype.bugs = function (opts) {
|
|
121
|
-
return this._fill(this.bugstemplate, opts)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
GitHost.prototype.https = function (opts) {
|
|
125
|
-
return this._fill(this.httpstemplate, opts)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
GitHost.prototype.git = function (opts) {
|
|
129
|
-
return this._fill(this.gittemplate, opts)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
GitHost.prototype.shortcut = function (opts) {
|
|
133
|
-
return this._fill(this.shortcuttemplate, opts)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
GitHost.prototype.path = function (opts) {
|
|
137
|
-
return this._fill(this.pathtemplate, opts)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
GitHost.prototype.tarball = function (opts_) {
|
|
141
|
-
var opts = extend({}, opts_, { noCommittish: false })
|
|
142
|
-
return this._fill(this.tarballtemplate, opts)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
GitHost.prototype.file = function (P, opts) {
|
|
146
|
-
return this._fill(this.filetemplate, extend({ path: P }, opts))
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
GitHost.prototype.getDefaultRepresentation = function () {
|
|
150
|
-
return this.default
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
GitHost.prototype.toString = function (opts) {
|
|
154
|
-
if (this.default && typeof this[this.default] === 'function') return this[this.default](opts)
|
|
155
|
-
return this.sshurl(opts)
|
|
156
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var url = require('url')
|
|
3
|
-
var gitHosts = require('./git-host-info.js')
|
|
4
|
-
var GitHost = module.exports = require('./git-host.js')
|
|
5
|
-
|
|
6
|
-
var protocolToRepresentationMap = {
|
|
7
|
-
'git+ssh:': 'sshurl',
|
|
8
|
-
'git+https:': 'https',
|
|
9
|
-
'ssh:': 'sshurl',
|
|
10
|
-
'git:': 'git'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function protocolToRepresentation (protocol) {
|
|
14
|
-
return protocolToRepresentationMap[protocol] || protocol.slice(0, -1)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
var authProtocols = {
|
|
18
|
-
'git:': true,
|
|
19
|
-
'https:': true,
|
|
20
|
-
'git+https:': true,
|
|
21
|
-
'http:': true,
|
|
22
|
-
'git+http:': true
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var cache = {}
|
|
26
|
-
|
|
27
|
-
module.exports.fromUrl = function (giturl, opts) {
|
|
28
|
-
if (typeof giturl !== 'string') return
|
|
29
|
-
var key = giturl + JSON.stringify(opts || {})
|
|
30
|
-
|
|
31
|
-
if (!(key in cache)) {
|
|
32
|
-
cache[key] = fromUrl(giturl, opts)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return cache[key]
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function fromUrl (giturl, opts) {
|
|
39
|
-
if (giturl == null || giturl === '') return
|
|
40
|
-
var url = fixupUnqualifiedGist(
|
|
41
|
-
isGitHubShorthand(giturl) ? 'github:' + giturl : giturl
|
|
42
|
-
)
|
|
43
|
-
var parsed = parseGitUrl(url)
|
|
44
|
-
var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/)
|
|
45
|
-
var matches = Object.keys(gitHosts).map(function (gitHostName) {
|
|
46
|
-
try {
|
|
47
|
-
var gitHostInfo = gitHosts[gitHostName]
|
|
48
|
-
var auth = null
|
|
49
|
-
if (parsed.auth && authProtocols[parsed.protocol]) {
|
|
50
|
-
auth = parsed.auth
|
|
51
|
-
}
|
|
52
|
-
var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
|
|
53
|
-
var user = null
|
|
54
|
-
var project = null
|
|
55
|
-
var defaultRepresentation = null
|
|
56
|
-
if (shortcutMatch && shortcutMatch[1] === gitHostName) {
|
|
57
|
-
user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2])
|
|
58
|
-
project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, ''))
|
|
59
|
-
defaultRepresentation = 'shortcut'
|
|
60
|
-
} else {
|
|
61
|
-
if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return
|
|
62
|
-
if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
|
|
63
|
-
if (!parsed.path) return
|
|
64
|
-
var pathmatch = gitHostInfo.pathmatch
|
|
65
|
-
var matched = parsed.path.match(pathmatch)
|
|
66
|
-
if (!matched) return
|
|
67
|
-
/* istanbul ignore else */
|
|
68
|
-
if (matched[1] !== null && matched[1] !== undefined) {
|
|
69
|
-
user = decodeURIComponent(matched[1].replace(/^:/, ''))
|
|
70
|
-
}
|
|
71
|
-
project = decodeURIComponent(matched[2])
|
|
72
|
-
defaultRepresentation = protocolToRepresentation(parsed.protocol)
|
|
73
|
-
}
|
|
74
|
-
return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts)
|
|
75
|
-
} catch (ex) {
|
|
76
|
-
/* istanbul ignore else */
|
|
77
|
-
if (ex instanceof URIError) {
|
|
78
|
-
} else throw ex
|
|
79
|
-
}
|
|
80
|
-
}).filter(function (gitHostInfo) { return gitHostInfo })
|
|
81
|
-
if (matches.length !== 1) return
|
|
82
|
-
return matches[0]
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function isGitHubShorthand (arg) {
|
|
86
|
-
// Note: This does not fully test the git ref format.
|
|
87
|
-
// See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
|
|
88
|
-
//
|
|
89
|
-
// The only way to do this properly would be to shell out to
|
|
90
|
-
// git-check-ref-format, and as this is a fast sync function,
|
|
91
|
-
// we don't want to do that. Just let git fail if it turns
|
|
92
|
-
// out that the commit-ish is invalid.
|
|
93
|
-
// GH usernames cannot start with . or -
|
|
94
|
-
return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function fixupUnqualifiedGist (giturl) {
|
|
98
|
-
// necessary for round-tripping gists
|
|
99
|
-
var parsed = url.parse(giturl)
|
|
100
|
-
if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) {
|
|
101
|
-
return parsed.protocol + '/' + parsed.host
|
|
102
|
-
} else {
|
|
103
|
-
return giturl
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function parseGitUrl (giturl) {
|
|
108
|
-
var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
|
|
109
|
-
if (!matched) {
|
|
110
|
-
var legacy = url.parse(giturl)
|
|
111
|
-
// If we don't have url.URL, then sorry, this is just not fixable.
|
|
112
|
-
// This affects Node <= 6.12.
|
|
113
|
-
if (legacy.auth && typeof url.URL === 'function') {
|
|
114
|
-
// git urls can be in the form of scp-style/ssh-connect strings, like
|
|
115
|
-
// git+ssh://user@host.com:some/path, which the legacy url parser
|
|
116
|
-
// supports, but WhatWG url.URL class does not. However, the legacy
|
|
117
|
-
// parser de-urlencodes the username and password, so something like
|
|
118
|
-
// https://user%3An%40me:p%40ss%3Aword@x.com/ becomes
|
|
119
|
-
// https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong.
|
|
120
|
-
// Pull off just the auth and host, so we dont' get the confusing
|
|
121
|
-
// scp-style URL, then pass that to the WhatWG parser to get the
|
|
122
|
-
// auth properly escaped.
|
|
123
|
-
var authmatch = giturl.match(/[^@]+@[^:/]+/)
|
|
124
|
-
/* istanbul ignore else - this should be impossible */
|
|
125
|
-
if (authmatch) {
|
|
126
|
-
var whatwg = new url.URL(authmatch[0])
|
|
127
|
-
legacy.auth = whatwg.username || ''
|
|
128
|
-
if (whatwg.password) legacy.auth += ':' + whatwg.password
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return legacy
|
|
132
|
-
}
|
|
133
|
-
return {
|
|
134
|
-
protocol: 'git+ssh:',
|
|
135
|
-
slashes: true,
|
|
136
|
-
auth: matched[1],
|
|
137
|
-
host: matched[2],
|
|
138
|
-
port: null,
|
|
139
|
-
hostname: matched[2],
|
|
140
|
-
hash: matched[4],
|
|
141
|
-
search: null,
|
|
142
|
-
query: null,
|
|
143
|
-
pathname: '/' + matched[3],
|
|
144
|
-
path: '/' + matched[3],
|
|
145
|
-
href: 'git+ssh://' + matched[1] + '@' + matched[2] +
|
|
146
|
-
'/' + matched[3] + (matched[4] || '')
|
|
147
|
-
}
|
|
148
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hosted-git-info",
|
|
3
|
-
"version": "2.8.9",
|
|
4
|
-
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/npm/hosted-git-info.git"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [
|
|
11
|
-
"git",
|
|
12
|
-
"github",
|
|
13
|
-
"bitbucket",
|
|
14
|
-
"gitlab"
|
|
15
|
-
],
|
|
16
|
-
"author": "Rebecca Turner <me@re-becca.org> (http://re-becca.org)",
|
|
17
|
-
"license": "ISC",
|
|
18
|
-
"bugs": {
|
|
19
|
-
"url": "https://github.com/npm/hosted-git-info/issues"
|
|
20
|
-
},
|
|
21
|
-
"homepage": "https://github.com/npm/hosted-git-info",
|
|
22
|
-
"scripts": {
|
|
23
|
-
"prerelease": "npm t",
|
|
24
|
-
"postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags",
|
|
25
|
-
"posttest": "standard",
|
|
26
|
-
"release": "standard-version -s",
|
|
27
|
-
"test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js",
|
|
28
|
-
"test": "tap -J --coverage=90 --no-esm test/*.js"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"standard": "^11.0.1",
|
|
32
|
-
"standard-version": "^4.4.0",
|
|
33
|
-
"tap": "^12.7.0"
|
|
34
|
-
},
|
|
35
|
-
"files": [
|
|
36
|
-
"index.js",
|
|
37
|
-
"git-host.js",
|
|
38
|
-
"git-host-info.js"
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
,"_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz"
|
|
42
|
-
,"_integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
|
|
43
|
-
,"_from": "hosted-git-info@2.8.9"
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
coverage/
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
<a name="1.0.2"></a>
|
|
6
|
-
## [1.0.2](https://github.com/zkat/json-parse-better-errors/compare/v1.0.1...v1.0.2) (2018-03-30)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* **messages:** More friendly messages for non-string ([#1](https://github.com/zkat/json-parse-better-errors/issues/1)) ([a476d42](https://github.com/zkat/json-parse-better-errors/commit/a476d42))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<a name="1.0.1"></a>
|
|
16
|
-
## [1.0.1](https://github.com/zkat/json-parse-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Bug Fixes
|
|
20
|
-
|
|
21
|
-
* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/zkat/json-parse-better-errors/commit/efe2958))
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<a name="1.0.0"></a>
|
|
26
|
-
# 1.0.0 (2017-08-15)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Features
|
|
30
|
-
|
|
31
|
-
* **init:** Initial Commit ([562c977](https://github.com/zkat/json-parse-better-errors/commit/562c977))
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### BREAKING CHANGES
|
|
35
|
-
|
|
36
|
-
* **init:** This is the first commit!
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<a name="0.1.0"></a>
|
|
41
|
-
# 0.1.0 (2017-08-15)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Features
|
|
45
|
-
|
|
46
|
-
* **init:** Initial Commit ([9dd1a19](https://github.com/zkat/json-parse-better-errors/commit/9dd1a19))
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Copyright 2017 Kat Marchán
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# json-parse-better-errors [](https://npm.im/json-parse-better-errors) [](https://npm.im/json-parse-better-errors) [](https://travis-ci.org/zkat/json-parse-better-errors) [](https://ci.appveyor.com/project/zkat/json-parse-better-errors) [](https://coveralls.io/github/zkat/json-parse-better-errors?branch=latest)
|
|
2
|
-
|
|
3
|
-
[`json-parse-better-errors`](https://github.com/zkat/json-parse-better-errors) is a Node.js library for
|
|
4
|
-
getting nicer errors out of `JSON.parse()`, including context and position of the parse errors.
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
`$ npm install --save json-parse-better-errors`
|
|
9
|
-
|
|
10
|
-
## Table of Contents
|
|
11
|
-
|
|
12
|
-
* [Example](#example)
|
|
13
|
-
* [Features](#features)
|
|
14
|
-
* [Contributing](#contributing)
|
|
15
|
-
* [API](#api)
|
|
16
|
-
* [`parse`](#parse)
|
|
17
|
-
|
|
18
|
-
### Example
|
|
19
|
-
|
|
20
|
-
```javascript
|
|
21
|
-
const parseJson = require('json-parse-better-errors')
|
|
22
|
-
|
|
23
|
-
parseJson('"foo"')
|
|
24
|
-
parseJson('garbage') // more useful error message
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Features
|
|
28
|
-
|
|
29
|
-
* Like JSON.parse, but the errors are better.
|
|
30
|
-
|
|
31
|
-
### Contributing
|
|
32
|
-
|
|
33
|
-
The npm team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.
|
|
34
|
-
|
|
35
|
-
All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.
|
|
36
|
-
|
|
37
|
-
Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
|
|
38
|
-
|
|
39
|
-
Happy hacking!
|
|
40
|
-
|
|
41
|
-
### API
|
|
42
|
-
|
|
43
|
-
#### <a name="parse"></a> `> parse(txt, ?reviver, ?context=20)`
|
|
44
|
-
|
|
45
|
-
Works just like `JSON.parse`, but will include a bit more information when an
|
|
46
|
-
error happens.
|