step-node-agent 3.16.3 → 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/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 +37 -0
- package/node_modules/is-core-module/core.json +65 -61
- package/node_modules/is-core-module/index.js +1 -1
- package/node_modules/is-core-module/package.json +11 -10
- 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/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 +167 -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
|
@@ -6,8 +6,16 @@ const Header = require('./header.js')
|
|
|
6
6
|
const ReadEntry = require('./read-entry.js')
|
|
7
7
|
const fs = require('fs')
|
|
8
8
|
const path = require('path')
|
|
9
|
+
const normPath = require('./normalize-windows-path.js')
|
|
10
|
+
const stripSlash = require('./strip-trailing-slashes.js')
|
|
11
|
+
|
|
12
|
+
const prefixPath = (path, prefix) => {
|
|
13
|
+
if (!prefix)
|
|
14
|
+
return path
|
|
15
|
+
path = normPath(path).replace(/^\.(\/|$)/, '')
|
|
16
|
+
return stripSlash(prefix) + '/' + path
|
|
17
|
+
}
|
|
9
18
|
|
|
10
|
-
const types = require('./types.js')
|
|
11
19
|
const maxReadSize = 16 * 1024 * 1024
|
|
12
20
|
const PROCESS = Symbol('process')
|
|
13
21
|
const FILE = Symbol('file')
|
|
@@ -24,8 +32,13 @@ const OPENFILE = Symbol('openfile')
|
|
|
24
32
|
const ONOPENFILE = Symbol('onopenfile')
|
|
25
33
|
const CLOSE = Symbol('close')
|
|
26
34
|
const MODE = Symbol('mode')
|
|
35
|
+
const AWAITDRAIN = Symbol('awaitDrain')
|
|
36
|
+
const ONDRAIN = Symbol('ondrain')
|
|
37
|
+
const PREFIX = Symbol('prefix')
|
|
38
|
+
const HAD_ERROR = Symbol('hadError')
|
|
27
39
|
const warner = require('./warn-mixin.js')
|
|
28
40
|
const winchars = require('./winchars.js')
|
|
41
|
+
const stripAbsolutePath = require('./strip-absolute-path.js')
|
|
29
42
|
|
|
30
43
|
const modeFix = require('./mode-fix.js')
|
|
31
44
|
|
|
@@ -35,40 +48,52 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
35
48
|
super(opt)
|
|
36
49
|
if (typeof p !== 'string')
|
|
37
50
|
throw new TypeError('path is required')
|
|
38
|
-
this.path = p
|
|
51
|
+
this.path = normPath(p)
|
|
39
52
|
// suppress atime, ctime, uid, gid, uname, gname
|
|
40
53
|
this.portable = !!opt.portable
|
|
41
54
|
// until node has builtin pwnam functions, this'll have to do
|
|
42
|
-
this.myuid = process.getuid && process.getuid()
|
|
55
|
+
this.myuid = process.getuid && process.getuid() || 0
|
|
43
56
|
this.myuser = process.env.USER || ''
|
|
44
57
|
this.maxReadSize = opt.maxReadSize || maxReadSize
|
|
45
58
|
this.linkCache = opt.linkCache || new Map()
|
|
46
59
|
this.statCache = opt.statCache || new Map()
|
|
47
60
|
this.preservePaths = !!opt.preservePaths
|
|
48
|
-
this.cwd = opt.cwd || process.cwd()
|
|
61
|
+
this.cwd = normPath(opt.cwd || process.cwd())
|
|
49
62
|
this.strict = !!opt.strict
|
|
50
63
|
this.noPax = !!opt.noPax
|
|
51
64
|
this.noMtime = !!opt.noMtime
|
|
52
65
|
this.mtime = opt.mtime || null
|
|
66
|
+
this.prefix = opt.prefix ? normPath(opt.prefix) : null
|
|
67
|
+
|
|
68
|
+
this.fd = null
|
|
69
|
+
this.blockLen = null
|
|
70
|
+
this.blockRemain = null
|
|
71
|
+
this.buf = null
|
|
72
|
+
this.offset = null
|
|
73
|
+
this.length = null
|
|
74
|
+
this.pos = null
|
|
75
|
+
this.remain = null
|
|
53
76
|
|
|
54
77
|
if (typeof opt.onwarn === 'function')
|
|
55
78
|
this.on('warn', opt.onwarn)
|
|
56
79
|
|
|
57
|
-
if (!this.preservePaths
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
80
|
+
if (!this.preservePaths) {
|
|
81
|
+
const s = stripAbsolutePath(this.path)
|
|
82
|
+
if (s[0]) {
|
|
83
|
+
this.warn('stripping ' + s[0] + ' from absolute path', this.path)
|
|
84
|
+
this.path = s[1]
|
|
85
|
+
}
|
|
63
86
|
}
|
|
64
87
|
|
|
65
88
|
this.win32 = !!opt.win32 || process.platform === 'win32'
|
|
66
89
|
if (this.win32) {
|
|
90
|
+
// force the \ to / normalization, since we might not *actually*
|
|
91
|
+
// be on windows, but want \ to be considered a path separator.
|
|
67
92
|
this.path = winchars.decode(this.path.replace(/\\/g, '/'))
|
|
68
93
|
p = p.replace(/\\/g, '/')
|
|
69
94
|
}
|
|
70
95
|
|
|
71
|
-
this.absolute = opt.absolute || path.resolve(this.cwd, p)
|
|
96
|
+
this.absolute = normPath(opt.absolute || path.resolve(this.cwd, p))
|
|
72
97
|
|
|
73
98
|
if (this.path === '')
|
|
74
99
|
this.path = './'
|
|
@@ -79,6 +104,12 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
79
104
|
this[LSTAT]()
|
|
80
105
|
}
|
|
81
106
|
|
|
107
|
+
emit (ev, ...data) {
|
|
108
|
+
if (ev === 'error')
|
|
109
|
+
this[HAD_ERROR] = true
|
|
110
|
+
return super.emit(ev, ...data)
|
|
111
|
+
}
|
|
112
|
+
|
|
82
113
|
[LSTAT] () {
|
|
83
114
|
fs.lstat(this.absolute, (er, stat) => {
|
|
84
115
|
if (er)
|
|
@@ -111,13 +142,19 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
111
142
|
return modeFix(mode, this.type === 'Directory')
|
|
112
143
|
}
|
|
113
144
|
|
|
145
|
+
[PREFIX] (path) {
|
|
146
|
+
return prefixPath(path, this.prefix)
|
|
147
|
+
}
|
|
148
|
+
|
|
114
149
|
[HEADER] () {
|
|
115
150
|
if (this.type === 'Directory' && this.portable)
|
|
116
151
|
this.noMtime = true
|
|
117
152
|
|
|
118
153
|
this.header = new Header({
|
|
119
|
-
path: this.path,
|
|
120
|
-
|
|
154
|
+
path: this[PREFIX](this.path),
|
|
155
|
+
// only apply the prefix to hard links.
|
|
156
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
157
|
+
: this.linkpath,
|
|
121
158
|
// only the permissions and setuid/setgid/sticky bitflags
|
|
122
159
|
// not the higher-order bits that specify file type
|
|
123
160
|
mode: this[MODE](this.stat.mode),
|
|
@@ -132,14 +169,15 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
132
169
|
ctime: this.portable ? null : this.stat.ctime
|
|
133
170
|
})
|
|
134
171
|
|
|
135
|
-
if (this.header.encode() && !this.noPax)
|
|
136
|
-
|
|
172
|
+
if (this.header.encode() && !this.noPax) {
|
|
173
|
+
super.write(new Pax({
|
|
137
174
|
atime: this.portable ? null : this.header.atime,
|
|
138
175
|
ctime: this.portable ? null : this.header.ctime,
|
|
139
176
|
gid: this.portable ? null : this.header.gid,
|
|
140
177
|
mtime: this.noMtime ? null : this.mtime || this.header.mtime,
|
|
141
|
-
path: this.path,
|
|
142
|
-
linkpath: this.linkpath
|
|
178
|
+
path: this[PREFIX](this.path),
|
|
179
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
180
|
+
: this.linkpath,
|
|
143
181
|
size: this.header.size,
|
|
144
182
|
uid: this.portable ? null : this.header.uid,
|
|
145
183
|
uname: this.portable ? null : this.header.uname,
|
|
@@ -147,7 +185,8 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
147
185
|
ino: this.portable ? null : this.stat.ino,
|
|
148
186
|
nlink: this.portable ? null : this.stat.nlink
|
|
149
187
|
}).encode())
|
|
150
|
-
|
|
188
|
+
}
|
|
189
|
+
super.write(this.header.block)
|
|
151
190
|
}
|
|
152
191
|
|
|
153
192
|
[DIRECTORY] () {
|
|
@@ -167,14 +206,14 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
167
206
|
}
|
|
168
207
|
|
|
169
208
|
[ONREADLINK] (linkpath) {
|
|
170
|
-
this.linkpath = linkpath
|
|
209
|
+
this.linkpath = normPath(linkpath)
|
|
171
210
|
this[HEADER]()
|
|
172
211
|
this.end()
|
|
173
212
|
}
|
|
174
213
|
|
|
175
214
|
[HARDLINK] (linkpath) {
|
|
176
215
|
this.type = 'Link'
|
|
177
|
-
this.linkpath = path.relative(this.cwd, linkpath)
|
|
216
|
+
this.linkpath = normPath(path.relative(this.cwd, linkpath))
|
|
178
217
|
this.stat.size = 0
|
|
179
218
|
this[HEADER]()
|
|
180
219
|
this.end()
|
|
@@ -207,75 +246,111 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
207
246
|
}
|
|
208
247
|
|
|
209
248
|
[ONOPENFILE] (fd) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
249
|
+
this.fd = fd
|
|
250
|
+
if (this[HAD_ERROR])
|
|
251
|
+
return this[CLOSE]()
|
|
252
|
+
|
|
253
|
+
this.blockLen = 512 * Math.ceil(this.stat.size / 512)
|
|
254
|
+
this.blockRemain = this.blockLen
|
|
255
|
+
const bufLen = Math.min(this.blockLen, this.maxReadSize)
|
|
256
|
+
this.buf = Buffer.allocUnsafe(bufLen)
|
|
257
|
+
this.offset = 0
|
|
258
|
+
this.pos = 0
|
|
259
|
+
this.remain = this.stat.size
|
|
260
|
+
this.length = this.buf.length
|
|
261
|
+
this[READ]()
|
|
214
262
|
}
|
|
215
263
|
|
|
216
|
-
[READ] (
|
|
264
|
+
[READ] () {
|
|
265
|
+
const { fd, buf, offset, length, pos } = this
|
|
217
266
|
fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {
|
|
218
|
-
if (er)
|
|
219
|
-
|
|
220
|
-
|
|
267
|
+
if (er) {
|
|
268
|
+
// ignoring the error from close(2) is a bad practice, but at
|
|
269
|
+
// this point we already have an error, don't need another one
|
|
270
|
+
return this[CLOSE](() => this.emit('error', er))
|
|
271
|
+
}
|
|
272
|
+
this[ONREAD](bytesRead)
|
|
221
273
|
})
|
|
222
274
|
}
|
|
223
275
|
|
|
224
|
-
[CLOSE] (
|
|
225
|
-
fs.close(fd, cb)
|
|
276
|
+
[CLOSE] (cb) {
|
|
277
|
+
fs.close(this.fd, cb)
|
|
226
278
|
}
|
|
227
279
|
|
|
228
|
-
[ONREAD] (
|
|
229
|
-
if (bytesRead <= 0 && remain > 0) {
|
|
280
|
+
[ONREAD] (bytesRead) {
|
|
281
|
+
if (bytesRead <= 0 && this.remain > 0) {
|
|
230
282
|
const er = new Error('encountered unexpected EOF')
|
|
231
283
|
er.path = this.absolute
|
|
232
284
|
er.syscall = 'read'
|
|
233
285
|
er.code = 'EOF'
|
|
234
|
-
this[CLOSE](
|
|
235
|
-
return this.emit('error', er)
|
|
286
|
+
return this[CLOSE](() => this.emit('error', er))
|
|
236
287
|
}
|
|
237
288
|
|
|
238
|
-
if (bytesRead > remain) {
|
|
289
|
+
if (bytesRead > this.remain) {
|
|
239
290
|
const er = new Error('did not encounter expected EOF')
|
|
240
291
|
er.path = this.absolute
|
|
241
292
|
er.syscall = 'read'
|
|
242
293
|
er.code = 'EOF'
|
|
243
|
-
this[CLOSE](
|
|
244
|
-
return this.emit('error', er)
|
|
294
|
+
return this[CLOSE](() => this.emit('error', er))
|
|
245
295
|
}
|
|
246
296
|
|
|
247
297
|
// null out the rest of the buffer, if we could fit the block padding
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
298
|
+
// at the end of this loop, we've incremented bytesRead and this.remain
|
|
299
|
+
// to be incremented up to the blockRemain level, as if we had expected
|
|
300
|
+
// to get a null-padded file, and read it until the end. then we will
|
|
301
|
+
// decrement both remain and blockRemain by bytesRead, and know that we
|
|
302
|
+
// reached the expected EOF, without any null buffer to append.
|
|
303
|
+
if (bytesRead === this.remain) {
|
|
304
|
+
for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) {
|
|
305
|
+
this.buf[i + this.offset] = 0
|
|
306
|
+
bytesRead++
|
|
307
|
+
this.remain++
|
|
253
308
|
}
|
|
254
309
|
}
|
|
255
310
|
|
|
256
|
-
const writeBuf = offset === 0 && bytesRead === buf.length ?
|
|
257
|
-
buf : buf.slice(offset, offset + bytesRead)
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
311
|
+
const writeBuf = this.offset === 0 && bytesRead === this.buf.length ?
|
|
312
|
+
this.buf : this.buf.slice(this.offset, this.offset + bytesRead)
|
|
313
|
+
|
|
314
|
+
const flushed = this.write(writeBuf)
|
|
315
|
+
if (!flushed)
|
|
316
|
+
this[AWAITDRAIN](() => this[ONDRAIN]())
|
|
317
|
+
else
|
|
318
|
+
this[ONDRAIN]()
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
[AWAITDRAIN] (cb) {
|
|
322
|
+
this.once('drain', cb)
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
write (writeBuf) {
|
|
326
|
+
if (this.blockRemain < writeBuf.length) {
|
|
327
|
+
const er = new Error('writing more data than expected')
|
|
328
|
+
er.path = this.absolute
|
|
329
|
+
return this.emit('error', er)
|
|
330
|
+
}
|
|
331
|
+
this.remain -= writeBuf.length
|
|
332
|
+
this.blockRemain -= writeBuf.length
|
|
333
|
+
this.pos += writeBuf.length
|
|
334
|
+
this.offset += writeBuf.length
|
|
335
|
+
return super.write(writeBuf)
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
[ONDRAIN] () {
|
|
339
|
+
if (!this.remain) {
|
|
340
|
+
if (this.blockRemain)
|
|
341
|
+
super.write(Buffer.alloc(this.blockRemain))
|
|
342
|
+
return this[CLOSE](/* istanbul ignore next - legacy */
|
|
343
|
+
er => er ? this.emit('error', er) : this.end())
|
|
271
344
|
}
|
|
272
345
|
|
|
273
|
-
if (offset >= length) {
|
|
274
|
-
|
|
275
|
-
|
|
346
|
+
if (this.offset >= this.length) {
|
|
347
|
+
// if we only have a smaller bit left to read, alloc a smaller buffer
|
|
348
|
+
// otherwise, keep it the same length it was before.
|
|
349
|
+
this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length))
|
|
350
|
+
this.offset = 0
|
|
276
351
|
}
|
|
277
|
-
length = buf.length - offset
|
|
278
|
-
this[READ](
|
|
352
|
+
this.length = this.buf.length - this.offset
|
|
353
|
+
this[READ]()
|
|
279
354
|
}
|
|
280
355
|
})
|
|
281
356
|
|
|
@@ -296,20 +371,31 @@ class WriteEntrySync extends WriteEntry {
|
|
|
296
371
|
this[ONOPENFILE](fs.openSync(this.absolute, 'r'))
|
|
297
372
|
}
|
|
298
373
|
|
|
299
|
-
[READ] (
|
|
374
|
+
[READ] () {
|
|
300
375
|
let threw = true
|
|
301
376
|
try {
|
|
377
|
+
const { fd, buf, offset, length, pos } = this
|
|
302
378
|
const bytesRead = fs.readSync(fd, buf, offset, length, pos)
|
|
303
|
-
this[ONREAD](
|
|
379
|
+
this[ONREAD](bytesRead)
|
|
304
380
|
threw = false
|
|
305
381
|
} finally {
|
|
306
|
-
|
|
307
|
-
|
|
382
|
+
// ignoring the error from close(2) is a bad practice, but at
|
|
383
|
+
// this point we already have an error, don't need another one
|
|
384
|
+
if (threw) {
|
|
385
|
+
try {
|
|
386
|
+
this[CLOSE](() => {})
|
|
387
|
+
} catch (er) {}
|
|
388
|
+
}
|
|
308
389
|
}
|
|
309
390
|
}
|
|
310
391
|
|
|
311
|
-
[
|
|
312
|
-
|
|
392
|
+
[AWAITDRAIN] (cb) {
|
|
393
|
+
cb()
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
[CLOSE] (cb) {
|
|
397
|
+
fs.closeSync(this.fd)
|
|
398
|
+
cb()
|
|
313
399
|
}
|
|
314
400
|
}
|
|
315
401
|
|
|
@@ -328,7 +414,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
328
414
|
if (this.type === 'Directory' && this.portable)
|
|
329
415
|
this.noMtime = true
|
|
330
416
|
|
|
331
|
-
this.
|
|
417
|
+
this.prefix = opt.prefix || null
|
|
418
|
+
|
|
419
|
+
this.path = normPath(readEntry.path)
|
|
332
420
|
this.mode = this[MODE](readEntry.mode)
|
|
333
421
|
this.uid = this.portable ? null : readEntry.uid
|
|
334
422
|
this.gid = this.portable ? null : readEntry.gid
|
|
@@ -338,26 +426,29 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
338
426
|
this.mtime = this.noMtime ? null : opt.mtime || readEntry.mtime
|
|
339
427
|
this.atime = this.portable ? null : readEntry.atime
|
|
340
428
|
this.ctime = this.portable ? null : readEntry.ctime
|
|
341
|
-
this.linkpath = readEntry.linkpath
|
|
429
|
+
this.linkpath = normPath(readEntry.linkpath)
|
|
342
430
|
|
|
343
431
|
if (typeof opt.onwarn === 'function')
|
|
344
432
|
this.on('warn', opt.onwarn)
|
|
345
433
|
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
434
|
+
if (!this.preservePaths) {
|
|
435
|
+
const s = stripAbsolutePath(this.path)
|
|
436
|
+
if (s[0]) {
|
|
437
|
+
this.warn(
|
|
438
|
+
'stripping ' + s[0] + ' from absolute path',
|
|
439
|
+
this.path
|
|
440
|
+
)
|
|
441
|
+
this.path = s[1]
|
|
442
|
+
}
|
|
353
443
|
}
|
|
354
444
|
|
|
355
445
|
this.remain = readEntry.size
|
|
356
446
|
this.blockRemain = readEntry.startBlockSize
|
|
357
447
|
|
|
358
448
|
this.header = new Header({
|
|
359
|
-
path: this.path,
|
|
360
|
-
linkpath: this.linkpath
|
|
449
|
+
path: this[PREFIX](this.path),
|
|
450
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
451
|
+
: this.linkpath,
|
|
361
452
|
// only the permissions and setuid/setgid/sticky bitflags
|
|
362
453
|
// not the higher-order bits that specify file type
|
|
363
454
|
mode: this.mode,
|
|
@@ -377,8 +468,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
377
468
|
ctime: this.portable ? null : this.ctime,
|
|
378
469
|
gid: this.portable ? null : this.gid,
|
|
379
470
|
mtime: this.noMtime ? null : this.mtime,
|
|
380
|
-
path: this.path,
|
|
381
|
-
linkpath: this.linkpath
|
|
471
|
+
path: this[PREFIX](this.path),
|
|
472
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
473
|
+
: this.linkpath,
|
|
382
474
|
size: this.size,
|
|
383
475
|
uid: this.portable ? null : this.uid,
|
|
384
476
|
uname: this.portable ? null : this.uname,
|
|
@@ -391,6 +483,10 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
391
483
|
readEntry.pipe(this)
|
|
392
484
|
}
|
|
393
485
|
|
|
486
|
+
[PREFIX] (path) {
|
|
487
|
+
return prefixPath(path, this.prefix)
|
|
488
|
+
}
|
|
489
|
+
|
|
394
490
|
[MODE] (mode) {
|
|
395
491
|
return modeFix(mode, this.type === 'Directory')
|
|
396
492
|
}
|
|
@@ -405,7 +501,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
405
501
|
|
|
406
502
|
end () {
|
|
407
503
|
if (this.blockRemain)
|
|
408
|
-
|
|
504
|
+
super.write(Buffer.alloc(this.blockRemain))
|
|
409
505
|
return super.end()
|
|
410
506
|
}
|
|
411
507
|
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Feross Aboukhadijeh
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|