step-node-agent 3.17.0 → 3.18.1
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/accepts/HISTORY.md +7 -0
- package/node_modules/accepts/README.md +3 -5
- package/node_modules/accepts/package.json +18 -18
- 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/glob/README.md +3 -0
- package/node_modules/glob/common.js +2 -0
- package/node_modules/glob/glob.js +4 -5
- package/node_modules/glob/package.json +5 -4
- package/node_modules/glob/sync.js +4 -5
- package/node_modules/graceful-fs/README.md +11 -1
- package/node_modules/graceful-fs/graceful-fs.js +105 -49
- 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-callable/.editorconfig +5 -0
- package/node_modules/is-callable/.nycrc +0 -4
- package/node_modules/is-callable/CHANGELOG.md +14 -0
- package/node_modules/is-callable/README.md +14 -15
- package/node_modules/is-callable/index.js +1 -1
- package/node_modules/is-callable/package.json +20 -28
- package/node_modules/is-callable/test/index.js +22 -50
- package/node_modules/is-core-module/.eslintrc +0 -1
- package/node_modules/is-core-module/CHANGELOG.md +44 -0
- package/node_modules/is-core-module/core.json +67 -61
- package/node_modules/is-core-module/index.js +1 -1
- package/node_modules/is-core-module/package.json +12 -11
- package/node_modules/is-core-module/test/index.js +23 -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 +19 -0
- package/node_modules/mime-db/db.json +93 -1
- package/node_modules/mime-db/package.json +10 -10
- package/node_modules/mime-types/HISTORY.md +20 -3
- package/node_modules/mime-types/package.json +10 -10
- package/node_modules/negotiator/HISTORY.md +5 -0
- package/node_modules/negotiator/README.md +3 -3
- package/node_modules/negotiator/index.js +4 -46
- package/node_modules/negotiator/lib/language.js +3 -3
- package/node_modules/negotiator/package.json +11 -11
- package/node_modules/npm/CHANGELOG.md +30 -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/node_modules/path-parse/index.js +17 -35
- package/node_modules/npm/node_modules/path-parse/package.json +14 -17
- package/node_modules/npm/node_modules/tar/lib/extract.js +4 -3
- package/node_modules/npm/node_modules/tar/lib/list.js +4 -3
- package/node_modules/npm/node_modules/tar/lib/mkdir.js +55 -48
- package/node_modules/npm/node_modules/tar/lib/normalize-windows-path.js +8 -0
- package/node_modules/npm/node_modules/tar/lib/pack.js +8 -18
- package/node_modules/npm/node_modules/tar/lib/path-reservations.js +149 -0
- package/node_modules/npm/node_modules/tar/lib/read-entry.js +4 -3
- package/node_modules/npm/node_modules/tar/lib/replace.js +2 -1
- package/node_modules/npm/node_modules/tar/lib/strip-absolute-path.js +24 -0
- package/node_modules/npm/node_modules/tar/lib/strip-trailing-slashes.js +24 -0
- package/node_modules/npm/node_modules/tar/lib/unpack.js +321 -96
- package/node_modules/npm/node_modules/tar/lib/write-entry.js +178 -82
- package/node_modules/npm/node_modules/tar/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/npm/node_modules/tar/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/npm/node_modules/tar/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/npm/node_modules/tar/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/npm/node_modules/tar/node_modules/safe-buffer/package.json +77 -0
- package/node_modules/npm/node_modules/tar/node_modules/yallist/LICENSE +15 -0
- package/node_modules/npm/node_modules/tar/node_modules/yallist/README.md +204 -0
- package/node_modules/npm/node_modules/tar/node_modules/yallist/iterator.js +8 -0
- package/node_modules/npm/node_modules/tar/node_modules/yallist/package.json +63 -0
- package/node_modules/npm/node_modules/tar/node_modules/yallist/yallist.js +426 -0
- package/node_modules/npm/node_modules/tar/package.json +29 -26
- package/node_modules/npm/package.json +6 -5
- 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/README.md +1 -1
- package/node_modules/signal-exit/index.js +169 -130
- package/node_modules/signal-exit/package.json +13 -13
- 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/glob/changelog.md +0 -67
- 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-callable/.github/main.workflow +0 -14
- 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/npm/node_modules/path-parse/.travis.yml +0 -9
- package/node_modules/npm/node_modules/path-parse/test.js +0 -77
- 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/signal-exit/CHANGELOG.md +0 -35
- 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 -432
- 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
|
@@ -56,6 +56,7 @@ const ONDRAIN = Symbol('ondrain')
|
|
|
56
56
|
const fs = require('fs')
|
|
57
57
|
const path = require('path')
|
|
58
58
|
const warner = require('./warn-mixin.js')
|
|
59
|
+
const normPath = require('./normalize-windows-path.js')
|
|
59
60
|
|
|
60
61
|
const Pack = warner(class Pack extends MiniPass {
|
|
61
62
|
constructor (opt) {
|
|
@@ -67,7 +68,7 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
67
68
|
this.preservePaths = !!opt.preservePaths
|
|
68
69
|
this.strict = !!opt.strict
|
|
69
70
|
this.noPax = !!opt.noPax
|
|
70
|
-
this.prefix = (opt.prefix || '')
|
|
71
|
+
this.prefix = normPath(opt.prefix || '')
|
|
71
72
|
this.linkCache = opt.linkCache || new Map()
|
|
72
73
|
this.statCache = opt.statCache || new Map()
|
|
73
74
|
this.readdirCache = opt.readdirCache || new Map()
|
|
@@ -132,10 +133,7 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
[ADDTARENTRY] (p) {
|
|
135
|
-
const absolute = path.resolve(this.cwd, p.path)
|
|
136
|
-
if (this.prefix)
|
|
137
|
-
p.path = this.prefix + '/' + p.path.replace(/^\.(\/+|$)/, '')
|
|
138
|
-
|
|
136
|
+
const absolute = normPath(path.resolve(this.cwd, p.path))
|
|
139
137
|
// in this case, we don't have to wait for the stat
|
|
140
138
|
if (!this.filter(p.path, p))
|
|
141
139
|
p.resume()
|
|
@@ -151,10 +149,7 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
151
149
|
}
|
|
152
150
|
|
|
153
151
|
[ADDFSENTRY] (p) {
|
|
154
|
-
const absolute = path.resolve(this.cwd, p)
|
|
155
|
-
if (this.prefix)
|
|
156
|
-
p = this.prefix + '/' + p.replace(/^\.(\/+|$)/, '')
|
|
157
|
-
|
|
152
|
+
const absolute = normPath(path.resolve(this.cwd, p))
|
|
158
153
|
this[QUEUE].push(new PackJob(p, absolute))
|
|
159
154
|
this[PROCESS]()
|
|
160
155
|
}
|
|
@@ -298,7 +293,8 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
298
293
|
linkCache: this.linkCache,
|
|
299
294
|
statCache: this.statCache,
|
|
300
295
|
noMtime: this.noMtime,
|
|
301
|
-
mtime: this.mtime
|
|
296
|
+
mtime: this.mtime,
|
|
297
|
+
prefix: this.prefix,
|
|
302
298
|
}
|
|
303
299
|
}
|
|
304
300
|
|
|
@@ -324,10 +320,7 @@ const Pack = warner(class Pack extends MiniPass {
|
|
|
324
320
|
|
|
325
321
|
if (job.readdir)
|
|
326
322
|
job.readdir.forEach(entry => {
|
|
327
|
-
const p =
|
|
328
|
-
job.path.slice(this.prefix.length + 1) || './'
|
|
329
|
-
: job.path
|
|
330
|
-
|
|
323
|
+
const p = job.path
|
|
331
324
|
const base = p === './' ? '' : p.replace(/\/*$/, '/')
|
|
332
325
|
this[ADDFSENTRY](base + entry)
|
|
333
326
|
})
|
|
@@ -380,10 +373,7 @@ class PackSync extends Pack {
|
|
|
380
373
|
|
|
381
374
|
if (job.readdir)
|
|
382
375
|
job.readdir.forEach(entry => {
|
|
383
|
-
const p =
|
|
384
|
-
job.path.slice(this.prefix.length + 1) || './'
|
|
385
|
-
: job.path
|
|
386
|
-
|
|
376
|
+
const p = job.path
|
|
387
377
|
const base = p === './' ? '' : p.replace(/\/*$/, '/')
|
|
388
378
|
this[ADDFSENTRY](base + entry)
|
|
389
379
|
})
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// A path exclusive reservation system
|
|
2
|
+
// reserve([list, of, paths], fn)
|
|
3
|
+
// When the fn is first in line for all its paths, it
|
|
4
|
+
// is called with a cb that clears the reservation.
|
|
5
|
+
//
|
|
6
|
+
// Used by async unpack to avoid clobbering paths in use,
|
|
7
|
+
// while still allowing maximal safe parallelization.
|
|
8
|
+
|
|
9
|
+
const assert = require('assert')
|
|
10
|
+
const normPath = require('./normalize-windows-path.js')
|
|
11
|
+
const stripSlashes = require('./strip-trailing-slashes.js')
|
|
12
|
+
const { join } = require('path')
|
|
13
|
+
|
|
14
|
+
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform
|
|
15
|
+
const isWindows = platform === 'win32'
|
|
16
|
+
|
|
17
|
+
module.exports = () => {
|
|
18
|
+
// path => [function or Set]
|
|
19
|
+
// A Set object means a directory reservation
|
|
20
|
+
// A fn is a direct reservation on that path
|
|
21
|
+
const queues = new Map()
|
|
22
|
+
|
|
23
|
+
// fn => {paths:[path,...], dirs:[path, ...]}
|
|
24
|
+
const reservations = new Map()
|
|
25
|
+
|
|
26
|
+
// return a set of parent dirs for a given path
|
|
27
|
+
// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']
|
|
28
|
+
const getDirs = path => {
|
|
29
|
+
const dirs = path.split('/').slice(0, -1).reduce((set, path) => {
|
|
30
|
+
if (set.length)
|
|
31
|
+
path = normPath(join(set[set.length - 1], path))
|
|
32
|
+
set.push(path || '/')
|
|
33
|
+
return set
|
|
34
|
+
}, [])
|
|
35
|
+
return dirs
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// functions currently running
|
|
39
|
+
const running = new Set()
|
|
40
|
+
|
|
41
|
+
// return the queues for each path the function cares about
|
|
42
|
+
// fn => {paths, dirs}
|
|
43
|
+
const getQueues = fn => {
|
|
44
|
+
const res = reservations.get(fn)
|
|
45
|
+
/* istanbul ignore if - unpossible */
|
|
46
|
+
if (!res)
|
|
47
|
+
throw new Error('function does not have any path reservations')
|
|
48
|
+
return {
|
|
49
|
+
paths: res.paths.map(path => queues.get(path)),
|
|
50
|
+
dirs: [...res.dirs].map(path => queues.get(path)),
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// check if fn is first in line for all its paths, and is
|
|
55
|
+
// included in the first set for all its dir queues
|
|
56
|
+
const check = fn => {
|
|
57
|
+
const {paths, dirs} = getQueues(fn)
|
|
58
|
+
return paths.every(q => q[0] === fn) &&
|
|
59
|
+
dirs.every(q => q[0] instanceof Set && q[0].has(fn))
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// run the function if it's first in line and not already running
|
|
63
|
+
const run = fn => {
|
|
64
|
+
if (running.has(fn) || !check(fn))
|
|
65
|
+
return false
|
|
66
|
+
running.add(fn)
|
|
67
|
+
fn(() => clear(fn))
|
|
68
|
+
return true
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const clear = fn => {
|
|
72
|
+
if (!running.has(fn))
|
|
73
|
+
return false
|
|
74
|
+
|
|
75
|
+
const { paths, dirs } = reservations.get(fn)
|
|
76
|
+
const next = new Set()
|
|
77
|
+
|
|
78
|
+
paths.forEach(path => {
|
|
79
|
+
const q = queues.get(path)
|
|
80
|
+
assert.equal(q[0], fn)
|
|
81
|
+
if (q.length === 1)
|
|
82
|
+
queues.delete(path)
|
|
83
|
+
else {
|
|
84
|
+
q.shift()
|
|
85
|
+
if (typeof q[0] === 'function')
|
|
86
|
+
next.add(q[0])
|
|
87
|
+
else
|
|
88
|
+
q[0].forEach(fn => next.add(fn))
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
dirs.forEach(dir => {
|
|
93
|
+
const q = queues.get(dir)
|
|
94
|
+
assert(q[0] instanceof Set)
|
|
95
|
+
if (q[0].size === 1 && q.length === 1) {
|
|
96
|
+
queues.delete(dir)
|
|
97
|
+
} else if (q[0].size === 1) {
|
|
98
|
+
q.shift()
|
|
99
|
+
|
|
100
|
+
// must be a function or else the Set would've been reused
|
|
101
|
+
next.add(q[0])
|
|
102
|
+
} else
|
|
103
|
+
q[0].delete(fn)
|
|
104
|
+
})
|
|
105
|
+
running.delete(fn)
|
|
106
|
+
|
|
107
|
+
next.forEach(fn => run(fn))
|
|
108
|
+
return true
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const reserve = (paths, fn) => {
|
|
112
|
+
// collide on matches across case and unicode normalization
|
|
113
|
+
// On windows, thanks to the magic of 8.3 shortnames, it is fundamentally
|
|
114
|
+
// impossible to determine whether two paths refer to the same thing on
|
|
115
|
+
// disk, without asking the kernel for a shortname.
|
|
116
|
+
// So, we just pretend that every path matches every other path here,
|
|
117
|
+
// effectively removing all parallelization on windows.
|
|
118
|
+
paths = isWindows ? ['win32 parallelization disabled'] : paths.map(p => {
|
|
119
|
+
return stripSlashes(normPath(join(p)))
|
|
120
|
+
.normalize('NFKD')
|
|
121
|
+
.toLowerCase()
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
const dirs = new Set(
|
|
125
|
+
paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))
|
|
126
|
+
)
|
|
127
|
+
reservations.set(fn, {dirs, paths})
|
|
128
|
+
paths.forEach(path => {
|
|
129
|
+
const q = queues.get(path)
|
|
130
|
+
if (!q)
|
|
131
|
+
queues.set(path, [fn])
|
|
132
|
+
else
|
|
133
|
+
q.push(fn)
|
|
134
|
+
})
|
|
135
|
+
dirs.forEach(dir => {
|
|
136
|
+
const q = queues.get(dir)
|
|
137
|
+
if (!q)
|
|
138
|
+
queues.set(dir, [new Set([fn])])
|
|
139
|
+
else if (q[q.length-1] instanceof Set)
|
|
140
|
+
q[q.length-1].add(fn)
|
|
141
|
+
else
|
|
142
|
+
q.push(new Set([fn]))
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
return run(fn)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return { check, reserve }
|
|
149
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
const types = require('./types.js')
|
|
3
3
|
const MiniPass = require('minipass')
|
|
4
|
+
const normPath = require('./normalize-windows-path.js')
|
|
4
5
|
|
|
5
6
|
const SLURP = Symbol('slurp')
|
|
6
7
|
module.exports = class ReadEntry extends MiniPass {
|
|
@@ -47,7 +48,7 @@ module.exports = class ReadEntry extends MiniPass {
|
|
|
47
48
|
this.ignore = true
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
this.path = header.path
|
|
51
|
+
this.path = normPath(header.path)
|
|
51
52
|
this.mode = header.mode
|
|
52
53
|
if (this.mode)
|
|
53
54
|
this.mode = this.mode & 0o7777
|
|
@@ -59,7 +60,7 @@ module.exports = class ReadEntry extends MiniPass {
|
|
|
59
60
|
this.mtime = header.mtime
|
|
60
61
|
this.atime = header.atime
|
|
61
62
|
this.ctime = header.ctime
|
|
62
|
-
this.linkpath = header.linkpath
|
|
63
|
+
this.linkpath = normPath(header.linkpath)
|
|
63
64
|
this.uname = header.uname
|
|
64
65
|
this.gname = header.gname
|
|
65
66
|
|
|
@@ -92,7 +93,7 @@ module.exports = class ReadEntry extends MiniPass {
|
|
|
92
93
|
// a global extended header, because that's weird.
|
|
93
94
|
if (ex[k] !== null && ex[k] !== undefined &&
|
|
94
95
|
!(global && k === 'path'))
|
|
95
|
-
this[k] = ex[k]
|
|
96
|
+
this[k] = k === 'path' || k === 'linkpath' ? normPath(ex[k]) : ex[k]
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// unix absolute paths are also absolute on win32, so we use this for both
|
|
2
|
+
const { isAbsolute, parse } = require('path').win32
|
|
3
|
+
|
|
4
|
+
// returns [root, stripped]
|
|
5
|
+
// Note that windows will think that //x/y/z/a has a "root" of //x/y, and in
|
|
6
|
+
// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip /
|
|
7
|
+
// explicitly if it's the first character.
|
|
8
|
+
// drive-specific relative paths on Windows get their root stripped off even
|
|
9
|
+
// though they are not absolute, so `c:../foo` becomes ['c:', '../foo']
|
|
10
|
+
module.exports = path => {
|
|
11
|
+
let r = ''
|
|
12
|
+
|
|
13
|
+
let parsed = parse(path)
|
|
14
|
+
while (isAbsolute(path) || parsed.root) {
|
|
15
|
+
// windows will think that //x/y/z has a "root" of //x/y/
|
|
16
|
+
// but strip the //?/C:/ off of //?/C:/path
|
|
17
|
+
const root = path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ? '/'
|
|
18
|
+
: parsed.root
|
|
19
|
+
path = path.substr(root.length)
|
|
20
|
+
r += root
|
|
21
|
+
parsed = parse(path)
|
|
22
|
+
}
|
|
23
|
+
return [r, path]
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// this is the only approach that was significantly faster than using
|
|
2
|
+
// str.replace(/\/+$/, '') for strings ending with a lot of / chars and
|
|
3
|
+
// containing multiple / chars.
|
|
4
|
+
const batchStrings = [
|
|
5
|
+
'/'.repeat(1024),
|
|
6
|
+
'/'.repeat(512),
|
|
7
|
+
'/'.repeat(256),
|
|
8
|
+
'/'.repeat(128),
|
|
9
|
+
'/'.repeat(64),
|
|
10
|
+
'/'.repeat(32),
|
|
11
|
+
'/'.repeat(16),
|
|
12
|
+
'/'.repeat(8),
|
|
13
|
+
'/'.repeat(4),
|
|
14
|
+
'/'.repeat(2),
|
|
15
|
+
'/',
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
module.exports = str => {
|
|
19
|
+
for (const s of batchStrings) {
|
|
20
|
+
while (str.length >= s.length && str.slice(-1 * s.length) === s)
|
|
21
|
+
str = str.slice(0, -1 * s.length)
|
|
22
|
+
}
|
|
23
|
+
return str
|
|
24
|
+
}
|