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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var utils = require('./utils');
|
|
4
4
|
|
|
5
5
|
var has = Object.prototype.hasOwnProperty;
|
|
6
|
+
var isArray = Array.isArray;
|
|
6
7
|
|
|
7
8
|
var defaults = {
|
|
8
9
|
allowDots: false,
|
|
@@ -28,6 +29,14 @@ var interpretNumericEntities = function (str) {
|
|
|
28
29
|
});
|
|
29
30
|
};
|
|
30
31
|
|
|
32
|
+
var parseArrayValue = function (val, options) {
|
|
33
|
+
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
34
|
+
return val.split(',');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return val;
|
|
38
|
+
};
|
|
39
|
+
|
|
31
40
|
// This is what browsers will submit when the ✓ character occurs in an
|
|
32
41
|
// application/x-www-form-urlencoded body and the encoding of the page containing
|
|
33
42
|
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
|
@@ -72,19 +81,24 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
72
81
|
|
|
73
82
|
var key, val;
|
|
74
83
|
if (pos === -1) {
|
|
75
|
-
key = options.decoder(part, defaults.decoder, charset);
|
|
84
|
+
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
76
85
|
val = options.strictNullHandling ? null : '';
|
|
77
86
|
} else {
|
|
78
|
-
key = options.decoder(part.slice(0, pos), defaults.decoder, charset);
|
|
79
|
-
val =
|
|
87
|
+
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
88
|
+
val = utils.maybeMap(
|
|
89
|
+
parseArrayValue(part.slice(pos + 1), options),
|
|
90
|
+
function (encodedVal) {
|
|
91
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
92
|
+
}
|
|
93
|
+
);
|
|
80
94
|
}
|
|
81
95
|
|
|
82
96
|
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
83
97
|
val = interpretNumericEntities(val);
|
|
84
98
|
}
|
|
85
99
|
|
|
86
|
-
if (
|
|
87
|
-
val = val
|
|
100
|
+
if (part.indexOf('[]=') > -1) {
|
|
101
|
+
val = isArray(val) ? [val] : val;
|
|
88
102
|
}
|
|
89
103
|
|
|
90
104
|
if (has.call(obj, key)) {
|
|
@@ -97,8 +111,8 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
97
111
|
return obj;
|
|
98
112
|
};
|
|
99
113
|
|
|
100
|
-
var parseObject = function (chain, val, options) {
|
|
101
|
-
var leaf = val;
|
|
114
|
+
var parseObject = function (chain, val, options, valuesParsed) {
|
|
115
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
|
102
116
|
|
|
103
117
|
for (var i = chain.length - 1; i >= 0; --i) {
|
|
104
118
|
var obj;
|
|
@@ -132,7 +146,7 @@ var parseObject = function (chain, val, options) {
|
|
|
132
146
|
return leaf;
|
|
133
147
|
};
|
|
134
148
|
|
|
135
|
-
var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
|
|
149
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
136
150
|
if (!givenKey) {
|
|
137
151
|
return;
|
|
138
152
|
}
|
|
@@ -147,7 +161,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
|
|
|
147
161
|
|
|
148
162
|
// Get the parent
|
|
149
163
|
|
|
150
|
-
var segment = brackets.exec(key);
|
|
164
|
+
var segment = options.depth > 0 && brackets.exec(key);
|
|
151
165
|
var parent = segment ? key.slice(0, segment.index) : key;
|
|
152
166
|
|
|
153
167
|
// Stash the parent if it exists
|
|
@@ -167,7 +181,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
|
|
|
167
181
|
// Loop through children appending to the array until we hit depth
|
|
168
182
|
|
|
169
183
|
var i = 0;
|
|
170
|
-
while ((segment = child.exec(key)) !== null && i < options.depth) {
|
|
184
|
+
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
|
171
185
|
i += 1;
|
|
172
186
|
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
173
187
|
if (!options.allowPrototypes) {
|
|
@@ -183,7 +197,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
|
|
|
183
197
|
keys.push('[' + key.slice(segment.index) + ']');
|
|
184
198
|
}
|
|
185
199
|
|
|
186
|
-
return parseObject(keys, val, options);
|
|
200
|
+
return parseObject(keys, val, options, valuesParsed);
|
|
187
201
|
};
|
|
188
202
|
|
|
189
203
|
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
@@ -196,7 +210,7 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
196
210
|
}
|
|
197
211
|
|
|
198
212
|
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
199
|
-
throw new
|
|
213
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
200
214
|
}
|
|
201
215
|
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
202
216
|
|
|
@@ -209,7 +223,8 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
209
223
|
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
|
210
224
|
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
|
211
225
|
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
212
|
-
|
|
226
|
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
227
|
+
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
|
213
228
|
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
214
229
|
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
215
230
|
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
@@ -234,7 +249,7 @@ module.exports = function (str, opts) {
|
|
|
234
249
|
var keys = Object.keys(tempObj);
|
|
235
250
|
for (var i = 0; i < keys.length; ++i) {
|
|
236
251
|
var key = keys[i];
|
|
237
|
-
var newObj = parseKeys(key, tempObj[key], options);
|
|
252
|
+
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
|
238
253
|
obj = utils.merge(obj, newObj, options);
|
|
239
254
|
}
|
|
240
255
|
|
|
@@ -5,14 +5,14 @@ var formats = require('./formats');
|
|
|
5
5
|
var has = Object.prototype.hasOwnProperty;
|
|
6
6
|
|
|
7
7
|
var arrayPrefixGenerators = {
|
|
8
|
-
brackets: function brackets(prefix) {
|
|
8
|
+
brackets: function brackets(prefix) {
|
|
9
9
|
return prefix + '[]';
|
|
10
10
|
},
|
|
11
11
|
comma: 'comma',
|
|
12
|
-
indices: function indices(prefix, key) {
|
|
12
|
+
indices: function indices(prefix, key) {
|
|
13
13
|
return prefix + '[' + key + ']';
|
|
14
14
|
},
|
|
15
|
-
repeat: function repeat(prefix) {
|
|
15
|
+
repeat: function repeat(prefix) {
|
|
16
16
|
return prefix;
|
|
17
17
|
}
|
|
18
18
|
};
|
|
@@ -25,6 +25,7 @@ var pushToArray = function (arr, valueOrArray) {
|
|
|
25
25
|
|
|
26
26
|
var toISO = Date.prototype.toISOString;
|
|
27
27
|
|
|
28
|
+
var defaultFormat = formats['default'];
|
|
28
29
|
var defaults = {
|
|
29
30
|
addQueryPrefix: false,
|
|
30
31
|
allowDots: false,
|
|
@@ -34,17 +35,26 @@ var defaults = {
|
|
|
34
35
|
encode: true,
|
|
35
36
|
encoder: utils.encode,
|
|
36
37
|
encodeValuesOnly: false,
|
|
37
|
-
|
|
38
|
+
format: defaultFormat,
|
|
39
|
+
formatter: formats.formatters[defaultFormat],
|
|
38
40
|
// deprecated
|
|
39
41
|
indices: false,
|
|
40
|
-
serializeDate: function serializeDate(date) {
|
|
42
|
+
serializeDate: function serializeDate(date) {
|
|
41
43
|
return toISO.call(date);
|
|
42
44
|
},
|
|
43
45
|
skipNulls: false,
|
|
44
46
|
strictNullHandling: false
|
|
45
47
|
};
|
|
46
48
|
|
|
47
|
-
var
|
|
49
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
50
|
+
return typeof v === 'string'
|
|
51
|
+
|| typeof v === 'number'
|
|
52
|
+
|| typeof v === 'boolean'
|
|
53
|
+
|| typeof v === 'symbol'
|
|
54
|
+
|| typeof v === 'bigint';
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var stringify = function stringify(
|
|
48
58
|
object,
|
|
49
59
|
prefix,
|
|
50
60
|
generateArrayPrefix,
|
|
@@ -55,6 +65,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|
|
55
65
|
sort,
|
|
56
66
|
allowDots,
|
|
57
67
|
serializeDate,
|
|
68
|
+
format,
|
|
58
69
|
formatter,
|
|
59
70
|
encodeValuesOnly,
|
|
60
71
|
charset
|
|
@@ -65,21 +76,26 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|
|
65
76
|
} else if (obj instanceof Date) {
|
|
66
77
|
obj = serializeDate(obj);
|
|
67
78
|
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
68
|
-
obj =
|
|
79
|
+
obj = utils.maybeMap(obj, function (value) {
|
|
80
|
+
if (value instanceof Date) {
|
|
81
|
+
return serializeDate(value);
|
|
82
|
+
}
|
|
83
|
+
return value;
|
|
84
|
+
});
|
|
69
85
|
}
|
|
70
86
|
|
|
71
87
|
if (obj === null) {
|
|
72
88
|
if (strictNullHandling) {
|
|
73
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset) : prefix;
|
|
89
|
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
|
|
74
90
|
}
|
|
75
91
|
|
|
76
92
|
obj = '';
|
|
77
93
|
}
|
|
78
94
|
|
|
79
|
-
if (
|
|
95
|
+
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
80
96
|
if (encoder) {
|
|
81
|
-
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset);
|
|
82
|
-
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset))];
|
|
97
|
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
|
|
98
|
+
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
|
83
99
|
}
|
|
84
100
|
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
85
101
|
}
|
|
@@ -91,7 +107,10 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|
|
91
107
|
}
|
|
92
108
|
|
|
93
109
|
var objKeys;
|
|
94
|
-
if (isArray(
|
|
110
|
+
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
111
|
+
// we need to join elements in
|
|
112
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
|
|
113
|
+
} else if (isArray(filter)) {
|
|
95
114
|
objKeys = filter;
|
|
96
115
|
} else {
|
|
97
116
|
var keys = Object.keys(obj);
|
|
@@ -100,44 +119,32 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|
|
100
119
|
|
|
101
120
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
102
121
|
var key = objKeys[i];
|
|
122
|
+
var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
|
|
103
123
|
|
|
104
|
-
if (skipNulls &&
|
|
124
|
+
if (skipNulls && value === null) {
|
|
105
125
|
continue;
|
|
106
126
|
}
|
|
107
127
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
generateArrayPrefix,
|
|
129
|
-
strictNullHandling,
|
|
130
|
-
skipNulls,
|
|
131
|
-
encoder,
|
|
132
|
-
filter,
|
|
133
|
-
sort,
|
|
134
|
-
allowDots,
|
|
135
|
-
serializeDate,
|
|
136
|
-
formatter,
|
|
137
|
-
encodeValuesOnly,
|
|
138
|
-
charset
|
|
139
|
-
));
|
|
140
|
-
}
|
|
128
|
+
var keyPrefix = isArray(obj)
|
|
129
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
|
|
130
|
+
: prefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
131
|
+
|
|
132
|
+
pushToArray(values, stringify(
|
|
133
|
+
value,
|
|
134
|
+
keyPrefix,
|
|
135
|
+
generateArrayPrefix,
|
|
136
|
+
strictNullHandling,
|
|
137
|
+
skipNulls,
|
|
138
|
+
encoder,
|
|
139
|
+
filter,
|
|
140
|
+
sort,
|
|
141
|
+
allowDots,
|
|
142
|
+
serializeDate,
|
|
143
|
+
format,
|
|
144
|
+
formatter,
|
|
145
|
+
encodeValuesOnly,
|
|
146
|
+
charset
|
|
147
|
+
));
|
|
141
148
|
}
|
|
142
149
|
|
|
143
150
|
return values;
|
|
@@ -181,6 +188,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
|
181
188
|
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
|
182
189
|
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
|
183
190
|
filter: filter,
|
|
191
|
+
format: format,
|
|
184
192
|
formatter: formatter,
|
|
185
193
|
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
|
186
194
|
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
|
@@ -246,6 +254,7 @@ module.exports = function (object, opts) {
|
|
|
246
254
|
options.sort,
|
|
247
255
|
options.allowDots,
|
|
248
256
|
options.serializeDate,
|
|
257
|
+
options.format,
|
|
249
258
|
options.formatter,
|
|
250
259
|
options.encodeValuesOnly,
|
|
251
260
|
options.charset
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var formats = require('./formats');
|
|
4
|
+
|
|
3
5
|
var has = Object.prototype.hasOwnProperty;
|
|
4
6
|
var isArray = Array.isArray;
|
|
5
7
|
|
|
@@ -43,6 +45,7 @@ var arrayToObject = function arrayToObject(source, options) {
|
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
var merge = function merge(target, source, options) {
|
|
48
|
+
/* eslint no-param-reassign: 0 */
|
|
46
49
|
if (!source) {
|
|
47
50
|
return target;
|
|
48
51
|
}
|
|
@@ -119,14 +122,19 @@ var decode = function (str, decoder, charset) {
|
|
|
119
122
|
}
|
|
120
123
|
};
|
|
121
124
|
|
|
122
|
-
var encode = function encode(str, defaultEncoder, charset) {
|
|
125
|
+
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
123
126
|
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
124
127
|
// It has been adapted here for stricter adherence to RFC 3986
|
|
125
128
|
if (str.length === 0) {
|
|
126
129
|
return str;
|
|
127
130
|
}
|
|
128
131
|
|
|
129
|
-
var string =
|
|
132
|
+
var string = str;
|
|
133
|
+
if (typeof str === 'symbol') {
|
|
134
|
+
string = Symbol.prototype.toString.call(str);
|
|
135
|
+
} else if (typeof str !== 'string') {
|
|
136
|
+
string = String(str);
|
|
137
|
+
}
|
|
130
138
|
|
|
131
139
|
if (charset === 'iso-8859-1') {
|
|
132
140
|
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
@@ -146,6 +154,7 @@ var encode = function encode(str, defaultEncoder, charset) {
|
|
|
146
154
|
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
147
155
|
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
148
156
|
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
157
|
+
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
149
158
|
) {
|
|
150
159
|
out += string.charAt(i);
|
|
151
160
|
continue;
|
|
@@ -217,6 +226,17 @@ var combine = function combine(a, b) {
|
|
|
217
226
|
return [].concat(a, b);
|
|
218
227
|
};
|
|
219
228
|
|
|
229
|
+
var maybeMap = function maybeMap(val, fn) {
|
|
230
|
+
if (isArray(val)) {
|
|
231
|
+
var mapped = [];
|
|
232
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
233
|
+
mapped.push(fn(val[i]));
|
|
234
|
+
}
|
|
235
|
+
return mapped;
|
|
236
|
+
}
|
|
237
|
+
return fn(val);
|
|
238
|
+
};
|
|
239
|
+
|
|
220
240
|
module.exports = {
|
|
221
241
|
arrayToObject: arrayToObject,
|
|
222
242
|
assign: assign,
|
|
@@ -226,5 +246,6 @@ module.exports = {
|
|
|
226
246
|
encode: encode,
|
|
227
247
|
isBuffer: isBuffer,
|
|
228
248
|
isRegExp: isRegExp,
|
|
249
|
+
maybeMap: maybeMap,
|
|
229
250
|
merge: merge
|
|
230
251
|
};
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
"name": "qs",
|
|
3
3
|
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
|
|
4
4
|
"homepage": "https://github.com/ljharb/qs",
|
|
5
|
-
"version": "6.
|
|
5
|
+
"version": "6.9.6",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/ljharb/qs.git"
|
|
9
9
|
},
|
|
10
|
+
"funding": {
|
|
11
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
12
|
+
},
|
|
10
13
|
"main": "lib/index.js",
|
|
11
14
|
"contributors": [
|
|
12
15
|
{
|
|
@@ -28,35 +31,43 @@
|
|
|
28
31
|
},
|
|
29
32
|
"dependencies": {},
|
|
30
33
|
"devDependencies": {
|
|
31
|
-
"@ljharb/eslint-config": "^
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"eslint": "^
|
|
36
|
-
"evalmd": "^0.0.
|
|
34
|
+
"@ljharb/eslint-config": "^17.3.0",
|
|
35
|
+
"aud": "^1.1.3",
|
|
36
|
+
"browserify": "^16.5.2",
|
|
37
|
+
"eclint": "^2.8.1",
|
|
38
|
+
"eslint": "^7.17.0",
|
|
39
|
+
"evalmd": "^0.0.19",
|
|
37
40
|
"for-each": "^0.3.3",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
+
"has-symbols": "^1.0.1",
|
|
42
|
+
"iconv-lite": "^0.5.1",
|
|
43
|
+
"mkdirp": "^0.5.5",
|
|
44
|
+
"nyc": "^10.3.2",
|
|
45
|
+
"object-inspect": "^1.9.0",
|
|
41
46
|
"qs-iconv": "^1.0.4",
|
|
42
|
-
"safe-publish-latest": "^1.1.
|
|
47
|
+
"safe-publish-latest": "^1.1.4",
|
|
43
48
|
"safer-buffer": "^2.1.2",
|
|
44
|
-
"tape": "^
|
|
49
|
+
"tape": "^5.1.1"
|
|
45
50
|
},
|
|
46
51
|
"scripts": {
|
|
47
52
|
"prepublish": "safe-publish-latest && npm run dist",
|
|
48
53
|
"pretest": "npm run --silent readme && npm run --silent lint",
|
|
49
|
-
"test": "npm run
|
|
50
|
-
"tests-only": "
|
|
54
|
+
"test": "npm run tests-only",
|
|
55
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
56
|
+
"posttest": "aud --production",
|
|
51
57
|
"readme": "evalmd README.md",
|
|
52
|
-
"postlint": "
|
|
58
|
+
"postlint": "eclint check * lib/* test/*",
|
|
53
59
|
"lint": "eslint lib/*.js test/*.js",
|
|
54
|
-
"coverage": "covert test",
|
|
55
60
|
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"
|
|
56
61
|
},
|
|
57
|
-
"license": "BSD-3-Clause"
|
|
62
|
+
"license": "BSD-3-Clause",
|
|
63
|
+
"greenkeeper": {
|
|
64
|
+
"ignore": [
|
|
65
|
+
"iconv-lite",
|
|
66
|
+
"mkdirp"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
58
69
|
|
|
59
|
-
,"_resolved": "https://registry.npmjs.org/qs/-/qs-6.
|
|
60
|
-
,"_integrity": "sha512-
|
|
61
|
-
,"_from": "qs@6.
|
|
70
|
+
,"_resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz"
|
|
71
|
+
,"_integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ=="
|
|
72
|
+
,"_from": "qs@6.9.6"
|
|
62
73
|
}
|
|
@@ -32,6 +32,38 @@ test('parse()', function (t) {
|
|
|
32
32
|
st.end();
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
t.test('arrayFormat: brackets allows only explicit arrays', function (st) {
|
|
36
|
+
st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] });
|
|
37
|
+
st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] });
|
|
38
|
+
st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'brackets' }), { a: 'b,c' });
|
|
39
|
+
st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] });
|
|
40
|
+
st.end();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
t.test('arrayFormat: indices allows only indexed arrays', function (st) {
|
|
44
|
+
st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] });
|
|
45
|
+
st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] });
|
|
46
|
+
st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'indices' }), { a: 'b,c' });
|
|
47
|
+
st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] });
|
|
48
|
+
st.end();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
t.test('arrayFormat: comma allows only comma-separated arrays', function (st) {
|
|
52
|
+
st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] });
|
|
53
|
+
st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] });
|
|
54
|
+
st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'comma' }), { a: 'b,c' });
|
|
55
|
+
st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] });
|
|
56
|
+
st.end();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
t.test('arrayFormat: repeat allows only repeated values', function (st) {
|
|
60
|
+
st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] });
|
|
61
|
+
st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] });
|
|
62
|
+
st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'repeat' }), { a: 'b,c' });
|
|
63
|
+
st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] });
|
|
64
|
+
st.end();
|
|
65
|
+
});
|
|
66
|
+
|
|
35
67
|
t.test('allows enabling dot notation', function (st) {
|
|
36
68
|
st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' });
|
|
37
69
|
st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } });
|
|
@@ -52,6 +84,18 @@ test('parse()', function (t) {
|
|
|
52
84
|
st.end();
|
|
53
85
|
});
|
|
54
86
|
|
|
87
|
+
t.test('uses original key when depth = 0', function (st) {
|
|
88
|
+
st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: 0 }), { 'a[0]': 'b', 'a[1]': 'c' });
|
|
89
|
+
st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: 0 }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' });
|
|
90
|
+
st.end();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
t.test('uses original key when depth = false', function (st) {
|
|
94
|
+
st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' });
|
|
95
|
+
st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' });
|
|
96
|
+
st.end();
|
|
97
|
+
});
|
|
98
|
+
|
|
55
99
|
t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array');
|
|
56
100
|
|
|
57
101
|
t.test('parses an explicit array', function (st) {
|
|
@@ -356,6 +400,43 @@ test('parse()', function (t) {
|
|
|
356
400
|
st.end();
|
|
357
401
|
});
|
|
358
402
|
|
|
403
|
+
t.test('parses values with comma as array divider', function (st) {
|
|
404
|
+
st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: false }), { foo: 'bar,tee' });
|
|
405
|
+
st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: true }), { foo: ['bar', 'tee'] });
|
|
406
|
+
st.end();
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
t.test('use number decoder, parses string that has one number with comma option enabled', function (st) {
|
|
410
|
+
var decoder = function (str, defaultDecoder, charset, type) {
|
|
411
|
+
if (!isNaN(Number(str))) {
|
|
412
|
+
return parseFloat(str);
|
|
413
|
+
}
|
|
414
|
+
return defaultDecoder(str, defaultDecoder, charset, type);
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
st.deepEqual(qs.parse('foo=1', { comma: true, decoder: decoder }), { foo: 1 });
|
|
418
|
+
st.deepEqual(qs.parse('foo=0', { comma: true, decoder: decoder }), { foo: 0 });
|
|
419
|
+
|
|
420
|
+
st.end();
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
t.test('parses brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) {
|
|
424
|
+
st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] });
|
|
425
|
+
st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=', { comma: true }), { foo: [['1', '2', '3'], ''] });
|
|
426
|
+
st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] });
|
|
427
|
+
st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] });
|
|
428
|
+
|
|
429
|
+
st.end();
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
t.test('parses comma delimited array while having percent-encoded comma treated as normal text', function (st) {
|
|
433
|
+
st.deepEqual(qs.parse('foo=a%2Cb', { comma: true }), { foo: 'a,b' });
|
|
434
|
+
st.deepEqual(qs.parse('foo=a%2C%20b,d', { comma: true }), { foo: ['a, b', 'd'] });
|
|
435
|
+
st.deepEqual(qs.parse('foo=a%2C%20b,c%2C%20d', { comma: true }), { foo: ['a, b', 'c, d'] });
|
|
436
|
+
|
|
437
|
+
st.end();
|
|
438
|
+
});
|
|
439
|
+
|
|
359
440
|
t.test('parses an object in dot notation', function (st) {
|
|
360
441
|
var input = {
|
|
361
442
|
'user.name': { 'pop[bob]': 3 },
|
|
@@ -532,7 +613,7 @@ test('parse()', function (t) {
|
|
|
532
613
|
|
|
533
614
|
st.deepEqual(
|
|
534
615
|
qs.parse('a[b]=c&a=toString', { plainObjects: true }),
|
|
535
|
-
{ a: { b: 'c', toString: true } },
|
|
616
|
+
{ __proto__: null, a: { __proto__: null, b: 'c', toString: true } },
|
|
536
617
|
'can overwrite prototype with plainObjects true'
|
|
537
618
|
);
|
|
538
619
|
|
|
@@ -672,5 +753,20 @@ test('parse()', function (t) {
|
|
|
672
753
|
st.end();
|
|
673
754
|
});
|
|
674
755
|
|
|
756
|
+
t.test('allows for decoding keys and values differently', function (st) {
|
|
757
|
+
var decoder = function (str, defaultDecoder, charset, type) {
|
|
758
|
+
if (type === 'key') {
|
|
759
|
+
return defaultDecoder(str, defaultDecoder, charset, type).toLowerCase();
|
|
760
|
+
}
|
|
761
|
+
if (type === 'value') {
|
|
762
|
+
return defaultDecoder(str, defaultDecoder, charset, type).toUpperCase();
|
|
763
|
+
}
|
|
764
|
+
throw 'this should never happen! type: ' + type;
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
st.deepEqual(qs.parse('KeY=vAlUe', { decoder: decoder }), { key: 'VALUE' });
|
|
768
|
+
st.end();
|
|
769
|
+
});
|
|
770
|
+
|
|
675
771
|
t.end();
|
|
676
772
|
});
|