From a32527230c39cf777f83a6733d64e16377e37fed Mon Sep 17 00:00:00 2001 From: npm CLI robot Date: Thu, 19 Feb 2026 22:10:33 +0000 Subject: [PATCH] deps: upgrade npm to 11.10.1 --- deps/npm/README.md | 2 +- deps/npm/docs/content/commands/npm-get.md | 32 + .../docs/content/commands/npm-install-test.md | 15 + deps/npm/docs/content/commands/npm-install.md | 15 + deps/npm/docs/content/commands/npm-ll.md | 229 +++ deps/npm/docs/content/commands/npm-ls.md | 2 +- .../npm/docs/content/commands/npm-outdated.md | 15 + deps/npm/docs/content/commands/npm-set.md | 58 + deps/npm/docs/content/commands/npm-trust.md | 139 ++ deps/npm/docs/content/commands/npm-update.md | 15 + deps/npm/docs/content/commands/npm.md | 2 +- .../docs/content/configuring-npm/folders.md | 4 +- .../docs/content/configuring-npm/install.md | 2 +- .../npm/docs/content/configuring-npm/npmrc.md | 62 +- deps/npm/docs/content/using-npm/config.md | 21 +- .../content/using-npm/dependency-selectors.md | 2 +- deps/npm/docs/content/using-npm/developers.md | 4 +- deps/npm/docs/content/using-npm/logging.md | 2 +- deps/npm/docs/content/using-npm/orgs.md | 4 +- .../docs/content/using-npm/package-spec.md | 2 +- deps/npm/docs/content/using-npm/registry.md | 2 +- deps/npm/docs/content/using-npm/removal.md | 4 +- deps/npm/docs/content/using-npm/scope.md | 2 +- deps/npm/docs/content/using-npm/scripts.md | 2 +- deps/npm/docs/content/using-npm/workspaces.md | 2 +- deps/npm/docs/lib/index.js | 154 +- deps/npm/docs/output/commands/npm-access.html | 49 +- .../npm/docs/output/commands/npm-adduser.html | 49 +- deps/npm/docs/output/commands/npm-audit.html | 49 +- deps/npm/docs/output/commands/npm-bugs.html | 49 +- deps/npm/docs/output/commands/npm-cache.html | 49 +- deps/npm/docs/output/commands/npm-ci.html | 49 +- .../docs/output/commands/npm-completion.html | 49 +- deps/npm/docs/output/commands/npm-config.html | 49 +- deps/npm/docs/output/commands/npm-dedupe.html | 49 +- .../docs/output/commands/npm-deprecate.html | 49 +- deps/npm/docs/output/commands/npm-diff.html | 49 +- .../docs/output/commands/npm-dist-tag.html | 49 +- deps/npm/docs/output/commands/npm-docs.html | 49 +- deps/npm/docs/output/commands/npm-doctor.html | 49 +- deps/npm/docs/output/commands/npm-edit.html | 49 +- deps/npm/docs/output/commands/npm-exec.html | 49 +- .../npm/docs/output/commands/npm-explain.html | 49 +- .../npm/docs/output/commands/npm-explore.html | 49 +- .../docs/output/commands/npm-find-dupes.html | 49 +- deps/npm/docs/output/commands/npm-fund.html | 49 +- deps/npm/docs/output/commands/npm-get.html | 231 +++ .../docs/output/commands/npm-help-search.html | 49 +- deps/npm/docs/output/commands/npm-help.html | 49 +- deps/npm/docs/output/commands/npm-init.html | 49 +- .../output/commands/npm-install-ci-test.html | 49 +- .../output/commands/npm-install-test.html | 64 +- .../npm/docs/output/commands/npm-install.html | 64 +- deps/npm/docs/output/commands/npm-link.html | 49 +- deps/npm/docs/output/commands/npm-ll.html | 381 +++++ deps/npm/docs/output/commands/npm-login.html | 49 +- deps/npm/docs/output/commands/npm-logout.html | 49 +- deps/npm/docs/output/commands/npm-ls.html | 51 +- deps/npm/docs/output/commands/npm-org.html | 49 +- .../docs/output/commands/npm-outdated.html | 64 +- deps/npm/docs/output/commands/npm-owner.html | 49 +- deps/npm/docs/output/commands/npm-pack.html | 49 +- deps/npm/docs/output/commands/npm-ping.html | 49 +- deps/npm/docs/output/commands/npm-pkg.html | 49 +- deps/npm/docs/output/commands/npm-prefix.html | 49 +- .../npm/docs/output/commands/npm-profile.html | 49 +- deps/npm/docs/output/commands/npm-prune.html | 49 +- .../npm/docs/output/commands/npm-publish.html | 49 +- deps/npm/docs/output/commands/npm-query.html | 49 +- .../npm/docs/output/commands/npm-rebuild.html | 49 +- deps/npm/docs/output/commands/npm-repo.html | 49 +- .../npm/docs/output/commands/npm-restart.html | 49 +- deps/npm/docs/output/commands/npm-root.html | 49 +- deps/npm/docs/output/commands/npm-run.html | 49 +- deps/npm/docs/output/commands/npm-sbom.html | 49 +- deps/npm/docs/output/commands/npm-search.html | 49 +- deps/npm/docs/output/commands/npm-set.html | 255 +++ .../docs/output/commands/npm-shrinkwrap.html | 49 +- deps/npm/docs/output/commands/npm-star.html | 49 +- deps/npm/docs/output/commands/npm-stars.html | 49 +- deps/npm/docs/output/commands/npm-start.html | 49 +- deps/npm/docs/output/commands/npm-stop.html | 49 +- deps/npm/docs/output/commands/npm-team.html | 49 +- deps/npm/docs/output/commands/npm-test.html | 49 +- deps/npm/docs/output/commands/npm-token.html | 49 +- deps/npm/docs/output/commands/npm-trust.html | 438 +++++ .../docs/output/commands/npm-undeprecate.html | 49 +- .../docs/output/commands/npm-uninstall.html | 49 +- .../docs/output/commands/npm-unpublish.html | 49 +- deps/npm/docs/output/commands/npm-unstar.html | 49 +- deps/npm/docs/output/commands/npm-update.html | 64 +- .../npm/docs/output/commands/npm-version.html | 49 +- deps/npm/docs/output/commands/npm-view.html | 49 +- deps/npm/docs/output/commands/npm-whoami.html | 49 +- deps/npm/docs/output/commands/npm.html | 51 +- deps/npm/docs/output/commands/npx.html | 49 +- .../docs/output/configuring-npm/folders.html | 55 +- .../docs/output/configuring-npm/install.html | 53 +- .../output/configuring-npm/npm-global.html | 55 +- .../docs/output/configuring-npm/npm-json.html | 49 +- .../configuring-npm/npm-shrinkwrap-json.html | 49 +- .../docs/output/configuring-npm/npmrc.html | 92 +- .../output/configuring-npm/package-json.html | 49 +- .../configuring-npm/package-lock-json.html | 49 +- deps/npm/docs/output/using-npm/config.html | 70 +- .../using-npm/dependency-selectors.html | 53 +- .../npm/docs/output/using-npm/developers.html | 55 +- deps/npm/docs/output/using-npm/logging.html | 51 +- deps/npm/docs/output/using-npm/orgs.html | 55 +- .../docs/output/using-npm/package-spec.html | 53 +- deps/npm/docs/output/using-npm/registry.html | 53 +- deps/npm/docs/output/using-npm/removal.html | 55 +- deps/npm/docs/output/using-npm/scope.html | 53 +- deps/npm/docs/output/using-npm/scripts.html | 53 +- .../npm/docs/output/using-npm/workspaces.html | 53 +- deps/npm/lib/base-cmd.js | 246 ++- deps/npm/lib/commands/cache.js | 2 +- deps/npm/lib/commands/completion.js | 136 +- deps/npm/lib/commands/doctor.js | 8 +- deps/npm/lib/commands/edit.js | 2 - deps/npm/lib/commands/explain.js | 2 - deps/npm/lib/commands/explore.js | 2 - deps/npm/lib/commands/fund.js | 2 - deps/npm/lib/commands/get.js | 2 - deps/npm/lib/commands/install.js | 1 + deps/npm/lib/commands/ls.js | 2 - deps/npm/lib/commands/rebuild.js | 2 - deps/npm/lib/commands/run.js | 2 +- deps/npm/lib/commands/set.js | 2 - deps/npm/lib/commands/team.js | 17 +- deps/npm/lib/commands/trust/github.js | 104 ++ deps/npm/lib/commands/trust/gitlab.js | 105 ++ deps/npm/lib/commands/trust/index.js | 23 + deps/npm/lib/commands/trust/list.js | 47 + deps/npm/lib/commands/trust/revoke.js | 52 + deps/npm/lib/commands/uninstall.js | 2 - deps/npm/lib/commands/update.js | 2 - deps/npm/lib/commands/view.js | 7 +- deps/npm/lib/npm.js | 83 +- deps/npm/lib/trust-cmd.js | 283 ++++ deps/npm/lib/utils/cmd-list.js | 1 + deps/npm/lib/utils/display.js | 4 +- deps/npm/lib/utils/npm-usage.js | 2 +- deps/npm/lib/utils/reify-output.js | 2 +- deps/npm/lib/utils/verify-signatures.js | 20 +- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-audit.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-ci.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 2 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-diff.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-exec.1 | 2 +- deps/npm/man/man1/npm-explain.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-find-dupes.1 | 2 +- deps/npm/man/man1/npm-fund.1 | 2 +- deps/npm/man/man1/npm-get.1 | 31 + deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-ci-test.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 18 +- deps/npm/man/man1/npm-install.1 | 18 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-ll.1 | 231 +++ deps/npm/man/man1/npm-login.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-org.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 18 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-pkg.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 2 +- deps/npm/man/man1/npm-query.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run.1 | 2 +- deps/npm/man/man1/npm-sbom.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-set.1 | 61 + deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 2 +- deps/npm/man/man1/npm-trust.1 | 123 ++ deps/npm/man/man1/npm-undeprecate.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-unstar.1 | 2 +- deps/npm/man/man1/npm-update.1 | 18 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/npx.1 | 2 +- deps/npm/man/man5/folders.5 | 4 +- deps/npm/man/man5/install.5 | 4 +- deps/npm/man/man5/npm-global.5 | 4 +- deps/npm/man/man5/npm-json.5 | 2 +- deps/npm/man/man5/npm-shrinkwrap-json.5 | 2 +- deps/npm/man/man5/npmrc.5 | 64 +- deps/npm/man/man5/package-json.5 | 2 +- deps/npm/man/man5/package-lock-json.5 | 2 +- deps/npm/man/man7/config.7 | 20 +- deps/npm/man/man7/dependency-selectors.7 | 4 +- deps/npm/man/man7/developers.7 | 4 +- deps/npm/man/man7/logging.7 | 4 +- deps/npm/man/man7/orgs.7 | 4 +- deps/npm/man/man7/package-spec.7 | 4 +- deps/npm/man/man7/registry.7 | 4 +- deps/npm/man/man7/removal.7 | 4 +- deps/npm/man/man7/scope.7 | 4 +- deps/npm/man/man7/scripts.7 | 4 +- deps/npm/man/man7/workspaces.7 | 4 +- .../arborist/lib/arborist/build-ideal-tree.js | 25 +- .../@npmcli/arborist/lib/dep-valid.js | 2 +- .../@npmcli/arborist/package.json | 6 +- .../config/lib/definitions/definition.js | 2 + .../config/lib/definitions/definitions.js | 23 + .../node_modules/@npmcli/config/lib/index.js | 72 +- .../node_modules/@npmcli/config/package.json | 6 +- .../@npmcli/package-json/lib/license.js | 27 + .../package-json/lib/normalize-data.js | 4 +- .../@npmcli/package-json/package.json | 8 +- deps/npm/node_modules/ansi-regex/index.js | 10 - deps/npm/node_modules/ansi-regex/license | 9 - deps/npm/node_modules/ansi-regex/package.json | 55 - .../{@isaacs => }/balanced-match/LICENSE.md | 0 .../balanced-match/dist/commonjs/index.js | 0 .../balanced-match/dist/commonjs/package.json | 0 .../balanced-match/dist/esm/index.js | 0 .../balanced-match/dist/esm/package.json | 0 .../{@isaacs => }/balanced-match/package.json | 21 +- .../{@isaacs => }/brace-expansion/LICENSE | 0 .../brace-expansion/dist/commonjs/index.js | 2 +- .../dist/commonjs/package.json | 0 .../brace-expansion/dist/esm/index.js | 2 +- .../brace-expansion/dist/esm/package.json | 0 .../brace-expansion/package.json | 14 +- .../npm/node_modules/cidr-regex/dist/index.js | 25 +- deps/npm/node_modules/cidr-regex/package.json | 32 +- deps/npm/node_modules/cli-columns/color.js | 16 - deps/npm/node_modules/cli-columns/index.js | 82 - deps/npm/node_modules/cli-columns/license | 20 - .../npm/node_modules/cli-columns/package.json | 54 - deps/npm/node_modules/cli-columns/test.js | 101 -- .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 - .../node_modules/emoji-regex/es2015/index.js | 6 - .../node_modules/emoji-regex/es2015/text.js | 6 - deps/npm/node_modules/emoji-regex/index.js | 6 - .../npm/node_modules/emoji-regex/package.json | 50 - deps/npm/node_modules/emoji-regex/text.js | 6 - .../node_modules/glob/dist/commonjs/glob.js | 3 +- .../glob/dist/commonjs/index.min.js | 4 + .../glob/dist/commonjs/pattern.js | 4 + deps/npm/node_modules/glob/dist/esm/glob.js | 3 +- .../node_modules/glob/dist/esm/index.min.js | 4 + .../npm/node_modules/glob/dist/esm/pattern.js | 4 + deps/npm/node_modules/glob/package.json | 57 +- .../init-package-json/lib/default-input.js | 8 +- .../init-package-json/package.json | 7 +- deps/npm/node_modules/ip-regex/index.js | 36 - deps/npm/node_modules/ip-regex/license | 9 - deps/npm/node_modules/ip-regex/package.json | 47 - deps/npm/node_modules/is-cidr/package.json | 7 +- .../is-fullwidth-code-point/index.js | 50 - .../is-fullwidth-code-point/license | 9 - .../is-fullwidth-code-point/package.json | 42 - deps/npm/node_modules/isexe/LICENSE.md | 55 + .../isexe/dist/{cjs => commonjs}/index.js | 24 +- .../isexe/dist/commonjs/index.min.js | 2 + .../isexe/dist/{cjs => commonjs}/options.js | 0 .../isexe/dist/{cjs => commonjs}/package.json | 0 .../isexe/dist/{cjs => commonjs}/posix.js | 6 +- .../isexe/dist/{cjs => commonjs}/win32.js | 13 +- .../isexe/dist/{mjs => esm}/index.js | 0 .../node_modules/isexe/dist/esm/index.min.js | 2 + .../isexe/dist/{mjs => esm}/options.js | 0 .../isexe/dist/{mjs => esm}/package.json | 0 .../isexe/dist/{mjs => esm}/posix.js | 4 +- .../isexe/dist/{mjs => esm}/win32.js | 11 +- deps/npm/node_modules/isexe/package.json | 114 +- .../node_modules/libnpmaccess/package.json | 4 +- deps/npm/node_modules/libnpmdiff/package.json | 8 +- deps/npm/node_modules/libnpmexec/package.json | 8 +- deps/npm/node_modules/libnpmfund/package.json | 8 +- deps/npm/node_modules/libnpmorg/package.json | 4 +- deps/npm/node_modules/libnpmpack/package.json | 8 +- .../node_modules/libnpmpublish/package.json | 4 +- .../node_modules/libnpmsearch/package.json | 4 +- deps/npm/node_modules/libnpmteam/package.json | 4 +- .../node_modules/libnpmversion/package.json | 4 +- deps/npm/node_modules/lru-cache/package.json | 14 +- .../minimatch/dist/commonjs/ast.js | 64 +- .../dist/commonjs/brace-expressions.js | 6 +- .../minimatch/dist/commonjs/escape.js | 8 +- .../minimatch/dist/commonjs/index.js | 68 +- .../minimatch/dist/commonjs/unescape.js | 8 +- .../node_modules/minimatch/dist/esm/ast.js | 64 +- .../minimatch/dist/esm/brace-expressions.js | 6 +- .../node_modules/minimatch/dist/esm/escape.js | 8 +- .../node_modules/minimatch/dist/esm/index.js | 68 +- .../minimatch/dist/esm/unescape.js | 8 +- deps/npm/node_modules/minimatch/package.json | 12 +- .../node_modules}/yallist/LICENSE | 0 .../node_modules}/yallist/iterator.js | 0 .../node_modules/yallist/package.json | 29 + .../node_modules}/yallist/yallist.js | 0 .../node_modules/yallist}/LICENSE | 2 +- .../node_modules/yallist/iterator.js | 8 + .../node_modules/yallist/package.json | 29 + .../node_modules/yallist/yallist.js | 426 +++++ deps/npm/node_modules/minipass/LICENSE.md | 55 + .../minipass/dist/commonjs/index.js | 16 +- .../node_modules/minipass/dist/esm/index.js | 4 +- deps/npm/node_modules/minipass/package.json | 23 +- deps/npm/node_modules/pacote/README.md | 13 +- deps/npm/node_modules/pacote/lib/fetcher.js | 23 +- deps/npm/node_modules/pacote/lib/git.js | 18 +- deps/npm/node_modules/pacote/package.json | 2 +- .../npm/node_modules/path-scurry/package.json | 32 +- deps/npm/node_modules/semver/README.md | 5 +- deps/npm/node_modules/semver/bin/semver.js | 2 +- .../npm/node_modules/semver/functions/diff.js | 2 +- deps/npm/node_modules/semver/internal/re.js | 4 +- deps/npm/node_modules/semver/package.json | 8 +- deps/npm/node_modules/semver/ranges/subset.js | 2 +- deps/npm/node_modules/spdx-correct/LICENSE | 202 --- deps/npm/node_modules/spdx-correct/index.js | 386 ----- .../spdx-expression-parse/AUTHORS | 4 - .../spdx-expression-parse/LICENSE | 22 - .../spdx-expression-parse/index.js | 8 - .../spdx-expression-parse/package.json | 39 - .../spdx-expression-parse/parse.js | 138 -- .../spdx-expression-parse/scan.js | 131 -- .../node_modules/spdx-correct/package.json | 32 - deps/npm/node_modules/ssri/lib/index.js | 94 +- deps/npm/node_modules/ssri/package.json | 32 +- deps/npm/node_modules/string-width/index.js | 47 - deps/npm/node_modules/string-width/license | 9 - .../node_modules/string-width/package.json | 56 - deps/npm/node_modules/strip-ansi/index.js | 4 - deps/npm/node_modules/strip-ansi/license | 9 - deps/npm/node_modules/strip-ansi/package.json | 54 - .../tar/dist/commonjs/index.min.js | 4 + .../tar/dist/commonjs/process-umask.js | 7 + .../node_modules/tar/dist/commonjs/unpack.js | 52 +- .../node_modules/tar/dist/esm/index.min.js | 4 + .../tar/dist/esm/process-umask.js | 3 + deps/npm/node_modules/tar/dist/esm/unpack.js | 52 +- .../tar/node_modules/yallist/package.json | 68 - deps/npm/node_modules/tar/package.json | 31 +- .../validate-npm-package-license/LICENSE | 202 --- .../validate-npm-package-license/index.js | 86 - .../spdx-expression-parse/AUTHORS | 4 - .../spdx-expression-parse/LICENSE | 22 - .../spdx-expression-parse/index.js | 8 - .../spdx-expression-parse/package.json | 39 - .../spdx-expression-parse/parse.js | 138 -- .../spdx-expression-parse/scan.js | 131 -- .../validate-npm-package-license/package.json | 28 - deps/npm/node_modules/which/package.json | 10 +- .../{tar/node_modules => }/yallist/LICENSE.md | 0 .../yallist/dist/commonjs/index.js | 0 .../yallist/dist/commonjs/package.json | 0 .../yallist/dist/esm/index.js | 0 .../yallist/dist/esm/package.json | 0 deps/npm/node_modules/yallist/package.json | 63 +- deps/npm/package.json | 42 +- .../test/lib/commands/completion.js.test.cjs | 214 +-- .../test/lib/commands/config.js.test.cjs | 4 +- .../test/lib/commands/install.js.test.cjs | 18 +- .../test/lib/commands/publish.js.test.cjs | 4 + .../test/lib/commands/view.js.test.cjs | 100 +- .../tap-snapshots/test/lib/docs.js.test.cjs | 1497 ++++++++++++++++- .../tap-snapshots/test/lib/npm.js.test.cjs | 64 +- deps/npm/test/fixtures/mock-npm.js | 10 + deps/npm/test/lib/base-cmd.js | 678 ++++++++ deps/npm/test/lib/commands/ci.js | 139 ++ deps/npm/test/lib/commands/completion.js | 135 ++ deps/npm/test/lib/commands/edit.js | 14 + deps/npm/test/lib/commands/explain.js | 16 + deps/npm/test/lib/commands/explore.js | 14 + deps/npm/test/lib/commands/fund.js | 16 + deps/npm/test/lib/commands/get.js | 6 + deps/npm/test/lib/commands/install.js | 274 ++- deps/npm/test/lib/commands/ls.js | 16 + deps/npm/test/lib/commands/publish.js | 2 +- deps/npm/test/lib/commands/rebuild.js | 16 + deps/npm/test/lib/commands/set.js | 6 + deps/npm/test/lib/commands/trust/github.js | 153 ++ deps/npm/test/lib/commands/trust/gitlab.js | 153 ++ deps/npm/test/lib/commands/trust/list.js | 256 +++ deps/npm/test/lib/commands/trust/revoke.js | 319 ++++ deps/npm/test/lib/commands/uninstall.js | 14 + deps/npm/test/lib/commands/unpublish.js | 2 +- deps/npm/test/lib/commands/update.js | 16 + deps/npm/test/lib/commands/view.js | 2 +- deps/npm/test/lib/docs.js | 21 +- deps/npm/test/lib/npm.js | 245 ++- deps/npm/test/lib/trust-cmd.js | 848 ++++++++++ 421 files changed, 14410 insertions(+), 3859 deletions(-) create mode 100644 deps/npm/docs/content/commands/npm-get.md create mode 100644 deps/npm/docs/content/commands/npm-ll.md create mode 100644 deps/npm/docs/content/commands/npm-set.md create mode 100644 deps/npm/docs/content/commands/npm-trust.md create mode 100644 deps/npm/docs/output/commands/npm-get.html create mode 100644 deps/npm/docs/output/commands/npm-ll.html create mode 100644 deps/npm/docs/output/commands/npm-set.html create mode 100644 deps/npm/docs/output/commands/npm-trust.html create mode 100644 deps/npm/lib/commands/trust/github.js create mode 100644 deps/npm/lib/commands/trust/gitlab.js create mode 100644 deps/npm/lib/commands/trust/index.js create mode 100644 deps/npm/lib/commands/trust/list.js create mode 100644 deps/npm/lib/commands/trust/revoke.js create mode 100644 deps/npm/lib/trust-cmd.js create mode 100644 deps/npm/man/man1/npm-get.1 create mode 100644 deps/npm/man/man1/npm-ll.1 create mode 100644 deps/npm/man/man1/npm-set.1 create mode 100644 deps/npm/man/man1/npm-trust.1 create mode 100644 deps/npm/node_modules/@npmcli/package-json/lib/license.js delete mode 100644 deps/npm/node_modules/ansi-regex/index.js delete mode 100644 deps/npm/node_modules/ansi-regex/license delete mode 100644 deps/npm/node_modules/ansi-regex/package.json rename deps/npm/node_modules/{@isaacs => }/balanced-match/LICENSE.md (100%) rename deps/npm/node_modules/{@isaacs => }/balanced-match/dist/commonjs/index.js (100%) rename deps/npm/node_modules/{@isaacs => }/balanced-match/dist/commonjs/package.json (100%) rename deps/npm/node_modules/{@isaacs => }/balanced-match/dist/esm/index.js (100%) rename deps/npm/node_modules/{@isaacs => }/balanced-match/dist/esm/package.json (100%) rename deps/npm/node_modules/{@isaacs => }/balanced-match/package.json (76%) rename deps/npm/node_modules/{@isaacs => }/brace-expansion/LICENSE (100%) rename deps/npm/node_modules/{@isaacs => }/brace-expansion/dist/commonjs/index.js (99%) rename deps/npm/node_modules/{@isaacs => }/brace-expansion/dist/commonjs/package.json (100%) rename deps/npm/node_modules/{@isaacs => }/brace-expansion/dist/esm/index.js (99%) rename deps/npm/node_modules/{@isaacs => }/brace-expansion/dist/esm/package.json (100%) rename deps/npm/node_modules/{@isaacs => }/brace-expansion/package.json (83%) delete mode 100644 deps/npm/node_modules/cli-columns/color.js delete mode 100644 deps/npm/node_modules/cli-columns/index.js delete mode 100644 deps/npm/node_modules/cli-columns/license delete mode 100644 deps/npm/node_modules/cli-columns/package.json delete mode 100644 deps/npm/node_modules/cli-columns/test.js delete mode 100644 deps/npm/node_modules/emoji-regex/LICENSE-MIT.txt delete mode 100644 deps/npm/node_modules/emoji-regex/es2015/index.js delete mode 100644 deps/npm/node_modules/emoji-regex/es2015/text.js delete mode 100644 deps/npm/node_modules/emoji-regex/index.js delete mode 100644 deps/npm/node_modules/emoji-regex/package.json delete mode 100644 deps/npm/node_modules/emoji-regex/text.js create mode 100644 deps/npm/node_modules/glob/dist/commonjs/index.min.js create mode 100644 deps/npm/node_modules/glob/dist/esm/index.min.js delete mode 100644 deps/npm/node_modules/ip-regex/index.js delete mode 100644 deps/npm/node_modules/ip-regex/license delete mode 100644 deps/npm/node_modules/ip-regex/package.json delete mode 100644 deps/npm/node_modules/is-fullwidth-code-point/index.js delete mode 100644 deps/npm/node_modules/is-fullwidth-code-point/license delete mode 100644 deps/npm/node_modules/is-fullwidth-code-point/package.json create mode 100644 deps/npm/node_modules/isexe/LICENSE.md rename deps/npm/node_modules/isexe/dist/{cjs => commonjs}/index.js (70%) create mode 100644 deps/npm/node_modules/isexe/dist/commonjs/index.min.js rename deps/npm/node_modules/isexe/dist/{cjs => commonjs}/options.js (100%) rename deps/npm/node_modules/isexe/dist/{cjs => commonjs}/package.json (100%) rename deps/npm/node_modules/isexe/dist/{cjs => commonjs}/posix.js (92%) rename deps/npm/node_modules/isexe/dist/{cjs => commonjs}/win32.js (83%) rename deps/npm/node_modules/isexe/dist/{mjs => esm}/index.js (100%) create mode 100644 deps/npm/node_modules/isexe/dist/esm/index.min.js rename deps/npm/node_modules/isexe/dist/{mjs => esm}/options.js (100%) rename deps/npm/node_modules/isexe/dist/{mjs => esm}/package.json (100%) rename deps/npm/node_modules/isexe/dist/{mjs => esm}/posix.js (95%) rename deps/npm/node_modules/isexe/dist/{mjs => esm}/win32.js (86%) rename deps/npm/node_modules/{ => minipass-flush/node_modules}/yallist/LICENSE (100%) rename deps/npm/node_modules/{ => minipass-flush/node_modules}/yallist/iterator.js (100%) create mode 100644 deps/npm/node_modules/minipass-flush/node_modules/yallist/package.json rename deps/npm/node_modules/{ => minipass-flush/node_modules}/yallist/yallist.js (100%) rename deps/npm/node_modules/{minipass => minipass-pipeline/node_modules/yallist}/LICENSE (90%) create mode 100644 deps/npm/node_modules/minipass-pipeline/node_modules/yallist/iterator.js create mode 100644 deps/npm/node_modules/minipass-pipeline/node_modules/yallist/package.json create mode 100644 deps/npm/node_modules/minipass-pipeline/node_modules/yallist/yallist.js create mode 100644 deps/npm/node_modules/minipass/LICENSE.md delete mode 100644 deps/npm/node_modules/spdx-correct/LICENSE delete mode 100644 deps/npm/node_modules/spdx-correct/index.js delete mode 100644 deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/AUTHORS delete mode 100644 deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/LICENSE delete mode 100644 deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/index.js delete mode 100644 deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/package.json delete mode 100644 deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/parse.js delete mode 100644 deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/scan.js delete mode 100644 deps/npm/node_modules/spdx-correct/package.json delete mode 100644 deps/npm/node_modules/string-width/index.js delete mode 100644 deps/npm/node_modules/string-width/license delete mode 100644 deps/npm/node_modules/string-width/package.json delete mode 100644 deps/npm/node_modules/strip-ansi/index.js delete mode 100644 deps/npm/node_modules/strip-ansi/license delete mode 100644 deps/npm/node_modules/strip-ansi/package.json create mode 100644 deps/npm/node_modules/tar/dist/commonjs/index.min.js create mode 100644 deps/npm/node_modules/tar/dist/commonjs/process-umask.js create mode 100644 deps/npm/node_modules/tar/dist/esm/index.min.js create mode 100644 deps/npm/node_modules/tar/dist/esm/process-umask.js delete mode 100644 deps/npm/node_modules/tar/node_modules/yallist/package.json delete mode 100644 deps/npm/node_modules/validate-npm-package-license/LICENSE delete mode 100644 deps/npm/node_modules/validate-npm-package-license/index.js delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/AUTHORS delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parse.js delete mode 100644 deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js delete mode 100644 deps/npm/node_modules/validate-npm-package-license/package.json rename deps/npm/node_modules/{tar/node_modules => }/yallist/LICENSE.md (100%) rename deps/npm/node_modules/{tar/node_modules => }/yallist/dist/commonjs/index.js (100%) rename deps/npm/node_modules/{tar/node_modules => }/yallist/dist/commonjs/package.json (100%) rename deps/npm/node_modules/{tar/node_modules => }/yallist/dist/esm/index.js (100%) rename deps/npm/node_modules/{tar/node_modules => }/yallist/dist/esm/package.json (100%) create mode 100644 deps/npm/test/lib/base-cmd.js create mode 100644 deps/npm/test/lib/commands/trust/github.js create mode 100644 deps/npm/test/lib/commands/trust/gitlab.js create mode 100644 deps/npm/test/lib/commands/trust/list.js create mode 100644 deps/npm/test/lib/commands/trust/revoke.js create mode 100644 deps/npm/test/lib/trust-cmd.js diff --git a/deps/npm/README.md b/deps/npm/README.md index d31017ec771b16..4d79b192e1f47c 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -50,4 +50,4 @@ npm #### Is "npm" an acronym for "Node Package Manager"? -Contrary to popular belief, **`npm`** **is not** in fact an acronym for "Node Package Manager"; It is a recursive bacronymic abbreviation for **"npm is not an acronym"** (if the project was named "ninaa", then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were to ever have been considered an acronym, it would be as "node pm" or, potentially "new pm". +Contrary to popular belief, **`npm`** **is not** an acronym for "Node Package Manager." It is a recursive backronymic abbreviation for **"npm is not an acronym"** (if the project were named "ninaa," then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were ever considered an acronym, it would be as "node pm" or, potentially, "new pm". diff --git a/deps/npm/docs/content/commands/npm-get.md b/deps/npm/docs/content/commands/npm-get.md new file mode 100644 index 00000000000000..4f79cdde4667ac --- /dev/null +++ b/deps/npm/docs/content/commands/npm-get.md @@ -0,0 +1,32 @@ +--- +title: npm-get +section: 1 +description: Get a value from the npm configuration +--- + +### Synopsis + +```bash +npm get [ ...] (See `npm config`) +``` + +Note: This command is unaware of workspaces. + +### Description + +Get a value from the npm configuration + +### Configuration + +#### `long` + +* Default: false +* Type: Boolean + +Show extended information in `ls`, `search`, and `help-search`. + + + +### See Also + +* [npm help config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md index 0af6bde331cbbd..d576d335a66481 100644 --- a/deps/npm/docs/content/commands/npm-install-test.md +++ b/deps/npm/docs/content/commands/npm-install-test.md @@ -264,7 +264,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` #### `bin-links` diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md index 84a8aea731b5dd..34c5ee6b1878da 100644 --- a/deps/npm/docs/content/commands/npm-install.md +++ b/deps/npm/docs/content/commands/npm-install.md @@ -606,7 +606,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` #### `bin-links` diff --git a/deps/npm/docs/content/commands/npm-ll.md b/deps/npm/docs/content/commands/npm-ll.md new file mode 100644 index 00000000000000..2114c263d4b854 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-ll.md @@ -0,0 +1,229 @@ +--- +title: npm-ll +section: 1 +description: List installed packages +--- + +### Synopsis + +```bash +npm ll [[<@scope>/] ...] + +alias: la +``` + +### Description + +List installed packages + +### Configuration + +#### `all` + +* Default: false +* Type: Boolean + +When running `npm outdated` and `npm ls`, setting `--all` will show all +outdated or installed packages, rather than only those directly depended +upon by the current project. + + + +#### `json` + +* Default: false +* Type: Boolean + +Whether or not to output JSON data, rather than the normal output. + +* In `npm pkg set` it enables parsing set values with JSON.parse() before + saving them to your `package.json`. + +Not supported by all npm commands. + + + +#### `long` + +* Default: false +* Type: Boolean + +Show extended information in `ls`, `search`, and `help-search`. + + + +#### `parseable` + +* Default: false +* Type: Boolean + +Output parseable results from commands that write to standard output. For +`npm search`, this will be tab-separated table format. + + + +#### `global` + +* Default: false +* Type: Boolean + +Operates in "global" mode, so that packages are installed into the `prefix` +folder instead of the current working directory. See +[folders](/configuring-npm/folders) for more on the differences in behavior. + +* packages are installed into the `{prefix}/lib/node_modules` folder, instead + of the current working directory. +* bin files are linked to `{prefix}/bin` +* man pages are linked to `{prefix}/share/man` + + + +#### `depth` + +* Default: `Infinity` if `--all` is set; otherwise, `0` +* Type: null or Number + +The depth to go when recursing packages for `npm ls`. + +If not set, `npm ls` will show only the immediate dependencies of the root +project. If `--all` is set, then npm will show all dependencies by default. + + + +#### `omit` + +* Default: 'dev' if the `NODE_ENV` environment variable is set to + 'production'; otherwise, empty. +* Type: "dev", "optional", or "peer" (can be set multiple times) + +Dependency types to omit from the installation tree on disk. + +Note that these dependencies _are_ still resolved and added to the +`package-lock.json` or `npm-shrinkwrap.json` file. They are just not +physically installed on disk. + +If a package type appears in both the `--include` and `--omit` lists, then +it will be included. + +If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment +variable will be set to `'production'` for all lifecycle scripts. + + + +#### `include` + +* Default: +* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) + +Option that allows for defining which types of dependencies to install. + +This is the inverse of `--omit=`. + +Dependency types specified in `--include` will not be omitted, regardless of +the order in which omit/include are specified on the command-line. + + + +#### `link` + +* Default: false +* Type: Boolean + +Used with `npm ls`, limiting output to only those packages that are linked. + + + +#### `package-lock-only` + +* Default: false +* Type: Boolean + +If set to true, the current operation will only use the `package-lock.json`, +ignoring `node_modules`. + +For `update` this means only the `package-lock.json` will be updated, +instead of checking `node_modules` and downloading dependencies. + +For `list` this means the output will be based on the tree described by the +`package-lock.json`, rather than the contents of `node_modules`. + + + +#### `unicode` + +* Default: false on windows, true on mac/unix systems with a unicode locale, + as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. +* Type: Boolean + +When set to true, npm uses unicode characters in the tree output. When +false, it uses ascii characters instead of unicode glyphs. + + + +#### `workspace` + +* Default: +* Type: String (can be set multiple times) + +Enable running a command in the context of the configured workspaces of the +current project while filtering by running only the workspaces defined by +this configuration option. + +Valid values for the `workspace` config are either: + +* Workspace names +* Path to a workspace directory +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) + +When set for the `npm init` command, this may be set to the folder of a +workspace which does not yet exist, to create the folder and set it up as a +brand new workspace within the project. + +This value is not exported to the environment for child processes. + +#### `workspaces` + +* Default: null +* Type: null or Boolean + +Set to true to run the command in the context of **all** configured +workspaces. + +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + +This value is not exported to the environment for child processes. + +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + +This value is not exported to the environment for child processes. + +#### `install-links` + +* Default: false +* Type: Boolean + +When set file: protocol dependencies will be packed and installed as regular +dependencies instead of creating a symlink. This option has no effect on +workspaces. + + + +### See Also + +* [npm help config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 16e4a126dc8911..807b4bfd4c8de9 100644 --- a/deps/npm/docs/content/commands/npm-ls.md +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -23,7 +23,7 @@ Note that nested packages will *also* show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show: ```bash -npm@11.9.0 /path/to/npm +npm@11.10.1 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` diff --git a/deps/npm/docs/content/commands/npm-outdated.md b/deps/npm/docs/content/commands/npm-outdated.md index d6aa3eb53a79a5..b05f8b5a5c0e1b 100644 --- a/deps/npm/docs/content/commands/npm-outdated.md +++ b/deps/npm/docs/content/commands/npm-outdated.md @@ -165,7 +165,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` ### See Also diff --git a/deps/npm/docs/content/commands/npm-set.md b/deps/npm/docs/content/commands/npm-set.md new file mode 100644 index 00000000000000..9420216a14e18a --- /dev/null +++ b/deps/npm/docs/content/commands/npm-set.md @@ -0,0 +1,58 @@ +--- +title: npm-set +section: 1 +description: Set a value in the npm configuration +--- + +### Synopsis + +```bash +npm set = [= ...] (See `npm config`) +``` + +Note: This command is unaware of workspaces. + +### Description + +Set a value in the npm configuration + +### Configuration + +#### `global` + +* Default: false +* Type: Boolean + +Operates in "global" mode, so that packages are installed into the `prefix` +folder instead of the current working directory. See +[folders](/configuring-npm/folders) for more on the differences in behavior. + +* packages are installed into the `{prefix}/lib/node_modules` folder, instead + of the current working directory. +* bin files are linked to `{prefix}/bin` +* man pages are linked to `{prefix}/share/man` + + + +#### `location` + +* Default: "user" unless `--global` is passed, which will also set this value + to "global" +* Type: "global", "user", or "project" + +When passed to `npm config` this refers to which config file to use. + +When set to "global" mode, packages are installed into the `prefix` folder +instead of the current working directory. See +[folders](/configuring-npm/folders) for more on the differences in behavior. + +* packages are installed into the `{prefix}/lib/node_modules` folder, instead + of the current working directory. +* bin files are linked to `{prefix}/bin` +* man pages are linked to `{prefix}/share/man` + + + +### See Also + +* [npm help config](/commands/npm-config) diff --git a/deps/npm/docs/content/commands/npm-trust.md b/deps/npm/docs/content/commands/npm-trust.md new file mode 100644 index 00000000000000..dd5adb110cf5a9 --- /dev/null +++ b/deps/npm/docs/content/commands/npm-trust.md @@ -0,0 +1,139 @@ +--- +title: npm-trust +section: 1 +description: Manage trusted publishing relationships between packages and CI/CD providers +--- + +### Synopsis + +```bash +npm trust +``` + +Note: This command is unaware of workspaces. + +### Prerequisites + +Before using npm trust commands, ensure the following requirements are met: + +* **npm version**: `npm@11.10.0` or above is required. Use `npm install -g npm@^11.10.0` to update if needed. +* **Write permissions on the package**: You must have write access to the package you're configuring. +* **2FA enabled on account**: Two-factor authentication must be enabled at the account level. Even if it's not currently enabled, you must enable it to use trust commands. +* **Supported authentication methods**: Granular Access Tokens (GAT) with the bypass 2FA option are not supported. Legacy basic auth (username and password) credentials will not work for trust commands or endpoints. +* **Package must exist**: The package you're configuring must already exist on the npm registry. + +### Description + +Configure trust relationships between npm packages and CI/CD providers using OpenID Connect (OIDC). This is the command-line equivalent of managing trusted publisher configurations on the npm website. + +For a comprehensive overview of trusted publishing, see the [npm trusted publishers documentation](https://docs.npmjs.com/trusted-publishers). + +The `[package]` argument specifies the package name. If omitted, npm will use the name from the `package.json` in the current directory. + +Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal—npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use `npm trust --help`. + +The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the [managing trusted publisher configurations](https://docs.npmjs.com/trusted-publishers#managing-trusted-publisher-configurations) section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the `repository.url` field from your `package.json`, if available. + +Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration: + +1. Use `npm trust list [package]` to view the ID of the existing trusted publisher +2. Use `npm trust revoke --id [package]` to remove the existing configuration +3. Then create your new trust relationship + +### Bulk Usage + +For maintainers managing a large number of packages, you can configure trusted publishing in bulk using bash scripting. Create a loop that iterates through package names and their corresponding configuration details, executing the `npm trust ` command with the `--yes` flag for each package. + +The first request will require two-factor authentication. During two-factor authentication, you'll see an option on the npm website to skip two-factor authentication for the next 5 minutes. Enabling this option will allow subsequent `npm trust ` commands to proceed without two-factor authentication, streamlining the bulk configuration process. + +We recommend adding a 2-second sleep between each call to avoid rate limiting. With this approach, you can configure approximately 80 packages within the 5-minute two-factor authentication skip window. + +### Configuration + +### `npm trust github` + +Create a trusted relationship between a package and GitHub Actions + +#### Synopsis + +```bash +npm trust github [package] --file [--repo|--repository] [--env|--environment] [-y|--yes] +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--file` | null | String (required) | Name of workflow file within a repositories .GitHub folder (must end in yaml, yml) | +| `--repository`, `--repo` | null | String | Name of the repository in the format owner/repo | +| `--environment`, `--env` | null | String | CI environment name | +| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. | +| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | + +### `npm trust gitlab` + +Create a trusted relationship between a package and GitLab CI/CD + +#### Synopsis + +```bash +npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes] +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--file` | null | String (required) | Name of pipeline file (e.g., .gitlab-ci.yml) | +| `--project` | null | String | Name of the project in the format group/project or group/subgroup/project | +| `--environment`, `--env` | null | String | CI environment name | +| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. | +| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +| `--yes`, `-y` | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | + +### `npm trust list` + +List trusted relationships for a package + +#### Synopsis + +```bash +npm trust list [package] +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--json` | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`. Not supported by all npm commands. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | + +### `npm trust revoke` + +Revoke a trusted relationship for a package + +#### Synopsis + +```bash +npm trust revoke [package] --id= +``` + +#### Flags + +| Flag | Default | Type | Description | +| --- | --- | --- | --- | +| `--id` | null | String (required) | ID of the trusted relationship to revoke | +| `--dry-run` | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`. Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. | +| `--registry` | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | + + +### See Also + +* [npm publish](/commands/npm-publish) +* [npm token](/commands/npm-token) +* [npm access](/commands/npm-access) +* [npm config](/commands/npm-config) +* [npm registry](/using-npm/registry) diff --git a/deps/npm/docs/content/commands/npm-update.md b/deps/npm/docs/content/commands/npm-update.md index 853bb24de32e8d..2011a1e235b2c5 100644 --- a/deps/npm/docs/content/commands/npm-update.md +++ b/deps/npm/docs/content/commands/npm-update.md @@ -330,7 +330,22 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. +This config cannot be used with: `min-release-age` +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` #### `bin-links` diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index a72cffb66130dc..b9e951aaf30b88 100644 --- a/deps/npm/docs/content/commands/npm.md +++ b/deps/npm/docs/content/commands/npm.md @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. ### Version -11.9.0 +11.10.1 ### Description diff --git a/deps/npm/docs/content/configuring-npm/folders.md b/deps/npm/docs/content/configuring-npm/folders.md index 56459c86930ba8..20458512d8b907 100644 --- a/deps/npm/docs/content/configuring-npm/folders.md +++ b/deps/npm/docs/content/configuring-npm/folders.md @@ -1,7 +1,7 @@ --- -title: folders +title: Folders section: 5 -description: Folder Structures Used by npm +description: Folder structures used by npm --- ### Description diff --git a/deps/npm/docs/content/configuring-npm/install.md b/deps/npm/docs/content/configuring-npm/install.md index 1d7e7b80e6c223..4af74954692f8c 100644 --- a/deps/npm/docs/content/configuring-npm/install.md +++ b/deps/npm/docs/content/configuring-npm/install.md @@ -1,5 +1,5 @@ --- -title: install +title: Install section: 5 description: Download and install node and npm --- diff --git a/deps/npm/docs/content/configuring-npm/npmrc.md b/deps/npm/docs/content/configuring-npm/npmrc.md index 41d7c5e462c518..b1e7d16be10c79 100644 --- a/deps/npm/docs/content/configuring-npm/npmrc.md +++ b/deps/npm/docs/content/configuring-npm/npmrc.md @@ -1,5 +1,5 @@ --- -title: npmrc +title: .npmrc section: 5 description: The npm config files --- @@ -105,6 +105,39 @@ If the credential is meant for any request to a registry on a single host, the s If it must be scoped to a specific path on the host that path may also be provided, such as `//my-custom-registry.org/unique/path:`. +### Unsupported Custom Configuration Keys + +Starting in npm v11.2.0, npm warns when unknown configuration keys are defined in `.npmrc`. In a future major version of npm, these unknown keys may no longer be accepted. + +Only configuration keys that npm officially supports are recognized. Custom keys intended for third-party tools (for example, `electron-builder`) should not be placed in `.npmrc`. + +If you need package-level configuration for use in scripts, use the `config` field in your `package.json` instead: + +```json +{ + "name": "my-package", + "config": { + "mirror": "https://example.com/" + } +} + +``` + +Values defined in `package.json#config` are exposed to scripts as environment variables prefixed with `npm_package_config_`. For example: + +``` +npm_package_config_mirror +``` + +If you need to pass arguments to a script command, use `--` to separate npm arguments from script arguments: + +``` +npm run build -- --customFlag +``` + +Using environment variables is also recommended for cross-platform configuration instead of defining unsupported keys in `.npmrc`. + + ``` ; bad config _authToken=MYTOKEN @@ -124,6 +157,33 @@ _authToken=MYTOKEN //somewhere-else.com/another/:_authToken=MYTOKEN2 ``` +### Custom / third-party config keys + +npm only recognizes its own [configuration options](/using-npm/config). +If your `.npmrc` contains keys that are not part of npm's config definitions +(for example, `electron_mirror` or `sass_binary_site`), npm will emit a +warning: + +``` +warn Unknown user config "electron_mirror". +This will stop working in the next major version of npm. +``` + +These keys were historically tolerated but are not officially supported. +A future major version of npm will treat unknown top-level keys as errors. + +Some tools (such as `@electron/get` or `node-sass`) read their own +configuration from environment variables or from `.npmrc` by convention. +You can set these values as environment variables instead: + +```bash +export ELECTRON_MIRROR="https://mirrorexample.npmjs.org/mirrors/electron/" +export ELECTRON_CUSTOM_DIR="{{ version }}" +``` + +Environment variables are the most portable approach and work regardless +of `.npmrc` format. + ### See also * [npm folders](/configuring-npm/folders) diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index cca95ff72b0b49..ff897d9f71b02f 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -1,7 +1,7 @@ --- -title: config +title: Config section: 7 -description: More than you probably want to know about npm configuration +description: About npm configuration --- ### Description @@ -240,7 +240,7 @@ If the requested version is a `dist-tag` and the given tag does not pass the will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`. - +This config cannot be used with: `min-release-age` #### `bin-links` @@ -1071,6 +1071,21 @@ Any "%s" in the message will be replaced with the version number. +#### `min-release-age` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to `before`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: `before` + #### `name` * Default: null diff --git a/deps/npm/docs/content/using-npm/dependency-selectors.md b/deps/npm/docs/content/using-npm/dependency-selectors.md index 9a1502e9349da4..b12c640c586ec7 100644 --- a/deps/npm/docs/content/using-npm/dependency-selectors.md +++ b/deps/npm/docs/content/using-npm/dependency-selectors.md @@ -1,5 +1,5 @@ --- -title: Dependency Selector Syntax & Querying +title: Dependency Selectors section: 7 description: Dependency Selector Syntax & Querying --- diff --git a/deps/npm/docs/content/using-npm/developers.md b/deps/npm/docs/content/using-npm/developers.md index 0261d137b36b79..de0cb848c59ff4 100644 --- a/deps/npm/docs/content/using-npm/developers.md +++ b/deps/npm/docs/content/using-npm/developers.md @@ -1,7 +1,7 @@ --- -title: developers +title: Developers section: 7 -description: Developer Guide +description: Developer guide --- ### Description diff --git a/deps/npm/docs/content/using-npm/logging.md b/deps/npm/docs/content/using-npm/logging.md index d5fca42f595c2a..6f1a2be102a1a5 100644 --- a/deps/npm/docs/content/using-npm/logging.md +++ b/deps/npm/docs/content/using-npm/logging.md @@ -1,7 +1,7 @@ --- title: Logging section: 7 -description: Why, What & How We Log +description: Why, What & How we Log --- ### Description diff --git a/deps/npm/docs/content/using-npm/orgs.md b/deps/npm/docs/content/using-npm/orgs.md index 8faf939d0b5e89..ea1173a852acc7 100644 --- a/deps/npm/docs/content/using-npm/orgs.md +++ b/deps/npm/docs/content/using-npm/orgs.md @@ -1,7 +1,7 @@ --- -title: orgs +title: Organizations section: 7 -description: Working with Teams & Orgs +description: Working with teams & organizations --- ### Description diff --git a/deps/npm/docs/content/using-npm/package-spec.md b/deps/npm/docs/content/using-npm/package-spec.md index eb074a801895f7..fa98f21eb5686c 100644 --- a/deps/npm/docs/content/using-npm/package-spec.md +++ b/deps/npm/docs/content/using-npm/package-spec.md @@ -1,5 +1,5 @@ --- -title: package-spec +title: Package spec section: 7 description: Package name specifier --- diff --git a/deps/npm/docs/content/using-npm/registry.md b/deps/npm/docs/content/using-npm/registry.md index a707b97ac5a9bf..739f2a6a203f5a 100644 --- a/deps/npm/docs/content/using-npm/registry.md +++ b/deps/npm/docs/content/using-npm/registry.md @@ -1,5 +1,5 @@ --- -title: registry +title: Registry section: 7 description: The JavaScript Package Registry --- diff --git a/deps/npm/docs/content/using-npm/removal.md b/deps/npm/docs/content/using-npm/removal.md index 9b431aaf7f38a0..4cf3b64c6d4cf8 100644 --- a/deps/npm/docs/content/using-npm/removal.md +++ b/deps/npm/docs/content/using-npm/removal.md @@ -1,7 +1,7 @@ --- -title: removal +title: Removal section: 7 -description: Cleaning the Slate +description: Cleaning the slate --- ### Synopsis diff --git a/deps/npm/docs/content/using-npm/scope.md b/deps/npm/docs/content/using-npm/scope.md index ed069752b63add..f9fc14075c4a36 100644 --- a/deps/npm/docs/content/using-npm/scope.md +++ b/deps/npm/docs/content/using-npm/scope.md @@ -1,5 +1,5 @@ --- -title: scope +title: Scope section: 7 description: Scoped packages --- diff --git a/deps/npm/docs/content/using-npm/scripts.md b/deps/npm/docs/content/using-npm/scripts.md index cf4a4284e4cc96..df4e1fcc754d38 100644 --- a/deps/npm/docs/content/using-npm/scripts.md +++ b/deps/npm/docs/content/using-npm/scripts.md @@ -1,5 +1,5 @@ --- -title: scripts +title: Scripts section: 7 description: How npm handles the "scripts" field --- diff --git a/deps/npm/docs/content/using-npm/workspaces.md b/deps/npm/docs/content/using-npm/workspaces.md index 91d0f99745a250..57344341be76c3 100644 --- a/deps/npm/docs/content/using-npm/workspaces.md +++ b/deps/npm/docs/content/using-npm/workspaces.md @@ -1,5 +1,5 @@ --- -title: workspaces +title: Workspaces section: 7 description: Working with workspaces --- diff --git a/deps/npm/docs/lib/index.js b/deps/npm/docs/lib/index.js index 5e40f48882cad4..1056fd4e120fc8 100644 --- a/deps/npm/docs/lib/index.js +++ b/deps/npm/docs/lib/index.js @@ -22,7 +22,38 @@ const assertPlaceholder = (src, path, placeholder) => { return placeholder } -const getCommandByDoc = (docFile, docExt) => { +// Default command loader - loads commands from lib/commands +const defaultCommandLoader = (name) => { + return require(`../../lib/commands/${name}`) +} + +// Load a command using the provided loader or default +const getCommand = (name, commandLoader = defaultCommandLoader) => { + return commandLoader(name) +} + +// Resolve definitions for a command - use definitions if present, otherwise build from params +const resolveDefinitions = (command) => { + // If command has definitions, use them directly (ignore params) + if (command.definitions && Object.keys(command.definitions).length > 0) { + return command.definitions + } + + // Otherwise build from params using global definitions + if (command.params) { + const resolved = {} + for (const param of command.params) { + if (definitions[param]) { + resolved[param] = definitions[param] + } + } + return resolved + } + + return {} +} + +const getCommandByDoc = (docFile, docExt, commandLoader = defaultCommandLoader) => { // Grab the command name from the *.md filename // NOTE: We cannot use the name property command file because in the case of // `npx` the file being used is `lib/commands/exec.js` @@ -31,7 +62,7 @@ const getCommandByDoc = (docFile, docExt) => { if (name === 'npm') { return { name, - params: null, + definitions: [], usage: 'npm', } } @@ -40,15 +71,20 @@ const getCommandByDoc = (docFile, docExt) => { // `npx` is not technically a command in and of itself, // so it just needs the usage of npm exec const srcName = name === 'npx' ? 'exec' : name - const { params, usage = [''], workspaces } = require(`../../lib/commands/${srcName}`) + const command = getCommand(srcName, commandLoader) + const { usage = [''], workspaces } = command const usagePrefix = name === 'npx' ? 'npx' : `npm ${name}` - if (params) { - for (const param of params) { - if (definitions[param].exclusive) { - for (const e of definitions[param].exclusive) { - if (!params.includes(e)) { - params.splice(params.indexOf(param) + 1, 0, e) - } + + // Resolve definitions - handles exclusive params expansion + const commandDefs = resolveDefinitions(command) + const resolvedDefs = {} + for (const [key, def] of Object.entries(commandDefs)) { + resolvedDefs[key] = def + // Handle exclusive params + if (def.exclusive) { + for (const e of def.exclusive) { + if (!resolvedDefs[e] && definitions[e]) { + resolvedDefs[e] = definitions[e] } } } @@ -57,16 +93,16 @@ const getCommandByDoc = (docFile, docExt) => { return { name, workspaces, - params: name === 'npx' ? null : params, + definitions: name === 'npx' ? {} : resolvedDefs, usage: usage.map(u => `${usagePrefix} ${u}`.trim()).join('\n'), } } const replaceVersion = (src) => src.replace(/@VERSION@/g, version) -const replaceUsage = (src, { path }) => { +const replaceUsage = (src, { path, commandLoader }) => { const replacer = assertPlaceholder(src, path, TAGS.USAGE) - const { usage, name, workspaces } = getCommandByDoc(path, DOC_EXT) + const { usage, name, workspaces } = getCommandByDoc(path, DOC_EXT, commandLoader) const synopsis = ['```bash', usage] @@ -92,17 +128,95 @@ const replaceUsage = (src, { path }) => { return src.replace(replacer, synopsis.join('\n')) } -const replaceParams = (src, { path }) => { - const { params } = getCommandByDoc(path, DOC_EXT) - const replacer = params && assertPlaceholder(src, path, TAGS.CONFIG) +// Helper to generate a markdown table from definitions +const generateFlagsTable = (definitionPool) => { + const rows = Object.keys(definitionPool).map((n) => { + const def = definitionPool[n] + const flags = [`\`--${def.key}\``] + if (def.alias) { + flags.push(...def.alias.map(a => `\`--${a}\``)) + } + if (def.short) { + flags.push(`\`-${def.short}\``) + } + const flagsStr = flags.join(', ') + let defaultVal = def.defaultDescription + if (!defaultVal) { + defaultVal = String(def.default) + } + let typeVal = def.typeDescription || String(def.type) + if (def.required) { + typeVal = `${typeVal} (required)` + } + const desc = (def.description || '').replace(/\n/g, ' ').trim() + return `| ${flagsStr} | ${defaultVal} | ${typeVal} | ${desc} |` + }) + + return [ + '| Flag | Default | Type | Description |', + '| --- | --- | --- | --- |', + ...rows, + ].join('\n') +} + +const replaceDefinitions = (src, { path, commandLoader }) => { + const { definitions: commandDefs, name } = getCommandByDoc(path, DOC_EXT, commandLoader) - if (!params) { + let subcommands = {} + try { + const command = getCommand(name, commandLoader) + subcommands = command.subcommands || {} + } catch { + // Command doesn't exist + } + + // If no definitions and no subcommands, nothing to replace + if (Object.keys(commandDefs).length === 0 && Object.keys(subcommands).length === 0) { return src } - const paramsConfig = params.map((n) => definitions[n].describe()) + // Assert placeholder is present + const replacer = assertPlaceholder(src, path, TAGS.CONFIG) + + // If command has subcommands, generate sections for each subcommand + if (Object.keys(subcommands).length > 0) { + const subcommandSections = Object.entries(subcommands).map(([subName, SubCommand]) => { + const subUsage = SubCommand.usage || [] + const subDefs = resolveDefinitions(SubCommand) + + const parts = [`### \`npm ${name} ${subName}\``, ''] + + if (SubCommand.description) { + parts.push(SubCommand.description, '') + } + + // Add usage/synopsis + if (subUsage.length > 0) { + parts.push('#### Synopsis', '', '```bash') + subUsage.forEach(u => { + parts.push(`npm ${name} ${subName} ${u}`.trim()) + }) + parts.push('```', '') + } + + // Add flags section if definitions exist + if (Object.keys(subDefs).length > 0) { + parts.push('#### Flags', '') + parts.push(generateFlagsTable(subDefs), '') + } + + return parts.join('\n') + }) + + return src.replace(replacer, subcommandSections.join('\n')) + } + + // For commands without subcommands - commandDefs must be non-empty here + // (we would have returned early at line 175 if both were empty) + const paramDescriptions = Object.values(commandDefs) + .map(def => def.describe()) - return src.replace(replacer, paramsConfig.join('\n\n')) + return src.replace(replacer, paramDescriptions.join('\n\n')) } const replaceConfig = (src, { path }) => { @@ -177,7 +291,7 @@ module.exports = { md: resolve(__dirname, '..', 'content'), }, usage: replaceUsage, - params: replaceParams, + definitions: replaceDefinitions, config: replaceConfig, shorthands: replaceShorthands, version: replaceVersion, diff --git a/deps/npm/docs/output/commands/npm-access.html b/deps/npm/docs/output/commands/npm-access.html index 1da6de86e92f16..90181343fd63b5 100644 --- a/deps/npm/docs/output/commands/npm-access.html +++ b/deps/npm/docs/output/commands/npm-access.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-access - @11.9.0 + @11.10.1

Set access level on published packages
diff --git a/deps/npm/docs/output/commands/npm-adduser.html b/deps/npm/docs/output/commands/npm-adduser.html index 322e00aaa1f020..956502bf1b6207 100644 --- a/deps/npm/docs/output/commands/npm-adduser.html +++ b/deps/npm/docs/output/commands/npm-adduser.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-adduser - @11.9.0 + @11.10.1

Add a registry user account
diff --git a/deps/npm/docs/output/commands/npm-audit.html b/deps/npm/docs/output/commands/npm-audit.html index cd42c291280ab6..79ed03d6686cb9 100644 --- a/deps/npm/docs/output/commands/npm-audit.html +++ b/deps/npm/docs/output/commands/npm-audit.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-audit - @11.9.0 + @11.10.1

Run a security audit
diff --git a/deps/npm/docs/output/commands/npm-bugs.html b/deps/npm/docs/output/commands/npm-bugs.html index d3b99f599f9aa7..7c6d75eba89295 100644 --- a/deps/npm/docs/output/commands/npm-bugs.html +++ b/deps/npm/docs/output/commands/npm-bugs.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-bugs - @11.9.0 + @11.10.1

Report bugs for a package in a web browser
diff --git a/deps/npm/docs/output/commands/npm-cache.html b/deps/npm/docs/output/commands/npm-cache.html index 0ca1eb96b626d4..bcc06a488fe1c5 100644 --- a/deps/npm/docs/output/commands/npm-cache.html +++ b/deps/npm/docs/output/commands/npm-cache.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-cache - @11.9.0 + @11.10.1

Manipulates packages cache
diff --git a/deps/npm/docs/output/commands/npm-ci.html b/deps/npm/docs/output/commands/npm-ci.html index bef881d75a5d61..83c37a17abf54e 100644 --- a/deps/npm/docs/output/commands/npm-ci.html +++ b/deps/npm/docs/output/commands/npm-ci.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-ci - @11.9.0 + @11.10.1

Clean install a project
diff --git a/deps/npm/docs/output/commands/npm-completion.html b/deps/npm/docs/output/commands/npm-completion.html index ad634df2861a7f..a6f617636a87e4 100644 --- a/deps/npm/docs/output/commands/npm-completion.html +++ b/deps/npm/docs/output/commands/npm-completion.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-completion - @11.9.0 + @11.10.1

Tab Completion for npm
diff --git a/deps/npm/docs/output/commands/npm-config.html b/deps/npm/docs/output/commands/npm-config.html index 2d66941aa102fc..acc2e26ffdfa1f 100644 --- a/deps/npm/docs/output/commands/npm-config.html +++ b/deps/npm/docs/output/commands/npm-config.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-config - @11.9.0 + @11.10.1

Manage the npm configuration files
diff --git a/deps/npm/docs/output/commands/npm-dedupe.html b/deps/npm/docs/output/commands/npm-dedupe.html index 464824c3df549b..2a19d893e7c18a 100644 --- a/deps/npm/docs/output/commands/npm-dedupe.html +++ b/deps/npm/docs/output/commands/npm-dedupe.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-dedupe - @11.9.0 + @11.10.1

Reduce duplication in the package tree
diff --git a/deps/npm/docs/output/commands/npm-deprecate.html b/deps/npm/docs/output/commands/npm-deprecate.html index 222abc661845d3..654943740ec3d6 100644 --- a/deps/npm/docs/output/commands/npm-deprecate.html +++ b/deps/npm/docs/output/commands/npm-deprecate.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-deprecate - @11.9.0 + @11.10.1

Deprecate a version of a package
diff --git a/deps/npm/docs/output/commands/npm-diff.html b/deps/npm/docs/output/commands/npm-diff.html index 07a357bc56933b..846e5a9b1736b0 100644 --- a/deps/npm/docs/output/commands/npm-diff.html +++ b/deps/npm/docs/output/commands/npm-diff.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-diff - @11.9.0 + @11.10.1

The registry diff command
diff --git a/deps/npm/docs/output/commands/npm-dist-tag.html b/deps/npm/docs/output/commands/npm-dist-tag.html index 97995eac91b150..8886ba8d211428 100644 --- a/deps/npm/docs/output/commands/npm-dist-tag.html +++ b/deps/npm/docs/output/commands/npm-dist-tag.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-dist-tag - @11.9.0 + @11.10.1

Modify package distribution tags
diff --git a/deps/npm/docs/output/commands/npm-docs.html b/deps/npm/docs/output/commands/npm-docs.html index ac7bc097bfb2df..618255cc441c08 100644 --- a/deps/npm/docs/output/commands/npm-docs.html +++ b/deps/npm/docs/output/commands/npm-docs.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-docs - @11.9.0 + @11.10.1

Open documentation for a package in a web browser
diff --git a/deps/npm/docs/output/commands/npm-doctor.html b/deps/npm/docs/output/commands/npm-doctor.html index 71fdd3be8525a5..1ea36dbafb4ddc 100644 --- a/deps/npm/docs/output/commands/npm-doctor.html +++ b/deps/npm/docs/output/commands/npm-doctor.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-doctor - @11.9.0 + @11.10.1

Check the health of your npm environment
diff --git a/deps/npm/docs/output/commands/npm-edit.html b/deps/npm/docs/output/commands/npm-edit.html index a1fa166681c3c1..2b80cbc4c58e7d 100644 --- a/deps/npm/docs/output/commands/npm-edit.html +++ b/deps/npm/docs/output/commands/npm-edit.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-edit - @11.9.0 + @11.10.1

Edit an installed package
diff --git a/deps/npm/docs/output/commands/npm-exec.html b/deps/npm/docs/output/commands/npm-exec.html index b910df4d695112..e940ef5eeca6a8 100644 --- a/deps/npm/docs/output/commands/npm-exec.html +++ b/deps/npm/docs/output/commands/npm-exec.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-exec - @11.9.0 + @11.10.1

Run a command from a local or remote npm package
diff --git a/deps/npm/docs/output/commands/npm-explain.html b/deps/npm/docs/output/commands/npm-explain.html index ba1a17bbd893e7..143c532fad04a7 100644 --- a/deps/npm/docs/output/commands/npm-explain.html +++ b/deps/npm/docs/output/commands/npm-explain.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-explain - @11.9.0 + @11.10.1

Explain installed packages
diff --git a/deps/npm/docs/output/commands/npm-explore.html b/deps/npm/docs/output/commands/npm-explore.html index 0be4fd5138ee6f..96e7944d88bc03 100644 --- a/deps/npm/docs/output/commands/npm-explore.html +++ b/deps/npm/docs/output/commands/npm-explore.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-explore - @11.9.0 + @11.10.1

Browse an installed package
diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html index 7255d6df7b1b55..a383932c3fd7bd 100644 --- a/deps/npm/docs/output/commands/npm-find-dupes.html +++ b/deps/npm/docs/output/commands/npm-find-dupes.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-find-dupes - @11.9.0 + @11.10.1

Find duplication in the package tree
diff --git a/deps/npm/docs/output/commands/npm-fund.html b/deps/npm/docs/output/commands/npm-fund.html index bd22701dcc9344..4d46b59e79f492 100644 --- a/deps/npm/docs/output/commands/npm-fund.html +++ b/deps/npm/docs/output/commands/npm-fund.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-fund - @11.9.0 + @11.10.1

Retrieve funding information
diff --git a/deps/npm/docs/output/commands/npm-get.html b/deps/npm/docs/output/commands/npm-get.html new file mode 100644 index 00000000000000..f66d2d8cf61aad --- /dev/null +++ b/deps/npm/docs/output/commands/npm-get.html @@ -0,0 +1,231 @@ + + +npm-get + + + + + +
+
+

+ npm-get + @11.10.1 +

+Get a value from the npm configuration +
+ +
+

Table of contents

+ +
+ +

Synopsis

+
npm get [<key> ...] (See `npm config`)
+
+

Note: This command is unaware of workspaces.

+

Description

+

Get a value from the npm configuration

+

Configuration

+

long

+
    +
  • Default: false
  • +
  • Type: Boolean
  • +
+

Show extended information in ls, search, and help-search.

+

See Also

+
+ + +
+ + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-help-search.html b/deps/npm/docs/output/commands/npm-help-search.html index a1f151d902bc33..1e09e109da2750 100644 --- a/deps/npm/docs/output/commands/npm-help-search.html +++ b/deps/npm/docs/output/commands/npm-help-search.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-help-search - @11.9.0 + @11.10.1

Search npm help documentation
diff --git a/deps/npm/docs/output/commands/npm-help.html b/deps/npm/docs/output/commands/npm-help.html index b7db12a84ed902..6822feba0d3913 100644 --- a/deps/npm/docs/output/commands/npm-help.html +++ b/deps/npm/docs/output/commands/npm-help.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-help - @11.9.0 + @11.10.1

Get help on npm
diff --git a/deps/npm/docs/output/commands/npm-init.html b/deps/npm/docs/output/commands/npm-init.html index 81f614100155d6..8050ea825b69ac 100644 --- a/deps/npm/docs/output/commands/npm-init.html +++ b/deps/npm/docs/output/commands/npm-init.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-init - @11.9.0 + @11.10.1

Create a package.json file
diff --git a/deps/npm/docs/output/commands/npm-install-ci-test.html b/deps/npm/docs/output/commands/npm-install-ci-test.html index 266cbcdd9926ec..610ee0882ad298 100644 --- a/deps/npm/docs/output/commands/npm-install-ci-test.html +++ b/deps/npm/docs/output/commands/npm-install-ci-test.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
-

+

npm-install-ci-test - @11.9.0 + @11.10.1

Install a project with a clean slate and run tests
diff --git a/deps/npm/docs/output/commands/npm-install-test.html b/deps/npm/docs/output/commands/npm-install-test.html index d1ff6afe7ffb4f..900baed5d7b51e 100644 --- a/deps/npm/docs/output/commands/npm-install-test.html +++ b/deps/npm/docs/output/commands/npm-install-test.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
-

+

npm-install-test - @11.9.0 + @11.10.1

Install package(s) and run tests

Table of contents

- +

Synopsis

@@ -344,6 +389,19 @@

before

--before filter, the most recent version less than or equal to that tag will be used. For example, foo@latest might install foo@1.2 even though latest is 2.0.

+

This config cannot be used with: min-release-age

+

min-release-age

+
    +
  • Default: null
  • +
  • Type: null or Number
  • +
+

If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

+

This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

+

This config cannot be used with: before

  • Default: true
  • diff --git a/deps/npm/docs/output/commands/npm-install.html b/deps/npm/docs/output/commands/npm-install.html index 4f73d9c724da86..5d0674df08e57b 100644 --- a/deps/npm/docs/output/commands/npm-install.html +++ b/deps/npm/docs/output/commands/npm-install.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
    -

    +

    npm-install - @11.9.0 + @11.10.1

    Install a package

    Table of contents

    - +

    Synopsis

    @@ -619,6 +664,19 @@

    before

    --before filter, the most recent version less than or equal to that tag will be used. For example, foo@latest might install foo@1.2 even though latest is 2.0.

    +

    This config cannot be used with: min-release-age

    +

    min-release-age

    +
      +
    • Default: null
    • +
    • Type: null or Number
    • +
    +

    If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

    +

    This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

    +

    This config cannot be used with: before

    • Default: true
    • diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html index 218266435a99c2..f0aa834a2be0ee 100644 --- a/deps/npm/docs/output/commands/npm-link.html +++ b/deps/npm/docs/output/commands/npm-link.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-link - @11.9.0 + @11.10.1

      Symlink a package folder
      diff --git a/deps/npm/docs/output/commands/npm-ll.html b/deps/npm/docs/output/commands/npm-ll.html new file mode 100644 index 00000000000000..62043a5e166799 --- /dev/null +++ b/deps/npm/docs/output/commands/npm-ll.html @@ -0,0 +1,381 @@ + + +npm-ll + + + + + +
      +
      +

      + npm-ll + @11.10.1 +

      +List installed packages +
      + +
      +

      Table of contents

      + +
      + +

      Synopsis

      +
      npm ll [[<@scope>/]<pkg> ...]
      +
      +alias: la
      +
      +

      Description

      +

      List installed packages

      +

      Configuration

      +

      all

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      When running npm outdated and npm ls, setting --all will show all +outdated or installed packages, rather than only those directly depended +upon by the current project.

      +

      json

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Whether or not to output JSON data, rather than the normal output.

      +
        +
      • In npm pkg set it enables parsing set values with JSON.parse() before +saving them to your package.json.
      • +
      +

      Not supported by all npm commands.

      +

      long

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Show extended information in ls, search, and help-search.

      +

      parseable

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Output parseable results from commands that write to standard output. For +npm search, this will be tab-separated table format.

      +

      global

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Operates in "global" mode, so that packages are installed into the prefix +folder instead of the current working directory. See +folders for more on the differences in behavior.

      +
        +
      • packages are installed into the {prefix}/lib/node_modules folder, instead +of the current working directory.
      • +
      • bin files are linked to {prefix}/bin
      • +
      • man pages are linked to {prefix}/share/man
      • +
      +

      depth

      +
        +
      • Default: Infinity if --all is set; otherwise, 0
      • +
      • Type: null or Number
      • +
      +

      The depth to go when recursing packages for npm ls.

      +

      If not set, npm ls will show only the immediate dependencies of the root +project. If --all is set, then npm will show all dependencies by default.

      +

      omit

      +
        +
      • Default: 'dev' if the NODE_ENV environment variable is set to +'production'; otherwise, empty.
      • +
      • Type: "dev", "optional", or "peer" (can be set multiple times)
      • +
      +

      Dependency types to omit from the installation tree on disk.

      +

      Note that these dependencies are still resolved and added to the +package-lock.json or npm-shrinkwrap.json file. They are just not +physically installed on disk.

      +

      If a package type appears in both the --include and --omit lists, then +it will be included.

      +

      If the resulting omit list includes 'dev', then the NODE_ENV environment +variable will be set to 'production' for all lifecycle scripts.

      +

      include

      +
        +
      • Default:
      • +
      • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
      • +
      +

      Option that allows for defining which types of dependencies to install.

      +

      This is the inverse of --omit=<type>.

      +

      Dependency types specified in --include will not be omitted, regardless of +the order in which omit/include are specified on the command-line.

      + +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Used with npm ls, limiting output to only those packages that are linked.

      +

      package-lock-only

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      If set to true, the current operation will only use the package-lock.json, +ignoring node_modules.

      +

      For update this means only the package-lock.json will be updated, +instead of checking node_modules and downloading dependencies.

      +

      For list this means the output will be based on the tree described by the +package-lock.json, rather than the contents of node_modules.

      +

      unicode

      +
        +
      • Default: false on windows, true on mac/unix systems with a unicode locale, +as defined by the LC_ALL, LC_CTYPE, or LANG environment variables.
      • +
      • Type: Boolean
      • +
      +

      When set to true, npm uses unicode characters in the tree output. When +false, it uses ascii characters instead of unicode glyphs.

      +

      workspace

      +
        +
      • Default:
      • +
      • Type: String (can be set multiple times)
      • +
      +

      Enable running a command in the context of the configured workspaces of the +current project while filtering by running only the workspaces defined by +this configuration option.

      +

      Valid values for the workspace config are either:

      +
        +
      • Workspace names
      • +
      • Path to a workspace directory
      • +
      • Path to a parent workspace directory (will result in selecting all +workspaces within that folder)
      • +
      +

      When set for the npm init command, this may be set to the folder of a +workspace which does not yet exist, to create the folder and set it up as a +brand new workspace within the project.

      +

      This value is not exported to the environment for child processes.

      +

      workspaces

      +
        +
      • Default: null
      • +
      • Type: null or Boolean
      • +
      +

      Set to true to run the command in the context of all configured +workspaces.

      +

      Explicitly setting this to false will cause commands like install to +ignore workspaces altogether. When not set explicitly:

      +
        +
      • Commands that operate on the node_modules tree (install, update, etc.) +will link workspaces into the node_modules folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +unless one or more workspaces are specified in the workspace config.
      • +
      +

      This value is not exported to the environment for child processes.

      +

      include-workspace-root

      +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      Include the workspace root when workspaces are enabled for a command.

      +

      When false, specifying individual workspaces via the workspace config, or +all workspaces via the workspaces flag, will cause npm to operate only on +the specified workspaces, and not on the root project.

      +

      This value is not exported to the environment for child processes.

      + +
        +
      • Default: false
      • +
      • Type: Boolean
      • +
      +

      When set file: protocol dependencies will be packed and installed as regular +dependencies instead of creating a symlink. This option has no effect on +workspaces.

      +

      See Also

      +
      + + +
      + + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-login.html b/deps/npm/docs/output/commands/npm-login.html index 7dd5cb2ef79d60..85063b721fb505 100644 --- a/deps/npm/docs/output/commands/npm-login.html +++ b/deps/npm/docs/output/commands/npm-login.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-login - @11.9.0 + @11.10.1

      Login to a registry user account
      diff --git a/deps/npm/docs/output/commands/npm-logout.html b/deps/npm/docs/output/commands/npm-logout.html index 9b50bcf4454ba4..00e61124397413 100644 --- a/deps/npm/docs/output/commands/npm-logout.html +++ b/deps/npm/docs/output/commands/npm-logout.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-logout - @11.9.0 + @11.10.1

      Log out of the registry
      diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 2d67e02415fbe7..a410ba31d0d5dc 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-ls - @11.9.0 + @11.10.1

      List installed packages
      @@ -164,7 +209,7 @@

      Description

      Positional arguments are name@version-range identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

      -
      npm@11.9.0 /path/to/npm
      +
      npm@11.10.1 /path/to/npm
       └─┬ init-package-json@0.0.4
         └── promzard@0.1.5
       
      diff --git a/deps/npm/docs/output/commands/npm-org.html b/deps/npm/docs/output/commands/npm-org.html index 751ea80aabe5e2..054dbecf15819a 100644 --- a/deps/npm/docs/output/commands/npm-org.html +++ b/deps/npm/docs/output/commands/npm-org.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-org - @11.9.0 + @11.10.1

      Manage orgs
      diff --git a/deps/npm/docs/output/commands/npm-outdated.html b/deps/npm/docs/output/commands/npm-outdated.html index 43da9712f64cb4..0ee5d927bbda5c 100644 --- a/deps/npm/docs/output/commands/npm-outdated.html +++ b/deps/npm/docs/output/commands/npm-outdated.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
      -

      +

      npm-outdated - @11.9.0 + @11.10.1

      Check for outdated packages

      Table of contents

      - +

      Synopsis

      @@ -283,6 +328,19 @@

      before

      --before filter, the most recent version less than or equal to that tag will be used. For example, foo@latest might install foo@1.2 even though latest is 2.0.

      +

      This config cannot be used with: min-release-age

      +

      min-release-age

      +
        +
      • Default: null
      • +
      • Type: null or Number
      • +
      +

      If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

      +

      This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

      +

      This config cannot be used with: before

      See Also

      • package spec
      • diff --git a/deps/npm/docs/output/commands/npm-owner.html b/deps/npm/docs/output/commands/npm-owner.html index c29650dc924105..b4cda07e5bc5ac 100644 --- a/deps/npm/docs/output/commands/npm-owner.html +++ b/deps/npm/docs/output/commands/npm-owner.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-owner - @11.9.0 + @11.10.1

        Manage package owners
        diff --git a/deps/npm/docs/output/commands/npm-pack.html b/deps/npm/docs/output/commands/npm-pack.html index 557957f2576548..fa15bdbd453cac 100644 --- a/deps/npm/docs/output/commands/npm-pack.html +++ b/deps/npm/docs/output/commands/npm-pack.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-pack - @11.9.0 + @11.10.1

        Create a tarball from a package
        diff --git a/deps/npm/docs/output/commands/npm-ping.html b/deps/npm/docs/output/commands/npm-ping.html index cbc09575ebddb8..123a1c4712c950 100644 --- a/deps/npm/docs/output/commands/npm-ping.html +++ b/deps/npm/docs/output/commands/npm-ping.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-ping - @11.9.0 + @11.10.1

        Ping npm registry
        diff --git a/deps/npm/docs/output/commands/npm-pkg.html b/deps/npm/docs/output/commands/npm-pkg.html index 5b969756e85d53..7119e4073027f0 100644 --- a/deps/npm/docs/output/commands/npm-pkg.html +++ b/deps/npm/docs/output/commands/npm-pkg.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-pkg - @11.9.0 + @11.10.1

        Manages your package.json
        diff --git a/deps/npm/docs/output/commands/npm-prefix.html b/deps/npm/docs/output/commands/npm-prefix.html index 1fa84497d5431d..14b06ca7e096db 100644 --- a/deps/npm/docs/output/commands/npm-prefix.html +++ b/deps/npm/docs/output/commands/npm-prefix.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-prefix - @11.9.0 + @11.10.1

        Display prefix
        diff --git a/deps/npm/docs/output/commands/npm-profile.html b/deps/npm/docs/output/commands/npm-profile.html index 100df963676466..39b5ff54e8df49 100644 --- a/deps/npm/docs/output/commands/npm-profile.html +++ b/deps/npm/docs/output/commands/npm-profile.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-profile - @11.9.0 + @11.10.1

        Change settings on your registry profile
        diff --git a/deps/npm/docs/output/commands/npm-prune.html b/deps/npm/docs/output/commands/npm-prune.html index b0c0f81932eead..06d1002b03758d 100644 --- a/deps/npm/docs/output/commands/npm-prune.html +++ b/deps/npm/docs/output/commands/npm-prune.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-prune - @11.9.0 + @11.10.1

        Remove extraneous packages
        diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html index ef6973b02b9b13..74701633ad7797 100644 --- a/deps/npm/docs/output/commands/npm-publish.html +++ b/deps/npm/docs/output/commands/npm-publish.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-publish - @11.9.0 + @11.10.1

        Publish a package
        diff --git a/deps/npm/docs/output/commands/npm-query.html b/deps/npm/docs/output/commands/npm-query.html index aa30ac76a35f71..8c96409f900de3 100644 --- a/deps/npm/docs/output/commands/npm-query.html +++ b/deps/npm/docs/output/commands/npm-query.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-query - @11.9.0 + @11.10.1

        Dependency selector query
        diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html index c3aee26c5275ee..8c4ad0790a5a62 100644 --- a/deps/npm/docs/output/commands/npm-rebuild.html +++ b/deps/npm/docs/output/commands/npm-rebuild.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-rebuild - @11.9.0 + @11.10.1

        Rebuild a package
        diff --git a/deps/npm/docs/output/commands/npm-repo.html b/deps/npm/docs/output/commands/npm-repo.html index ad6540a3c2869a..32f6cbf604dd7a 100644 --- a/deps/npm/docs/output/commands/npm-repo.html +++ b/deps/npm/docs/output/commands/npm-repo.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-repo - @11.9.0 + @11.10.1

        Open package repository page in the browser
        diff --git a/deps/npm/docs/output/commands/npm-restart.html b/deps/npm/docs/output/commands/npm-restart.html index 4685bd958617e8..cb82857ae8f7de 100644 --- a/deps/npm/docs/output/commands/npm-restart.html +++ b/deps/npm/docs/output/commands/npm-restart.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-restart - @11.9.0 + @11.10.1

        Restart a package
        diff --git a/deps/npm/docs/output/commands/npm-root.html b/deps/npm/docs/output/commands/npm-root.html index a3a8856b1b6172..2c50261bcdc338 100644 --- a/deps/npm/docs/output/commands/npm-root.html +++ b/deps/npm/docs/output/commands/npm-root.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-root - @11.9.0 + @11.10.1

        Display npm root
        diff --git a/deps/npm/docs/output/commands/npm-run.html b/deps/npm/docs/output/commands/npm-run.html index 11345b9c93ebf8..4de340a9d77b9c 100644 --- a/deps/npm/docs/output/commands/npm-run.html +++ b/deps/npm/docs/output/commands/npm-run.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-run - @11.9.0 + @11.10.1

        Run arbitrary package scripts
        diff --git a/deps/npm/docs/output/commands/npm-sbom.html b/deps/npm/docs/output/commands/npm-sbom.html index cca11e4f1fd0de..a537db9d25e56a 100644 --- a/deps/npm/docs/output/commands/npm-sbom.html +++ b/deps/npm/docs/output/commands/npm-sbom.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-sbom - @11.9.0 + @11.10.1

        Generate a Software Bill of Materials (SBOM)
        diff --git a/deps/npm/docs/output/commands/npm-search.html b/deps/npm/docs/output/commands/npm-search.html index a9482d48a3fcb2..54c434bab83a2d 100644 --- a/deps/npm/docs/output/commands/npm-search.html +++ b/deps/npm/docs/output/commands/npm-search.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-search - @11.9.0 + @11.10.1

        Search for packages
        diff --git a/deps/npm/docs/output/commands/npm-set.html b/deps/npm/docs/output/commands/npm-set.html new file mode 100644 index 00000000000000..59046e91191d64 --- /dev/null +++ b/deps/npm/docs/output/commands/npm-set.html @@ -0,0 +1,255 @@ + + +npm-set + + + + + +
        +
        +

        + npm-set + @11.10.1 +

        +Set a value in the npm configuration +
        + +
        +

        Table of contents

        + +
        + +

        Synopsis

        +
        npm set <key>=<value> [<key>=<value> ...] (See `npm config`)
        +
        +

        Note: This command is unaware of workspaces.

        +

        Description

        +

        Set a value in the npm configuration

        +

        Configuration

        +

        global

        +
          +
        • Default: false
        • +
        • Type: Boolean
        • +
        +

        Operates in "global" mode, so that packages are installed into the prefix +folder instead of the current working directory. See +folders for more on the differences in behavior.

        +
          +
        • packages are installed into the {prefix}/lib/node_modules folder, instead +of the current working directory.
        • +
        • bin files are linked to {prefix}/bin
        • +
        • man pages are linked to {prefix}/share/man
        • +
        +

        location

        +
          +
        • Default: "user" unless --global is passed, which will also set this value +to "global"
        • +
        • Type: "global", "user", or "project"
        • +
        +

        When passed to npm config this refers to which config file to use.

        +

        When set to "global" mode, packages are installed into the prefix folder +instead of the current working directory. See +folders for more on the differences in behavior.

        +
          +
        • packages are installed into the {prefix}/lib/node_modules folder, instead +of the current working directory.
        • +
        • bin files are linked to {prefix}/bin
        • +
        • man pages are linked to {prefix}/share/man
        • +
        +

        See Also

        +
        + + +
        + + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-shrinkwrap.html b/deps/npm/docs/output/commands/npm-shrinkwrap.html index 83929137a39b17..c0138b21952843 100644 --- a/deps/npm/docs/output/commands/npm-shrinkwrap.html +++ b/deps/npm/docs/output/commands/npm-shrinkwrap.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-shrinkwrap - @11.9.0 + @11.10.1

        Lock down dependency versions for publication
        diff --git a/deps/npm/docs/output/commands/npm-star.html b/deps/npm/docs/output/commands/npm-star.html index 26511206a26c22..684c1891120005 100644 --- a/deps/npm/docs/output/commands/npm-star.html +++ b/deps/npm/docs/output/commands/npm-star.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-star - @11.9.0 + @11.10.1

        Mark your favorite packages
        diff --git a/deps/npm/docs/output/commands/npm-stars.html b/deps/npm/docs/output/commands/npm-stars.html index 4d8b99572ac59d..56ef96e1a8b549 100644 --- a/deps/npm/docs/output/commands/npm-stars.html +++ b/deps/npm/docs/output/commands/npm-stars.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-stars - @11.9.0 + @11.10.1

        View packages marked as favorites
        diff --git a/deps/npm/docs/output/commands/npm-start.html b/deps/npm/docs/output/commands/npm-start.html index fdaf54fc3fd77c..9f9099ca7316b7 100644 --- a/deps/npm/docs/output/commands/npm-start.html +++ b/deps/npm/docs/output/commands/npm-start.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-start - @11.9.0 + @11.10.1

        Start a package
        diff --git a/deps/npm/docs/output/commands/npm-stop.html b/deps/npm/docs/output/commands/npm-stop.html index bcbcf51f73dbb6..79793beabb92a5 100644 --- a/deps/npm/docs/output/commands/npm-stop.html +++ b/deps/npm/docs/output/commands/npm-stop.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-stop - @11.9.0 + @11.10.1

        Stop a package
        diff --git a/deps/npm/docs/output/commands/npm-team.html b/deps/npm/docs/output/commands/npm-team.html index 837570bdce568d..63924d254cb689 100644 --- a/deps/npm/docs/output/commands/npm-team.html +++ b/deps/npm/docs/output/commands/npm-team.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-team - @11.9.0 + @11.10.1

        Manage organization teams and team memberships
        diff --git a/deps/npm/docs/output/commands/npm-test.html b/deps/npm/docs/output/commands/npm-test.html index 3e6e800e488840..8048ed0207905e 100644 --- a/deps/npm/docs/output/commands/npm-test.html +++ b/deps/npm/docs/output/commands/npm-test.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-test - @11.9.0 + @11.10.1

        Test a package
        diff --git a/deps/npm/docs/output/commands/npm-token.html b/deps/npm/docs/output/commands/npm-token.html index 538050266b88f0..b7441d2ca7ce9c 100644 --- a/deps/npm/docs/output/commands/npm-token.html +++ b/deps/npm/docs/output/commands/npm-token.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-token - @11.9.0 + @11.10.1

        Manage your authentication tokens
        diff --git a/deps/npm/docs/output/commands/npm-trust.html b/deps/npm/docs/output/commands/npm-trust.html new file mode 100644 index 00000000000000..3e00c001a8cf32 --- /dev/null +++ b/deps/npm/docs/output/commands/npm-trust.html @@ -0,0 +1,438 @@ + + +npm-trust + + + + + +
        +
        +

        + npm-trust + @11.10.1 +

        +Manage trusted publishing relationships between packages and CI/CD providers +
        + +
        +

        Table of contents

        + +
        + +

        Synopsis

        +
        npm trust
        +
        +

        Note: This command is unaware of workspaces.

        +

        Prerequisites

        +

        Before using npm trust commands, ensure the following requirements are met:

        +
          +
        • npm version: npm@11.10.0 or above is required. Use npm install -g npm@^11.10.0 to update if needed.
        • +
        • Write permissions on the package: You must have write access to the package you're configuring.
        • +
        • 2FA enabled on account: Two-factor authentication must be enabled at the account level. Even if it's not currently enabled, you must enable it to use trust commands.
        • +
        • Supported authentication methods: Granular Access Tokens (GAT) with the bypass 2FA option are not supported. Legacy basic auth (username and password) credentials will not work for trust commands or endpoints.
        • +
        • Package must exist: The package you're configuring must already exist on the npm registry.
        • +
        +

        Description

        +

        Configure trust relationships between npm packages and CI/CD providers using OpenID Connect (OIDC). This is the command-line equivalent of managing trusted publisher configurations on the npm website.

        +

        For a comprehensive overview of trusted publishing, see the npm trusted publishers documentation.

        +

        The [package] argument specifies the package name. If omitted, npm will use the name from the package.json in the current directory.

        +

        Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal—npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use npm trust <provider> --help.

        +

        The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the managing trusted publisher configurations section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the repository.url field from your package.json, if available.

        +

        Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration:

        +
          +
        1. Use npm trust list [package] to view the ID of the existing trusted publisher
        2. +
        3. Use npm trust revoke --id <id> [package] to remove the existing configuration
        4. +
        5. Then create your new trust relationship
        6. +
        +

        Bulk Usage

        +

        For maintainers managing a large number of packages, you can configure trusted publishing in bulk using bash scripting. Create a loop that iterates through package names and their corresponding configuration details, executing the npm trust <provider> command with the --yes flag for each package.

        +

        The first request will require two-factor authentication. During two-factor authentication, you'll see an option on the npm website to skip two-factor authentication for the next 5 minutes. Enabling this option will allow subsequent npm trust <provider> commands to proceed without two-factor authentication, streamlining the bulk configuration process.

        +

        We recommend adding a 2-second sleep between each call to avoid rate limiting. With this approach, you can configure approximately 80 packages within the 5-minute two-factor authentication skip window.

        +

        Configuration

        +

        npm trust github

        +

        Create a trusted relationship between a package and GitHub Actions

        +

        Synopsis

        +
        npm trust github [package] --file [--repo|--repository] [--env|--environment] [-y|--yes]
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --filenullString (required)Name of workflow file within a repositories .GitHub folder (must end in yaml, yml)
        --repository, --reponullStringName of the repository in the format owner/repo
        --environment, --envnullStringCI environment name
        --dry-runfalseBooleanIndicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, install, update, dedupe, uninstall, as well as pack and publish. Note: This is NOT honored by other network related commands, eg dist-tags, owner, etc.
        --jsonfalseBooleanWhether or not to output JSON data, rather than the normal output. * In npm pkg set it enables parsing set values with JSON.parse() before saving them to your package.json. Not supported by all npm commands.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        --yes, -ynullnull or BooleanAutomatically answer "yes" to any prompts that npm might print on the command line.
        +

        npm trust gitlab

        +

        Create a trusted relationship between a package and GitLab CI/CD

        +

        Synopsis

        +
        npm trust gitlab [package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes]
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --filenullString (required)Name of pipeline file (e.g., .gitlab-ci.yml)
        --projectnullStringName of the project in the format group/project or group/subgroup/project
        --environment, --envnullStringCI environment name
        --dry-runfalseBooleanIndicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, install, update, dedupe, uninstall, as well as pack and publish. Note: This is NOT honored by other network related commands, eg dist-tags, owner, etc.
        --jsonfalseBooleanWhether or not to output JSON data, rather than the normal output. * In npm pkg set it enables parsing set values with JSON.parse() before saving them to your package.json. Not supported by all npm commands.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        --yes, -ynullnull or BooleanAutomatically answer "yes" to any prompts that npm might print on the command line.
        +

        npm trust list

        +

        List trusted relationships for a package

        +

        Synopsis

        +
        npm trust list [package]
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --jsonfalseBooleanWhether or not to output JSON data, rather than the normal output. * In npm pkg set it enables parsing set values with JSON.parse() before saving them to your package.json. Not supported by all npm commands.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        +

        npm trust revoke

        +

        Revoke a trusted relationship for a package

        +

        Synopsis

        +
        npm trust revoke [package] --id=<trust-id>
        +
        +

        Flags

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FlagDefaultTypeDescription
        --idnullString (required)ID of the trusted relationship to revoke
        --dry-runfalseBooleanIndicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, install, update, dedupe, uninstall, as well as pack and publish. Note: This is NOT honored by other network related commands, eg dist-tags, owner, etc.
        --registry"https://registry.npmjs.org/"URLThe base URL of the npm registry.
        +

        See Also

        +
        + + +
        + + + + \ No newline at end of file diff --git a/deps/npm/docs/output/commands/npm-undeprecate.html b/deps/npm/docs/output/commands/npm-undeprecate.html index b4be55e168b585..531199eab9e445 100644 --- a/deps/npm/docs/output/commands/npm-undeprecate.html +++ b/deps/npm/docs/output/commands/npm-undeprecate.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-undeprecate - @11.9.0 + @11.10.1

        Undeprecate a version of a package
        diff --git a/deps/npm/docs/output/commands/npm-uninstall.html b/deps/npm/docs/output/commands/npm-uninstall.html index 44e9cf7c2aa3ed..f63f38bcc009fc 100644 --- a/deps/npm/docs/output/commands/npm-uninstall.html +++ b/deps/npm/docs/output/commands/npm-uninstall.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-uninstall - @11.9.0 + @11.10.1

        Remove a package
        diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html index 2e22356936185c..c7e160999c35ec 100644 --- a/deps/npm/docs/output/commands/npm-unpublish.html +++ b/deps/npm/docs/output/commands/npm-unpublish.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-unpublish - @11.9.0 + @11.10.1

        Remove a package from the registry
        diff --git a/deps/npm/docs/output/commands/npm-unstar.html b/deps/npm/docs/output/commands/npm-unstar.html index 8ecc9dd29d998a..c2172972b3e376 100644 --- a/deps/npm/docs/output/commands/npm-unstar.html +++ b/deps/npm/docs/output/commands/npm-unstar.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        npm-unstar - @11.9.0 + @11.10.1

        Remove an item from your favorite packages
        diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html index 36918bdfe28faa..938112559a8c25 100644 --- a/deps/npm/docs/output/commands/npm-update.html +++ b/deps/npm/docs/output/commands/npm-update.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,16 +186,16 @@
        -

        +

        npm-update - @11.9.0 + @11.10.1

        Update packages

        Table of contents

        - +

        Synopsis

        @@ -384,6 +429,19 @@

        before

        --before filter, the most recent version less than or equal to that tag will be used. For example, foo@latest might install foo@1.2 even though latest is 2.0.

        +

        This config cannot be used with: min-release-age

        +

        min-release-age

        +
          +
        • Default: null
        • +
        • Type: null or Number
        • +
        +

        If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

        +

        This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

        +

        This config cannot be used with: before

        • Default: true
        • diff --git a/deps/npm/docs/output/commands/npm-version.html b/deps/npm/docs/output/commands/npm-version.html index def26114efa130..6ebd1337d2ad14 100644 --- a/deps/npm/docs/output/commands/npm-version.html +++ b/deps/npm/docs/output/commands/npm-version.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm-version - @11.9.0 + @11.10.1

          Bump a package version
          diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html index ff28bddcc77722..cdc11e95cb90fb 100644 --- a/deps/npm/docs/output/commands/npm-view.html +++ b/deps/npm/docs/output/commands/npm-view.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm-view - @11.9.0 + @11.10.1

          View registry info
          diff --git a/deps/npm/docs/output/commands/npm-whoami.html b/deps/npm/docs/output/commands/npm-whoami.html index 90eefca7360055..af3cfa49551d24 100644 --- a/deps/npm/docs/output/commands/npm-whoami.html +++ b/deps/npm/docs/output/commands/npm-whoami.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm-whoami - @11.9.0 + @11.10.1

          Display npm username
          diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index 3236401d1e4096..d4e4d0e33e16ae 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
          -

          +

          npm - @11.9.0 + @11.10.1

          javascript package manager
          @@ -158,7 +203,7 @@

          Table of contents

      Note: This command is unaware of workspaces.

      Version

      -

      11.9.0

      +

      11.10.1

      Description

      npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.

      diff --git a/deps/npm/docs/output/commands/npx.html b/deps/npm/docs/output/commands/npx.html index c3ab304803e6b4..0b5b9dbde9d785 100644 --- a/deps/npm/docs/output/commands/npx.html +++ b/deps/npm/docs/output/commands/npx.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npx - @11.9.0 + @11.10.1

      Run a command from a local or remote npm package
      diff --git a/deps/npm/docs/output/configuring-npm/folders.html b/deps/npm/docs/output/configuring-npm/folders.html index ad588e49d6601c..a8dfc978f4353d 100644 --- a/deps/npm/docs/output/configuring-npm/folders.html +++ b/deps/npm/docs/output/configuring-npm/folders.html @@ -1,6 +1,6 @@ -folders +Folders @@ -141,11 +186,11 @@
      -

      - folders - @11.9.0 +

      + Folders + @11.10.1

      -Folder Structures Used by npm +Folder structures used by npm
      diff --git a/deps/npm/docs/output/configuring-npm/install.html b/deps/npm/docs/output/configuring-npm/install.html index 75075d822fad4d..ac078eefc99d0a 100644 --- a/deps/npm/docs/output/configuring-npm/install.html +++ b/deps/npm/docs/output/configuring-npm/install.html @@ -1,6 +1,6 @@ -install +Install @@ -141,9 +186,9 @@
      -

      - install - @11.9.0 +

      + Install + @11.10.1

      Download and install node and npm
      diff --git a/deps/npm/docs/output/configuring-npm/npm-global.html b/deps/npm/docs/output/configuring-npm/npm-global.html index ad588e49d6601c..a8dfc978f4353d 100644 --- a/deps/npm/docs/output/configuring-npm/npm-global.html +++ b/deps/npm/docs/output/configuring-npm/npm-global.html @@ -1,6 +1,6 @@ -folders +Folders @@ -141,11 +186,11 @@
      -

      - folders - @11.9.0 +

      + Folders + @11.10.1

      -Folder Structures Used by npm +Folder structures used by npm
      diff --git a/deps/npm/docs/output/configuring-npm/npm-json.html b/deps/npm/docs/output/configuring-npm/npm-json.html index 9b15c851a9b962..78eb2e0322869a 100644 --- a/deps/npm/docs/output/configuring-npm/npm-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      package.json - @11.9.0 + @11.10.1

      Specifics of npm's package.json handling
      diff --git a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html index 644718fa76ad24..969d9d34148fe2 100644 --- a/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +++ b/deps/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
      -

      +

      npm-shrinkwrap.json - @11.9.0 + @11.10.1

      A publishable lockfile
      diff --git a/deps/npm/docs/output/configuring-npm/npmrc.html b/deps/npm/docs/output/configuring-npm/npmrc.html index c2afe2c28d0505..41b2bfa8a446c5 100644 --- a/deps/npm/docs/output/configuring-npm/npmrc.html +++ b/deps/npm/docs/output/configuring-npm/npmrc.html @@ -1,6 +1,6 @@ -npmrc +.npmrc @@ -141,16 +186,16 @@
      -

      - npmrc - @11.9.0 +

      + .npmrc + @11.10.1

      The npm config files

      Table of contents

      - +

      Description

      @@ -224,6 +269,25 @@ If the credential is meant for any request to a registry on a single host, the scope may look like //registry.npmjs.org/:. If it must be scoped to a specific path on the host that path may also be provided, such as //my-custom-registry.org/unique/path:.

      +

      Unsupported Custom Configuration Keys

      +

      Starting in npm v11.2.0, npm warns when unknown configuration keys are defined in .npmrc. In a future major version of npm, these unknown keys may no longer be accepted.

      +

      Only configuration keys that npm officially supports are recognized. Custom keys intended for third-party tools (for example, electron-builder) should not be placed in .npmrc.

      +

      If you need package-level configuration for use in scripts, use the config field in your package.json instead:

      +
      {
      +  "name": "my-package",
      +  "config": {
      +    "mirror": "https://example.com/"
      +  }
      +}
      +
      +
      +

      Values defined in package.json#config are exposed to scripts as environment variables prefixed with npm_package_config_. For example:

      +
      npm_package_config_mirror
      +
      +

      If you need to pass arguments to a script command, use -- to separate npm arguments from script arguments:

      +
      npm run build -- --customFlag
      +
      +

      Using environment variables is also recommended for cross-platform configuration instead of defining unsupported keys in .npmrc.

      ; bad config
       _authToken=MYTOKEN
       
      @@ -241,6 +305,24 @@ 
       ; would apply only to @another
       //somewhere-else.com/another/:_authToken=MYTOKEN2
       
      +

      Custom / third-party config keys

      +

      npm only recognizes its own configuration options. +If your .npmrc contains keys that are not part of npm's config definitions +(for example, electron_mirror or sass_binary_site), npm will emit a +warning:

      +
      warn Unknown user config "electron_mirror".
      +This will stop working in the next major version of npm.
      +
      +

      These keys were historically tolerated but are not officially supported. +A future major version of npm will treat unknown top-level keys as errors.

      +

      Some tools (such as @electron/get or node-sass) read their own +configuration from environment variables or from .npmrc by convention. +You can set these values as environment variables instead:

      +
      export ELECTRON_MIRROR="https://mirrorexample.npmjs.org/mirrors/electron/"
      +export ELECTRON_CUSTOM_DIR="{{ version }}"
      +
      +

      Environment variables are the most portable approach and work regardless +of .npmrc format.

      See also

      • npm folders
      • diff --git a/deps/npm/docs/output/configuring-npm/package-json.html b/deps/npm/docs/output/configuring-npm/package-json.html index 9b15c851a9b962..78eb2e0322869a 100644 --- a/deps/npm/docs/output/configuring-npm/package-json.html +++ b/deps/npm/docs/output/configuring-npm/package-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        package.json - @11.9.0 + @11.10.1

        Specifics of npm's package.json handling
        diff --git a/deps/npm/docs/output/configuring-npm/package-lock-json.html b/deps/npm/docs/output/configuring-npm/package-lock-json.html index f087d02ec1dbc4..c105214e75456a 100644 --- a/deps/npm/docs/output/configuring-npm/package-lock-json.html +++ b/deps/npm/docs/output/configuring-npm/package-lock-json.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,9 +186,9 @@
        -

        +

        package-lock.json - @11.9.0 + @11.10.1

        A manifestation of the manifest
        diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html index bb3eb98f9d8a63..1cceceed6cb164 100644 --- a/deps/npm/docs/output/using-npm/config.html +++ b/deps/npm/docs/output/using-npm/config.html @@ -1,6 +1,6 @@ -config +Config @@ -141,16 +186,16 @@
        -

        - config - @11.9.0 +

        + Config + @11.10.1

        -More than you probably want to know about npm configuration +About npm configuration

        Table of contents

        -
        +

        Description

        @@ -335,6 +380,7 @@

        before

        --before filter, the most recent version less than or equal to that tag will be used. For example, foo@latest might install foo@1.2 even though latest is 2.0.

        +

        This config cannot be used with: min-release-age

        • Default: true
        • @@ -925,6 +971,18 @@

          message

        Commit message which is used by npm version when creating version commit.

        Any "%s" in the message will be replaced with the version number.

        +

        min-release-age

        +
          +
        • Default: null
        • +
        • Type: null or Number
        • +
        +

        If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error.

        +

        This flag is a complement to before, which accepts an exact date instead +of a relative number of days.

        +

        This config cannot be used with: before

        name

        • Default: null
        • diff --git a/deps/npm/docs/output/using-npm/dependency-selectors.html b/deps/npm/docs/output/using-npm/dependency-selectors.html index 110ad2f97dc8f5..76917c21379cac 100644 --- a/deps/npm/docs/output/using-npm/dependency-selectors.html +++ b/deps/npm/docs/output/using-npm/dependency-selectors.html @@ -1,6 +1,6 @@ -Dependency Selector Syntax & Querying +Dependency Selectors @@ -141,9 +186,9 @@
          -

          - Dependency Selector Syntax & Querying - @11.9.0 +

          + Dependency Selectors + @11.10.1

          Dependency Selector Syntax & Querying
          diff --git a/deps/npm/docs/output/using-npm/developers.html b/deps/npm/docs/output/using-npm/developers.html index 1c80eedc91856e..16a74d6a0c2c7d 100644 --- a/deps/npm/docs/output/using-npm/developers.html +++ b/deps/npm/docs/output/using-npm/developers.html @@ -1,6 +1,6 @@ -developers +Developers @@ -141,11 +186,11 @@
          -

          - developers - @11.9.0 +

          + Developers + @11.10.1

          -Developer Guide +Developer guide
          diff --git a/deps/npm/docs/output/using-npm/logging.html b/deps/npm/docs/output/using-npm/logging.html index 3fbbf62f4e8597..c8ac0db586f5be 100644 --- a/deps/npm/docs/output/using-npm/logging.html +++ b/deps/npm/docs/output/using-npm/logging.html @@ -123,6 +123,51 @@ margin: 3em 0 4em 0; padding-top: 2em; } + +table { + width: 100%; + margin: 1em 0; + border-radius: 6px; + border: 1px solid #e1e4e8; + overflow: hidden; + border-collapse: separate; + border-spacing: 0; +} + +table thead { + background-color: #f6f8fa; +} + +table tbody { + background-color: #ffffff; +} + +table th, +table td { + padding: 0.75em; + text-align: left; + border-right: 1px solid #e1e4e8; + border-bottom: 1px solid #e1e4e8; +} + +table th:last-child, +table td:last-child { + border-right: none; +} + +table tbody tr:last-child td { + border-bottom: none; +} + +table th { + font-weight: 600; + background-color: #f6f8fa; +} + +table code { + white-space: nowrap; +} + @@ -141,11 +186,11 @@
          -

          +

          Logging - @11.9.0 + @11.10.1

          -Why, What & How We Log +Why, What & How we Log
          diff --git a/deps/npm/docs/output/using-npm/orgs.html b/deps/npm/docs/output/using-npm/orgs.html index 074617cd25acd3..e744c91b418b8b 100644 --- a/deps/npm/docs/output/using-npm/orgs.html +++ b/deps/npm/docs/output/using-npm/orgs.html @@ -1,6 +1,6 @@ -orgs +Organizations @@ -141,11 +186,11 @@
          -

          - orgs - @11.9.0 +

          + Organizations + @11.10.1

          -Working with Teams & Orgs +Working with teams & organizations
          diff --git a/deps/npm/docs/output/using-npm/package-spec.html b/deps/npm/docs/output/using-npm/package-spec.html index 1427e7f0ecc37d..0dfc7a6162e0fd 100644 --- a/deps/npm/docs/output/using-npm/package-spec.html +++ b/deps/npm/docs/output/using-npm/package-spec.html @@ -1,6 +1,6 @@ -package-spec +Package spec @@ -141,9 +186,9 @@
          -

          - package-spec - @11.9.0 +

          + Package spec + @11.10.1

          Package name specifier
          diff --git a/deps/npm/docs/output/using-npm/registry.html b/deps/npm/docs/output/using-npm/registry.html index 398a1a72ba0c07..9a755f513e5fb7 100644 --- a/deps/npm/docs/output/using-npm/registry.html +++ b/deps/npm/docs/output/using-npm/registry.html @@ -1,6 +1,6 @@ -registry +Registry @@ -141,9 +186,9 @@
          -

          - registry - @11.9.0 +

          + Registry + @11.10.1

          The JavaScript Package Registry
          diff --git a/deps/npm/docs/output/using-npm/removal.html b/deps/npm/docs/output/using-npm/removal.html index 88329fcc203e59..63ffc04bda59e5 100644 --- a/deps/npm/docs/output/using-npm/removal.html +++ b/deps/npm/docs/output/using-npm/removal.html @@ -1,6 +1,6 @@ -removal +Removal @@ -141,11 +186,11 @@
          -

          - removal - @11.9.0 +

          + Removal + @11.10.1

          -Cleaning the Slate +Cleaning the slate
          diff --git a/deps/npm/docs/output/using-npm/scope.html b/deps/npm/docs/output/using-npm/scope.html index 3cab822c180f36..5b27891d71c7b7 100644 --- a/deps/npm/docs/output/using-npm/scope.html +++ b/deps/npm/docs/output/using-npm/scope.html @@ -1,6 +1,6 @@ -scope +Scope @@ -141,9 +186,9 @@
          -

          - scope - @11.9.0 +

          + Scope + @11.10.1

          Scoped packages
          diff --git a/deps/npm/docs/output/using-npm/scripts.html b/deps/npm/docs/output/using-npm/scripts.html index e47dfd682231de..e3acc1b439dbeb 100644 --- a/deps/npm/docs/output/using-npm/scripts.html +++ b/deps/npm/docs/output/using-npm/scripts.html @@ -1,6 +1,6 @@ -scripts +Scripts @@ -141,9 +186,9 @@
          -

          - scripts - @11.9.0 +

          + Scripts + @11.10.1

          How npm handles the "scripts" field
          diff --git a/deps/npm/docs/output/using-npm/workspaces.html b/deps/npm/docs/output/using-npm/workspaces.html index a6cb16a60173a0..e1a0cc58593471 100644 --- a/deps/npm/docs/output/using-npm/workspaces.html +++ b/deps/npm/docs/output/using-npm/workspaces.html @@ -1,6 +1,6 @@ -workspaces +Workspaces @@ -141,9 +186,9 @@
          -

          - workspaces - @11.9.0 +

          + Workspaces + @11.10.1

          Working with workspaces
          diff --git a/deps/npm/lib/base-cmd.js b/deps/npm/lib/base-cmd.js index 3e6c4758cbd587..8b846316a4b96f 100644 --- a/deps/npm/lib/base-cmd.js +++ b/deps/npm/lib/base-cmd.js @@ -1,4 +1,6 @@ const { log } = require('proc-log') +const { definitions, shorthands } = require('@npmcli/config/lib/definitions') +const nopt = require('nopt') class BaseCommand { // these defaults can be overridden by individual commands @@ -10,39 +12,76 @@ class BaseCommand { static name = null static description = null static params = null + static definitions = null + static subcommands = null + // Number of expected positional arguments (null = unlimited/unchecked) + static positionals = null // this is a static so that we can read from it without instantiating a command // which would require loading the config static get describeUsage () { - const { definitions } = require('@npmcli/config/lib/definitions') + return this.getUsage() + } + + static getUsage (parentName = null, includeDescriptions = true) { const { aliases: cmdAliases } = require('./utils/cmd-list') const seenExclusive = new Set() const wrapWidth = 80 - const { description, usage = [''], name, params } = this + const { description, usage = [''], name } = this + + // Resolve to a definitions array: if the command has its own definitions, use + // those directly; otherwise resolve params from the global definitions pool. + let cmdDefs + if (this.definitions) { + cmdDefs = this.definitions + } else if (this.params) { + cmdDefs = this.params.map(p => definitions[p]).filter(Boolean) + } + + // If this is a subcommand, prepend parent name + const fullCommandName = parentName ? `${parentName} ${name}` : name const fullUsage = [ `${description}`, '', 'Usage:', - ...usage.map(u => `npm ${name} ${u}`.trim()), + ...usage.map(u => `npm ${fullCommandName} ${u}`.trim()), ] - if (params) { + if (this.subcommands) { + fullUsage.push('') + fullUsage.push('Subcommands:') + const subcommandEntries = Object.entries(this.subcommands) + for (let i = 0; i < subcommandEntries.length; i++) { + const [subName, SubCommand] = subcommandEntries[i] + fullUsage.push(` ${subName}`) + if (SubCommand.description) { + fullUsage.push(` ${SubCommand.description}`) + } + // Add space between subcommands except after the last one + if (i < subcommandEntries.length - 1) { + fullUsage.push('') + } + } + fullUsage.push('') + fullUsage.push(`Run "npm ${name} --help" for more info on a subcommand.`) + } + + if (cmdDefs) { let results = '' let line = '' - for (const param of params) { + for (const def of cmdDefs) { /* istanbul ignore next */ - if (seenExclusive.has(param)) { + if (seenExclusive.has(def.key)) { continue } - const { exclusive } = definitions[param] - let paramUsage = `${definitions[param].usage}` - if (exclusive) { + let paramUsage = def.usage + if (def.exclusive) { const exclusiveParams = [paramUsage] - seenExclusive.add(param) - for (const e of exclusive) { + for (const e of def.exclusive) { seenExclusive.add(e) - exclusiveParams.push(definitions[e].usage) + const eDef = cmdDefs.find(d => d.key === e) || definitions[e] + exclusiveParams.push(eDef?.usage) } paramUsage = `${exclusiveParams.join('|')}` } @@ -56,6 +95,24 @@ class BaseCommand { fullUsage.push('') fullUsage.push('Options:') fullUsage.push([results, line].filter(Boolean).join('\n')) + + // Add flag descriptions + if (cmdDefs.length > 0 && includeDescriptions) { + fullUsage.push('') + for (const def of cmdDefs) { + if (def.description) { + const desc = def.description.trim().split('\n')[0] + const shortcuts = def.short ? `-${def.short}` : '' + const aliases = (def.alias || []).map(v => `--${v}`).join('|') + const mainFlag = `--${def.key}` + const flagName = [shortcuts, mainFlag, aliases].filter(Boolean).join('|') + const requiredNote = def.required ? ' (required)' : '' + fullUsage.push(` ${flagName}${requiredNote}`) + fullUsage.push(` ${desc}`) + fullUsage.push('') + } + } + } } const aliases = Object.entries(cmdAliases).reduce((p, [k, v]) => { @@ -76,8 +133,9 @@ class BaseCommand { constructor (npm) { this.npm = npm + this.commandArgs = null - const { config } = this.npm + const { config } = this if (!this.constructor.skipConfigValidation) { config.validate() @@ -88,6 +146,11 @@ class BaseCommand { } } + get config () { + // Return command-specific config if it exists, otherwise use npm's config + return this.npm.config + } + get name () { return this.constructor.name } @@ -209,6 +272,163 @@ class BaseCommand { this.workspaceNames = [...ws.keys()] this.workspacePaths = [...ws.values()] } + + flags (depth = 1) { + const commandDefinitions = this.constructor.definitions || [] + + // Build types, shorthands, and defaults from definitions + const types = {} + const defaults = {} + const cmdShorthands = {} + const aliasMap = {} // Track which aliases map to which main keys + + for (const def of commandDefinitions) { + defaults[def.key] = def.default + types[def.key] = def.type + + // Handle aliases defined in the definition + if (def.alias && Array.isArray(def.alias)) { + for (const aliasKey of def.alias) { + types[aliasKey] = def.type // Needed for nopt to parse aliases + if (!aliasMap[def.key]) { + aliasMap[def.key] = [] + } + aliasMap[def.key].push(aliasKey) + } + } + + // Handle short options + if (def.short) { + const shorts = Array.isArray(def.short) ? def.short : [def.short] + for (const short of shorts) { + cmdShorthands[short] = [`--${def.key}`] + } + } + } + + // Parse args + let parsed = {} + let remains = [] + const argv = this.config.argv + if (argv && argv.length > 0) { + // config.argv contains the full command line including node, npm, and command names + // Format: ['node', 'npm', 'command', 'subcommand', 'positional', '--flags'] + // depth tells us how many command names to skip (1 for top-level, 2 for subcommand, etc.) + const offset = 2 + depth // Skip 'node', 'npm', and all command/subcommand names + parsed = nopt(types, cmdShorthands, argv, offset) + remains = parsed.argv.remain + delete parsed.argv + } + + // Validate flags - only if command has definitions (new system) + if (this.constructor.definitions && this.constructor.definitions.length > 0) { + this.#validateFlags(parsed, commandDefinitions, remains) + } + + // Check for conflicts between main flags and their aliases + // Also map aliases back to their main keys + for (const [mainKey, aliases] of Object.entries(aliasMap)) { + const providedKeys = [] + if (mainKey in parsed) { + providedKeys.push(mainKey) + } + for (const alias of aliases) { + if (alias in parsed) { + providedKeys.push(alias) + } + } + if (providedKeys.length > 1) { + const flagList = providedKeys.map(k => `--${k}`).join(' or ') + throw new Error(`Please provide only one of ${flagList}`) + } + + // If an alias was provided, map it to the main key + if (providedKeys.length === 1 && providedKeys[0] !== mainKey) { + const aliasKey = providedKeys[0] + parsed[mainKey] = parsed[aliasKey] + delete parsed[aliasKey] + } + } + + // Only include keys that are defined in commandDefinitions (main keys only) + const filtered = {} + for (const def of commandDefinitions) { + if (def.key in parsed) { + filtered[def.key] = parsed[def.key] + } + } + return [{ ...defaults, ...filtered }, remains] + } + + // Validate flags and throw errors for unknown flags or unexpected positionals + #validateFlags (parsed, commandDefinitions, remains) { + // Build a set of all valid flag names (global + command-specific + shorthands) + const validFlags = new Set([ + ...Object.keys(definitions), + ...commandDefinitions.map(d => d.key), + ...Object.keys(shorthands), // Add global shorthands like 'verbose', 'dd', etc. + ]) + + // Add aliases to valid flags + for (const def of commandDefinitions) { + if (def.alias && Array.isArray(def.alias)) { + for (const alias of def.alias) { + validFlags.add(alias) + } + } + } + + // Check parsed flags against valid flags + const unknownFlags = [] + for (const key of Object.keys(parsed)) { + if (!validFlags.has(key)) { + unknownFlags.push(key) + } + } + + // Throw error if unknown flags were found + if (unknownFlags.length > 0) { + const flagList = unknownFlags.map(f => `--${f}`).join(', ') + throw this.usageError(`Unknown flag${unknownFlags.length > 1 ? 's' : ''}: ${flagList}`) + } + + // Remove warnings for command-specific definitions that npm's global config + // doesn't know about (these were queued as "unknown" during config.load()) + for (const def of commandDefinitions) { + this.npm.config.removeWarning(def.key) + if (def.alias && Array.isArray(def.alias)) { + for (const alias of def.alias) { + this.npm.config.removeWarning(alias) + } + } + } + + // Remove warnings for unknown positionals that were actually consumed as flag values + // by command-specific definitions (e.g., --id where --id is command-specific) + const remainsSet = new Set(remains) + for (const unknownPos of this.npm.config.getUnknownPositionals()) { + if (!remainsSet.has(unknownPos)) { + // This value was consumed as a flag value, not truly a positional + this.npm.config.removeUnknownPositional(unknownPos) + } + } + + // Warn about extra positional arguments beyond what the command expects + const expectedPositionals = this.constructor.positionals + if (expectedPositionals !== null && remains.length > expectedPositionals) { + const extraPositionals = remains.slice(expectedPositionals) + for (const extra of extraPositionals) { + throw new Error(`Unknown positional argument: ${extra}`) + } + } + + this.npm.config.logWarnings() + } + + async exec () { + // This method should be overridden by commands + // Subcommand routing is handled in npm.js #exec + } } module.exports = BaseCommand diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js index 7aaf3564cb9fc7..580997b66c6f71 100644 --- a/deps/npm/lib/commands/cache.js +++ b/deps/npm/lib/commands/cache.js @@ -363,7 +363,7 @@ class Cache extends BaseCommand { if (valid) { output.standard(results.join('\n')) } - output.standard('') + output.standard() } } } diff --git a/deps/npm/lib/commands/completion.js b/deps/npm/lib/commands/completion.js index ae459aaaf31ce5..bfb01b8d08843b 100644 --- a/deps/npm/lib/commands/completion.js +++ b/deps/npm/lib/commands/completion.js @@ -40,13 +40,13 @@ const BaseCommand = require('../base-cmd.js') const fileExists = (file) => fs.stat(file).then(s => s.isFile()).catch(() => false) -const configNames = Object.keys(definitions) -const shorthandNames = Object.keys(shorthands) -const allConfs = configNames.concat(shorthandNames) - class Completion extends BaseCommand { static description = 'Tab Completion for npm' static name = 'completion' + // Completion command uses args differently - they represent the command line + // being completed, not actual arguments to this command, so we use an empty + // definitions object to prevent flag validation + static definitions = [] // completion for the completion command static async completion (opts) { @@ -90,15 +90,17 @@ class Completion extends BaseCommand { // if the point isn't at the end. // ie, tabbing at: npm foo b|ar const w = +COMP_CWORD - const words = args.map(unescape) - const word = words[w] const line = COMP_LINE + // Use COMP_LINE to get words if args doesn't include flags (e.g., in tests) + const hasFlags = line.includes(' -') && !args.some(arg => arg.startsWith('-')) + const words = (hasFlags ? line.split(/\s+/) : args).map(unescape) + const word = words[w] || '' const point = +COMP_POINT const partialLine = line.slice(0, point) const partialWords = words.slice(0, w) // figure out where in that last word the point is. - const partialWordRaw = args[w] + const partialWordRaw = args[w] || '' let i = partialWordRaw.length while (partialWordRaw.slice(0, i) !== partialLine.slice(-1 * i) && i > 0) { i-- @@ -121,33 +123,32 @@ class Completion extends BaseCommand { raw: args, } + // try to find the npm command and subcommand early for flag completion + // this helps with custom command definitions from subcommands + const types = Object.entries(definitions).reduce((acc, [key, def]) => { + acc[key] = def.type + return acc + }, {}) + const parsed = opts.conf = + nopt(types, shorthands, partialWords.slice(0, -1), 0) + const cmd = parsed.argv.remain[1] + const subCmd = parsed.argv.remain[2] + if (partialWords.slice(0, -1).indexOf('--') === -1) { - if (word.charAt(0) === '-') { - return this.wrap(opts, configCompl(opts)) + if (word && word.charAt(0) === '-') { + return this.wrap(opts, configCompl(opts, cmd, subCmd, this.npm)) } if (words[w - 1] && words[w - 1].charAt(0) === '-' && - !isFlag(words[w - 1])) { + !isFlag(words[w - 1], cmd, subCmd, this.npm)) { // awaiting a value for a non-bool config. // don't even try to do this for now return this.wrap(opts, configValueCompl(opts)) } } - // try to find the npm command. - // it's the first thing after all the configs. - // take a little shortcut and use npm's arg parsing logic. - // don't have to worry about the last arg being implicitly - // boolean'ed, since the last block will catch that. - const types = Object.entries(definitions).reduce((acc, [key, def]) => { - acc[key] = def.type - return acc - }, {}) - const parsed = opts.conf = - nopt(types, shorthands, partialWords.slice(0, -1), 0) // check if there's a command already. - const cmd = parsed.argv.remain[1] if (!cmd) { return this.wrap(opts, cmdCompl(opts, this.npm)) } @@ -234,16 +235,66 @@ const dumpScript = async (p) => { const unescape = w => w.charAt(0) === '\'' ? w.replace(/^'|'$/g, '') : w.replace(/\\ /g, ' ') +// Helper to get custom definitions from a command/subcommand +const getCustomDefinitions = (cmd, subCmd) => { + if (!cmd) { + return [] + } + + try { + const command = Npm.cmd(cmd) + + // Check if the command has subcommands + if (subCmd && command.subcommands && command.subcommands[subCmd]) { + const subcommand = command.subcommands[subCmd] + // All subcommands have definitions + return subcommand.definitions + } + + // Check if the command itself has definitions + if (command.definitions) { + return command.definitions + } + } catch { + // Command not found or no definitions + } + + return [] +} + +// Helper to get all config names including aliases from custom definitions +const getCustomConfigNames = (customDefs) => { + const names = new Set() + for (const def of customDefs) { + names.add(def.key) + if (def.alias && Array.isArray(def.alias)) { + def.alias.forEach(a => names.add(a)) + } + } + return [...names] +} + // the current word has a dash. Return the config names, // with the same number of dashes as the current word has. -const configCompl = opts => { +const configCompl = (opts, cmd, subCmd, npm) => { const word = opts.word const split = word.match(/^(-+)((?:no-)*)(.*)$/) const dashes = split[1] const no = split[2] - const flags = configNames.filter(isFlag) - return allConfs.map(c => dashes + c) - .concat(flags.map(f => dashes + (no || 'no-') + f)) + + // Get custom definitions from the command/subcommand + const customDefs = getCustomDefinitions(cmd, subCmd, npm) + const customNames = getCustomConfigNames(customDefs) + + // If there are custom definitions, return only those (new feature) + // Otherwise, return empty array (historical behavior - no global flag completion) + if (customNames.length > 0) { + const flags = customNames.filter(name => isFlag(name, cmd, subCmd, npm)) + return customNames.map(c => dashes + c) + .concat(flags.map(f => dashes + (no || 'no-') + f)) + } + + return [] } // expand with the valid values of various config values. @@ -251,16 +302,37 @@ const configCompl = opts => { const configValueCompl = () => [] // check if the thing is a flag or not. -const isFlag = word => { +const isFlag = (word, cmd, subCmd, npm) => { // shorthands never take args. const split = word.match(/^(-*)((?:no-)+)?(.*)$/) const no = split[2] const conf = split[3] - const { type } = definitions[conf] - return no || - type === Boolean || - (Array.isArray(type) && type.includes(Boolean)) || - shorthands[conf] + + // Check custom definitions first + const customDefs = getCustomDefinitions(cmd, subCmd, npm) + + // Check if conf is in custom definitions or is an alias + let customDef = customDefs.find(d => d.key === conf) + if (!customDef) { + // Check if conf is an alias for any of the custom definitions + for (const def of customDefs) { + if (def.alias && Array.isArray(def.alias) && def.alias.includes(conf)) { + customDef = def + break + } + } + } + + if (customDef) { + const { type } = customDef + return no || + type === Boolean || + (Array.isArray(type) && type.includes(Boolean)) + } + + // No custom definitions found, should not reach here in normal flow + // since configCompl returns empty array when no custom defs exist + return false } // complete against the npm commands diff --git a/deps/npm/lib/commands/doctor.js b/deps/npm/lib/commands/doctor.js index a537478bee3fe1..0d948da231187b 100644 --- a/deps/npm/lib/commands/doctor.js +++ b/deps/npm/lib/commands/doctor.js @@ -27,7 +27,7 @@ const maskLabel = mask => { return label.join(', ') } -const subcommands = [ +const checks = [ { // Ping is left in as a legacy command but is listed as "connection" to // make more sense to more people @@ -100,12 +100,10 @@ class Doctor extends BaseCommand { static name = 'doctor' static params = ['registry'] static ignoreImplicitWorkspace = false - static usage = [`[${subcommands.flatMap(s => s.groups) + static usage = [`[${checks.flatMap(s => s.groups) .filter((value, index, self) => self.indexOf(value) === index && value !== 'ping') .join('] [')}]`] - static subcommands = subcommands - async exec (args) { log.info('doctor', 'Running checkup') let allOk = true @@ -331,7 +329,7 @@ class Doctor extends BaseCommand { } actions (params) { - return this.constructor.subcommands.filter(subcmd => { + return checks.filter(subcmd => { if (process.platform === 'win32' && subcmd.windows === false) { return false } diff --git a/deps/npm/lib/commands/edit.js b/deps/npm/lib/commands/edit.js index b2c2ec8d2a39a0..1140c59efa3e40 100644 --- a/deps/npm/lib/commands/edit.js +++ b/deps/npm/lib/commands/edit.js @@ -33,8 +33,6 @@ class Edit extends BaseCommand { static params = ['editor'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { return completion(npm, opts) } diff --git a/deps/npm/lib/commands/explain.js b/deps/npm/lib/commands/explain.js index 5f37ba9925f410..3b843e3bbff6c9 100644 --- a/deps/npm/lib/commands/explain.js +++ b/deps/npm/lib/commands/explain.js @@ -17,8 +17,6 @@ class Explain extends ArboristWorkspaceCmd { static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/explore.js b/deps/npm/lib/commands/explore.js index 184af2bdc5a161..d0d2e5c3ef8912 100644 --- a/deps/npm/lib/commands/explore.js +++ b/deps/npm/lib/commands/explore.js @@ -14,8 +14,6 @@ class Explore extends BaseCommand { static params = ['shell'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { return completion(npm, opts) } diff --git a/deps/npm/lib/commands/fund.js b/deps/npm/lib/commands/fund.js index 8c194dac80b49b..a281912d77b326 100644 --- a/deps/npm/lib/commands/fund.js +++ b/deps/npm/lib/commands/fund.js @@ -34,8 +34,6 @@ class Fund extends ArboristWorkspaceCmd { return `${msg}\`` } - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/get.js b/deps/npm/lib/commands/get.js index 4191f2c973e7d3..e111d7f2f54c84 100644 --- a/deps/npm/lib/commands/get.js +++ b/deps/npm/lib/commands/get.js @@ -8,8 +8,6 @@ class Get extends BaseCommand { static params = ['long'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts) { const Config = Npm.cmd('config') return Config.completion(opts) diff --git a/deps/npm/lib/commands/install.js b/deps/npm/lib/commands/install.js index 707848a43d48f8..43647c6bf7e88d 100644 --- a/deps/npm/lib/commands/install.js +++ b/deps/npm/lib/commands/install.js @@ -31,6 +31,7 @@ class Install extends ArboristWorkspaceCmd { 'allow-git', 'audit', 'before', + 'min-release-age', 'bin-links', 'fund', 'dry-run', diff --git a/deps/npm/lib/commands/ls.js b/deps/npm/lib/commands/ls.js index bc8beb007e8093..0ea8704a50573a 100644 --- a/deps/npm/lib/commands/ls.js +++ b/deps/npm/lib/commands/ls.js @@ -39,8 +39,6 @@ class LS extends ArboristWorkspaceCmd { ...super.params, ] - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/rebuild.js b/deps/npm/lib/commands/rebuild.js index 1c19836106e063..a23df39f1560be 100644 --- a/deps/npm/lib/commands/rebuild.js +++ b/deps/npm/lib/commands/rebuild.js @@ -17,8 +17,6 @@ class Rebuild extends ArboristWorkspaceCmd { static usage = ['[] ...]'] - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/run.js b/deps/npm/lib/commands/run.js index d89cb4d93bb7fa..bed82a6a08701b 100644 --- a/deps/npm/lib/commands/run.js +++ b/deps/npm/lib/commands/run.js @@ -57,7 +57,7 @@ class RunScript extends BaseCommand { if (!args.length) { const newline = await this.#list(path, { workspace }) if (newline && !last) { - output.standard('') + output.standard() } continue } diff --git a/deps/npm/lib/commands/set.js b/deps/npm/lib/commands/set.js index 2e61762ba9dcd4..9a90e2a50ea1e6 100644 --- a/deps/npm/lib/commands/set.js +++ b/deps/npm/lib/commands/set.js @@ -8,8 +8,6 @@ class Set extends BaseCommand { static params = ['global', 'location'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts) { const Config = Npm.cmd('config') return Config.completion(opts) diff --git a/deps/npm/lib/commands/team.js b/deps/npm/lib/commands/team.js index 089e917909d10a..98f5d2d16b0084 100644 --- a/deps/npm/lib/commands/team.js +++ b/deps/npm/lib/commands/team.js @@ -1,4 +1,3 @@ -const columns = require('cli-columns') const libteam = require('libnpmteam') const { output } = require('proc-log') const { otplease } = require('../utils/auth.js') @@ -131,9 +130,11 @@ class Team extends BaseCommand { output.standard(users.join('\n')) } else if (!this.npm.silent) { const plural = users.length === 1 ? '' : 's' - const more = users.length === 0 ? '' : ':\n' - output.standard(`\n@${entity} has ${users.length} user${plural}${more}`) - output.standard(columns(users, { padding: 1 })) + const more = users.length === 0 ? '' : ':' + output.standard(`@${entity} has ${users.length} user${plural}${more}`) + for (const user of users) { + output.standard(user) + } } } @@ -145,9 +146,11 @@ class Team extends BaseCommand { output.standard(teams.join('\n')) } else if (!this.npm.silent) { const plural = teams.length === 1 ? '' : 's' - const more = teams.length === 0 ? '' : ':\n' - output.standard(`\n@${entity} has ${teams.length} team${plural}${more}`) - output.standard(columns(teams.map(t => `@${t}`), { padding: 1 })) + const more = teams.length === 0 ? '' : ':' + output.standard(`@${entity} has ${teams.length} team${plural}${more}`) + for (const team of teams) { + output.standard(`@${team}`) + } } } } diff --git a/deps/npm/lib/commands/trust/github.js b/deps/npm/lib/commands/trust/github.js new file mode 100644 index 00000000000000..870314b717a759 --- /dev/null +++ b/deps/npm/lib/commands/trust/github.js @@ -0,0 +1,104 @@ +const Definition = require('@npmcli/config/lib/definitions/definition.js') +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') +const TrustCommand = require('../../trust-cmd.js') +const path = require('node:path') + +class TrustGitHub extends TrustCommand { + static description = 'Create a trusted relationship between a package and GitHub Actions' + static name = 'github' + static positionals = 1 // expects at most 1 positional (package name) + static providerName = 'GitHub Actions' + static providerEntity = 'GitHub repository' + static providerFile = 'GitHub Actions Workflow' + static providerHostname = 'https://github.com' + + // entity means project / repository + static entityKey = 'repository' + + static usage = [ + '[package] --file [--repo|--repository] [--env|--environment] [-y|--yes]', + ] + + static definitions = [ + new Definition('file', { + default: null, + type: String, + required: true, + description: 'Name of workflow file within a repositories .GitHub folder (must end in yaml, yml)', + }), + new Definition('repository', { + default: null, + type: String, + description: 'Name of the repository in the format owner/repo', + alias: ['repo'], + }), + new Definition('environment', { + default: null, + type: String, + description: 'CI environment name', + alias: ['env'], + }), + // globals are alphabetical + globalDefinitions['dry-run'], + globalDefinitions.json, + globalDefinitions.registry, + globalDefinitions.yes, + ] + + getEntityUrl ({ providerHostname, file, entity }) { + if (file) { + return new URL(`${entity}/blob/HEAD/.github/workflows/${file}`, providerHostname).toString() + } + return new URL(entity, providerHostname).toString() + } + + validateEntity (entity) { + if (entity.split('/').length !== 2) { + throw new Error(`${this.constructor.providerEntity} must be specified in the format owner/repository`) + } + } + + validateFile (file) { + if (file !== path.basename(file)) { + throw new Error('GitHub Actions workflow must be just a file not a path') + } + } + + static optionsToBody (options) { + const { file, repository, environment } = options + const trustConfig = { + type: 'github', + claims: { + repository, + workflow_ref: { + file, + }, + ...(environment) && { environment }, + }, + } + return trustConfig + } + + // Convert API response body to options + static bodyToOptions (body) { + const file = body.claims?.workflow_ref?.file + const repository = body.claims?.repository + const environment = body.claims?.environment + return { + ...(body.id) && { id: body.id }, + ...(body.type) && { type: body.type }, + ...(file) && { file }, + ...(repository) && { repository }, + ...(environment) && { environment }, + } + } + + async exec (positionalArgs, flags) { + await this.createConfigCommand({ + positionalArgs, + flags, + }) + } +} + +module.exports = TrustGitHub diff --git a/deps/npm/lib/commands/trust/gitlab.js b/deps/npm/lib/commands/trust/gitlab.js new file mode 100644 index 00000000000000..e6456244ea1850 --- /dev/null +++ b/deps/npm/lib/commands/trust/gitlab.js @@ -0,0 +1,105 @@ +const Definition = require('@npmcli/config/lib/definitions/definition.js') +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') +const TrustCommand = require('../../trust-cmd.js') +const path = require('node:path') + +class TrustGitLab extends TrustCommand { + static description = 'Create a trusted relationship between a package and GitLab CI/CD' + static name = 'gitlab' + static positionals = 1 // expects at most 1 positional (package name) + static providerName = 'GitLab CI/CD' + static providerEntity = 'GitLab project' + static providerFile = 'GitLab CI/CD Pipeline' + static providerHostname = 'https://gitlab.com' + + // entity means project / repository + static entityKey = 'project' + + static usage = [ + '[package] --file [--project|--repo|--repository] [--env|--environment] [-y|--yes]', + ] + + static definitions = [ + new Definition('file', { + default: null, + type: String, + required: true, + description: 'Name of pipeline file (e.g., .gitlab-ci.yml)', + }), + new Definition('project', { + default: null, + type: String, + description: 'Name of the project in the format group/project or group/subgroup/project', + }), + new Definition('environment', { + default: null, + type: String, + description: 'CI environment name', + alias: ['env'], + }), + // globals are alphabetical + globalDefinitions['dry-run'], + globalDefinitions.json, + globalDefinitions.registry, + globalDefinitions.yes, + ] + + getEntityUrl ({ providerHostname, file, entity }) { + if (file) { + return new URL(`${entity}/-/blob/HEAD/${file}`, providerHostname).toString() + } + return new URL(entity, providerHostname).toString() + } + + validateEntity (entity) { + if (entity.split('/').length < 2) { + throw new Error(`${this.constructor.providerEntity} must be specified in the format group/project or group/subgroup/project`) + } + } + + validateFile (file) { + if (file !== path.basename(file)) { + throw new Error('GitLab CI/CD pipeline file must be just a file not a path') + } + } + + static optionsToBody (options) { + const { file, project, environment } = options + const trustConfig = { + type: 'gitlab', + claims: { + project_path: project, + // this looks off, but this is correct + /** The ref path to the top-level pipeline definition, for example, gitlab.example.com/my-group/my-project//.gitlab-ci.yml@refs/heads/main. Introduced in GitLab 16.2. This claim is null unless the pipeline definition is located in the same project. */ + ci_config_ref_uri: { + file, + }, + ...(environment) && { environment }, + }, + } + return trustConfig + } + + // Convert API response body to options + static bodyToOptions (body) { + const file = body.claims?.ci_config_ref_uri?.file + const project = body.claims?.project_path + const environment = body.claims?.environment + return { + ...(body.id) && { id: body.id }, + ...(body.type) && { type: body.type }, + ...(file) && { file }, + ...(project) && { project }, + ...(environment) && { environment }, + } + } + + async exec (positionalArgs, flags) { + await this.createConfigCommand({ + positionalArgs, + flags, + }) + } +} + +module.exports = TrustGitLab diff --git a/deps/npm/lib/commands/trust/index.js b/deps/npm/lib/commands/trust/index.js new file mode 100644 index 00000000000000..cabcfa7c34cb80 --- /dev/null +++ b/deps/npm/lib/commands/trust/index.js @@ -0,0 +1,23 @@ +const BaseCommand = require('../../base-cmd.js') + +class Trust extends BaseCommand { + static description = 'Create a trusted relationship between a package and a OIDC provider' + static name = 'trust' + + static subcommands = { + github: require('./github.js'), + gitlab: require('./gitlab.js'), + list: require('./list.js'), + revoke: require('./revoke.js'), + } + + static async completion (opts) { + const argv = opts.conf.argv.remain + if (argv.length === 2) { + return Object.keys(Trust.subcommands) + } + return [] + } +} + +module.exports = Trust diff --git a/deps/npm/lib/commands/trust/list.js b/deps/npm/lib/commands/trust/list.js new file mode 100644 index 00000000000000..8e1147566b056b --- /dev/null +++ b/deps/npm/lib/commands/trust/list.js @@ -0,0 +1,47 @@ +const { otplease } = require('../../utils/auth.js') +const npmFetch = require('npm-registry-fetch') +const npa = require('npm-package-arg') +const TrustGithub = require('./github.js') +const TrustGitlab = require('./gitlab.js') +const TrustCommand = require('../../trust-cmd.js') +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') + +class TrustList extends TrustCommand { + static description = 'List trusted relationships for a package' + static name = 'list' + static positionals = 1 // expects at most 1 positional (package name) + + static usage = [ + '[package]', + ] + + static definitions = [ + globalDefinitions.json, + globalDefinitions.registry, + ] + + static bodyToOptions (body) { + if (body.type === 'github') { + return TrustGithub.bodyToOptions(body) + } else if (body.type === 'gitlab') { + return TrustGitlab.bodyToOptions(body) + } + return TrustCommand.bodyToOptions(body) + } + + async exec (positionalArgs) { + const packageName = positionalArgs[0] || (await this.optionalPkgJson()).name + if (!packageName) { + throw new Error('Package name must be specified either as an argument or in the package.json file') + } + const spec = npa(packageName) + const uri = `/-/package/${spec.escapedName}/trust` + const body = await otplease(this.npm, this.npm.flatOptions, opts => npmFetch.json(uri, { + ...opts, + method: 'GET', + })) + this.displayResponseBody({ body, packageName }) + } +} + +module.exports = TrustList diff --git a/deps/npm/lib/commands/trust/revoke.js b/deps/npm/lib/commands/trust/revoke.js new file mode 100644 index 00000000000000..0f555c0386bc05 --- /dev/null +++ b/deps/npm/lib/commands/trust/revoke.js @@ -0,0 +1,52 @@ +const globalDefinitions = require('@npmcli/config/lib/definitions/definitions.js') +const Definition = require('@npmcli/config/lib/definitions/definition.js') +const { otplease } = require('../../utils/auth.js') +const npmFetch = require('npm-registry-fetch') +const npa = require('npm-package-arg') +const TrustCommand = require('../../trust-cmd.js') + +class TrustRevoke extends TrustCommand { + static description = 'Revoke a trusted relationship for a package' + static name = 'revoke' + static positionals = 1 // expects at most 1 positional (package name) + + static usage = [ + '[package] --id=', + ] + + static definitions = [ + new Definition('id', { + default: null, + type: String, + description: 'ID of the trusted relationship to revoke', + required: true, + }), + globalDefinitions['dry-run'], + globalDefinitions.registry, + ] + + async exec (positionalArgs, flags) { + const dryRun = this.config.get('dry-run') + const pkgName = positionalArgs[0] || (await this.optionalPkgJson()).name + if (!pkgName) { + throw new Error('Package name must be specified either as an argument or in the package.json file') + } + const { id } = flags + if (!id) { + throw new Error('ID of the trusted relationship to revoke must be specified with the --id option') + } + this.dialogue`Attempting to revoke trusted configuration for package ${pkgName} with id ${id}` + if (dryRun) { + return + } + const spec = npa(pkgName) + const uri = `/-/package/${spec.escapedName}/trust/${encodeURIComponent(id)}` + await otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { + ...opts, + method: 'DELETE', + })) + this.dialogue`Revoked trusted configuration for package ${pkgName} with id ${id}` + } +} + +module.exports = TrustRevoke diff --git a/deps/npm/lib/commands/uninstall.js b/deps/npm/lib/commands/uninstall.js index f9baebe3bc2e28..a369158d99c524 100644 --- a/deps/npm/lib/commands/uninstall.js +++ b/deps/npm/lib/commands/uninstall.js @@ -11,8 +11,6 @@ class Uninstall extends ArboristWorkspaceCmd { static usage = ['[<@scope>/]...'] static ignoreImplicitWorkspace = false - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { return completion(npm, opts) } diff --git a/deps/npm/lib/commands/update.js b/deps/npm/lib/commands/update.js index 0d2fc324d92453..38e83f3f6bb953 100644 --- a/deps/npm/lib/commands/update.js +++ b/deps/npm/lib/commands/update.js @@ -29,8 +29,6 @@ class Update extends ArboristWorkspaceCmd { static usage = ['[...]'] - // TODO - /* istanbul ignore next */ static async completion (opts, npm) { const completion = require('../utils/installed-deep.js') return completion(npm, opts) diff --git a/deps/npm/lib/commands/view.js b/deps/npm/lib/commands/view.js index dd563cb2d52b9a..44b94dfccb05a6 100644 --- a/deps/npm/lib/commands/view.js +++ b/deps/npm/lib/commands/view.js @@ -1,4 +1,3 @@ -const columns = require('cli-columns') const { readFile } = require('node:fs/promises') const jsonParse = require('json-parse-even-better-errors') const { log, output, META } = require('proc-log') @@ -333,7 +332,7 @@ class View extends BaseCommand { if (deps.length) { const maxDeps = 24 res.push('\ndependencies:') - res.push(columns(deps.slice(0, maxDeps), { padding: 1 })) + res.push(deps.slice(0, maxDeps).join(', ')) if (deps.length > maxDeps) { res.push(chalk.dim(`(...and ${deps.length - maxDeps} more.)`)) } @@ -349,8 +348,8 @@ class View extends BaseCommand { } res.push('\ndist-tags:') - const maxTags = 12 - res.push(columns(distTags.slice(0, maxTags), { padding: 1, sort: false })) + const maxTags = 5 + res.push(distTags.slice(0, maxTags).join('\n')) if (distTags.length > maxTags) { res.push(chalk.dim(`(...and ${distTags.length - maxTags} more.)`)) } diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index c635f3e05a7b3a..d30554d400f07f 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -26,7 +26,7 @@ class Npm { command: c, }) } - return require(`./commands/${command}.js`) + return require(`./commands/${command}`) } unrefPromises = [] @@ -72,6 +72,7 @@ class Npm { shorthands, argv: [...process.argv, ...argv], excludeNpmCwd, + warn: false, }) } @@ -227,8 +228,64 @@ class Npm { process.env.npm_command = this.command } + // Only log warnings for legacy commands without definitions or subcommands + // Commands with definitions will handle warnings in base-cmd flags() + // Commands with subcommands will delegate to the subcommand to handle warnings + if (!Command.definitions && !Command.subcommands) { + this.config.logWarnings() + } + + // this needs to be rest after because some commands run + // this.npm.config.checkUnknown('publishConfig', key) + this.config.warn = true + + return this.execCommandClass(command, args, [cmd]) + } + + // Unified command execution for both top-level commands and subcommands + // Supports n-depth subcommands, workspaces, and definitions + async execCommandClass (commandInstance, args, commandPath = []) { + const Command = commandInstance.constructor + const commandName = commandPath.join(':') + + // Handle subcommands if present + if (Command.subcommands) { + const subcommandName = args[0] + + // If help is requested without a subcommand, show main command help + if (this.config.get('usage') && !subcommandName) { + return output.standard(commandInstance.usage) + } + + // If no subcommand provided, show usage error + if (!subcommandName) { + throw commandInstance.usageError() + } + + // Check if the subcommand exists + const SubCommand = Command.subcommands[subcommandName] + if (!SubCommand) { + throw commandInstance.usageError(`Unknown subcommand: ${subcommandName}`) + } + + // Check if help is requested for the subcommand + if (this.config.get('usage')) { + const parentName = commandPath[0] + return output.standard(SubCommand.getUsage(parentName)) + } + + // Create subcommand instance and recurse + const subcommandInstance = new SubCommand(this) + const subcommandArgs = args.slice(1) // Remove subcommand name from args + const subcommandPath = [...commandPath, subcommandName] + + return time.start(`command:${subcommandPath.join(':')}`, () => + this.execCommandClass(subcommandInstance, subcommandArgs, subcommandPath)) + } + + // No subcommands - execute this command if (this.config.get('usage')) { - return output.standard(command.usage) + return output.standard(commandInstance.usage) } let execWorkspaces = false @@ -248,12 +305,26 @@ class Npm { execWorkspaces = true } - if (command.checkDevEngines && !this.global) { - await command.checkDevEngines() + // Check dev engines if needed + if (commandInstance.checkDevEngines && !this.global) { + await commandInstance.checkDevEngines() } - return time.start(`command:${cmd}`, () => - execWorkspaces ? command.execWorkspaces(args) : command.exec(args)) + // Execute command with or without definitions + if (Command.definitions) { + // config.argv contains the full argv with flags (set by Config in production, by MockNpm in tests) + // Pass depth so flags() knows how many command names to skip + const [flags, positionalArgs] = commandInstance.flags(commandPath.length) + return time.start(`command:${commandName}`, () => + execWorkspaces + ? commandInstance.execWorkspaces(positionalArgs, flags) + : commandInstance.exec(positionalArgs, flags)) + } else { + // Legacy commands without definitions + this.config.logWarnings() + return time.start(`command:${commandName}`, () => + execWorkspaces ? commandInstance.execWorkspaces(args) : commandInstance.exec(args)) + } } // This gets called at the end of the exit handler and diff --git a/deps/npm/lib/trust-cmd.js b/deps/npm/lib/trust-cmd.js new file mode 100644 index 00000000000000..c267c1373e91c1 --- /dev/null +++ b/deps/npm/lib/trust-cmd.js @@ -0,0 +1,283 @@ +const BaseCommand = require('./base-cmd.js') +const { otplease } = require('./utils/auth.js') +const npmFetch = require('npm-registry-fetch') +const npa = require('npm-package-arg') +const { read: _read } = require('read') +const { input, output, log, META } = require('proc-log') +const gitinfo = require('hosted-git-info') +const pkgJson = require('@npmcli/package-json') + +const NPM_FRONTEND = 'https://www.npmjs.com' + +class TrustCommand extends BaseCommand { + // Helper to format template strings with color + // Blue text with reset color for interpolated values + warnString (strings, ...values) { + const chalk = this.npm.chalk + const message = strings.reduce((result, str, i) => { + return result + chalk.blue(str) + (values[i] ? chalk.reset(values[i]) : '') + }, '') + return message + } + + // Log a warning message with blue formatting + warn (strings, ...values) { + log.warn('trust', this.warnString(strings, ...values)) + } + + // dialogue is non-log text that is different from our usual npm prefix logging + // it should always show to the user unless --json is specified + // it's not controled by log levels + dialogue (strings, ...values) { + const json = this.config.get('json') + if (!json) { + output.standard(this.warnString(strings, ...values)) + } + } + + createConfig (pkg, body) { + const spec = npa(pkg) + const uri = `/-/package/${spec.escapedName}/trust` + return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, { + ...opts, + method: 'POST', + body: body, + })) + } + + logOptions (options, pad = true) { + const { values, warnings, fromPackageJson, urls } = { warnings: [], ...options } + if (warnings && warnings.length > 0) { + for (const warningMsg of warnings) { + log.warn('trust', warningMsg) + } + } + + const json = this.config.get('json') + if (json) { + output.standard(JSON.stringify(options.values, null, 2), { [META]: true, redact: false }) + return + } + + const chalk = this.npm.chalk + const { type, id, ...rest } = values || {} + + if (values) { + const lines = [] + if (type) { + lines.push(`type: ${chalk.green(type)}`) + } + if (id) { + lines.push(`id: ${chalk.green(id)}`) + } + for (const [key, value] of Object.entries(rest)) { + if (value !== null && value !== undefined) { + const parts = [ + `${chalk.reset(key)}: ${chalk.green(value)}`, + ] + if (fromPackageJson && fromPackageJson[key]) { + parts.push(`(${chalk.yellow(`from package.json`)})`) + } + lines.push(parts.join(' ')) + } + } + if (pad) { + output.standard() + } + output.standard(lines.join('\n'), { [META]: true, redact: false }) + // Print URLs on their own lines after config, following the same order as rest keys + if (urls) { + const urlLines = [] + for (const key of Object.keys(rest)) { + if (urls[key]) { + urlLines.push(chalk.blue(urls[key])) + } + } + if (urlLines.length > 0) { + output.standard() + output.standard(urlLines.join('\n')) + } + } + if (pad) { + output.standard() + } + } + } + + async confirmOperation (yes) { + // Ask for confirmation unless --yes flag is set + if (yes === true) { + return + } + if (yes === false) { + throw new Error('User cancelled operation') + } + const confirm = await input.read( + () => _read({ prompt: 'Do you want to proceed? (y/N) ', default: 'n' }) + ) + const normalized = confirm.toLowerCase() + if (['y', 'yes'].includes(normalized)) { + return + } + throw new Error('User cancelled operation') + } + + getFrontendUrl ({ pkgName }) { + if (this.registryIsDefault) { + return new URL(`/package/${pkgName}`, NPM_FRONTEND).toString() + } + return null + } + + getRepositoryFromPackageJson (pkg) { + const info = gitinfo.fromUrl(pkg.repository?.url || pkg?.repository) + if (!info) { + return null + } + const repository = info.user + '/' + info.project + const type = info.type + return { repository, type } + } + + async optionalPkgJson () { + try { + const { content } = await pkgJson.normalize(this.npm.prefix) + return content + } catch (err) { + return {} + } + } + + get registryIsDefault () { + return this.npm.config.defaults.registry === this.npm.config.get('registry') + } + + // generic + static bodyToOptions (body) { + return { + ...(body.id) && { id: body.id }, + ...(body.type) && { type: body.type }, + } + } + + async createConfigCommand ({ positionalArgs, flags }) { + const { providerName, providerEntity, providerHostname } = this.constructor + const dryRun = this.config.get('dry-run') + const yes = this.config.get('yes') // deep-lore this allows for --no-yes + const options = await this.flagsToOptions({ positionalArgs, flags, providerHostname }) + this.dialogue`Establishing trust between ${options.values.package} package and ${providerName}` + this.dialogue`Anyone with ${providerEntity} write access can publish to ${options.values.package}` + this.dialogue`Two-factor authentication is required for this operation` + if (!this.registryIsDefault) { + this.warn`Registry ${this.npm.config.get('registry')} may not support trusted publishing` + } + this.logOptions(options) + if (dryRun) { + return + } + await this.confirmOperation(yes) + const trustConfig = this.constructor.optionsToBody(options.values) + const response = await this.createConfig(options.values.package, [trustConfig]) + const body = await response.json() + this.dialogue`Trust configuration created successfully for ${options.values.package} with the following settings:` + this.displayResponseBody({ body, packageName: options.values.package }) + } + + async flagsToOptions ({ positionalArgs, flags, providerHostname }) { + const { entityKey, name, providerEntity, providerFile } = this.constructor + const content = await this.optionalPkgJson() + const pkgPositional = positionalArgs[0] + const pkgJsonName = content.name + const git = this.getRepositoryFromPackageJson(content) + // the provided positional matches package.json name or no positional provided + const matchPkg = (!pkgPositional || pkgPositional === pkgJsonName) + const pkgName = pkgPositional || pkgJsonName + const usedPkgNameFromPkgJson = !pkgPositional && Boolean(pkgJsonName) + const invalidPkgJsonProviderType = matchPkg && git && git?.type !== name + + let entity + let entitySource + + if (flags[entityKey]) { + entity = flags[entityKey] + entitySource = 'flag' + } else if (!invalidPkgJsonProviderType && git?.repository) { + entity = git.repository + entitySource = 'package.json' + } + const mismatchPkgJsonRepository = matchPkg && git && entity !== git.repository + const usedRepositoryInPkgJson = entitySource === 'package.json' + + const warnings = [] + if (!pkgName) { + throw new Error('Package name must be specified either as an argument or in package.json file') + } + + if (!flags.file) { + throw new Error(`${providerFile} must be specified with the file option`) + } + if (!flags.file.endsWith('.yml') && !flags.file.endsWith('.yaml')) { + throw new Error(`${providerFile} must end in .yml or .yaml`) + } + + this.validateFile?.(flags.file) + + if (invalidPkgJsonProviderType) { + const message = this.warnString`Repository in package.json is not a ${providerEntity}` + if (!flags[entityKey]) { + throw new Error(message) + } else { + warnings.push(message) + } + } else { + if (mismatchPkgJsonRepository) { + warnings.push(this.warnString`Repository in package.json (${git.repository}) differs from provided ${providerEntity} (${entity})`) + } + } + + if (!entity && matchPkg) { + throw new Error(`${providerEntity} must be specified with ${entityKey} option or inferred from the package.json repository field`) + } + if (!entity) { + throw new Error(`${providerEntity} must be specified with ${entityKey} option`) + } + + this.validateEntity(entity) + + return { + values: { + package: pkgName, + file: flags.file, + [entityKey]: entity, + ...(flags.environment && { environment: flags.environment }), + }, + fromPackageJson: { + [entityKey]: usedRepositoryInPkgJson, + package: usedPkgNameFromPkgJson, + }, + warnings: warnings, + urls: { + package: this.getFrontendUrl({ pkgName }), + [entityKey]: this.getEntityUrl({ providerHostname, entity }), + file: this.getEntityUrl({ providerHostname, entity, file: flags.file }), + }, + } + } + + displayResponseBody ({ body, packageName }) { + if (!body || body.length === 0) { + this.dialogue`No trust configurations found for package (${packageName})` + return + } + const items = Array.isArray(body) ? body : [body] + for (const config of items) { + const values = this.constructor.bodyToOptions(config) + output.standard() + this.logOptions({ values }, false) + } + output.standard() + } +} + +module.exports = TrustCommand +module.exports.NPM_FRONTEND = NPM_FRONTEND diff --git a/deps/npm/lib/utils/cmd-list.js b/deps/npm/lib/utils/cmd-list.js index 61f64f77678e2c..ec1d50dcc0c560 100644 --- a/deps/npm/lib/utils/cmd-list.js +++ b/deps/npm/lib/utils/cmd-list.js @@ -62,6 +62,7 @@ const commands = [ 'team', 'test', 'token', + 'trust', 'undeprecate', 'uninstall', 'unpublish', diff --git a/deps/npm/lib/utils/display.js b/deps/npm/lib/utils/display.js index dff16ceebef6fd..122a7f6e8c577a 100644 --- a/deps/npm/lib/utils/display.js +++ b/deps/npm/lib/utils/display.js @@ -337,7 +337,7 @@ class Display { log.resume() // For silent prompts (like password), add newline to preserve output if (meta?.silent) { - output.standard('') + output.standard() } output.flush() this.#progress.resume() @@ -360,7 +360,7 @@ class Display { }) .catch((error) => { // If user hits ctrl+c, add newline to preserve output. - output.standard('') + output.standard() input.end() rej(error) }) diff --git a/deps/npm/lib/utils/npm-usage.js b/deps/npm/lib/utils/npm-usage.js index 1bd790ca601bcd..e01a1956e10545 100644 --- a/deps/npm/lib/utils/npm-usage.js +++ b/deps/npm/lib/utils/npm-usage.js @@ -62,7 +62,7 @@ const cmdUsages = (Npm) => { let maxLen = 0 const set = [] for (const c of commands) { - set.push([c, Npm.cmd(c).describeUsage.split('\n')]) + set.push([c, Npm.cmd(c).getUsage(null, false).split('\n')]) maxLen = Math.max(maxLen, c.length) } diff --git a/deps/npm/lib/utils/reify-output.js b/deps/npm/lib/utils/reify-output.js index f4a8442e9427ff..48a5525d87f802 100644 --- a/deps/npm/lib/utils/reify-output.js +++ b/deps/npm/lib/utils/reify-output.js @@ -215,7 +215,7 @@ const packagesFundingMessage = (npm, { funding }) => { return } - output.standard('') + output.standard() const pkg = funding === 1 ? 'package' : 'packages' const is = funding === 1 ? 'is' : 'are' output.standard(`${funding} ${pkg} ${is} looking for funding`) diff --git a/deps/npm/lib/utils/verify-signatures.js b/deps/npm/lib/utils/verify-signatures.js index baadb2b1227d94..2130c847b60ec4 100644 --- a/deps/npm/lib/utils/verify-signatures.js +++ b/deps/npm/lib/utils/verify-signatures.js @@ -70,7 +70,7 @@ class VerifySignatures { const timing = `audited ${this.auditedWithKeysCount} package${auditedPlural} in ` + `${Math.floor(Number(elapsed) / 1e9)}s` output.standard(timing) - output.standard('') + output.standard() const verifiedBold = this.npm.chalk.bold('verified') if (this.verifiedSignatureCount) { @@ -79,7 +79,7 @@ class VerifySignatures { } else { output.standard(`${this.verifiedSignatureCount} packages have ${verifiedBold} registry signatures`) } - output.standard('') + output.standard() } if (this.verifiedAttestationCount) { @@ -88,7 +88,7 @@ class VerifySignatures { } else { output.standard(`${this.verifiedAttestationCount} packages have ${verifiedBold} attestations`) } - output.standard('') + output.standard() } if (missing.length) { @@ -98,7 +98,7 @@ class VerifySignatures { } else { output.standard(`${missing.length} packages have ${missingClr} registry signatures but the registry is providing signing keys:`) } - output.standard('') + output.standard() missing.map(m => output.standard(`${this.npm.chalk.red(`${m.name}@${m.version}`)} (${m.registry})`) ) @@ -106,7 +106,7 @@ class VerifySignatures { if (invalid.length) { if (missing.length) { - output.standard('') + output.standard() } const invalidClr = this.npm.chalk.redBright('invalid') // We can have either invalid signatures or invalid provenance @@ -117,11 +117,11 @@ class VerifySignatures { } else { output.standard(`${invalidSignatures.length} packages have ${invalidClr} registry signatures:`) } - output.standard('') + output.standard() invalidSignatures.map(i => output.standard(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) ) - output.standard('') + output.standard() } const invalidAttestations = this.invalid.filter(i => i.code === 'EATTESTATIONVERIFY') @@ -131,11 +131,11 @@ class VerifySignatures { } else { output.standard(`${invalidAttestations.length} packages have ${invalidClr} attestations:`) } - output.standard('') + output.standard() invalidAttestations.map(i => output.standard(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) ) - output.standard('') + output.standard() } if (invalid.length === 1) { @@ -143,7 +143,7 @@ class VerifySignatures { } else { output.standard(`Someone might have tampered with these packages since they were published on the registry!`) } - output.standard('') + output.standard() } } diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 5362d690bb960f..9f9d409d7258d1 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM-ACCESS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ACCESS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-access\fR - Set access level on published packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 1b51494c83ff8b..f9585f17655a19 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM-ADDUSER" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ADDUSER" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-adduser\fR - Add a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1 index 6ca08ffeb00041..831e58c2523c04 100644 --- a/deps/npm/man/man1/npm-audit.1 +++ b/deps/npm/man/man1/npm-audit.1 @@ -1,4 +1,4 @@ -.TH "NPM-AUDIT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-AUDIT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-audit\fR - Run a security audit .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 98d937f58a5f7f..e35fabe3baf58d 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM-BUGS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-BUGS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-bugs\fR - Report bugs for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 2773d51316952b..80a1616948371b 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM-CACHE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-CACHE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-cache\fR - Manipulates packages cache .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index e359d05a149681..4b1bcc8d05136b 100644 --- a/deps/npm/man/man1/npm-ci.1 +++ b/deps/npm/man/man1/npm-ci.1 @@ -1,4 +1,4 @@ -.TH "NPM-CI" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-CI" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-ci\fR - Clean install a project .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 3eb22ba152f04c..705689eb4c2101 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM-COMPLETION" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-COMPLETION" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-completion\fR - Tab Completion for npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index ca22066fde3dfc..2ccf69bb3aa2b1 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM-CONFIG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-CONFIG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-config\fR - Manage the npm configuration files .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 68097b27eee691..c44d3aed759860 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEDUPE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DEDUPE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-dedupe\fR - Reduce duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index a0138a3ffad78a..4fe54b1dc0f310 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEPRECATE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DEPRECATE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-deprecate\fR - Deprecate a version of a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1 index 987e048df17132..3de2926a0ec3eb 100644 --- a/deps/npm/man/man1/npm-diff.1 +++ b/deps/npm/man/man1/npm-diff.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIFF" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DIFF" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-diff\fR - The registry diff command .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 0ff3d44fefd2ec..7a3c1ca973b21f 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIST-TAG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DIST-TAG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-dist-tag\fR - Modify package distribution tags .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index fa081d88184438..4a6ba9406cc93e 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DOCS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-docs\fR - Open documentation for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index 9c71d876643ec0..302ab1b63aceba 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCTOR" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-DOCTOR" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-doctor\fR - Check the health of your npm environment .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 8bd8cf3b1138d4..40fffba1996f56 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM-EDIT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EDIT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-edit\fR - Edit an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1 index 172b94faa2619a..0365cc68ee8a5e 100644 --- a/deps/npm/man/man1/npm-exec.1 +++ b/deps/npm/man/man1/npm-exec.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXEC" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EXEC" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-exec\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1 index 16e0f5c2f649a7..45930af8f7e1a8 100644 --- a/deps/npm/man/man1/npm-explain.1 +++ b/deps/npm/man/man1/npm-explain.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLAIN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EXPLAIN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-explain\fR - Explain installed packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 024095265ba87f..e63896088fd354 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLORE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-EXPLORE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-explore\fR - Browse an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1 index e3642618ebdfcc..19521aab95c618 100644 --- a/deps/npm/man/man1/npm-find-dupes.1 +++ b/deps/npm/man/man1/npm-find-dupes.1 @@ -1,4 +1,4 @@ -.TH "NPM-FIND-DUPES" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-FIND-DUPES" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-find-dupes\fR - Find duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index b22112a8ce1113..63707de3419526 100644 --- a/deps/npm/man/man1/npm-fund.1 +++ b/deps/npm/man/man1/npm-fund.1 @@ -1,4 +1,4 @@ -.TH "NPM-FUND" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-FUND" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-fund\fR - Retrieve funding information .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-get.1 b/deps/npm/man/man1/npm-get.1 new file mode 100644 index 00000000000000..85a6b12cc25477 --- /dev/null +++ b/deps/npm/man/man1/npm-get.1 @@ -0,0 +1,31 @@ +.TH "NPM-GET" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-get\fR - Get a value from the npm configuration +.SS "Synopsis" +.P +.RS 2 +.nf +npm get \[lB] ...\[rB] (See `npm config`) +.fi +.RE +.P +Note: This command is unaware of workspaces. +.SS "Description" +.P +Get a value from the npm configuration +.SS "Configuration" +.SS "\fBlong\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help "help config" +.RE 0 diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 4e84d4fc4a89cc..3952cf04f49199 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP-SEARCH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-HELP-SEARCH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-help-search\fR - Search npm help documentation .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index fbcfcc69c36a59..da2d67e6904980 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-HELP" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-help\fR - Get help on npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 14c91671e8650d..1863be5d4f7e6d 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM-INIT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INIT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-init\fR - Create a package.json file .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index 0542364079f461..f5e11905595ec3 100644 --- a/deps/npm/man/man1/npm-install-ci-test.1 +++ b/deps/npm/man/man1/npm-install-ci-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-CI-TEST" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INSTALL-CI-TEST" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index f348a3cfeeecbe..4a3eed7844315b 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-TEST" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INSTALL-TEST" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-install-test\fR - Install package(s) and run tests .SS "Synopsis" @@ -227,6 +227,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 390a1f7a60d67e..4cf689b5cc905a 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-INSTALL" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-install\fR - Install a package .SS "Synopsis" @@ -617,6 +617,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index d5cef0abde1b45..579f3170f3d041 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM-LINK" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LINK" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-link\fR - Symlink a package folder .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ll.1 b/deps/npm/man/man1/npm-ll.1 new file mode 100644 index 00000000000000..aaf6f044c7f03b --- /dev/null +++ b/deps/npm/man/man1/npm-ll.1 @@ -0,0 +1,231 @@ +.TH "NPM-LL" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-ll\fR - List installed packages +.SS "Synopsis" +.P +.RS 2 +.nf +npm ll \[lB]\[lB]<@scope>/\[rB] ...\[rB] + +alias: la +.fi +.RE +.SS "Description" +.P +List installed packages +.SS "Configuration" +.SS "\fBall\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +When running \fBnpm outdated\fR and \fBnpm ls\fR, setting \fB--all\fR will show all outdated or installed packages, rather than only those directly depended upon by the current project. +.SS "\fBjson\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Whether or not to output JSON data, rather than the normal output. +.RS 0 +.IP \(bu 4 +In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. +.RE 0 + +.P +Not supported by all npm commands. +.SS "\fBlong\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. +.SS "\fBparseable\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. +.SS "\fBglobal\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + +.SS "\fBdepth\fR" +.RS 0 +.IP \(bu 4 +Default: \fBInfinity\fR if \fB--all\fR is set; otherwise, \fB0\fR +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +The depth to go when recursing packages for \fBnpm ls\fR. +.P +If not set, \fBnpm ls\fR will show only the immediate dependencies of the root project. If \fB--all\fR is set, then npm will show all dependencies by default. +.SS "\fBomit\fR" +.RS 0 +.IP \(bu 4 +Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production'; otherwise, empty. +.IP \(bu 4 +Type: "dev", "optional", or "peer" (can be set multiple times) +.RE 0 + +.P +Dependency types to omit from the installation tree on disk. +.P +Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. +.P +If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. +.P +If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. +.SS "\fBinclude\fR" +.RS 0 +.IP \(bu 4 +Default: +.IP \(bu 4 +Type: "prod", "dev", "optional", or "peer" (can be set multiple times) +.RE 0 + +.P +Option that allows for defining which types of dependencies to install. +.P +This is the inverse of \fB--omit=\fR. +.P +Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. +.SS "\fBlink\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Used with \fBnpm ls\fR, limiting output to only those packages that are linked. +.SS "\fBpackage-lock-only\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. +.P +For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. +.P +For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. +.SS "\fBunicode\fR" +.RS 0 +.IP \(bu 4 +Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables. +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. +.SS "\fBworkspace\fR" +.RS 0 +.IP \(bu 4 +Default: +.IP \(bu 4 +Type: String (can be set multiple times) +.RE 0 + +.P +Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. +.P +Valid values for the \fBworkspace\fR config are either: +.RS 0 +.IP \(bu 4 +Workspace names +.IP \(bu 4 +Path to a workspace directory +.IP \(bu 4 +Path to a parent workspace directory (will result in selecting all workspaces within that folder) +.RE 0 + +.P +When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. +.P +This value is not exported to the environment for child processes. +.SS "\fBworkspaces\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Boolean +.RE 0 + +.P +Set to true to run the command in the context of \fBall\fR configured workspaces. +.P +Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: +.RS 0 +.IP \(bu 4 +Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. +.RE 0 + +.P +This value is not exported to the environment for child processes. +.SS "\fBinclude-workspace-root\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Include the workspace root when workspaces are enabled for a command. +.P +When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. +.P +This value is not exported to the environment for child processes. +.SS "\fBinstall-links\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help "help config" +.RE 0 diff --git a/deps/npm/man/man1/npm-login.1 b/deps/npm/man/man1/npm-login.1 index e2586baee4b997..ae067523ebdf3e 100644 --- a/deps/npm/man/man1/npm-login.1 +++ b/deps/npm/man/man1/npm-login.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGIN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LOGIN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-login\fR - Login to a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 170f89f7524871..e2420f25d7cde8 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGOUT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LOGOUT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-logout\fR - Log out of the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index c1e323ae19cd76..3388810b7ee4b4 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM-LS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-LS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-ls\fR - List installed packages .SS "Synopsis" @@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit .P .RS 2 .nf -npm@11.9.0 /path/to/npm +npm@11.10.1 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 .fi diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index 0d8bb3255d6fb7..7d5748586c318e 100644 --- a/deps/npm/man/man1/npm-org.1 +++ b/deps/npm/man/man1/npm-org.1 @@ -1,4 +1,4 @@ -.TH "NPM-ORG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ORG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-org\fR - Manage orgs .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 5fc2ef4a0d1cf0..bcb384d11ce6ed 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM-OUTDATED" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-OUTDATED" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-outdated\fR - Check for outdated packages .SS "Synopsis" @@ -179,6 +179,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "See Also" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 7a8f50a73b9624..38e5b7f83a79fd 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM-OWNER" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-OWNER" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-owner\fR - Manage package owners .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 848f68a220ec26..103aabb0f92ce5 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM-PACK" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PACK" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-pack\fR - Create a tarball from a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 0c52252a6bb335..f61708debbd3e2 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM-PING" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PING" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-ping\fR - Ping npm registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1 index 48e1e16ab0f265..faee84f1733fcf 100644 --- a/deps/npm/man/man1/npm-pkg.1 +++ b/deps/npm/man/man1/npm-pkg.1 @@ -1,4 +1,4 @@ -.TH "NPM-PKG" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PKG" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-pkg\fR - Manages your package.json .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index c7437b27f60907..a6f07c3087709a 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM-PREFIX" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PREFIX" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-prefix\fR - Display prefix .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index bee2dcfd4f5b9f..ecf4f55d07194c 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -1,4 +1,4 @@ -.TH "NPM-PROFILE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PROFILE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-profile\fR - Change settings on your registry profile .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 0c6bfda9c62fd4..f5c526f937f85b 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM-PRUNE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PRUNE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-prune\fR - Remove extraneous packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 3aa7010746ec0e..93347d35059d44 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM-PUBLISH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-PUBLISH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-publish\fR - Publish a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-query.1 b/deps/npm/man/man1/npm-query.1 index d2ec010c735cf8..8d48a3680c06f8 100644 --- a/deps/npm/man/man1/npm-query.1 +++ b/deps/npm/man/man1/npm-query.1 @@ -1,4 +1,4 @@ -.TH "NPM-QUERY" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-QUERY" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-query\fR - Dependency selector query .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 35d34945cbde1d..55e347a8480ba6 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM-REBUILD" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-REBUILD" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-rebuild\fR - Rebuild a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 3b0061f59c7728..e19fe8149bcf5e 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM-REPO" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-REPO" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-repo\fR - Open package repository page in the browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 0bdd96dfe7ff97..0c121135136d29 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM-RESTART" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-RESTART" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-restart\fR - Restart a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 9a925000cf2686..17176bbae2f868 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM-ROOT" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-ROOT" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-root\fR - Display npm root .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-run.1 b/deps/npm/man/man1/npm-run.1 index 1584521bbe7008..4d3a9a5bb85dab 100644 --- a/deps/npm/man/man1/npm-run.1 +++ b/deps/npm/man/man1/npm-run.1 @@ -1,4 +1,4 @@ -.TH "NPM-RUN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-RUN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-run\fR - Run arbitrary package scripts .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-sbom.1 b/deps/npm/man/man1/npm-sbom.1 index f30ab1dd916749..3745977f3c3a26 100644 --- a/deps/npm/man/man1/npm-sbom.1 +++ b/deps/npm/man/man1/npm-sbom.1 @@ -1,4 +1,4 @@ -.TH "NPM-SBOM" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SBOM" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-sbom\fR - Generate a Software Bill of Materials (SBOM) .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index d267f1383f1e4f..0ed57d0df778e7 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-SEARCH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SEARCH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-search\fR - Search for packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-set.1 b/deps/npm/man/man1/npm-set.1 new file mode 100644 index 00000000000000..d40bf8be42161d --- /dev/null +++ b/deps/npm/man/man1/npm-set.1 @@ -0,0 +1,61 @@ +.TH "NPM-SET" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-set\fR - Set a value in the npm configuration +.SS "Synopsis" +.P +.RS 2 +.nf +npm set = \[lB]= ...\[rB] (See `npm config`) +.fi +.RE +.P +Note: This command is unaware of workspaces. +.SS "Description" +.P +Set a value in the npm configuration +.SS "Configuration" +.SS "\fBglobal\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + +.SS "\fBlocation\fR" +.RS 0 +.IP \(bu 4 +Default: "user" unless \fB--global\fR is passed, which will also set this value to "global" +.IP \(bu 4 +Type: "global", "user", or "project" +.RE 0 + +.P +When passed to \fBnpm config\fR this refers to which config file to use. +.P +When set to "global" mode, packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help "help config" +.RE 0 diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index fdcae4f7d35b79..d90167af72cf0e 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SHRINKWRAP" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-shrinkwrap\fR - Lock down dependency versions for publication .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 89c6c5bf908ffe..7d18a9b387f8f5 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM-STAR" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-STAR" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-star\fR - Mark your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index f03099894f8f69..a01f377a511ba9 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM-STARS" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-STARS" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-stars\fR - View packages marked as favorites .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 6451a45c812829..12ef36db1de48b 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM-START" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-START" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-start\fR - Start a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index f7e164c779da55..b9d48a28ddb148 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM-STOP" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-STOP" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-stop\fR - Stop a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 753f6f24d3dcd9..e95577f1ca9708 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEAM" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-TEAM" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-team\fR - Manage organization teams and team memberships .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 8633adfb9c6c3f..287c3c3751b204 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEST" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-TEST" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-test\fR - Test a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index 7f02acf3763021..597c13472529dd 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -1,4 +1,4 @@ -.TH "NPM-TOKEN" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-TOKEN" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-token\fR - Manage your authentication tokens .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-trust.1 b/deps/npm/man/man1/npm-trust.1 new file mode 100644 index 00000000000000..3383444e491d2c --- /dev/null +++ b/deps/npm/man/man1/npm-trust.1 @@ -0,0 +1,123 @@ +.TH "NPM-TRUST" "1" "February 2026" "NPM@11.10.1" "" +.SH "NAME" +\fBnpm-trust\fR - Manage trusted publishing relationships between packages and CI/CD providers +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust +.fi +.RE +.P +Note: This command is unaware of workspaces. +.SS "Prerequisites" +.P +Before using npm trust commands, ensure the following requirements are met: +.RS 0 +.IP \(bu 4 +\fBnpm version\fR: \fBnpm@11.10.0\fR or above is required. Use \fBnpm install -g npm@^11.10.0\fR to update if needed. +.IP \(bu 4 +\fBWrite permissions on the package\fR: You must have write access to the package you're configuring. +.IP \(bu 4 +\fB2FA enabled on account\fR: Two-factor authentication must be enabled at the account level. Even if it's not currently enabled, you must enable it to use trust commands. +.IP \(bu 4 +\fBSupported authentication methods\fR: Granular Access Tokens (GAT) with the bypass 2FA option are not supported. Legacy basic auth (username and password) credentials will not work for trust commands or endpoints. +.IP \(bu 4 +\fBPackage must exist\fR: The package you're configuring must already exist on the npm registry. +.RE 0 + +.SS "Description" +.P +Configure trust relationships between npm packages and CI/CD providers using OpenID Connect (OIDC). This is the command-line equivalent of managing trusted publisher configurations on the npm website. +.P +For a comprehensive overview of trusted publishing, see the \fBnpm trusted publishers documentation\fR \fI\(lahttps://docs.npmjs.com/trusted-publishers\(ra\fR. +.P +The \fB\[lB]package\[rB]\fR argument specifies the package name. If omitted, npm will use the name from the \fBpackage.json\fR in the current directory. +.P +Each trust relationship has its own set of configuration options and flags based on the OIDC claims provided by that provider. OIDC claims come from the CI/CD provider and include information such as repository name, workflow file, or environment. Since each provider's claims differ, the available flags and configuration keys are not universal\[em]npm matches the claims supported by each provider's OIDC configuration. For specific details on which claims and flags are supported for a given provider, use \fBnpm trust --help\fR. +.P +The required options depend on the CI/CD provider you're configuring. Detailed information about each option is available in the \fBmanaging trusted publisher configurations\fR \fI\(lahttps://docs.npmjs.com/trusted-publishers#managing-trusted-publisher-configurations\(ra\fR section of the npm documentation. If a provider is repository-based and the option is not provided, npm will use the \fBrepository.url\fR field from your \fBpackage.json\fR, if available. +.P +Currently, the registry only supports one configuration per package. If you attempt to create a new trust relationship when one already exists, it will result in an error. To replace an existing configuration: +.RS 0 +.IP 1. 4 +Use \fBnpm trust list \[lB]package\[rB]\fR to view the ID of the existing trusted publisher +.IP 2. 4 +Use \fBnpm trust revoke --id \[lB]package\[rB]\fR to remove the existing configuration +.IP 3. 4 +Then create your new trust relationship +.RE 0 + +.SS "Bulk Usage" +.P +For maintainers managing a large number of packages, you can configure trusted publishing in bulk using bash scripting. Create a loop that iterates through package names and their corresponding configuration details, executing the \fBnpm trust \fR command with the \fB--yes\fR flag for each package. +.P +The first request will require two-factor authentication. During two-factor authentication, you'll see an option on the npm website to skip two-factor authentication for the next 5 minutes. Enabling this option will allow subsequent \fBnpm trust \fR commands to proceed without two-factor authentication, streamlining the bulk configuration process. +.P +We recommend adding a 2-second sleep between each call to avoid rate limiting. With this approach, you can configure approximately 80 packages within the 5-minute two-factor authentication skip window. +.SS "Configuration" +.SS "\fBnpm trust github\fR" +.P +Create a trusted relationship between a package and GitHub Actions +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust github \[lB]package\[rB] --file \[lB]--repo|--repository\[rB] \[lB]--env|--environment\[rB] \[lB]-y|--yes\[rB] +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--file\fR | null | String (required) | Name of workflow file within a repositories .GitHub folder (must end in yaml, yml) | | \fB--repository\fR, \fB--repo\fR | null | String | Name of the repository in the format owner/repo | | \fB--environment\fR, \fB--env\fR | null | String | CI environment name | | \fB--dry-run\fR | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. | | \fB--json\fR | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. Not supported by all npm commands. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | | \fB--yes\fR, \fB-y\fR | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | +.SS "\fBnpm trust gitlab\fR" +.P +Create a trusted relationship between a package and GitLab CI/CD +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust gitlab \[lB]package\[rB] --file \[lB]--project|--repo|--repository\[rB] \[lB]--env|--environment\[rB] \[lB]-y|--yes\[rB] +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--file\fR | null | String (required) | Name of pipeline file (e.g., .gitlab-ci.yml) | | \fB--project\fR | null | String | Name of the project in the format group/project or group/subgroup/project | | \fB--environment\fR, \fB--env\fR | null | String | CI environment name | | \fB--dry-run\fR | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. | | \fB--json\fR | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. Not supported by all npm commands. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | | \fB--yes\fR, \fB-y\fR | null | null or Boolean | Automatically answer "yes" to any prompts that npm might print on the command line. | +.SS "\fBnpm trust list\fR" +.P +List trusted relationships for a package +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust list \[lB]package\[rB] +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--json\fR | false | Boolean | Whether or not to output JSON data, rather than the normal output. * In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. Not supported by all npm commands. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +.SS "\fBnpm trust revoke\fR" +.P +Revoke a trusted relationship for a package +.SS "Synopsis" +.P +.RS 2 +.nf +npm trust revoke \[lB]package\[rB] --id= +.fi +.RE +.SS "Flags" +.P +| Flag | Default | Type | Description | | --- | --- | --- | --- | | \fB--id\fR | null | String (required) | ID of the trusted relationship to revoke | | \fB--dry-run\fR | false | Boolean | Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. | | \fB--registry\fR | "https://registry.npmjs.org/" | URL | The base URL of the npm registry. | +.SS "See Also" +.RS 0 +.IP \(bu 4 +npm help publish +.IP \(bu 4 +npm help token +.IP \(bu 4 +npm help access +.IP \(bu 4 +npm help config +.IP \(bu 4 +npm help registry +.RE 0 diff --git a/deps/npm/man/man1/npm-undeprecate.1 b/deps/npm/man/man1/npm-undeprecate.1 index eece58dcaa5451..e71e2ff9663af3 100644 --- a/deps/npm/man/man1/npm-undeprecate.1 +++ b/deps/npm/man/man1/npm-undeprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNDEPRECATE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNDEPRECATE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-undeprecate\fR - Undeprecate a version of a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index d51f4f757640f3..e43b96e4961843 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNINSTALL" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNINSTALL" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-uninstall\fR - Remove a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 4a4df7ca4ceb1f..47bc7ea639f25e 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNPUBLISH" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNPUBLISH" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-unpublish\fR - Remove a package from the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1 index 78a1fe792cc718..b3e432256ab763 100644 --- a/deps/npm/man/man1/npm-unstar.1 +++ b/deps/npm/man/man1/npm-unstar.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNSTAR" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UNSTAR" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-unstar\fR - Remove an item from your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index b8e1f2c00a6057..f9d32446333e90 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM-UPDATE" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-UPDATE" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-update\fR - Update packages .SS "Synopsis" @@ -299,6 +299,22 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 98facf40835a7a..487479ef954713 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM-VERSION" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-VERSION" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-version\fR - Bump a package version .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 1c4def17b18941..fc528772d09e76 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM-VIEW" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-VIEW" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-view\fR - View registry info .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index e150e300f18f8a..6100a8d5e7a789 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM-WHOAMI" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM-WHOAMI" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-whoami\fR - Display npm username .SS "Synopsis" diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 5d5d24a0917c41..06c8262446e887 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPM" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm\fR - javascript package manager .SS "Synopsis" @@ -12,7 +12,7 @@ npm Note: This command is unaware of workspaces. .SS "Version" .P -11.9.0 +11.10.1 .SS "Description" .P npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1 index 6857e549b7993c..2f9a523277dd2c 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "February 2026" "NPM@11.9.0" "" +.TH "NPX" "1" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpx\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5 index 98825654a7ec7e..c234d1c9a9a723 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,6 +1,6 @@ -.TH "FOLDERS" "5" "February 2026" "NPM@11.9.0" "" +.TH "FOLDERS" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBfolders\fR - Folder Structures Used by npm +\fBFolders\fR - Folder structures used by npm .SS "Description" .P npm puts various things on your computer. That's its job. diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5 index 19e268dc14c86c..d93e54825dcf64 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,6 +1,6 @@ -.TH "INSTALL" "5" "February 2026" "NPM@11.9.0" "" +.TH "INSTALL" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBinstall\fR - Download and install node and npm +\fBInstall\fR - Download and install node and npm .SS "Description" .P To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. \fBWe strongly recommend using a Node version manager to install Node.js and npm.\fR We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally. diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 98825654a7ec7e..c234d1c9a9a723 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,6 +1,6 @@ -.TH "FOLDERS" "5" "February 2026" "NPM@11.9.0" "" +.TH "FOLDERS" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBfolders\fR - Folder Structures Used by npm +\fBFolders\fR - Folder structures used by npm .SS "Description" .P npm puts various things on your computer. That's its job. diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index cc78b4c28906d1..9bc25a4dcc7989 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5 index 1410d2d58b57a8..112353df02a54c 100644 --- a/deps/npm/man/man5/npm-shrinkwrap-json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap-json.5 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "NPM-SHRINKWRAP.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR - A publishable lockfile .SS "Description" diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 27ea3965d5b5c8..bc4ded58c3cee6 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,6 +1,6 @@ -.TH "NPMRC" "5" "February 2026" "NPM@11.9.0" "" +.TH ".NPMRC" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBnpmrc\fR - The npm config files +\fB.npmrc\fR - The npm config files .SS "Description" .P npm gets its config settings from the command line, environment variables, and \fBnpmrc\fR files. @@ -99,6 +99,43 @@ The full list is: .P In order to scope these values, they must be prefixed by a URI fragment. If the credential is meant for any request to a registry on a single host, the scope may look like \fB//registry.npmjs.org/:\fR. If it must be scoped to a specific path on the host that path may also be provided, such as \fB//my-custom-registry.org/unique/path:\fR. +.SS "Unsupported Custom Configuration Keys" +.P +Starting in npm v11.2.0, npm warns when unknown configuration keys are defined in \fB.npmrc\fR. In a future major version of npm, these unknown keys may no longer be accepted. +.P +Only configuration keys that npm officially supports are recognized. Custom keys intended for third-party tools (for example, \fBelectron-builder\fR) should not be placed in \fB.npmrc\fR. +.P +If you need package-level configuration for use in scripts, use the \fBconfig\fR field in your \fBpackage.json\fR instead: +.P +.RS 2 +.nf +{ + "name": "my-package", + "config": { + "mirror": "https://example.com/" + } +} + +.fi +.RE +.P +Values defined in \fBpackage.json#config\fR are exposed to scripts as environment variables prefixed with \fBnpm_package_config_\fR. For example: +.P +.RS 2 +.nf +npm_package_config_mirror +.fi +.RE +.P +If you need to pass arguments to a script command, use \fB--\fR to separate npm arguments from script arguments: +.P +.RS 2 +.nf +npm run build -- --customFlag +.fi +.RE +.P +Using environment variables is also recommended for cross-platform configuration instead of defining unsupported keys in \fB.npmrc\fR. .P .RS 2 .nf @@ -120,6 +157,29 @@ _authToken=MYTOKEN //somewhere-else.com/another/:_authToken=MYTOKEN2 .fi .RE +.SS "Custom / third-party config keys" +.P +npm only recognizes its own npm help "configuration options". If your \fB.npmrc\fR contains keys that are not part of npm's config definitions (for example, \fBelectron_mirror\fR or \fBsass_binary_site\fR), npm will emit a warning: +.P +.RS 2 +.nf +warn Unknown user config "electron_mirror". +This will stop working in the next major version of npm. +.fi +.RE +.P +These keys were historically tolerated but are not officially supported. A future major version of npm will treat unknown top-level keys as errors. +.P +Some tools (such as \fB@electron/get\fR or \fBnode-sass\fR) read their own configuration from environment variables or from \fB.npmrc\fR by convention. You can set these values as environment variables instead: +.P +.RS 2 +.nf +export ELECTRON_MIRROR="https://mirrorexample.npmjs.org/mirrors/electron/" +export ELECTRON_CUSTOM_DIR="{{ version }}" +.fi +.RE +.P +Environment variables are the most portable approach and work regardless of \fB.npmrc\fR format. .SS "See also" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5 index cc78b4c28906d1..9bc25a4dcc7989 100644 --- a/deps/npm/man/man5/package-json.5 +++ b/deps/npm/man/man5/package-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "PACKAGE.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5 index cac4c31904017a..0d28b1d5b66a9d 100644 --- a/deps/npm/man/man5/package-lock-json.5 +++ b/deps/npm/man/man5/package-lock-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE-LOCK.JSON" "5" "February 2026" "NPM@11.9.0" "" +.TH "PACKAGE-LOCK.JSON" "5" "February 2026" "NPM@11.10.1" "" .SH "NAME" \fBpackage-lock.json\fR - A manifestation of the manifest .SS "Description" diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index 4bb01187c4bd98..dd6762e3e9298a 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,6 +1,6 @@ -.TH "CONFIG" "7" "February 2026" "NPM@11.9.0" "" +.TH "CONFIG" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBconfig\fR - More than you probably want to know about npm configuration +\fBConfig\fR - About npm configuration .SS "Description" .P This article details npm configuration in general. To learn about the \fBconfig\fR command, see npm help config. @@ -258,6 +258,8 @@ Type: null or Date If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the given date are installed. If there are no versions available for the current set of dependencies, the command will error. .P If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. +.P +This config cannot be used with: \fBmin-release-age\fR .SS "\fBbin-links\fR" .RS 0 .IP \(bu 4 @@ -1093,6 +1095,20 @@ Type: String Commit message which is used by \fBnpm version\fR when creating version commit. .P Any "%s" in the message will be replaced with the version number. +.SS "\fBmin-release-age\fR" +.RS 0 +.IP \(bu 4 +Default: null +.IP \(bu 4 +Type: null or Number +.RE 0 + +.P +If set, npm will build the npm tree such that only versions that were available more than the given number of days ago will be installed. If there are no versions available for the current set of dependencies, the command will error. +.P +This flag is a complement to \fBbefore\fR, which accepts an exact date instead of a relative number of days. +.P +This config cannot be used with: \fBbefore\fR .SS "\fBname\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man7/dependency-selectors.7 b/deps/npm/man/man7/dependency-selectors.7 index 911720c8096a6e..dd3e7a6ef34f38 100644 --- a/deps/npm/man/man7/dependency-selectors.7 +++ b/deps/npm/man/man7/dependency-selectors.7 @@ -1,6 +1,6 @@ -.TH "QUERYING" "7" "February 2026" "NPM@11.9.0" "" +.TH "SELECTORS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBQuerying\fR - Dependency Selector Syntax & Querying +\fBSelectors\fR - Dependency Selector Syntax & Querying .SS "Description" .P The npm help query command exposes a new dependency selector syntax (informed by & respecting many aspects of the \fBCSS Selectors 4 Spec\fR \fI\(lahttps://dev.w3.org/csswg/selectors4/#relational\(ra\fR) which: diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7 index 183d99855d3a44..0ab014e6e9a101 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,6 +1,6 @@ -.TH "DEVELOPERS" "7" "February 2026" "NPM@11.9.0" "" +.TH "DEVELOPERS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBdevelopers\fR - Developer Guide +\fBDevelopers\fR - Developer guide .SS "Description" .P So, you've decided to use npm to develop (and maybe publish/deploy) your project. diff --git a/deps/npm/man/man7/logging.7 b/deps/npm/man/man7/logging.7 index 90b8f5a4d0e81f..9a908aba36f6a5 100644 --- a/deps/npm/man/man7/logging.7 +++ b/deps/npm/man/man7/logging.7 @@ -1,6 +1,6 @@ -.TH "LOGGING" "7" "February 2026" "NPM@11.9.0" "" +.TH "LOGGING" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBLogging\fR - Why, What & How We Log +\fBLogging\fR - Why, What & How we Log .SS "Description" .P The \fBnpm\fR CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments. diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7 index bd9ad434ebfc7f..8fd783364ac41f 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,6 +1,6 @@ -.TH "ORGS" "7" "February 2026" "NPM@11.9.0" "" +.TH "ORGANIZATIONS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBorgs\fR - Working with Teams & Orgs +\fBOrganizations\fR - Working with teams & organizations .SS "Description" .P There are three levels of org users: diff --git a/deps/npm/man/man7/package-spec.7 b/deps/npm/man/man7/package-spec.7 index a781d999dbf9da..cb3dea0cdf1313 100644 --- a/deps/npm/man/man7/package-spec.7 +++ b/deps/npm/man/man7/package-spec.7 @@ -1,6 +1,6 @@ -.TH "PACKAGE-SPEC" "7" "February 2026" "NPM@11.9.0" "" +.TH "SPEC" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBpackage-spec\fR - Package name specifier +\fBspec\fR - Package name specifier .SS "Description" .P Commands like \fBnpm install\fR and the dependency sections in the \fBpackage.json\fR use a package name specifier. This can be many different things that all refer to a "package". Examples include a package name, git url, tarball, or local directory. These will generally be referred to as \fB\fR in the help output for the npm commands that use this package name specifier. diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7 index 73e1a90337b58a..6804fce0cd3063 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,6 +1,6 @@ -.TH "REGISTRY" "7" "February 2026" "NPM@11.9.0" "" +.TH "REGISTRY" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBregistry\fR - The JavaScript Package Registry +\fBRegistry\fR - The JavaScript Package Registry .SS "Description" .P To resolve packages by name and version, npm talks to a registry website that implements the CommonJS Package Registry specification for reading package info. diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7 index f36cc64049494e..f043dbf8a91e3c 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,6 +1,6 @@ -.TH "REMOVAL" "7" "February 2026" "NPM@11.9.0" "" +.TH "REMOVAL" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBremoval\fR - Cleaning the Slate +\fBRemoval\fR - Cleaning the slate .SS "Synopsis" .P So sad to see you go. diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7 index 7512e6f2c86c9d..dad4fff844b650 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,6 +1,6 @@ -.TH "SCOPE" "7" "February 2026" "NPM@11.9.0" "" +.TH "SCOPE" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBscope\fR - Scoped packages +\fBScope\fR - Scoped packages .SS "Description" .P All npm packages have a name. Some package names also have a scope. A scope follows the usual rules for package names (URL-safe characters, no leading dots or underscores). When used in package names, scopes are preceded by an \fB@\fR symbol and followed by a slash, e.g. diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7 index 188e535be58fdb..bc351acb227627 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,6 +1,6 @@ -.TH "SCRIPTS" "7" "February 2026" "NPM@11.9.0" "" +.TH "SCRIPTS" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBscripts\fR - How npm handles the "scripts" field +\fBScripts\fR - How npm handles the "scripts" field .SS "Description" .P The \fB"scripts"\fR property of your \fBpackage.json\fR file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running \fBnpm run \fR. \fIPre\fR and \fIpost\fR commands with matching names will be run for those as well (e.g. \fBpremyscript\fR, \fBmyscript\fR, \fBpostmyscript\fR). Scripts from dependencies can be run with \fBnpm explore -- npm run \fR. diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7 index b719ae79d6fd2f..8f734cbccb54e5 100644 --- a/deps/npm/man/man7/workspaces.7 +++ b/deps/npm/man/man7/workspaces.7 @@ -1,6 +1,6 @@ -.TH "WORKSPACES" "7" "February 2026" "NPM@11.9.0" "" +.TH "WORKSPACES" "7" "February 2026" "NPM@11.10.1" "" .SH "NAME" -\fBworkspaces\fR - Working with workspaces +\fBWorkspaces\fR - Working with workspaces .SS "Description" .P \fBWorkspaces\fR is a generic term that refers to the set of features in the npm cli that provides support for managing multiple packages from your local file system from within a singular top-level, root package. diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js index b4319fab6bd37c..a256b79049eba6 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js @@ -339,7 +339,8 @@ module.exports = cls => class IdealTreeBuilder extends cls { filter: node => node, visit: node => { for (const edge of node.edgesOut.values()) { - if ((!edge.to && edge.type !== 'peerOptional') || !edge.valid) { + const skipPeerOptional = edge.type === 'peerOptional' && this.options.save === false + if (!skipPeerOptional && (!edge.to || !edge.valid)) { this.#depsQueue.push(node) break // no need to continue the loop after the first hit } @@ -966,9 +967,17 @@ This is a one-time fix-up, please be patient... continue } const { from, valid, peerConflicted } = edgeIn - if (!peerConflicted && !valid && !this.#depsSeen.has(from)) { - this.addTracker('idealTree', from.name, from.location) - this.#depsQueue.push(edgeIn.from) + if (!peerConflicted && !valid) { + if (this.#depsSeen.has(from) && this.options.save) { + // Re-queue already-processed nodes when a newly placed dep creates an invalid edge during npm install (save=true). + // This handles the case where a peerOptional dep was valid (missing) when the node was first processed, but becomes invalid when the dep is later placed by another path with a version that doesn't satisfy the peer spec. + // See npm/cli#8726. + this.#depsSeen.delete(from) + this.#depsQueue.push(from) + } else if (!this.#depsSeen.has(from)) { + this.addTracker('idealTree', from.name, from.location) + this.#depsQueue.push(from) + } } } } else { @@ -1165,9 +1174,13 @@ This is a one-time fix-up, please be patient... continue } - // If the edge has an error, there's a problem. + // If the edge has an error, there's a problem, unless it's peerOptional and we're not saving (e.g. npm ci), in which case we trust the lockfile and skip re-resolution. + // When saving (npm install), peerOptional invalid edges ARE treated as problems so the lockfile gets fixed. + // See npm/cli#8726. if (!edge.valid) { - problems.push(edge) + if (edge.type !== 'peerOptional' || this.options.save !== false) { + problems.push(edge) + } continue } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js index 6571c0b5fae6c9..bee7ce2768c4d9 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js @@ -82,7 +82,7 @@ const depValid = (child, requested, requestor) => { const resRepo = npa(child.resolved || '') const resHost = resRepo.hosted const reqHost = requested.hosted - const reqCommit = /^[a-fA-F0-9]{40}$/.test(requested.gitCommittish || '') + const reqCommit = /^[a-fA-F0-9]{40,64}$/.test(requested.gitCommittish || '') const nc = { noCommittish: !reqCommit } if (!resHost) { if (resRepo.fetchSpec !== requested.fetchSpec) { diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json index 4f4df390ffedd0..b00071df9186fa 100644 --- a/deps/npm/node_modules/@npmcli/arborist/package.json +++ b/deps/npm/node_modules/@npmcli/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "9.2.0", + "version": "9.3.1", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -40,7 +40,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "benchmark": "^2.1.4", "minify-registry-metadata": "^4.0.0", "nock": "^13.3.3", @@ -92,7 +92,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js b/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js index 26ba0c0bc14b9a..c151506b244763 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js +++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/definition.js @@ -22,6 +22,8 @@ const allowed = [ 'typeDescription', 'usage', 'envExport', + 'alias', + 'required', ] const { diff --git a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js index 5f86c3e94fed48..0de8142d3ca77b 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js +++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js @@ -246,6 +246,7 @@ const definitions = { default: null, hint: '', type: [null, Date], + exclusive: ['min-release-age'], description: ` If passed to \`npm install\`, will rebuild the npm tree such that only versions that were available **on or before** the given date are @@ -1347,6 +1348,28 @@ const definitions = { `, flatten, }), + 'min-release-age': new Definition('min-release-age', { + default: null, + hint: '', + type: [null, Number], + exclusive: ['before'], + description: ` + If set, npm will build the npm tree such that only versions that were + available more than the given number of days ago will be installed. If + there are no versions available for the current set of dependencies, the + command will error. + + This flag is a complement to \`before\`, which accepts an exact date + instead of a relative number of days. + `, + flatten: (key, obj, flatOptions) => { + if (obj['min-release-age'] !== null) { + flatOptions.before = new Date(Date.now() - (86400000 * obj['min-release-age'])) + obj.before = flatOptions.before + delete obj['min-release-age'] + } + }, + }), 'node-gyp': new Definition('node-gyp', { default: (() => { try { diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js index 0ad716ccb069ff..8520a02b6ed77c 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/index.js +++ b/deps/npm/node_modules/@npmcli/config/lib/index.js @@ -59,6 +59,7 @@ class Config { #flatten // populated the first time we flatten the object #flatOptions = null + #warnings = [] static get typeDefs () { return typeDefs @@ -78,20 +79,13 @@ class Config { execPath = process.execPath, cwd = process.cwd(), excludeNpmCwd = false, + warn = true, }) { this.nerfDarts = nerfDarts this.definitions = definitions // turn the definitions into nopt's weirdo syntax - const types = {} - const defaults = {} - this.deprecated = {} - for (const [key, def] of Object.entries(definitions)) { - defaults[key] = def.default - types[key] = def.type - if (def.deprecated) { - this.deprecated[key] = def.deprecated.trim().replace(/\n +/, '\n') - } - } + const { types, defaults, deprecated } = getTypesFromDefinitions(definitions) + this.deprecated = deprecated this.#flatten = flatten this.types = types @@ -137,6 +131,7 @@ class Config { } this.#loaded = false + this.warn = warn } get list () { @@ -369,7 +364,7 @@ class Config { } nopt.invalidHandler = (k, val, type) => this.invalidHandler(k, val, type, 'command line options', 'cli') - nopt.unknownHandler = this.unknownHandler + nopt.unknownHandler = (k, next) => this.unknownHandler(k, next) nopt.abbrevHandler = this.abbrevHandler const conf = nopt(this.types, this.shorthands, this.argv) nopt.invalidHandler = null @@ -545,7 +540,7 @@ class Config { unknownHandler (key, next) { if (next) { - log.warn(`"${next}" is being parsed as a normal command line argument.`) + this.queueWarning(`unknown:${next}`, `"${next}" is being parsed as a normal command line argument.`) } } @@ -613,13 +608,16 @@ class Config { if (internalEnv.includes(key)) { return } + const hint = where !== 'cli' + ? ' See `npm help npmrc` for supported config options.' + : '' if (!key.includes(':')) { - log.warn(`Unknown ${where} config "${where === 'cli' ? '--' : ''}${key}". This will stop working in the next major version of npm.`) + this.queueWarning(key, `Unknown ${where} config "${where === 'cli' ? '--' : ''}${key}". This will stop working in the next major version of npm.${hint}`) return } const baseKey = key.split(':').pop() if (!this.definitions[baseKey] && !this.nerfDarts.includes(baseKey)) { - log.warn(`Unknown ${where} config "${baseKey}" (${key}). This will stop working in the next major version of npm.`) + this.queueWarning(baseKey, `Unknown ${where} config "${baseKey}" (${key}). This will stop working in the next major version of npm.${hint}`) } } } @@ -923,6 +921,35 @@ class Config { setEnvs () { setEnvs(this) } + + removeWarning (key) { + this.#warnings = this.#warnings.filter(w => w.type !== key) + } + + getUnknownPositionals () { + return this.#warnings + .filter(w => w.type.startsWith('unknown:')) + .map(w => w.type.slice('unknown:'.length)) + } + + removeUnknownPositional (value) { + this.removeWarning(`unknown:${value}`) + } + + queueWarning (type, ...args) { + if (!this.warn) { + this.#warnings.push({ type, args }) + } else { + log.warn(...args) + } + } + + logWarnings () { + for (const warning of this.#warnings) { + log.warn(...warning.args) + } + this.#warnings = [] + } } const _loadError = Symbol('loadError') @@ -980,4 +1007,21 @@ class ConfigData { } } +const getTypesFromDefinitions = (definitions) => { + const types = {} + const defaults = {} + const deprecated = {} + + for (const [key, def] of Object.entries(definitions)) { + defaults[key] = def.default + types[key] = def.type + if (def.deprecated) { + deprecated[key] = def.deprecated.trim().replace(/\n +/, '\n') + } + } + + return { types, defaults, deprecated } +} + module.exports = Config +module.exports.getTypesFromDefinitions = getTypesFromDefinitions diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index b11a01a8ba8137..980a53d738b48d 100644 --- a/deps/npm/node_modules/@npmcli/config/package.json +++ b/deps/npm/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "10.6.0", + "version": "10.7.1", "files": [ "bin/", "lib/" @@ -33,7 +33,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-globals": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "dependencies": { @@ -51,7 +51,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/license.js b/deps/npm/node_modules/@npmcli/package-json/lib/license.js new file mode 100644 index 00000000000000..6428e83730550e --- /dev/null +++ b/deps/npm/node_modules/@npmcli/package-json/lib/license.js @@ -0,0 +1,27 @@ +// This is an implementation of the validForNewPackage flag in validate-npm-package-license, which is no longer maintained + +const parse = require('spdx-expression-parse') + +function usesLicenseRef (ast) { + if (Object.hasOwn(ast, 'license')) { + return ast.license.startsWith('LicenseRef') || ast.license.startsWith('DocumentRef') + } else { + return usesLicenseRef(ast.left) || usesLicenseRef(ast.right) + } +} + +// license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN " +module.exports = function licenseValidForNewPackage (argument) { + if (argument === 'UNLICENSED' || argument === 'UNLICENCED') { + return true + } + if (/^SEE LICEN[CS]E IN ./.test(argument)) { + return true + } + try { + const ast = parse(argument) + return !usesLicenseRef(ast) + } catch { + return false + } +} diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js b/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js index 1c1a36984c5e9b..7bd86b5f5bb64c 100644 --- a/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js +++ b/deps/npm/node_modules/@npmcli/package-json/lib/normalize-data.js @@ -2,7 +2,7 @@ const { URL } = require('node:url') const hostedGitInfo = require('hosted-git-info') -const validateLicense = require('validate-npm-package-license') +const validateLicense = require('./license.js') const typos = { dependancies: 'dependencies', @@ -230,7 +230,7 @@ function normalizeData (data, changes) { changes?.push('No license field.') } else if (typeof (license) !== 'string' || license.length < 1 || license.trim() === '') { changes?.push('license should be a valid SPDX license expression') - } else if (!validateLicense(license).validForNewPackages) { + } else if (!validateLicense(license)) { changes?.push('license should be a valid SPDX license expression') } // fixPeople diff --git a/deps/npm/node_modules/@npmcli/package-json/package.json b/deps/npm/node_modules/@npmcli/package-json/package.json index 31aa68a6654dce..fe46d77edcb4d5 100644 --- a/deps/npm/node_modules/@npmcli/package-json/package.json +++ b/deps/npm/node_modules/@npmcli/package-json/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/package-json", - "version": "7.0.4", + "version": "7.0.5", "description": "Programmatic API to update package.json", "keywords": [ "npm", @@ -35,11 +35,11 @@ "json-parse-even-better-errors": "^5.0.0", "proc-log": "^6.0.0", "semver": "^7.5.3", - "validate-npm-package-license": "^3.0.4" + "spdx-expression-parse": "^4.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^6.0.0", - "@npmcli/template-oss": "4.28.0", + "@npmcli/template-oss": "4.28.1", "tap": "^16.0.1" }, "engines": { @@ -47,7 +47,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.28.0", + "version": "4.28.1", "publish": "true" }, "tap": { diff --git a/deps/npm/node_modules/ansi-regex/index.js b/deps/npm/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff837d3ff01..00000000000000 --- a/deps/npm/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/deps/npm/node_modules/ansi-regex/license b/deps/npm/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/ansi-regex/package.json b/deps/npm/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f53116a9e28..00000000000000 --- a/deps/npm/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/deps/npm/node_modules/@isaacs/balanced-match/LICENSE.md b/deps/npm/node_modules/balanced-match/LICENSE.md similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/LICENSE.md rename to deps/npm/node_modules/balanced-match/LICENSE.md diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/index.js b/deps/npm/node_modules/balanced-match/dist/commonjs/index.js similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/index.js rename to deps/npm/node_modules/balanced-match/dist/commonjs/index.js diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/package.json b/deps/npm/node_modules/balanced-match/dist/commonjs/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/commonjs/package.json rename to deps/npm/node_modules/balanced-match/dist/commonjs/package.json diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/esm/index.js b/deps/npm/node_modules/balanced-match/dist/esm/index.js similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/esm/index.js rename to deps/npm/node_modules/balanced-match/dist/esm/index.js diff --git a/deps/npm/node_modules/@isaacs/balanced-match/dist/esm/package.json b/deps/npm/node_modules/balanced-match/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/balanced-match/dist/esm/package.json rename to deps/npm/node_modules/balanced-match/dist/esm/package.json diff --git a/deps/npm/node_modules/@isaacs/balanced-match/package.json b/deps/npm/node_modules/balanced-match/package.json similarity index 76% rename from deps/npm/node_modules/@isaacs/balanced-match/package.json rename to deps/npm/node_modules/balanced-match/package.json index 49296e6af443c4..9ed26bf64e24b5 100644 --- a/deps/npm/node_modules/@isaacs/balanced-match/package.json +++ b/deps/npm/node_modules/balanced-match/package.json @@ -1,13 +1,13 @@ { - "name": "@isaacs/balanced-match", + "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "4.0.1", + "version": "4.0.3", "files": [ "dist" ], "repository": { "type": "git", - "url": "git://github.com/isaacs/balanced-match.git" + "url": "git://github.com/juliangruber/balanced-match.git" }, "exports": { "./package.json": "./package.json", @@ -32,24 +32,13 @@ "presnap": "npm run prepare", "test": "tap", "snap": "tap", - "format": "prettier --write . --loglevel warn", + "format": "prettier --write .", "benchmark": "node benchmark/index.js", "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, - "prettier": { - "semi": false, - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, "devDependencies": { "@types/brace-expansion": "^1.1.2", - "@types/node": "^24.0.0", + "@types/node": "^25.2.1", "mkdirp": "^3.0.1", "prettier": "^3.3.2", "tap": "^21.1.0", diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/LICENSE b/deps/npm/node_modules/brace-expansion/LICENSE similarity index 100% rename from deps/npm/node_modules/@isaacs/brace-expansion/LICENSE rename to deps/npm/node_modules/brace-expansion/LICENSE diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js b/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js similarity index 99% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js rename to deps/npm/node_modules/brace-expansion/dist/commonjs/index.js index fafdb4b9bf5c43..2caa572c59de67 100644 --- a/deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js +++ b/deps/npm/node_modules/brace-expansion/dist/commonjs/index.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.EXPANSION_MAX = void 0; exports.expand = expand; -const balanced_match_1 = require("@isaacs/balanced-match"); +const balanced_match_1 = require("balanced-match"); const escSlash = '\0SLASH' + Math.random() + '\0'; const escOpen = '\0OPEN' + Math.random() + '\0'; const escClose = '\0CLOSE' + Math.random() + '\0'; diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json b/deps/npm/node_modules/brace-expansion/dist/commonjs/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json rename to deps/npm/node_modules/brace-expansion/dist/commonjs/package.json diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/index.js b/deps/npm/node_modules/brace-expansion/dist/esm/index.js similarity index 99% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/index.js rename to deps/npm/node_modules/brace-expansion/dist/esm/index.js index 5c67f519e594ab..ec682796e358b2 100644 --- a/deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/index.js +++ b/deps/npm/node_modules/brace-expansion/dist/esm/index.js @@ -1,4 +1,4 @@ -import { balanced } from '@isaacs/balanced-match'; +import { balanced } from 'balanced-match'; const escSlash = '\0SLASH' + Math.random() + '\0'; const escOpen = '\0OPEN' + Math.random() + '\0'; const escClose = '\0CLOSE' + Math.random() + '\0'; diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/package.json b/deps/npm/node_modules/brace-expansion/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/@isaacs/brace-expansion/dist/esm/package.json rename to deps/npm/node_modules/brace-expansion/dist/esm/package.json diff --git a/deps/npm/node_modules/@isaacs/brace-expansion/package.json b/deps/npm/node_modules/brace-expansion/package.json similarity index 83% rename from deps/npm/node_modules/@isaacs/brace-expansion/package.json rename to deps/npm/node_modules/brace-expansion/package.json index 0356a292d62474..a8c205a33db2ce 100644 --- a/deps/npm/node_modules/@isaacs/brace-expansion/package.json +++ b/deps/npm/node_modules/brace-expansion/package.json @@ -1,7 +1,7 @@ { - "name": "@isaacs/brace-expansion", + "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", - "version": "5.0.1", + "version": "5.0.2", "files": [ "dist" ], @@ -34,7 +34,7 @@ }, "devDependencies": { "@types/brace-expansion": "^1.1.2", - "@types/node": "^24.0.0", + "@types/node": "^25.2.1", "mkdirp": "^3.0.1", "prettier": "^3.3.2", "tap": "^21.5.0", @@ -42,7 +42,7 @@ "typedoc": "^0.28.5" }, "dependencies": { - "@isaacs/balanced-match": "^4.0.1" + "balanced-match": "^4.0.2" }, "license": "MIT", "engines": { @@ -56,5 +56,9 @@ }, "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" + "module": "./dist/esm/index.js", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/juliangruber/brace-expansion.git" + } } diff --git a/deps/npm/node_modules/cidr-regex/dist/index.js b/deps/npm/node_modules/cidr-regex/dist/index.js index 2817f65eeb3cb8..bb2d3133a7dc5b 100644 --- a/deps/npm/node_modules/cidr-regex/dist/index.js +++ b/deps/npm/node_modules/cidr-regex/dist/index.js @@ -1,13 +1,20 @@ -import ipRegex from "ip-regex"; const defaultOpts = { exact: false }; -const v4str = `${ipRegex.v4().source}\\/(3[0-2]|[12]?[0-9])`; -const v6str = `${ipRegex.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`; -const v4exact = new RegExp(`^${v4str}$`); -const v6exact = new RegExp(`^${v6str}$`); -const v46exact = new RegExp(`(?:^${v4str}$)|(?:^${v6str}$)`); -const cidrRegex = ({ exact } = defaultOpts) => exact ? v46exact : new RegExp(`(?:${v4str})|(?:${v6str})`, "g"); -const v4 = cidrRegex.v4 = ({ exact } = defaultOpts) => exact ? v4exact : new RegExp(v4str, "g"); -const v6 = cidrRegex.v6 = ({ exact } = defaultOpts) => exact ? v6exact : new RegExp(v6str, "g"); +const v4src = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}\\/(3[0-2]|[12]?[0-9])"; +const v6src = "(?:(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4})?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|[a-fA-F\\d]{1,4}:(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|:(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:))(?:%[0-9a-zA-Z]+)?\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])"; +const v46src = `${v4src}|${v6src}`; +const v4exact = new RegExp(`^${v4src}$`); +const v6exact = new RegExp(`^${v6src}$`); +const v46exact = new RegExp(`^${v4src}$|^${v6src}$`); +const v4global = new RegExp(v4src, "g"); +const v6global = new RegExp(v6src, "g"); +const v46global = new RegExp(v46src, "g"); +function resetRegex(re) { + re.lastIndex = 0; + return re; +} +const cidrRegex = ({ exact } = defaultOpts) => exact ? v46exact : resetRegex(v46global); +const v4 = cidrRegex.v4 = ({ exact } = defaultOpts) => exact ? v4exact : resetRegex(v4global); +const v6 = cidrRegex.v6 = ({ exact } = defaultOpts) => exact ? v6exact : resetRegex(v6global); export { cidrRegex as default, v4, diff --git a/deps/npm/node_modules/cidr-regex/package.json b/deps/npm/node_modules/cidr-regex/package.json index 662f89261b01c6..a76a158d6169dc 100644 --- a/deps/npm/node_modules/cidr-regex/package.json +++ b/deps/npm/node_modules/cidr-regex/package.json @@ -1,6 +1,6 @@ { "name": "cidr-regex", - "version": "5.0.1", + "version": "5.0.3", "description": "Regular expression for matching IP addresses in CIDR notation", "author": "silverwind ", "contributors": [ @@ -19,20 +19,20 @@ "engines": { "node": ">=20" }, - "dependencies": { - "ip-regex": "5.0.0" - }, "devDependencies": { - "@types/node": "24.5.2", - "eslint": "9.36.0", - "eslint-config-silverwind": "105.1.0", - "typescript": "5.9.2", - "typescript-config-silverwind": "10.0.1", - "updates": "16.7.2", - "versions": "13.1.2", - "vite": "7.1.7", - "vite-config-silverwind": "6.0.2", - "vitest": "3.2.4", - "vitest-config-silverwind": "10.2.0" + "@types/node": "25.0.10", + "@typescript/native-preview": "7.0.0-dev.20260212.1", + "eslint": "9.39.2", + "eslint-config-silverwind": "120.1.2", + "jest-extended": "7.0.0", + "typescript": "5.9.3", + "typescript-config-silverwind": "14.0.0", + "updates": "17.0.8", + "updates-config-silverwind": "1.0.3", + "versions": "14.0.3", + "vite": "7.3.1", + "vite-config-silverwind": "6.0.9", + "vitest": "4.0.18", + "vitest-config-silverwind": "10.6.1" } -} +} \ No newline at end of file diff --git a/deps/npm/node_modules/cli-columns/color.js b/deps/npm/node_modules/cli-columns/color.js deleted file mode 100644 index 11027047f24fe6..00000000000000 --- a/deps/npm/node_modules/cli-columns/color.js +++ /dev/null @@ -1,16 +0,0 @@ -const chalk = require('chalk'); -const columns = require('.'); - -// prettier-ignore -const values = [ - 'blue' + chalk.bgBlue('berry'), - '笔菠萝' + chalk.yellow('苹果笔'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'パイナップル', 'apricot', 'banana', - 'pineapple', chalk.bgRed.yellow('orange') -]; - -console.log(''); -console.log(columns(values)); -console.log(''); diff --git a/deps/npm/node_modules/cli-columns/index.js b/deps/npm/node_modules/cli-columns/index.js deleted file mode 100644 index 1090aa21c2bdf2..00000000000000 --- a/deps/npm/node_modules/cli-columns/index.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); - -const concat = Array.prototype.concat; -const defaults = { - character: ' ', - newline: '\n', - padding: 2, - sort: true, - width: 0, -}; - -function byPlainText(a, b) { - const plainA = stripAnsi(a); - const plainB = stripAnsi(b); - - if (plainA === plainB) { - return 0; - } - - if (plainA > plainB) { - return 1; - } - - return -1; -} - -function makeArray() { - return []; -} - -function makeList(count) { - return Array.apply(null, Array(count)); -} - -function padCell(fullWidth, character, value) { - const valueWidth = stringWidth(value); - const filler = makeList(fullWidth - valueWidth + 1); - - return value + filler.join(character); -} - -function toRows(rows, cell, i) { - rows[i % rows.length].push(cell); - - return rows; -} - -function toString(arr) { - return arr.join(''); -} - -function columns(values, options) { - values = concat.apply([], values); - options = Object.assign({}, defaults, options); - - let cells = values.filter(Boolean).map(String); - - if (options.sort !== false) { - cells = cells.sort(byPlainText); - } - - const termWidth = options.width || process.stdout.columns; - const cellWidth = - Math.max.apply(null, cells.map(stringWidth)) + options.padding; - const columnCount = Math.floor(termWidth / cellWidth) || 1; - const rowCount = Math.ceil(cells.length / columnCount) || 1; - - if (columnCount === 1) { - return cells.join(options.newline); - } - - return cells - .map(padCell.bind(null, cellWidth, options.character)) - .reduce(toRows, makeList(rowCount).map(makeArray)) - .map(toString) - .join(options.newline); -} - -module.exports = columns; diff --git a/deps/npm/node_modules/cli-columns/license b/deps/npm/node_modules/cli-columns/license deleted file mode 100644 index 67147a987ea19b..00000000000000 --- a/deps/npm/node_modules/cli-columns/license +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Shannon Moeller (shannonmoeller.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/cli-columns/package.json b/deps/npm/node_modules/cli-columns/package.json deleted file mode 100644 index 129f2c1316d2f0..00000000000000 --- a/deps/npm/node_modules/cli-columns/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "cli-columns", - "version": "4.0.0", - "description": "Columnated lists for the CLI.", - "scripts": { - "lint": "npx eslint --fix '*.js' && npx prettier --write '*.js'", - "test": "node test.js && node color.js" - }, - "keywords": [ - "ansi", - "cli", - "column", - "columnate", - "columns", - "grid", - "list", - "log", - "ls", - "row", - "rows", - "unicode", - "unix" - ], - "author": "Shannon Moeller (http://shannonmoeller.com)", - "homepage": "https://github.com/shannonmoeller/cli-columns#readme", - "repository": "shannonmoeller/cli-columns", - "license": "MIT", - "main": "index.js", - "files": [ - "*.js" - ], - "dependencies": { - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">= 10" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true - }, - "parserOptions": { - "ecmaVersion": 8 - } - }, - "prettier": { - "singleQuote": true - } -} diff --git a/deps/npm/node_modules/cli-columns/test.js b/deps/npm/node_modules/cli-columns/test.js deleted file mode 100644 index 4d95e7cf073230..00000000000000 --- a/deps/npm/node_modules/cli-columns/test.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const chalk = require('chalk'); -const stripAnsi = require('strip-ansi'); -const columns = require('./index.js'); -const tests = []; - -function test(msg, fn) { - tests.push([msg, fn]); -} - -process.nextTick(async function run() { - for (const [msg, fn] of tests) { - try { - await fn(assert); - console.log(`pass - ${msg}`); - } catch (error) { - console.error(`fail - ${msg}`, error); - process.exit(1); - } - } -}); - -// prettier-ignore -test('should print one column list', t => { - const cols = columns(['foo', ['bar', 'baz'], ['bar', 'qux']], { - width: 1 - }); - - const expected = - 'bar\n' + - 'bar\n' + - 'baz\n' + - 'foo\n' + - 'qux'; - - t.equal(cols, expected); -}); - -// prettier-ignore -test('should print three column list', t => { - const cols = columns(['foo', ['bar', 'baz'], ['bat', 'qux']], { - width: 16 - }); - - const expected = - 'bar baz qux \n' + - 'bat foo '; - - t.equal(cols, expected); -}); - -// prettier-ignore -test('should print complex list', t => { - const cols = columns( - [ - 'foo', 'bar', 'baz', - chalk.cyan('嶜憃撊') + ' 噾噿嚁', - 'blue' + chalk.bgBlue('berry'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'apricot', 'banana pineapple' - ], - { - width: 80 - } - ); - - const expected = - 'apple bar durian star fruit \n' + - 'apricot baz foo 嶜憃撊 噾噿嚁 \n' + - 'banana pineapple blueberry pomegranate '; - - t.equal(stripAnsi(cols), expected); -}); - -// prettier-ignore -test('should optionally not sort', t => { - const cols = columns( - [ - 'foo', 'bar', 'baz', - chalk.cyan('嶜憃撊') + ' 噾噿嚁', - 'blue' + chalk.bgBlue('berry'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'apricot', 'banana pineapple' - ], - { - sort: false, - width: 80 - } - ); - - const expected = - 'foo 嶜憃撊 噾噿嚁 pomegranate apricot \n' + - 'bar blueberry durian banana pineapple \n' + - 'baz apple star fruit '; - - t.equal(stripAnsi(cols), expected); -}); diff --git a/deps/npm/node_modules/emoji-regex/LICENSE-MIT.txt b/deps/npm/node_modules/emoji-regex/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7ef970ec..00000000000000 --- a/deps/npm/node_modules/emoji-regex/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/emoji-regex/es2015/index.js b/deps/npm/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index b4cf3dcd389935..00000000000000 --- a/deps/npm/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/deps/npm/node_modules/emoji-regex/es2015/text.js b/deps/npm/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 780309df58f1a2..00000000000000 --- a/deps/npm/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/deps/npm/node_modules/emoji-regex/index.js b/deps/npm/node_modules/emoji-regex/index.js deleted file mode 100644 index d993a3a99cb95a..00000000000000 --- a/deps/npm/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/deps/npm/node_modules/emoji-regex/package.json b/deps/npm/node_modules/emoji-regex/package.json deleted file mode 100644 index 6d323528292b00..00000000000000 --- a/deps/npm/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "emoji-regex", - "version": "8.0.0", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/preset-env": "^7.3.4", - "mocha": "^6.0.2", - "regexgen": "^1.3.0", - "unicode-12.0.0": "^0.7.9" - } -} diff --git a/deps/npm/node_modules/emoji-regex/text.js b/deps/npm/node_modules/emoji-regex/text.js deleted file mode 100644 index 0a55ce2f2308ad..00000000000000 --- a/deps/npm/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/deps/npm/node_modules/glob/dist/commonjs/glob.js b/deps/npm/node_modules/glob/dist/commonjs/glob.js index e1339bbbcf57f3..2dcbd8a1d867cd 100644 --- a/deps/npm/node_modules/glob/dist/commonjs/glob.js +++ b/deps/npm/node_modules/glob/dist/commonjs/glob.js @@ -140,11 +140,12 @@ class Glob { // for the file `AbC` for example. const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; const mmo = { - // default nocase based on platform + braceExpandMax: 10_000, ...opts, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, + // default nocase based on platform nocase: this.nocase, nocaseMagicOnly, nocomment: true, diff --git a/deps/npm/node_modules/glob/dist/commonjs/index.min.js b/deps/npm/node_modules/glob/dist/commonjs/index.min.js new file mode 100644 index 00000000000000..4828ba07860bdc --- /dev/null +++ b/deps/npm/node_modules/glob/dist/commonjs/index.min.js @@ -0,0 +1,4 @@ +"use strict";var R=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Ge=R(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.range=Y.balanced=void 0;var Gs=(n,t,e)=>{let s=n instanceof RegExp?Ie(n,e):n,i=t instanceof RegExp?Ie(t,e):t,r=s!==null&&i!=null&&(0,Y.range)(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}};Y.balanced=Gs;var Ie=(n,t)=>{let e=t.match(n);return e?e[0]:null},zs=(n,t,e)=>{let s,i,r,h,o,a=e.indexOf(n),l=e.indexOf(t,a+1),f=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;f>=0&&!o;){if(f===a)s.push(f),a=e.indexOf(n,f+1);else if(s.length===1){let c=s.pop();c!==void 0&&(o=[c,l])}else i=s.pop(),i!==void 0&&i=0?a:l}s.length&&h!==void 0&&(o=[r,h])}return o};Y.range=zs});var Ke=R(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.EXPANSION_MAX=void 0;it.expand=ei;var ze=Ge(),Ue="\0SLASH"+Math.random()+"\0",$e="\0OPEN"+Math.random()+"\0",ue="\0CLOSE"+Math.random()+"\0",qe="\0COMMA"+Math.random()+"\0",He="\0PERIOD"+Math.random()+"\0",Us=new RegExp(Ue,"g"),$s=new RegExp($e,"g"),qs=new RegExp(ue,"g"),Hs=new RegExp(qe,"g"),Vs=new RegExp(He,"g"),Ks=/\\\\/g,Xs=/\\{/g,Ys=/\\}/g,Js=/\\,/g,Zs=/\\./g;it.EXPANSION_MAX=1e5;function ce(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function Qs(n){return n.replace(Ks,Ue).replace(Xs,$e).replace(Ys,ue).replace(Js,qe).replace(Zs,He)}function ti(n){return n.replace(Us,"\\").replace($s,"{").replace(qs,"}").replace(Hs,",").replace(Vs,".")}function Ve(n){if(!n)return[""];let t=[],e=(0,ze.balanced)("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,h=s.split(",");h[h.length-1]+="{"+i+"}";let o=Ve(r);return r.length&&(h[h.length-1]+=o.shift(),h.push.apply(h,o)),t.push.apply(t,h),t}function ei(n,t={}){if(!n)return[];let{max:e=it.EXPANSION_MAX}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht(Qs(n),e,!0).map(ti)}function si(n){return"{"+n+"}"}function ii(n){return/^-?0\d/.test(n)}function ri(n,t){return n<=t}function ni(n,t){return n>=t}function ht(n,t,e){let s=[],i=(0,ze.balanced)("{","}",n);if(!i)return[n];let r=i.pre,h=i.post.length?ht(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o=0;if(!l&&!f)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+ue+i.post,ht(n,t,!0)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=Ve(i.body),c.length===1&&c[0]!==void 0&&(c=ht(c[0],t,!1).map(si),c.length===1))return h.map(u=>i.pre+c[0]+u);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let u=ce(c[0]),m=ce(c[1]),p=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(ce(c[2])):1,w=ri;m0){let U=new Array(B+1).join("0");y<0?S="-"+U+S.slice(1):S=U+S}}d.push(S)}}else{d=[];for(let u=0;u{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.assertValidPattern=void 0;var hi=1024*64,oi=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>hi)throw new TypeError("pattern is too long")};Ct.assertValidPattern=oi});var Je=R(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.parseClass=void 0;var ai={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ot=n=>n.replace(/[[\]\\-]/g,"\\$&"),li=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ye=n=>n.join(""),ci=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,h=!1,o=!1,a=!1,l=!1,f=e,c="";t:for(;rc?s.push(ot(c)+"-"+ot(p)):p===c&&s.push(ot(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(ot(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(ot(p)),r++}if(f{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.unescape=void 0;var ui=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!0}={})=>e?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");At.unescape=ui});var pe=R(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.AST=void 0;var fi=Je(),Mt=kt(),di=new Set(["!","?","+","*","@"]),Ze=n=>di.has(n),pi="(?!(?:^|/)\\.\\.?(?:$|/))",Pt="(?!\\.)",mi=new Set(["[","."]),gi=new Set(["..","."]),wi=new Set("().*{}+?[]^$\\!"),bi=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de="[^/]",Qe=de+"*?",ts=de+"+?",fe=class n{type;#t;#s;#n=!1;#r=[];#h;#S;#w;#c=!1;#o;#f;#u=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#h=e,this.#t=this.#h?this.#h.#t:this,this.#o=this.#t===this?s:this.#t.#o,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#h?this.#h.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#f=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#h;for(;s;){for(let i=e.#S+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#h?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#h?.isStart())return!1;if(this.#S===0)return!0;let t=this.#h;for(let e=0;etypeof u!="string"),l=this.#r.map(u=>{let[m,p,b,w]=typeof u=="string"?n.#v(u,this.#s,a):u.toRegExpSource(t);return this.#s=this.#s||b,this.#n=this.#n||w,m}).join(""),f="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&gi.has(this.#r[0]))){let m=mi,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),b=!e&&!t&&m.has(l.charAt(0));f=p?pi:b?Pt:""}let c="";return this.isEnd()&&this.#t.#c&&this.#h?.type==="!"&&(c="(?:$|\\/)"),[f+l+c,(0,Mt.unescape)(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,(0,Mt.unescape)(this.toString()),!1,!1]}let h=!s||t||e||!Pt?"":this.#d(!0);h===r&&(h=""),h&&(r=`(?:${r})(?:${h})*?`);let o="";if(this.type==="!"&&this.#u)o=(this.isStart()&&!e?Pt:"")+ts;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Pt:"")+Qe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?")?":`)${this.type}`;o=i+r+a}return[o,(0,Mt.unescape)(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,h]=e.toRegExpSource(t);return this.#n=this.#n||h,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#v(t,e,s=!1){let i=!1,r="",h=!1,o=!1;for(let a=0;a{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.escape=void 0;var yi=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!1}={})=>e?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");Ft.escape=yi});var H=R(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.unescape=g.escape=g.AST=g.Minimatch=g.match=g.makeRe=g.braceExpand=g.defaults=g.filter=g.GLOBSTAR=g.sep=g.minimatch=void 0;var Si=Ke(),jt=Xe(),is=pe(),vi=me(),Ei=kt(),_i=(n,t,e={})=>((0,jt.assertValidPattern)(t),!e.nocomment&&t.charAt(0)==="#"?!1:new J(t,e).match(n));g.minimatch=_i;var Oi=/^\*+([^+@!?\*\[\(]*)$/,xi=n=>t=>!t.startsWith(".")&&t.endsWith(n),Ti=n=>t=>t.endsWith(n),Ci=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ri=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ai=/^\*+\.\*+$/,ki=n=>!n.startsWith(".")&&n.includes("."),Mi=n=>n!=="."&&n!==".."&&n.includes("."),Pi=/^\.\*+$/,Di=n=>n!=="."&&n!==".."&&n.startsWith("."),Fi=/^\*+$/,ji=n=>n.length!==0&&!n.startsWith("."),Ni=n=>n.length!==0&&n!=="."&&n!=="..",Li=/^\?+([^+@!?\*\[\(]*)?$/,Wi=([n,t=""])=>{let e=rs([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Bi=([n,t=""])=>{let e=ns([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Ii=([n,t=""])=>{let e=ns([n]);return t?s=>e(s)&&s.endsWith(t):e},Gi=([n,t=""])=>{let e=rs([n]);return t?s=>e(s)&&s.endsWith(t):e},rs=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},ns=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},hs=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",es={win32:{sep:"\\"},posix:{sep:"/"}};g.sep=hs==="win32"?es.win32.sep:es.posix.sep;g.minimatch.sep=g.sep;g.GLOBSTAR=Symbol("globstar **");g.minimatch.GLOBSTAR=g.GLOBSTAR;var zi="[^/]",Ui=zi+"*?",$i="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qi="(?:(?!(?:\\/|^)\\.).)*?",Hi=(n,t={})=>e=>(0,g.minimatch)(e,n,t);g.filter=Hi;g.minimatch.filter=g.filter;var F=(n,t={})=>Object.assign({},n,t),Vi=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return g.minimatch;let t=g.minimatch;return Object.assign((s,i,r={})=>t(s,i,F(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,F(n,r))}static defaults(i){return t.defaults(F(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,h={}){super(i,r,F(n,h))}static fromGlob(i,r={}){return t.AST.fromGlob(i,F(n,r))}},unescape:(s,i={})=>t.unescape(s,F(n,i)),escape:(s,i={})=>t.escape(s,F(n,i)),filter:(s,i={})=>t.filter(s,F(n,i)),defaults:s=>t.defaults(F(n,s)),makeRe:(s,i={})=>t.makeRe(s,F(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,F(n,i)),match:(s,i,r={})=>t.match(s,i,F(n,r)),sep:t.sep,GLOBSTAR:g.GLOBSTAR})};g.defaults=Vi;g.minimatch.defaults=g.defaults;var Ki=(n,t={})=>((0,jt.assertValidPattern)(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,Si.expand)(n,{max:t.braceExpandMax}));g.braceExpand=Ki;g.minimatch.braceExpand=g.braceExpand;var Xi=(n,t={})=>new J(n,t).makeRe();g.makeRe=Xi;g.minimatch.makeRe=g.makeRe;var Yi=(n,t,e={})=>{let s=new J(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};g.match=Yi;g.minimatch.match=g.match;var ss=/[?*]|[+@!]\(.*?\)|\[|\]/,Ji=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),J=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,jt.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||hs,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,h,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ss.test(r[2]))&&!ss.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(f=>this.parse(f))];if(l)return[r[0],...r.slice(1).map(f=>this.parse(f))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,h-i);let o=s[i+1],a=s[i+2],l=s[i+3];if(o!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let f=s.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let h=1;he.length)}partsMatch(t,e,s=!1){let i=0,r=0,h=[],o="";for(;iE?e=e.slice(y):E>y&&(t=t.slice(E)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var h=0,o=0,a=t.length,l=e.length;h>> no match, partial?`,t,d,e,u),d===a))}let p;if(typeof f=="string"?(p=c===f,this.debug("string match",f,c,p)):(p=f.test(c),this.debug("pattern match",f,c,p)),!p)return!1}if(h===a&&o===l)return!0;if(h===a)return s;if(o===l)return h===a-1&&t[h]==="";throw new Error("wtf?")}braceExpand(){return(0,g.braceExpand)(this.pattern,this.options)}parse(t){(0,jt.assertValidPattern)(t);let e=this.options;if(t==="**")return g.GLOBSTAR;if(t==="")return"";let s,i=null;(s=t.match(Fi))?i=e.dot?Ni:ji:(s=t.match(Oi))?i=(e.nocase?e.dot?Ri:Ci:e.dot?Ti:xi)(s[1]):(s=t.match(Li))?i=(e.nocase?e.dot?Bi:Wi:e.dot?Ii:Gi)(s):(s=t.match(Ai))?i=e.dot?Mi:ki:(s=t.match(Pi))&&(i=Di);let r=is.AST.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Ui:e.dot?$i:qi,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?Ji(c):c===g.GLOBSTAR?g.GLOBSTAR:c._src});l.forEach((c,d)=>{let u=l[d+1],m=l[d-1];c!==g.GLOBSTAR||m===g.GLOBSTAR||(m===void 0?u!==void 0&&u!==g.GLOBSTAR?l[d+1]="(?:\\/|"+s+"\\/)?"+u:l[d]=s:u===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":u!==g.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+u,l[d+1]=g.GLOBSTAR))});let f=l.filter(c=>c!==g.GLOBSTAR);if(this.partial&&f.length>=1){let c=[];for(let d=1;d<=f.length;d++)c.push(f.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return f.join("/")}).join("|"),[h,o]=t.length>1?["(?:",")"]:["",""];r="^"+h+r+o+"$",this.partial&&(r="^(?:\\/|"+h+r.slice(1,-1)+o+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let h=i[i.length-1];if(!h)for(let o=i.length-2;!h&&o>=0;o--)h=i[o];for(let o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=void 0;var er=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,as=new Set,ge=typeof process=="object"&&process?process:{},ls=(n,t,e,s)=>{typeof ge.emitWarning=="function"?ge.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Lt=globalThis.AbortController,os=globalThis.AbortSignal;if(typeof Lt>"u"){os=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,s){this._onabort.push(s)}},Lt=class{constructor(){t()}signal=new os;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e)}}};let n=ge.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,ls("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var sr=n=>!as.has(n),V=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),cs=n=>V(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Nt:null:null,Nt=class extends Array{constructor(n){super(n),this.fill(0)}},ir=class at{heap;length;static#t=!1;static create(t){let e=cs(t);if(!e)return[];at.#t=!0;let s=new at(t,e);return at.#t=!1,s}constructor(t,e){if(!at.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},rr=class us{#t;#s;#n;#r;#h;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#f;#u;#a;#i;#d;#v;#y;#p;#R;#m;#O;#x;#g;#b;#E;#T;#e;#F;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#g,autopurgeTimers:t.#b,sizes:t.#O,keyMap:t.#u,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#v,get head(){return t.#y},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#z(e,s,i,r),moveToTail:e=>t.#N(e),indexes:e=>t.#k(e),rindexes:e=>t.#M(e),isStale:e=>t.#_(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#o}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#h}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:a,dispose:l,onInsert:f,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:u,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:b,fetchMethod:w,memoMethod:v,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:B,ignoreFetchAbort:U,perf:et}=t;if(et!==void 0&&typeof et?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=et??er,e!==0&&!V(e))throw new TypeError("max option must be a nonnegative integer");let st=e?cs(e):Array;if(!st)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=b,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(v!==void 0&&typeof v!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=v,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=w,this.#T=!!w,this.#u=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new st(e),this.#v=new st(e),this.#y=0,this.#p=0,this.#R=ir.create(e),this.#o=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"&&(this.#r=f),typeof c=="function"?(this.#h=c,this.#m=[]):(this.#h=void 0,this.#m=void 0),this.#E=!!this.#n,this.#F=!!this.#r,this.#e=!!this.#h,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(this.#s!==0&&!V(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!V(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=V(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!V(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let le="LRU_CACHE_UNBOUNDED";sr(le)&&(as.add(le),ls("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",le,us))}}getRemainingTTL(t){return this.#u.has(t)?1/0:0}#P(){let t=new Nt(this.#t),e=new Nt(this.#t);this.#g=t,this.#x=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#b=s,this.#W=(h,o,a=this.#c.now())=>{if(e[h]=o!==0?a:0,t[h]=o,s?.[h]&&(clearTimeout(s[h]),s[h]=void 0),o!==0&&s){let l=setTimeout(()=>{this.#_(h)&&this.#A(this.#a[h],"expire")},o+1);l.unref&&l.unref(),s[h]=l}},this.#C=h=>{e[h]=t[h]!==0?this.#c.now():0},this.#D=(h,o)=>{if(t[o]){let a=t[o],l=e[o];if(!a||!l)return;h.ttl=a,h.start=l,h.now=i||r();let f=h.now-l;h.remainingTTL=a-f}};let i=0,r=()=>{let h=this.#c.now();if(this.ttlResolution>0){i=h;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return h};this.getRemainingTTL=h=>{let o=this.#u.get(h);if(o===void 0)return 0;let a=t[o],l=e[o];if(!a||!l)return 1/0;let f=(i||r())-l;return a-f},this.#_=h=>{let o=e[h],a=t[h];return!!a&&!!o&&(i||r())-o>a}}#C=()=>{};#D=()=>{};#W=()=>{};#_=()=>!1;#$(){let t=new Nt(this.#t);this.#f=0,this.#O=t,this.#L=e=>{this.#f-=t[e],t[e]=0},this.#B=(e,s,i,r)=>{if(this.#l(s))return 0;if(!V(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!V(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#j=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#f>r;)this.#G(!0)}this.#f+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#f)}}#L=t=>{};#j=(t,e,s)=>{};#B=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#p;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#y));)e=this.#v[e]}*#M({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#y;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#p));)e=this.#d[e]}#I(t){return t!==void 0&&this.#u.get(this.#a[t])===t}*entries(){for(let t of this.#k())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#M())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#k()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*rkeys(){for(let t of this.#M()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*values(){for(let t of this.#k())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#M())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#M()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#M({allowStale:!0}))this.#_(e)&&(this.#A(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#u.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#x){let h=this.#g[e],o=this.#x[e];if(h&&o){let a=h-(this.#c.now()-o);r.ttl=a,r.start=Date.now()}}return this.#O&&(r.size=this.#O[e]),r}dump(){let t=[];for(let e of this.#k({allowStale:!0})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let h={value:r};if(this.#g&&this.#x){h.ttl=this.#g[e];let o=this.#c.now()-this.#x[e];h.start=Math.floor(Date.now()-o)}this.#O&&(h.size=this.#O[e]),t.unshift([s,h])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,f=this.#B(t,e,s.size||0,o);if(this.maxEntrySize&&f>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#A(t,"set"),this;let c=this.#o===0?void 0:this.#u.get(t);if(c===void 0)c=this.#o===0?this.#p:this.#R.length!==0?this.#R.pop():this.#o===this.#t?this.#G(!1):this.#o,this.#a[c]=t,this.#i[c]=e,this.#u.set(t,c),this.#d[this.#p]=c,this.#v[c]=this.#p,this.#p=c,this.#o++,this.#j(c,f,a),a&&(a.set="add"),l=!1,this.#F&&this.#r?.(e,t,"add");else{this.#N(c);let d=this.#i[c];if(e!==d){if(this.#T&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=d;u!==void 0&&!h&&(this.#E&&this.#n?.(u,t,"set"),this.#e&&this.#m?.push([u,t,"set"]))}else h||(this.#E&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#L(c),this.#j(c,f,a),this.#i[c]=e,a){a.set="replace";let u=d&&this.#l(d)?d.__staleWhileFetching:d;u!==void 0&&(a.oldValue=u)}}else a&&(a.set="update");this.#F&&this.onInsert?.(e,t,e===d?"update":"replace")}if(i!==0&&!this.#g&&this.#P(),this.#g&&(l||this.#W(c,i,r),a&&this.#D(a,c)),!h&&this.#e&&this.#m){let d=this.#m,u;for(;u=d?.shift();)this.#h?.(...u)}return this}pop(){try{for(;this.#o;){let t=this.#i[this.#y];if(this.#G(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#h?.(...e)}}}#G(t){let e=this.#y,s=this.#a[e],i=this.#i[e];return this.#T&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#L(e),this.#b?.[e]&&(clearTimeout(this.#b[e]),this.#b[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#o===1?(this.#y=this.#p=0,this.#R.length=0):this.#y=this.#d[e],this.#u.delete(s),this.#o--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#u.get(t);if(r!==void 0){let h=this.#i[r];if(this.#l(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#_(r))i&&(i.has="stale",this.#D(i,r));else return s&&this.#C(r),i&&(i.has="hit",this.#D(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#u.get(t);if(i===void 0||!s&&this.#_(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#z(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let h=new Lt,{signal:o}=s;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let a={signal:h.signal,options:s,context:i},l=(p,b=!1)=>{let{aborted:w}=h.signal,v=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(w&&!b?(s.status.fetchAborted=!0,s.status.fetchError=h.signal.reason,v&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),w&&!v&&!b)return c(h.signal.reason,E);let y=u,S=this.#i[e];return(S===u||v&&b&&S===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#A(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},f=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),c(p,!1)),c=(p,b)=>{let{aborted:w}=h.signal,v=w&&s.allowStaleOnFetchAbort,E=v||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,S=u;if(this.#i[e]===u&&(!y||!b&&S.__staleWhileFetching===void 0?this.#A(t,"fetch"):v||(this.#i[e]=S.__staleWhileFetching)),E)return s.status&&S.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw p},d=(p,b)=>{let w=this.#S?.(t,r,a);w&&w instanceof Promise&&w.then(v=>p(v===void 0?void 0:v),b),h.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=v=>l(v,!0)))})};s.status&&(s.status.fetchDispatched=!0);let u=new Promise(d).then(l,f),m=Object.assign(u,{__abortController:h,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#u.get(t)):this.#i[e]=m,m}#l(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Lt}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:b=!1,status:w,signal:v}=e;if(!this.#T)return w&&(w.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:w});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:h,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:u,status:w,signal:v},y=this.#u.get(t);if(y===void 0){w&&(w.fetch="miss");let S=this.#z(t,y,E,p);return S.__returned=S}else{let S=this.#i[y];if(this.#l(S)){let st=s&&S.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",st&&(w.returnedStale=!0)),st?S.__staleWhileFetching:S.__returned=S}let B=this.#_(y);if(!b&&!B)return w&&(w.fetch="hit"),this.#N(y),i&&this.#C(y),w&&this.#D(w,y),S;let U=this.#z(t,y,E,p),et=U.__staleWhileFetching!==void 0&&s;return w&&(w.fetch=B?"stale":"refresh",et&&B&&(w.returnedStale=!0)),et?U.__staleWhileFetching:U.__returned=U}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...h}=e,o=this.get(t,h);if(!r&&o!==void 0)return o;let a=s(t,o,{options:h,context:i});return this.set(t,a,h),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:h}=e,o=this.#u.get(t);if(o!==void 0){let a=this.#i[o],l=this.#l(a);return h&&this.#D(h,o),this.#_(o)?(h&&(h.get="stale"),l?(h&&s&&a.__staleWhileFetching!==void 0&&(h.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#A(t,"expire"),h&&s&&(h.returnedStale=!0),s?a:void 0)):(h&&(h.get="hit"),l?a.__staleWhileFetching:(this.#N(o),i&&this.#C(o),a))}else h&&(h.get="miss")}#U(t,e){this.#v[e]=t,this.#d[t]=e}#N(t){t!==this.#p&&(t===this.#y?this.#y=this.#d[t]:this.#U(this.#v[t],this.#d[t]),this.#U(this.#p,t),this.#p=t)}delete(t){return this.#A(t,"delete")}#A(t,e){let s=!1;if(this.#o!==0){let i=this.#u.get(t);if(i!==void 0)if(this.#b?.[i]&&(clearTimeout(this.#b?.[i]),this.#b[i]=void 0),s=!0,this.#o===1)this.#q(e);else{this.#L(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#u.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#v[i];else if(i===this.#y)this.#y=this.#d[i];else{let h=this.#v[i];this.#d[h]=this.#d[i];let o=this.#d[i];this.#v[o]=this.#v[i]}this.#o--,this.#R.push(i)}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#h?.(...r)}return s}clear(){return this.#q("delete")}#q(t){for(let e of this.#M({allowStale:!0})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#E&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t])}}if(this.#u.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#x){this.#g.fill(0),this.#x.fill(0);for(let e of this.#b??[])e!==void 0&&clearTimeout(e);this.#b?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#y=0,this.#p=0,this.#R.length=0,this.#f=0,this.#o=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#h?.(...s)}}};Wt.LRUCache=rr});var Oe=R(P=>{"use strict";var nr=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(P,"__esModule",{value:!0});P.Minipass=P.isWritable=P.isReadable=P.isStream=void 0;var ds=typeof process=="object"&&process?process:{stdout:null,stderr:null},_e=require("node:events"),ws=nr(require("node:stream")),hr=require("node:string_decoder"),or=n=>!!n&&typeof n=="object"&&(n instanceof qt||n instanceof ws.default||(0,P.isReadable)(n)||(0,P.isWritable)(n));P.isStream=or;var ar=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.pipe=="function"&&n.pipe!==ws.default.Writable.prototype.pipe;P.isReadable=ar;var lr=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.write=="function"&&typeof n.end=="function";P.isWritable=lr;var $=Symbol("EOF"),q=Symbol("maybeEmitEnd"),K=Symbol("emittedEnd"),Bt=Symbol("emittingEnd"),lt=Symbol("emittedError"),It=Symbol("closed"),ps=Symbol("read"),Gt=Symbol("flush"),ms=Symbol("flushChunk"),L=Symbol("encoding"),rt=Symbol("decoder"),x=Symbol("flowing"),ct=Symbol("paused"),nt=Symbol("resume"),T=Symbol("buffer"),M=Symbol("pipes"),C=Symbol("bufferLength"),we=Symbol("bufferPush"),zt=Symbol("bufferShift"),k=Symbol("objectMode"),O=Symbol("destroyed"),be=Symbol("error"),ye=Symbol("emitData"),gs=Symbol("emitEnd"),Se=Symbol("emitEnd2"),I=Symbol("async"),ve=Symbol("abort"),Ut=Symbol("aborted"),ut=Symbol("signal"),Z=Symbol("dataListeners"),D=Symbol("discarded"),ft=n=>Promise.resolve().then(n),cr=n=>n(),ur=n=>n==="end"||n==="finish"||n==="prefinish",fr=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,dr=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),$t=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[nt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ee=class extends $t{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors)}},pr=n=>!!n.objectMode,mr=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",qt=class extends _e.EventEmitter{[x]=!1;[ct]=!1;[M]=[];[T]=[];[k];[L];[I];[rt];[$]=!1;[K]=!1;[Bt]=!1;[It]=!1;[lt]=null;[C]=0;[O]=!1;[ut];[Ut]=!1;[Z]=0;[D]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");pr(e)?(this[k]=!0,this[L]=null):mr(e)?(this[L]=e.encoding,this[k]=!1):(this[k]=!1,this[L]=null),this[I]=!!e.async,this[rt]=this[L]?new hr.StringDecoder(this[L]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[T]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[M]});let{signal:s}=e;s&&(this[ut]=s,s.aborted?this[ve]():s.addEventListener("abort",()=>this[ve]()))}get bufferLength(){return this[C]}get encoding(){return this[L]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[I]}set async(t){this[I]=this[I]||!!t}[ve](){this[Ut]=!0,this.emit("abort",this[ut]?.reason),this.destroy(this[ut]?.reason)}get aborted(){return this[Ut]}set aborted(t){}write(t,e,s){if(this[Ut])return!1;if(this[$])throw new Error("write after end");if(this[O])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[I]?ft:cr;if(!this[k]&&!Buffer.isBuffer(t)){if(dr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fr(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):t.length?(typeof t=="string"&&!(e===this[L]&&!this[rt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[L]&&(t=this[rt].write(t)),this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):(this[C]!==0&&this.emit("readable"),s&&i(s),this[x])}read(t){if(this[O])return null;if(this[D]=!1,this[C]===0||t===0||t&&t>this[C])return this[q](),null;this[k]&&(t=null),this[T].length>1&&!this[k]&&(this[T]=[this[L]?this[T].join(""):Buffer.concat(this[T],this[C])]);let e=this[ps](t||null,this[T][0]);return this[q](),e}[ps](t,e){if(this[k])this[zt]();else{let s=e;t===s.length||t===null?this[zt]():typeof s=="string"?(this[T][0]=s.slice(t),e=s.slice(0,t),this[C]-=t):(this[T][0]=s.subarray(t),e=s.subarray(0,t),this[C]-=t)}return this.emit("data",e),!this[T].length&&!this[$]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[$]=!0,this.writable=!1,(this[x]||!this[ct])&&this[q](),this}[nt](){this[O]||(!this[Z]&&!this[M].length&&(this[D]=!0),this[ct]=!1,this[x]=!0,this.emit("resume"),this[T].length?this[Gt]():this[$]?this[q]():this.emit("drain"))}resume(){return this[nt]()}pause(){this[x]=!1,this[ct]=!0,this[D]=!1}get destroyed(){return this[O]}get flowing(){return this[x]}get paused(){return this[ct]}[we](t){this[k]?this[C]+=1:this[C]+=t.length,this[T].push(t)}[zt](){return this[k]?this[C]-=1:this[C]-=this[T][0].length,this[T].shift()}[Gt](t=!1){do;while(this[ms](this[zt]())&&this[T].length);!t&&!this[T].length&&!this[$]&&this.emit("drain")}[ms](t){return this.emit("data",t),this[x]}pipe(t,e){if(this[O])return t;this[D]=!1;let s=this[K];return e=e||{},t===ds.stdout||t===ds.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[M].push(e.proxyErrors?new Ee(this,t,e):new $t(this,t,e)),this[I]?ft(()=>this[nt]()):this[nt]()),t}unpipe(t){let e=this[M].find(s=>s.dest===t);e&&(this[M].length===1?(this[x]&&this[Z]===0&&(this[x]=!1),this[M]=[]):this[M].splice(this[M].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[D]=!1,this[Z]++,!this[M].length&&!this[x]&&this[nt]();else if(t==="readable"&&this[C]!==0)super.emit("readable");else if(ur(t)&&this[K])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[lt]){let i=e;this[I]?ft(()=>i.call(this,this[lt])):i.call(this,this[lt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Z]=this.listeners("data").length,this[Z]===0&&!this[D]&&!this[M].length&&(this[x]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Z]=0,!this[D]&&!this[M].length&&(this[x]=!1)),e}get emittedEnd(){return this[K]}[q](){!this[Bt]&&!this[K]&&!this[O]&&this[T].length===0&&this[$]&&(this[Bt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[It]&&this.emit("close"),this[Bt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==O&&this[O])return!1;if(t==="data")return!this[k]&&!s?!1:this[I]?(ft(()=>this[ye](s)),!0):this[ye](s);if(t==="end")return this[gs]();if(t==="close"){if(this[It]=!0,!this[K]&&!this[O])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[lt]=s,super.emit(be,s);let r=!this[ut]||this.listeners("error").length?super.emit("error",s):!1;return this[q](),r}else if(t==="resume"){let r=super.emit("resume");return this[q](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[q](),i}[ye](t){for(let s of this[M])s.dest.write(t)===!1&&this.pause();let e=this[D]?!1:super.emit("data",t);return this[q](),e}[gs](){return this[K]?!1:(this[K]=!0,this.readable=!1,this[I]?(ft(()=>this[Se]()),!0):this[Se]())}[Se](){if(this[rt]){let e=this[rt].end();if(e){for(let s of this[M])s.dest.write(e);this[D]||super.emit("data",e)}}for(let e of this[M])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[L]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(O,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[D]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[$])return e();let r,h,o=c=>{this.off("data",a),this.off("end",l),this.off(O,f),e(),h(c)},a=c=>{this.off("error",o),this.off("end",l),this.off(O,f),this.pause(),r({value:c,done:!!this[$]})},l=()=>{this.off("error",o),this.off("data",a),this.off(O,f),e(),r({done:!0,value:void 0})},f=()=>o(new Error("stream destroyed"));return new Promise((c,d)=>{h=d,r=c,this.once(O,f),this.once("error",o),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[D]=!1;let t=!1,e=()=>(this.pause(),this.off(be,e),this.off(O,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(be,e),this.once(O,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[O])return t?this.emit("error",t):this.emit(O),this;this[O]=!0,this[D]=!0,this[T].length=0,this[C]=0;let e=this;return typeof e.close=="function"&&!this[It]&&e.close(),t?this.emit("error",t):this.emit(O),this}static get isStream(){return P.isStream}};P.Minipass=qt});var Ms=R(_=>{"use strict";var gr=_&&_.__createBinding||(Object.create?(function(n,t,e,s){s===void 0&&(s=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,s,i)}):(function(n,t,e,s){s===void 0&&(s=e),n[s]=t[e]})),wr=_&&_.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),br=_&&_.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&gr(t,n,e);return wr(t,n),t};Object.defineProperty(_,"__esModule",{value:!0});_.PathScurry=_.Path=_.PathScurryDarwin=_.PathScurryPosix=_.PathScurryWin32=_.PathScurryBase=_.PathPosix=_.PathWin32=_.PathBase=_.ChildrenCache=_.ResolveCache=void 0;var Qt=fs(),Yt=require("node:path"),yr=require("node:url"),pt=require("fs"),Sr=br(require("node:fs")),vr=pt.realpathSync.native,Ht=require("node:fs/promises"),bs=Oe(),mt={lstatSync:pt.lstatSync,readdir:pt.readdir,readdirSync:pt.readdirSync,readlinkSync:pt.readlinkSync,realpathSync:vr,promises:{lstat:Ht.lstat,readdir:Ht.readdir,readlink:Ht.readlink,realpath:Ht.realpath}},_s=n=>!n||n===mt||n===Sr?mt:{...mt,...n,promises:{...mt.promises,...n.promises||{}}},Os=/^\\\\\?\\([a-z]:)\\?$/i,Er=n=>n.replace(/\//g,"\\").replace(Os,"$1\\"),_r=/[\\\/]/,N=0,xs=1,Ts=2,G=4,Cs=6,Rs=8,Q=10,As=12,j=15,dt=~j,xe=16,ys=32,gt=64,W=128,Vt=256,Xt=512,Ss=gt|W|Xt,Or=1023,Te=n=>n.isFile()?Rs:n.isDirectory()?G:n.isSymbolicLink()?Q:n.isCharacterDevice()?Ts:n.isBlockDevice()?Cs:n.isSocket()?As:n.isFIFO()?xs:N,vs=new Qt.LRUCache({max:2**12}),wt=n=>{let t=vs.get(n);if(t)return t;let e=n.normalize("NFKD");return vs.set(n,e),e},Es=new Qt.LRUCache({max:2**12}),Kt=n=>{let t=Es.get(n);if(t)return t;let e=wt(n.toLowerCase());return Es.set(n,e),e},bt=class extends Qt.LRUCache{constructor(){super({max:256})}};_.ResolveCache=bt;var Jt=class extends Qt.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}};_.ChildrenCache=Jt;var ks=Symbol("PathScurry setAsCwd"),A=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#h;get uid(){return this.#h}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#o;get ino(){return this.#o}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#v;get birthtimeMs(){return this.#v}#y;get atime(){return this.#y}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#O;#x;#g;#b;#E;#T;#e;#F;#P;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=N,s,i,r,h,o){this.name=t,this.#O=r?Kt(t):wt(t),this.#e=e&Or,this.nocase=r,this.roots=i,this.root=s||this,this.#F=h,this.#g=o.fullpath,this.#E=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=_s(o.fs)}depth(){return this.#x!==void 0?this.#x:this.parent?this.#x=this.parent.depth()+1:this.#x=0}childrenCache(){return this.#F}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#D(i):this.#D(i)}#D(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#F.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#F.set(this,e),this.#e&=~xe,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?Kt(t):wt(t);for(let a of s)if(a.#O===i)return a;let r=this.parent?this.sep:"",h=this.#g?this.#g+r+t:void 0,o=this.newChild(t,N,{...e,parent:this,fullpath:h});return this.canReaddir()||(o.#e|=W),s.push(o),o}relative(){if(this.isCWD)return"";if(this.#E!==void 0)return this.#E;let t=this.name,e=this.parent;if(!e)return this.#E=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let t=this.name,e=this.parent;if(!e)return this.#T=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#b=s}isUnknown(){return(this.#e&j)===N}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&j)===Rs}isDirectory(){return(this.#e&j)===G}isCharacterDevice(){return(this.#e&j)===Ts}isBlockDevice(){return(this.#e&j)===Cs}isFIFO(){return(this.#e&j)===xs}isSocket(){return(this.#e&j)===As}isSymbolicLink(){return(this.#e&Q)===Q}lstatCached(){return this.#e&ys?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#C}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let t=this.#e&j;return!(t!==N&&t!==Q||this.#e&Vt||this.#e&W)}calledReaddir(){return!!(this.#e&xe)}isENOENT(){return!!(this.#e&W)}isNamed(t){return this.nocase?this.#O===Kt(t):this.#O===wt(t)}async readlink(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}readlinkSync(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}#W(t){this.#e|=xe;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#N.push(t),this.#A)return;this.#A=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,h)=>{if(r)this.#B(r.code),s.provisional=0;else{for(let o of h)this.#I(o,s);this.#W(s)}this.#q(s.slice(0,s.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#H)await this.#H;else{let s=()=>{};this.#H=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#I(i,t);this.#W(t)}catch(i){this.#B(i.code),t.provisional=0}this.#H=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#I(s,t);this.#W(t)}catch(s){this.#B(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ss)return!1;let t=j&this.#e;return t===N||t===G||t===Q}shouldWalk(t,e){return(this.#e&G)===G&&!(this.#e&Ss)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}realpathSync(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}[ks](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#E=s.join(this.sep),i.#T=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#E=void 0,i.#T=void 0,i=i.parent}};_.PathBase=A;var yt=class n extends A{sep="\\";splitSep=_r;constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return Yt.win32.parse(t).root}getRoot(t){if(t=Er(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new Et(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(Os,"$1\\"),t===e}};_.PathWin32=yt;var St=class n extends A{splitSep="/";sep="/";constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}};_.PathPosix=St;var vt=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:h=mt}={}){this.#r=_s(h),(t instanceof URL||t.startsWith("file://"))&&(t=(0,yr.fileURLToPath)(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new bt,this.#s=new bt,this.#n=new Jt(r);let a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,f=a.length-1,c=e.sep,d=this.rootPath,u=!1;for(let m of a){let p=f--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(u?"":c)+m}),u=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((u,m)=>{if(u)return d(u);let p=m.length;if(!p)return d();let b=()=>{--p===0&&d()};for(let w of m)(!r||r(w))&&o.push(s?w:w.fullpath()),i&&w.isSymbolicLink()?w.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(a,h)?l(v,b):b()):w.shouldWalk(a,h)?l(w,b):b()},!0)},f=t;return new Promise((c,d)=>{l(f,u=>{if(u)return d(u);c(o)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let f=l.readdirSync();for(let c of f){(!r||r(c))&&o.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,h)&&a.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e;(!r||r(t))&&(yield s?t:t.fullpath());let o=new Set([t]);for(let a of o){let l=a.readdirSync();for(let f of l){(!r||r(f))&&(yield s?f:f.fullpath());let c=f;if(f.isSymbolicLink()){if(!(i&&(c=f.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(o,h)&&o.add(c)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0});(!r||r(t))&&o.write(s?t:t.fullpath());let a=new Set,l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=(b,w,v=!1)=>{if(b)return o.emit("error",b);if(i&&!v){let E=[];for(let y of w)y.isSymbolicLink()&&E.push(y.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(E.length){Promise.all(E).then(()=>m(null,w,!0));return}}for(let E of w)E&&(!r||r(E))&&(o.write(s?E:E.fullpath())||(d=!0));f--;for(let E of w){let y=E.realpathCached()||E;y.shouldWalk(a,h)&&l.push(y)}d&&!o.flowing?o.once("drain",c):p||c()},p=!0;u.readdirCB(m,!0),p=!1}};return c(),o}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0}),a=new Set;(!r||r(t))&&o.write(s?t:t.fullpath());let l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=u.readdirSync();for(let p of m)(!r||r(p))&&(o.write(s?p:p.fullpath())||(d=!0));f--;for(let p of m){let b=p;if(p.isSymbolicLink()){if(!(i&&(b=p.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,h)&&l.push(b)}}d&&!o.flowing&&o.once("drain",c)};return c(),o}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[ks](e)}};_.PathScurryBase=vt;var Et=class extends vt{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,Yt.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return Yt.win32.parse(t).root.toUpperCase()}newRoot(t){return new yt(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};_.PathScurryWin32=Et;var _t=class extends vt{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,Yt.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new St(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};_.PathScurryPosix=_t;var Zt=class extends _t{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}};_.PathScurryDarwin=Zt;_.Path=process.platform==="win32"?yt:St;_.PathScurry=process.platform==="win32"?Et:process.platform==="darwin"?Zt:_t});var Re=R(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.Pattern=void 0;var xr=H(),Tr=n=>n.length>=1,Cr=n=>n.length>=1,Rr=Symbol.for("nodejs.util.inspect.custom"),Ce=class n{#t;#s;#n;length;#r;#h;#S;#w;#c;#o;#f=!0;constructor(t,e,s,i){if(!Tr(t))throw new TypeError("empty pattern list");if(!Cr(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,h,o,a,...l]=this.#t,[f,c,d,u,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,h,o,a,""].join("/"),b=[f,c,d,u,""].join("/");this.#t=[p,...l],this.#s=[b,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...h]=this.#t,[o,...a]=this.#s;h[0]===""&&(h.shift(),a.shift());let l=r+"/",f=o+"/";this.#t=[l,...h],this.#s=[f,...a],this.length=this.#t.length}}}[Rr](){return"Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===xr.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#h!==void 0?this.#h:this.hasMore()?(this.#h=new n(this.#t,this.#s,this.#n+1,this.#r),this.#h.#o=this.#o,this.#h.#c=this.#c,this.#h.#w=this.#w,this.#h):this.#h=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#o!==void 0?this.#o:this.#o=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}};te.Pattern=Ce});var ke=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.Ignore=void 0;var Ps=H(),Ar=Re(),kr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ae=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:h=kr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=h,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:h,nocomment:!0,nonegate:!0};for(let o of t)this.add(o)}add(t){let e=new Ps.Minimatch(t,this.mmopts);for(let s=0;s{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.Processor=z.SubWalks=z.MatchRecord=z.HasWalkedCache=void 0;var Ds=H(),se=class n{store;constructor(t=new Map){this.store=t}copy(){return new n(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]))}};z.HasWalkedCache=se;var ie=class{store=new Map;add(t,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,r===void 0?i:i&r)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}};z.MatchRecord=ie;var re=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};z.SubWalks=re;var Me=class n{hasWalkedCache;matches=new ie;subwalks=new re;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new se}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let h=r.root(),o=r.isAbsolute()&&this.opts.absolute!==!1;if(h){i=i.resolve(h==="/"&&this.opts.root!==void 0?this.opts.root:h);let c=r.rest();if(c)r=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,f=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,f=!0;if(a=r.pattern(),l=r.rest(),f){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),o,c);continue}else if(a===Ds.GLOBSTAR){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,o,c===""||c===".");else if(c===".."){let u=i.parent||i;d?this.hasWalkedCache.hasWalked(u,d)||this.subwalks.add(u,d):this.matches.add(u,o,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let h of s){let o=h.isAbsolute(),a=h.pattern(),l=h.rest();a===Ds.GLOBSTAR?i.testGlobstar(r,h,l,o):a instanceof RegExp?i.testRegExp(r,a,l,o):i.testString(r,a,l,o)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let h=t.parent||t;this.subwalks.add(h,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};z.Processor=Me});var Ls=R(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.GlobStream=X.GlobWalker=X.GlobUtil=void 0;var Mr=Oe(),js=ke(),Ns=Fs(),Pr=(n,t)=>typeof n=="string"?new js.Ignore([n],t):Array.isArray(n)?new js.Ignore(n,t):n,Ot=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=Pr(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#h(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=await r.realpath();h&&(h.isUnknown()||this.opts.stat)&&await h.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=r.realpathSync();h&&(h?.isUnknown()||this.opts.stat)&&h.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),h=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?h+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Ns.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,s,h):o.readdirCB((l,f)=>this.walkCB3(o,f,s,h),!0)}h()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let[o,a]of s.subwalks.entries())r++,this.walkCB2(o,a,s.child(),h);h()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Ns.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirSync();this.walkCB3Sync(o,a,s,h)}h()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let[o,a]of s.subwalks.entries())r++,this.walkCB2Sync(o,a,s.child(),h);h()}};X.GlobUtil=Ot;var Pe=class extends Ot{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};X.GlobWalker=Pe;var De=class extends Ot{results;constructor(t,e,s){super(t,e,s),this.results=new Mr.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};X.GlobStream=De});var je=R(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.Glob=void 0;var Dr=H(),Fr=require("node:url"),ne=Ms(),jr=Re(),he=Ls(),Nr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Fe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,Fr.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||Nr,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?ne.PathScurryWin32:e.platform==="darwin"?ne.PathScurryDarwin:e.platform?ne.PathScurryPosix:ne.PathScurry;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new Dr.Minimatch(a,i)),[h,o]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=h.map((a,l)=>{let f=o[l];if(!f)throw new Error("invalid pattern object");return new jr.Pattern(a,f,0,this.platform)})}async walk(){return[...await new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};oe.Glob=Fe});var Ne=R(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.hasMagic=void 0;var Lr=H(),Wr=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new Lr.Minimatch(e,t).hasMagic())return!0;return!1};ae.hasMagic=Wr});Object.defineProperty(exports,"__esModule",{value:!0});exports.glob=exports.sync=exports.iterate=exports.iterateSync=exports.stream=exports.streamSync=exports.Ignore=exports.hasMagic=exports.Glob=exports.unescape=exports.escape=void 0;exports.globStreamSync=xt;exports.globStream=Le;exports.globSync=We;exports.globIterateSync=Tt;exports.globIterate=Be;var Ws=H(),tt=je(),Br=Ne(),Is=H();Object.defineProperty(exports,"escape",{enumerable:!0,get:function(){return Is.escape}});Object.defineProperty(exports,"unescape",{enumerable:!0,get:function(){return Is.unescape}});var Ir=je();Object.defineProperty(exports,"Glob",{enumerable:!0,get:function(){return Ir.Glob}});var Gr=Ne();Object.defineProperty(exports,"hasMagic",{enumerable:!0,get:function(){return Gr.hasMagic}});var zr=ke();Object.defineProperty(exports,"Ignore",{enumerable:!0,get:function(){return zr.Ignore}});function xt(n,t={}){return new tt.Glob(n,t).streamSync()}function Le(n,t={}){return new tt.Glob(n,t).stream()}function We(n,t={}){return new tt.Glob(n,t).walkSync()}async function Bs(n,t={}){return new tt.Glob(n,t).walk()}function Tt(n,t={}){return new tt.Glob(n,t).iterateSync()}function Be(n,t={}){return new tt.Glob(n,t).iterate()}exports.streamSync=xt;exports.stream=Object.assign(Le,{sync:xt});exports.iterateSync=Tt;exports.iterate=Object.assign(Be,{sync:Tt});exports.sync=Object.assign(We,{stream:xt,iterate:Tt});exports.glob=Object.assign(Bs,{glob:Bs,globSync:We,sync:exports.sync,globStream:Le,stream:exports.stream,globStreamSync:xt,streamSync:exports.streamSync,globIterate:Be,iterate:exports.iterate,globIterateSync:Tt,iterateSync:exports.iterateSync,Glob:tt.Glob,hasMagic:Br.hasMagic,escape:Ws.escape,unescape:Ws.unescape});exports.glob.glob=exports.glob; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/glob/dist/commonjs/pattern.js b/deps/npm/node_modules/glob/dist/commonjs/pattern.js index f0de35fb5bed9d..95f9075c5bfcb5 100644 --- a/deps/npm/node_modules/glob/dist/commonjs/pattern.js +++ b/deps/npm/node_modules/glob/dist/commonjs/pattern.js @@ -5,6 +5,7 @@ exports.Pattern = void 0; const minimatch_1 = require("minimatch"); const isPatternList = (pl) => pl.length >= 1; const isGlobList = (gl) => gl.length >= 1; +const customInspect = Symbol.for('nodejs.util.inspect.custom'); /** * An immutable-ish view on an array of glob parts and their parsed * results @@ -80,6 +81,9 @@ class Pattern { } } } + [customInspect]() { + return 'Pattern <' + this.#globList.slice(this.#index).join('/') + '>'; + } /** * The first entry in the parsed list of patterns */ diff --git a/deps/npm/node_modules/glob/dist/esm/glob.js b/deps/npm/node_modules/glob/dist/esm/glob.js index c9ff3b0036d945..d89c3dad90daa8 100644 --- a/deps/npm/node_modules/glob/dist/esm/glob.js +++ b/deps/npm/node_modules/glob/dist/esm/glob.js @@ -137,11 +137,12 @@ export class Glob { // for the file `AbC` for example. const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; const mmo = { - // default nocase based on platform + braceExpandMax: 10_000, ...opts, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, + // default nocase based on platform nocase: this.nocase, nocaseMagicOnly, nocomment: true, diff --git a/deps/npm/node_modules/glob/dist/esm/index.min.js b/deps/npm/node_modules/glob/dist/esm/index.min.js new file mode 100644 index 00000000000000..e6ea7cc1bc8311 --- /dev/null +++ b/deps/npm/node_modules/glob/dist/esm/index.min.js @@ -0,0 +1,4 @@ +var Gt=(n,t,e)=>{let s=n instanceof RegExp?ce(n,e):n,i=t instanceof RegExp?ce(t,e):t,r=s!==null&&i!=null&&ss(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}},ce=(n,t)=>{let e=t.match(n);return e?e[0]:null},ss=(n,t,e)=>{let s,i,r,o,h,a=e.indexOf(n),l=e.indexOf(t,a+1),u=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;u>=0&&!h;){if(u===a)s.push(u),a=e.indexOf(n,u+1);else if(s.length===1){let c=s.pop();c!==void 0&&(h=[c,l])}else i=s.pop(),i!==void 0&&i=0?a:l}s.length&&o!==void 0&&(h=[r,o])}return h};var fe="\0SLASH"+Math.random()+"\0",ue="\0OPEN"+Math.random()+"\0",qt="\0CLOSE"+Math.random()+"\0",de="\0COMMA"+Math.random()+"\0",pe="\0PERIOD"+Math.random()+"\0",is=new RegExp(fe,"g"),rs=new RegExp(ue,"g"),ns=new RegExp(qt,"g"),os=new RegExp(de,"g"),hs=new RegExp(pe,"g"),as=/\\\\/g,ls=/\\{/g,cs=/\\}/g,fs=/\\,/g,us=/\\./g,ds=1e5;function Ht(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function ps(n){return n.replace(as,fe).replace(ls,ue).replace(cs,qt).replace(fs,de).replace(us,pe)}function ms(n){return n.replace(is,"\\").replace(rs,"{").replace(ns,"}").replace(os,",").replace(hs,".")}function me(n){if(!n)return[""];let t=[],e=Gt("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,o=s.split(",");o[o.length-1]+="{"+i+"}";let h=me(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function ge(n,t={}){if(!n)return[];let{max:e=ds}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht(ps(n),e,!0).map(ms)}function gs(n){return"{"+n+"}"}function ws(n){return/^-?0\d/.test(n)}function ys(n,t){return n<=t}function bs(n,t){return n>=t}function ht(n,t,e){let s=[],i=Gt("{","}",n);if(!i)return[n];let r=i.pre,o=i.post.length?ht(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let h=0;h=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+qt+i.post,ht(n,t,!0)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=me(i.body),c.length===1&&c[0]!==void 0&&(c=ht(c[0],t,!1).map(gs),c.length===1))return o.map(f=>i.pre+c[0]+f);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let f=Ht(c[0]),m=Ht(c[1]),p=Math.max(c[0].length,c[1].length),w=c.length===3&&c[2]!==void 0?Math.abs(Ht(c[2])):1,g=ys;m0){let $=new Array(z+1).join("0");y<0?b="-"+$+b.slice(1):b=$+b}}d.push(b)}}else{d=[];for(let f=0;f{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ss={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},lt=n=>n.replace(/[[\]\\-]/g,"\\$&"),Es=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),we=n=>n.join(""),ye=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,o=!1,h=!1,a=!1,l=!1,u=e,c="";t:for(;rc?s.push(lt(c)+"-"+lt(p)):p===c&&s.push(lt(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(lt(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(lt(p)),r++}if(ue?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var xs=new Set(["!","?","+","*","@"]),be=n=>xs.has(n),vs="(?!(?:^|/)\\.\\.?(?:$|/))",Ct="(?!\\.)",Cs=new Set(["[","."]),Ts=new Set(["..","."]),As=new Set("().*{}+?[]^$\\!"),ks=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kt="[^/]",Se=Kt+"*?",Ee=Kt+"+?",Q=class n{type;#t;#s;#n=!1;#r=[];#o;#S;#w;#c=!1;#h;#u;#f=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#o?this.#o.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#u=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#o;for(;s;){for(let i=e.#S+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#S===0)return!0;let t=this.#o;for(let e=0;etypeof f!="string"),l=this.#r.map(f=>{let[m,p,w,g]=typeof f=="string"?n.#E(f,this.#s,a):f.toRegExpSource(t);return this.#s=this.#s||w,this.#n=this.#n||g,m}).join(""),u="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Ts.has(this.#r[0]))){let m=Cs,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),w=!e&&!t&&m.has(l.charAt(0));u=p?vs:w?Ct:""}let c="";return this.isEnd()&&this.#t.#c&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[u+l+c,W(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,W(this.toString()),!1,!1]}let o=!s||t||e||!Ct?"":this.#d(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let h="";if(this.type==="!"&&this.#f)h=(this.isStart()&&!e?Ct:"")+Ee;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Ct:"")+Se+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=i+r+a}return[h,W(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,o]=e.toRegExpSource(t);return this.#n=this.#n||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#E(t,e,s=!1){let i=!1,r="",o=!1,h=!1;for(let a=0;ae?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var O=(n,t,e={})=>(at(t),!e.nocomment&&t.charAt(0)==="#"?!1:new D(t,e).match(n)),Rs=/^\*+([^+@!?\*\[\(]*)$/,Os=n=>t=>!t.startsWith(".")&&t.endsWith(n),Fs=n=>t=>t.endsWith(n),Ds=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ms=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ns=/^\*+\.\*+$/,_s=n=>!n.startsWith(".")&&n.includes("."),Ls=n=>n!=="."&&n!==".."&&n.includes("."),Ws=/^\.\*+$/,Ps=n=>n!=="."&&n!==".."&&n.startsWith("."),js=/^\*+$/,Is=n=>n.length!==0&&!n.startsWith("."),zs=n=>n.length!==0&&n!=="."&&n!=="..",Bs=/^\?+([^+@!?\*\[\(]*)?$/,Us=([n,t=""])=>{let e=Ce([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},$s=([n,t=""])=>{let e=Te([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Gs=([n,t=""])=>{let e=Te([n]);return t?s=>e(s)&&s.endsWith(t):e},Hs=([n,t=""])=>{let e=Ce([n]);return t?s=>e(s)&&s.endsWith(t):e},Ce=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},Te=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},Ae=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xe={win32:{sep:"\\"},posix:{sep:"/"}},qs=Ae==="win32"?xe.win32.sep:xe.posix.sep;O.sep=qs;var A=Symbol("globstar **");O.GLOBSTAR=A;var Ks="[^/]",Vs=Ks+"*?",Ys="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Xs="(?:(?!(?:\\/|^)\\.).)*?",Js=(n,t={})=>e=>O(e,n,t);O.filter=Js;var N=(n,t={})=>Object.assign({},n,t),Zs=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return O;let t=O;return Object.assign((s,i,r={})=>t(s,i,N(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,N(n,r))}static defaults(i){return t.defaults(N(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,o={}){super(i,r,N(n,o))}static fromGlob(i,r={}){return t.AST.fromGlob(i,N(n,r))}},unescape:(s,i={})=>t.unescape(s,N(n,i)),escape:(s,i={})=>t.escape(s,N(n,i)),filter:(s,i={})=>t.filter(s,N(n,i)),defaults:s=>t.defaults(N(n,s)),makeRe:(s,i={})=>t.makeRe(s,N(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,N(n,i)),match:(s,i,r={})=>t.match(s,i,N(n,r)),sep:t.sep,GLOBSTAR:A})};O.defaults=Zs;var ke=(n,t={})=>(at(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:ge(n,{max:t.braceExpandMax}));O.braceExpand=ke;var Qs=(n,t={})=>new D(n,t).makeRe();O.makeRe=Qs;var ti=(n,t,e={})=>{let s=new D(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};O.match=ti;var ve=/[?*]|[+@!]\(.*?\)|\[|\]/,ei=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){at(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ae,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ve.test(r[2]))&&!ve.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(u=>this.parse(u))];if(l)return[r[0],...r.slice(1).map(u=>this.parse(u))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,o-i);let h=s[i+1],a=s[i+2],l=s[i+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let u=s.slice(0);u[i]="**",t.push(u),i--}if(!this.preserveMultipleSlashes){for(let o=1;oe.length)}partsMatch(t,e,s=!1){let i=0,r=0,o=[],h="";for(;iE?e=e.slice(y):E>y&&(t=t.slice(E)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o>> no match, partial?`,t,d,e,f),d===a))}let p;if(typeof u=="string"?(p=c===u,this.debug("string match",u,c,p)):(p=u.test(c),this.debug("pattern match",u,c,p)),!p)return!1}if(o===a&&h===l)return!0;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ke(this.pattern,this.options)}parse(t){at(t);let e=this.options;if(t==="**")return A;if(t==="")return"";let s,i=null;(s=t.match(js))?i=e.dot?zs:Is:(s=t.match(Rs))?i=(e.nocase?e.dot?Ms:Ds:e.dot?Fs:Os)(s[1]):(s=t.match(Bs))?i=(e.nocase?e.dot?$s:Us:e.dot?Gs:Hs)(s):(s=t.match(Ns))?i=e.dot?Ls:_s:(s=t.match(Ws))&&(i=Ps);let r=Q.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Vs:e.dot?Ys:Xs,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?ei(c):c===A?A:c._src});l.forEach((c,d)=>{let f=l[d+1],m=l[d-1];c!==A||m===A||(m===void 0?f!==void 0&&f!==A?l[d+1]="(?:\\/|"+s+"\\/)?"+f:l[d]=s:f===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":f!==A&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+f,l[d+1]=A))});let u=l.filter(c=>c!==A);if(this.partial&&u.length>=1){let c=[];for(let d=1;d<=u.length;d++)c.push(u.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return u.join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+h+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h{typeof Vt.emitWarning=="function"?Vt.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},At=globalThis.AbortController,Re=globalThis.AbortSignal;if(typeof At>"u"){Re=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,s){this._onabort.push(s)}},At=class{constructor(){t()}signal=new Re;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e)}}};let n=Vt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,Fe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var ii=n=>!Oe.has(n);var q=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),De=n=>q(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Tt:null:null,Tt=class extends Array{constructor(n){super(n),this.fill(0)}},ri=class ct{heap;length;static#t=!1;static create(t){let e=De(t);if(!e)return[];ct.#t=!0;let s=new ct(t,e);return ct.#t=!1,s}constructor(t,e){if(!ct.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},ft=class Me{#t;#s;#n;#r;#o;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#u;#f;#a;#i;#d;#E;#b;#p;#R;#m;#C;#T;#g;#y;#x;#A;#e;#_;static unsafeExposeInternals(t){return{starts:t.#T,ttls:t.#g,autopurgeTimers:t.#y,sizes:t.#C,keyMap:t.#f,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#E,get head(){return t.#b},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#U(e,s,i,r),moveToTail:e=>t.#W(e),indexes:e=>t.#F(e),rindexes:e=>t.#D(e),isStale:e=>t.#v(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#u}get size(){return this.#h}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,onInsert:u,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:f,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:w,fetchMethod:g,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:z,ignoreFetchAbort:$,perf:J}=t;if(J!==void 0&&typeof J?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=J??si,e!==0&&!q(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?De(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=w,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=S,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=g,this.#A=!!g,this.#f=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new Z(e),this.#E=new Z(e),this.#b=0,this.#p=0,this.#R=ri.create(e),this.#h=0,this.#u=0,typeof l=="function"&&(this.#n=l),typeof u=="function"&&(this.#r=u),typeof c=="function"?(this.#o=c,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#x=!!this.#n,this.#_=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!$,this.maxEntrySize!==0){if(this.#s!==0&&!q(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!q(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=q(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!q(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let $t="LRU_CACHE_UNBOUNDED";ii($t)&&(Oe.add($t),Fe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$t,Me))}}getRemainingTTL(t){return this.#f.has(t)?1/0:0}#M(){let t=new Tt(this.#t),e=new Tt(this.#t);this.#g=t,this.#T=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#y=s,this.#j=(o,h,a=this.#c.now())=>{if(e[o]=h!==0?a:0,t[o]=h,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),h!==0&&s){let l=setTimeout(()=>{this.#v(o)&&this.#O(this.#a[o],"expire")},h+1);l.unref&&l.unref(),s[o]=l}},this.#k=o=>{e[o]=t[o]!==0?this.#c.now():0},this.#N=(o,h)=>{if(t[h]){let a=t[h],l=e[h];if(!a||!l)return;o.ttl=a,o.start=l,o.now=i||r();let u=o.now-l;o.remainingTTL=a-u}};let i=0,r=()=>{let o=this.#c.now();if(this.ttlResolution>0){i=o;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return o};this.getRemainingTTL=o=>{let h=this.#f.get(o);if(h===void 0)return 0;let a=t[h],l=e[h];if(!a||!l)return 1/0;let u=(i||r())-l;return a-u},this.#v=o=>{let h=e[o],a=t[o];return!!a&&!!h&&(i||r())-h>a}}#k=()=>{};#N=()=>{};#j=()=>{};#v=()=>!1;#G(){let t=new Tt(this.#t);this.#u=0,this.#C=t,this.#P=e=>{this.#u-=t[e],t[e]=0},this.#I=(e,s,i,r)=>{if(this.#l(s))return 0;if(!q(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!q(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#u>r;)this.#B(!0)}this.#u+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#u)}}#P=t=>{};#L=(t,e,s)=>{};#I=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#p;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#b));)e=this.#E[e]}*#D({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#b;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#p));)e=this.#d[e]}#z(t){return t!==void 0&&this.#f.get(this.#a[t])===t}*entries(){for(let t of this.#F())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#D())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#F()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*rkeys(){for(let t of this.#D()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*values(){for(let t of this.#F())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#D())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#D()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#D({allowStale:!0}))this.#v(e)&&(this.#O(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#f.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#T){let o=this.#g[e],h=this.#T[e];if(o&&h){let a=o-(this.#c.now()-h);r.ttl=a,r.start=Date.now()}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#F({allowStale:!0})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#g&&this.#T){o.ttl=this.#g[e];let h=this.#c.now()-this.#T[e];o.start=Math.floor(Date.now()-h)}this.#C&&(o.size=this.#C[e]),t.unshift([s,o])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,u=this.#I(t,e,s.size||0,h);if(this.maxEntrySize&&u>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#O(t,"set"),this;let c=this.#h===0?void 0:this.#f.get(t);if(c===void 0)c=this.#h===0?this.#p:this.#R.length!==0?this.#R.pop():this.#h===this.#t?this.#B(!1):this.#h,this.#a[c]=t,this.#i[c]=e,this.#f.set(t,c),this.#d[this.#p]=c,this.#E[c]=this.#p,this.#p=c,this.#h++,this.#L(c,u,a),a&&(a.set="add"),l=!1,this.#_&&this.#r?.(e,t,"add");else{this.#W(c);let d=this.#i[c];if(e!==d){if(this.#A&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#x&&this.#n?.(f,t,"set"),this.#e&&this.#m?.push([f,t,"set"]))}else o||(this.#x&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#P(c),this.#L(c,u,a),this.#i[c]=e,a){a.set="replace";let f=d&&this.#l(d)?d.__staleWhileFetching:d;f!==void 0&&(a.oldValue=f)}}else a&&(a.set="update");this.#_&&this.onInsert?.(e,t,e===d?"update":"replace")}if(i!==0&&!this.#g&&this.#M(),this.#g&&(l||this.#j(c,i,r),a&&this.#N(a,c)),!o&&this.#e&&this.#m){let d=this.#m,f;for(;f=d?.shift();)this.#o?.(...f)}return this}pop(){try{for(;this.#h;){let t=this.#i[this.#b];if(this.#B(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#o?.(...e)}}}#B(t){let e=this.#b,s=this.#a[e],i=this.#i[e];return this.#A&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#P(e),this.#y?.[e]&&(clearTimeout(this.#y[e]),this.#y[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#h===1?(this.#b=this.#p=0,this.#R.length=0):this.#b=this.#d[e],this.#f.delete(s),this.#h--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#f.get(t);if(r!==void 0){let o=this.#i[r];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#v(r))i&&(i.has="stale",this.#N(i,r));else return s&&this.#k(r),i&&(i.has="hit",this.#N(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#f.get(t);if(i===void 0||!s&&this.#v(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#U(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let o=new At,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=!1)=>{let{aborted:g}=o.signal,S=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(g&&!w?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!S&&!w)return c(o.signal.reason,E);let y=f,b=this.#i[e];return(b===f||S&&w&&b===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#O(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},u=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),c(p,!1)),c=(p,w)=>{let{aborted:g}=o.signal,S=g&&s.allowStaleOnFetchAbort,E=S||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,b=f;if(this.#i[e]===f&&(!y||!w&&b.__staleWhileFetching===void 0?this.#O(t,"fetch"):S||(this.#i[e]=b.__staleWhileFetching)),E)return s.status&&b.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),b.__staleWhileFetching;if(b.__returned===b)throw p},d=(p,w)=>{let g=this.#S?.(t,r,a);g&&g instanceof Promise&&g.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let f=new Promise(d).then(l,u),m=Object.assign(f,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#f.get(t)):this.#i[e]=m,m}#l(t){if(!this.#A)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof At}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=!1,status:g,signal:S}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:f,status:g,signal:S},y=this.#f.get(t);if(y===void 0){g&&(g.fetch="miss");let b=this.#U(t,y,E,p);return b.__returned=b}else{let b=this.#i[y];if(this.#l(b)){let Z=s&&b.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Z&&(g.returnedStale=!0)),Z?b.__staleWhileFetching:b.__returned=b}let z=this.#v(y);if(!w&&!z)return g&&(g.fetch="hit"),this.#W(y),i&&this.#k(y),g&&this.#N(g,y),b;let $=this.#U(t,y,E,p),J=$.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=z?"stale":"refresh",J&&z&&(g.returnedStale=!0)),J?$.__staleWhileFetching:$.__returned=$}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...o}=e,h=this.get(t,o);if(!r&&h!==void 0)return h;let a=s(t,h,{options:o,context:i});return this.set(t,a,o),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#f.get(t);if(h!==void 0){let a=this.#i[h],l=this.#l(a);return o&&this.#N(o,h),this.#v(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#W(h),i&&this.#k(h),a))}else o&&(o.get="miss")}#$(t,e){this.#E[e]=t,this.#d[t]=e}#W(t){t!==this.#p&&(t===this.#b?this.#b=this.#d[t]:this.#$(this.#E[t],this.#d[t]),this.#$(this.#p,t),this.#p=t)}delete(t){return this.#O(t,"delete")}#O(t,e){let s=!1;if(this.#h!==0){let i=this.#f.get(t);if(i!==void 0)if(this.#y?.[i]&&(clearTimeout(this.#y?.[i]),this.#y[i]=void 0),s=!0,this.#h===1)this.#H(e);else{this.#P(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#f.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#E[i];else if(i===this.#b)this.#b=this.#d[i];else{let o=this.#E[i];this.#d[o]=this.#d[i];let h=this.#d[i];this.#E[h]=this.#E[i]}this.#h--,this.#R.push(i)}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#o?.(...r)}return s}clear(){return this.#H("delete")}#H(t){for(let e of this.#D({allowStale:!0})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#x&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t])}}if(this.#f.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#T){this.#g.fill(0),this.#T.fill(0);for(let e of this.#y??[])e!==void 0&&clearTimeout(e);this.#y?.fill(void 0)}if(this.#C&&this.#C.fill(0),this.#b=0,this.#p=0,this.#R.length=0,this.#u=0,this.#h=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#o?.(...s)}}};import{posix as mi,win32 as re}from"node:path";import{fileURLToPath as gi}from"node:url";import{lstatSync as wi,readdir as yi,readdirSync as bi,readlinkSync as Si,realpathSync as Ei}from"fs";import*as xi from"node:fs";import{lstat as Ci,readdir as Ti,readlink as Ai,realpath as ki}from"node:fs/promises";import{EventEmitter as ee}from"node:events";import Pe from"node:stream";import{StringDecoder as ni}from"node:string_decoder";var Ne=typeof process=="object"&&process?process:{stdout:null,stderr:null},oi=n=>!!n&&typeof n=="object"&&(n instanceof V||n instanceof Pe||hi(n)||ai(n)),hi=n=>!!n&&typeof n=="object"&&n instanceof ee&&typeof n.pipe=="function"&&n.pipe!==Pe.Writable.prototype.pipe,ai=n=>!!n&&typeof n=="object"&&n instanceof ee&&typeof n.write=="function"&&typeof n.end=="function",G=Symbol("EOF"),H=Symbol("maybeEmitEnd"),K=Symbol("emittedEnd"),kt=Symbol("emittingEnd"),ut=Symbol("emittedError"),Rt=Symbol("closed"),_e=Symbol("read"),Ot=Symbol("flush"),Le=Symbol("flushChunk"),P=Symbol("encoding"),et=Symbol("decoder"),v=Symbol("flowing"),dt=Symbol("paused"),st=Symbol("resume"),C=Symbol("buffer"),F=Symbol("pipes"),T=Symbol("bufferLength"),Yt=Symbol("bufferPush"),Ft=Symbol("bufferShift"),k=Symbol("objectMode"),x=Symbol("destroyed"),Xt=Symbol("error"),Jt=Symbol("emitData"),We=Symbol("emitEnd"),Zt=Symbol("emitEnd2"),B=Symbol("async"),Qt=Symbol("abort"),Dt=Symbol("aborted"),pt=Symbol("signal"),Y=Symbol("dataListeners"),M=Symbol("discarded"),mt=n=>Promise.resolve().then(n),li=n=>n(),ci=n=>n==="end"||n==="finish"||n==="prefinish",fi=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,ui=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),Mt=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[st](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},te=class extends Mt{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors)}},di=n=>!!n.objectMode,pi=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",V=class extends ee{[v]=!1;[dt]=!1;[F]=[];[C]=[];[k];[P];[B];[et];[G]=!1;[K]=!1;[kt]=!1;[Rt]=!1;[ut]=null;[T]=0;[x]=!1;[pt];[Dt]=!1;[Y]=0;[M]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");di(e)?(this[k]=!0,this[P]=null):pi(e)?(this[P]=e.encoding,this[k]=!1):(this[k]=!1,this[P]=null),this[B]=!!e.async,this[et]=this[P]?new ni(this[P]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[C]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[F]});let{signal:s}=e;s&&(this[pt]=s,s.aborted?this[Qt]():s.addEventListener("abort",()=>this[Qt]()))}get bufferLength(){return this[T]}get encoding(){return this[P]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[B]}set async(t){this[B]=this[B]||!!t}[Qt](){this[Dt]=!0,this.emit("abort",this[pt]?.reason),this.destroy(this[pt]?.reason)}get aborted(){return this[Dt]}set aborted(t){}write(t,e,s){if(this[Dt])return!1;if(this[G])throw new Error("write after end");if(this[x])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[B]?mt:li;if(!this[k]&&!Buffer.isBuffer(t)){if(ui(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fi(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[v]&&this[T]!==0&&this[Ot](!0),this[v]?this.emit("data",t):this[Yt](t),this[T]!==0&&this.emit("readable"),s&&i(s),this[v]):t.length?(typeof t=="string"&&!(e===this[P]&&!this[et]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P]&&(t=this[et].write(t)),this[v]&&this[T]!==0&&this[Ot](!0),this[v]?this.emit("data",t):this[Yt](t),this[T]!==0&&this.emit("readable"),s&&i(s),this[v]):(this[T]!==0&&this.emit("readable"),s&&i(s),this[v])}read(t){if(this[x])return null;if(this[M]=!1,this[T]===0||t===0||t&&t>this[T])return this[H](),null;this[k]&&(t=null),this[C].length>1&&!this[k]&&(this[C]=[this[P]?this[C].join(""):Buffer.concat(this[C],this[T])]);let e=this[_e](t||null,this[C][0]);return this[H](),e}[_e](t,e){if(this[k])this[Ft]();else{let s=e;t===s.length||t===null?this[Ft]():typeof s=="string"?(this[C][0]=s.slice(t),e=s.slice(0,t),this[T]-=t):(this[C][0]=s.subarray(t),e=s.subarray(0,t),this[T]-=t)}return this.emit("data",e),!this[C].length&&!this[G]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[G]=!0,this.writable=!1,(this[v]||!this[dt])&&this[H](),this}[st](){this[x]||(!this[Y]&&!this[F].length&&(this[M]=!0),this[dt]=!1,this[v]=!0,this.emit("resume"),this[C].length?this[Ot]():this[G]?this[H]():this.emit("drain"))}resume(){return this[st]()}pause(){this[v]=!1,this[dt]=!0,this[M]=!1}get destroyed(){return this[x]}get flowing(){return this[v]}get paused(){return this[dt]}[Yt](t){this[k]?this[T]+=1:this[T]+=t.length,this[C].push(t)}[Ft](){return this[k]?this[T]-=1:this[T]-=this[C][0].length,this[C].shift()}[Ot](t=!1){do;while(this[Le](this[Ft]())&&this[C].length);!t&&!this[C].length&&!this[G]&&this.emit("drain")}[Le](t){return this.emit("data",t),this[v]}pipe(t,e){if(this[x])return t;this[M]=!1;let s=this[K];return e=e||{},t===Ne.stdout||t===Ne.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[F].push(e.proxyErrors?new te(this,t,e):new Mt(this,t,e)),this[B]?mt(()=>this[st]()):this[st]()),t}unpipe(t){let e=this[F].find(s=>s.dest===t);e&&(this[F].length===1?(this[v]&&this[Y]===0&&(this[v]=!1),this[F]=[]):this[F].splice(this[F].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[M]=!1,this[Y]++,!this[F].length&&!this[v]&&this[st]();else if(t==="readable"&&this[T]!==0)super.emit("readable");else if(ci(t)&&this[K])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[ut]){let i=e;this[B]?mt(()=>i.call(this,this[ut])):i.call(this,this[ut])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Y]=this.listeners("data").length,this[Y]===0&&!this[M]&&!this[F].length&&(this[v]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Y]=0,!this[M]&&!this[F].length&&(this[v]=!1)),e}get emittedEnd(){return this[K]}[H](){!this[kt]&&!this[K]&&!this[x]&&this[C].length===0&&this[G]&&(this[kt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Rt]&&this.emit("close"),this[kt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==x&&this[x])return!1;if(t==="data")return!this[k]&&!s?!1:this[B]?(mt(()=>this[Jt](s)),!0):this[Jt](s);if(t==="end")return this[We]();if(t==="close"){if(this[Rt]=!0,!this[K]&&!this[x])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[ut]=s,super.emit(Xt,s);let r=!this[pt]||this.listeners("error").length?super.emit("error",s):!1;return this[H](),r}else if(t==="resume"){let r=super.emit("resume");return this[H](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[H](),i}[Jt](t){for(let s of this[F])s.dest.write(t)===!1&&this.pause();let e=this[M]?!1:super.emit("data",t);return this[H](),e}[We](){return this[K]?!1:(this[K]=!0,this.readable=!1,this[B]?(mt(()=>this[Zt]()),!0):this[Zt]())}[Zt](){if(this[et]){let e=this[et].end();if(e){for(let s of this[F])s.dest.write(e);this[M]||super.emit("data",e)}}for(let e of this[F])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(x,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[M]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[G])return e();let r,o,h=c=>{this.off("data",a),this.off("end",l),this.off(x,u),e(),o(c)},a=c=>{this.off("error",h),this.off("end",l),this.off(x,u),this.pause(),r({value:c,done:!!this[G]})},l=()=>{this.off("error",h),this.off("data",a),this.off(x,u),e(),r({done:!0,value:void 0})},u=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,r=c,this.once(x,u),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[M]=!1;let t=!1,e=()=>(this.pause(),this.off(Xt,e),this.off(x,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(Xt,e),this.once(x,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[x])return t?this.emit("error",t):this.emit(x),this;this[x]=!0,this[M]=!0,this[C].length=0,this[T]=0;let e=this;return typeof e.close=="function"&&!this[Rt]&&e.close(),t?this.emit("error",t):this.emit(x),this}static get isStream(){return oi}};var vi=Ei.native,wt={lstatSync:wi,readdir:yi,readdirSync:bi,readlinkSync:Si,realpathSync:vi,promises:{lstat:Ci,readdir:Ti,readlink:Ai,realpath:ki}},Ue=n=>!n||n===wt||n===xi?wt:{...wt,...n,promises:{...wt.promises,...n.promises||{}}},$e=/^\\\\\?\\([a-z]:)\\?$/i,Ri=n=>n.replace(/\//g,"\\").replace($e,"$1\\"),Oi=/[\\\/]/,L=0,Ge=1,He=2,U=4,qe=6,Ke=8,X=10,Ve=12,_=15,gt=~_,se=16,je=32,yt=64,j=128,Nt=256,Lt=512,Ie=yt|j|Lt,Fi=1023,ie=n=>n.isFile()?Ke:n.isDirectory()?U:n.isSymbolicLink()?X:n.isCharacterDevice()?He:n.isBlockDevice()?qe:n.isSocket()?Ve:n.isFIFO()?Ge:L,ze=new ft({max:2**12}),bt=n=>{let t=ze.get(n);if(t)return t;let e=n.normalize("NFKD");return ze.set(n,e),e},Be=new ft({max:2**12}),_t=n=>{let t=Be.get(n);if(t)return t;let e=bt(n.toLowerCase());return Be.set(n,e),e},Wt=class extends ft{constructor(){super({max:256})}},ne=class extends ft{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},Ye=Symbol("PathScurry setAsCwd"),R=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#h;get ino(){return this.#h}#u;get size(){return this.#u}#f;get blocks(){return this.#f}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#C;#T;#g;#y;#x;#A;#e;#_;#M;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=L,s,i,r,o,h){this.name=t,this.#C=r?_t(t):bt(t),this.#e=e&Fi,this.nocase=r,this.roots=i,this.root=s||this,this.#_=o,this.#g=h.fullpath,this.#x=h.relative,this.#A=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=Ue(h.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#_}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#N(i):this.#N(i)}#N(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#_.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#_.set(this,e),this.#e&=~se,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?_t(t):bt(t);for(let a of s)if(a.#C===i)return a;let r=this.parent?this.sep:"",o=this.#g?this.#g+r+t:void 0,h=this.newChild(t,L,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#e|=j),s.push(h),h}relative(){if(this.isCWD)return"";if(this.#x!==void 0)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#y=`//?/${i}`:this.#y=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#y=s}isUnknown(){return(this.#e&_)===L}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&_)===Ke}isDirectory(){return(this.#e&_)===U}isCharacterDevice(){return(this.#e&_)===He}isBlockDevice(){return(this.#e&_)===qe}isFIFO(){return(this.#e&_)===Ge}isSocket(){return(this.#e&_)===Ve}isSymbolicLink(){return(this.#e&X)===X}lstatCached(){return this.#e&je?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#k}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return!0;if(!this.parent)return!1;let t=this.#e&_;return!(t!==L&&t!==X||this.#e&Nt||this.#e&j)}calledReaddir(){return!!(this.#e&se)}isENOENT(){return!!(this.#e&j)}isNamed(t){return this.nocase?this.#C===_t(t):this.#C===bt(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}#j(t){this.#e|=se;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#W.push(t),this.#O)return;this.#O=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,o)=>{if(r)this.#I(r.code),s.provisional=0;else{for(let h of o)this.#z(h,s);this.#j(s)}this.#H(s.slice(0,s.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#q)await this.#q;else{let s=()=>{};this.#q=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#z(i,t);this.#j(t)}catch(i){this.#I(i.code),t.provisional=0}this.#q=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#z(s,t);this.#j(t)}catch(s){this.#I(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ie)return!1;let t=_&this.#e;return t===L||t===U||t===X}shouldWalk(t,e){return(this.#e&U)===U&&!(this.#e&Ie)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#k)return this.#k;if(!((Lt|Nt|j)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P()}}realpathSync(){if(this.#k)return this.#k;if(!((Lt|Nt|j)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P()}}[Ye](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#x=s.join(this.sep),i.#A=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#x=void 0,i.#A=void 0,i=i.parent}},Pt=class n extends R{sep="\\";splitSep=Oi;constructor(t,e=L,s,i,r,o,h){super(t,e,s,i,r,o,h)}newChild(t,e=L,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return re.parse(t).root}getRoot(t){if(t=Ri(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new it(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace($e,"$1\\"),t===e}},jt=class n extends R{splitSep="/";sep="/";constructor(t,e=L,s,i,r,o,h){super(t,e,s,i,r,o,h)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=L,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},It=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=wt}={}){this.#r=Ue(o),(t instanceof URL||t.startsWith("file://"))&&(t=gi(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Wt,this.#s=new Wt,this.#n=new ne(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=a.length-1,c=e.sep,d=this.rootPath,f=!1;for(let m of a){let p=u--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(f?"":c)+m}),f=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((f,m)=>{if(f)return d(f);let p=m.length;if(!p)return d();let w=()=>{--p===0&&d()};for(let g of m)(!r||r(g))&&h.push(s?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):g.shouldWalk(a,o)?l(g,w):w()},!0)},u=t;return new Promise((c,d)=>{l(u,f=>{if(f)return d(f);c(h)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let u=l.readdirSync();for(let c of u){(!r||r(c))&&h.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,o)&&a.add(d)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let u of l){(!r||r(u))&&(yield s?u:u.fullpath());let c=u;if(u.isSymbolicLink()){if(!(i&&(c=u.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(h,o)&&h.add(c)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new V({objectMode:!0});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],u=0,c=()=>{let d=!1;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=(w,g,S=!1)=>{if(w)return h.emit("error",w);if(i&&!S){let E=[];for(let y of g)y.isSymbolicLink()&&E.push(y.realpath().then(b=>b?.isUnknown()?b.lstat():b));if(E.length){Promise.all(E).then(()=>m(null,g,!0));return}}for(let E of g)E&&(!r||r(E))&&(h.write(s?E:E.fullpath())||(d=!0));u--;for(let E of g){let y=E.realpathCached()||E;y.shouldWalk(a,o)&&l.push(y)}d&&!h.flowing?h.once("drain",c):p||c()},p=!0;f.readdirCB(m,!0),p=!1}};return c(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new V({objectMode:!0}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],u=0,c=()=>{let d=!1;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=f.readdirSync();for(let p of m)(!r||r(p))&&(h.write(s?p:p.fullpath())||(d=!0));u--;for(let p of m){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(a,o)&&l.push(w)}}d&&!h.flowing&&h.once("drain",c)};return c(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Ye](e)}},it=class extends It{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,re,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return re.parse(t).root.toUpperCase()}newRoot(t){return new Pt(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},rt=class extends It{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,mi,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new jt(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},St=class extends rt{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}},Cr=process.platform==="win32"?Pt:jt,Xe=process.platform==="win32"?it:process.platform==="darwin"?St:rt;var Di=n=>n.length>=1,Mi=n=>n.length>=1,Ni=Symbol.for("nodejs.util.inspect.custom"),nt=class n{#t;#s;#n;length;#r;#o;#S;#w;#c;#h;#u=!0;constructor(t,e,s,i){if(!Di(t))throw new TypeError("empty pattern list");if(!Mi(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[u,c,d,f,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,o,h,a,""].join("/"),w=[u,c,d,f,""].join("/");this.#t=[p,...l],this.#s=[w,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",u=h+"/";this.#t=[l,...o],this.#s=[u,...a],this.length=this.#t.length}}}[Ni](){return"Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===A}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#t,this.#s,this.#n+1,this.#r),this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o.#w=this.#w,this.#o):this.#o=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#h!==void 0?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var _i=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ot=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=_i}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of t)this.add(h)}add(t){let e=new D(t,this.mmopts);for(let s=0;s[t,!!(e&2),!!(e&1)])}},ae=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Et=class n{hasWalkedCache;matches=new he;subwalks=new ae;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new oe}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=r.rest();if(c)r=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,u=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,u=!0;if(a=r.pattern(),l=r.rest(),u){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,c);continue}else if(a===A){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,h,c===""||c===".");else if(c===".."){let f=i.parent||i;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,h,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===A?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};var Li=(n,t)=>typeof n=="string"?new ot([n],t):Array.isArray(n)?new ot(n,t):n,zt=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=Li(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#o(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?o+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Et(this.opts),s)}walkCB2(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,u)=>this.walkCB3(h,u,s,o),!0)}o()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Et(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o)}o()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o()}},xt=class extends zt{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},vt=class extends zt{results;constructor(t,e,s){super(t,e,s),this.results=new V({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Pi=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",I=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=Wi(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||Pi,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?it:e.platform==="darwin"?St:e.platform?rt:Xe;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let u=h[l];if(!u)throw new Error("invalid pattern object");return new nt(a,u,0,this.platform)})}async walk(){return[...await new xt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new xt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var le=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D(e,t).hasMagic())return!0;return!1};function Bt(n,t={}){return new I(n,t).streamSync()}function Qe(n,t={}){return new I(n,t).stream()}function ts(n,t={}){return new I(n,t).walkSync()}async function Je(n,t={}){return new I(n,t).walk()}function Ut(n,t={}){return new I(n,t).iterateSync()}function es(n,t={}){return new I(n,t).iterate()}var ji=Bt,Ii=Object.assign(Qe,{sync:Bt}),zi=Ut,Bi=Object.assign(es,{sync:Ut}),Ui=Object.assign(ts,{stream:Bt,iterate:Ut}),Ze=Object.assign(Je,{glob:Je,globSync:ts,sync:Ui,globStream:Qe,stream:Ii,globStreamSync:Bt,streamSync:ji,globIterate:es,iterate:Bi,globIterateSync:Ut,iterateSync:zi,Glob:I,hasMagic:le,escape:tt,unescape:W});Ze.glob=Ze;export{I as Glob,ot as Ignore,tt as escape,Ze as glob,es as globIterate,Ut as globIterateSync,Qe as globStream,Bt as globStreamSync,ts as globSync,le as hasMagic,Bi as iterate,zi as iterateSync,Ii as stream,ji as streamSync,Ui as sync,W as unescape}; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/glob/dist/esm/pattern.js b/deps/npm/node_modules/glob/dist/esm/pattern.js index b41defa10c6a3a..2f733da5bf4f90 100644 --- a/deps/npm/node_modules/glob/dist/esm/pattern.js +++ b/deps/npm/node_modules/glob/dist/esm/pattern.js @@ -2,6 +2,7 @@ import { GLOBSTAR } from 'minimatch'; const isPatternList = (pl) => pl.length >= 1; const isGlobList = (gl) => gl.length >= 1; +const customInspect = Symbol.for('nodejs.util.inspect.custom'); /** * An immutable-ish view on an array of glob parts and their parsed * results @@ -77,6 +78,9 @@ export class Pattern { } } } + [customInspect]() { + return 'Pattern <' + this.#globList.slice(this.#index).join('/') + '>'; + } /** * The first entry in the parsed list of patterns */ diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index b99bb5fb38f8fc..03ed19143e0c56 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -2,20 +2,30 @@ "author": "Isaac Z. Schlueter (https://blog.izs.me/)", "name": "glob", "description": "the most correct and second fastest glob implementation in JavaScript", - "version": "13.0.1", + "version": "13.0.6", "type": "module", "tshy": { - "main": true, "exports": { "./package.json": "./package.json", - ".": "./src/index.ts" + "./raw": "./src/index.ts", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + } } }, - "main": "./dist/commonjs/index.js", + "main": "./dist/commonjs/index.min.js", + "module": "./dist/esm/index.min.js", "types": "./dist/commonjs/index.d.ts", "exports": { "./package.json": "./package.json", - ".": { + "./raw": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" @@ -24,6 +34,16 @@ "types": "./dist/commonjs/index.d.ts", "default": "./dist/commonjs/index.js" } + }, + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } } }, "repository": { @@ -37,7 +57,7 @@ "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "npm run benchclean; git push origin --follow-tags", - "prepare": "tshy", + "prepare": "tshy && bash scripts/build.sh", "pretest": "npm run prepare", "presnap": "npm run prepare", "test": "tap", @@ -53,29 +73,26 @@ "benchclean": "node benchclean.cjs" }, "dependencies": { - "minimatch": "^10.1.2", - "minipass": "^7.1.2", - "path-scurry": "^2.0.0" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, "devDependencies": { - "@types/node": "^24.10.0", + "@types/node": "^25.3.0", + "esbuild": "^0.27.3", "memfs": "^4.50.0", "mkdirp": "^3.0.1", "prettier": "^3.6.2", - "rimraf": "^6.1.0", - "tap": "^21.1.3", - "tshy": "^3.0.3", - "typedoc": "^0.28.14" - }, - "tap": { - "before": "test/00-setup.ts" + "rimraf": "^6.1.3", + "tap": "^21.6.1", + "tshy": "^3.3.2", + "typedoc": "^0.28.17" }, "license": "BlueOak-1.0.0", "funding": { "url": "https://github.com/sponsors/isaacs" }, "engines": { - "node": "20 || >=22" - }, - "module": "./dist/esm/index.js" + "node": "18 || 20 || >=22" + } } diff --git a/deps/npm/node_modules/init-package-json/lib/default-input.js b/deps/npm/node_modules/init-package-json/lib/default-input.js index d72feee7f44d3b..7b9c8f440e0dee 100644 --- a/deps/npm/node_modules/init-package-json/lib/default-input.js +++ b/deps/npm/node_modules/init-package-json/lib/default-input.js @@ -2,7 +2,7 @@ const fs = require('fs/promises') const path = require('path') -const validateLicense = require('validate-npm-package-license') +const validateLicense = require('@npmcli/package-json/lib/license') const validateName = require('validate-npm-package-name') const npa = require('npm-package-arg') const semver = require('semver') @@ -264,12 +264,10 @@ if (!package.author) { const license = package.license || getConfig('license') || 'ISC' exports.license = yes ? license : prompt('license', license, (data) => { - const its = validateLicense(data) - if (its.validForNewPackages) { + if (validateLicense(data)) { return data } - const errors = (its.errors || []).concat(its.warnings || []) - return invalid(`Sorry, ${errors.join(' and ')}.`) + return invalid('Sorry, license should be a valid SPDX license expression') }) const type = package.type || getConfig('type') || 'commonjs' diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json index f41bb69f756ff2..a6c8213cf53790 100644 --- a/deps/npm/node_modules/init-package-json/package.json +++ b/deps/npm/node_modules/init-package-json/package.json @@ -1,6 +1,6 @@ { "name": "init-package-json", - "version": "8.2.4", + "version": "8.2.5", "main": "lib/init-package-json.js", "scripts": { "test": "tap", @@ -25,13 +25,12 @@ "promzard": "^3.0.1", "read": "^5.0.1", "semver": "^7.7.2", - "validate-npm-package-license": "^3.0.4", "validate-npm-package-name": "^7.0.0" }, "devDependencies": { "@npmcli/config": "^10.0.0", "@npmcli/eslint-config": "^6.0.1", - "@npmcli/template-oss": "4.23.4", + "@npmcli/template-oss": "4.29.0", "tap": "^16.0.1" }, "engines": { @@ -61,7 +60,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.4", + "version": "4.29.0", "publish": true } } diff --git a/deps/npm/node_modules/ip-regex/index.js b/deps/npm/node_modules/ip-regex/index.js deleted file mode 100644 index 1fe723cb7f5a9f..00000000000000 --- a/deps/npm/node_modules/ip-regex/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const word = '[a-fA-F\\d:]'; - -const boundry = options => options && options.includeBoundaries - ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` - : ''; - -const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}'; - -const v6segment = '[a-fA-F\\d]{1,4}'; - -const v6 = ` -(?: -(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 -(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 -(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 -(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 -(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 -(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 -(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 -(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 -)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 -`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); - -// Pre-compile only the exact regexes because adding a global flag make regexes stateful -const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`); -const v4exact = new RegExp(`^${v4}$`); -const v6exact = new RegExp(`^${v6}$`); - -const ipRegex = options => options && options.exact - ? v46Exact - : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g'); - -ipRegex.v4 = options => options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'); -ipRegex.v6 = options => options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'); - -export default ipRegex; diff --git a/deps/npm/node_modules/ip-regex/license b/deps/npm/node_modules/ip-regex/license deleted file mode 100644 index fa7ceba3eb4a96..00000000000000 --- a/deps/npm/node_modules/ip-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/ip-regex/package.json b/deps/npm/node_modules/ip-regex/package.json deleted file mode 100644 index 1f82fd5947262b..00000000000000 --- a/deps/npm/node_modules/ip-regex/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "ip-regex", - "version": "5.0.0", - "description": "Regular expression for matching IP addresses (IPv4 & IPv6)", - "license": "MIT", - "repository": "sindresorhus/ip-regex", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ip", - "ipv6", - "ipv4", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "text", - "pattern", - "internet", - "protocol", - "address", - "validate" - ], - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.19.1", - "xo": "^0.47.0" - } -} diff --git a/deps/npm/node_modules/is-cidr/package.json b/deps/npm/node_modules/is-cidr/package.json index 413a6ddf4b70a3..ac27bc877aecb5 100644 --- a/deps/npm/node_modules/is-cidr/package.json +++ b/deps/npm/node_modules/is-cidr/package.json @@ -1,6 +1,6 @@ { "name": "is-cidr", - "version": "6.0.2", + "version": "6.0.3", "description": "Check if a string is an IP address in CIDR notation", "author": "silverwind ", "contributors": [ @@ -25,7 +25,8 @@ "devDependencies": { "@types/node": "25.0.10", "eslint": "9.39.2", - "eslint-config-silverwind": "118.0.0", + "eslint-config-silverwind": "120.1.2", + "jest-extended": "7.0.0", "typescript": "5.9.3", "typescript-config-silverwind": "14.0.0", "updates": "17.0.8", @@ -35,4 +36,4 @@ "vitest": "4.0.18", "vitest-config-silverwind": "10.6.1" } -} +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/is-fullwidth-code-point/index.js deleted file mode 100644 index 671f97f7607790..00000000000000 --- a/deps/npm/node_modules/is-fullwidth-code-point/index.js +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable yoda */ -'use strict'; - -const isFullwidthCodePoint = codePoint => { - if (Number.isNaN(codePoint)) { - return false; - } - - // Code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - if ( - codePoint >= 0x1100 && ( - codePoint <= 0x115F || // Hangul Jamo - codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET - codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - (0x3250 <= codePoint && codePoint <= 0x4DBF) || - // CJK Unified Ideographs .. Yi Radicals - (0x4E00 <= codePoint && codePoint <= 0xA4C6) || - // Hangul Jamo Extended-A - (0xA960 <= codePoint && codePoint <= 0xA97C) || - // Hangul Syllables - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - // CJK Compatibility Ideographs - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - // Vertical Forms - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - // CJK Compatibility Forms .. Small Form Variants - (0xFE30 <= codePoint && codePoint <= 0xFE6B) || - // Halfwidth and Fullwidth Forms - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || - // Kana Supplement - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - // Enclosed Ideographic Supplement - (0x1F200 <= codePoint && codePoint <= 0x1F251) || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - (0x20000 <= codePoint && codePoint <= 0x3FFFD) - ) - ) { - return true; - } - - return false; -}; - -module.exports = isFullwidthCodePoint; -module.exports.default = isFullwidthCodePoint; diff --git a/deps/npm/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/is-fullwidth-code-point/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/is-fullwidth-code-point/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/is-fullwidth-code-point/package.json deleted file mode 100644 index 2137e888fa503d..00000000000000 --- a/deps/npm/node_modules/is-fullwidth-code-point/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "is-fullwidth-code-point", - "version": "3.0.0", - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "license": "MIT", - "repository": "sindresorhus/is-fullwidth-code-point", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "fullwidth", - "full-width", - "full", - "width", - "unicode", - "character", - "string", - "codepoint", - "code", - "point", - "is", - "detect", - "check" - ], - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} diff --git a/deps/npm/node_modules/isexe/LICENSE.md b/deps/npm/node_modules/isexe/LICENSE.md new file mode 100644 index 00000000000000..c5402b9577a8cd --- /dev/null +++ b/deps/npm/node_modules/isexe/LICENSE.md @@ -0,0 +1,55 @@ +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** diff --git a/deps/npm/node_modules/isexe/dist/cjs/index.js b/deps/npm/node_modules/isexe/dist/commonjs/index.js similarity index 70% rename from deps/npm/node_modules/isexe/dist/cjs/index.js rename to deps/npm/node_modules/isexe/dist/commonjs/index.js index cefcb66b5c5434..71882e7b4d518e 100644 --- a/deps/npm/node_modules/isexe/dist/cjs/index.js +++ b/deps/npm/node_modules/isexe/dist/commonjs/index.js @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; diff --git a/deps/npm/node_modules/isexe/dist/commonjs/index.min.js b/deps/npm/node_modules/isexe/dist/commonjs/index.min.js new file mode 100644 index 00000000000000..7cb0271bca0962 --- /dev/null +++ b/deps/npm/node_modules/isexe/dist/commonjs/index.min.js @@ -0,0 +1,2 @@ +"use strict";var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _=a(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.sync=i.isexe=void 0;var M=require("node:fs"),x=require("node:fs/promises"),q=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d(await(0,x.stat)(t),e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};i.isexe=q;var m=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return d((0,M.statSync)(t),e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};i.sync=m;var d=(t,e)=>t.isFile()&&A(t,e),A=(t,e)=>{let r=e.uid??process.getuid?.(),s=e.groups??process.getgroups?.()??[],n=e.gid??process.getgid?.()??s[0];if(r===void 0||n===void 0)throw new Error("cannot get uid or gid");let u=new Set([n,...s]),c=t.mode,S=t.uid,P=t.gid,f=parseInt("100",8),l=parseInt("010",8),j=parseInt("001",8),C=f|l;return!!(c&j||c&l&&u.has(P)||c&f&&S===r||c&C&&r===0)}});var g=a(o=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.sync=o.isexe=void 0;var T=require("node:fs"),I=require("node:fs/promises"),D=require("node:path"),F=async(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y(await(0,I.stat)(t),t,e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};o.isexe=F;var L=(t,e={})=>{let{ignoreErrors:r=!1}=e;try{return y((0,T.statSync)(t),t,e)}catch(s){let n=s;if(r||n.code==="EACCES")return!1;throw n}};o.sync=L;var B=(t,e)=>{let{pathExt:r=process.env.PATHEXT||""}=e,s=r.split(D.delimiter);if(s.indexOf("")!==-1)return!0;for(let n of s){let u=n.toLowerCase(),c=t.substring(t.length-u.length).toLowerCase();if(u&&c===u)return!0}return!1},y=(t,e,r)=>t.isFile()&&B(e,r)});var p=a(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0})});var v=exports&&exports.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),G=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),w=exports&&exports.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(s[s.length]=n);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),n=0;n { const { ignoreErrors = false } = options; try { - return checkStat((0, fs_1.statSync)(path), options); + return checkStat((0, node_fs_1.statSync)(path), options); } catch (e) { const er = e; diff --git a/deps/npm/node_modules/isexe/dist/cjs/win32.js b/deps/npm/node_modules/isexe/dist/commonjs/win32.js similarity index 83% rename from deps/npm/node_modules/isexe/dist/cjs/win32.js rename to deps/npm/node_modules/isexe/dist/commonjs/win32.js index fa7a4d2f7d240d..c1524a1d533481 100644 --- a/deps/npm/node_modules/isexe/dist/cjs/win32.js +++ b/deps/npm/node_modules/isexe/dist/commonjs/win32.js @@ -7,8 +7,9 @@ */ Object.defineProperty(exports, "__esModule", { value: true }); exports.sync = exports.isexe = void 0; -const fs_1 = require("fs"); -const promises_1 = require("fs/promises"); +const node_fs_1 = require("node:fs"); +const promises_1 = require("node:fs/promises"); +const node_path_1 = require("node:path"); /** * Determine whether a path is executable based on the file extension * and PATHEXT environment variable (or specified pathExt option) @@ -33,7 +34,7 @@ exports.isexe = isexe; const sync = (path, options = {}) => { const { ignoreErrors = false } = options; try { - return checkStat((0, fs_1.statSync)(path), path, options); + return checkStat((0, node_fs_1.statSync)(path), path, options); } catch (e) { const er = e; @@ -45,12 +46,12 @@ const sync = (path, options = {}) => { exports.sync = sync; const checkPathExt = (path, options) => { const { pathExt = process.env.PATHEXT || '' } = options; - const peSplit = pathExt.split(';'); + const peSplit = pathExt.split(node_path_1.delimiter); if (peSplit.indexOf('') !== -1) { return true; } - for (let i = 0; i < peSplit.length; i++) { - const p = peSplit[i].toLowerCase(); + for (const pes of peSplit) { + const p = pes.toLowerCase(); const ext = path.substring(path.length - p.length).toLowerCase(); if (p && ext === p) { return true; diff --git a/deps/npm/node_modules/isexe/dist/mjs/index.js b/deps/npm/node_modules/isexe/dist/esm/index.js similarity index 100% rename from deps/npm/node_modules/isexe/dist/mjs/index.js rename to deps/npm/node_modules/isexe/dist/esm/index.js diff --git a/deps/npm/node_modules/isexe/dist/esm/index.min.js b/deps/npm/node_modules/isexe/dist/esm/index.min.js new file mode 100644 index 00000000000000..f3a6fc37d6c669 --- /dev/null +++ b/deps/npm/node_modules/isexe/dist/esm/index.min.js @@ -0,0 +1,2 @@ +var y=Object.defineProperty;var u=(t,r)=>{for(var e in r)y(t,e,{get:r[e],enumerable:!0})};var i={};u(i,{isexe:()=>C,sync:()=>A});import{statSync as w}from"node:fs";import{stat as S}from"node:fs/promises";var C=async(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return d(await S(t),r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},A=(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return d(w(t),r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},d=(t,r)=>t.isFile()&&T(t,r),T=(t,r)=>{let e=r.uid??process.getuid?.(),s=r.groups??process.getgroups?.()??[],o=r.gid??process.getgid?.()??s[0];if(e===void 0||o===void 0)throw new Error("cannot get uid or gid");let c=new Set([o,...s]),n=t.mode,l=t.uid,E=t.gid,f=parseInt("100",8),p=parseInt("010",8),x=parseInt("001",8),h=f|p;return!!(n&x||n&p&&c.has(E)||n&f&&l===e||n&h&&e===0)};var a={};u(a,{isexe:()=>F,sync:()=>L});import{statSync as k}from"node:fs";import{stat as I}from"node:fs/promises";import{delimiter as _}from"node:path";var F=async(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return m(await I(t),t,r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},L=(t,r={})=>{let{ignoreErrors:e=!1}=r;try{return m(k(t),t,r)}catch(s){let o=s;if(e||o.code==="EACCES")return!1;throw o}},P=(t,r)=>{let{pathExt:e=process.env.PATHEXT||""}=r,s=e.split(_);if(s.indexOf("")!==-1)return!0;for(let o of s){let c=o.toLowerCase(),n=t.substring(t.length-c.length).toLowerCase();if(c&&n===c)return!0}return!1},m=(t,r,e)=>t.isFile()&&P(r,e);var v=process.env._ISEXE_TEST_PLATFORM_||process.platform,g=v==="win32"?a:i,R=g.isexe,U=g.sync;export{R as isexe,i as posix,U as sync,a as win32}; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/isexe/dist/mjs/options.js b/deps/npm/node_modules/isexe/dist/esm/options.js similarity index 100% rename from deps/npm/node_modules/isexe/dist/mjs/options.js rename to deps/npm/node_modules/isexe/dist/esm/options.js diff --git a/deps/npm/node_modules/isexe/dist/mjs/package.json b/deps/npm/node_modules/isexe/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/isexe/dist/mjs/package.json rename to deps/npm/node_modules/isexe/dist/esm/package.json diff --git a/deps/npm/node_modules/isexe/dist/mjs/posix.js b/deps/npm/node_modules/isexe/dist/esm/posix.js similarity index 95% rename from deps/npm/node_modules/isexe/dist/mjs/posix.js rename to deps/npm/node_modules/isexe/dist/esm/posix.js index c453776c0452f7..f1af6d51a402da 100644 --- a/deps/npm/node_modules/isexe/dist/mjs/posix.js +++ b/deps/npm/node_modules/isexe/dist/esm/posix.js @@ -4,8 +4,8 @@ * * @module */ -import { statSync } from 'fs'; -import { stat } from 'fs/promises'; +import { statSync } from 'node:fs'; +import { stat } from 'node:fs/promises'; /** * Determine whether a path is executable according to the mode and * current (or specified) user and group IDs. diff --git a/deps/npm/node_modules/isexe/dist/mjs/win32.js b/deps/npm/node_modules/isexe/dist/esm/win32.js similarity index 86% rename from deps/npm/node_modules/isexe/dist/mjs/win32.js rename to deps/npm/node_modules/isexe/dist/esm/win32.js index a354ee2a5115c7..2c75e67cdfaa2f 100644 --- a/deps/npm/node_modules/isexe/dist/mjs/win32.js +++ b/deps/npm/node_modules/isexe/dist/esm/win32.js @@ -4,8 +4,9 @@ * * @module */ -import { statSync } from 'fs'; -import { stat } from 'fs/promises'; +import { statSync } from 'node:fs'; +import { stat } from 'node:fs/promises'; +import { delimiter } from 'node:path'; /** * Determine whether a path is executable based on the file extension * and PATHEXT environment variable (or specified pathExt option) @@ -40,12 +41,12 @@ export const sync = (path, options = {}) => { }; const checkPathExt = (path, options) => { const { pathExt = process.env.PATHEXT || '' } = options; - const peSplit = pathExt.split(';'); + const peSplit = pathExt.split(delimiter); if (peSplit.indexOf('') !== -1) { return true; } - for (let i = 0; i < peSplit.length; i++) { - const p = peSplit[i].toLowerCase(); + for (const pes of peSplit) { + const p = pes.toLowerCase(); const ext = path.substring(path.length - p.length).toLowerCase(); if (p && ext === p) { return true; diff --git a/deps/npm/node_modules/isexe/package.json b/deps/npm/node_modules/isexe/package.json index a0e2cd04bfdbfe..31c05fa303078e 100644 --- a/deps/npm/node_modules/isexe/package.json +++ b/deps/npm/node_modules/isexe/package.json @@ -1,96 +1,78 @@ { "name": "isexe", - "version": "3.1.1", + "version": "4.0.0", "description": "Minimal module to check if a file is executable.", - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "types": "./dist/cjs/index.js", + "main": "./dist/commonjs/index.min.js", + "module": "./dist/esm/index.min.js", + "types": "./dist/commonjs/index.d.ts", "files": [ "dist" ], - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" + "tshy": { + "selfLink": false, + "exports": { + "./raw": "./src/index.ts", + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } } - }, - "./posix": { + } + }, + "exports": { + "./raw": { "import": { - "types": "./dist/mjs/posix.d.ts", - "default": "./dist/mjs/posix.js" + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" }, "require": { - "types": "./dist/cjs/posix.d.ts", - "default": "./dist/cjs/posix.js" + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" } }, - "./win32": { + "./package.json": "./package.json", + ".": { "import": { - "types": "./dist/mjs/win32.d.ts", - "default": "./dist/mjs/win32.js" + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" }, "require": { - "types": "./dist/cjs/win32.d.ts", - "default": "./dist/cjs/win32.js" + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" } - }, - "./package.json": "./package.json" + } }, "devDependencies": { - "@types/node": "^20.4.5", - "@types/tap": "^15.0.8", - "c8": "^8.0.1", - "mkdirp": "^0.5.1", - "prettier": "^2.8.8", - "rimraf": "^2.5.0", - "sync-content": "^1.0.2", - "tap": "^16.3.8", - "ts-node": "^10.9.1", - "typedoc": "^0.24.8", - "typescript": "^5.1.6" + "@types/node": "^25.2.1", + "esbuild": "^0.27.3", + "prettier": "^3.8.1", + "tap": "^21.5.1", + "tshy": "^3.1.3", + "typedoc": "^0.28.16" }, "scripts": { "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", - "prepare": "tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh", + "prepare": "tshy && bash build.sh", "pretest": "npm run prepare", "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", - "typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts" + "test": "tap", + "snap": "tap", + "format": "prettier --write .", + "typedoc": "typedoc" }, "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "tap": { - "coverage": false, - "node-arg": [ - "--enable-source-maps", - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, + "license": "BlueOak-1.0.0", "repository": "https://github.com/isaacs/isexe", "engines": { - "node": ">=16" - } + "node": ">=20" + }, + "type": "module" } diff --git a/deps/npm/node_modules/libnpmaccess/package.json b/deps/npm/node_modules/libnpmaccess/package.json index b9ef72d8384606..6b250a69ede19d 100644 --- a/deps/npm/node_modules/libnpmaccess/package.json +++ b/deps/npm/node_modules/libnpmaccess/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "repository": { @@ -41,7 +41,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmdiff/package.json b/deps/npm/node_modules/libnpmdiff/package.json index 08437c6b874a66..f36856d41fccae 100644 --- a/deps/npm/node_modules/libnpmdiff/package.json +++ b/deps/npm/node_modules/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "8.1.0", + "version": "8.1.2", "description": "The registry diff", "repository": { "type": "git", @@ -43,11 +43,11 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.2.0", + "@npmcli/arborist": "^9.3.1", "@npmcli/installed-package-contents": "^4.0.0", "binary-extensions": "^3.0.0", "diff": "^8.0.2", @@ -58,7 +58,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json index f868e129482fcf..08c47ec67cc269 100644 --- a/deps/npm/node_modules/libnpmexec/package.json +++ b/deps/npm/node_modules/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "10.2.0", + "version": "10.2.2", "files": [ "bin/", "lib/" @@ -52,7 +52,7 @@ "devDependencies": { "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "bin-links": "^6.0.0", "chalk": "^5.2.0", "just-extend": "^6.2.0", @@ -60,7 +60,7 @@ "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.2.0", + "@npmcli/arborist": "^9.3.1", "@npmcli/package-json": "^7.0.0", "@npmcli/run-script": "^10.0.0", "ci-info": "^4.0.0", @@ -75,7 +75,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json index a5c3305fb7cc6c..1a66e330c2eaef 100644 --- a/deps/npm/node_modules/libnpmfund/package.json +++ b/deps/npm/node_modules/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "7.0.14", + "version": "7.0.16", "main": "lib/index.js", "files": [ "bin/", @@ -42,18 +42,18 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "dependencies": { - "@npmcli/arborist": "^9.2.0" + "@npmcli/arborist": "^9.3.1" }, "engines": { "node": "^20.17.0 || >=22.9.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmorg/package.json b/deps/npm/node_modules/libnpmorg/package.json index 9a20ccaf4196fe..0df17f3c1a1322 100644 --- a/deps/npm/node_modules/libnpmorg/package.json +++ b/deps/npm/node_modules/libnpmorg/package.json @@ -29,7 +29,7 @@ ], "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "minipass": "^7.1.1", "nock": "^13.3.3", "tap": "^16.3.8" @@ -50,7 +50,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpack/package.json b/deps/npm/node_modules/libnpmpack/package.json index efd125aed5db8e..d0f257cea2b6f1 100644 --- a/deps/npm/node_modules/libnpmpack/package.json +++ b/deps/npm/node_modules/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "9.1.0", + "version": "9.1.2", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -24,7 +24,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "nock": "^13.3.3", "spawk": "^1.7.1", "tap": "^16.3.8" @@ -37,7 +37,7 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^9.2.0", + "@npmcli/arborist": "^9.3.1", "@npmcli/run-script": "^10.0.0", "npm-package-arg": "^13.0.0", "pacote": "^21.0.2" @@ -47,7 +47,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json index 65a4ae3c11d0ce..f90a6bf4506ecd 100644 --- a/deps/npm/node_modules/libnpmpublish/package.json +++ b/deps/npm/node_modules/libnpmpublish/package.json @@ -27,7 +27,7 @@ "@npmcli/eslint-config": "^5.0.1", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "tap": "^16.3.8" }, "repository": { @@ -52,7 +52,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmsearch/package.json b/deps/npm/node_modules/libnpmsearch/package.json index 375025e70e29b2..e17ac5ab98f682 100644 --- a/deps/npm/node_modules/libnpmsearch/package.json +++ b/deps/npm/node_modules/libnpmsearch/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "nock": "^13.3.3", "tap": "^16.3.8" }, @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmteam/package.json b/deps/npm/node_modules/libnpmteam/package.json index 6f1f0661b3857d..0531259b3e766b 100644 --- a/deps/npm/node_modules/libnpmteam/package.json +++ b/deps/npm/node_modules/libnpmteam/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "nock": "^13.3.3", "tap": "^16.3.8" }, @@ -40,7 +40,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmversion/package.json b/deps/npm/node_modules/libnpmversion/package.json index e80966b6aeeb8c..cac11cc36bd385 100644 --- a/deps/npm/node_modules/libnpmversion/package.json +++ b/deps/npm/node_modules/libnpmversion/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^5.0.1", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "require-inject": "^1.4.4", "tap": "^16.3.8" }, @@ -49,7 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index 5b271f0dda7aee..1554184f053da4 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "11.2.5", + "version": "11.2.6", "author": "Isaac Z. Schlueter ", "keywords": [ "mru", @@ -27,12 +27,12 @@ "preprofile": "npm run prepare", "profile": "make -C benchmark profile" }, - "main": "./dist/commonjs/index.js", + "main": "./dist/commonjs/index.min.js", "types": "./dist/commonjs/index.d.ts", "tshy": { "exports": { - ".": "./src/index.ts", - "./min": { + "./raw": "./src/index.ts", + ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.min.js" @@ -75,7 +75,7 @@ ] }, "exports": { - ".": { + "./raw": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" @@ -85,7 +85,7 @@ "default": "./dist/commonjs/index.js" } }, - "./min": { + ".": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.min.js" @@ -97,5 +97,5 @@ } }, "type": "module", - "module": "./dist/esm/index.js" + "module": "./dist/esm/index.min.js" } diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/ast.js b/deps/npm/node_modules/minimatch/dist/commonjs/ast.js index 997343fbd1eab1..909b2daa0517dc 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/ast.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/ast.js @@ -122,7 +122,8 @@ class AST { if (p === '') continue; /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + if (typeof p !== 'string' && + !(p instanceof AST && p.#parent === this)) { throw new Error('invalid part: ' + p); } /* c8 ignore stop */ @@ -130,8 +131,10 @@ class AST { } } toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + const ret = this.type === null ? + this.#parts + .slice() + .map(p => (typeof p === 'string' ? p : p.toJSON())) : [this.type, ...this.#parts.map(p => p.toJSON())]; if (this.isStart() && !this.type) ret.unshift([]); @@ -420,8 +423,8 @@ class AST { !this.#parts.some(s => typeof s !== 'string'); const src = this.#parts .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + const [re, _, hasMagic, uflag] = typeof p === 'string' ? + AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); this.#hasMagic = this.#hasMagic || hasMagic; this.#uflag = this.#uflag || uflag; @@ -450,7 +453,10 @@ class AST { // no need to prevent dots if it can't match a dot, or if a // sub-pattern will be preventing it anyway. const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + start = + needNoTrav ? startNoTraversal + : needNoDot ? startNoDot + : ''; } } } @@ -486,8 +492,8 @@ class AST { return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; } // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? + '' : this.#partsToRegExp(true); if (bodyDotAllowed === body) { bodyDotAllowed = ''; @@ -501,20 +507,16 @@ class AST { final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; } else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` + const close = this.type === '!' ? + // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' ? ')' + : this.type === '?' ? ')?' + : this.type === '+' && bodyDotAllowed ? ')' + : this.type === '*' && bodyDotAllowed ? `)?` : `)${this.type}`; final = start + body + close; } @@ -546,6 +548,8 @@ class AST { let escaping = false; let re = ''; let uflag = false; + // multiple stars that aren't globstars coalesce into one * + let inStar = false; for (let i = 0; i < glob.length; i++) { const c = glob.charAt(i); if (escaping) { @@ -553,6 +557,17 @@ class AST { re += (reSpecials.has(c) ? '\\' : '') + c; continue; } + if (c === '*') { + if (inStar) + continue; + inStar = true; + re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star; + hasMagic = true; + continue; + } + else { + inStar = false; + } if (c === '\\') { if (i === glob.length - 1) { re += '\\\\'; @@ -572,11 +587,6 @@ class AST { continue; } } - if (c === '*') { - re += noEmpty && glob === '*' ? starNoEmpty : star; - hasMagic = true; - continue; - } if (c === '?') { re += qmark; hasMagic = true; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js b/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js index 0e13eefc4cfee2..2b7b03712b874e 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/brace-expressions.js @@ -141,10 +141,8 @@ const parseClass = (glob, position) => { } const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges + const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')' + : ranges.length ? sranges : snegs; return [comb, uflag, endPos - pos, true]; }; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/escape.js b/deps/npm/node_modules/minimatch/dist/commonjs/escape.js index 6fb634fb41033c..83a713a2550770 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/escape.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/escape.js @@ -18,12 +18,12 @@ const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {} // that make those magic, and escaping ! as [!] isn't valid, // because [!]] is a valid glob class meaning not ']'. if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/[?*()[\]{}]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]{}]/g, '[$&]') : s.replace(/[?*()[\]\\{}]/g, '\\$&'); } - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]]/g, '[$&]') : s.replace(/[?*()[\]\\]/g, '\\$&'); }; exports.escape = escape; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/index.js b/deps/npm/node_modules/minimatch/dist/commonjs/index.js index 966dc9b8bb2165..5a0ba2a87fb036 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/index.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/index.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; -const brace_expansion_1 = require("@isaacs/brace-expansion"); +const brace_expansion_1 = require("brace-expansion"); const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); const ast_js_1 = require("./ast.js"); const escape_js_1 = require("./escape.js"); @@ -67,8 +67,8 @@ const qmarksTestNoExtDot = ([$0]) => { return (f) => f.length === len && f !== '.' && f !== '..'; }; /* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && +const defaultPlatform = (typeof process === 'object' && process ? + (typeof process.env === 'object' && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__) || process.platform @@ -154,7 +154,7 @@ const braceExpand = (pattern, options = {}) => { // shortcut. no need to expand. return [pattern]; } - return (0, brace_expansion_1.expand)(pattern); + return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax }); }; exports.braceExpand = braceExpand; exports.minimatch.braceExpand = exports.braceExpand; @@ -210,8 +210,10 @@ class Minimatch { this.pattern = pattern; this.platform = options.platform || defaultPlatform; this.isWindows = this.platform === 'win32'; + // avoid the annoying deprecation flag lol + const awe = ('allowWindow' + 'sEscape'); this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + !!options.windowsPathsNoEscape || options[awe] === false; if (this.windowsPathsNoEscape) { this.pattern = this.pattern.replace(/\\/g, '/'); } @@ -224,8 +226,8 @@ class Minimatch { this.partial = !!options.partial; this.nocase = !!this.options.nocase; this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot + options.windowsNoMagicRoot !== undefined ? + options.windowsNoMagicRoot : !!(this.isWindows && this.nocase); this.globSet = []; this.globParts = []; @@ -288,7 +290,10 @@ class Minimatch { !globMagic.test(s[3]); const isDrive = /^[a-z]:/i.test(s[0]); if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + return [ + ...s.slice(0, 4), + ...s.slice(4).map(ss => this.parse(ss)), + ]; } else if (isDrive) { return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; @@ -320,7 +325,7 @@ class Minimatch { // to the right as possible, even if it increases the number // of patterns that we have to process. preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * + // if we're not in globstar mode, then turn ** into * if (this.options.noglobstar) { for (let i = 0; i < globParts.length; i++) { for (let j = 0; j < globParts[i].length; j++) { @@ -624,10 +629,17 @@ class Minimatch { pattern[2] === '?' && typeof pattern[3] === 'string' && /^[a-z]:$/i.test(pattern[3]); - const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; - const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; + const fdi = fileUNC ? 3 + : fileDrive ? 0 + : undefined; + const pdi = patternUNC ? 3 + : patternDrive ? 0 + : undefined; if (typeof fdi === 'number' && typeof pdi === 'number') { - const [fd, pd] = [file[fdi], pattern[pdi]]; + const [fd, pd] = [ + file[fdi], + pattern[pdi], + ]; if (fd.toLowerCase() === pd.toLowerCase()) { pattern[pdi] = fd; if (pdi > fdi) { @@ -808,21 +820,19 @@ class Minimatch { fastTest = options.dot ? starTestDot : starTest; } else if ((m = pattern.match(starDotExtRE))) { - fastTest = (options.nocase - ? options.dot - ? starDotExtTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + starDotExtTestNocaseDot : starDotExtTestNocase - : options.dot - ? starDotExtTestDot + : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]); } else if ((m = pattern.match(qmarksRE))) { - fastTest = (options.nocase - ? options.dot - ? qmarksTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + qmarksTestNocaseDot : qmarksTestNocase - : options.dot - ? qmarksTestDot + : options.dot ? qmarksTestDot : qmarksTest)(m); } else if ((m = pattern.match(starDotStarRE))) { @@ -853,10 +863,8 @@ class Minimatch { return this.regexp; } const options = this.options; - const twoStar = options.noglobstar - ? star - : options.dot - ? twoStarDot + const twoStar = options.noglobstar ? star + : options.dot ? twoStarDot : twoStarNoDot; const flags = new Set(options.nocase ? ['i'] : []); // regexpify non-globstar patterns @@ -872,11 +880,9 @@ class Minimatch { for (const f of p.flags.split('')) flags.add(f); } - return typeof p === 'string' - ? regExpEscape(p) - : p === exports.GLOBSTAR - ? exports.GLOBSTAR - : p._src; + return (typeof p === 'string' ? regExpEscape(p) + : p === exports.GLOBSTAR ? exports.GLOBSTAR + : p._src); }); pp.forEach((p, i) => { const next = pp[i + 1]; diff --git a/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js b/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js index 171098d8a4ceb5..db8d0c847d21b1 100644 --- a/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js +++ b/deps/npm/node_modules/minimatch/dist/commonjs/unescape.js @@ -22,14 +22,14 @@ exports.unescape = void 0; */ const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => { if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2') .replace(/\\([^\/])/g, '$1'); } - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\{}])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\{}])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2') .replace(/\\([^\/{}])/g, '$1'); diff --git a/deps/npm/node_modules/minimatch/dist/esm/ast.js b/deps/npm/node_modules/minimatch/dist/esm/ast.js index 0ae609ad10d519..bcc9d72b0f9cc0 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/ast.js +++ b/deps/npm/node_modules/minimatch/dist/esm/ast.js @@ -119,7 +119,8 @@ export class AST { if (p === '') continue; /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + if (typeof p !== 'string' && + !(p instanceof AST && p.#parent === this)) { throw new Error('invalid part: ' + p); } /* c8 ignore stop */ @@ -127,8 +128,10 @@ export class AST { } } toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + const ret = this.type === null ? + this.#parts + .slice() + .map(p => (typeof p === 'string' ? p : p.toJSON())) : [this.type, ...this.#parts.map(p => p.toJSON())]; if (this.isStart() && !this.type) ret.unshift([]); @@ -417,8 +420,8 @@ export class AST { !this.#parts.some(s => typeof s !== 'string'); const src = this.#parts .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + const [re, _, hasMagic, uflag] = typeof p === 'string' ? + AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); this.#hasMagic = this.#hasMagic || hasMagic; this.#uflag = this.#uflag || uflag; @@ -447,7 +450,10 @@ export class AST { // no need to prevent dots if it can't match a dot, or if a // sub-pattern will be preventing it anyway. const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + start = + needNoTrav ? startNoTraversal + : needNoDot ? startNoDot + : ''; } } } @@ -483,8 +489,8 @@ export class AST { return [s, unescape(this.toString()), false, false]; } // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? + '' : this.#partsToRegExp(true); if (bodyDotAllowed === body) { bodyDotAllowed = ''; @@ -498,20 +504,16 @@ export class AST { final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; } else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` + const close = this.type === '!' ? + // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' ? ')' + : this.type === '?' ? ')?' + : this.type === '+' && bodyDotAllowed ? ')' + : this.type === '*' && bodyDotAllowed ? `)?` : `)${this.type}`; final = start + body + close; } @@ -543,6 +545,8 @@ export class AST { let escaping = false; let re = ''; let uflag = false; + // multiple stars that aren't globstars coalesce into one * + let inStar = false; for (let i = 0; i < glob.length; i++) { const c = glob.charAt(i); if (escaping) { @@ -550,6 +554,17 @@ export class AST { re += (reSpecials.has(c) ? '\\' : '') + c; continue; } + if (c === '*') { + if (inStar) + continue; + inStar = true; + re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star; + hasMagic = true; + continue; + } + else { + inStar = false; + } if (c === '\\') { if (i === glob.length - 1) { re += '\\\\'; @@ -569,11 +584,6 @@ export class AST { continue; } } - if (c === '*') { - re += noEmpty && glob === '*' ? starNoEmpty : star; - hasMagic = true; - continue; - } if (c === '?') { re += qmark; hasMagic = true; diff --git a/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js b/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js index c629d6ae816e27..4b49d40bd74210 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js +++ b/deps/npm/node_modules/minimatch/dist/esm/brace-expressions.js @@ -138,10 +138,8 @@ export const parseClass = (glob, position) => { } const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges + const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')' + : ranges.length ? sranges : snegs; return [comb, uflag, endPos - pos, true]; }; diff --git a/deps/npm/node_modules/minimatch/dist/esm/escape.js b/deps/npm/node_modules/minimatch/dist/esm/escape.js index bab968ff3d83c9..46d0ec8858e5b3 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/escape.js +++ b/deps/npm/node_modules/minimatch/dist/esm/escape.js @@ -15,12 +15,12 @@ export const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, // that make those magic, and escaping ! as [!] isn't valid, // because [!]] is a valid glob class meaning not ']'. if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/[?*()[\]{}]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]{}]/g, '[$&]') : s.replace(/[?*()[\]\\{}]/g, '\\$&'); } - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]]/g, '[$&]') : s.replace(/[?*()[\]\\]/g, '\\$&'); }; //# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/esm/index.js b/deps/npm/node_modules/minimatch/dist/esm/index.js index e83823fa6e1b55..3175327db5efbf 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/index.js +++ b/deps/npm/node_modules/minimatch/dist/esm/index.js @@ -1,4 +1,4 @@ -import { expand } from '@isaacs/brace-expansion'; +import { expand } from 'brace-expansion'; import { assertValidPattern } from './assert-valid-pattern.js'; import { AST } from './ast.js'; import { escape } from './escape.js'; @@ -63,8 +63,8 @@ const qmarksTestNoExtDot = ([$0]) => { return (f) => f.length === len && f !== '.' && f !== '..'; }; /* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && +const defaultPlatform = (typeof process === 'object' && process ? + (typeof process.env === 'object' && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__) || process.platform @@ -148,7 +148,7 @@ export const braceExpand = (pattern, options = {}) => { // shortcut. no need to expand. return [pattern]; } - return expand(pattern); + return expand(pattern, { max: options.braceExpandMax }); }; minimatch.braceExpand = braceExpand; // parse a component of the expanded set. @@ -201,8 +201,10 @@ export class Minimatch { this.pattern = pattern; this.platform = options.platform || defaultPlatform; this.isWindows = this.platform === 'win32'; + // avoid the annoying deprecation flag lol + const awe = ('allowWindow' + 'sEscape'); this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + !!options.windowsPathsNoEscape || options[awe] === false; if (this.windowsPathsNoEscape) { this.pattern = this.pattern.replace(/\\/g, '/'); } @@ -215,8 +217,8 @@ export class Minimatch { this.partial = !!options.partial; this.nocase = !!this.options.nocase; this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot + options.windowsNoMagicRoot !== undefined ? + options.windowsNoMagicRoot : !!(this.isWindows && this.nocase); this.globSet = []; this.globParts = []; @@ -279,7 +281,10 @@ export class Minimatch { !globMagic.test(s[3]); const isDrive = /^[a-z]:/i.test(s[0]); if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + return [ + ...s.slice(0, 4), + ...s.slice(4).map(ss => this.parse(ss)), + ]; } else if (isDrive) { return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; @@ -311,7 +316,7 @@ export class Minimatch { // to the right as possible, even if it increases the number // of patterns that we have to process. preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * + // if we're not in globstar mode, then turn ** into * if (this.options.noglobstar) { for (let i = 0; i < globParts.length; i++) { for (let j = 0; j < globParts[i].length; j++) { @@ -615,10 +620,17 @@ export class Minimatch { pattern[2] === '?' && typeof pattern[3] === 'string' && /^[a-z]:$/i.test(pattern[3]); - const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; - const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; + const fdi = fileUNC ? 3 + : fileDrive ? 0 + : undefined; + const pdi = patternUNC ? 3 + : patternDrive ? 0 + : undefined; if (typeof fdi === 'number' && typeof pdi === 'number') { - const [fd, pd] = [file[fdi], pattern[pdi]]; + const [fd, pd] = [ + file[fdi], + pattern[pdi], + ]; if (fd.toLowerCase() === pd.toLowerCase()) { pattern[pdi] = fd; if (pdi > fdi) { @@ -799,21 +811,19 @@ export class Minimatch { fastTest = options.dot ? starTestDot : starTest; } else if ((m = pattern.match(starDotExtRE))) { - fastTest = (options.nocase - ? options.dot - ? starDotExtTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + starDotExtTestNocaseDot : starDotExtTestNocase - : options.dot - ? starDotExtTestDot + : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]); } else if ((m = pattern.match(qmarksRE))) { - fastTest = (options.nocase - ? options.dot - ? qmarksTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + qmarksTestNocaseDot : qmarksTestNocase - : options.dot - ? qmarksTestDot + : options.dot ? qmarksTestDot : qmarksTest)(m); } else if ((m = pattern.match(starDotStarRE))) { @@ -844,10 +854,8 @@ export class Minimatch { return this.regexp; } const options = this.options; - const twoStar = options.noglobstar - ? star - : options.dot - ? twoStarDot + const twoStar = options.noglobstar ? star + : options.dot ? twoStarDot : twoStarNoDot; const flags = new Set(options.nocase ? ['i'] : []); // regexpify non-globstar patterns @@ -863,11 +871,9 @@ export class Minimatch { for (const f of p.flags.split('')) flags.add(f); } - return typeof p === 'string' - ? regExpEscape(p) - : p === GLOBSTAR - ? GLOBSTAR - : p._src; + return (typeof p === 'string' ? regExpEscape(p) + : p === GLOBSTAR ? GLOBSTAR + : p._src); }); pp.forEach((p, i) => { const next = pp[i + 1]; diff --git a/deps/npm/node_modules/minimatch/dist/esm/unescape.js b/deps/npm/node_modules/minimatch/dist/esm/unescape.js index dfa408d39853bc..b31bd40a028407 100644 --- a/deps/npm/node_modules/minimatch/dist/esm/unescape.js +++ b/deps/npm/node_modules/minimatch/dist/esm/unescape.js @@ -19,14 +19,14 @@ */ export const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => { if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2') .replace(/\\([^\/])/g, '$1'); } - return windowsPathsNoEscape - ? s.replace(/\[([^\/\\{}])\]/g, '$1') + return windowsPathsNoEscape ? + s.replace(/\[([^\/\\{}])\]/g, '$1') : s .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2') .replace(/\\([^\/{}])/g, '$1'); diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json index 74b945eb60d713..6d4fc25af97a05 100644 --- a/deps/npm/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/minimatch/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", - "version": "10.1.2", + "version": "10.2.2", "repository": { "type": "git", "url": "git@github.com:isaacs/minimatch" @@ -34,18 +34,18 @@ "presnap": "npm run prepare", "test": "tap", "snap": "tap", - "format": "prettier --write . --log-level warn", + "format": "prettier --write .", "benchmark": "node benchmark/index.js", "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "devDependencies": { - "@types/node": "^24.0.0", + "@types/node": "^25.3.0", "mkdirp": "^3.0.1", "prettier": "^3.6.2", - "tap": "^21.1.0", + "tap": "^21.6.1", "tshy": "^3.0.2", "typedoc": "^0.28.5" }, @@ -62,6 +62,6 @@ "type": "module", "module": "./dist/esm/index.js", "dependencies": { - "@isaacs/brace-expansion": "^5.0.1" + "brace-expansion": "^5.0.2" } } diff --git a/deps/npm/node_modules/yallist/LICENSE b/deps/npm/node_modules/minipass-flush/node_modules/yallist/LICENSE similarity index 100% rename from deps/npm/node_modules/yallist/LICENSE rename to deps/npm/node_modules/minipass-flush/node_modules/yallist/LICENSE diff --git a/deps/npm/node_modules/yallist/iterator.js b/deps/npm/node_modules/minipass-flush/node_modules/yallist/iterator.js similarity index 100% rename from deps/npm/node_modules/yallist/iterator.js rename to deps/npm/node_modules/minipass-flush/node_modules/yallist/iterator.js diff --git a/deps/npm/node_modules/minipass-flush/node_modules/yallist/package.json b/deps/npm/node_modules/minipass-flush/node_modules/yallist/package.json new file mode 100644 index 00000000000000..8a083867d72e00 --- /dev/null +++ b/deps/npm/node_modules/minipass-flush/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "4.0.0", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/deps/npm/node_modules/yallist/yallist.js b/deps/npm/node_modules/minipass-flush/node_modules/yallist/yallist.js similarity index 100% rename from deps/npm/node_modules/yallist/yallist.js rename to deps/npm/node_modules/minipass-flush/node_modules/yallist/yallist.js diff --git a/deps/npm/node_modules/minipass/LICENSE b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/LICENSE similarity index 90% rename from deps/npm/node_modules/minipass/LICENSE rename to deps/npm/node_modules/minipass-pipeline/node_modules/yallist/LICENSE index 97f8e32ed82e4c..19129e315fe593 100644 --- a/deps/npm/node_modules/minipass/LICENSE +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors +Copyright (c) Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/iterator.js b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/iterator.js new file mode 100644 index 00000000000000..d41c97a19f9849 --- /dev/null +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/package.json b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/package.json new file mode 100644 index 00000000000000..8a083867d72e00 --- /dev/null +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "4.0.0", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/yallist.js b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/yallist.js new file mode 100644 index 00000000000000..4e83ab1c542a51 --- /dev/null +++ b/deps/npm/node_modules/minipass-pipeline/node_modules/yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/deps/npm/node_modules/minipass/LICENSE.md b/deps/npm/node_modules/minipass/LICENSE.md new file mode 100644 index 00000000000000..c5402b9577a8cd --- /dev/null +++ b/deps/npm/node_modules/minipass/LICENSE.md @@ -0,0 +1,55 @@ +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** diff --git a/deps/npm/node_modules/minipass/dist/commonjs/index.js b/deps/npm/node_modules/minipass/dist/commonjs/index.js index 068c095b697932..91f3a5cfc7a0b9 100644 --- a/deps/npm/node_modules/minipass/dist/commonjs/index.js +++ b/deps/npm/node_modules/minipass/dist/commonjs/index.js @@ -22,7 +22,11 @@ const isStream = (s) => !!s && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports.isReadable)(s) || - (0, exports.isWritable)(s)); + (0, exports.isWritable)(s)) +/** + * Return true if the argument is a valid {@link Minipass.Readable} + */ +; exports.isStream = isStream; /** * Return true if the argument is a valid {@link Minipass.Readable} @@ -32,7 +36,11 @@ const isReadable = (s) => !!s && s instanceof node_events_1.EventEmitter && typeof s.pipe === 'function' && // node core Writable streams have a pipe() method, but it throws - s.pipe !== node_stream_1.default.Writable.prototype.pipe; + s.pipe !== node_stream_1.default.Writable.prototype.pipe +/** + * Return true if the argument is a valid {@link Minipass.Writable} + */ +; exports.isReadable = isReadable; /** * Return true if the argument is a valid {@link Minipass.Writable} @@ -129,7 +137,7 @@ class PipeProxyErrors extends Pipe { } constructor(src, dest, opts) { super(src, dest, opts); - this.proxyErrors = er => dest.emit('error', er); + this.proxyErrors = (er) => this.dest.emit('error', er); src.on('error', this.proxyErrors); } } @@ -939,6 +947,7 @@ class Minipass extends node_events_1.EventEmitter { [Symbol.asyncIterator]() { return this; }, + [Symbol.asyncDispose]: async () => { }, }; } /** @@ -976,6 +985,7 @@ class Minipass extends node_events_1.EventEmitter { [Symbol.iterator]() { return this; }, + [Symbol.dispose]: () => { }, }; } /** diff --git a/deps/npm/node_modules/minipass/dist/esm/index.js b/deps/npm/node_modules/minipass/dist/esm/index.js index b5fa4513c90838..5df55461e3d491 100644 --- a/deps/npm/node_modules/minipass/dist/esm/index.js +++ b/deps/npm/node_modules/minipass/dist/esm/index.js @@ -120,7 +120,7 @@ class PipeProxyErrors extends Pipe { } constructor(src, dest, opts) { super(src, dest, opts); - this.proxyErrors = er => dest.emit('error', er); + this.proxyErrors = (er) => this.dest.emit('error', er); src.on('error', this.proxyErrors); } } @@ -930,6 +930,7 @@ export class Minipass extends EventEmitter { [Symbol.asyncIterator]() { return this; }, + [Symbol.asyncDispose]: async () => { }, }; } /** @@ -967,6 +968,7 @@ export class Minipass extends EventEmitter { [Symbol.iterator]() { return this; }, + [Symbol.dispose]: () => { }, }; } /** diff --git a/deps/npm/node_modules/minipass/package.json b/deps/npm/node_modules/minipass/package.json index 771969b0285469..800f215cb02c01 100644 --- a/deps/npm/node_modules/minipass/package.json +++ b/deps/npm/node_modules/minipass/package.json @@ -1,13 +1,14 @@ { "name": "minipass", - "version": "7.1.2", + "version": "7.1.3", "description": "minimal implementation of a PassThrough stream", "main": "./dist/commonjs/index.js", "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js", "type": "module", "tshy": { "selfLink": false, - "main": true, + "compiler": "tsgo", "exports": { "./package.json": "./package.json", ".": "./src/index.ts" @@ -54,14 +55,14 @@ }, "devDependencies": { "@types/end-of-stream": "^1.4.2", - "@types/node": "^20.1.2", + "@types/node": "^25.2.3", "end-of-stream": "^1.4.0", "node-abort-controller": "^3.1.1", - "prettier": "^2.6.2", - "tap": "^19.0.0", + "prettier": "^3.8.1", + "tap": "^21.6.1", "through2": "^2.0.3", - "tshy": "^1.14.0", - "typedoc": "^0.25.1" + "tshy": "^3.3.2", + "typedoc": "^0.28.17" }, "repository": "https://github.com/isaacs/minipass", "keywords": [ @@ -69,14 +70,8 @@ "stream" ], "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" - }, - "tap": { - "typecheck": true, - "include": [ - "test/*.ts" - ] } } diff --git a/deps/npm/node_modules/pacote/README.md b/deps/npm/node_modules/pacote/README.md index ac0c0fade12f14..8d1d95d82ac99d 100644 --- a/deps/npm/node_modules/pacote/README.md +++ b/deps/npm/node_modules/pacote/README.md @@ -147,15 +147,24 @@ Options object is cloned, and mutated along the way to add integrity, resolved, There must be a configured `_keys` entry in the config that is scoped to the registry the manifest is being fetched from. * `tufCache` Where to store metadata/target files when retrieving the package attestation key material via TUF. Defaults to the same cache directory that npm will use by default, based on platform and environment. -* `allowGit` Whether or not to allow data to be fetched from git. +* `allowGit` Whether or not to allow data to be fetched from a git spec. Possible values are `all`, `none`, or `root`. Defaults to `all`. `all` means git is allowed `none` means git is not allowed `root` means that git is only allowed if fetching from a root context. Context for whether or not the package being fetched is `root` is set via the `_isRoot` option. +* `allowRemote` Whether or not to allow data to be fetched from remote specs. + Possible values and defaults are the same as `allowGit` +* `allowFile` Whether or not to allow data to be fetched from file specs. + Possible values and defaults are the same as `allowGit` +* `allowDirectory` Whether or not to allow data to be fetched from directory specs. + Possible values and defaults are the same as `allowGit` * `_isRoot` Whether or not the package being fetched is in a root context. - For `npm` itself this means a package that is defined in the local project or workspace package.json, or a package that is being fetched for another command like `npm view`. + Defaults to `false`, + For `npm` itself this means a package that is defined in the local project or workspace package.json, or a package that is being fetched for another command like `npm view`. This informs the `allowX` options to let them know the context of the current request. + +For more info on spec types (i.e. git, remote) see [npm-package-arg](npm.im/npm-package-arg) ### Advanced API diff --git a/deps/npm/node_modules/pacote/lib/fetcher.js b/deps/npm/node_modules/pacote/lib/fetcher.js index 8d52d28eefd4d8..0ce7aedb13eda9 100644 --- a/deps/npm/node_modules/pacote/lib/fetcher.js +++ b/deps/npm/node_modules/pacote/lib/fetcher.js @@ -470,14 +470,20 @@ const DirFetcher = require('./dir.js') const RemoteFetcher = require('./remote.js') // possible values for allow: 'all', 'root', 'none' -const canUseGit = (allow = 'all', isRoot = false) => { +const canUse = ({ allow = 'all', isRoot = false, allowType, spec }) => { if (allow === 'all') { return true } if (allow !== 'none' && isRoot) { return true } - return false + throw Object.assign( + new Error(`Fetching${allow === 'root' ? ' non-root' : ''} packages of type "${allowType}" have been disabled`), + { + code: `EALLOW${allowType.toUpperCase()}`, + package: spec.toString(), + } + ) } // Get an appropriate fetcher object from a spec and options @@ -485,18 +491,11 @@ FetcherBase.get = (rawSpec, opts = {}) => { const spec = npa(rawSpec, opts.where) switch (spec.type) { case 'git': - if (!canUseGit(opts.allowGit, opts._isRoot)) { - throw Object.assign( - new Error(`Fetching${opts.allowGit === 'root' ? ' non-root' : ''} packages from git has been disabled`), - { - code: 'EALLOWGIT', - package: spec.toString(), - } - ) - } + canUse({ allow: opts.allowGit, isRoot: opts._isRoot, allowType: 'git', spec }) return new GitFetcher(spec, opts) case 'remote': + canUse({ allow: opts.allowRemote, isRoot: opts._isRoot, allowType: 'remote', spec }) return new RemoteFetcher(spec, opts) case 'version': @@ -506,9 +505,11 @@ FetcherBase.get = (rawSpec, opts = {}) => { return new RegistryFetcher(spec.subSpec || spec, opts) case 'file': + canUse({ allow: opts.allowFile, isRoot: opts._isRoot, allowType: 'file', spec }) return new FileFetcher(spec, opts) case 'directory': + canUse({ allow: opts.allowDirectory, isRoot: opts._isRoot, allowType: 'directory', spec }) return new DirFetcher(spec, opts) default: diff --git a/deps/npm/node_modules/pacote/lib/git.js b/deps/npm/node_modules/pacote/lib/git.js index 077193a86f026f..8faf125c6e5e57 100644 --- a/deps/npm/node_modules/pacote/lib/git.js +++ b/deps/npm/node_modules/pacote/lib/git.js @@ -12,7 +12,7 @@ const _ = require('./util/protected.js') const addGitSha = require('./util/add-git-sha.js') const npm = require('./util/npm.js') -const hashre = /^[a-f0-9]{40}$/ +const hashre = /^[a-f0-9]{40,64}$/ // get the repository url. // prefer https if there's auth, since ssh will drop that. @@ -25,6 +25,14 @@ const repoUrl = (h, opts) => // add git+ to the url, but only one time. const addGitPlus = url => url && `git+${url}`.replace(/^(git\+)+/, 'git+') +const checkoutError = (expected, found) => { + const err = new Error(`Commit mismatch: expected SHA ${expected} and cloned HEAD ${found}`) + err.code = 'EGITCHECKOUT' + err.sha = expected + err.head = found + return err +} + class GitFetcher extends Fetcher { constructor (spec, opts) { super(spec, opts) @@ -245,7 +253,7 @@ class GitFetcher extends Fetcher { pkgid: `git:${nameat}${this.resolved}`, resolved: this.resolved, integrity: null, // it'll always be different, if we have one - }).extract(tmp).then(() => handler(tmp), er => { + }).extract(tmp).then(() => handler(`${tmp}${this.spec.gitSubdir || ''}`), er => { // fall back to ssh download if tarball fails if (er.constructor.name.match(/^Http/)) { return this.#clone(handler, false) @@ -259,11 +267,15 @@ class GitFetcher extends Fetcher { h ? this.#cloneHosted(ref, tmp) : this.#cloneRepo(this.spec.fetchSpec, ref, tmp) ) + // if we already have a resolved sha ensure it doesn't change + if (this.resolvedSha && this.resolvedSha !== sha) { + throw checkoutError(this.resolvedSha, sha) + } this.resolvedSha = sha if (!this.resolved) { await this.#addGitSha(sha) } - return handler(tmp) + return handler(`${tmp}${this.spec.gitSubdir || ''}`) }) } diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index b0cef67100abb5..3a1eafd46272a6 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,6 +1,6 @@ { "name": "pacote", - "version": "21.1.0", + "version": "21.3.1", "description": "JavaScript package downloader", "author": "GitHub Inc.", "bin": { diff --git a/deps/npm/node_modules/path-scurry/package.json b/deps/npm/node_modules/path-scurry/package.json index 831f23469b7865..68123fb70f16be 100644 --- a/deps/npm/node_modules/path-scurry/package.json +++ b/deps/npm/node_modules/path-scurry/package.json @@ -1,6 +1,6 @@ { "name": "path-scurry", - "version": "2.0.1", + "version": "2.0.2", "description": "walk paths fast and efficiently", "author": "Isaac Z. Schlueter (https://blog.izs.me)", "main": "./dist/commonjs/index.js", @@ -35,35 +35,19 @@ "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts", "bench": "bash ./scripts/bench.sh" }, - "prettier": { - "experimentalTernaries": true, - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, "devDependencies": { - "@nodelib/fs.walk": "^2.0.0", - "@types/node": "^20.14.10", + "@nodelib/fs.walk": "^3.0.1", + "@types/node": "^25.3.0", "mkdirp": "^3.0.0", "prettier": "^3.3.2", - "rimraf": "^5.0.8", - "tap": "^20.0.3", + "rimraf": "^6.1.3", + "tap": "^21.6.1", "ts-node": "^10.9.2", - "tshy": "^2.0.1", - "typedoc": "^0.26.3", - "typescript": "^5.5.3" - }, - "tap": { - "typecheck": true + "tshy": "^3.3.2", + "typedoc": "^0.28.17" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md index 67c311f87ca3cd..f6503bfefd4640 100644 --- a/deps/npm/node_modules/semver/README.md +++ b/deps/npm/node_modules/semver/README.md @@ -110,8 +110,9 @@ Options: -l --loose Interpret versions and ranges loosely --n <0|1> - This is the base to be used for the prerelease identifier. +-n <0|1|false> + Base number for prerelease identifier (default: 0). + Use false to omit the number altogether. -p --include-prerelease Always include prerelease versions in range matching diff --git a/deps/npm/node_modules/semver/bin/semver.js b/deps/npm/node_modules/semver/bin/semver.js index dbb1bf534ec722..d62bfc0ecd5216 100755 --- a/deps/npm/node_modules/semver/bin/semver.js +++ b/deps/npm/node_modules/semver/bin/semver.js @@ -105,7 +105,7 @@ const main = () => { versions = versions.map((v) => { return coerce ? (semver.coerce(v, options) || { version: v }).version : v }).filter((v) => { - return semver.valid(v) + return semver.valid(v, options) }) if (!versions.length) { return fail() diff --git a/deps/npm/node_modules/semver/functions/diff.js b/deps/npm/node_modules/semver/functions/diff.js index 04e064e9196b58..c99ab51cc57169 100644 --- a/deps/npm/node_modules/semver/functions/diff.js +++ b/deps/npm/node_modules/semver/functions/diff.js @@ -53,7 +53,7 @@ const diff = (version1, version2) => { return prefix + 'patch' } - // high and low are preleases + // high and low are prereleases return 'prerelease' } diff --git a/deps/npm/node_modules/semver/internal/re.js b/deps/npm/node_modules/semver/internal/re.js index 4758c58d424a9b..639fca89de8e63 100644 --- a/deps/npm/node_modules/semver/internal/re.js +++ b/deps/npm/node_modules/semver/internal/re.js @@ -78,8 +78,8 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. -// Non-numberic identifiers include numberic identifiers but can be longer. -// Therefore non-numberic identifiers must go first. +// Non-numeric identifiers include numeric identifiers but can be longer. +// Therefore non-numeric identifiers must go first. createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER] }|${src[t.NUMERICIDENTIFIER]})`) diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json index 2b8cadaa2387ed..a84de916085998 100644 --- a/deps/npm/node_modules/semver/package.json +++ b/deps/npm/node_modules/semver/package.json @@ -1,6 +1,6 @@ { "name": "semver", - "version": "7.7.3", + "version": "7.7.4", "description": "The semantic version parser used by npm.", "main": "index.js", "scripts": { @@ -14,8 +14,8 @@ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/eslint-config": "^6.0.0", + "@npmcli/template-oss": "4.29.0", "benchmark": "^2.1.4", "tap": "^16.0.0" }, @@ -52,7 +52,7 @@ "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "engines": ">=10", "distPaths": [ "classes/", diff --git a/deps/npm/node_modules/semver/ranges/subset.js b/deps/npm/node_modules/semver/ranges/subset.js index 2c49aef1be5e87..99f43218075c86 100644 --- a/deps/npm/node_modules/semver/ranges/subset.js +++ b/deps/npm/node_modules/semver/ranges/subset.js @@ -38,7 +38,7 @@ const compare = require('../functions/compare.js') // - If LT // - If LT.semver is greater than any < or <= comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode +// - If LT.semver has a prerelease, and not in prerelease mode // - If no C has a prerelease and the LT.semver tuple, return false // - Else return true diff --git a/deps/npm/node_modules/spdx-correct/LICENSE b/deps/npm/node_modules/spdx-correct/LICENSE deleted file mode 100644 index d645695673349e..00000000000000 --- a/deps/npm/node_modules/spdx-correct/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/deps/npm/node_modules/spdx-correct/index.js b/deps/npm/node_modules/spdx-correct/index.js deleted file mode 100644 index 4d9037e0cc4355..00000000000000 --- a/deps/npm/node_modules/spdx-correct/index.js +++ /dev/null @@ -1,386 +0,0 @@ -/* -Copyright spdx-correct.js contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -var parse = require('spdx-expression-parse') -var spdxLicenseIds = require('spdx-license-ids') - -function valid (string) { - try { - parse(string) - return true - } catch (error) { - return false - } -} - -// Sorting function that orders the given array of transpositions such -// that a transposition with the longer pattern comes before a transposition -// with a shorter pattern. This is to prevent e.g. the transposition -// ["General Public License", "GPL"] from matching to "Lesser General Public License" -// before a longer and more accurate transposition ["Lesser General Public License", "LGPL"] -// has a chance to be recognized. -function sortTranspositions(a, b) { - var length = b[0].length - a[0].length - if (length !== 0) return length - return a[0].toUpperCase().localeCompare(b[0].toUpperCase()) -} - -// Common transpositions of license identifier acronyms -var transpositions = [ - ['APGL', 'AGPL'], - ['Gpl', 'GPL'], - ['GLP', 'GPL'], - ['APL', 'Apache'], - ['ISD', 'ISC'], - ['GLP', 'GPL'], - ['IST', 'ISC'], - ['Claude', 'Clause'], - [' or later', '+'], - [' International', ''], - ['GNU', 'GPL'], - ['GUN', 'GPL'], - ['+', ''], - ['GNU GPL', 'GPL'], - ['GNU LGPL', 'LGPL'], - ['GNU/GPL', 'GPL'], - ['GNU GLP', 'GPL'], - ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL'], - ['GNU Lesser General Public License', 'LGPL'], - ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], - ['GNU Lesser General Public License', 'LGPL-2.1'], - ['LESSER GENERAL PUBLIC LICENSE', 'LGPL'], - ['Lesser General Public License', 'LGPL'], - ['LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'], - ['Lesser General Public License', 'LGPL-2.1'], - ['GNU General Public License', 'GPL'], - ['Gnu public license', 'GPL'], - ['GNU Public License', 'GPL'], - ['GNU GENERAL PUBLIC LICENSE', 'GPL'], - ['MTI', 'MIT'], - ['Mozilla Public License', 'MPL'], - ['Universal Permissive License', 'UPL'], - ['WTH', 'WTF'], - ['WTFGPL', 'WTFPL'], - ['-License', ''] -].sort(sortTranspositions) - -var TRANSPOSED = 0 -var CORRECT = 1 - -// Simple corrections to nearly valid identifiers. -var transforms = [ - // e.g. 'mit' - function (argument) { - return argument.toUpperCase() - }, - // e.g. 'MIT ' - function (argument) { - return argument.trim() - }, - // e.g. 'M.I.T.' - function (argument) { - return argument.replace(/\./g, '') - }, - // e.g. 'Apache- 2.0' - function (argument) { - return argument.replace(/\s+/g, '') - }, - // e.g. 'CC BY 4.0'' - function (argument) { - return argument.replace(/\s+/g, '-') - }, - // e.g. 'LGPLv2.1' - function (argument) { - return argument.replace('v', '-') - }, - // e.g. 'Apache 2.0' - function (argument) { - return argument.replace(/,?\s*(\d)/, '-$1') - }, - // e.g. 'GPL 2' - function (argument) { - return argument.replace(/,?\s*(\d)/, '-$1.0') - }, - // e.g. 'Apache Version 2.0' - function (argument) { - return argument - .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2') - }, - // e.g. 'Apache Version 2' - function (argument) { - return argument - .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0') - }, - // e.g. 'ZLIB' - function (argument) { - return argument[0].toUpperCase() + argument.slice(1) - }, - // e.g. 'MPL/2.0' - function (argument) { - return argument.replace('/', '-') - }, - // e.g. 'Apache 2' - function (argument) { - return argument - .replace(/\s*V\s*(\d)/, '-$1') - .replace(/(\d)$/, '$1.0') - }, - // e.g. 'GPL-2.0', 'GPL-3.0' - function (argument) { - if (argument.indexOf('3.0') !== -1) { - return argument + '-or-later' - } else { - return argument + '-only' - } - }, - // e.g. 'GPL-2.0-' - function (argument) { - return argument + 'only' - }, - // e.g. 'GPL2' - function (argument) { - return argument.replace(/(\d)$/, '-$1.0') - }, - // e.g. 'BSD 3' - function (argument) { - return argument.replace(/(-| )?(\d)$/, '-$2-Clause') - }, - // e.g. 'BSD clause 3' - function (argument) { - return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause') - }, - // e.g. 'New BSD license' - function (argument) { - return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, 'BSD-3-Clause') - }, - // e.g. 'Simplified BSD license' - function (argument) { - return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, 'BSD-2-Clause') - }, - // e.g. 'Free BSD license' - function (argument) { - return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, 'BSD-2-Clause-$1BSD') - }, - // e.g. 'Clear BSD license' - function (argument) { - return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, 'BSD-3-Clause-Clear') - }, - // e.g. 'Old BSD License' - function (argument) { - return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, 'BSD-4-Clause') - }, - // e.g. 'BY-NC-4.0' - function (argument) { - return 'CC-' + argument - }, - // e.g. 'BY-NC' - function (argument) { - return 'CC-' + argument + '-4.0' - }, - // e.g. 'Attribution-NonCommercial' - function (argument) { - return argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') - }, - // e.g. 'Attribution-NonCommercial' - function (argument) { - return 'CC-' + - argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') + - '-4.0' - } -] - -var licensesWithVersions = spdxLicenseIds - .map(function (id) { - var match = /^(.*)-\d+\.\d+$/.exec(id) - return match - ? [match[0], match[1]] - : [id, null] - }) - .reduce(function (objectMap, item) { - var key = item[1] - objectMap[key] = objectMap[key] || [] - objectMap[key].push(item[0]) - return objectMap - }, {}) - -var licensesWithOneVersion = Object.keys(licensesWithVersions) - .map(function makeEntries (key) { - return [key, licensesWithVersions[key]] - }) - .filter(function identifySoleVersions (item) { - return ( - // Licenses has just one valid version suffix. - item[1].length === 1 && - item[0] !== null && - // APL will be considered Apache, rather than APL-1.0 - item[0] !== 'APL' - ) - }) - .map(function createLastResorts (item) { - return [item[0], item[1][0]] - }) - -licensesWithVersions = undefined - -// If all else fails, guess that strings containing certain substrings -// meant to identify certain licenses. -var lastResorts = [ - ['UNLI', 'Unlicense'], - ['WTF', 'WTFPL'], - ['2 CLAUSE', 'BSD-2-Clause'], - ['2-CLAUSE', 'BSD-2-Clause'], - ['3 CLAUSE', 'BSD-3-Clause'], - ['3-CLAUSE', 'BSD-3-Clause'], - ['AFFERO', 'AGPL-3.0-or-later'], - ['AGPL', 'AGPL-3.0-or-later'], - ['APACHE', 'Apache-2.0'], - ['ARTISTIC', 'Artistic-2.0'], - ['Affero', 'AGPL-3.0-or-later'], - ['BEER', 'Beerware'], - ['BOOST', 'BSL-1.0'], - ['BSD', 'BSD-2-Clause'], - ['CDDL', 'CDDL-1.1'], - ['ECLIPSE', 'EPL-1.0'], - ['FUCK', 'WTFPL'], - ['GNU', 'GPL-3.0-or-later'], - ['LGPL', 'LGPL-3.0-or-later'], - ['GPLV1', 'GPL-1.0-only'], - ['GPL-1', 'GPL-1.0-only'], - ['GPLV2', 'GPL-2.0-only'], - ['GPL-2', 'GPL-2.0-only'], - ['GPL', 'GPL-3.0-or-later'], - ['MIT +NO-FALSE-ATTRIBS', 'MITNFA'], - ['MIT', 'MIT'], - ['MPL', 'MPL-2.0'], - ['X11', 'X11'], - ['ZLIB', 'Zlib'] -].concat(licensesWithOneVersion).sort(sortTranspositions) - -var SUBSTRING = 0 -var IDENTIFIER = 1 - -var validTransformation = function (identifier) { - for (var i = 0; i < transforms.length; i++) { - var transformed = transforms[i](identifier).trim() - if (transformed !== identifier && valid(transformed)) { - return transformed - } - } - return null -} - -var validLastResort = function (identifier) { - var upperCased = identifier.toUpperCase() - for (var i = 0; i < lastResorts.length; i++) { - var lastResort = lastResorts[i] - if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { - return lastResort[IDENTIFIER] - } - } - return null -} - -var anyCorrection = function (identifier, check) { - for (var i = 0; i < transpositions.length; i++) { - var transposition = transpositions[i] - var transposed = transposition[TRANSPOSED] - if (identifier.indexOf(transposed) > -1) { - var corrected = identifier.replace( - transposed, - transposition[CORRECT] - ) - var checked = check(corrected) - if (checked !== null) { - return checked - } - } - } - return null -} - -module.exports = function (identifier, options) { - options = options || {} - var upgrade = options.upgrade === undefined ? true : !!options.upgrade - function postprocess (value) { - return upgrade ? upgradeGPLs(value) : value - } - var validArugment = ( - typeof identifier === 'string' && - identifier.trim().length !== 0 - ) - if (!validArugment) { - throw Error('Invalid argument. Expected non-empty string.') - } - identifier = identifier.trim() - if (valid(identifier)) { - return postprocess(identifier) - } - var noPlus = identifier.replace(/\+$/, '').trim() - if (valid(noPlus)) { - return postprocess(noPlus) - } - var transformed = validTransformation(identifier) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = anyCorrection(identifier, function (argument) { - if (valid(argument)) { - return argument - } - return validTransformation(argument) - }) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = validLastResort(identifier) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = anyCorrection(identifier, validLastResort) - if (transformed !== null) { - return postprocess(transformed) - } - return null -} - -function upgradeGPLs (value) { - if ([ - 'GPL-1.0', 'LGPL-1.0', 'AGPL-1.0', - 'GPL-2.0', 'LGPL-2.0', 'AGPL-2.0', - 'LGPL-2.1' - ].indexOf(value) !== -1) { - return value + '-only' - } else if ([ - 'GPL-1.0+', 'GPL-2.0+', 'GPL-3.0+', - 'LGPL-2.0+', 'LGPL-2.1+', 'LGPL-3.0+', - 'AGPL-1.0+', 'AGPL-3.0+' - ].indexOf(value) !== -1) { - return value.replace(/\+$/, '-or-later') - } else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) { - return value + '-or-later' - } else { - return value - } -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/AUTHORS b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/AUTHORS deleted file mode 100644 index 257a76b9484c12..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -C. Scott Ananian (http://cscott.net) -Kyle E. Mitchell (https://kemitchell.com) -Shinnosuke Watanabe -Antoine Motet diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/LICENSE b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/LICENSE deleted file mode 100644 index 831618eaba6c89..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/index.js b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/index.js deleted file mode 100644 index 52fab560aea707..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -var scan = require('./scan') -var parse = require('./parse') - -module.exports = function (source) { - return parse(scan(source)) -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/package.json b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/package.json deleted file mode 100644 index c9edc9f939cdf6..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "spdx-expression-parse", - "description": "parse SPDX license expressions", - "version": "3.0.1", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "files": [ - "AUTHORS", - "index.js", - "parse.js", - "scan.js" - ], - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^3.0.1", - "replace-require-self": "^1.0.0", - "standard": "^14.1.0" - }, - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata", - "package", - "package.json", - "standards" - ], - "license": "MIT", - "repository": "jslicense/spdx-expression-parse.js", - "scripts": { - "lint": "standard", - "test:readme": "defence -i javascript README.md | replace-require-self | node", - "test:suite": "node test.js", - "test": "npm run test:suite && npm run test:readme" - } -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/parse.js b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/parse.js deleted file mode 100644 index 5a00b45c5799c4..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/parse.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' - -// The ABNF grammar in the spec is totally ambiguous. -// -// This parser follows the operator precedence defined in the -// `Order of Precedence and Parentheses` section. - -module.exports = function (tokens) { - var index = 0 - - function hasMore () { - return index < tokens.length - } - - function token () { - return hasMore() ? tokens[index] : null - } - - function next () { - if (!hasMore()) { - throw new Error() - } - index++ - } - - function parseOperator (operator) { - var t = token() - if (t && t.type === 'OPERATOR' && operator === t.string) { - next() - return t.string - } - } - - function parseWith () { - if (parseOperator('WITH')) { - var t = token() - if (t && t.type === 'EXCEPTION') { - next() - return t.string - } - throw new Error('Expected exception after `WITH`') - } - } - - function parseLicenseRef () { - // TODO: Actually, everything is concatenated into one string - // for backward-compatibility but it could be better to return - // a nice structure. - var begin = index - var string = '' - var t = token() - if (t.type === 'DOCUMENTREF') { - next() - string += 'DocumentRef-' + t.string + ':' - if (!parseOperator(':')) { - throw new Error('Expected `:` after `DocumentRef-...`') - } - } - t = token() - if (t.type === 'LICENSEREF') { - next() - string += 'LicenseRef-' + t.string - return { license: string } - } - index = begin - } - - function parseLicense () { - var t = token() - if (t && t.type === 'LICENSE') { - next() - var node = { license: t.string } - if (parseOperator('+')) { - node.plus = true - } - var exception = parseWith() - if (exception) { - node.exception = exception - } - return node - } - } - - function parseParenthesizedExpression () { - var left = parseOperator('(') - if (!left) { - return - } - - var expr = parseExpression() - - if (!parseOperator(')')) { - throw new Error('Expected `)`') - } - - return expr - } - - function parseAtom () { - return ( - parseParenthesizedExpression() || - parseLicenseRef() || - parseLicense() - ) - } - - function makeBinaryOpParser (operator, nextParser) { - return function parseBinaryOp () { - var left = nextParser() - if (!left) { - return - } - - if (!parseOperator(operator)) { - return left - } - - var right = parseBinaryOp() - if (!right) { - throw new Error('Expected expression') - } - return { - left: left, - conjunction: operator.toLowerCase(), - right: right - } - } - } - - var parseAnd = makeBinaryOpParser('AND', parseAtom) - var parseExpression = makeBinaryOpParser('OR', parseAnd) - - var node = parseExpression() - if (!node || hasMore()) { - throw new Error('Syntax error') - } - return node -} diff --git a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/scan.js b/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/scan.js deleted file mode 100644 index b74fce2e2c6632..00000000000000 --- a/deps/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse/scan.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -var licenses = [] - .concat(require('spdx-license-ids')) - .concat(require('spdx-license-ids/deprecated')) -var exceptions = require('spdx-exceptions') - -module.exports = function (source) { - var index = 0 - - function hasMore () { - return index < source.length - } - - // `value` can be a regexp or a string. - // If it is recognized, the matching source string is returned and - // the index is incremented. Otherwise `undefined` is returned. - function read (value) { - if (value instanceof RegExp) { - var chars = source.slice(index) - var match = chars.match(value) - if (match) { - index += match[0].length - return match[0] - } - } else { - if (source.indexOf(value, index) === index) { - index += value.length - return value - } - } - } - - function skipWhitespace () { - read(/[ ]*/) - } - - function operator () { - var string - var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+'] - for (var i = 0; i < possibilities.length; i++) { - string = read(possibilities[i]) - if (string) { - break - } - } - - if (string === '+' && index > 1 && source[index - 2] === ' ') { - throw new Error('Space before `+`') - } - - return string && { - type: 'OPERATOR', - string: string - } - } - - function idstring () { - return read(/[A-Za-z0-9-.]+/) - } - - function expectIdstring () { - var string = idstring() - if (!string) { - throw new Error('Expected idstring at offset ' + index) - } - return string - } - - function documentRef () { - if (read('DocumentRef-')) { - var string = expectIdstring() - return { type: 'DOCUMENTREF', string: string } - } - } - - function licenseRef () { - if (read('LicenseRef-')) { - var string = expectIdstring() - return { type: 'LICENSEREF', string: string } - } - } - - function identifier () { - var begin = index - var string = idstring() - - if (licenses.indexOf(string) !== -1) { - return { - type: 'LICENSE', - string: string - } - } else if (exceptions.indexOf(string) !== -1) { - return { - type: 'EXCEPTION', - string: string - } - } - - index = begin - } - - // Tries to read the next token. Returns `undefined` if no token is - // recognized. - function parseToken () { - // Ordering matters - return ( - operator() || - documentRef() || - licenseRef() || - identifier() - ) - } - - var tokens = [] - while (hasMore()) { - skipWhitespace() - if (!hasMore()) { - break - } - - var token = parseToken() - if (!token) { - throw new Error('Unexpected `' + source[index] + - '` at offset ' + index) - } - - tokens.push(token) - } - return tokens -} diff --git a/deps/npm/node_modules/spdx-correct/package.json b/deps/npm/node_modules/spdx-correct/package.json deleted file mode 100644 index d77615638be66d..00000000000000 --- a/deps/npm/node_modules/spdx-correct/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "spdx-correct", - "description": "correct invalid SPDX expressions", - "version": "3.2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^3.0.1", - "replace-require-self": "^1.0.0", - "standard": "^14.3.4", - "standard-markdown": "^6.0.0", - "tape": "^5.0.1" - }, - "files": [ - "index.js" - ], - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata" - ], - "license": "Apache-2.0", - "repository": "jslicense/spdx-correct.js", - "scripts": { - "lint": "standard && standard-markdown README.md", - "test": "defence README.md | replace-require-self | node && node test.js" - } -} diff --git a/deps/npm/node_modules/ssri/lib/index.js b/deps/npm/node_modules/ssri/lib/index.js index 9acc4322612483..00102d65472463 100644 --- a/deps/npm/node_modules/ssri/lib/index.js +++ b/deps/npm/node_modules/ssri/lib/index.js @@ -5,14 +5,21 @@ const { Minipass } = require('minipass') const SPEC_ALGORITHMS = ['sha512', 'sha384', 'sha256'] const DEFAULT_ALGORITHMS = ['sha512'] +const NODE_HASHES = crypto.getHashes() -// TODO: this should really be a hardcoded list of algorithms we support, -// rather than [a-z0-9]. +// TODO: this should really be a hardcoded list of algorithms we support, rather than [a-z0-9]. const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i const SRI_REGEX = /^([a-z0-9]+)-([^?]+)(\?[?\S*]*)?$/ const STRICT_SRI_REGEX = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/ const VCHAR_REGEX = /^[\x21-\x7E]+$/ +// This is a Best Effort™ at a reasonable priority for hash algos +const DEFAULT_PRIORITY = [ + 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', + // TODO - it's unclear _which_ of these Node will actually use as its name for the algorithm, so we guesswork it based on the OpenSSL names. + 'sha3', 'sha3-256', 'sha3-384', 'sha3-512', 'sha3_256', 'sha3_384', 'sha3_512', +].filter(algo => NODE_HASHES.includes(algo)) + const getOptString = options => options?.length ? `?${options.join('?')}` : '' class IntegrityStream extends Minipass { @@ -99,7 +106,6 @@ class IntegrityStream extends Minipass { // Integrity verification mode const match = this.goodSri && newSri.match(this.sri, this.opts) if (typeof this.expectedSize === 'number' && this.size !== this.expectedSize) { - /* eslint-disable-next-line max-len */ const err = new Error(`stream size mismatch when checking ${this.sri}.\n Wanted: ${this.expectedSize}\n Found: ${this.size}`) err.code = 'EBADSIZE' err.found = this.size @@ -107,7 +113,6 @@ class IntegrityStream extends Minipass { err.sri = this.sri this.emit('error', err) } else if (this.sri && !match) { - /* eslint-disable-next-line max-len */ const err = new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${newSri}. (${this.size} bytes)`) err.code = 'EINTEGRITY' err.found = newSri @@ -137,8 +142,7 @@ class Hash { const strict = opts?.strict this.source = hash.trim() - // set default values so that we make V8 happy to - // always see a familiar object template. + // set default values so that we make V8 happy to always see a familiar object template. this.digest = '' this.algorithm = '' this.options = [] @@ -156,6 +160,9 @@ class Hash { if (strict && !SPEC_ALGORITHMS.includes(match[1])) { return } + if (!NODE_HASHES.includes(match[1])) { + return + } this.algorithm = match[1] this.digest = match[2] @@ -198,15 +205,12 @@ class Hash { toString (opts) { if (opts?.strict) { - // Strict mode enforces the standard as close to the foot of the - // letter as it can. + // Strict mode enforces the standard as close to the foot of the letter as it can. if (!( // The spec has very restricted productions for algorithms. // https://www.w3.org/TR/CSP2/#source-list-syntax SPEC_ALGORITHMS.includes(this.algorithm) && - // Usually, if someone insists on using a "different" base64, we - // leave it as-is, since there's multiple standards, and the - // specified is not a URL-safe variant. + // Usually, if someone insists on using a "different" base64, we leave it as-is, since there are multiple standards, and the specified is not a URL-safe variant. // https://www.w3.org/TR/CSP2/#base64_value this.digest.match(BASE64_REGEX) && // Option syntax is strictly visual chars. @@ -300,8 +304,7 @@ class Integrity { return parse(this, { single: true }).hexDigest() } - // add additional hashes to an integrity value, but prevent - // *changing* an existing integrity hash. + // add additional hashes to an integrity value, but prevent *changing* an existing integrity hash. merge (integrity, opts) { const other = parse(integrity, opts) for (const algo in other) { @@ -323,33 +326,25 @@ class Integrity { return false } const algo = other.pickAlgorithm(opts, Object.keys(this)) - return ( - !!algo && - this[algo] && - other[algo] && - this[algo].find(hash => - other[algo].find(otherhash => - hash.digest === otherhash.digest - ) + return !!algo && this[algo].find(hash => + other[algo].find(otherhash => + hash.digest === otherhash.digest ) ) || false } - // Pick the highest priority algorithm present, optionally also limited to a - // set of hashes found in another integrity. When limiting it may return - // nothing. + // Pick the highest priority algorithm present, optionally also limited to a set of hashes found in another integrity. + // When limiting it may return nothing. pickAlgorithm (opts, hashes) { const pickAlgorithm = opts?.pickAlgorithm || getPrioritizedHash - const keys = Object.keys(this).filter(k => { - if (hashes?.length) { - return hashes.includes(k) - } - return true - }) + let keys = Object.keys(this) + if (hashes?.length) { + keys = keys.filter(k => hashes.includes(k)) + } if (keys.length) { return keys.reduce((acc, algo) => pickAlgorithm(acc, algo) || acc) } - // no intersection between this and hashes, + // no intersection between this and hashes return null } } @@ -380,7 +375,7 @@ function _parse (integrity, opts) { const hash = new Hash(string, opts) if (hash.algorithm && hash.digest) { const algo = hash.algorithm - if (!acc[algo]) { + if (!Object.keys(acc).includes(algo)) { acc[algo] = [] } acc[algo].push(hash) @@ -421,9 +416,7 @@ function fromData (data, opts) { `${algo}-${digest}${optString}`, opts ) - /* istanbul ignore else - it would be VERY strange if the string we - * just calculated with an algo did not have an algo or digest. - */ + // istanbul ignore else - it would be VERY strange if the string we just calculated with an algo did not have an algo or digest. if (hash.algorithm && hash.digest) { const hashAlgo = hash.algorithm if (!acc[hashAlgo]) { @@ -473,7 +466,6 @@ function checkData (data, sri, opts) { if (match || !(opts.error)) { return match } else if (typeof opts.size === 'number' && (data.length !== opts.size)) { - /* eslint-disable-next-line max-len */ const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`) err.code = 'EBADSIZE' err.found = data.length @@ -481,7 +473,6 @@ function checkData (data, sri, opts) { err.sri = sri throw err } else { - /* eslint-disable-next-line max-len */ const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`) err.code = 'EINTEGRITY' err.found = newSri @@ -538,20 +529,11 @@ function createIntegrity (opts) { digest: function () { const integrity = algorithms.reduce((acc, algo) => { const digest = hashes.shift().digest('base64') - const hash = new Hash( - `${algo}-${digest}${optString}`, - opts - ) - /* istanbul ignore else - it would be VERY strange if the hash we - * just calculated with an algo did not have an algo or digest. - */ - if (hash.algorithm && hash.digest) { - const hashAlgo = hash.algorithm - if (!acc[hashAlgo]) { - acc[hashAlgo] = [] - } - acc[hashAlgo].push(hash) + const hash = new Hash(`${algo}-${digest}${optString}`, opts) + if (!acc[hash.algorithm]) { + acc[hash.algorithm] = [] } + acc[hash.algorithm].push(hash) return acc }, new Integrity()) @@ -560,18 +542,6 @@ function createIntegrity (opts) { } } -const NODE_HASHES = crypto.getHashes() - -// This is a Best Effort™ at a reasonable priority for hash algos -const DEFAULT_PRIORITY = [ - 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', - // TODO - it's unclear _which_ of these Node will actually use as its name - // for the algorithm, so we guesswork it based on the OpenSSL names. - 'sha3', - 'sha3-256', 'sha3-384', 'sha3-512', - 'sha3_256', 'sha3_384', 'sha3_512', -].filter(algo => NODE_HASHES.includes(algo)) - function getPrioritizedHash (algo1, algo2) { /* eslint-disable-next-line max-len */ return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) diff --git a/deps/npm/node_modules/ssri/package.json b/deps/npm/node_modules/ssri/package.json index 8781bdf5f80c01..d4769fc2907594 100644 --- a/deps/npm/node_modules/ssri/package.json +++ b/deps/npm/node_modules/ssri/package.json @@ -1,6 +1,6 @@ { "name": "ssri", - "version": "13.0.0", + "version": "13.0.1", "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", "main": "lib/index.js", "files": [ @@ -11,21 +11,16 @@ "prerelease": "npm t", "postrelease": "npm publish", "posttest": "npm run lint", - "test": "tap", + "test": "node --test './test/**/*.js'", "coverage": "tap", "lint": "npm run eslint", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run eslint -- --fix", - "snap": "tap", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] + "snap": "node --test --test-update-snapshots './test/**/*.js'", + "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", + "test:node20": "node --test test", + "test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100 './test/**/*.js'" }, "repository": { "type": "git", @@ -51,16 +46,21 @@ "minipass": "^7.0.3" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.27.1", - "tap": "^16.0.1" + "@npmcli/eslint-config": "^6.0.0", + "@npmcli/template-oss": "4.28.1", + "benchmark": "^2.1.4" }, "engines": { "node": "^20.17.0 || >=22.9.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.27.1", - "publish": "true" + "version": "4.28.1", + "publish": "true", + "allowPaths": [ + "benchmarks/" + ], + "testRunner": "node:test", + "latestVersion": 24 } } diff --git a/deps/npm/node_modules/string-width/index.js b/deps/npm/node_modules/string-width/index.js deleted file mode 100644 index f4d261a96a099e..00000000000000 --- a/deps/npm/node_modules/string-width/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const stripAnsi = require('strip-ansi'); -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex'); - -const stringWidth = string => { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - let width = 0; - - for (let i = 0; i < string.length; i++) { - const code = string.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; - -module.exports = stringWidth; -// TODO: remove this in the next major version -module.exports.default = stringWidth; diff --git a/deps/npm/node_modules/string-width/license b/deps/npm/node_modules/string-width/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/string-width/package.json b/deps/npm/node_modules/string-width/package.json deleted file mode 100644 index 28ba7b4cae9bf9..00000000000000 --- a/deps/npm/node_modules/string-width/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "string-width", - "version": "4.2.3", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/deps/npm/node_modules/strip-ansi/index.js b/deps/npm/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593dfcd1fd5c..00000000000000 --- a/deps/npm/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/strip-ansi/license b/deps/npm/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/strip-ansi/package.json b/deps/npm/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108d42831c..00000000000000 --- a/deps/npm/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/deps/npm/node_modules/tar/dist/commonjs/index.min.js b/deps/npm/node_modules/tar/dist/commonjs/index.min.js new file mode 100644 index 00000000000000..4ae8fa0dbc3e38 --- /dev/null +++ b/deps/npm/node_modules/tar/dist/commonjs/index.min.js @@ -0,0 +1,4 @@ +"use strict";var d=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var We=d(C=>{"use strict";var yo=C&&C.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(C,"__esModule",{value:!0});C.Minipass=C.isWritable=C.isReadable=C.isStream=void 0;var Br=typeof process=="object"&&process?process:{stdout:null,stderr:null},es=require("node:events"),xr=yo(require("node:stream")),Eo=require("node:string_decoder"),bo=s=>!!s&&typeof s=="object"&&(s instanceof Wt||s instanceof xr.default||(0,C.isReadable)(s)||(0,C.isWritable)(s));C.isStream=bo;var So=s=>!!s&&typeof s=="object"&&s instanceof es.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==xr.default.Writable.prototype.pipe;C.isReadable=So;var go=s=>!!s&&typeof s=="object"&&s instanceof es.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function";C.isWritable=go;var le=Symbol("EOF"),ue=Symbol("maybeEmitEnd"),_e=Symbol("emittedEnd"),zt=Symbol("emittingEnd"),ft=Symbol("emittedError"),kt=Symbol("closed"),zr=Symbol("read"),jt=Symbol("flush"),kr=Symbol("flushChunk"),K=Symbol("encoding"),Ue=Symbol("decoder"),R=Symbol("flowing"),dt=Symbol("paused"),qe=Symbol("resume"),O=Symbol("buffer"),I=Symbol("pipes"),v=Symbol("bufferLength"),Ki=Symbol("bufferPush"),xt=Symbol("bufferShift"),N=Symbol("objectMode"),y=Symbol("destroyed"),Vi=Symbol("error"),$i=Symbol("emitData"),jr=Symbol("emitEnd"),Xi=Symbol("emitEnd2"),J=Symbol("async"),Qi=Symbol("abort"),Ut=Symbol("aborted"),mt=Symbol("signal"),Pe=Symbol("dataListeners"),k=Symbol("discarded"),pt=s=>Promise.resolve().then(s),Ro=s=>s(),Oo=s=>s==="end"||s==="finish"||s==="prefinish",vo=s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,To=s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),qt=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[qe](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ji=class extends qt{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=r=>t.emit("error",r),e.on("error",this.proxyErrors)}},Do=s=>!!s.objectMode,Po=s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer",Wt=class extends es.EventEmitter{[R]=!1;[dt]=!1;[I]=[];[O]=[];[N];[K];[J];[Ue];[le]=!1;[_e]=!1;[zt]=!1;[kt]=!1;[ft]=null;[v]=0;[y]=!1;[mt];[Ut]=!1;[Pe]=0;[k]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Do(t)?(this[N]=!0,this[K]=null):Po(t)?(this[K]=t.encoding,this[N]=!1):(this[N]=!1,this[K]=null),this[J]=!!t.async,this[Ue]=this[K]?new Eo.StringDecoder(this[K]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[O]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[I]});let{signal:i}=t;i&&(this[mt]=i,i.aborted?this[Qi]():i.addEventListener("abort",()=>this[Qi]()))}get bufferLength(){return this[v]}get encoding(){return this[K]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[N]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[J]}set async(e){this[J]=this[J]||!!e}[Qi](){this[Ut]=!0,this.emit("abort",this[mt]?.reason),this.destroy(this[mt]?.reason)}get aborted(){return this[Ut]}set aborted(e){}write(e,t,i){if(this[Ut])return!1;if(this[le])throw new Error("write after end");if(this[y])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let r=this[J]?pt:Ro;if(!this[N]&&!Buffer.isBuffer(e)){if(To(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(vo(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[N]?(this[R]&&this[v]!==0&&this[jt](!0),this[R]?this.emit("data",e):this[Ki](e),this[v]!==0&&this.emit("readable"),i&&r(i),this[R]):e.length?(typeof e=="string"&&!(t===this[K]&&!this[Ue]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[K]&&(e=this[Ue].write(e)),this[R]&&this[v]!==0&&this[jt](!0),this[R]?this.emit("data",e):this[Ki](e),this[v]!==0&&this.emit("readable"),i&&r(i),this[R]):(this[v]!==0&&this.emit("readable"),i&&r(i),this[R])}read(e){if(this[y])return null;if(this[k]=!1,this[v]===0||e===0||e&&e>this[v])return this[ue](),null;this[N]&&(e=null),this[O].length>1&&!this[N]&&(this[O]=[this[K]?this[O].join(""):Buffer.concat(this[O],this[v])]);let t=this[zr](e||null,this[O][0]);return this[ue](),t}[zr](e,t){if(this[N])this[xt]();else{let i=t;e===i.length||e===null?this[xt]():typeof i=="string"?(this[O][0]=i.slice(e),t=i.slice(0,e),this[v]-=e):(this[O][0]=i.subarray(e),t=i.subarray(0,e),this[v]-=e)}return this.emit("data",t),!this[O].length&&!this[le]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[le]=!0,this.writable=!1,(this[R]||!this[dt])&&this[ue](),this}[qe](){this[y]||(!this[Pe]&&!this[I].length&&(this[k]=!0),this[dt]=!1,this[R]=!0,this.emit("resume"),this[O].length?this[jt]():this[le]?this[ue]():this.emit("drain"))}resume(){return this[qe]()}pause(){this[R]=!1,this[dt]=!0,this[k]=!1}get destroyed(){return this[y]}get flowing(){return this[R]}get paused(){return this[dt]}[Ki](e){this[N]?this[v]+=1:this[v]+=e.length,this[O].push(e)}[xt](){return this[N]?this[v]-=1:this[v]-=this[O][0].length,this[O].shift()}[jt](e=!1){do;while(this[kr](this[xt]())&&this[O].length);!e&&!this[O].length&&!this[le]&&this.emit("drain")}[kr](e){return this.emit("data",e),this[R]}pipe(e,t){if(this[y])return e;this[k]=!1;let i=this[_e];return t=t||{},e===Br.stdout||e===Br.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[I].push(t.proxyErrors?new Ji(this,e,t):new qt(this,e,t)),this[J]?pt(()=>this[qe]()):this[qe]()),e}unpipe(e){let t=this[I].find(i=>i.dest===e);t&&(this[I].length===1?(this[R]&&this[Pe]===0&&(this[R]=!1),this[I]=[]):this[I].splice(this[I].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[k]=!1,this[Pe]++,!this[I].length&&!this[R]&&this[qe]();else if(e==="readable"&&this[v]!==0)super.emit("readable");else if(Oo(e)&&this[_e])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ft]){let r=t;this[J]?pt(()=>r.call(this,this[ft])):r.call(this,this[ft])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[Pe]=this.listeners("data").length,this[Pe]===0&&!this[k]&&!this[I].length&&(this[R]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Pe]=0,!this[k]&&!this[I].length&&(this[R]=!1)),t}get emittedEnd(){return this[_e]}[ue](){!this[zt]&&!this[_e]&&!this[y]&&this[O].length===0&&this[le]&&(this[zt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[kt]&&this.emit("close"),this[zt]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==y&&this[y])return!1;if(e==="data")return!this[N]&&!i?!1:this[J]?(pt(()=>this[$i](i)),!0):this[$i](i);if(e==="end")return this[jr]();if(e==="close"){if(this[kt]=!0,!this[_e]&&!this[y])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[ft]=i,super.emit(Vi,i);let n=!this[mt]||this.listeners("error").length?super.emit("error",i):!1;return this[ue](),n}else if(e==="resume"){let n=super.emit("resume");return this[ue](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let r=super.emit(e,...t);return this[ue](),r}[$i](e){for(let i of this[I])i.dest.write(e)===!1&&this.pause();let t=this[k]?!1:super.emit("data",e);return this[ue](),t}[jr](){return this[_e]?!1:(this[_e]=!0,this.readable=!1,this[J]?(pt(()=>this[Xi]()),!0):this[Xi]())}[Xi](){if(this[Ue]){let t=this[Ue].end();if(t){for(let i of this[I])i.dest.write(t);this[k]||super.emit("data",t)}}for(let t of this[I])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[N]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[N]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[N])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[K]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(y,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[k]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[le])return t();let n,o,a=c=>{this.off("data",h),this.off("end",l),this.off(y,u),t(),o(c)},h=c=>{this.off("error",a),this.off("end",l),this.off(y,u),this.pause(),n({value:c,done:!!this[le]})},l=()=>{this.off("error",a),this.off("data",h),this.off(y,u),t(),n({done:!0,value:void 0})},u=()=>a(new Error("stream destroyed"));return new Promise((c,E)=>{o=E,n=c,this.once(y,u),this.once("error",a),this.once("end",l),this.once("data",h)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[k]=!1;let e=!1,t=()=>(this.pause(),this.off(Vi,t),this.off(y,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(Vi,t),this.once(y,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[y])return e?this.emit("error",e):this.emit(y),this;this[y]=!0,this[k]=!0,this[O].length=0,this[v]=0;let t=this;return typeof t.close=="function"&&!this[kt]&&t.close(),e?this.emit("error",e):this.emit(y),this}static get isStream(){return C.isStream}};C.Minipass=Wt});var Ke=d(W=>{"use strict";var Ur=W&&W.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(W,"__esModule",{value:!0});W.WriteStreamSync=W.WriteStream=W.ReadStreamSync=W.ReadStream=void 0;var No=Ur(require("events")),B=Ur(require("fs")),Mo=We(),Lo=B.default.writev,ye=Symbol("_autoClose"),$=Symbol("_close"),_t=Symbol("_ended"),p=Symbol("_fd"),ts=Symbol("_finished"),fe=Symbol("_flags"),is=Symbol("_flush"),os=Symbol("_handleChunk"),as=Symbol("_makeBuf"),yt=Symbol("_mode"),Ht=Symbol("_needDrain"),Ge=Symbol("_onerror"),Ye=Symbol("_onopen"),ss=Symbol("_onread"),He=Symbol("_onwrite"),Ee=Symbol("_open"),V=Symbol("_path"),we=Symbol("_pos"),ee=Symbol("_queue"),Ze=Symbol("_read"),rs=Symbol("_readSize"),ce=Symbol("_reading"),wt=Symbol("_remain"),ns=Symbol("_size"),Zt=Symbol("_write"),Ne=Symbol("_writing"),Gt=Symbol("_defaultFlag"),Me=Symbol("_errored"),Yt=class extends Mo.Minipass{[Me]=!1;[p];[V];[rs];[ce]=!1;[ns];[wt];[ye];constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Me]=!1,this[p]=typeof t.fd=="number"?t.fd:void 0,this[V]=e,this[rs]=t.readSize||16*1024*1024,this[ce]=!1,this[ns]=typeof t.size=="number"?t.size:1/0,this[wt]=this[ns],this[ye]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[p]=="number"?this[Ze]():this[Ee]()}get fd(){return this[p]}get path(){return this[V]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Ee](){B.default.open(this[V],"r",(e,t)=>this[Ye](e,t))}[Ye](e,t){e?this[Ge](e):(this[p]=t,this.emit("open",t),this[Ze]())}[as](){return Buffer.allocUnsafe(Math.min(this[rs],this[wt]))}[Ze](){if(!this[ce]){this[ce]=!0;let e=this[as]();if(e.length===0)return process.nextTick(()=>this[ss](null,0,e));B.default.read(this[p],e,0,e.length,null,(t,i,r)=>this[ss](t,i,r))}}[ss](e,t,i){this[ce]=!1,e?this[Ge](e):this[os](t,i)&&this[Ze]()}[$](){if(this[ye]&&typeof this[p]=="number"){let e=this[p];this[p]=void 0,B.default.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[Ge](e){this[ce]=!0,this[$](),this.emit("error",e)}[os](e,t){let i=!1;return this[wt]-=e,e>0&&(i=super.write(ethis[Ye](e,t))}[Ye](e,t){this[Gt]&&this[fe]==="r+"&&e&&e.code==="ENOENT"?(this[fe]="w",this[Ee]()):e?this[Ge](e):(this[p]=t,this.emit("open",t),this[Ne]||this[is]())}end(e,t){return e&&this.write(e,t),this[_t]=!0,!this[Ne]&&!this[ee].length&&typeof this[p]=="number"&&this[He](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[_t]?(this.emit("error",new Error("write() after end()")),!1):this[p]===void 0||this[Ne]||this[ee].length?(this[ee].push(e),this[Ht]=!0,!1):(this[Ne]=!0,this[Zt](e),!0)}[Zt](e){B.default.write(this[p],e,0,e.length,this[we],(t,i)=>this[He](t,i))}[He](e,t){e?this[Ge](e):(this[we]!==void 0&&typeof t=="number"&&(this[we]+=t),this[ee].length?this[is]():(this[Ne]=!1,this[_t]&&!this[ts]?(this[ts]=!0,this[$](),this.emit("finish")):this[Ht]&&(this[Ht]=!1,this.emit("drain"))))}[is](){if(this[ee].length===0)this[_t]&&this[He](null,0);else if(this[ee].length===1)this[Zt](this[ee].pop());else{let e=this[ee];this[ee]=[],Lo(this[p],e,this[we],(t,i)=>this[He](t,i))}}[$](){if(this[ye]&&typeof this[p]=="number"){let e=this[p];this[p]=void 0,B.default.close(e,t=>t?this.emit("error",t):this.emit("close"))}}};W.WriteStream=Kt;var ls=class extends Kt{[Ee](){let e;if(this[Gt]&&this[fe]==="r+")try{e=B.default.openSync(this[V],this[fe],this[yt])}catch(t){if(t?.code==="ENOENT")return this[fe]="w",this[Ee]();throw t}else e=B.default.openSync(this[V],this[fe],this[yt]);this[Ye](null,e)}[$](){if(this[ye]&&typeof this[p]=="number"){let e=this[p];this[p]=void 0,B.default.closeSync(e),this.emit("close")}}[Zt](e){let t=!0;try{this[He](null,B.default.writeSync(this[p],e,0,e.length,this[we])),t=!1}finally{if(t)try{this[$]()}catch{}}}};W.WriteStreamSync=ls});var Vt=d(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.dealias=b.isNoFile=b.isFile=b.isAsync=b.isSync=b.isAsyncNoFile=b.isSyncNoFile=b.isAsyncFile=b.isSyncFile=void 0;var Ao=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),Io=s=>!!s.sync&&!!s.file;b.isSyncFile=Io;var Co=s=>!s.sync&&!!s.file;b.isAsyncFile=Co;var Fo=s=>!!s.sync&&!s.file;b.isSyncNoFile=Fo;var Bo=s=>!s.sync&&!s.file;b.isAsyncNoFile=Bo;var zo=s=>!!s.sync;b.isSync=zo;var ko=s=>!s.sync;b.isAsync=ko;var jo=s=>!!s.file;b.isFile=jo;var xo=s=>!s.file;b.isNoFile=xo;var Uo=s=>{let e=Ao.get(s);return e||s},qo=(s={})=>{if(!s)return{};let e={};for(let[t,i]of Object.entries(s)){let r=Uo(t);e[r]=i}return e.chmod===void 0&&e.noChmod===!1&&(e.chmod=!0),delete e.noChmod,e};b.dealias=qo});var Ve=d($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.makeCommand=void 0;var Et=Vt(),Wo=(s,e,t,i,r)=>Object.assign((n=[],o,a)=>{Array.isArray(n)&&(o=n,n={}),typeof o=="function"&&(a=o,o=void 0),o?o=Array.from(o):o=[];let h=(0,Et.dealias)(n);if(r?.(h,o),(0,Et.isSyncFile)(h)){if(typeof a=="function")throw new TypeError("callback not supported for sync tar functions");return s(h,o)}else if((0,Et.isAsyncFile)(h)){let l=e(h,o),u=a||void 0;return u?l.then(()=>u(),u):l}else if((0,Et.isSyncNoFile)(h)){if(typeof a=="function")throw new TypeError("callback not supported for sync tar functions");return t(h,o)}else if((0,Et.isAsyncNoFile)(h)){if(typeof a=="function")throw new TypeError("callback only supported with file option");return i(h,o)}else throw new Error("impossible options??")},{syncFile:s,asyncFile:e,syncNoFile:t,asyncNoFile:i,validate:r});$t.makeCommand=Wo});var us=d($e=>{"use strict";var Ho=$e&&$e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty($e,"__esModule",{value:!0});$e.constants=void 0;var Zo=Ho(require("zlib")),Go=Zo.default.constants||{ZLIB_VERNUM:4736};$e.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},Go))});var vs=d(f=>{"use strict";var Yo=f&&f.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),Ko=f&&f.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Vo=f&&f.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;rs,cs=Wr?.writable===!0||Wr?.set!==void 0?s=>{Le.Buffer.concat=s?ea:Jo}:s=>{},Ae=Symbol("_superWrite"),Ie=class extends Error{code;errno;constructor(e,t){super("zlib: "+e.message,{cause:e}),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,t??this.constructor)}get name(){return"ZlibError"}};f.ZlibError=Ie;var fs=Symbol("flushFlag"),bt=class extends Xo.Minipass{#e=!1;#i=!1;#s;#n;#r;#t;#o;get sawError(){return this.#e}get handle(){return this.#t}get flushFlag(){return this.#s}constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(e),this.#s=e.flush??0,this.#n=e.finishFlush??0,this.#r=e.fullFlushFlag??0,typeof qr[t]!="function")throw new TypeError("Compression method not supported: "+t);try{this.#t=new qr[t](e)}catch(i){throw new Ie(i,this.constructor)}this.#o=i=>{this.#e||(this.#e=!0,this.close(),this.emit("error",i))},this.#t?.on("error",i=>this.#o(new Ie(i))),this.once("end",()=>this.close)}close(){this.#t&&(this.#t.close(),this.#t=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,ds.default)(this.#t,"zlib binding closed"),this.#t.reset?.()}flush(e){this.ended||(typeof e!="number"&&(e=this.#r),this.write(Object.assign(Le.Buffer.alloc(0),{[fs]:e})))}end(e,t,i){return typeof e=="function"&&(i=e,t=void 0,e=void 0),typeof t=="function"&&(i=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#n),this.#i=!0,super.end(i)}get ended(){return this.#i}[Ae](e){return super.write(e)}write(e,t,i){if(typeof t=="function"&&(i=t,t="utf8"),typeof e=="string"&&(e=Le.Buffer.from(e,t)),this.#e)return;(0,ds.default)(this.#t,"zlib binding closed");let r=this.#t._handle,n=r.close;r.close=()=>{};let o=this.#t.close;this.#t.close=()=>{},cs(!0);let a;try{let l=typeof e[fs]=="number"?e[fs]:this.#s;a=this.#t._processChunk(e,l),cs(!1)}catch(l){cs(!1),this.#o(new Ie(l,this.write))}finally{this.#t&&(this.#t._handle=r,r.close=n,this.#t.close=o,this.#t.removeAllListeners("error"))}this.#t&&this.#t.on("error",l=>this.#o(new Ie(l,this.write)));let h;if(a)if(Array.isArray(a)&&a.length>0){let l=a[0];h=this[Ae](Le.Buffer.from(l));for(let u=1;u{typeof r=="function"&&(n=r,r=this.flushFlag),this.flush(r),n?.()};try{this.handle.params(e,t)}finally{this.handle.flush=i}this.handle&&(this.#e=e,this.#i=t)}}}};f.Zlib=ie;var ms=class extends ie{constructor(e){super(e,"Deflate")}};f.Deflate=ms;var ps=class extends ie{constructor(e){super(e,"Inflate")}};f.Inflate=ps;var _s=class extends ie{#e;constructor(e){super(e,"Gzip"),this.#e=e&&!!e.portable}[Ae](e){return this.#e?(this.#e=!1,e[9]=255,super[Ae](e)):super[Ae](e)}};f.Gzip=_s;var ws=class extends ie{constructor(e){super(e,"Gunzip")}};f.Gunzip=ws;var ys=class extends ie{constructor(e){super(e,"DeflateRaw")}};f.DeflateRaw=ys;var Es=class extends ie{constructor(e){super(e,"InflateRaw")}};f.InflateRaw=Es;var bs=class extends ie{constructor(e){super(e,"Unzip")}};f.Unzip=bs;var Xt=class extends bt{constructor(e,t){e=e||{},e.flush=e.flush||te.constants.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||te.constants.BROTLI_OPERATION_FINISH,e.fullFlushFlag=te.constants.BROTLI_OPERATION_FLUSH,super(e,t)}},Ss=class extends Xt{constructor(e){super(e,"BrotliCompress")}};f.BrotliCompress=Ss;var gs=class extends Xt{constructor(e){super(e,"BrotliDecompress")}};f.BrotliDecompress=gs;var Qt=class extends bt{constructor(e,t){e=e||{},e.flush=e.flush||te.constants.ZSTD_e_continue,e.finishFlush=e.finishFlush||te.constants.ZSTD_e_end,e.fullFlushFlag=te.constants.ZSTD_e_flush,super(e,t)}},Rs=class extends Qt{constructor(e){super(e,"ZstdCompress")}};f.ZstdCompress=Rs;var Os=class extends Qt{constructor(e){super(e,"ZstdDecompress")}};f.ZstdDecompress=Os});var Gr=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.parse=Xe.encode=void 0;var ta=(s,e)=>{if(Number.isSafeInteger(s))s<0?sa(s,e):ia(s,e);else throw Error("cannot encode number outside of javascript safe integer range");return e};Xe.encode=ta;var ia=(s,e)=>{e[0]=128;for(var t=e.length;t>1;t--)e[t-1]=s&255,s=Math.floor(s/256)},sa=(s,e)=>{e[0]=255;var t=!1;s=s*-1;for(var i=e.length;i>1;i--){var r=s&255;s=Math.floor(s/256),t?e[i-1]=Hr(r):r===0?e[i-1]=0:(t=!0,e[i-1]=Zr(r))}},ra=s=>{let e=s[0],t=e===128?oa(s.subarray(1,s.length)):e===255?na(s):null;if(t===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(t))throw Error("parsed number outside of javascript safe integer range");return t};Xe.parse=ra;var na=s=>{for(var e=s.length,t=0,i=!1,r=e-1;r>-1;r--){var n=Number(s[r]),o;i?o=Hr(n):n===0?o=n:(i=!0,o=Zr(n)),o!==0&&(t-=o*Math.pow(256,e-r-1))}return t},oa=s=>{for(var e=s.length,t=0,i=e-1;i>-1;i--){var r=Number(s[i]);r!==0&&(t+=r*Math.pow(256,e-i-1))}return t},Hr=s=>(255^s)&255,Zr=s=>(255^s)+1&255});var Ts=d(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.code=j.name=j.isName=j.isCode=void 0;var aa=s=>j.name.has(s);j.isCode=aa;var ha=s=>j.code.has(s);j.isName=ha;j.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);j.code=new Map(Array.from(j.name).map(s=>[s[1],s[0]]))});var Je=d(se=>{"use strict";var la=se&&se.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),ua=se&&se.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Yr=se&&se.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r=t+512))throw new Error("need 512 bytes for header");this.path=i?.path??Ce(e,t,100),this.mode=i?.mode??r?.mode??be(e,t+100,8),this.uid=i?.uid??r?.uid??be(e,t+108,8),this.gid=i?.gid??r?.gid??be(e,t+116,8),this.size=i?.size??r?.size??be(e,t+124,12),this.mtime=i?.mtime??r?.mtime??Ds(e,t+136,12),this.cksum=be(e,t+148,12),r&&this.#i(r,!0),i&&this.#i(i);let n=Ce(e,t+156,1);if(St.isCode(n)&&(this.#e=n||"0"),this.#e==="0"&&this.path.slice(-1)==="/"&&(this.#e="5"),this.#e==="5"&&(this.size=0),this.linkpath=Ce(e,t+157,100),e.subarray(t+257,t+265).toString()==="ustar\x0000")if(this.uname=i?.uname??r?.uname??Ce(e,t+265,32),this.gname=i?.gname??r?.gname??Ce(e,t+297,32),this.devmaj=i?.devmaj??r?.devmaj??be(e,t+329,8)??0,this.devmin=i?.devmin??r?.devmin??be(e,t+337,8)??0,e[t+475]!==0){let a=Ce(e,t+345,155);this.path=a+"/"+this.path}else{let a=Ce(e,t+345,130);a&&(this.path=a+"/"+this.path),this.atime=i?.atime??r?.atime??Ds(e,t+476,12),this.ctime=i?.ctime??r?.ctime??Ds(e,t+488,12)}let o=256;for(let a=t;a!(r==null||i==="path"&&t||i==="linkpath"&&t||i==="global"))))}encode(e,t=0){if(e||(e=this.block=Buffer.alloc(512)),this.#e==="Unsupported"&&(this.#e="0"),!(e.length>=t+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,r=ca(this.path||"",i),n=r[0],o=r[1];this.needPax=!!r[2],this.needPax=Fe(e,t,100,n)||this.needPax,this.needPax=Se(e,t+100,8,this.mode)||this.needPax,this.needPax=Se(e,t+108,8,this.uid)||this.needPax,this.needPax=Se(e,t+116,8,this.gid)||this.needPax,this.needPax=Se(e,t+124,12,this.size)||this.needPax,this.needPax=Ps(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this.#e.charCodeAt(0),this.needPax=Fe(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=Fe(e,t+265,32,this.uname)||this.needPax,this.needPax=Fe(e,t+297,32,this.gname)||this.needPax,this.needPax=Se(e,t+329,8,this.devmaj)||this.needPax,this.needPax=Se(e,t+337,8,this.devmin)||this.needPax,this.needPax=Fe(e,t+345,i,o)||this.needPax,e[t+475]!==0?this.needPax=Fe(e,t+345,155,o)||this.needPax:(this.needPax=Fe(e,t+345,130,o)||this.needPax,this.needPax=Ps(e,t+476,12,this.atime)||this.needPax,this.needPax=Ps(e,t+488,12,this.ctime)||this.needPax);let a=256;for(let h=t;h{let i=s,r="",n,o=Qe.posix.parse(s).root||".";if(Buffer.byteLength(i)<100)n=[i,r,!1];else{r=Qe.posix.dirname(i),i=Qe.posix.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(r)<=e?n=[i,r,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(r)<=e?n=[i.slice(0,99),r,!0]:(i=Qe.posix.join(Qe.posix.basename(r),i),r=Qe.posix.dirname(r));while(r!==o&&n===void 0);n||(n=[s.slice(0,99),"",!0])}return n},Ce=(s,e,t)=>s.subarray(e,e+t).toString("utf8").replace(/\0.*/,""),Ds=(s,e,t)=>fa(be(s,e,t)),fa=s=>s===void 0?void 0:new Date(s*1e3),be=(s,e,t)=>Number(s[e])&128?Kr.parse(s.subarray(e,e+t)):ma(s,e,t),da=s=>isNaN(s)?void 0:s,ma=(s,e,t)=>da(parseInt(s.subarray(e,e+t).toString("utf8").replace(/\0.*$/,"").trim(),8)),pa={12:8589934591,8:2097151},Se=(s,e,t,i)=>i===void 0?!1:i>pa[t]||i<0?(Kr.encode(i,s.subarray(e,e+t)),!0):(_a(s,e,t,i),!1),_a=(s,e,t,i)=>s.write(wa(i,t),e,t,"ascii"),wa=(s,e)=>ya(Math.floor(s).toString(8),e),ya=(s,e)=>(s.length===e-1?s:new Array(e-s.length-1).join("0")+s+" ")+"\0",Ps=(s,e,t,i)=>i===void 0?!1:Se(s,e,t,i.getTime()/1e3),Ea=new Array(156).join("\0"),Fe=(s,e,t,i)=>i===void 0?!1:(s.write(i+Ea,e,t,"utf8"),i.length!==Buffer.byteLength(i)||i.length>t)});var ei=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.Pax=void 0;var ba=require("node:path"),Sa=Je(),Ms=class s{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(e,t=!1){this.atime=e.atime,this.charset=e.charset,this.comment=e.comment,this.ctime=e.ctime,this.dev=e.dev,this.gid=e.gid,this.global=t,this.gname=e.gname,this.ino=e.ino,this.linkpath=e.linkpath,this.mtime=e.mtime,this.nlink=e.nlink,this.path=e.path,this.size=e.size,this.uid=e.uid,this.uname=e.uname}encode(){let e=this.encodeBody();if(e==="")return Buffer.allocUnsafe(0);let t=Buffer.byteLength(e),i=512*Math.ceil(1+t/512),r=Buffer.allocUnsafe(i);for(let n=0;n<512;n++)r[n]=0;new Sa.Header({path:("PaxHeader/"+(0,ba.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:t,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(e,512,t,"utf8");for(let n=t+512;n=Math.pow(10,o)&&(o+=1),o+n+r}static parse(e,t,i=!1){return new s(ga(Ra(e),t),i)}};Jt.Pax=Ms;var ga=(s,e)=>e?Object.assign({},e,s):s,Ra=s=>s.replace(/\n$/,"").split(` +`).reduce(Oa,Object.create(null)),Oa=(s,e)=>{let t=parseInt(e,10);if(t!==Buffer.byteLength(e)+1)return s;e=e.slice((t+" ").length);let i=e.split("="),r=i.shift();if(!r)return s;let n=r.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),o=i.join("=");return s[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(Number(o)*1e3):/^[0-9]+$/.test(o)?+o:o,s}});var et=d(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.normalizeWindowsPath=void 0;var va=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;ti.normalizeWindowsPath=va!=="win32"?s=>s:s=>s&&s.replace(/\\/g,"/")});var ri=d(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.ReadEntry=void 0;var Ta=We(),ii=et(),Ls=class extends Ta.Minipass{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(e,t,i){switch(super({}),this.pause(),this.extended=t,this.globalExtended=i,this.header=e,this.remain=e.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=e.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!e.path)throw new Error("no path provided for tar.ReadEntry");this.path=(0,ii.normalizeWindowsPath)(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=this.remain,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath?(0,ii.normalizeWindowsPath)(e.linkpath):void 0,this.uname=e.uname,this.gname=e.gname,t&&this.#e(t),i&&this.#e(i,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,r=this.blockRemain;return this.remain=Math.max(0,i-t),this.blockRemain=Math.max(0,r-t),this.ignore?!0:i>=t?super.write(e):super.write(e.subarray(0,i))}#e(e,t=!1){e.path&&(e.path=(0,ii.normalizeWindowsPath)(e.path)),e.linkpath&&(e.linkpath=(0,ii.normalizeWindowsPath)(e.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(e).filter(([i,r])=>!(r==null||i==="path"&&t))))}};si.ReadEntry=Ls});var oi=d(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.warnMethod=void 0;var Da=(s,e,t,i={})=>{s.file&&(i.file=s.file),s.cwd&&(i.cwd=s.cwd),i.code=t instanceof Error&&t.code||e,i.tarCode=e,!s.strict&&i.recoverable!==!1?(t instanceof Error&&(i=Object.assign(t,i),t=t.message),s.emit("warn",e,t,i)):t instanceof Error?s.emit("error",Object.assign(t,i)):s.emit("error",Object.assign(new Error(`${e}: ${t}`),i))};ni.warnMethod=Da});var mi=d(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.Parser=void 0;var Pa=require("events"),As=vs(),Vr=Je(),$r=ei(),Na=ri(),Ma=oi(),La=1024*1024,zs=Buffer.from([31,139]),ks=Buffer.from([40,181,47,253]),Aa=Math.max(zs.length,ks.length),H=Symbol("state"),Be=Symbol("writeEntry"),de=Symbol("readEntry"),Is=Symbol("nextEntry"),Xr=Symbol("processEntry"),re=Symbol("extendedHeader"),gt=Symbol("globalExtendedHeader"),ge=Symbol("meta"),Qr=Symbol("emitMeta"),_=Symbol("buffer"),me=Symbol("queue"),Re=Symbol("ended"),Cs=Symbol("emittedEnd"),ze=Symbol("emit"),S=Symbol("unzip"),ai=Symbol("consumeChunk"),hi=Symbol("consumeChunkSub"),Fs=Symbol("consumeBody"),Jr=Symbol("consumeMeta"),en=Symbol("consumeHeader"),Rt=Symbol("consuming"),Bs=Symbol("bufferConcat"),li=Symbol("maybeEnd"),tt=Symbol("writing"),Oe=Symbol("aborted"),ui=Symbol("onDone"),ke=Symbol("sawValidEntry"),ci=Symbol("sawNullBlock"),fi=Symbol("sawEOF"),tn=Symbol("closeStream"),Ia=()=>!0,js=class extends Pa.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[me]=[];[_];[de];[Be];[H]="begin";[ge]="";[re];[gt];[Re]=!1;[S];[Oe]=!1;[ke];[ci]=!1;[fi]=!1;[tt]=!1;[Rt]=!1;[Cs]=!1;constructor(e={}){super(),this.file=e.file||"",this.on(ui,()=>{(this[H]==="begin"||this[ke]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(ui,e.ondone):this.on(ui,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||La,this.filter=typeof e.filter=="function"?e.filter:Ia;let t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=!(e.gzip||e.zstd)&&e.brotli!==void 0?e.brotli:t?void 0:!1;let i=e.file&&(e.file.endsWith(".tar.zst")||e.file.endsWith(".tzst"));this.zstd=!(e.gzip||e.brotli)&&e.zstd!==void 0?e.zstd:i?!0:void 0,this.on("end",()=>this[tn]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onReadEntry=="function"&&this.on("entry",e.onReadEntry)}warn(e,t,i={}){(0,Ma.warnMethod)(this,e,t,i)}[en](e,t){this[ke]===void 0&&(this[ke]=!1);let i;try{i=new Vr.Header(e,t,this[re],this[gt])}catch(r){return this.warn("TAR_ENTRY_INVALID",r)}if(i.nullBlock)this[ci]?(this[fi]=!0,this[H]==="begin"&&(this[H]="header"),this[ze]("eof")):(this[ci]=!0,this[ze]("nullBlock"));else if(this[ci]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let r=i.type;if(/^(Symbolic)?Link$/.test(r)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(r)&&!/^(Global)?ExtendedHeader$/.test(r)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let n=this[Be]=new Na.ReadEntry(i,this[re],this[gt]);if(!this[ke])if(n.remain){let o=()=>{n.invalid||(this[ke]=!0)};n.on("end",o)}else this[ke]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[ze]("ignoredEntry",n),this[H]="ignore",n.resume()):n.size>0&&(this[ge]="",n.on("data",o=>this[ge]+=o),this[H]="meta"):(this[re]=void 0,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[ze]("ignoredEntry",n),this[H]=n.remain?"ignore":"header",n.resume()):(n.remain?this[H]="body":(this[H]="header",n.end()),this[de]?this[me].push(n):(this[me].push(n),this[Is]())))}}}[tn](){queueMicrotask(()=>this.emit("close"))}[Xr](e){let t=!0;if(!e)this[de]=void 0,t=!1;else if(Array.isArray(e)){let[i,...r]=e;this.emit(i,...r)}else this[de]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",()=>this[Is]()),t=!1);return t}[Is](){do;while(this[Xr](this[me].shift()));if(!this[me].length){let e=this[de];!e||e.flowing||e.size===e.remain?this[tt]||this.emit("drain"):e.once("drain",()=>this.emit("drain"))}}[Fs](e,t){let i=this[Be];if(!i)throw new Error("attempt to consume body without entry??");let r=i.blockRemain??0,n=r>=e.length&&t===0?e:e.subarray(t,t+r);return i.write(n),i.blockRemain||(this[H]="header",this[Be]=void 0,i.end()),n.length}[Jr](e,t){let i=this[Be],r=this[Fs](e,t);return!this[Be]&&i&&this[Qr](i),r}[ze](e,t,i){!this[me].length&&!this[de]?this.emit(e,t,i):this[me].push([e,t,i])}[Qr](e){switch(this[ze]("meta",this[ge]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[re]=$r.Pax.parse(this[ge],this[re],!1);break;case"GlobalExtendedHeader":this[gt]=$r.Pax.parse(this[ge],this[gt],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let t=this[re]??Object.create(null);this[re]=t,t.path=this[ge].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let t=this[re]||Object.create(null);this[re]=t,t.linkpath=this[ge].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+e.type)}}abort(e){this[Oe]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e,t,i){if(typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8")),this[Oe])return i?.(),!1;if((this[S]===void 0||this.brotli===void 0&&this[S]===!1)&&e){if(this[_]&&(e=Buffer.concat([this[_],e]),this[_]=void 0),e.lengththis[ai](u)),this[S].on("error",u=>this.abort(u)),this[S].on("end",()=>{this[Re]=!0,this[ai]()}),this[tt]=!0;let l=!!this[S][h?"end":"write"](e);return this[tt]=!1,i?.(),l}}this[tt]=!0,this[S]?this[S].write(e):this[ai](e),this[tt]=!1;let n=this[me].length?!1:this[de]?this[de].flowing:!0;return!n&&!this[me].length&&this[de]?.once("drain",()=>this.emit("drain")),i?.(),n}[Bs](e){e&&!this[Oe]&&(this[_]=this[_]?Buffer.concat([this[_],e]):e)}[li](){if(this[Re]&&!this[Cs]&&!this[Oe]&&!this[Rt]){this[Cs]=!0;let e=this[Be];if(e&&e.blockRemain){let t=this[_]?this[_].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[_]&&e.write(this[_]),e.end()}this[ze](ui)}}[ai](e){if(this[Rt]&&e)this[Bs](e);else if(!e&&!this[_])this[li]();else if(e){if(this[Rt]=!0,this[_]){this[Bs](e);let t=this[_];this[_]=void 0,this[hi](t)}else this[hi](e);for(;this[_]&&this[_]?.length>=512&&!this[Oe]&&!this[fi];){let t=this[_];this[_]=void 0,this[hi](t)}this[Rt]=!1}(!this[_]||this[Re])&&this[li]()}[hi](e){let t=0,i=e.length;for(;t+512<=i&&!this[Oe]&&!this[fi];)switch(this[H]){case"begin":case"header":this[en](e,t),t+=512;break;case"ignore":case"body":t+=this[Fs](e,t);break;case"meta":t+=this[Jr](e,t);break;default:throw new Error("invalid state: "+this[H])}t{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.stripTrailingSlashes=void 0;var Ca=s=>{let e=s.length-1,t=-1;for(;e>-1&&s.charAt(e)==="/";)t=e,e--;return t===-1?s:s.slice(0,t)};pi.stripTrailingSlashes=Ca});var st=d(F=>{"use strict";var Fa=F&&F.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),Ba=F&&F.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),za=F&&F.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r{let e=s.onReadEntry;s.onReadEntry=e?t=>{e(t),t.resume()}:t=>t.resume()},qa=(s,e)=>{let t=new Map(e.map(n=>[(0,xs.stripTrailingSlashes)(n),!0])),i=s.filter,r=(n,o="")=>{let a=o||(0,sn.parse)(n).root||".",h;if(n===a)h=!1;else{let l=t.get(n);l!==void 0?h=l:h=r((0,sn.dirname)(n),a)}return t.set(n,h),h};s.filter=i?(n,o)=>i(n,o)&&r((0,xs.stripTrailingSlashes)(n)):n=>r((0,xs.stripTrailingSlashes)(n))};F.filesFilter=qa;var Wa=s=>{let e=new wi.Parser(s),t=s.file,i;try{i=it.default.openSync(t,"r");let r=it.default.fstatSync(i),n=s.maxReadSize||16*1024*1024;if(r.size{let t=new wi.Parser(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,a)=>{t.on("error",a),t.on("end",o),it.default.stat(r,(h,l)=>{if(h)a(h);else{let u=new ja.ReadStream(r,{readSize:i,size:l.size});u.on("error",a),u.pipe(t)}})})};F.list=(0,xa.makeCommand)(Wa,Ha,s=>new wi.Parser(s),s=>new wi.Parser(s),(s,e)=>{e?.length&&(0,F.filesFilter)(s,e),s.noResume||Ua(s)})});var rn=d(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.modeFix=void 0;var Za=(s,e,t)=>(s&=4095,t&&(s=(s|384)&-19),e&&(s&256&&(s|=64),s&32&&(s|=8),s&4&&(s|=1)),s);yi.modeFix=Za});var Us=d(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.stripAbsolutePath=void 0;var Ga=require("node:path"),{isAbsolute:Ya,parse:nn}=Ga.win32,Ka=s=>{let e="",t=nn(s);for(;Ya(s)||t.root;){let i=s.charAt(0)==="/"&&s.slice(0,4)!=="//?/"?"/":t.root;s=s.slice(i.length),e+=i,t=nn(s)}return[e,s]};Ei.stripAbsolutePath=Ka});var Ws=d(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.decode=rt.encode=void 0;var bi=["|","<",">","?",":"],qs=bi.map(s=>String.fromCharCode(61440+s.charCodeAt(0))),Va=new Map(bi.map((s,e)=>[s,qs[e]])),$a=new Map(qs.map((s,e)=>[s,bi[e]])),Xa=s=>bi.reduce((e,t)=>e.split(t).join(Va.get(t)),s);rt.encode=Xa;var Qa=s=>qs.reduce((e,t)=>e.split(t).join($a.get(t)),s);rt.decode=Qa});var er=d(M=>{"use strict";var Ja=M&&M.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),eh=M&&M.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),th=M&&M.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;re?(s=(0,ne.normalizeWindowsPath)(s).replace(/^\.(\/|$)/,""),(0,ih.stripTrailingSlashes)(e)+"/"+s):(0,ne.normalizeWindowsPath)(s),rh=16*1024*1024,an=Symbol("process"),hn=Symbol("file"),ln=Symbol("directory"),Zs=Symbol("symlink"),un=Symbol("hardlink"),Ot=Symbol("header"),Si=Symbol("read"),Gs=Symbol("lstat"),gi=Symbol("onlstat"),Ys=Symbol("onread"),Ks=Symbol("onreadlink"),Vs=Symbol("openfile"),$s=Symbol("onopenfile"),ve=Symbol("close"),Ri=Symbol("mode"),Xs=Symbol("awaitDrain"),Hs=Symbol("ondrain"),ae=Symbol("prefix"),Oi=class extends fn.Minipass{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#e=!1;constructor(e,t={}){let i=(0,pn.dealias)(t);super(),this.path=(0,ne.normalizeWindowsPath)(e),this.portable=!!i.portable,this.maxReadSize=i.maxReadSize||rh,this.linkCache=i.linkCache||new Map,this.statCache=i.statCache||new Map,this.preservePaths=!!i.preservePaths,this.cwd=(0,ne.normalizeWindowsPath)(i.cwd||process.cwd()),this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.mtime=i.mtime,this.prefix=i.prefix?(0,ne.normalizeWindowsPath)(i.prefix):void 0,this.onWriteEntry=i.onWriteEntry,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let r=!1;if(!this.preservePaths){let[o,a]=(0,wn.stripAbsolutePath)(this.path);o&&typeof a=="string"&&(this.path=a,r=o)}this.win32=!!i.win32||process.platform==="win32",this.win32&&(this.path=sh.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=(0,ne.normalizeWindowsPath)(i.absolute||on.default.resolve(this.cwd,e)),this.path===""&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});let n=this.statCache.get(this.absolute);n?this[gi](n):this[Gs]()}warn(e,t,i={}){return(0,yn.warnMethod)(this,e,t,i)}emit(e,...t){return e==="error"&&(this.#e=!0),super.emit(e,...t)}[Gs](){oe.default.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[gi](t)})}[gi](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=nh(e),this.emit("stat",e),this[an]()}[an](){switch(this.type){case"File":return this[hn]();case"Directory":return this[ln]();case"SymbolicLink":return this[Zs]();default:return this.end()}}[Ri](e){return(0,mn.modeFix)(e,this.type==="Directory",this.portable)}[ae](e){return En(e,this.prefix)}[Ot](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new dn.Header({path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,mode:this[Ri](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new _n.Pax({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let e=this.header?.block;if(!e)throw new Error("failed to encode header");super.write(e)}[ln](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Ot](),this.end()}[Zs](){oe.default.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[Ks](t)})}[Ks](e){this.linkpath=(0,ne.normalizeWindowsPath)(e),this[Ot](),this.end()}[un](e){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=(0,ne.normalizeWindowsPath)(on.default.relative(this.cwd,e)),this.stat.size=0,this[Ot](),this.end()}[hn](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let e=`${this.stat.dev}:${this.stat.ino}`,t=this.linkCache.get(e);if(t?.indexOf(this.cwd)===0)return this[un](t);this.linkCache.set(e,this.absolute)}if(this[Ot](),this.stat.size===0)return this.end();this[Vs]()}[Vs](){oe.default.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[$s](t)})}[$s](e){if(this.fd=e,this.#e)return this[ve]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[Si]()}[Si](){let{fd:e,buf:t,offset:i,length:r,pos:n}=this;if(e===void 0||t===void 0)throw new Error("cannot read file without first opening");oe.default.read(e,t,i,r,n,(o,a)=>{if(o)return this[ve](()=>this.emit("error",o));this[Ys](a)})}[ve](e=()=>{}){this.fd!==void 0&&oe.default.close(this.fd,e)}[Ys](e){if(e<=0&&this.remain>0){let r=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[ve](()=>this.emit("error",r))}if(e>this.remain){let r=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[ve](()=>this.emit("error",r))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(e===this.remain)for(let r=e;rthis[Hs]())}[Xs](e){this.once("drain",e)}write(e,t,i){if(typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8")),this.blockRemaine?this.emit("error",e):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[Si]()}};M.WriteEntry=Oi;var Qs=class extends Oi{sync=!0;[Gs](){this[gi](oe.default.lstatSync(this.absolute))}[Zs](){this[Ks](oe.default.readlinkSync(this.absolute))}[Vs](){this[$s](oe.default.openSync(this.absolute,"r"))}[Si](){let e=!0;try{let{fd:t,buf:i,offset:r,length:n,pos:o}=this;if(t===void 0||i===void 0)throw new Error("fd and buf must be set in READ method");let a=oe.default.readSync(t,i,r,n,o);this[Ys](a),e=!1}finally{if(e)try{this[ve](()=>{})}catch{}}}[Xs](e){e()}[ve](e=()=>{}){this.fd!==void 0&&oe.default.closeSync(this.fd),e()}};M.WriteEntrySync=Qs;var Js=class extends fn.Minipass{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(e,t,i={}){return(0,yn.warnMethod)(this,e,t,i)}constructor(e,t={}){let i=(0,pn.dealias)(t);super(),this.preservePaths=!!i.preservePaths,this.portable=!!i.portable,this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.onWriteEntry=i.onWriteEntry,this.readEntry=e;let{type:r}=e;if(r==="Unsupported")throw new Error("writing entry that should be ignored");this.type=r,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=i.prefix,this.path=(0,ne.normalizeWindowsPath)(e.path),this.mode=e.mode!==void 0?this[Ri](e.mode):void 0,this.uid=this.portable?void 0:e.uid,this.gid=this.portable?void 0:e.gid,this.uname=this.portable?void 0:e.uname,this.gname=this.portable?void 0:e.gname,this.size=e.size,this.mtime=this.noMtime?void 0:i.mtime||e.mtime,this.atime=this.portable?void 0:e.atime,this.ctime=this.portable?void 0:e.ctime,this.linkpath=e.linkpath!==void 0?(0,ne.normalizeWindowsPath)(e.linkpath):void 0,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let n=!1;if(!this.preservePaths){let[a,h]=(0,wn.stripAbsolutePath)(this.path);a&&typeof h=="string"&&(this.path=h,n=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.onWriteEntry?.(this),this.header=new dn.Header({path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new _n.Pax({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[ae](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[ae](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let o=this.header?.block;if(!o)throw new Error("failed to encode header");super.write(o),e.pipe(this)}[ae](e){return En(e,this.prefix)}[Ri](e){return(0,mn.modeFix)(e,this.type==="Directory",this.portable)}write(e,t,i){typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,typeof t=="string"?t:"utf8"));let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e,i)}end(e,t,i){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof e=="function"&&(i=e,t=void 0,e=void 0),typeof t=="function"&&(i=t,t=void 0),typeof e=="string"&&(e=Buffer.from(e,t??"utf8")),i&&this.once("finish",i),e?super.end(e,i):super.end(i),this}};M.WriteEntryTar=Js;var nh=s=>s.isFile()?"File":s.isDirectory()?"Directory":s.isSymbolicLink()?"SymbolicLink":"Unsupported"});var bn=d(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.Node=ot.Yallist=void 0;var tr=class s{tail;head;length=0;static create(e=[]){return new s(e)}constructor(e=[]){for(let t of e)this.push(t)}*[Symbol.iterator](){for(let e=this.head;e;e=e.next)yield e.value}removeNode(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");let t=e.next,i=e.prev;return t&&(t.prev=i),i&&(i.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=i),this.length--,e.next=void 0,e.prev=void 0,e.list=void 0,t}unshiftNode(e){if(e===this.head)return;e.list&&e.list.removeNode(e);let t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}pushNode(e){if(e===this.tail)return;e.list&&e.list.removeNode(e);let t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}push(...e){for(let t=0,i=e.length;t1)i=t;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;r;n++)i=e(i,r.value,n),r=r.next;return i}reduceReverse(e,t){let i,r=this.tail;if(arguments.length>1)i=t;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let n=this.length-1;r;n--)i=e(i,r.value,n),r=r.prev;return i}toArray(){let e=new Array(this.length);for(let t=0,i=this.head;i;t++)e[t]=i.value,i=i.next;return e}toArrayReverse(){let e=new Array(this.length);for(let t=0,i=this.tail;i;t++)e[t]=i.value,i=i.prev;return e}slice(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);let i=new s;if(tthis.length&&(t=this.length);let r=this.head,n=0;for(n=0;r&&nthis.length&&(t=this.length);let r=this.length,n=this.tail;for(;n&&r>t;r--)n=n.prev;for(;n&&r>e;r--,n=n.prev)i.push(n.value);return i}splice(e,t=0,...i){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);let r=this.head;for(let o=0;r&&o{"use strict";var lh=L&&L.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),uh=L&&L.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),ch=L&&L.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(e.gzip&&(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new ir.Gzip(e.gzip)),e.brotli&&(typeof e.brotli!="object"&&(e.brotli={}),this.zip=new ir.BrotliCompress(e.brotli)),e.zstd&&(typeof e.zstd!="object"&&(e.zstd={}),this.zip=new ir.ZstdCompress(e.zstd)),!this.zip)throw new Error("impossible");let t=this.zip;t.on("data",i=>super.write(i)),t.on("end",()=>super.end()),t.on("drain",()=>this[or]()),this.on("resume",()=>t.resume())}else this.on("drain",this[or]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,e.mtime&&(this.mtime=e.mtime),this.filter=typeof e.filter=="function"?e.filter:()=>!0,this[X]=new dh.Yallist,this[Q]=0,this.jobs=Number(e.jobs)||4,this[Tt]=!1,this[vt]=!1}[Tn](e){return super.write(e)}add(e){return this.write(e),this}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e&&this.add(e),this[vt]=!0,this[xe](),i&&i(),this}write(e){if(this[vt])throw new Error("write after end");return e instanceof mh.ReadEntry?this[gn](e):this[Ti](e),this.flowing}[gn](e){let t=(0,ar.normalizeWindowsPath)(On.default.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let i=new Dt(e.path,t);i.entry=new hr.WriteEntryTar(e,this[nr](i)),i.entry.on("end",()=>this[rr](i)),this[Q]+=1,this[X].push(i)}this[xe]()}[Ti](e){let t=(0,ar.normalizeWindowsPath)(On.default.resolve(this.cwd,e));this[X].push(new Dt(e,t)),this[xe]()}[lr](e){e.pending=!0,this[Q]+=1;let t=this.follow?"stat":"lstat";Mi.default[t](e.absolute,(i,r)=>{e.pending=!1,this[Q]-=1,i?this.emit("error",i):this[vi](e,r)})}[vi](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)?t.isFile()&&t.nlink>1&&e===this[je]&&!this.linkCache.get(`${t.dev}:${t.ino}`)&&!this.sync&&this[sr](e):e.ignore=!0,this[xe]()}[ur](e){e.pending=!0,this[Q]+=1,Mi.default.readdir(e.absolute,(t,i)=>{if(e.pending=!1,this[Q]-=1,t)return this.emit("error",t);this[Di](e,i)})}[Di](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[xe]()}[xe](){if(!this[Tt]){this[Tt]=!0;for(let e=this[X].head;e&&this[Q]this.warn(t,i,r),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[Rn](e){this[Q]+=1;try{return new this[Ni](e.path,this[nr](e)).on("end",()=>this[rr](e)).on("error",i=>this.emit("error",i))}catch(t){this.emit("error",t)}}[or](){this[je]&&this[je].entry&&this[je].entry.resume()}[Pi](e){e.piped=!0,e.readdir&&e.readdir.forEach(r=>{let n=e.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[Ti](o+r)});let t=e.entry,i=this.zip;if(!t)throw new Error("cannot pipe without source");i?t.on("data",r=>{i.write(r)||t.pause()}):t.on("data",r=>{super.write(r)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(e,t,i={}){(0,ph.warnMethod)(this,e,t,i)}};L.Pack=Li;var cr=class extends Li{sync=!0;constructor(e){super(e),this[Ni]=hr.WriteEntrySync}pause(){}resume(){}[lr](e){let t=this.follow?"statSync":"lstatSync";this[vi](e,Mi.default[t](e.absolute))}[ur](e){this[Di](e,Mi.default.readdirSync(e.absolute))}[Pi](e){let t=e.entry,i=this.zip;if(e.readdir&&e.readdir.forEach(r=>{let n=e.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[Ti](o+r)}),!t)throw new Error("Cannot pipe without source");i?t.on("data",r=>{i.write(r)}):t.on("data",r=>{super[Tn](r)})}};L.PackSync=cr});var fr=d(at=>{"use strict";var _h=at&&at.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(at,"__esModule",{value:!0});at.create=void 0;var Dn=Ke(),Pn=_h(require("node:path")),Nn=st(),wh=Ve(),Ii=Ai(),yh=(s,e)=>{let t=new Ii.PackSync(s),i=new Dn.WriteStreamSync(s.file,{mode:s.mode||438});t.pipe(i),Mn(t,e)},Eh=(s,e)=>{let t=new Ii.Pack(s),i=new Dn.WriteStream(s.file,{mode:s.mode||438});t.pipe(i);let r=new Promise((n,o)=>{i.on("error",o),i.on("close",n),t.on("error",o)});return Ln(t,e),r},Mn=(s,e)=>{e.forEach(t=>{t.charAt(0)==="@"?(0,Nn.list)({file:Pn.default.resolve(s.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(t)}),s.end()},Ln=async(s,e)=>{for(let t=0;t{s.add(r)}}):s.add(i)}s.end()},bh=(s,e)=>{let t=new Ii.PackSync(s);return Mn(t,e),t},Sh=(s,e)=>{let t=new Ii.Pack(s);return Ln(t,e),t};at.create=(0,wh.makeCommand)(yh,Eh,bh,Sh,(s,e)=>{if(!e?.length)throw new TypeError("no paths specified to add to archive")})});var Cn=d(ht=>{"use strict";var gh=ht&&ht.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ht,"__esModule",{value:!0});ht.getWriteFlag=void 0;var An=gh(require("fs")),Rh=process.env.__FAKE_PLATFORM__||process.platform,Oh=Rh==="win32",{O_CREAT:vh,O_TRUNC:Th,O_WRONLY:Dh}=An.default.constants,In=Number(process.env.__FAKE_FS_O_FILENAME__)||An.default.constants.UV_FS_O_FILEMAP||0,Ph=Oh&&!!In,Nh=512*1024,Mh=In|Th|vh|Dh;ht.getWriteFlag=Ph?s=>s"w"});var Bn=d(he=>{"use strict";var Fn=he&&he.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(he,"__esModule",{value:!0});he.chownrSync=he.chownr=void 0;var Fi=Fn(require("node:fs")),Pt=Fn(require("node:path")),dr=(s,e,t)=>{try{return Fi.default.lchownSync(s,e,t)}catch(i){if(i?.code!=="ENOENT")throw i}},Ci=(s,e,t,i)=>{Fi.default.lchown(s,e,t,r=>{i(r&&r?.code!=="ENOENT"?r:null)})},Lh=(s,e,t,i,r)=>{if(e.isDirectory())(0,he.chownr)(Pt.default.resolve(s,e.name),t,i,n=>{if(n)return r(n);let o=Pt.default.resolve(s,e.name);Ci(o,t,i,r)});else{let n=Pt.default.resolve(s,e.name);Ci(n,t,i,r)}},Ah=(s,e,t,i)=>{Fi.default.readdir(s,{withFileTypes:!0},(r,n)=>{if(r){if(r.code==="ENOENT")return i();if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!n.length)return Ci(s,e,t,i);let o=n.length,a=null,h=l=>{if(!a){if(l)return i(a=l);if(--o===0)return Ci(s,e,t,i)}};for(let l of n)Lh(s,l,e,t,h)})};he.chownr=Ah;var Ih=(s,e,t,i)=>{e.isDirectory()&&(0,he.chownrSync)(Pt.default.resolve(s,e.name),t,i),dr(Pt.default.resolve(s,e.name),t,i)},Ch=(s,e,t)=>{let i;try{i=Fi.default.readdirSync(s,{withFileTypes:!0})}catch(r){let n=r;if(n?.code==="ENOENT")return;if(n?.code==="ENOTDIR"||n?.code==="ENOTSUP")return dr(s,e,t);throw n}for(let r of i)Ih(s,r,e,t);return dr(s,e,t)};he.chownrSync=Ch});var zn=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.CwdError=void 0;var mr=class extends Error{path;code;syscall="chdir";constructor(e,t){super(`${t}: Cannot cd into '${e}'`),this.path=e,this.code=t}get name(){return"CwdError"}};Bi.CwdError=mr});var _r=d(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.SymlinkError=void 0;var pr=class extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(e,t){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=e,this.path=t}get name(){return"SymlinkError"}};zi.SymlinkError=pr});var qn=d(Te=>{"use strict";var yr=Te&&Te.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Te,"__esModule",{value:!0});Te.mkdirSync=Te.mkdir=void 0;var kn=Bn(),x=yr(require("node:fs")),Fh=yr(require("node:fs/promises")),ki=yr(require("node:path")),jn=zn(),pe=et(),xn=_r(),Bh=(s,e)=>{x.default.stat(s,(t,i)=>{(t||!i.isDirectory())&&(t=new jn.CwdError(s,t?.code||"ENOTDIR")),e(t)})},zh=(s,e,t)=>{s=(0,pe.normalizeWindowsPath)(s);let i=e.umask??18,r=e.mode|448,n=(r&i)!==0,o=e.uid,a=e.gid,h=typeof o=="number"&&typeof a=="number"&&(o!==e.processUid||a!==e.processGid),l=e.preserve,u=e.unlink,c=(0,pe.normalizeWindowsPath)(e.cwd),E=(w,P)=>{w?t(w):P&&h?(0,kn.chownr)(P,o,a,Cr=>E(Cr)):n?x.default.chmod(s,r,t):t()};if(s===c)return Bh(s,E);if(l)return Fh.default.mkdir(s,{mode:r,recursive:!0}).then(w=>E(null,w??void 0),E);let A=(0,pe.normalizeWindowsPath)(ki.default.relative(c,s)).split("/");wr(c,A,r,u,c,void 0,E)};Te.mkdir=zh;var wr=(s,e,t,i,r,n,o)=>{if(!e.length)return o(null,n);let a=e.shift(),h=(0,pe.normalizeWindowsPath)(ki.default.resolve(s+"/"+a));x.default.mkdir(h,t,Un(h,e,t,i,r,n,o))},Un=(s,e,t,i,r,n,o)=>a=>{a?x.default.lstat(s,(h,l)=>{if(h)h.path=h.path&&(0,pe.normalizeWindowsPath)(h.path),o(h);else if(l.isDirectory())wr(s,e,t,i,r,n,o);else if(i)x.default.unlink(s,u=>{if(u)return o(u);x.default.mkdir(s,t,Un(s,e,t,i,r,n,o))});else{if(l.isSymbolicLink())return o(new xn.SymlinkError(s,s+"/"+e.join("/")));o(a)}}):(n=n||s,wr(s,e,t,i,r,n,o))},kh=s=>{let e=!1,t;try{e=x.default.statSync(s).isDirectory()}catch(i){t=i?.code}finally{if(!e)throw new jn.CwdError(s,t??"ENOTDIR")}},jh=(s,e)=>{s=(0,pe.normalizeWindowsPath)(s);let t=e.umask??18,i=e.mode|448,r=(i&t)!==0,n=e.uid,o=e.gid,a=typeof n=="number"&&typeof o=="number"&&(n!==e.processUid||o!==e.processGid),h=e.preserve,l=e.unlink,u=(0,pe.normalizeWindowsPath)(e.cwd),c=w=>{w&&a&&(0,kn.chownrSync)(w,n,o),r&&x.default.chmodSync(s,i)};if(s===u)return kh(u),c();if(h)return c(x.default.mkdirSync(s,{mode:i,recursive:!0})??void 0);let D=(0,pe.normalizeWindowsPath)(ki.default.relative(u,s)).split("/"),A;for(let w=D.shift(),P=u;w&&(P+="/"+w);w=D.shift()){P=(0,pe.normalizeWindowsPath)(ki.default.resolve(P));try{x.default.mkdirSync(P,i),A=A||P}catch{let Fr=x.default.lstatSync(P);if(Fr.isDirectory())continue;if(l){x.default.unlinkSync(P),x.default.mkdirSync(P,i),A=A||P;continue}else if(Fr.isSymbolicLink())return new xn.SymlinkError(P,P+"/"+D.join("/"))}}return c(A)};Te.mkdirSync=jh});var Hn=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.normalizeUnicode=void 0;var Er=Object.create(null),Wn=1e4,lt=new Set,xh=s=>{lt.has(s)?lt.delete(s):Er[s]=s.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"),lt.add(s);let e=Er[s],t=lt.size-Wn;if(t>Wn/10){for(let i of lt)if(lt.delete(i),delete Er[i],--t<=0)break}return e};ji.normalizeUnicode=xh});var Gn=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.PathReservations=void 0;var Zn=require("node:path"),Uh=Hn(),qh=_i(),Wh=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Hh=Wh==="win32",Zh=s=>s.split("/").slice(0,-1).reduce((t,i)=>{let r=t[t.length-1];return r!==void 0&&(i=(0,Zn.join)(r,i)),t.push(i||"/"),t},[]),br=class{#e=new Map;#i=new Map;#s=new Set;reserve(e,t){e=Hh?["win32 parallelization disabled"]:e.map(r=>(0,qh.stripTrailingSlashes)((0,Zn.join)((0,Uh.normalizeUnicode)(r))));let i=new Set(e.map(r=>Zh(r)).reduce((r,n)=>r.concat(n)));this.#i.set(t,{dirs:i,paths:e});for(let r of e){let n=this.#e.get(r);n?n.push(t):this.#e.set(r,[t])}for(let r of i){let n=this.#e.get(r);if(!n)this.#e.set(r,[new Set([t])]);else{let o=n[n.length-1];o instanceof Set?o.add(t):n.push(new Set([t]))}}return this.#r(t)}#n(e){let t=this.#i.get(e);if(!t)throw new Error("function does not have any path reservations");return{paths:t.paths.map(i=>this.#e.get(i)),dirs:[...t.dirs].map(i=>this.#e.get(i))}}check(e){let{paths:t,dirs:i}=this.#n(e);return t.every(r=>r&&r[0]===e)&&i.every(r=>r&&r[0]instanceof Set&&r[0].has(e))}#r(e){return this.#s.has(e)||!this.check(e)?!1:(this.#s.add(e),e(()=>this.#t(e)),!0)}#t(e){if(!this.#s.has(e))return!1;let t=this.#i.get(e);if(!t)throw new Error("invalid reservation");let{paths:i,dirs:r}=t,n=new Set;for(let o of i){let a=this.#e.get(o);if(!a||a?.[0]!==e)continue;let h=a[1];if(!h){this.#e.delete(o);continue}if(a.shift(),typeof h=="function")n.add(h);else for(let l of h)n.add(l)}for(let o of r){let a=this.#e.get(o),h=a?.[0];if(!(!a||!(h instanceof Set)))if(h.size===1&&a.length===1){this.#e.delete(o);continue}else if(h.size===1){a.shift();let l=a[0];typeof l=="function"&&n.add(l)}else h.delete(e)}return this.#s.delete(e),n.forEach(o=>this.#r(o)),!0}};xi.PathReservations=br});var Yn=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.umask=void 0;var Gh=()=>process.umask();Ui.umask=Gh});var Lr=d(z=>{"use strict";var Yh=z&&z.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),Kh=z&&z.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),so=z&&z.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r{if(!Ft)return m.default.unlink(s,e);let t=s+".DELETE."+(0,ro.randomBytes)(16).toString("hex");m.default.rename(s,t,i=>{if(i)return e(i);m.default.unlink(t,e)})},rl=s=>{if(!Ft)return m.default.unlinkSync(s);let e=s+".DELETE."+(0,ro.randomBytes)(16).toString("hex");m.default.renameSync(s,e),m.default.unlinkSync(e)},io=(s,e,t)=>s!==void 0&&s===s>>>0?s:e!==void 0&&e===e>>>0?e:t,Hi=class extends Xh.Parser{[gr]=!1;[Ct]=!1;[qi]=0;reservations=new Jh.PathReservations;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(e={}){if(e.ondone=()=>{this[gr]=!0,this[Rr]()},super(e),this.transform=e.transform,this.chmod=!!e.chmod,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:il,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Ft,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=(0,U.normalizeWindowsPath)(g.default.resolve(e.cwd||process.cwd())),this.strip=Number(e.strip)||0,this.processUmask=this.chmod?typeof e.processUmask=="number"?e.processUmask:(0,el.umask)():0,this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",t=>this[Vn](t))}warn(e,t,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,t,i)}[Rr](){this[gr]&&this[qi]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[Sr](e,t){let i=e[t],{type:r}=e;if(!i||this.preservePaths)return!0;let n=i.split("/");if(n.includes("..")||Ft&&/^[a-z]:\.\.$/i.test(n[0]??"")){if(t==="path"||r==="Link")return this.warn("TAR_ENTRY_ERROR",`${t} contains '..'`,{entry:e,[t]:i}),!1;{let h=g.default.posix.dirname(e.path),l=g.default.posix.normalize(g.default.posix.join(h,i));if(l.startsWith("../")||l==="..")return this.warn("TAR_ENTRY_ERROR",`${t} escapes extraction directory`,{entry:e,[t]:i}),!1}}let[o,a]=(0,Qh.stripAbsolutePath)(i);return o&&(e[t]=String(a),this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute ${t}`,{entry:e,[t]:i})),!0}[eo](e){let t=(0,U.normalizeWindowsPath)(e.path),i=t.split("/");if(this.strip){if(i.length=this.strip)e.linkpath=r.slice(this.strip).join("/");else return!1}i.splice(0,this.strip),e.path=i.join("/")}if(isFinite(this.maxDepth)&&i.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:t,depth:i.length,maxDepth:this.maxDepth}),!1;if(!this[Sr](e,"path")||!this[Sr](e,"linkpath"))return!1;if(g.default.isAbsolute(e.path)?e.absolute=(0,U.normalizeWindowsPath)(g.default.resolve(e.path)):e.absolute=(0,U.normalizeWindowsPath)(g.default.resolve(this.cwd,e.path)),!this.preservePaths&&typeof e.absolute=="string"&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:(0,U.normalizeWindowsPath)(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=g.default.win32.parse(String(e.absolute));e.absolute=r+Kn.encode(String(e.absolute).slice(r.length));let{root:n}=g.default.win32.parse(e.path);e.path=n+Kn.encode(e.path.slice(n.length))}return!0}[Vn](e){if(!this[eo](e))return e.resume();switch($h.default.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Or](e);default:return this[Jn](e)}}[T](e,t){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[ut](),t.resume())}[De](e,t,i){(0,oo.mkdir)((0,U.normalizeWindowsPath)(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:t},i)}[Lt](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[At](e){return io(this.uid,e.uid,this.processUid)}[It](e){return io(this.gid,e.gid,this.processGid)}[Tr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.fmode,r=new Vh.WriteStream(String(e.absolute),{flags:(0,no.getWriteFlag)(e.size),mode:i,autoClose:!1});r.on("error",h=>{r.fd&&m.default.close(r.fd,()=>{}),r.write=()=>!0,this[T](h,e),t()});let n=1,o=h=>{if(h){r.fd&&m.default.close(r.fd,()=>{}),this[T](h,e),t();return}--n===0&&r.fd!==void 0&&m.default.close(r.fd,l=>{l?this[T](l,e):this[ut](),t()})};r.on("finish",()=>{let h=String(e.absolute),l=r.fd;if(typeof l=="number"&&e.mtime&&!this.noMtime){n++;let u=e.atime||new Date,c=e.mtime;m.default.futimes(l,u,c,E=>E?m.default.utimes(h,u,c,D=>o(D&&E)):o())}if(typeof l=="number"&&this[Lt](e)){n++;let u=this[At](e),c=this[It](e);typeof u=="number"&&typeof c=="number"&&m.default.fchown(l,u,c,E=>E?m.default.chown(h,u,c,D=>o(D&&E)):o())}o()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",h=>{this[T](h,e),t()}),e.pipe(a)),a.pipe(r)}[Dr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.dmode;this[De](String(e.absolute),i,r=>{if(r){this[T](r,e),t();return}let n=1,o=()=>{--n===0&&(t(),this[ut](),e.resume())};e.mtime&&!this.noMtime&&(n++,m.default.utimes(String(e.absolute),e.atime||new Date,e.mtime,o)),this[Lt](e)&&(n++,m.default.chown(String(e.absolute),Number(this[At](e)),Number(this[It](e)),o)),o()})}[Jn](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[Xn](e,t){let i=(0,U.normalizeWindowsPath)(g.default.relative(this.cwd,g.default.resolve(g.default.dirname(String(e.absolute)),String(e.linkpath)))).split("/");this[Mt](e,this.cwd,i,()=>this[Wi](e,String(e.linkpath),"symlink",t),r=>{this[T](r,e),t()})}[Qn](e,t){let i=(0,U.normalizeWindowsPath)(g.default.resolve(this.cwd,String(e.linkpath))),r=(0,U.normalizeWindowsPath)(String(e.linkpath)).split("/");this[Mt](e,this.cwd,r,()=>this[Wi](e,i,"link",t),n=>{this[T](n,e),t()})}[Mt](e,t,i,r,n){let o=i.shift();if(this.preservePaths||o===void 0)return r();let a=g.default.resolve(t,o);m.default.lstat(a,(h,l)=>{if(h)return r();if(l?.isSymbolicLink())return n(new ao.SymlinkError(a,g.default.resolve(a,i.join("/"))));this[Mt](e,a,i,r,n)})}[to](){this[qi]++}[ut](){this[qi]--,this[Rr]()}[Pr](e){this[ut](),e.resume()}[vr](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!Ft}[Or](e){this[to]();let t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,i=>this[$n](e,i))}[$n](e,t){let i=a=>{t(a)},r=()=>{this[De](this.cwd,this.dmode,a=>{if(a){this[T](a,e),i();return}this[Ct]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let a=(0,U.normalizeWindowsPath)(g.default.dirname(String(e.absolute)));if(a!==this.cwd)return this[De](a,this.dmode,h=>{if(h){this[T](h,e),i();return}o()})}o()},o=()=>{m.default.lstat(String(e.absolute),(a,h)=>{if(h&&(this.keep||this.newer&&h.mtime>(e.mtime??h.mtime))){this[Pr](e),i();return}if(a||this[vr](e,h))return this[Z](null,e,i);if(h.isDirectory()){if(e.type==="Directory"){let l=this.chmod&&e.mode&&(h.mode&4095)!==e.mode,u=c=>this[Z](c??null,e,i);return l?m.default.chmod(String(e.absolute),Number(e.mode),u):u()}if(e.absolute!==this.cwd)return m.default.rmdir(String(e.absolute),l=>this[Z](l??null,e,i))}if(e.absolute===this.cwd)return this[Z](null,e,i);sl(String(e.absolute),l=>this[Z](l??null,e,i))})};this[Ct]?n():r()}[Z](e,t,i){if(e){this[T](e,t),i();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[Tr](t,i);case"Link":return this[Qn](t,i);case"SymbolicLink":return this[Xn](t,i);case"Directory":case"GNUDumpDir":return this[Dr](t,i)}}[Wi](e,t,i,r){m.default[i](t,String(e.absolute),n=>{n?this[T](n,e):(this[ut](),e.resume()),r()})}};z.Unpack=Hi;var Nt=s=>{try{return[null,s()]}catch(e){return[e,null]}},Nr=class extends Hi{sync=!0;[Z](e,t){return super[Z](e,t,()=>{})}[Or](e){if(!this[Ct]){let n=this[De](this.cwd,this.dmode);if(n)return this[T](n,e);this[Ct]=!0}if(e.absolute!==this.cwd){let n=(0,U.normalizeWindowsPath)(g.default.dirname(String(e.absolute)));if(n!==this.cwd){let o=this[De](n,this.dmode);if(o)return this[T](o,e)}}let[t,i]=Nt(()=>m.default.lstatSync(String(e.absolute)));if(i&&(this.keep||this.newer&&i.mtime>(e.mtime??i.mtime)))return this[Pr](e);if(t||this[vr](e,i))return this[Z](null,e);if(i.isDirectory()){if(e.type==="Directory"){let o=this.chmod&&e.mode&&(i.mode&4095)!==e.mode,[a]=o?Nt(()=>{m.default.chmodSync(String(e.absolute),Number(e.mode))}):[];return this[Z](a,e)}let[n]=Nt(()=>m.default.rmdirSync(String(e.absolute)));this[Z](n,e)}let[r]=e.absolute===this.cwd?[]:Nt(()=>rl(String(e.absolute)));this[Z](r,e)}[Tr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.fmode,r=a=>{let h;try{m.default.closeSync(n)}catch(l){h=l}(a||h)&&this[T](a||h,e),t()},n;try{n=m.default.openSync(String(e.absolute),(0,no.getWriteFlag)(e.size),i)}catch(a){return r(a)}let o=this.transform&&this.transform(e)||e;o!==e&&(o.on("error",a=>this[T](a,e)),e.pipe(o)),o.on("data",a=>{try{m.default.writeSync(n,a,0,a.length)}catch(h){r(h)}}),o.on("end",()=>{let a=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,l=e.mtime;try{m.default.futimesSync(n,h,l)}catch(u){try{m.default.utimesSync(String(e.absolute),h,l)}catch{a=u}}}if(this[Lt](e)){let h=this[At](e),l=this[It](e);try{m.default.fchownSync(n,Number(h),Number(l))}catch(u){try{m.default.chownSync(String(e.absolute),Number(h),Number(l))}catch{a=a||u}}}r(a)})}[Dr](e,t){let i=typeof e.mode=="number"?e.mode&4095:this.dmode,r=this[De](String(e.absolute),i);if(r){this[T](r,e),t();return}if(e.mtime&&!this.noMtime)try{m.default.utimesSync(String(e.absolute),e.atime||new Date,e.mtime)}catch{}if(this[Lt](e))try{m.default.chownSync(String(e.absolute),Number(this[At](e)),Number(this[It](e)))}catch{}t(),e.resume()}[De](e,t){try{return(0,oo.mkdirSync)((0,U.normalizeWindowsPath)(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:t})}catch(i){return i}}[Mt](e,t,i,r,n){if(this.preservePaths||!i.length)return r();let o=t;for(let a of i){o=g.default.resolve(o,a);let[h,l]=Nt(()=>m.default.lstatSync(o));if(h)return r();if(l.isSymbolicLink())return n(new ao.SymlinkError(o,g.default.resolve(t,i.join("/"))))}r()}[Wi](e,t,i,r){let n=`${i}Sync`;try{m.default[n](t,String(e.absolute)),r(),e.resume()}catch(o){return this[T](o,e)}}};z.UnpackSync=Nr});var Ar=d(G=>{"use strict";var nl=G&&G.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),ol=G&&G.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),al=G&&G.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r{let e=new Zi.UnpackSync(s),t=s.file,i=lo.default.statSync(t),r=s.maxReadSize||16*1024*1024;new ho.ReadStreamSync(t,{readSize:r,size:i.size}).pipe(e)},fl=(s,e)=>{let t=new Zi.Unpack(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,a)=>{t.on("error",a),t.on("close",o),lo.default.stat(r,(h,l)=>{if(h)a(h);else{let u=new ho.ReadStream(r,{readSize:i,size:l.size});u.on("error",a),u.pipe(t)}})})};G.extract=(0,ul.makeCommand)(cl,fl,s=>new Zi.UnpackSync(s),s=>new Zi.Unpack(s),(s,e)=>{e?.length&&(0,ll.filesFilter)(s,e)})});var Gi=d(ct=>{"use strict";var uo=ct&&ct.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ct,"__esModule",{value:!0});ct.replace=void 0;var co=Ke(),q=uo(require("node:fs")),fo=uo(require("node:path")),mo=Je(),po=st(),dl=Ve(),ml=Vt(),_o=Ai(),pl=(s,e)=>{let t=new _o.PackSync(s),i=!0,r,n;try{try{r=q.default.openSync(s.file,"r+")}catch(h){if(h?.code==="ENOENT")r=q.default.openSync(s.file,"w+");else throw h}let o=q.default.fstatSync(r),a=Buffer.alloc(512);e:for(n=0;no.size)break;n+=l,s.mtimeCache&&h.mtime&&s.mtimeCache.set(String(h.path),h.mtime)}i=!1,_l(s,t,n,r,e)}finally{if(i)try{q.default.closeSync(r)}catch{}}},_l=(s,e,t,i,r)=>{let n=new co.WriteStreamSync(s.file,{fd:i,start:t});e.pipe(n),yl(e,r)},wl=(s,e)=>{e=Array.from(e);let t=new _o.Pack(s),i=(n,o,a)=>{let h=(D,A)=>{D?q.default.close(n,w=>a(D)):a(null,A)},l=0;if(o===0)return h(null,0);let u=0,c=Buffer.alloc(512),E=(D,A)=>{if(D||typeof A>"u")return h(D);if(u+=A,u<512&&A)return q.default.read(n,c,u,c.length-u,l+u,E);if(l===0&&c[0]===31&&c[1]===139)return h(new Error("cannot append to compressed archives"));if(u<512)return h(null,l);let w=new mo.Header(c);if(!w.cksumValid)return h(null,l);let P=512*Math.ceil((w.size??0)/512);if(l+P+512>o||(l+=P+512,l>=o))return h(null,l);s.mtimeCache&&w.mtime&&s.mtimeCache.set(String(w.path),w.mtime),u=0,q.default.read(n,c,0,512,l,E)};q.default.read(n,c,0,512,l,E)};return new Promise((n,o)=>{t.on("error",o);let a="r+",h=(l,u)=>{if(l&&l.code==="ENOENT"&&a==="r+")return a="w+",q.default.open(s.file,a,h);if(l||!u)return o(l);q.default.fstat(u,(c,E)=>{if(c)return q.default.close(u,()=>o(c));i(u,E.size,(D,A)=>{if(D)return o(D);let w=new co.WriteStream(s.file,{fd:u,start:A});t.pipe(w),w.on("error",o),w.on("close",n),El(t,e)})})};q.default.open(s.file,a,h)})},yl=(s,e)=>{e.forEach(t=>{t.charAt(0)==="@"?(0,po.list)({file:fo.default.resolve(s.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(t)}),s.end()},El=async(s,e)=>{for(let t=0;ts.add(r)}):s.add(i)}s.end()};ct.replace=(0,dl.makeCommand)(pl,wl,()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(s,e)=>{if(!(0,ml.isFile)(s))throw new TypeError("file is required");if(s.gzip||s.brotli||s.zstd||s.file.endsWith(".br")||s.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e?.length)throw new TypeError("no paths specified to add/replace")})});var Ir=d(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.update=void 0;var bl=Ve(),Bt=Gi();Yi.update=(0,bl.makeCommand)(Bt.replace.syncFile,Bt.replace.asyncFile,Bt.replace.syncNoFile,Bt.replace.asyncNoFile,(s,e=[])=>{Bt.replace.validate?.(s,e),Sl(s)});var Sl=s=>{let e=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=e?(t,i)=>e(t,i)&&!((s.mtimeCache?.get(t)??i.mtime??0)>(i.mtime??0)):(t,i)=>!((s.mtimeCache?.get(t)??i.mtime??0)>(i.mtime??0))}});var wo=exports&&exports.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),gl=exports&&exports.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Y=exports&&exports.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&wo(e,s,t)},Rl=exports&&exports.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(t){var i=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[i.length]=r);return i},s(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i=s(e),r=0;r process.umask(); +exports.umask = umask; +//# sourceMappingURL=process-umask.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/tar/dist/commonjs/unpack.js b/deps/npm/node_modules/tar/dist/commonjs/unpack.js index 73ad5f9be55408..dce465312bc7e6 100644 --- a/deps/npm/node_modules/tar/dist/commonjs/unpack.js +++ b/deps/npm/node_modules/tar/dist/commonjs/unpack.js @@ -54,6 +54,8 @@ const parse_js_1 = require("./parse.js"); const strip_absolute_path_js_1 = require("./strip-absolute-path.js"); const wc = __importStar(require("./winchars.js")); const path_reservations_js_1 = require("./path-reservations.js"); +const symlink_error_js_1 = require("./symlink-error.js"); +const process_umask_js_1 = require("./process-umask.js"); const ONENTRY = Symbol('onEntry'); const CHECKFS = Symbol('checkFs'); const CHECKFS2 = Symbol('checkFs2'); @@ -64,6 +66,7 @@ const DIRECTORY = Symbol('directory'); const LINK = Symbol('link'); const SYMLINK = Symbol('symlink'); const HARDLINK = Symbol('hardlink'); +const ENSURE_NO_SYMLINK = Symbol('ensureNoSymlink'); const UNSUPPORTED = Symbol('unsupported'); const CHECKPATH = Symbol('checkPath'); const STRIPABSOLUTEPATH = Symbol('stripAbsolutePath'); @@ -226,7 +229,7 @@ class Unpack extends parse_js_1.Parser { this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === 'number' ? opt.processUmask - : process.umask(); + : (0, process_umask_js_1.umask)(); this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask; // default mode for dirs created as parents @@ -301,6 +304,7 @@ class Unpack extends parse_js_1.Parser { } return true; } + // no IO, just string checking for absolute indicators [CHECKPATH](entry) { const p = (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path); const parts = p.split('/'); @@ -561,11 +565,33 @@ class Unpack extends parse_js_1.Parser { entry.resume(); } [SYMLINK](entry, done) { - this[LINK](entry, String(entry.linkpath), 'symlink', done); + const parts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(this.cwd, node_path_1.default.resolve(node_path_1.default.dirname(String(entry.absolute)), String(entry.linkpath)))).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, String(entry.linkpath), 'symlink', done), er => { + this[ONERROR](er, entry); + done(); + }); } [HARDLINK](entry, done) { const linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, String(entry.linkpath))); - this[LINK](entry, linkpath, 'link', done); + const parts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(String(entry.linkpath)).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, linkpath, 'link', done), er => { + this[ONERROR](er, entry); + done(); + }); + } + [ENSURE_NO_SYMLINK](entry, cwd, parts, done, onError) { + const p = parts.shift(); + if (this.preservePaths || p === undefined) + return done(); + const t = node_path_1.default.resolve(cwd, p); + node_fs_1.default.lstat(t, (er, st) => { + if (er) + return done(); + if (st?.isSymbolicLink()) { + return onError(new symlink_error_js_1.SymlinkError(t, node_path_1.default.resolve(t, parts.join('/')))); + } + this[ENSURE_NO_SYMLINK](entry, t, parts, done, onError); + }); } [PEND]() { this[PENDING]++; @@ -699,7 +725,6 @@ class Unpack extends parse_js_1.Parser { } } [LINK](entry, linkpath, link, done) { - // XXX: get the type ('symlink' or 'junction') for windows node_fs_1.default[link](linkpath, String(entry.absolute), er => { if (er) { this[ONERROR](er, entry); @@ -901,10 +926,25 @@ class UnpackSync extends Unpack { return er; } } + [ENSURE_NO_SYMLINK](_entry, cwd, parts, done, onError) { + if (this.preservePaths || !parts.length) + return done(); + let t = cwd; + for (const p of parts) { + t = node_path_1.default.resolve(t, p); + const [er, st] = callSync(() => node_fs_1.default.lstatSync(t)); + if (er) + return done(); + if (st.isSymbolicLink()) { + return onError(new symlink_error_js_1.SymlinkError(t, node_path_1.default.resolve(cwd, parts.join('/')))); + } + } + done(); + } [LINK](entry, linkpath, link, done) { - const ls = `${link}Sync`; + const linkSync = `${link}Sync`; try { - node_fs_1.default[ls](linkpath, String(entry.absolute)); + node_fs_1.default[linkSync](linkpath, String(entry.absolute)); done(); entry.resume(); } diff --git a/deps/npm/node_modules/tar/dist/esm/index.min.js b/deps/npm/node_modules/tar/dist/esm/index.min.js new file mode 100644 index 00000000000000..4e06ce82dfbdef --- /dev/null +++ b/deps/npm/node_modules/tar/dist/esm/index.min.js @@ -0,0 +1,4 @@ +var Dr=Object.defineProperty;var Ar=(s,t)=>{for(var e in t)Dr(s,e,{get:t[e],enumerable:!0})};import Hr from"events";import I from"fs";import{EventEmitter as Oi}from"node:events";import Ds from"node:stream";import{StringDecoder as Ir}from"node:string_decoder";var Ts=typeof process=="object"&&process?process:{stdout:null,stderr:null},Cr=s=>!!s&&typeof s=="object"&&(s instanceof A||s instanceof Ds||Fr(s)||kr(s)),Fr=s=>!!s&&typeof s=="object"&&s instanceof Oi&&typeof s.pipe=="function"&&s.pipe!==Ds.Writable.prototype.pipe,kr=s=>!!s&&typeof s=="object"&&s instanceof Oi&&typeof s.write=="function"&&typeof s.end=="function",q=Symbol("EOF"),j=Symbol("maybeEmitEnd"),rt=Symbol("emittedEnd"),xe=Symbol("emittingEnd"),jt=Symbol("emittedError"),Le=Symbol("closed"),xs=Symbol("read"),Ne=Symbol("flush"),Ls=Symbol("flushChunk"),z=Symbol("encoding"),Mt=Symbol("decoder"),b=Symbol("flowing"),Qt=Symbol("paused"),Bt=Symbol("resume"),g=Symbol("buffer"),D=Symbol("pipes"),_=Symbol("bufferLength"),Si=Symbol("bufferPush"),De=Symbol("bufferShift"),L=Symbol("objectMode"),w=Symbol("destroyed"),yi=Symbol("error"),Ri=Symbol("emitData"),Ns=Symbol("emitEnd"),bi=Symbol("emitEnd2"),Z=Symbol("async"),gi=Symbol("abort"),Ae=Symbol("aborted"),Jt=Symbol("signal"),yt=Symbol("dataListeners"),C=Symbol("discarded"),te=s=>Promise.resolve().then(s),vr=s=>s(),Mr=s=>s==="end"||s==="finish"||s==="prefinish",Br=s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,Pr=s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),Ie=class{src;dest;opts;ondrain;constructor(t,e,i){this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[Bt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},_i=class extends Ie{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,i){super(t,e,i),this.proxyErrors=r=>e.emit("error",r),t.on("error",this.proxyErrors)}},zr=s=>!!s.objectMode,Ur=s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer",A=class extends Oi{[b]=!1;[Qt]=!1;[D]=[];[g]=[];[L];[z];[Z];[Mt];[q]=!1;[rt]=!1;[xe]=!1;[Le]=!1;[jt]=null;[_]=0;[w]=!1;[Jt];[Ae]=!1;[yt]=0;[C]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");zr(e)?(this[L]=!0,this[z]=null):Ur(e)?(this[z]=e.encoding,this[L]=!1):(this[L]=!1,this[z]=null),this[Z]=!!e.async,this[Mt]=this[z]?new Ir(this[z]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[g]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[D]});let{signal:i}=e;i&&(this[Jt]=i,i.aborted?this[gi]():i.addEventListener("abort",()=>this[gi]()))}get bufferLength(){return this[_]}get encoding(){return this[z]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[L]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Z]}set async(t){this[Z]=this[Z]||!!t}[gi](){this[Ae]=!0,this.emit("abort",this[Jt]?.reason),this.destroy(this[Jt]?.reason)}get aborted(){return this[Ae]}set aborted(t){}write(t,e,i){if(this[Ae])return!1;if(this[q])throw new Error("write after end");if(this[w])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(i=e,e="utf8"),e||(e="utf8");let r=this[Z]?te:vr;if(!this[L]&&!Buffer.isBuffer(t)){if(Pr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Br(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[L]?(this[b]&&this[_]!==0&&this[Ne](!0),this[b]?this.emit("data",t):this[Si](t),this[_]!==0&&this.emit("readable"),i&&r(i),this[b]):t.length?(typeof t=="string"&&!(e===this[z]&&!this[Mt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[z]&&(t=this[Mt].write(t)),this[b]&&this[_]!==0&&this[Ne](!0),this[b]?this.emit("data",t):this[Si](t),this[_]!==0&&this.emit("readable"),i&&r(i),this[b]):(this[_]!==0&&this.emit("readable"),i&&r(i),this[b])}read(t){if(this[w])return null;if(this[C]=!1,this[_]===0||t===0||t&&t>this[_])return this[j](),null;this[L]&&(t=null),this[g].length>1&&!this[L]&&(this[g]=[this[z]?this[g].join(""):Buffer.concat(this[g],this[_])]);let e=this[xs](t||null,this[g][0]);return this[j](),e}[xs](t,e){if(this[L])this[De]();else{let i=e;t===i.length||t===null?this[De]():typeof i=="string"?(this[g][0]=i.slice(t),e=i.slice(0,t),this[_]-=t):(this[g][0]=i.subarray(t),e=i.subarray(0,t),this[_]-=t)}return this.emit("data",e),!this[g].length&&!this[q]&&this.emit("drain"),e}end(t,e,i){return typeof t=="function"&&(i=t,t=void 0),typeof e=="function"&&(i=e,e="utf8"),t!==void 0&&this.write(t,e),i&&this.once("end",i),this[q]=!0,this.writable=!1,(this[b]||!this[Qt])&&this[j](),this}[Bt](){this[w]||(!this[yt]&&!this[D].length&&(this[C]=!0),this[Qt]=!1,this[b]=!0,this.emit("resume"),this[g].length?this[Ne]():this[q]?this[j]():this.emit("drain"))}resume(){return this[Bt]()}pause(){this[b]=!1,this[Qt]=!0,this[C]=!1}get destroyed(){return this[w]}get flowing(){return this[b]}get paused(){return this[Qt]}[Si](t){this[L]?this[_]+=1:this[_]+=t.length,this[g].push(t)}[De](){return this[L]?this[_]-=1:this[_]-=this[g][0].length,this[g].shift()}[Ne](t=!1){do;while(this[Ls](this[De]())&&this[g].length);!t&&!this[g].length&&!this[q]&&this.emit("drain")}[Ls](t){return this.emit("data",t),this[b]}pipe(t,e){if(this[w])return t;this[C]=!1;let i=this[rt];return e=e||{},t===Ts.stdout||t===Ts.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[D].push(e.proxyErrors?new _i(this,t,e):new Ie(this,t,e)),this[Z]?te(()=>this[Bt]()):this[Bt]()),t}unpipe(t){let e=this[D].find(i=>i.dest===t);e&&(this[D].length===1?(this[b]&&this[yt]===0&&(this[b]=!1),this[D]=[]):this[D].splice(this[D].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let i=super.on(t,e);if(t==="data")this[C]=!1,this[yt]++,!this[D].length&&!this[b]&&this[Bt]();else if(t==="readable"&&this[_]!==0)super.emit("readable");else if(Mr(t)&&this[rt])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[jt]){let r=e;this[Z]?te(()=>r.call(this,this[jt])):r.call(this,this[jt])}return i}removeListener(t,e){return this.off(t,e)}off(t,e){let i=super.off(t,e);return t==="data"&&(this[yt]=this.listeners("data").length,this[yt]===0&&!this[C]&&!this[D].length&&(this[b]=!1)),i}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[yt]=0,!this[C]&&!this[D].length&&(this[b]=!1)),e}get emittedEnd(){return this[rt]}[j](){!this[xe]&&!this[rt]&&!this[w]&&this[g].length===0&&this[q]&&(this[xe]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Le]&&this.emit("close"),this[xe]=!1)}emit(t,...e){let i=e[0];if(t!=="error"&&t!=="close"&&t!==w&&this[w])return!1;if(t==="data")return!this[L]&&!i?!1:this[Z]?(te(()=>this[Ri](i)),!0):this[Ri](i);if(t==="end")return this[Ns]();if(t==="close"){if(this[Le]=!0,!this[rt]&&!this[w])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(t==="error"){this[jt]=i,super.emit(yi,i);let n=!this[Jt]||this.listeners("error").length?super.emit("error",i):!1;return this[j](),n}else if(t==="resume"){let n=super.emit("resume");return this[j](),n}else if(t==="finish"||t==="prefinish"){let n=super.emit(t);return this.removeAllListeners(t),n}let r=super.emit(t,...e);return this[j](),r}[Ri](t){for(let i of this[D])i.dest.write(t)===!1&&this.pause();let e=this[C]?!1:super.emit("data",t);return this[j](),e}[Ns](){return this[rt]?!1:(this[rt]=!0,this.readable=!1,this[Z]?(te(()=>this[bi]()),!0):this[bi]())}[bi](){if(this[Mt]){let e=this[Mt].end();if(e){for(let i of this[D])i.dest.write(e);this[C]||super.emit("data",e)}}for(let e of this[D])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[L]||(t.dataLength=0);let e=this.promise();return this.on("data",i=>{t.push(i),this[L]||(t.dataLength+=i.length)}),await e,t}async concat(){if(this[L])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[z]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(w,()=>e(new Error("stream destroyed"))),this.on("error",i=>e(i)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[C]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[q])return e();let n,o,h=d=>{this.off("data",a),this.off("end",l),this.off(w,c),e(),o(d)},a=d=>{this.off("error",h),this.off("end",l),this.off(w,c),this.pause(),n({value:d,done:!!this[q]})},l=()=>{this.off("error",h),this.off("data",a),this.off(w,c),e(),n({done:!0,value:void 0})},c=()=>h(new Error("stream destroyed"));return new Promise((d,S)=>{o=S,n=d,this.once(w,c),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[C]=!1;let t=!1,e=()=>(this.pause(),this.off(yi,e),this.off(w,e),this.off("end",e),t=!0,{done:!0,value:void 0}),i=()=>{if(t)return e();let r=this.read();return r===null?e():{done:!1,value:r}};return this.once("end",e),this.once(yi,e),this.once(w,e),{next:i,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[w])return t?this.emit("error",t):this.emit(w),this;this[w]=!0,this[C]=!0,this[g].length=0,this[_]=0;let e=this;return typeof e.close=="function"&&!this[Le]&&e.close(),t?this.emit("error",t):this.emit(w),this}static get isStream(){return Cr}};var Wr=I.writev,ot=Symbol("_autoClose"),H=Symbol("_close"),ee=Symbol("_ended"),m=Symbol("_fd"),Ti=Symbol("_finished"),J=Symbol("_flags"),xi=Symbol("_flush"),Ai=Symbol("_handleChunk"),Ii=Symbol("_makeBuf"),se=Symbol("_mode"),Ce=Symbol("_needDrain"),Ut=Symbol("_onerror"),Ht=Symbol("_onopen"),Li=Symbol("_onread"),Pt=Symbol("_onwrite"),ht=Symbol("_open"),U=Symbol("_path"),nt=Symbol("_pos"),Y=Symbol("_queue"),zt=Symbol("_read"),Ni=Symbol("_readSize"),Q=Symbol("_reading"),ie=Symbol("_remain"),Di=Symbol("_size"),Fe=Symbol("_write"),Rt=Symbol("_writing"),ke=Symbol("_defaultFlag"),bt=Symbol("_errored"),gt=class extends A{[bt]=!1;[m];[U];[Ni];[Q]=!1;[Di];[ie];[ot];constructor(t,e){if(e=e||{},super(e),this.readable=!0,this.writable=!1,typeof t!="string")throw new TypeError("path must be a string");this[bt]=!1,this[m]=typeof e.fd=="number"?e.fd:void 0,this[U]=t,this[Ni]=e.readSize||16*1024*1024,this[Q]=!1,this[Di]=typeof e.size=="number"?e.size:1/0,this[ie]=this[Di],this[ot]=typeof e.autoClose=="boolean"?e.autoClose:!0,typeof this[m]=="number"?this[zt]():this[ht]()}get fd(){return this[m]}get path(){return this[U]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[ht](){I.open(this[U],"r",(t,e)=>this[Ht](t,e))}[Ht](t,e){t?this[Ut](t):(this[m]=e,this.emit("open",e),this[zt]())}[Ii](){return Buffer.allocUnsafe(Math.min(this[Ni],this[ie]))}[zt](){if(!this[Q]){this[Q]=!0;let t=this[Ii]();if(t.length===0)return process.nextTick(()=>this[Li](null,0,t));I.read(this[m],t,0,t.length,null,(e,i,r)=>this[Li](e,i,r))}}[Li](t,e,i){this[Q]=!1,t?this[Ut](t):this[Ai](e,i)&&this[zt]()}[H](){if(this[ot]&&typeof this[m]=="number"){let t=this[m];this[m]=void 0,I.close(t,e=>e?this.emit("error",e):this.emit("close"))}}[Ut](t){this[Q]=!0,this[H](),this.emit("error",t)}[Ai](t,e){let i=!1;return this[ie]-=t,t>0&&(i=super.write(tthis[Ht](t,e))}[Ht](t,e){this[ke]&&this[J]==="r+"&&t&&t.code==="ENOENT"?(this[J]="w",this[ht]()):t?this[Ut](t):(this[m]=e,this.emit("open",e),this[Rt]||this[xi]())}end(t,e){return t&&this.write(t,e),this[ee]=!0,!this[Rt]&&!this[Y].length&&typeof this[m]=="number"&&this[Pt](null,0),this}write(t,e){return typeof t=="string"&&(t=Buffer.from(t,e)),this[ee]?(this.emit("error",new Error("write() after end()")),!1):this[m]===void 0||this[Rt]||this[Y].length?(this[Y].push(t),this[Ce]=!0,!1):(this[Rt]=!0,this[Fe](t),!0)}[Fe](t){I.write(this[m],t,0,t.length,this[nt],(e,i)=>this[Pt](e,i))}[Pt](t,e){t?this[Ut](t):(this[nt]!==void 0&&typeof e=="number"&&(this[nt]+=e),this[Y].length?this[xi]():(this[Rt]=!1,this[ee]&&!this[Ti]?(this[Ti]=!0,this[H](),this.emit("finish")):this[Ce]&&(this[Ce]=!1,this.emit("drain"))))}[xi](){if(this[Y].length===0)this[ee]&&this[Pt](null,0);else if(this[Y].length===1)this[Fe](this[Y].pop());else{let t=this[Y];this[Y]=[],Wr(this[m],t,this[nt],(e,i)=>this[Pt](e,i))}}[H](){if(this[ot]&&typeof this[m]=="number"){let t=this[m];this[m]=void 0,I.close(t,e=>e?this.emit("error",e):this.emit("close"))}}},Wt=class extends tt{[ht](){let t;if(this[ke]&&this[J]==="r+")try{t=I.openSync(this[U],this[J],this[se])}catch(e){if(e?.code==="ENOENT")return this[J]="w",this[ht]();throw e}else t=I.openSync(this[U],this[J],this[se]);this[Ht](null,t)}[H](){if(this[ot]&&typeof this[m]=="number"){let t=this[m];this[m]=void 0,I.closeSync(t),this.emit("close")}}[Fe](t){let e=!0;try{this[Pt](null,I.writeSync(this[m],t,0,t.length,this[nt])),e=!1}finally{if(e)try{this[H]()}catch{}}}};import or from"node:path";import Vt from"node:fs";import{dirname as bn,parse as gn}from"path";var Gr=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),As=s=>!!s.sync&&!!s.file,Is=s=>!s.sync&&!!s.file,Cs=s=>!!s.sync&&!s.file,Fs=s=>!s.sync&&!s.file;var ks=s=>!!s.file;var Zr=s=>{let t=Gr.get(s);return t||s},re=(s={})=>{if(!s)return{};let t={};for(let[e,i]of Object.entries(s)){let r=Zr(e);t[r]=i}return t.chmod===void 0&&t.noChmod===!1&&(t.chmod=!0),delete t.noChmod,t};var K=(s,t,e,i,r)=>Object.assign((n=[],o,h)=>{Array.isArray(n)&&(o=n,n={}),typeof o=="function"&&(h=o,o=void 0),o?o=Array.from(o):o=[];let a=re(n);if(r?.(a,o),As(a)){if(typeof h=="function")throw new TypeError("callback not supported for sync tar functions");return s(a,o)}else if(Is(a)){let l=t(a,o),c=h||void 0;return c?l.then(()=>c(),c):l}else if(Cs(a)){if(typeof h=="function")throw new TypeError("callback not supported for sync tar functions");return e(a,o)}else if(Fs(a)){if(typeof h=="function")throw new TypeError("callback only supported with file option");return i(a,o)}else throw new Error("impossible options??")},{syncFile:s,asyncFile:t,syncNoFile:e,asyncNoFile:i,validate:r});import{EventEmitter as wn}from"events";import vi from"assert";import{Buffer as _t}from"buffer";import*as vs from"zlib";import Yr from"zlib";var Kr=Yr.constants||{ZLIB_VERNUM:4736},M=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},Kr));var Vr=_t.concat,Ms=Object.getOwnPropertyDescriptor(_t,"concat"),$r=s=>s,Fi=Ms?.writable===!0||Ms?.set!==void 0?s=>{_t.concat=s?$r:Vr}:s=>{},Ot=Symbol("_superWrite"),Gt=class extends Error{code;errno;constructor(t,e){super("zlib: "+t.message,{cause:t}),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,e??this.constructor)}get name(){return"ZlibError"}},ki=Symbol("flushFlag"),ne=class extends A{#t=!1;#i=!1;#s;#n;#r;#e;#o;get sawError(){return this.#t}get handle(){return this.#e}get flushFlag(){return this.#s}constructor(t,e){if(!t||typeof t!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(t),this.#s=t.flush??0,this.#n=t.finishFlush??0,this.#r=t.fullFlushFlag??0,typeof vs[e]!="function")throw new TypeError("Compression method not supported: "+e);try{this.#e=new vs[e](t)}catch(i){throw new Gt(i,this.constructor)}this.#o=i=>{this.#t||(this.#t=!0,this.close(),this.emit("error",i))},this.#e?.on("error",i=>this.#o(new Gt(i))),this.once("end",()=>this.close)}close(){this.#e&&(this.#e.close(),this.#e=void 0,this.emit("close"))}reset(){if(!this.#t)return vi(this.#e,"zlib binding closed"),this.#e.reset?.()}flush(t){this.ended||(typeof t!="number"&&(t=this.#r),this.write(Object.assign(_t.alloc(0),{[ki]:t})))}end(t,e,i){return typeof t=="function"&&(i=t,e=void 0,t=void 0),typeof e=="function"&&(i=e,e=void 0),t&&(e?this.write(t,e):this.write(t)),this.flush(this.#n),this.#i=!0,super.end(i)}get ended(){return this.#i}[Ot](t){return super.write(t)}write(t,e,i){if(typeof e=="function"&&(i=e,e="utf8"),typeof t=="string"&&(t=_t.from(t,e)),this.#t)return;vi(this.#e,"zlib binding closed");let r=this.#e._handle,n=r.close;r.close=()=>{};let o=this.#e.close;this.#e.close=()=>{},Fi(!0);let h;try{let l=typeof t[ki]=="number"?t[ki]:this.#s;h=this.#e._processChunk(t,l),Fi(!1)}catch(l){Fi(!1),this.#o(new Gt(l,this.write))}finally{this.#e&&(this.#e._handle=r,r.close=n,this.#e.close=o,this.#e.removeAllListeners("error"))}this.#e&&this.#e.on("error",l=>this.#o(new Gt(l,this.write)));let a;if(h)if(Array.isArray(h)&&h.length>0){let l=h[0];a=this[Ot](_t.from(l));for(let c=1;c{typeof r=="function"&&(n=r,r=this.flushFlag),this.flush(r),n?.()};try{this.handle.params(t,e)}finally{this.handle.flush=i}this.handle&&(this.#t=t,this.#i=e)}}}};var Be=class extends Me{#t;constructor(t){super(t,"Gzip"),this.#t=t&&!!t.portable}[Ot](t){return this.#t?(this.#t=!1,t[9]=255,super[Ot](t)):super[Ot](t)}};var Pe=class extends Me{constructor(t){super(t,"Unzip")}},ze=class extends ne{constructor(t,e){t=t||{},t.flush=t.flush||M.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||M.BROTLI_OPERATION_FINISH,t.fullFlushFlag=M.BROTLI_OPERATION_FLUSH,super(t,e)}},Ue=class extends ze{constructor(t){super(t,"BrotliCompress")}},He=class extends ze{constructor(t){super(t,"BrotliDecompress")}},We=class extends ne{constructor(t,e){t=t||{},t.flush=t.flush||M.ZSTD_e_continue,t.finishFlush=t.finishFlush||M.ZSTD_e_end,t.fullFlushFlag=M.ZSTD_e_flush,super(t,e)}},Ge=class extends We{constructor(t){super(t,"ZstdCompress")}},Ze=class extends We{constructor(t){super(t,"ZstdDecompress")}};import{posix as Zt}from"node:path";var Bs=(s,t)=>{if(Number.isSafeInteger(s))s<0?jr(s,t):qr(s,t);else throw Error("cannot encode number outside of javascript safe integer range");return t},qr=(s,t)=>{t[0]=128;for(var e=t.length;e>1;e--)t[e-1]=s&255,s=Math.floor(s/256)},jr=(s,t)=>{t[0]=255;var e=!1;s=s*-1;for(var i=t.length;i>1;i--){var r=s&255;s=Math.floor(s/256),e?t[i-1]=zs(r):r===0?t[i-1]=0:(e=!0,t[i-1]=Us(r))}},Ps=s=>{let t=s[0],e=t===128?Jr(s.subarray(1,s.length)):t===255?Qr(s):null;if(e===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(e))throw Error("parsed number outside of javascript safe integer range");return e},Qr=s=>{for(var t=s.length,e=0,i=!1,r=t-1;r>-1;r--){var n=Number(s[r]),o;i?o=zs(n):n===0?o=n:(i=!0,o=Us(n)),o!==0&&(e-=o*Math.pow(256,t-r-1))}return e},Jr=s=>{for(var t=s.length,e=0,i=t-1;i>-1;i--){var r=Number(s[i]);r!==0&&(e+=r*Math.pow(256,t-i-1))}return e},zs=s=>(255^s)&255,Us=s=>(255^s)+1&255;var Mi={};Ar(Mi,{code:()=>Ye,isCode:()=>oe,isName:()=>en,name:()=>he});var oe=s=>he.has(s),en=s=>Ye.has(s),he=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),Ye=new Map(Array.from(he).map(s=>[s[1],s[0]]));var F=class{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#t="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,e=0,i,r){Buffer.isBuffer(t)?this.decode(t,e||0,i,r):t&&this.#i(t)}decode(t,e,i,r){if(e||(e=0),!t||!(t.length>=e+512))throw new Error("need 512 bytes for header");this.path=i?.path??Tt(t,e,100),this.mode=i?.mode??r?.mode??at(t,e+100,8),this.uid=i?.uid??r?.uid??at(t,e+108,8),this.gid=i?.gid??r?.gid??at(t,e+116,8),this.size=i?.size??r?.size??at(t,e+124,12),this.mtime=i?.mtime??r?.mtime??Bi(t,e+136,12),this.cksum=at(t,e+148,12),r&&this.#i(r,!0),i&&this.#i(i);let n=Tt(t,e+156,1);if(oe(n)&&(this.#t=n||"0"),this.#t==="0"&&this.path.slice(-1)==="/"&&(this.#t="5"),this.#t==="5"&&(this.size=0),this.linkpath=Tt(t,e+157,100),t.subarray(e+257,e+265).toString()==="ustar\x0000")if(this.uname=i?.uname??r?.uname??Tt(t,e+265,32),this.gname=i?.gname??r?.gname??Tt(t,e+297,32),this.devmaj=i?.devmaj??r?.devmaj??at(t,e+329,8)??0,this.devmin=i?.devmin??r?.devmin??at(t,e+337,8)??0,t[e+475]!==0){let h=Tt(t,e+345,155);this.path=h+"/"+this.path}else{let h=Tt(t,e+345,130);h&&(this.path=h+"/"+this.path),this.atime=i?.atime??r?.atime??Bi(t,e+476,12),this.ctime=i?.ctime??r?.ctime??Bi(t,e+488,12)}let o=256;for(let h=e;h!(r==null||i==="path"&&e||i==="linkpath"&&e||i==="global"))))}encode(t,e=0){if(t||(t=this.block=Buffer.alloc(512)),this.#t==="Unsupported"&&(this.#t="0"),!(t.length>=e+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,r=sn(this.path||"",i),n=r[0],o=r[1];this.needPax=!!r[2],this.needPax=xt(t,e,100,n)||this.needPax,this.needPax=lt(t,e+100,8,this.mode)||this.needPax,this.needPax=lt(t,e+108,8,this.uid)||this.needPax,this.needPax=lt(t,e+116,8,this.gid)||this.needPax,this.needPax=lt(t,e+124,12,this.size)||this.needPax,this.needPax=Pi(t,e+136,12,this.mtime)||this.needPax,t[e+156]=this.#t.charCodeAt(0),this.needPax=xt(t,e+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",e+257,8),this.needPax=xt(t,e+265,32,this.uname)||this.needPax,this.needPax=xt(t,e+297,32,this.gname)||this.needPax,this.needPax=lt(t,e+329,8,this.devmaj)||this.needPax,this.needPax=lt(t,e+337,8,this.devmin)||this.needPax,this.needPax=xt(t,e+345,i,o)||this.needPax,t[e+475]!==0?this.needPax=xt(t,e+345,155,o)||this.needPax:(this.needPax=xt(t,e+345,130,o)||this.needPax,this.needPax=Pi(t,e+476,12,this.atime)||this.needPax,this.needPax=Pi(t,e+488,12,this.ctime)||this.needPax);let h=256;for(let a=e;a{let i=s,r="",n,o=Zt.parse(s).root||".";if(Buffer.byteLength(i)<100)n=[i,r,!1];else{r=Zt.dirname(i),i=Zt.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(r)<=t?n=[i,r,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(r)<=t?n=[i.slice(0,99),r,!0]:(i=Zt.join(Zt.basename(r),i),r=Zt.dirname(r));while(r!==o&&n===void 0);n||(n=[s.slice(0,99),"",!0])}return n},Tt=(s,t,e)=>s.subarray(t,t+e).toString("utf8").replace(/\0.*/,""),Bi=(s,t,e)=>rn(at(s,t,e)),rn=s=>s===void 0?void 0:new Date(s*1e3),at=(s,t,e)=>Number(s[t])&128?Ps(s.subarray(t,t+e)):on(s,t,e),nn=s=>isNaN(s)?void 0:s,on=(s,t,e)=>nn(parseInt(s.subarray(t,t+e).toString("utf8").replace(/\0.*$/,"").trim(),8)),hn={12:8589934591,8:2097151},lt=(s,t,e,i)=>i===void 0?!1:i>hn[e]||i<0?(Bs(i,s.subarray(t,t+e)),!0):(an(s,t,e,i),!1),an=(s,t,e,i)=>s.write(ln(i,e),t,e,"ascii"),ln=(s,t)=>cn(Math.floor(s).toString(8),t),cn=(s,t)=>(s.length===t-1?s:new Array(t-s.length-1).join("0")+s+" ")+"\0",Pi=(s,t,e,i)=>i===void 0?!1:lt(s,t,e,i.getTime()/1e3),fn=new Array(156).join("\0"),xt=(s,t,e,i)=>i===void 0?!1:(s.write(i+fn,t,e,"utf8"),i.length!==Buffer.byteLength(i)||i.length>e);import{basename as dn}from"node:path";var ct=class s{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,e=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=e,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){let t=this.encodeBody();if(t==="")return Buffer.allocUnsafe(0);let e=Buffer.byteLength(t),i=512*Math.ceil(1+e/512),r=Buffer.allocUnsafe(i);for(let n=0;n<512;n++)r[n]=0;new F({path:("PaxHeader/"+dn(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:e,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(t,512,e,"utf8");for(let n=e+512;n=Math.pow(10,o)&&(o+=1),o+n+r}static parse(t,e,i=!1){return new s(un(mn(t),e),i)}},un=(s,t)=>t?Object.assign({},t,s):s,mn=s=>s.replace(/\n$/,"").split(` +`).reduce(pn,Object.create(null)),pn=(s,t)=>{let e=parseInt(t,10);if(e!==Buffer.byteLength(t)+1)return s;t=t.slice((e+" ").length);let i=t.split("="),r=i.shift();if(!r)return s;let n=r.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),o=i.join("=");return s[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(Number(o)*1e3):/^[0-9]+$/.test(o)?+o:o,s};var En=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,f=En!=="win32"?s=>s:s=>s&&s.replace(/\\/g,"/");var Yt=class extends A{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,e,i){switch(super({}),this.pause(),this.extended=e,this.globalExtended=i,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw new Error("no path provided for tar.ReadEntry");this.path=f(t.path),this.mode=t.mode,this.mode&&(this.mode=this.mode&4095),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?f(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,e&&this.#t(e),i&&this.#t(i,!0)}write(t){let e=t.length;if(e>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,r=this.blockRemain;return this.remain=Math.max(0,i-e),this.blockRemain=Math.max(0,r-e),this.ignore?!0:i>=e?super.write(t):super.write(t.subarray(0,i))}#t(t,e=!1){t.path&&(t.path=f(t.path)),t.linkpath&&(t.linkpath=f(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter(([i,r])=>!(r==null||i==="path"&&e))))}};var Lt=(s,t,e,i={})=>{s.file&&(i.file=s.file),s.cwd&&(i.cwd=s.cwd),i.code=e instanceof Error&&e.code||t,i.tarCode=t,!s.strict&&i.recoverable!==!1?(e instanceof Error&&(i=Object.assign(e,i),e=e.message),s.emit("warn",t,e,i)):e instanceof Error?s.emit("error",Object.assign(e,i)):s.emit("error",Object.assign(new Error(`${t}: ${e}`),i))};var Sn=1024*1024,Gi=Buffer.from([31,139]),Zi=Buffer.from([40,181,47,253]),yn=Math.max(Gi.length,Zi.length),B=Symbol("state"),Nt=Symbol("writeEntry"),et=Symbol("readEntry"),zi=Symbol("nextEntry"),Hs=Symbol("processEntry"),V=Symbol("extendedHeader"),ae=Symbol("globalExtendedHeader"),ft=Symbol("meta"),Ws=Symbol("emitMeta"),p=Symbol("buffer"),it=Symbol("queue"),dt=Symbol("ended"),Ui=Symbol("emittedEnd"),Dt=Symbol("emit"),y=Symbol("unzip"),Ke=Symbol("consumeChunk"),Ve=Symbol("consumeChunkSub"),Hi=Symbol("consumeBody"),Gs=Symbol("consumeMeta"),Zs=Symbol("consumeHeader"),le=Symbol("consuming"),Wi=Symbol("bufferConcat"),$e=Symbol("maybeEnd"),Kt=Symbol("writing"),ut=Symbol("aborted"),Xe=Symbol("onDone"),At=Symbol("sawValidEntry"),qe=Symbol("sawNullBlock"),je=Symbol("sawEOF"),Ys=Symbol("closeStream"),Rn=()=>!0,st=class extends wn{file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[it]=[];[p];[et];[Nt];[B]="begin";[ft]="";[V];[ae];[dt]=!1;[y];[ut]=!1;[At];[qe]=!1;[je]=!1;[Kt]=!1;[le]=!1;[Ui]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(Xe,()=>{(this[B]==="begin"||this[At]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),t.ondone?this.on(Xe,t.ondone):this.on(Xe,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||Sn,this.filter=typeof t.filter=="function"?t.filter:Rn;let e=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=!(t.gzip||t.zstd)&&t.brotli!==void 0?t.brotli:e?void 0:!1;let i=t.file&&(t.file.endsWith(".tar.zst")||t.file.endsWith(".tzst"));this.zstd=!(t.gzip||t.brotli)&&t.zstd!==void 0?t.zstd:i?!0:void 0,this.on("end",()=>this[Ys]()),typeof t.onwarn=="function"&&this.on("warn",t.onwarn),typeof t.onReadEntry=="function"&&this.on("entry",t.onReadEntry)}warn(t,e,i={}){Lt(this,t,e,i)}[Zs](t,e){this[At]===void 0&&(this[At]=!1);let i;try{i=new F(t,e,this[V],this[ae])}catch(r){return this.warn("TAR_ENTRY_INVALID",r)}if(i.nullBlock)this[qe]?(this[je]=!0,this[B]==="begin"&&(this[B]="header"),this[Dt]("eof")):(this[qe]=!0,this[Dt]("nullBlock"));else if(this[qe]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let r=i.type;if(/^(Symbolic)?Link$/.test(r)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(r)&&!/^(Global)?ExtendedHeader$/.test(r)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let n=this[Nt]=new Yt(i,this[V],this[ae]);if(!this[At])if(n.remain){let o=()=>{n.invalid||(this[At]=!0)};n.on("end",o)}else this[At]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Dt]("ignoredEntry",n),this[B]="ignore",n.resume()):n.size>0&&(this[ft]="",n.on("data",o=>this[ft]+=o),this[B]="meta"):(this[V]=void 0,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Dt]("ignoredEntry",n),this[B]=n.remain?"ignore":"header",n.resume()):(n.remain?this[B]="body":(this[B]="header",n.end()),this[et]?this[it].push(n):(this[it].push(n),this[zi]())))}}}[Ys](){queueMicrotask(()=>this.emit("close"))}[Hs](t){let e=!0;if(!t)this[et]=void 0,e=!1;else if(Array.isArray(t)){let[i,...r]=t;this.emit(i,...r)}else this[et]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",()=>this[zi]()),e=!1);return e}[zi](){do;while(this[Hs](this[it].shift()));if(!this[it].length){let t=this[et];!t||t.flowing||t.size===t.remain?this[Kt]||this.emit("drain"):t.once("drain",()=>this.emit("drain"))}}[Hi](t,e){let i=this[Nt];if(!i)throw new Error("attempt to consume body without entry??");let r=i.blockRemain??0,n=r>=t.length&&e===0?t:t.subarray(e,e+r);return i.write(n),i.blockRemain||(this[B]="header",this[Nt]=void 0,i.end()),n.length}[Gs](t,e){let i=this[Nt],r=this[Hi](t,e);return!this[Nt]&&i&&this[Ws](i),r}[Dt](t,e,i){!this[it].length&&!this[et]?this.emit(t,e,i):this[it].push([t,e,i])}[Ws](t){switch(this[Dt]("meta",this[ft]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[V]=ct.parse(this[ft],this[V],!1);break;case"GlobalExtendedHeader":this[ae]=ct.parse(this[ft],this[ae],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let e=this[V]??Object.create(null);this[V]=e,e.path=this[ft].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let e=this[V]||Object.create(null);this[V]=e,e.linkpath=this[ft].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[ut]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,e,i){if(typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof e=="string"?e:"utf8")),this[ut])return i?.(),!1;if((this[y]===void 0||this.brotli===void 0&&this[y]===!1)&&t){if(this[p]&&(t=Buffer.concat([this[p],t]),this[p]=void 0),t.lengththis[Ke](c)),this[y].on("error",c=>this.abort(c)),this[y].on("end",()=>{this[dt]=!0,this[Ke]()}),this[Kt]=!0;let l=!!this[y][a?"end":"write"](t);return this[Kt]=!1,i?.(),l}}this[Kt]=!0,this[y]?this[y].write(t):this[Ke](t),this[Kt]=!1;let n=this[it].length?!1:this[et]?this[et].flowing:!0;return!n&&!this[it].length&&this[et]?.once("drain",()=>this.emit("drain")),i?.(),n}[Wi](t){t&&!this[ut]&&(this[p]=this[p]?Buffer.concat([this[p],t]):t)}[$e](){if(this[dt]&&!this[Ui]&&!this[ut]&&!this[le]){this[Ui]=!0;let t=this[Nt];if(t&&t.blockRemain){let e=this[p]?this[p].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`,{entry:t}),this[p]&&t.write(this[p]),t.end()}this[Dt](Xe)}}[Ke](t){if(this[le]&&t)this[Wi](t);else if(!t&&!this[p])this[$e]();else if(t){if(this[le]=!0,this[p]){this[Wi](t);let e=this[p];this[p]=void 0,this[Ve](e)}else this[Ve](t);for(;this[p]&&this[p]?.length>=512&&!this[ut]&&!this[je];){let e=this[p];this[p]=void 0,this[Ve](e)}this[le]=!1}(!this[p]||this[dt])&&this[$e]()}[Ve](t){let e=0,i=t.length;for(;e+512<=i&&!this[ut]&&!this[je];)switch(this[B]){case"begin":case"header":this[Zs](t,e),e+=512;break;case"ignore":case"body":e+=this[Hi](t,e);break;case"meta":e+=this[Gs](t,e);break;default:throw new Error("invalid state: "+this[B])}e{let t=s.length-1,e=-1;for(;t>-1&&s.charAt(t)==="/";)e=t,t--;return e===-1?s:s.slice(0,e)};var _n=s=>{let t=s.onReadEntry;s.onReadEntry=t?e=>{t(e),e.resume()}:e=>e.resume()},Yi=(s,t)=>{let e=new Map(t.map(n=>[mt(n),!0])),i=s.filter,r=(n,o="")=>{let h=o||gn(n).root||".",a;if(n===h)a=!1;else{let l=e.get(n);l!==void 0?a=l:a=r(bn(n),h)}return e.set(n,a),a};s.filter=i?(n,o)=>i(n,o)&&r(mt(n)):n=>r(mt(n))},On=s=>{let t=new st(s),e=s.file,i;try{i=Vt.openSync(e,"r");let r=Vt.fstatSync(i),n=s.maxReadSize||16*1024*1024;if(r.size{let e=new st(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,h)=>{e.on("error",h),e.on("end",o),Vt.stat(r,(a,l)=>{if(a)h(a);else{let c=new gt(r,{readSize:i,size:l.size});c.on("error",h),c.pipe(e)}})})},It=K(On,Tn,s=>new st(s),s=>new st(s),(s,t)=>{t?.length&&Yi(s,t),s.noResume||_n(s)});import ci from"fs";import $ from"fs";import Xs from"path";var Ki=(s,t,e)=>(s&=4095,e&&(s=(s|384)&-19),t&&(s&256&&(s|=64),s&32&&(s|=8),s&4&&(s|=1)),s);import{win32 as xn}from"node:path";var{isAbsolute:Ln,parse:Ks}=xn,ce=s=>{let t="",e=Ks(s);for(;Ln(s)||e.root;){let i=s.charAt(0)==="/"&&s.slice(0,4)!=="//?/"?"/":e.root;s=s.slice(i.length),t+=i,e=Ks(s)}return[t,s]};var Qe=["|","<",">","?",":"],Vi=Qe.map(s=>String.fromCharCode(61440+s.charCodeAt(0))),Nn=new Map(Qe.map((s,t)=>[s,Vi[t]])),Dn=new Map(Vi.map((s,t)=>[s,Qe[t]])),$i=s=>Qe.reduce((t,e)=>t.split(e).join(Nn.get(e)),s),Vs=s=>Vi.reduce((t,e)=>t.split(e).join(Dn.get(e)),s);var tr=(s,t)=>t?(s=f(s).replace(/^\.(\/|$)/,""),mt(t)+"/"+s):f(s),An=16*1024*1024,qs=Symbol("process"),js=Symbol("file"),Qs=Symbol("directory"),qi=Symbol("symlink"),Js=Symbol("hardlink"),fe=Symbol("header"),Je=Symbol("read"),ji=Symbol("lstat"),ti=Symbol("onlstat"),Qi=Symbol("onread"),Ji=Symbol("onreadlink"),ts=Symbol("openfile"),es=Symbol("onopenfile"),pt=Symbol("close"),ei=Symbol("mode"),is=Symbol("awaitDrain"),Xi=Symbol("ondrain"),X=Symbol("prefix"),de=class extends A{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#t=!1;constructor(t,e={}){let i=re(e);super(),this.path=f(t),this.portable=!!i.portable,this.maxReadSize=i.maxReadSize||An,this.linkCache=i.linkCache||new Map,this.statCache=i.statCache||new Map,this.preservePaths=!!i.preservePaths,this.cwd=f(i.cwd||process.cwd()),this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.mtime=i.mtime,this.prefix=i.prefix?f(i.prefix):void 0,this.onWriteEntry=i.onWriteEntry,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let r=!1;if(!this.preservePaths){let[o,h]=ce(this.path);o&&typeof h=="string"&&(this.path=h,r=o)}this.win32=!!i.win32||process.platform==="win32",this.win32&&(this.path=Vs(this.path.replace(/\\/g,"/")),t=t.replace(/\\/g,"/")),this.absolute=f(i.absolute||Xs.resolve(this.cwd,t)),this.path===""&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});let n=this.statCache.get(this.absolute);n?this[ti](n):this[ji]()}warn(t,e,i={}){return Lt(this,t,e,i)}emit(t,...e){return t==="error"&&(this.#t=!0),super.emit(t,...e)}[ji](){$.lstat(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[ti](e)})}[ti](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=In(t),this.emit("stat",t),this[qs]()}[qs](){switch(this.type){case"File":return this[js]();case"Directory":return this[Qs]();case"SymbolicLink":return this[qi]();default:return this.end()}}[ei](t){return Ki(t,this.type==="Directory",this.portable)}[X](t){return tr(t,this.prefix)}[fe](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new F({path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,mode:this[ei](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new ct({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let t=this.header?.block;if(!t)throw new Error("failed to encode header");super.write(t)}[Qs](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[fe](),this.end()}[qi](){$.readlink(this.absolute,(t,e)=>{if(t)return this.emit("error",t);this[Ji](e)})}[Ji](t){this.linkpath=f(t),this[fe](),this.end()}[Js](t){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=f(Xs.relative(this.cwd,t)),this.stat.size=0,this[fe](),this.end()}[js](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let t=`${this.stat.dev}:${this.stat.ino}`,e=this.linkCache.get(t);if(e?.indexOf(this.cwd)===0)return this[Js](e);this.linkCache.set(t,this.absolute)}if(this[fe](),this.stat.size===0)return this.end();this[ts]()}[ts](){$.open(this.absolute,"r",(t,e)=>{if(t)return this.emit("error",t);this[es](e)})}[es](t){if(this.fd=t,this.#t)return this[pt]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let e=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(e),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[Je]()}[Je](){let{fd:t,buf:e,offset:i,length:r,pos:n}=this;if(t===void 0||e===void 0)throw new Error("cannot read file without first opening");$.read(t,e,i,r,n,(o,h)=>{if(o)return this[pt](()=>this.emit("error",o));this[Qi](h)})}[pt](t=()=>{}){this.fd!==void 0&&$.close(this.fd,t)}[Qi](t){if(t<=0&&this.remain>0){let r=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[pt](()=>this.emit("error",r))}if(t>this.remain){let r=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[pt](()=>this.emit("error",r))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(t===this.remain)for(let r=t;rthis[Xi]())}[is](t){this.once("drain",t)}write(t,e,i){if(typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof e=="string"?e:"utf8")),this.blockRemaint?this.emit("error",t):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[Je]()}},ii=class extends de{sync=!0;[ji](){this[ti]($.lstatSync(this.absolute))}[qi](){this[Ji]($.readlinkSync(this.absolute))}[ts](){this[es]($.openSync(this.absolute,"r"))}[Je](){let t=!0;try{let{fd:e,buf:i,offset:r,length:n,pos:o}=this;if(e===void 0||i===void 0)throw new Error("fd and buf must be set in READ method");let h=$.readSync(e,i,r,n,o);this[Qi](h),t=!1}finally{if(t)try{this[pt](()=>{})}catch{}}}[is](t){t()}[pt](t=()=>{}){this.fd!==void 0&&$.closeSync(this.fd),t()}},si=class extends A{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,e,i={}){return Lt(this,t,e,i)}constructor(t,e={}){let i=re(e);super(),this.preservePaths=!!i.preservePaths,this.portable=!!i.portable,this.strict=!!i.strict,this.noPax=!!i.noPax,this.noMtime=!!i.noMtime,this.onWriteEntry=i.onWriteEntry,this.readEntry=t;let{type:r}=t;if(r==="Unsupported")throw new Error("writing entry that should be ignored");this.type=r,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=i.prefix,this.path=f(t.path),this.mode=t.mode!==void 0?this[ei](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:i.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=t.linkpath!==void 0?f(t.linkpath):void 0,typeof i.onwarn=="function"&&this.on("warn",i.onwarn);let n=!1;if(!this.preservePaths){let[h,a]=ce(this.path);h&&typeof a=="string"&&(this.path=a,n=h)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new F({path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new ct({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[X](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[X](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let o=this.header?.block;if(!o)throw new Error("failed to encode header");super.write(o),t.pipe(this)}[X](t){return tr(t,this.prefix)}[ei](t){return Ki(t,this.type==="Directory",this.portable)}write(t,e,i){typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,typeof e=="string"?e:"utf8"));let r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t,i)}end(t,e,i){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof t=="function"&&(i=t,e=void 0,t=void 0),typeof e=="function"&&(i=e,e=void 0),typeof t=="string"&&(t=Buffer.from(t,e??"utf8")),i&&this.once("finish",i),t?super.end(t,i):super.end(i),this}},In=s=>s.isFile()?"File":s.isDirectory()?"Directory":s.isSymbolicLink()?"SymbolicLink":"Unsupported";var ri=class s{tail;head;length=0;static create(t=[]){return new s(t)}constructor(t=[]){for(let e of t)this.push(e)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");let e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,e}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);let e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);let e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let e=0,i=t.length;e1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;r;n++)i=t(i,r.value,n),r=r.next;return i}reduceReverse(t,e){let i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let n=this.length-1;r;n--)i=t(i,r.value,n),r=r.prev;return i}toArray(){let t=new Array(this.length);for(let e=0,i=this.head;i;e++)t[e]=i.value,i=i.next;return t}toArrayReverse(){let t=new Array(this.length);for(let e=0,i=this.tail;i;e++)t[e]=i.value,i=i.prev;return t}slice(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);let i=new s;if(ethis.length&&(e=this.length);let r=this.head,n=0;for(n=0;r&&nthis.length&&(e=this.length);let r=this.length,n=this.tail;for(;n&&r>e;r--)n=n.prev;for(;n&&r>t;r--,n=n.prev)i.push(n.value);return i}splice(t,e=0,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let r=this.head;for(let o=0;r&&o1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(t.gzip&&(typeof t.gzip!="object"&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new Be(t.gzip)),t.brotli&&(typeof t.brotli!="object"&&(t.brotli={}),this.zip=new Ue(t.brotli)),t.zstd&&(typeof t.zstd!="object"&&(t.zstd={}),this.zip=new Ge(t.zstd)),!this.zip)throw new Error("impossible");let e=this.zip;e.on("data",i=>super.write(i)),e.on("end",()=>super.end()),e.on("drain",()=>this[os]()),this.on("resume",()=>e.resume())}else this.on("drain",this[os]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter=typeof t.filter=="function"?t.filter:()=>!0,this[W]=new ri,this[G]=0,this.jobs=Number(t.jobs)||4,this[pe]=!1,this[me]=!1}[nr](t){return super.write(t)}add(t){return this.write(t),this}end(t,e,i){return typeof t=="function"&&(i=t,t=void 0),typeof e=="function"&&(i=e,e=void 0),t&&this.add(t),this[me]=!0,this[Ft](),i&&i(),this}write(t){if(this[me])throw new Error("write after end");return t instanceof Yt?this[ir](t):this[oi](t),this.flowing}[ir](t){let e=f(rr.resolve(this.cwd,t.path));if(!this.filter(t.path,t))t.resume();else{let i=new fi(t.path,e);i.entry=new si(t,this[ns](i)),i.entry.on("end",()=>this[rs](i)),this[G]+=1,this[W].push(i)}this[Ft]()}[oi](t){let e=f(rr.resolve(this.cwd,t));this[W].push(new fi(t,e)),this[Ft]()}[hs](t){t.pending=!0,this[G]+=1;let e=this.follow?"stat":"lstat";ci[e](t.absolute,(i,r)=>{t.pending=!1,this[G]-=1,i?this.emit("error",i):this[ni](t,r)})}[ni](t,e){this.statCache.set(t.absolute,e),t.stat=e,this.filter(t.path,e)?e.isFile()&&e.nlink>1&&t===this[Ct]&&!this.linkCache.get(`${e.dev}:${e.ino}`)&&!this.sync&&this[ss](t):t.ignore=!0,this[Ft]()}[as](t){t.pending=!0,this[G]+=1,ci.readdir(t.absolute,(e,i)=>{if(t.pending=!1,this[G]-=1,e)return this.emit("error",e);this[hi](t,i)})}[hi](t,e){this.readdirCache.set(t.absolute,e),t.readdir=e,this[Ft]()}[Ft](){if(!this[pe]){this[pe]=!0;for(let t=this[W].head;t&&this[G]this.warn(e,i,r),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[sr](t){this[G]+=1;try{return new this[li](t.path,this[ns](t)).on("end",()=>this[rs](t)).on("error",i=>this.emit("error",i))}catch(e){this.emit("error",e)}}[os](){this[Ct]&&this[Ct].entry&&this[Ct].entry.resume()}[ai](t){t.piped=!0,t.readdir&&t.readdir.forEach(r=>{let n=t.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[oi](o+r)});let e=t.entry,i=this.zip;if(!e)throw new Error("cannot pipe without source");i?e.on("data",r=>{i.write(r)||e.pause()}):e.on("data",r=>{super.write(r)||e.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,e,i={}){Lt(this,t,e,i)}},kt=class extends Et{sync=!0;constructor(t){super(t),this[li]=ii}pause(){}resume(){}[hs](t){let e=this.follow?"statSync":"lstatSync";this[ni](t,ci[e](t.absolute))}[as](t){this[hi](t,ci.readdirSync(t.absolute))}[ai](t){let e=t.entry,i=this.zip;if(t.readdir&&t.readdir.forEach(r=>{let n=t.path,o=n==="./"?"":n.replace(/\/*$/,"/");this[oi](o+r)}),!e)throw new Error("Cannot pipe without source");i?e.on("data",r=>{i.write(r)}):e.on("data",r=>{super[nr](r)})}};var vn=(s,t)=>{let e=new kt(s),i=new Wt(s.file,{mode:s.mode||438});e.pipe(i),hr(e,t)},Mn=(s,t)=>{let e=new Et(s),i=new tt(s.file,{mode:s.mode||438});e.pipe(i);let r=new Promise((n,o)=>{i.on("error",o),i.on("close",n),e.on("error",o)});return ar(e,t),r},hr=(s,t)=>{t.forEach(e=>{e.charAt(0)==="@"?It({file:or.resolve(s.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(e)}),s.end()},ar=async(s,t)=>{for(let e=0;e{s.add(r)}}):s.add(i)}s.end()},Bn=(s,t)=>{let e=new kt(s);return hr(e,t),e},Pn=(s,t)=>{let e=new Et(s);return ar(e,t),e},zn=K(vn,Mn,Bn,Pn,(s,t)=>{if(!t?.length)throw new TypeError("no paths specified to add to archive")});import Lr from"node:fs";import io from"node:assert";import{randomBytes as xr}from"node:crypto";import u from"node:fs";import R from"node:path";import lr from"fs";var Un=process.env.__FAKE_PLATFORM__||process.platform,Hn=Un==="win32",{O_CREAT:Wn,O_TRUNC:Gn,O_WRONLY:Zn}=lr.constants,cr=Number(process.env.__FAKE_FS_O_FILENAME__)||lr.constants.UV_FS_O_FILEMAP||0,Yn=Hn&&!!cr,Kn=512*1024,Vn=cr|Gn|Wn|Zn,ls=Yn?s=>s"w";import ui from"node:fs";import Ee from"node:path";var cs=(s,t,e)=>{try{return ui.lchownSync(s,t,e)}catch(i){if(i?.code!=="ENOENT")throw i}},di=(s,t,e,i)=>{ui.lchown(s,t,e,r=>{i(r&&r?.code!=="ENOENT"?r:null)})},$n=(s,t,e,i,r)=>{if(t.isDirectory())fs(Ee.resolve(s,t.name),e,i,n=>{if(n)return r(n);let o=Ee.resolve(s,t.name);di(o,e,i,r)});else{let n=Ee.resolve(s,t.name);di(n,e,i,r)}},fs=(s,t,e,i)=>{ui.readdir(s,{withFileTypes:!0},(r,n)=>{if(r){if(r.code==="ENOENT")return i();if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!n.length)return di(s,t,e,i);let o=n.length,h=null,a=l=>{if(!h){if(l)return i(h=l);if(--o===0)return di(s,t,e,i)}};for(let l of n)$n(s,l,t,e,a)})},Xn=(s,t,e,i)=>{t.isDirectory()&&ds(Ee.resolve(s,t.name),e,i),cs(Ee.resolve(s,t.name),e,i)},ds=(s,t,e)=>{let i;try{i=ui.readdirSync(s,{withFileTypes:!0})}catch(r){let n=r;if(n?.code==="ENOENT")return;if(n?.code==="ENOTDIR"||n?.code==="ENOTSUP")return cs(s,t,e);throw n}for(let r of i)Xn(s,r,t,e);return cs(s,t,e)};import k from"node:fs";import qn from"node:fs/promises";import mi from"node:path";var we=class extends Error{path;code;syscall="chdir";constructor(t,e){super(`${e}: Cannot cd into '${t}'`),this.path=t,this.code=e}get name(){return"CwdError"}};var wt=class extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,e){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=e}get name(){return"SymlinkError"}};var jn=(s,t)=>{k.stat(s,(e,i)=>{(e||!i.isDirectory())&&(e=new we(s,e?.code||"ENOTDIR")),t(e)})},fr=(s,t,e)=>{s=f(s);let i=t.umask??18,r=t.mode|448,n=(r&i)!==0,o=t.uid,h=t.gid,a=typeof o=="number"&&typeof h=="number"&&(o!==t.processUid||h!==t.processGid),l=t.preserve,c=t.unlink,d=f(t.cwd),S=(E,x)=>{E?e(E):x&&a?fs(x,o,h,_s=>S(_s)):n?k.chmod(s,r,e):e()};if(s===d)return jn(s,S);if(l)return qn.mkdir(s,{mode:r,recursive:!0}).then(E=>S(null,E??void 0),S);let N=f(mi.relative(d,s)).split("/");us(d,N,r,c,d,void 0,S)},us=(s,t,e,i,r,n,o)=>{if(!t.length)return o(null,n);let h=t.shift(),a=f(mi.resolve(s+"/"+h));k.mkdir(a,e,dr(a,t,e,i,r,n,o))},dr=(s,t,e,i,r,n,o)=>h=>{h?k.lstat(s,(a,l)=>{if(a)a.path=a.path&&f(a.path),o(a);else if(l.isDirectory())us(s,t,e,i,r,n,o);else if(i)k.unlink(s,c=>{if(c)return o(c);k.mkdir(s,e,dr(s,t,e,i,r,n,o))});else{if(l.isSymbolicLink())return o(new wt(s,s+"/"+t.join("/")));o(h)}}):(n=n||s,us(s,t,e,i,r,n,o))},Qn=s=>{let t=!1,e;try{t=k.statSync(s).isDirectory()}catch(i){e=i?.code}finally{if(!t)throw new we(s,e??"ENOTDIR")}},ur=(s,t)=>{s=f(s);let e=t.umask??18,i=t.mode|448,r=(i&e)!==0,n=t.uid,o=t.gid,h=typeof n=="number"&&typeof o=="number"&&(n!==t.processUid||o!==t.processGid),a=t.preserve,l=t.unlink,c=f(t.cwd),d=E=>{E&&h&&ds(E,n,o),r&&k.chmodSync(s,i)};if(s===c)return Qn(c),d();if(a)return d(k.mkdirSync(s,{mode:i,recursive:!0})??void 0);let T=f(mi.relative(c,s)).split("/"),N;for(let E=T.shift(),x=c;E&&(x+="/"+E);E=T.shift()){x=f(mi.resolve(x));try{k.mkdirSync(x,i),N=N||x}catch{let Os=k.lstatSync(x);if(Os.isDirectory())continue;if(l){k.unlinkSync(x),k.mkdirSync(x,i),N=N||x;continue}else if(Os.isSymbolicLink())return new wt(x,x+"/"+T.join("/"))}}return d(N)};import{join as Er}from"node:path";var ms=Object.create(null),mr=1e4,$t=new Set,pr=s=>{$t.has(s)?$t.delete(s):ms[s]=s.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"),$t.add(s);let t=ms[s],e=$t.size-mr;if(e>mr/10){for(let i of $t)if($t.delete(i),delete ms[i],--e<=0)break}return t};var Jn=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,to=Jn==="win32",eo=s=>s.split("/").slice(0,-1).reduce((e,i)=>{let r=e[e.length-1];return r!==void 0&&(i=Er(r,i)),e.push(i||"/"),e},[]),pi=class{#t=new Map;#i=new Map;#s=new Set;reserve(t,e){t=to?["win32 parallelization disabled"]:t.map(r=>mt(Er(pr(r))));let i=new Set(t.map(r=>eo(r)).reduce((r,n)=>r.concat(n)));this.#i.set(e,{dirs:i,paths:t});for(let r of t){let n=this.#t.get(r);n?n.push(e):this.#t.set(r,[e])}for(let r of i){let n=this.#t.get(r);if(!n)this.#t.set(r,[new Set([e])]);else{let o=n[n.length-1];o instanceof Set?o.add(e):n.push(new Set([e]))}}return this.#r(e)}#n(t){let e=this.#i.get(t);if(!e)throw new Error("function does not have any path reservations");return{paths:e.paths.map(i=>this.#t.get(i)),dirs:[...e.dirs].map(i=>this.#t.get(i))}}check(t){let{paths:e,dirs:i}=this.#n(t);return e.every(r=>r&&r[0]===t)&&i.every(r=>r&&r[0]instanceof Set&&r[0].has(t))}#r(t){return this.#s.has(t)||!this.check(t)?!1:(this.#s.add(t),t(()=>this.#e(t)),!0)}#e(t){if(!this.#s.has(t))return!1;let e=this.#i.get(t);if(!e)throw new Error("invalid reservation");let{paths:i,dirs:r}=e,n=new Set;for(let o of i){let h=this.#t.get(o);if(!h||h?.[0]!==t)continue;let a=h[1];if(!a){this.#t.delete(o);continue}if(h.shift(),typeof a=="function")n.add(a);else for(let l of a)n.add(l)}for(let o of r){let h=this.#t.get(o),a=h?.[0];if(!(!h||!(a instanceof Set)))if(a.size===1&&h.length===1){this.#t.delete(o);continue}else if(a.size===1){h.shift();let l=h[0];typeof l=="function"&&n.add(l)}else a.delete(t)}return this.#s.delete(t),n.forEach(o=>this.#r(o)),!0}};var wr=()=>process.umask();var Sr=Symbol("onEntry"),Ss=Symbol("checkFs"),yr=Symbol("checkFs2"),ys=Symbol("isReusable"),P=Symbol("makeFs"),Rs=Symbol("file"),bs=Symbol("directory"),wi=Symbol("link"),Rr=Symbol("symlink"),br=Symbol("hardlink"),ye=Symbol("ensureNoSymlink"),gr=Symbol("unsupported"),_r=Symbol("checkPath"),ps=Symbol("stripAbsolutePath"),St=Symbol("mkdir"),O=Symbol("onError"),Ei=Symbol("pending"),Or=Symbol("pend"),Xt=Symbol("unpend"),Es=Symbol("ended"),ws=Symbol("maybeClose"),gs=Symbol("skip"),Re=Symbol("doChown"),be=Symbol("uid"),ge=Symbol("gid"),_e=Symbol("checkedCwd"),so=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Oe=so==="win32",ro=1024,no=(s,t)=>{if(!Oe)return u.unlink(s,t);let e=s+".DELETE."+xr(16).toString("hex");u.rename(s,e,i=>{if(i)return t(i);u.unlink(e,t)})},oo=s=>{if(!Oe)return u.unlinkSync(s);let t=s+".DELETE."+xr(16).toString("hex");u.renameSync(s,t),u.unlinkSync(t)},Tr=(s,t,e)=>s!==void 0&&s===s>>>0?s:t!==void 0&&t===t>>>0?t:e,qt=class extends st{[Es]=!1;[_e]=!1;[Ei]=0;reservations=new pi;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[Es]=!0,this[ws]()},super(t),this.transform=t.transform,this.chmod=!!t.chmod,typeof t.uid=="number"||typeof t.gid=="number"){if(typeof t.uid!="number"||typeof t.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;t.preserveOwner===void 0&&typeof t.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:ro,this.forceChown=t.forceChown===!0,this.win32=!!t.win32||Oe,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=f(R.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?typeof t.processUmask=="number"?t.processUmask:wr():0,this.umask=typeof t.umask=="number"?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",e=>this[Sr](e))}warn(t,e,i={}){return(t==="TAR_BAD_ARCHIVE"||t==="TAR_ABORT")&&(i.recoverable=!1),super.warn(t,e,i)}[ws](){this[Es]&&this[Ei]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[ps](t,e){let i=t[e],{type:r}=t;if(!i||this.preservePaths)return!0;let n=i.split("/");if(n.includes("..")||Oe&&/^[a-z]:\.\.$/i.test(n[0]??"")){if(e==="path"||r==="Link")return this.warn("TAR_ENTRY_ERROR",`${e} contains '..'`,{entry:t,[e]:i}),!1;{let a=R.posix.dirname(t.path),l=R.posix.normalize(R.posix.join(a,i));if(l.startsWith("../")||l==="..")return this.warn("TAR_ENTRY_ERROR",`${e} escapes extraction directory`,{entry:t,[e]:i}),!1}}let[o,h]=ce(i);return o&&(t[e]=String(h),this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute ${e}`,{entry:t,[e]:i})),!0}[_r](t){let e=f(t.path),i=e.split("/");if(this.strip){if(i.length=this.strip)t.linkpath=r.slice(this.strip).join("/");else return!1}i.splice(0,this.strip),t.path=i.join("/")}if(isFinite(this.maxDepth)&&i.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:e,depth:i.length,maxDepth:this.maxDepth}),!1;if(!this[ps](t,"path")||!this[ps](t,"linkpath"))return!1;if(R.isAbsolute(t.path)?t.absolute=f(R.resolve(t.path)):t.absolute=f(R.resolve(this.cwd,t.path)),!this.preservePaths&&typeof t.absolute=="string"&&t.absolute.indexOf(this.cwd+"/")!==0&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:f(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&t.type!=="Directory"&&t.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=R.win32.parse(String(t.absolute));t.absolute=r+$i(String(t.absolute).slice(r.length));let{root:n}=R.win32.parse(t.path);t.path=n+$i(t.path.slice(n.length))}return!0}[Sr](t){if(!this[_r](t))return t.resume();switch(io.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=t.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Ss](t);default:return this[gr](t)}}[O](t,e){t.name==="CwdError"?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:e}),this[Xt](),e.resume())}[St](t,e,i){fr(f(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:e},i)}[Re](t){return this.forceChown||this.preserveOwner&&(typeof t.uid=="number"&&t.uid!==this.processUid||typeof t.gid=="number"&&t.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[be](t){return Tr(this.uid,t.uid,this.processUid)}[ge](t){return Tr(this.gid,t.gid,this.processGid)}[Rs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.fmode,r=new tt(String(t.absolute),{flags:ls(t.size),mode:i,autoClose:!1});r.on("error",a=>{r.fd&&u.close(r.fd,()=>{}),r.write=()=>!0,this[O](a,t),e()});let n=1,o=a=>{if(a){r.fd&&u.close(r.fd,()=>{}),this[O](a,t),e();return}--n===0&&r.fd!==void 0&&u.close(r.fd,l=>{l?this[O](l,t):this[Xt](),e()})};r.on("finish",()=>{let a=String(t.absolute),l=r.fd;if(typeof l=="number"&&t.mtime&&!this.noMtime){n++;let c=t.atime||new Date,d=t.mtime;u.futimes(l,c,d,S=>S?u.utimes(a,c,d,T=>o(T&&S)):o())}if(typeof l=="number"&&this[Re](t)){n++;let c=this[be](t),d=this[ge](t);typeof c=="number"&&typeof d=="number"&&u.fchown(l,c,d,S=>S?u.chown(a,c,d,T=>o(T&&S)):o())}o()});let h=this.transform&&this.transform(t)||t;h!==t&&(h.on("error",a=>{this[O](a,t),e()}),t.pipe(h)),h.pipe(r)}[bs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.dmode;this[St](String(t.absolute),i,r=>{if(r){this[O](r,t),e();return}let n=1,o=()=>{--n===0&&(e(),this[Xt](),t.resume())};t.mtime&&!this.noMtime&&(n++,u.utimes(String(t.absolute),t.atime||new Date,t.mtime,o)),this[Re](t)&&(n++,u.chown(String(t.absolute),Number(this[be](t)),Number(this[ge](t)),o)),o()})}[gr](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[Rr](t,e){let i=f(R.relative(this.cwd,R.resolve(R.dirname(String(t.absolute)),String(t.linkpath)))).split("/");this[ye](t,this.cwd,i,()=>this[wi](t,String(t.linkpath),"symlink",e),r=>{this[O](r,t),e()})}[br](t,e){let i=f(R.resolve(this.cwd,String(t.linkpath))),r=f(String(t.linkpath)).split("/");this[ye](t,this.cwd,r,()=>this[wi](t,i,"link",e),n=>{this[O](n,t),e()})}[ye](t,e,i,r,n){let o=i.shift();if(this.preservePaths||o===void 0)return r();let h=R.resolve(e,o);u.lstat(h,(a,l)=>{if(a)return r();if(l?.isSymbolicLink())return n(new wt(h,R.resolve(h,i.join("/"))));this[ye](t,h,i,r,n)})}[Or](){this[Ei]++}[Xt](){this[Ei]--,this[ws]()}[gs](t){this[Xt](),t.resume()}[ys](t,e){return t.type==="File"&&!this.unlink&&e.isFile()&&e.nlink<=1&&!Oe}[Ss](t){this[Or]();let e=[t.path];t.linkpath&&e.push(t.linkpath),this.reservations.reserve(e,i=>this[yr](t,i))}[yr](t,e){let i=h=>{e(h)},r=()=>{this[St](this.cwd,this.dmode,h=>{if(h){this[O](h,t),i();return}this[_e]=!0,n()})},n=()=>{if(t.absolute!==this.cwd){let h=f(R.dirname(String(t.absolute)));if(h!==this.cwd)return this[St](h,this.dmode,a=>{if(a){this[O](a,t),i();return}o()})}o()},o=()=>{u.lstat(String(t.absolute),(h,a)=>{if(a&&(this.keep||this.newer&&a.mtime>(t.mtime??a.mtime))){this[gs](t),i();return}if(h||this[ys](t,a))return this[P](null,t,i);if(a.isDirectory()){if(t.type==="Directory"){let l=this.chmod&&t.mode&&(a.mode&4095)!==t.mode,c=d=>this[P](d??null,t,i);return l?u.chmod(String(t.absolute),Number(t.mode),c):c()}if(t.absolute!==this.cwd)return u.rmdir(String(t.absolute),l=>this[P](l??null,t,i))}if(t.absolute===this.cwd)return this[P](null,t,i);no(String(t.absolute),l=>this[P](l??null,t,i))})};this[_e]?n():r()}[P](t,e,i){if(t){this[O](t,e),i();return}switch(e.type){case"File":case"OldFile":case"ContiguousFile":return this[Rs](e,i);case"Link":return this[br](e,i);case"SymbolicLink":return this[Rr](e,i);case"Directory":case"GNUDumpDir":return this[bs](e,i)}}[wi](t,e,i,r){u[i](e,String(t.absolute),n=>{n?this[O](n,t):(this[Xt](),t.resume()),r()})}},Se=s=>{try{return[null,s()]}catch(t){return[t,null]}},Te=class extends qt{sync=!0;[P](t,e){return super[P](t,e,()=>{})}[Ss](t){if(!this[_e]){let n=this[St](this.cwd,this.dmode);if(n)return this[O](n,t);this[_e]=!0}if(t.absolute!==this.cwd){let n=f(R.dirname(String(t.absolute)));if(n!==this.cwd){let o=this[St](n,this.dmode);if(o)return this[O](o,t)}}let[e,i]=Se(()=>u.lstatSync(String(t.absolute)));if(i&&(this.keep||this.newer&&i.mtime>(t.mtime??i.mtime)))return this[gs](t);if(e||this[ys](t,i))return this[P](null,t);if(i.isDirectory()){if(t.type==="Directory"){let o=this.chmod&&t.mode&&(i.mode&4095)!==t.mode,[h]=o?Se(()=>{u.chmodSync(String(t.absolute),Number(t.mode))}):[];return this[P](h,t)}let[n]=Se(()=>u.rmdirSync(String(t.absolute)));this[P](n,t)}let[r]=t.absolute===this.cwd?[]:Se(()=>oo(String(t.absolute)));this[P](r,t)}[Rs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.fmode,r=h=>{let a;try{u.closeSync(n)}catch(l){a=l}(h||a)&&this[O](h||a,t),e()},n;try{n=u.openSync(String(t.absolute),ls(t.size),i)}catch(h){return r(h)}let o=this.transform&&this.transform(t)||t;o!==t&&(o.on("error",h=>this[O](h,t)),t.pipe(o)),o.on("data",h=>{try{u.writeSync(n,h,0,h.length)}catch(a){r(a)}}),o.on("end",()=>{let h=null;if(t.mtime&&!this.noMtime){let a=t.atime||new Date,l=t.mtime;try{u.futimesSync(n,a,l)}catch(c){try{u.utimesSync(String(t.absolute),a,l)}catch{h=c}}}if(this[Re](t)){let a=this[be](t),l=this[ge](t);try{u.fchownSync(n,Number(a),Number(l))}catch(c){try{u.chownSync(String(t.absolute),Number(a),Number(l))}catch{h=h||c}}}r(h)})}[bs](t,e){let i=typeof t.mode=="number"?t.mode&4095:this.dmode,r=this[St](String(t.absolute),i);if(r){this[O](r,t),e();return}if(t.mtime&&!this.noMtime)try{u.utimesSync(String(t.absolute),t.atime||new Date,t.mtime)}catch{}if(this[Re](t))try{u.chownSync(String(t.absolute),Number(this[be](t)),Number(this[ge](t)))}catch{}e(),t.resume()}[St](t,e){try{return ur(f(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:e})}catch(i){return i}}[ye](t,e,i,r,n){if(this.preservePaths||!i.length)return r();let o=e;for(let h of i){o=R.resolve(o,h);let[a,l]=Se(()=>u.lstatSync(o));if(a)return r();if(l.isSymbolicLink())return n(new wt(o,R.resolve(e,i.join("/"))))}r()}[wi](t,e,i,r){let n=`${i}Sync`;try{u[n](e,String(t.absolute)),r(),t.resume()}catch(o){return this[O](o,t)}}};var ho=s=>{let t=new Te(s),e=s.file,i=Lr.statSync(e),r=s.maxReadSize||16*1024*1024;new ve(e,{readSize:r,size:i.size}).pipe(t)},ao=(s,t)=>{let e=new qt(s),i=s.maxReadSize||16*1024*1024,r=s.file;return new Promise((o,h)=>{e.on("error",h),e.on("close",o),Lr.stat(r,(a,l)=>{if(a)h(a);else{let c=new gt(r,{readSize:i,size:l.size});c.on("error",h),c.pipe(e)}})})},lo=K(ho,ao,s=>new Te(s),s=>new qt(s),(s,t)=>{t?.length&&Yi(s,t)});import v from"node:fs";import Nr from"node:path";var co=(s,t)=>{let e=new kt(s),i=!0,r,n;try{try{r=v.openSync(s.file,"r+")}catch(a){if(a?.code==="ENOENT")r=v.openSync(s.file,"w+");else throw a}let o=v.fstatSync(r),h=Buffer.alloc(512);t:for(n=0;no.size)break;n+=l,s.mtimeCache&&a.mtime&&s.mtimeCache.set(String(a.path),a.mtime)}i=!1,fo(s,e,n,r,t)}finally{if(i)try{v.closeSync(r)}catch{}}},fo=(s,t,e,i,r)=>{let n=new Wt(s.file,{fd:i,start:e});t.pipe(n),mo(t,r)},uo=(s,t)=>{t=Array.from(t);let e=new Et(s),i=(n,o,h)=>{let a=(T,N)=>{T?v.close(n,E=>h(T)):h(null,N)},l=0;if(o===0)return a(null,0);let c=0,d=Buffer.alloc(512),S=(T,N)=>{if(T||typeof N>"u")return a(T);if(c+=N,c<512&&N)return v.read(n,d,c,d.length-c,l+c,S);if(l===0&&d[0]===31&&d[1]===139)return a(new Error("cannot append to compressed archives"));if(c<512)return a(null,l);let E=new F(d);if(!E.cksumValid)return a(null,l);let x=512*Math.ceil((E.size??0)/512);if(l+x+512>o||(l+=x+512,l>=o))return a(null,l);s.mtimeCache&&E.mtime&&s.mtimeCache.set(String(E.path),E.mtime),c=0,v.read(n,d,0,512,l,S)};v.read(n,d,0,512,l,S)};return new Promise((n,o)=>{e.on("error",o);let h="r+",a=(l,c)=>{if(l&&l.code==="ENOENT"&&h==="r+")return h="w+",v.open(s.file,h,a);if(l||!c)return o(l);v.fstat(c,(d,S)=>{if(d)return v.close(c,()=>o(d));i(c,S.size,(T,N)=>{if(T)return o(T);let E=new tt(s.file,{fd:c,start:N});e.pipe(E),E.on("error",o),E.on("close",n),po(e,t)})})};v.open(s.file,h,a)})},mo=(s,t)=>{t.forEach(e=>{e.charAt(0)==="@"?It({file:Nr.resolve(s.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:i=>s.add(i)}):s.add(e)}),s.end()},po=async(s,t)=>{for(let e=0;es.add(r)}):s.add(i)}s.end()},vt=K(co,uo,()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(s,t)=>{if(!ks(s))throw new TypeError("file is required");if(s.gzip||s.brotli||s.zstd||s.file.endsWith(".br")||s.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!t?.length)throw new TypeError("no paths specified to add/replace")});var Eo=K(vt.syncFile,vt.asyncFile,vt.syncNoFile,vt.asyncNoFile,(s,t=[])=>{vt.validate?.(s,t),wo(s)}),wo=s=>{let t=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=t?(e,i)=>t(e,i)&&!((s.mtimeCache?.get(e)??i.mtime??0)>(i.mtime??0)):(e,i)=>!((s.mtimeCache?.get(e)??i.mtime??0)>(i.mtime??0))};export{F as Header,Et as Pack,fi as PackJob,kt as PackSync,st as Parser,ct as Pax,Yt as ReadEntry,qt as Unpack,Te as UnpackSync,de as WriteEntry,ii as WriteEntrySync,si as WriteEntryTar,zn as c,zn as create,lo as extract,Yi as filesFilter,It as list,vt as r,vt as replace,It as t,Mi as types,Eo as u,Eo as update,lo as x}; +//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/tar/dist/esm/process-umask.js b/deps/npm/node_modules/tar/dist/esm/process-umask.js new file mode 100644 index 00000000000000..c6748e2e253c42 --- /dev/null +++ b/deps/npm/node_modules/tar/dist/esm/process-umask.js @@ -0,0 +1,3 @@ +// separate file so I stop getting nagged in vim about deprecated API. +export const umask = () => process.umask(); +//# sourceMappingURL=process-umask.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/tar/dist/esm/unpack.js b/deps/npm/node_modules/tar/dist/esm/unpack.js index 3a9aa807798a71..1d0b53d1df4e66 100644 --- a/deps/npm/node_modules/tar/dist/esm/unpack.js +++ b/deps/npm/node_modules/tar/dist/esm/unpack.js @@ -15,6 +15,8 @@ import { Parser } from './parse.js'; import { stripAbsolutePath } from './strip-absolute-path.js'; import * as wc from './winchars.js'; import { PathReservations } from './path-reservations.js'; +import { SymlinkError } from './symlink-error.js'; +import { umask } from './process-umask.js'; const ONENTRY = Symbol('onEntry'); const CHECKFS = Symbol('checkFs'); const CHECKFS2 = Symbol('checkFs2'); @@ -25,6 +27,7 @@ const DIRECTORY = Symbol('directory'); const LINK = Symbol('link'); const SYMLINK = Symbol('symlink'); const HARDLINK = Symbol('hardlink'); +const ENSURE_NO_SYMLINK = Symbol('ensureNoSymlink'); const UNSUPPORTED = Symbol('unsupported'); const CHECKPATH = Symbol('checkPath'); const STRIPABSOLUTEPATH = Symbol('stripAbsolutePath'); @@ -187,7 +190,7 @@ export class Unpack extends Parser { this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === 'number' ? opt.processUmask - : process.umask(); + : umask(); this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask; // default mode for dirs created as parents @@ -262,6 +265,7 @@ export class Unpack extends Parser { } return true; } + // no IO, just string checking for absolute indicators [CHECKPATH](entry) { const p = normalizeWindowsPath(entry.path); const parts = p.split('/'); @@ -522,11 +526,33 @@ export class Unpack extends Parser { entry.resume(); } [SYMLINK](entry, done) { - this[LINK](entry, String(entry.linkpath), 'symlink', done); + const parts = normalizeWindowsPath(path.relative(this.cwd, path.resolve(path.dirname(String(entry.absolute)), String(entry.linkpath)))).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, String(entry.linkpath), 'symlink', done), er => { + this[ONERROR](er, entry); + done(); + }); } [HARDLINK](entry, done) { const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath))); - this[LINK](entry, linkpath, 'link', done); + const parts = normalizeWindowsPath(String(entry.linkpath)).split('/'); + this[ENSURE_NO_SYMLINK](entry, this.cwd, parts, () => this[LINK](entry, linkpath, 'link', done), er => { + this[ONERROR](er, entry); + done(); + }); + } + [ENSURE_NO_SYMLINK](entry, cwd, parts, done, onError) { + const p = parts.shift(); + if (this.preservePaths || p === undefined) + return done(); + const t = path.resolve(cwd, p); + fs.lstat(t, (er, st) => { + if (er) + return done(); + if (st?.isSymbolicLink()) { + return onError(new SymlinkError(t, path.resolve(t, parts.join('/')))); + } + this[ENSURE_NO_SYMLINK](entry, t, parts, done, onError); + }); } [PEND]() { this[PENDING]++; @@ -660,7 +686,6 @@ export class Unpack extends Parser { } } [LINK](entry, linkpath, link, done) { - // XXX: get the type ('symlink' or 'junction') for windows fs[link](linkpath, String(entry.absolute), er => { if (er) { this[ONERROR](er, entry); @@ -861,10 +886,25 @@ export class UnpackSync extends Unpack { return er; } } + [ENSURE_NO_SYMLINK](_entry, cwd, parts, done, onError) { + if (this.preservePaths || !parts.length) + return done(); + let t = cwd; + for (const p of parts) { + t = path.resolve(t, p); + const [er, st] = callSync(() => fs.lstatSync(t)); + if (er) + return done(); + if (st.isSymbolicLink()) { + return onError(new SymlinkError(t, path.resolve(cwd, parts.join('/')))); + } + } + done(); + } [LINK](entry, linkpath, link, done) { - const ls = `${link}Sync`; + const linkSync = `${link}Sync`; try { - fs[ls](linkpath, String(entry.absolute)); + fs[linkSync](linkpath, String(entry.absolute)); done(); entry.resume(); } diff --git a/deps/npm/node_modules/tar/node_modules/yallist/package.json b/deps/npm/node_modules/tar/node_modules/yallist/package.json deleted file mode 100644 index 2f5247808bbea8..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/yallist/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "yallist", - "version": "5.0.0", - "description": "Yet Another Linked List", - "files": [ - "dist" - ], - "devDependencies": { - "prettier": "^3.2.5", - "tap": "^18.7.2", - "tshy": "^1.13.1", - "typedoc": "^0.25.13" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", - "typedoc": "typedoc" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/yallist.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "BlueOak-1.0.0", - "tshy": { - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - } - }, - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "type": "module", - "prettier": { - "semi": false, - "printWidth": 70, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "engines": { - "node": ">=18" - } -} diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 397764155b5141..7565cf8144df33 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter", "name": "tar", "description": "tar for node", - "version": "7.5.7", + "version": "7.5.9", "repository": { "type": "git", "url": "https://github.com/isaacs/node-tar.git" @@ -13,7 +13,7 @@ "test": "tap", "pretest": "npm run prepare", "presnap": "npm run prepare", - "prepare": "tshy", + "prepare": "tshy && bash scripts/build.sh", "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", @@ -31,6 +31,7 @@ "@types/node": "^25.0.9", "chmodr": "^2.0.2", "end-of-stream": "^1.4.3", + "esbuild": "^0.27.3", "events-to-array": "^2.0.3", "mutate-fs": "^2.1.1", "nock": "^13.5.4", @@ -50,7 +51,17 @@ "tshy": { "exports": { "./package.json": "./package.json", - ".": "./src/index.ts", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + }, + "./raw": "./src/index.ts", "./c": "./src/create.ts", "./create": "./src/create.ts", "./replace": "./src/create.ts", @@ -74,6 +85,16 @@ "exports": { "./package.json": "./package.json", ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } + }, + "./raw": { "import": { "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" @@ -265,7 +286,7 @@ } }, "type": "module", - "main": "./dist/commonjs/index.js", + "main": "./dist/commonjs/index.min.js", "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" + "module": "./dist/esm/index.min.js" } diff --git a/deps/npm/node_modules/validate-npm-package-license/LICENSE b/deps/npm/node_modules/validate-npm-package-license/LICENSE deleted file mode 100644 index d645695673349e..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/deps/npm/node_modules/validate-npm-package-license/index.js b/deps/npm/node_modules/validate-npm-package-license/index.js deleted file mode 100644 index 35eaa732559ce2..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/index.js +++ /dev/null @@ -1,86 +0,0 @@ -var parse = require('spdx-expression-parse'); -var correct = require('spdx-correct'); - -var genericWarning = ( - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "' -); - -var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; - -function startsWith(prefix, string) { - return string.slice(0, prefix.length) === prefix; -} - -function usesLicenseRef(ast) { - if (ast.hasOwnProperty('license')) { - var license = ast.license; - return ( - startsWith('LicenseRef', license) || - startsWith('DocumentRef', license) - ); - } else { - return ( - usesLicenseRef(ast.left) || - usesLicenseRef(ast.right) - ); - } -} - -module.exports = function(argument) { - var ast; - - try { - ast = parse(argument); - } catch (e) { - var match - if ( - argument === 'UNLICENSED' || - argument === 'UNLICENCED' - ) { - return { - validForOldPackages: true, - validForNewPackages: true, - unlicensed: true - }; - } else if (match = fileReferenceRE.exec(argument)) { - return { - validForOldPackages: true, - validForNewPackages: true, - inFile: match[1] - }; - } else { - var result = { - validForOldPackages: false, - validForNewPackages: false, - warnings: [genericWarning] - }; - if (argument.trim().length !== 0) { - var corrected = correct(argument); - if (corrected) { - result.warnings.push( - 'license is similar to the valid expression "' + corrected + '"' - ); - } - } - return result; - } - } - - if (usesLicenseRef(ast)) { - return { - validForNewPackages: false, - validForOldPackages: false, - spdx: true, - warnings: [genericWarning] - }; - } else { - return { - validForNewPackages: true, - validForOldPackages: true, - spdx: true - }; - } -}; diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/AUTHORS b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/AUTHORS deleted file mode 100644 index 257a76b9484c12..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -C. Scott Ananian (http://cscott.net) -Kyle E. Mitchell (https://kemitchell.com) -Shinnosuke Watanabe -Antoine Motet diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE deleted file mode 100644 index 831618eaba6c89..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js deleted file mode 100644 index 52fab560aea707..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -var scan = require('./scan') -var parse = require('./parse') - -module.exports = function (source) { - return parse(scan(source)) -} diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json deleted file mode 100644 index c9edc9f939cdf6..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "spdx-expression-parse", - "description": "parse SPDX license expressions", - "version": "3.0.1", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "files": [ - "AUTHORS", - "index.js", - "parse.js", - "scan.js" - ], - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^3.0.1", - "replace-require-self": "^1.0.0", - "standard": "^14.1.0" - }, - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata", - "package", - "package.json", - "standards" - ], - "license": "MIT", - "repository": "jslicense/spdx-expression-parse.js", - "scripts": { - "lint": "standard", - "test:readme": "defence -i javascript README.md | replace-require-self | node", - "test:suite": "node test.js", - "test": "npm run test:suite && npm run test:readme" - } -} diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parse.js b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parse.js deleted file mode 100644 index 5a00b45c5799c4..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parse.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' - -// The ABNF grammar in the spec is totally ambiguous. -// -// This parser follows the operator precedence defined in the -// `Order of Precedence and Parentheses` section. - -module.exports = function (tokens) { - var index = 0 - - function hasMore () { - return index < tokens.length - } - - function token () { - return hasMore() ? tokens[index] : null - } - - function next () { - if (!hasMore()) { - throw new Error() - } - index++ - } - - function parseOperator (operator) { - var t = token() - if (t && t.type === 'OPERATOR' && operator === t.string) { - next() - return t.string - } - } - - function parseWith () { - if (parseOperator('WITH')) { - var t = token() - if (t && t.type === 'EXCEPTION') { - next() - return t.string - } - throw new Error('Expected exception after `WITH`') - } - } - - function parseLicenseRef () { - // TODO: Actually, everything is concatenated into one string - // for backward-compatibility but it could be better to return - // a nice structure. - var begin = index - var string = '' - var t = token() - if (t.type === 'DOCUMENTREF') { - next() - string += 'DocumentRef-' + t.string + ':' - if (!parseOperator(':')) { - throw new Error('Expected `:` after `DocumentRef-...`') - } - } - t = token() - if (t.type === 'LICENSEREF') { - next() - string += 'LicenseRef-' + t.string - return { license: string } - } - index = begin - } - - function parseLicense () { - var t = token() - if (t && t.type === 'LICENSE') { - next() - var node = { license: t.string } - if (parseOperator('+')) { - node.plus = true - } - var exception = parseWith() - if (exception) { - node.exception = exception - } - return node - } - } - - function parseParenthesizedExpression () { - var left = parseOperator('(') - if (!left) { - return - } - - var expr = parseExpression() - - if (!parseOperator(')')) { - throw new Error('Expected `)`') - } - - return expr - } - - function parseAtom () { - return ( - parseParenthesizedExpression() || - parseLicenseRef() || - parseLicense() - ) - } - - function makeBinaryOpParser (operator, nextParser) { - return function parseBinaryOp () { - var left = nextParser() - if (!left) { - return - } - - if (!parseOperator(operator)) { - return left - } - - var right = parseBinaryOp() - if (!right) { - throw new Error('Expected expression') - } - return { - left: left, - conjunction: operator.toLowerCase(), - right: right - } - } - } - - var parseAnd = makeBinaryOpParser('AND', parseAtom) - var parseExpression = makeBinaryOpParser('OR', parseAnd) - - var node = parseExpression() - if (!node || hasMore()) { - throw new Error('Syntax error') - } - return node -} diff --git a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js b/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js deleted file mode 100644 index b74fce2e2c6632..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -var licenses = [] - .concat(require('spdx-license-ids')) - .concat(require('spdx-license-ids/deprecated')) -var exceptions = require('spdx-exceptions') - -module.exports = function (source) { - var index = 0 - - function hasMore () { - return index < source.length - } - - // `value` can be a regexp or a string. - // If it is recognized, the matching source string is returned and - // the index is incremented. Otherwise `undefined` is returned. - function read (value) { - if (value instanceof RegExp) { - var chars = source.slice(index) - var match = chars.match(value) - if (match) { - index += match[0].length - return match[0] - } - } else { - if (source.indexOf(value, index) === index) { - index += value.length - return value - } - } - } - - function skipWhitespace () { - read(/[ ]*/) - } - - function operator () { - var string - var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+'] - for (var i = 0; i < possibilities.length; i++) { - string = read(possibilities[i]) - if (string) { - break - } - } - - if (string === '+' && index > 1 && source[index - 2] === ' ') { - throw new Error('Space before `+`') - } - - return string && { - type: 'OPERATOR', - string: string - } - } - - function idstring () { - return read(/[A-Za-z0-9-.]+/) - } - - function expectIdstring () { - var string = idstring() - if (!string) { - throw new Error('Expected idstring at offset ' + index) - } - return string - } - - function documentRef () { - if (read('DocumentRef-')) { - var string = expectIdstring() - return { type: 'DOCUMENTREF', string: string } - } - } - - function licenseRef () { - if (read('LicenseRef-')) { - var string = expectIdstring() - return { type: 'LICENSEREF', string: string } - } - } - - function identifier () { - var begin = index - var string = idstring() - - if (licenses.indexOf(string) !== -1) { - return { - type: 'LICENSE', - string: string - } - } else if (exceptions.indexOf(string) !== -1) { - return { - type: 'EXCEPTION', - string: string - } - } - - index = begin - } - - // Tries to read the next token. Returns `undefined` if no token is - // recognized. - function parseToken () { - // Ordering matters - return ( - operator() || - documentRef() || - licenseRef() || - identifier() - ) - } - - var tokens = [] - while (hasMore()) { - skipWhitespace() - if (!hasMore()) { - break - } - - var token = parseToken() - if (!token) { - throw new Error('Unexpected `' + source[index] + - '` at offset ' + index) - } - - tokens.push(token) - } - return tokens -} diff --git a/deps/npm/node_modules/validate-npm-package-license/package.json b/deps/npm/node_modules/validate-npm-package-license/package.json deleted file mode 100644 index 9e92af4f44656c..00000000000000 --- a/deps/npm/node_modules/validate-npm-package-license/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "validate-npm-package-license", - "description": "Give me a string and I'll tell you if it's a valid npm package license string", - "version": "3.0.4", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "contributors": [ - "Mark Stacey " - ], - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^2.0.1", - "replace-require-self": "^1.0.0" - }, - "keywords": [ - "license", - "npm", - "package", - "validation" - ], - "license": "Apache-2.0", - "repository": "kemitchell/validate-npm-package-license.js", - "scripts": { - "test": "defence README.md | replace-require-self | node" - } -} diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json index 915dc4bd27c3a1..c6a4bf229fdab4 100644 --- a/deps/npm/node_modules/which/package.json +++ b/deps/npm/node_modules/which/package.json @@ -2,7 +2,7 @@ "author": "GitHub Inc.", "name": "which", "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "6.0.0", + "version": "6.0.1", "repository": { "type": "git", "url": "git+https://github.com/npm/node-which.git" @@ -13,11 +13,11 @@ }, "license": "ISC", "dependencies": { - "isexe": "^3.1.1" + "isexe": "^4.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.27.1", + "@npmcli/eslint-config": "^6.0.0", + "@npmcli/template-oss": "4.28.1", "tap": "^16.3.0" }, "scripts": { @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.27.1", + "version": "4.28.1", "publish": "true" } } diff --git a/deps/npm/node_modules/tar/node_modules/yallist/LICENSE.md b/deps/npm/node_modules/yallist/LICENSE.md similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/LICENSE.md rename to deps/npm/node_modules/yallist/LICENSE.md diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/index.js b/deps/npm/node_modules/yallist/dist/commonjs/index.js similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/index.js rename to deps/npm/node_modules/yallist/dist/commonjs/index.js diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/package.json b/deps/npm/node_modules/yallist/dist/commonjs/package.json similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/commonjs/package.json rename to deps/npm/node_modules/yallist/dist/commonjs/package.json diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/esm/index.js b/deps/npm/node_modules/yallist/dist/esm/index.js similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/esm/index.js rename to deps/npm/node_modules/yallist/dist/esm/index.js diff --git a/deps/npm/node_modules/tar/node_modules/yallist/dist/esm/package.json b/deps/npm/node_modules/yallist/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/tar/node_modules/yallist/dist/esm/package.json rename to deps/npm/node_modules/yallist/dist/esm/package.json diff --git a/deps/npm/node_modules/yallist/package.json b/deps/npm/node_modules/yallist/package.json index 8a083867d72e00..2f5247808bbea8 100644 --- a/deps/npm/node_modules/yallist/package.json +++ b/deps/npm/node_modules/yallist/package.json @@ -1,29 +1,68 @@ { "name": "yallist", - "version": "4.0.0", + "version": "5.0.0", "description": "Yet Another Linked List", - "main": "yallist.js", - "directories": { - "test": "test" - }, "files": [ - "yallist.js", - "iterator.js" + "dist" ], - "dependencies": {}, "devDependencies": { - "tap": "^12.1.0" + "prettier": "^3.2.5", + "tap": "^18.7.2", + "tshy": "^1.13.1", + "typedoc": "^0.25.13" }, "scripts": { - "test": "tap test/*.js --100", "preversion": "npm test", "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tshy", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", + "typedoc": "typedoc" }, "repository": { "type": "git", "url": "git+https://github.com/isaacs/yallist.git" }, "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" + "license": "BlueOak-1.0.0", + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "type": "module", + "prettier": { + "semi": false, + "printWidth": 70, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "engines": { + "node": ">=18" + } } diff --git a/deps/npm/package.json b/deps/npm/package.json index 60e6baa52637bc..c5c5292b9251a4 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "11.9.0", + "version": "11.10.1", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -52,12 +52,12 @@ }, "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^9.2.0", - "@npmcli/config": "^10.6.0", + "@npmcli/arborist": "^9.3.1", + "@npmcli/config": "^10.7.1", "@npmcli/fs": "^5.0.0", "@npmcli/map-workspaces": "^5.0.3", "@npmcli/metavuln-calculator": "^9.0.3", - "@npmcli/package-json": "^7.0.4", + "@npmcli/package-json": "^7.0.5", "@npmcli/promise-spawn": "^9.0.1", "@npmcli/redact": "^4.0.0", "@npmcli/run-script": "^10.0.3", @@ -67,29 +67,28 @@ "cacache": "^20.0.3", "chalk": "^5.6.2", "ci-info": "^4.4.0", - "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", "fs-minipass": "^3.0.3", - "glob": "^13.0.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", "hosted-git-info": "^9.0.2", "ini": "^6.0.0", - "init-package-json": "^8.2.4", - "is-cidr": "^6.0.1", + "init-package-json": "^8.2.5", + "is-cidr": "^6.0.3", "json-parse-even-better-errors": "^5.0.0", "libnpmaccess": "^10.0.3", - "libnpmdiff": "^8.1.0", - "libnpmexec": "^10.2.0", - "libnpmfund": "^7.0.14", + "libnpmdiff": "^8.1.2", + "libnpmexec": "^10.2.2", + "libnpmfund": "^7.0.16", "libnpmorg": "^8.0.1", - "libnpmpack": "^9.1.0", + "libnpmpack": "^9.1.2", "libnpmpublish": "^11.1.3", "libnpmsearch": "^9.0.1", "libnpmteam": "^8.0.2", "libnpmversion": "^8.0.3", "make-fetch-happen": "^15.0.3", - "minimatch": "^10.1.1", - "minipass": "^7.1.1", + "minimatch": "^10.2.2", + "minipass": "^7.1.3", "minipass-pipeline": "^1.2.4", "ms": "^2.1.2", "node-gyp": "^12.2.0", @@ -102,21 +101,21 @@ "npm-registry-fetch": "^19.1.1", "npm-user-validate": "^4.0.0", "p-map": "^7.0.4", - "pacote": "^21.1.0", + "pacote": "^21.3.1", "parse-conflict-json": "^5.0.1", "proc-log": "^6.1.0", "qrcode-terminal": "^0.12.0", "read": "^5.0.1", - "semver": "^7.7.3", + "semver": "^7.7.4", "spdx-expression-parse": "^4.0.0", - "ssri": "^13.0.0", + "ssri": "^13.0.1", "supports-color": "^10.2.2", - "tar": "^7.5.7", + "tar": "^7.5.9", "text-table": "~0.2.0", "tiny-relative-date": "^2.0.2", "treeverse": "^3.0.0", "validate-npm-package-name": "^7.0.2", - "which": "^6.0.0" + "which": "^6.0.1" }, "bundleDependencies": [ "@isaacs/string-locale-compare", @@ -135,7 +134,6 @@ "cacache", "chalk", "ci-info", - "cli-columns", "fastest-levenshtein", "fs-minipass", "glob", @@ -192,7 +190,7 @@ "@npmcli/git": "^7.0.1", "@npmcli/mock-globals": "^1.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.25.1", + "@npmcli/template-oss": "4.29.0", "@tufjs/repo-mock": "^4.0.0", "ajv": "^8.12.0", "ajv-formats": "^3.0.1", @@ -250,7 +248,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.25.1", + "version": "4.29.0", "content": "./scripts/template-oss/root.js" }, "license": "Artistic-2.0", diff --git a/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs index 64759ec6ef9cf0..0b0ee324ce05dd 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/completion.js.test.cjs @@ -6,18 +6,17 @@ */ 'use strict' exports[`test/lib/commands/completion.js TAP completion --no- flags > flags 1`] = ` -Array [ - String( - --no-version - --no-versions - ), -] +Array [] ` exports[`test/lib/commands/completion.js TAP completion commands with no completion > no results 1`] = ` Array [] ` +exports[`test/lib/commands/completion.js TAP completion completion after custom definition flag requiring value > custom definition non-Boolean flag handled 1`] = ` +Array [] +` + exports[`test/lib/commands/completion.js TAP completion completion cannot complete options that take a value in mid-command > does not try to complete option arguments in the middle of a command 1`] = ` Array [] ` @@ -38,134 +37,16 @@ exports[`test/lib/commands/completion.js TAP completion completion of invalid co Array [] ` +exports[`test/lib/commands/completion.js TAP completion completion with double-dash escape in command line > double-dash escape handled 1`] = ` +Array [] +` + +exports[`test/lib/commands/completion.js TAP completion completion with non-flag word > non-flag word completion 1`] = ` +Array [] +` + exports[`test/lib/commands/completion.js TAP completion double dashes escape from flag completion > full command list 1`] = ` -Array [ - String( - access - adduser - audit - bugs - cache - ci - completion - config - dedupe - deprecate - diff - dist-tag - docs - doctor - edit - exec - explain - explore - find-dupes - fund - get - help - help-search - init - install - install-ci-test - install-test - link - ll - login - logout - ls - org - outdated - owner - pack - ping - pkg - prefix - profile - prune - publish - query - rebuild - repo - restart - root - run - sbom - search - set - shrinkwrap - star - stars - start - stop - team - test - token - undeprecate - uninstall - unpublish - unstar - update - version - view - whoami - author - home - issues - info - show - find - add - unlink - remove - rm - r - un - rb - list - ln - create - i - it - cit - up - c - s - se - tst - t - ddp - v - run-script - clean-install - clean-install-test - x - why - la - verison - ic - innit - in - ins - inst - insta - instal - isnt - isnta - isntal - isntall - install-clean - isntall-clean - hlep - dist-tags - upgrade - udpate - rum - sit - urn - ogr - add-user - ), -] +Array [] ` exports[`test/lib/commands/completion.js TAP completion filtered subcommands > filtered subcommands 1`] = ` @@ -173,15 +54,7 @@ Array [] ` exports[`test/lib/commands/completion.js TAP completion flags > flags 1`] = ` -Array [ - String( - --version - --versions - --viewer - --verbose - --v - ), -] +Array [] ` exports[`test/lib/commands/completion.js TAP completion multiple command names > multiple command names 1`] = ` @@ -215,6 +88,63 @@ Array [ ] ` +exports[`test/lib/commands/completion.js TAP completion trust filtered subcommands > trust filtered subcommands 1`] = ` +Array [ + String( + github + gitlab + ), +] +` + +exports[`test/lib/commands/completion.js TAP completion trust github flags > trust github flags with custom definitions 1`] = ` +Array [ + String( + --file + --repository + --repo + --environment + --env + --dry-run + --json + --registry + --yes + --no-dry-run + --no-json + --no-yes + ), +] +` + +exports[`test/lib/commands/completion.js TAP completion trust gitlab flags > trust gitlab flags with custom definitions 1`] = ` +Array [ + String( + --file + --project + --environment + --env + --dry-run + --json + --registry + --yes + --no-dry-run + --no-json + --no-yes + ), +] +` + +exports[`test/lib/commands/completion.js TAP completion trust subcommands > trust subcommands 1`] = ` +Array [ + String( + github + gitlab + list + revoke + ), +] +` + exports[`test/lib/commands/completion.js TAP windows without bash > no output 1`] = ` Array [] ` diff --git a/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs index d96ebf3412e04c..bae0cc8ede3947 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -103,6 +103,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "name": null, "maxsockets": 15, "message": "%s", + "min-release-age": null, "node-gyp": "{CWD}/node_modules/node-gyp/bin/node-gyp.js", "node-options": null, "noproxy": [ @@ -280,6 +281,7 @@ logs-max = 10 ; long = false ; overridden by cli maxsockets = 15 message = "%s" +min-release-age = null name = null node-gyp = "{CWD}/node_modules/node-gyp/bin/node-gyp.js" node-options = null @@ -449,6 +451,6 @@ registry = "https://some.registry" exports[`test/lib/commands/config.js TAP config list with publishConfig local > warns about unknown config 1`] = ` Array [ - "Unknown publishConfig config /"other/". This will stop working in the next major version of npm.", + "Unknown publishConfig config /"other/". This will stop working in the next major version of npm. See \`npm help npmrc\` for supported config options.", ] ` diff --git a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs index 3c9fa9bbec4476..6143eacb57ffa2 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/install.js.test.cjs @@ -134,9 +134,9 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid devEngines.runtime verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:244:27) +verbose stack at MockNpm.execCommandClass ({CWD}/lib/npm.js:310:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:209:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid devEngines.runtime @@ -199,9 +199,9 @@ warn EBADDEVENGINES } verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid devEngines.runtime verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:244:27) +verbose stack at MockNpm.execCommandClass ({CWD}/lib/npm.js:310:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:209:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid devEngines.runtime @@ -225,9 +225,9 @@ silly logfile done cleaning log files verbose stack Error: The developer of this package has specified the following through devEngines verbose stack Invalid devEngines.runtime verbose stack Invalid name "nondescript" does not match "node" for "runtime" -verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27) -verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7) -verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9) +verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:244:27) +verbose stack at MockNpm.execCommandClass ({CWD}/lib/npm.js:310:7) +verbose stack at MockNpm.exec ({CWD}/lib/npm.js:209:9) error code EBADDEVENGINES error EBADDEVENGINES The developer of this package has specified the following through devEngines error EBADDEVENGINES Invalid devEngines.runtime diff --git a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs index 96a9d064d0e4e5..e7507118a28f50 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/publish.js.test.cjs @@ -172,6 +172,7 @@ Object { "man/man1/npm-explore.1", "man/man1/npm-find-dupes.1", "man/man1/npm-fund.1", + "man/man1/npm-get.1", "man/man1/npm-help-search.1", "man/man1/npm-help.1", "man/man1/npm-init.1", @@ -179,6 +180,7 @@ Object { "man/man1/npm-install-test.1", "man/man1/npm-install.1", "man/man1/npm-link.1", + "man/man1/npm-ll.1", "man/man1/npm-login.1", "man/man1/npm-logout.1", "man/man1/npm-ls.1", @@ -200,6 +202,7 @@ Object { "man/man1/npm-run.1", "man/man1/npm-sbom.1", "man/man1/npm-search.1", + "man/man1/npm-set.1", "man/man1/npm-shrinkwrap.1", "man/man1/npm-star.1", "man/man1/npm-stars.1", @@ -208,6 +211,7 @@ Object { "man/man1/npm-team.1", "man/man1/npm-test.1", "man/man1/npm-token.1", + "man/man1/npm-trust.1", "man/man1/npm-undeprecate.1", "man/man1/npm-uninstall.1", "man/man1/npm-unpublish.1", diff --git a/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs index d5e7f6bfd49632..8d66ef780008be 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/view.js.test.cjs @@ -39,8 +39,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -68,8 +67,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -97,8 +95,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -122,14 +119,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -148,14 +138,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -174,14 +157,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -265,30 +241,7 @@ dist .unpackedSize: 1 B dependencies: -0: 1.0.0 -10: 1.0.0 -11: 1.0.0 -12: 1.0.0 -13: 1.0.0 -14: 1.0.0 -15: 1.0.0 -16: 1.0.0 -17: 1.0.0 -18: 1.0.0 -19: 1.0.0 -1: 1.0.0 -20: 1.0.0 -21: 1.0.0 -22: 1.0.0 -23: 1.0.0 -2: 1.0.0 -3: 1.0.0 -4: 1.0.0 -5: 1.0.0 -6: 1.0.0 -7: 1.0.0 -8: 1.0.0 -9: 1.0.0 +0: 1.0.0, 1: 1.0.0, 2: 1.0.0, 3: 1.0.0, 4: 1.0.0, 5: 1.0.0, 6: 1.0.0, 7: 1.0.0, 8: 1.0.0, 9: 1.0.0, 10: 1.0.0, 11: 1.0.0, 12: 1.0.0, 13: 1.0.0, 14: 1.0.0, 15: 1.0.0, 16: 1.0.0, 17: 1.0.0, 18: 1.0.0, 19: 1.0.0, 20: 1.0.0, 21: 1.0.0, 22: 1.0.0, 23: 1.0.0 (...and 1 more.) dist-tags: @@ -325,14 +278,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -351,14 +297,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago @@ -376,14 +315,7 @@ dist-tags: y: 1.0.0 v1: 1.0.0 prev: 1.0.0 -d: 1.0.0 -c: 1.0.0 -b: 1.0.0 -a: 1.0.0 -x: 1.0.1 -next: 1.0.1 -h: 1.0.1 -(...and 3 more.) +(...and 10 more.) published {TIME} ago ` @@ -469,8 +401,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -579,8 +510,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -695,8 +625,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> @@ -759,8 +688,7 @@ dist .unpackedSize: 1.0 GB dependencies: -red: 1.0.0 -yellow: 1.0.0 +red: 1.0.0, yellow: 1.0.0 maintainers: - claudia <c@yellow.com> diff --git a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs index 2e639084796d85..d1b790cfe94539 100644 --- a/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/docs.js.test.cjs @@ -155,6 +155,7 @@ Array [ "team", "test", "token", + "trust", "undeprecate", "uninstall", "unpublish", @@ -290,7 +291,7 @@ If the requested version is a \`dist-tag\` and the given tag does not pass the will be used. For example, \`foo@latest\` might install \`foo@1.2\` even though \`latest\` is \`2.0\`. - +This config cannot be used with: \`min-release-age\` #### \`bin-links\` @@ -1121,6 +1122,21 @@ Any "%s" in the message will be replaced with the version number. +#### \`min-release-age\` + +* Default: null +* Type: null or Number + +If set, npm will build the npm tree such that only versions that were +available more than the given number of days ago will be installed. If there +are no versions available for the current set of dependencies, the command +will error. + +This flag is a complement to \`before\`, which accepts an exact date instead +of a relative number of days. + +This config cannot be used with: \`before\` + #### \`name\` * Default: null @@ -2318,6 +2334,7 @@ Array [ "name", "maxsockets", "message", + "min-release-age", "node-gyp", "node-options", "noproxy", @@ -2474,6 +2491,7 @@ Array [ "name", "maxsockets", "message", + "min-release-age", "node-gyp", "noproxy", "offline", @@ -2775,6 +2793,16 @@ npm access revoke [] Options: [--json] [--otp ] [--registry ] + --json + Whether or not to output JSON data, rather than the normal output. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --registry + The base URL of the npm registry. + + Run "npm help access" for more info \`\`\`bash @@ -2803,6 +2831,16 @@ npm adduser Options: [--registry ] [--scope <@scope>] [--auth-type ] + --registry + The base URL of the npm registry. + + --scope + Associate an operation with a scope for a scoped registry. + + --auth-type + What authentication strategy to use with \`login\`. + + alias: add-user Run "npm help adduser" for more info @@ -2835,6 +2873,49 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --audit-level + The minimum level of vulnerability for \`npm audit\` to exit with + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -f|--force + Removes various protections against unfortunate side effects, common + + --json + Whether or not to output JSON data, rather than the normal output. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + Run "npm help audit" for more info \`\`\`bash @@ -2868,6 +2949,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --browser + The browser that is called by npm commands to open websites. + + --registry + The base URL of the npm registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: issues Run "npm help bugs" for more info @@ -2900,6 +2997,10 @@ npm cache npx info ... Options: [--cache ] + --cache + The location of npm's cache directory. + + Run "npm help cache" for more info \`\`\`bash @@ -2933,6 +3034,58 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: clean-install, ic, install-clean, isntall-clean Run "npm help ci" for more info @@ -2968,6 +3121,9 @@ Tab Completion for npm Usage: npm completion +Options: + + Run "npm help completion" for more info \`\`\`bash @@ -2994,6 +3150,22 @@ Options: [--json] [-g|--global] [--editor ] [-L|--location ] [-l|--long] + --json + Whether or not to output JSON data, rather than the normal output. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --editor + The command to run for \`npm edit\` and \`npm config edit\`. + + -L|--location + When passed to \`npm config\` this refers to which config file to use. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + alias: c Run "npm help config" for more info @@ -3034,6 +3206,58 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: ddp Run "npm help dedupe" for more info @@ -3072,6 +3296,16 @@ npm deprecate Options: [--registry ] [--otp ] [--dry-run] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + Run "npm help deprecate" for more info \`\`\`bash @@ -3099,6 +3333,46 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --diff + Define arguments to compare in \`npm diff\`. + + --diff-name-only + Prints only filenames when using \`npm diff\`. + + --diff-unified + The number of lines of context to print in \`npm diff\`. + + --diff-ignore-all-space + Ignore whitespace when comparing lines in \`npm diff\`. + + --diff-no-prefix + Do not show any source or destination prefix in \`npm diff\` output. + + --diff-src-prefix + Source prefix to be used in \`npm diff\` output. + + --diff-dst-prefix + Destination prefix to be used in \`npm diff\` output. + + --diff-text + Treat all files as text in \`npm diff\`. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --tag + If you ask npm to install a package and don't tell it a specific version, + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + Run "npm help diff" for more info \`\`\`bash @@ -3132,6 +3406,16 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: dist-tags Run "npm help dist-tag" for more info @@ -3160,6 +3444,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --browser + The browser that is called by npm commands to open websites. + + --registry + The base URL of the npm registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: home Run "npm help docs" for more info @@ -3186,6 +3486,10 @@ npm doctor [connection] [registry] [versions] [environment] [permissions] [cache Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help doctor" for more info \`\`\`bash @@ -3206,6 +3510,10 @@ npm edit [/...] Options: [--editor ] + --editor + The command to run for \`npm edit\` and \`npm config edit\`. + + Run "npm help edit" for more info \`\`\`bash @@ -3231,6 +3539,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --package + The package or packages to install for [\`npm exec\`](/commands/npm-exec) + + -c|--call + Optional companion option for \`npm exec\`, \`npx\` that allows for + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + alias: x Run "npm help exec" for more info @@ -3260,6 +3584,13 @@ npm explain Options: [--json] [-w|--workspace [-w|--workspace ...]] + --json + Whether or not to output JSON data, rather than the normal output. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + alias: why Run "npm help explain" for more info @@ -3283,6 +3614,10 @@ npm explore [ -- ] Options: [--shell ] + --shell + The shell to run for the \`npm explore\` command. + + Run "npm help explore" for more info \`\`\`bash @@ -3309,6 +3644,52 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + Run "npm help find-dupes" for more info \`\`\`bash @@ -3343,6 +3724,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--which ] + --json + Whether or not to output JSON data, rather than the normal output. + + --browser + The browser that is called by npm commands to open websites. + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --which + If there are multiple funding sources, which 1-indexed source URL to open. + + Run "npm help fund" for more info \`\`\`bash @@ -3365,6 +3762,10 @@ npm get [ ...] (See \`npm config\`) Options: [-l|--long] + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + Run "npm help get" for more info \`\`\`bash @@ -3385,6 +3786,10 @@ npm help [] Options: [--viewer ] + --viewer + The program to use to view help content. + + alias: hlep Run "npm help help" for more info @@ -3409,6 +3814,10 @@ npm help-search Options: [-l|--long] + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + Run "npm help help-search" for more info \`\`\`bash @@ -3434,6 +3843,49 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--no-workspaces-update] [--include-workspace-root] + --init-author-name + The value \`npm init\` should use by default for the package author's name. + + --init-author-url + The value \`npm init\` should use by default for the package author's homepage. + + --init-license + The value \`npm init\` should use by default for the package license. + + --init-module + A module that will be loaded by the \`npm init\` command. See the + + --init-type + The value that \`npm init\` should use by default for the package.json type field. + + --init-version + The value that \`npm init\` should use by default for the package + + --init-private + The value \`npm init\` should use by default for the package's private flag. + + -y|--yes + Automatically answer "yes" to any prompts that npm might print on + + -f|--force + Removes various protections against unfortunate side effects, common + + --scope + Associate an operation with a scope for a scoped registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --workspaces-update + If set to true, the npm cli will run an update after operations that may + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + aliases: create, innit Run "npm help init" for more info @@ -3475,11 +3927,96 @@ Options: [--include [--include ...]] [--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only] [--foreground-scripts] [--ignore-scripts] [--allow-git ] -[--no-audit] [--before ] [--no-bin-links] [--no-fund] [--dry-run] -[--cpu ] [--os ] [--libc ] +[--no-audit] [--before |--min-release-age ] [--no-bin-links] +[--no-fund] [--dry-run] [--cpu ] [--os ] [--libc ] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -E|--save-exact + Dependencies saved to package.json will be configured with an exact + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --prefer-dedupe + Prefer to deduplicate packages if possible, rather than + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + + --min-release-age + If set, npm will build the npm tree such that only versions that were + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --cpu + Override CPU architecture of native modules to install. + + --os + Override OS of native modules to install. + + --libc + Override libc of native modules to install. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall Run "npm help install" for more info @@ -3507,6 +4044,7 @@ aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall #### \`allow-git\` #### \`audit\` #### \`before\` +#### \`min-release-age\` #### \`bin-links\` #### \`fund\` #### \`dry-run\` @@ -3535,6 +4073,58 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: cit, clean-install-test, sit Run "npm help install-ci-test" for more info @@ -3578,11 +4168,96 @@ Options: [--include [--include ...]] [--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only] [--foreground-scripts] [--ignore-scripts] [--allow-git ] -[--no-audit] [--before ] [--no-bin-links] [--no-fund] [--dry-run] -[--cpu ] [--os ] [--libc ] +[--no-audit] [--before |--min-release-age ] [--no-bin-links] +[--no-fund] [--dry-run] [--cpu ] [--os ] [--libc ] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -E|--save-exact + Dependencies saved to package.json will be configured with an exact + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --prefer-dedupe + Prefer to deduplicate packages if possible, rather than + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + + --min-release-age + If set, npm will build the npm tree such that only versions that were + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --cpu + Override CPU architecture of native modules to install. + + --os + Override OS of native modules to install. + + --libc + Override libc of native modules to install. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: it Run "npm help install-test" for more info @@ -3610,6 +4285,7 @@ alias: it #### \`allow-git\` #### \`audit\` #### \`before\` +#### \`min-release-age\` #### \`bin-links\` #### \`fund\` #### \`dry-run\` @@ -3640,20 +4316,81 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] -alias: ln + -S|--save + Save installed packages to a \`package.json\` file as dependencies. -Run "npm help link" for more info + -E|--save-exact + Dependencies saved to package.json will be configured with an exact -\`\`\`bash -npm link [] + -g|--global + Operates in "global" mode, so that packages are installed into the -alias: ln -\`\`\` + --install-strategy + Sets the strategy for installing packages in node_modules. -#### \`save\` -#### \`save-exact\` -#### \`global\` -#### \`install-strategy\` + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --allow-git + Limits the ability for npm to fetch dependencies from git references. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + +alias: ln + +Run "npm help link" for more info + +\`\`\`bash +npm link [] + +alias: ln +\`\`\` + +#### \`save\` +#### \`save-exact\` +#### \`global\` +#### \`install-strategy\` #### \`legacy-bundling\` #### \`global-style\` #### \`strict-peer-deps\` @@ -3686,6 +4423,52 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -a|--all + When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show + + --json + Whether or not to output JSON data, rather than the normal output. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --depth + The depth to go when recursing packages for \`npm ls\`. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --link + Used with \`npm ls\`, limiting output to only those packages that are + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: la Run "npm help ll" for more info @@ -3722,6 +4505,16 @@ npm login Options: [--registry ] [--scope <@scope>] [--auth-type ] + --registry + The base URL of the npm registry. + + --scope + Associate an operation with a scope for a scoped registry. + + --auth-type + What authentication strategy to use with \`login\`. + + Run "npm help login" for more info \`\`\`bash @@ -3744,6 +4537,13 @@ npm logout Options: [--registry ] [--scope <@scope>] + --registry + The base URL of the npm registry. + + --scope + Associate an operation with a scope for a scoped registry. + + Run "npm help logout" for more info \`\`\`bash @@ -3770,6 +4570,52 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -a|--all + When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show + + --json + Whether or not to output JSON data, rather than the normal output. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --depth + The depth to go when recursing packages for \`npm ls\`. + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --link + Used with \`npm ls\`, limiting output to only those packages that are + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: list Run "npm help ls" for more info @@ -3829,6 +4675,19 @@ npm org ls orgname [] Options: [--registry ] [--otp ] [--json] [-p|--parseable] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --json + Whether or not to output JSON data, rather than the normal output. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + alias: ogr Run "npm help org" for more info @@ -3858,7 +4717,29 @@ npm outdated [ ...] Options: [-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [-w|--workspace [-w|--workspace ...]] -[--before ] +[--before |--min-release-age ] + + -a|--all + When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show + + --json + Whether or not to output JSON data, rather than the normal output. + + -l|--long + Show extended information in \`ls\`, \`search\`, and \`help-search\`. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + -g|--global + Operates in "global" mode, so that packages are installed into the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + Run "npm help outdated" for more info @@ -3873,6 +4754,7 @@ npm outdated [ ...] #### \`global\` #### \`workspace\` #### \`before\` +#### \`min-release-age\` ` exports[`test/lib/docs.js TAP usage owner > must match snapshot 1`] = ` @@ -3888,6 +4770,19 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + alias: author Run "npm help owner" for more info @@ -3917,6 +4812,28 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--ignore-scripts] + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --json + Whether or not to output JSON data, rather than the normal output. + + --pack-destination + Directory in which \`npm pack\` will save tarballs. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + Run "npm help pack" for more info \`\`\`bash @@ -3941,6 +4858,10 @@ npm ping Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help ping" for more info \`\`\`bash @@ -3968,6 +4889,19 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + -f|--force + Removes various protections against unfortunate side effects, common + + --json + Whether or not to output JSON data, rather than the normal output. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + Run "npm help pkg" for more info \`\`\`bash @@ -3994,6 +4928,10 @@ npm prefix Options: [-g|--global] + -g|--global + Operates in "global" mode, so that packages are installed into the + + Run "npm help prefix" for more info \`\`\`bash @@ -4017,6 +4955,19 @@ npm profile set Options: [--registry ] [--json] [-p|--parseable] [--otp ] + --registry + The base URL of the npm registry. + + --json + Whether or not to output JSON data, rather than the normal output. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + Run "npm help profile" for more info \`\`\`bash @@ -4047,6 +4998,37 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --json + Whether or not to output JSON data, rather than the normal output. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + Run "npm help prune" for more info \`\`\`bash @@ -4076,6 +5058,31 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--provenance|--provenance-file ] + --tag + If you ask npm to install a package and don't tell it a specific version, + + --access + If you do not want your scoped package to be publicly viewable (and + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --provenance + When publishing from a supported cloud CI/CD system, the package will be + + Run "npm help publish" for more info \`\`\`bash @@ -4105,6 +5112,25 @@ Options: [--workspaces] [--include-workspace-root] [--package-lock-only] [--expect-results|--expect-result-count ] + -g|--global + Operates in "global" mode, so that packages are installed into the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --expect-results + Tells npm whether or not to expect results from the command. + + Run "npm help query" for more info \`\`\`bash @@ -4131,6 +5157,31 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -g|--global + Operates in "global" mode, so that packages are installed into the + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + alias: rb Run "npm help rebuild" for more info @@ -4162,6 +5213,22 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --browser + The browser that is called by npm commands to open websites. + + --registry + The base URL of the npm registry. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + Run "npm help repo" for more info \`\`\`bash @@ -4184,6 +5251,13 @@ npm restart [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + Run "npm help restart" for more info \`\`\`bash @@ -4203,6 +5277,10 @@ npm root Options: [-g|--global] + -g|--global + Operates in "global" mode, so that packages are installed into the + + Run "npm help root" for more info \`\`\`bash @@ -4225,6 +5303,28 @@ Options: [--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts] [--foreground-scripts] [--script-shell ] + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --if-present + If true, npm will not exit with an error code when \`run\` is + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + aliases: run-script, rum, urn Run "npm help run" for more info @@ -4257,6 +5357,25 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + --omit + Dependency types to omit from the installation tree on disk. + + --package-lock-only + If set to true, the current operation will only use the \`package-lock.json\`, + + --sbom-format + SBOM format to use when generating SBOMs. + + --sbom-type + The type of package described by the generated SBOM. For SPDX, this is the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + Run "npm help sbom" for more info \`\`\`bash @@ -4283,6 +5402,40 @@ Options: [--searchexclude ] [--registry ] [--prefer-online] [--prefer-offline] [--offline] + --json + Whether or not to output JSON data, rather than the normal output. + + --color + If false, never shows colors. If \`"always"\` then always shows colors. + + -p|--parseable + Output parseable results from commands that write to standard output. For + + --description + Show the description in \`npm search\` + + --searchlimit + Number of items to limit search results to. Will not apply at all to + + --searchopts + Space-separated options that are always passed to search. + + --searchexclude + Space-separated options that limit the results from search. + + --registry + The base URL of the npm registry. + + --prefer-online + If true, staleness checks for cached data will be forced, making the CLI + + --prefer-offline + If true, staleness checks for cached data will be bypassed, but missing + + --offline + Force offline mode: no network requests will be done during install. To allow + + aliases: find, s, se Run "npm help search" for more info @@ -4317,6 +5470,13 @@ npm set = [= ...] (See \`npm config\`) Options: [-g|--global] [-L|--location ] + -g|--global + Operates in "global" mode, so that packages are installed into the + + -L|--location + When passed to \`npm config\` this refers to which config file to use. + + Run "npm help set" for more info \`\`\`bash @@ -4355,6 +5515,16 @@ npm star [...] Options: [--registry ] [--unicode] [--otp ] + --registry + The base URL of the npm registry. + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + Run "npm help star" for more info \`\`\`bash @@ -4377,6 +5547,10 @@ npm stars [] Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help stars" for more info \`\`\`bash @@ -4397,6 +5571,13 @@ npm start [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + Run "npm help start" for more info \`\`\`bash @@ -4416,6 +5597,13 @@ npm stop [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + Run "npm help stop" for more info \`\`\`bash @@ -4439,6 +5627,19 @@ npm team ls | Options: [--registry ] [--otp ] [-p|--parseable] [--json] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + -p|--parseable + Output parseable results from commands that write to standard output. For + + --json + Whether or not to output JSON data, rather than the normal output. + + Run "npm help team" for more info \`\`\`bash @@ -4466,6 +5667,13 @@ npm test [-- ] Options: [--ignore-scripts] [--script-shell ] + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --script-shell + The shell to use for scripts run with the \`npm exec\`, + + aliases: tst, t Run "npm help test" for more info @@ -4497,6 +5705,52 @@ Options: [--cidr [--cidr ...]] [--bypass-2fa] [--password ] [--registry ] [--otp ] [--read-only] + --name + When creating a Granular Access Token with \`npm token create\`, + + --token-description + Description text for the token when using \`npm token create\`. + + --expires + When creating a Granular Access Token with \`npm token create\`, + + --packages + When creating a Granular Access Token with \`npm token create\`, + + --packages-all + When creating a Granular Access Token with \`npm token create\`, + + --scopes + When creating a Granular Access Token with \`npm token create\`, + + --orgs + When creating a Granular Access Token with \`npm token create\`, + + --packages-and-scopes-permission + When creating a Granular Access Token with \`npm token create\`, + + --orgs-permission + When creating a Granular Access Token with \`npm token create\`, + + --cidr + This is a list of CIDR address to be used when configuring limited access + + --bypass-2fa + When creating a Granular Access Token with \`npm token create\`, + + --password + Password for authentication. Can be provided via command line when + + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --read-only + This is used to mark a token as unable to publish when configuring + + Run "npm help token" for more info \`\`\`bash @@ -4524,6 +5778,45 @@ Note: This command is unaware of workspaces. #### \`read-only\` ` +exports[`test/lib/docs.js TAP usage trust > must match snapshot 1`] = ` +Create a trusted relationship between a package and a OIDC provider + +Usage: +npm trust + +Subcommands: + github + Create a trusted relationship between a package and GitHub Actions + + gitlab + Create a trusted relationship between a package and GitLab CI/CD + + list + List trusted relationships for a package + + revoke + Revoke a trusted relationship for a package + +Run "npm trust --help" for more info on a subcommand. + +Run "npm help trust" for more info + +\`\`\`bash +npm trust +\`\`\` + +Note: This command is unaware of workspaces. + +#### Synopsis +#### Flags +#### Synopsis +#### Flags +#### Synopsis +#### Flags +#### Synopsis +#### Flags +` + exports[`test/lib/docs.js TAP usage undeprecate > must match snapshot 1`] = ` Undeprecate a version of a package @@ -4533,6 +5826,16 @@ npm undeprecate Options: [--registry ] [--otp ] [--dry-run] + --registry + The base URL of the npm registry. + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + Run "npm help undeprecate" for more info \`\`\`bash @@ -4558,6 +5861,25 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: unlink, remove, rm, r, un Run "npm help uninstall" for more info @@ -4587,6 +5909,19 @@ Options: [-w|--workspace [-w|--workspace ...]] [--workspaces] + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -f|--force + Removes various protections against unfortunate side effects, common + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + Run "npm help unpublish" for more info \`\`\`bash @@ -4608,6 +5943,16 @@ npm unstar [...] Options: [--registry ] [--unicode] [--otp ] + --registry + The base URL of the npm registry. + + --unicode + When set to true, npm uses unicode characters in the tree output. When + + --otp + This is a one-time password from a two-factor authenticator. It's needed + + Run "npm help unstar" for more info \`\`\`bash @@ -4634,11 +5979,72 @@ Options: [--omit [--omit ...]] [--include [--include ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] -[--ignore-scripts] [--no-audit] [--before ] [--no-bin-links] [--no-fund] -[--dry-run] +[--ignore-scripts] [--no-audit] [--before |--min-release-age ] +[--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] [--install-links] + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -g|--global + Operates in "global" mode, so that packages are installed into the + + --install-strategy + Sets the strategy for installing packages in node_modules. + + --legacy-bundling + Instead of hoisting package installs in \`node_modules\`, install packages + + --global-style + Only install direct dependencies in the top level \`node_modules\`, + + --omit + Dependency types to omit from the installation tree on disk. + + --include + Option that allows for defining which types of dependencies to install. + + --strict-peer-deps + If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ + + --package-lock + If set to false, then ignore \`package-lock.json\` files when installing. + + --foreground-scripts + Run all build scripts (ie, \`preinstall\`, \`install\`, and + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + --audit + When "true" submit audit reports alongside the current npm command to the + + --before + If passed to \`npm install\`, will rebuild the npm tree such that only + + --bin-links + Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package + + --fund + When "true" displays the message at the end of each \`npm install\` + + --dry-run + Indicates that you don't want npm to make any changes and that it should + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --install-links + When set file: protocol dependencies will be packed and installed as + + aliases: up, upgrade, udpate Run "npm help update" for more info @@ -4662,6 +6068,7 @@ aliases: up, upgrade, udpate #### \`ignore-scripts\` #### \`audit\` #### \`before\` +#### \`min-release-age\` #### \`bin-links\` #### \`fund\` #### \`dry-run\` @@ -4685,6 +6092,43 @@ Options: [--workspaces] [--no-workspaces-update] [--include-workspace-root] [--ignore-scripts] + --allow-same-version + Prevents throwing an error when \`npm version\` is used to set the new + + --commit-hooks + Run git commit hooks when using the \`npm version\` command. + + --git-tag-version + Tag the commit when using the \`npm version\` command. Setting this to + + --json + Whether or not to output JSON data, rather than the normal output. + + --preid + The "prerelease identifier" to use as a prefix for the "prerelease" part + + --sign-git-tag + If set to true, then the \`npm version\` command will tag the version + + -S|--save + Save installed packages to a \`package.json\` file as dependencies. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --workspaces-update + If set to true, the npm cli will run an update after operations that may + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + --ignore-scripts + If true, npm does not run scripts specified in package.json files. + + alias: verison Run "npm help version" for more info @@ -4719,6 +6163,19 @@ Options: [--json] [-w|--workspace [-w|--workspace ...]] [--workspaces] [--include-workspace-root] + --json + Whether or not to output JSON data, rather than the normal output. + + -w|--workspace + Enable running a command in the context of the configured workspaces of the + + --workspaces + Set to true to run the command in the context of **all** configured + + --include-workspace-root + Include the workspace root when workspaces are enabled for a command. + + aliases: info, show, v Run "npm help view" for more info @@ -4744,6 +6201,10 @@ npm whoami Options: [--registry ] + --registry + The base URL of the npm registry. + + Run "npm help whoami" for more info \`\`\`bash diff --git a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs index ca42f133562783..888af047882fa7 100644 --- a/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/npm.js.test.cjs @@ -38,8 +38,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -88,10 +89,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -140,10 +142,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -178,8 +181,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -228,10 +232,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -280,10 +285,11 @@ All commands: sbom, search, set, shrinkwrap, star, stars, start, stop, team, test, - token, undeprecate, - uninstall, unpublish, - unstar, update, version, - view, whoami + token, trust, + undeprecate, uninstall, + unpublish, unstar, + update, version, view, + whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -330,7 +336,7 @@ All commands: restart, root, run, sbom, search, set, shrinkwrap, star, stars, start, stop, - team, test, token, + team, test, token, trust, undeprecate, uninstall, unpublish, unstar, update, version, view, @@ -369,9 +375,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, - whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -406,8 +412,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} @@ -442,8 +449,9 @@ All commands: link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, query, rebuild, repo, restart, root, run, sbom, search, set, shrinkwrap, - star, stars, start, stop, team, test, token, undeprecate, - uninstall, unpublish, unstar, update, version, view, whoami + star, stars, start, stop, team, test, token, trust, + undeprecate, uninstall, unpublish, unstar, update, version, + view, whoami Specify configs in the ini-formatted file: {USERCONFIG} diff --git a/deps/npm/test/fixtures/mock-npm.js b/deps/npm/test/fixtures/mock-npm.js index bac95964c93066..0b29fc934d84c4 100644 --- a/deps/npm/test/fixtures/mock-npm.js +++ b/deps/npm/test/fixtures/mock-npm.js @@ -83,6 +83,16 @@ const getMockNpm = async (t, { mocks, init, load, npm: npmOpts }) => { await Promise.all(this.unrefPromises) return res } + + async exec (cmd, args = this.argv) { + // In tests, when exec is called with args, update config.argv to include them + // This mimics production where config.argv contains the full command line + if (args && args !== this.argv) { + // Build full argv: ['node', 'npm', cmd, ...args] + this.config.argv = [process.argv[0], process.argv[1], cmd, ...args] + } + return super.exec(cmd, args) + } } const npm = init ? new MockNpm() : null diff --git a/deps/npm/test/lib/base-cmd.js b/deps/npm/test/lib/base-cmd.js new file mode 100644 index 00000000000000..21e83d729b0b8c --- /dev/null +++ b/deps/npm/test/lib/base-cmd.js @@ -0,0 +1,678 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../fixtures/mock-npm') +const BaseCommand = require('../../lib/base-cmd.js') +const Definition = require('@npmcli/config/lib/definitions/definition.js') + +t.test('flags() method with command definitions', async t => { + const { npm } = await loadMockNpm(t, { + config: { + mountain: 'kilimanjaro', + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.ok(flags, 'flags() returns an object') + t.equal(flags.mountain, 'kilimanjaro', 'includes config value when set') +}) + +t.test('flags() method with default values', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'everest', 'uses default value when not set') +}) + +t.test('flags() method filters unknown options', async t => { + const { npm } = await loadMockNpm(t, { + // npm.config.argv would have both known and unknown flags parsed + config: { + mountain: 'denali', + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'includes known flag') + t.notOk(flags.bug, 'filters out unknown flags') + t.same(Object.keys(flags), ['mountain'], 'only includes defined keys') +}) + +t.test('flags() method with no definitions', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + async exec () { + return this.flags() + } + } + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.same(flags, {}, 'returns empty object when no definitions') +}) + +t.test('flags() throws error for unknown flags', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Manually set config.argv to simulate command-line with unknown flag + npm.config.argv = ['node', 'npm', 'test-command', '--unknown-flag'] + + const command = new TestCommand(npm) + await t.rejects( + command.exec(), + { message: /Unknown flag.*--unknown-flag/ }, + 'throws error for unknown flag' + ) +}) + +t.test('flags() maps alias to main key', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + alias: ['peak'], + }), + ] + + async exec () { + return this.flags() + } + } + + // Use the alias --peak instead of --mountain + npm.config.argv = ['node', 'npm', 'test-command', '--peak=denali'] + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'alias value is mapped to main key') + t.notOk('peak' in flags, 'alias key is not present in flags') +}) + +t.test('flags() throws error when both main key and alias are provided', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['mountain'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + alias: ['peak'], + }), + ] + + async exec () { + return this.flags() + } + } + + // Provide both --mountain and --peak (its alias) + npm.config.argv = ['node', 'npm', 'test-command', '--mountain=everest', '--peak=denali'] + + const command = new TestCommand(npm) + await t.rejects( + command.exec(), + { message: /Please provide only one of --mountain or --peak/ }, + 'throws error when main key and alias are both provided' + ) +}) + +t.test('getUsage() with no params and no definitions', async t => { + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Test command description'), 'includes description') + t.ok(usage.includes('npm test-command'), 'includes usage line') + t.notOk(usage.includes('Options:'), 'does not include Options section') +}) + +t.test('getUsage() with both params and definitions', async t => { + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + static params = ['mountain', 'river'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + new Definition('river', { + type: String, + default: 'nile', + description: 'Your favorite river', + usage: '--river=', + }), + ] + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Test command description'), 'includes description') + t.ok(usage.includes('Options:'), 'includes Options section') + t.ok(usage.includes('--mountain'), 'includes mountain flag') + t.ok(usage.includes('--river'), 'includes river flag') +}) + +t.test('getUsage() with subcommand without description', async t => { + class SubCommandWithDesc extends BaseCommand { + static name = 'with-desc' + static description = 'Subcommand with description' + } + + class SubCommandNoDesc extends BaseCommand { + static name = 'no-desc' + // No description + } + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + static subcommands = { + 'with-desc': SubCommandWithDesc, + 'no-desc': SubCommandNoDesc, + } + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Subcommands:'), 'includes Subcommands section') + t.ok(usage.includes('with-desc'), 'includes subcommand with description') + t.ok(usage.includes('Subcommand with description'), 'includes the description text') + t.ok(usage.includes('no-desc'), 'includes subcommand without description') +}) + +t.test('getUsage() with definition without description', async t => { + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command description' + static params = ['mountain', 'river'] + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + new Definition('river', { + type: String, + default: 'nile', + description: '', // Empty description + usage: '--river=', + }), + ] + } + + const usage = TestCommand.describeUsage + + t.ok(usage.includes('Options:'), 'includes Options section') + t.ok(usage.includes('--mountain'), 'includes mountain flag in options') + t.ok(usage.includes('Your favorite mountain'), 'includes mountain description') + t.ok(usage.includes('[--river=]'), 'includes river in usage line') + t.notOk(usage.includes(' --river'), 'does not include river flag description section') +}) + +t.test('flags() handles definition with multiple aliases', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + alias: ['peak', 'summit'], // Multiple aliases + }), + ] + + async exec () { + return this.flags() + } + } + + // Use the second alias --summit + npm.config.argv = ['node', 'npm', 'test-command', '--summit=denali'] + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'second alias value is mapped to main key') + t.notOk('summit' in flags, 'alias key is not present in flags') + t.notOk('peak' in flags, 'other alias key is not present in flags') +}) + +t.test('flags() handles definition with short as array', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + short: ['m', 'M'], // Short as array + }), + ] + + async exec () { + return this.flags() + } + } + + // Use the short flag -m + npm.config.argv = ['node', 'npm', 'test-command', '-m', 'denali'] + + const command = new TestCommand(npm) + const [flags] = await command.exec() + + t.equal(flags.mountain, 'denali', 'short flag value is parsed correctly') +}) + +t.test('flags() returns defaults when argv is empty', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set argv to empty array + npm.config.argv = [] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + t.equal(flags.mountain, 'everest', 'returns default value when argv is empty') + t.same(remains, [], 'remains is empty array') +}) + +t.test('flags() throws error for multiple unknown flags with pluralization', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + + static definitions = [ + new Definition('mountain', { + type: String, + default: 'everest', + description: 'Your favorite mountain', + usage: '--mountain=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Provide multiple unknown flags + npm.config.argv = ['node', 'npm', 'test-command', '--unknown-one', '--unknown-two'] + + const command = new TestCommand(npm) + await t.rejects( + command.exec(), + { message: /Unknown flags:.*--unknown-one.*--unknown-two/ }, + 'throws error with pluralized "flags" for multiple unknown flags' + ) +}) + +t.test('base exec() method returns undefined', async t => { + const { npm } = await loadMockNpm(t) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + // Intentionally not overriding exec() to test the base implementation + } + + const command = new TestCommand(npm) + const result = await command.exec() + + t.equal(result, undefined, 'base exec() returns undefined') +}) + +t.test('flags() removes unknown positional warning when value is consumed by command definition', async t => { + // Pass raw argv to loadMockNpm so warnings are generated during config.load() + // The global config sees --id as unknown (boolean), so "abc123" becomes a positional + // and queues a warning. But command-specific definitions should consume it. + const { npm, logs } = await loadMockNpm(t, { + argv: ['--id', 'abc123'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution (mock-npm prepends the command) + npm.config.argv = ['node', 'npm', 'test-command', '--id', 'abc123'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // The flag should be properly parsed + t.equal(flags.id, 'abc123', 'id flag is properly parsed') + t.same(remains, [], 'no remaining positionals') + + // Check that no warning about "abc123" being parsed as positional was logged + const warningLogs = logs.warn + const positionalWarnings = warningLogs.filter(msg => + msg.includes('abc123') && msg.includes('parsed as a normal command line argument') + ) + t.equal(positionalWarnings.length, 0, 'no warning about abc123 being a positional') +}) + +t.test('flags() keeps unknown positional warning when multiple values follow unknown flag', async t => { + // Pass raw argv to loadMockNpm so warnings are generated during config.load() + // Both "abc123" and "def456" are seen as positionals by global config because --id is unknown + // nopt only warns about "abc123" (the immediate next value after unknown flag) + // Command definition consumes "abc123" for --id, "def456" remains as true positional + const { npm, logs } = await loadMockNpm(t, { + argv: ['--id', 'abc123', 'def456'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution + npm.config.argv = ['node', 'npm', 'test-command', '--id', 'abc123', 'def456'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // The flag should be properly parsed + t.equal(flags.id, 'abc123', 'id flag is properly parsed') + t.same(remains, ['def456'], 'def456 remains as positional') + + // Check that warning about "abc123" was removed (consumed by --id) + const warningLogs = logs.warn + const abc123Warnings = warningLogs.filter(msg => + msg.includes('abc123') && msg.includes('parsed as a normal command line argument') + ) + t.equal(abc123Warnings.length, 0, 'no warning about abc123 (consumed by --id)') +}) + +t.test('flags() does not remove unknown positional warning when value is in remains', async t => { + // This tests the else branch where remainsSet.has(unknownPos) is true + // When a value is a true positional (in remains), we should NOT remove its warning + // The warning should be logged (not suppressed) + const { npm, logs } = await loadMockNpm(t, { + argv: ['truepositional'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Manually queue a warning for a value that will be in remains + npm.config.queueWarning('unknown:truepositional', 'config', 'truepositional was parsed as positional') + + // Set up argv for command execution with the value as a true positional + npm.config.argv = ['node', 'npm', 'test-command', 'truepositional'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // The positional should remain + t.same(remains, ['truepositional'], 'truepositional is in remains') + t.equal(flags.id, null, 'id flag uses default') + + // Check that the warning WAS logged (not removed before logWarnings()) + // Because the value is in remains, it's a true positional and should warn + const warningLogs = logs.warn + const positionalWarnings = warningLogs.filter(msg => + msg.includes('truepositional') && msg.includes('parsed as positional') + ) + t.equal(positionalWarnings.length, 1, 'warning for truepositional was logged') +}) + +t.test('flags() throws error for extra positional arguments beyond expected count', async t => { + // When a command specifies static positionals = N, extra positionals should throw an error + const { npm } = await loadMockNpm(t, { + argv: ['pkg1', 'extra1', 'extra2'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static positionals = 1 // expects only 1 positional + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution with multiple positionals + npm.config.argv = ['node', 'npm', 'test-command', 'pkg1', 'extra1', 'extra2'] + + const command = new TestCommand(npm) + + // Should throw error for extra positional + await t.rejects( + command.exec(), + { message: 'Unknown positional argument: extra1' }, + 'throws error for first extra positional' + ) +}) + +t.test('flags() does not throw when positionals is null (unlimited)', async t => { + // When static positionals is null, any number of positionals is allowed without error + const { npm } = await loadMockNpm(t, { + argv: ['pkg1', 'extra1', 'extra2'], + }) + + class TestCommand extends BaseCommand { + static name = 'test-command' + static description = 'Test command' + static positionals = null // unlimited/unchecked + static params = ['id'] + + static definitions = [ + new Definition('id', { + type: String, + default: null, + description: 'An identifier', + usage: '--id=', + }), + ] + + async exec () { + return this.flags() + } + } + + // Set up argv for command execution with multiple positionals + npm.config.argv = ['node', 'npm', 'test-command', 'pkg1', 'extra1', 'extra2'] + + const command = new TestCommand(npm) + const [flags, remains] = await command.exec() + + // All positionals should remain - no error thrown + t.same(remains, ['pkg1', 'extra1', 'extra2'], 'all positionals are in remains') + t.equal(flags.id, null, 'id flag uses default') +}) diff --git a/deps/npm/test/lib/commands/ci.js b/deps/npm/test/lib/commands/ci.js index 8dc0f1d3cc149b..6db01d7b6ec7a3 100644 --- a/deps/npm/test/lib/commands/ci.js +++ b/deps/npm/test/lib/commands/ci.js @@ -308,3 +308,142 @@ t.test('should use --workspace flag', async t => { assert.packageMissing('node_modules/abbrev@1.1.0') assert.packageInstalled('node_modules/lodash@1.1.1') }) + +// Issue #8726 - npm ci fails because npm install produces an out-of-sync lockfile +// https://github.com/npm/cli/issues/8726 +// +// Root cause: an optional peerDependency at an exact version causes buildIdealTree() to resolve a different version than what's in the lockfile. +// +// Pattern (mirrors real-world addons-linter / htmlhint / node-fetch scenario): +// - scanner@1.0.0 has optional peerDep: fetcher@1.0.0 (exact version) +// - hint@1.0.0 has regular dep: fetcher@^1.0.0 (semver range) +// - npm install resolves fetcher to 1.1.0 (latest matching ^1.0.0) +// - npm ci's buildIdealTree sees fetcher@1.1.0 doesn't satisfy the exact peerDep "1.0.0", treats it as a problem edge, resolves fetcher to 1.0.0 +// - validateLockfile: lockfile has 1.1.0, ideal tree has 1.0.0 → MISMATCH + +t.test('issue-8726: npm ci with optional peerDep causing lockfile version mismatch', async t => { + // Pre-built lockfile locks fetcher@1.1.0 (what npm install would pick). + // scanner has optional peerDep fetcher@1.0.0 (exact version). + // buildIdealTree should respect the lockfile version, but the bug causes it to resolve fetcher to 1.0.0, failing validateLockfile. + const { npm, registry } = await loadMockNpm(t, { + config: { audit: false, 'ignore-scripts': true }, + strictRegistryNock: false, + prefixDir: { + 'linter-tarball': { + 'package.json': JSON.stringify({ + name: 'linter', + version: '1.0.0', + dependencies: { scanner: '1.0.0' }, + }), + }, + 'scanner-tarball': { + 'package.json': JSON.stringify({ + name: 'scanner', + version: '1.0.0', + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }), + }, + 'hint-tarball': { + 'package.json': JSON.stringify({ + name: 'hint', + version: '1.0.0', + dependencies: { fetcher: '^1.0.0' }, + }), + }, + 'fetcher-1.0.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.0.0' }), + }, + 'fetcher-1.1.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.1.0' }), + }, + 'package.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + devDependencies: { + linter: '1.0.0', + hint: '1.0.0', + }, + }), + 'package-lock.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + lockfileVersion: 3, + requires: true, + packages: { + '': { + name: 'test-package', + version: '1.0.0', + devDependencies: { linter: '1.0.0', hint: '1.0.0' }, + }, + 'node_modules/linter': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/linter/-/linter-1.0.0.tgz', + dev: true, + dependencies: { scanner: '1.0.0' }, + }, + 'node_modules/scanner': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/scanner/-/scanner-1.0.0.tgz', + dev: true, + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }, + 'node_modules/hint': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/hint/-/hint-1.0.0.tgz', + dev: true, + dependencies: { fetcher: '^1.0.0' }, + }, + 'node_modules/fetcher': { + version: '1.1.0', + resolved: 'https://registry.npmjs.org/fetcher/-/fetcher-1.1.0.tgz', + dev: true, + }, + }, + }), + }, + }) + + // With the fix, buildIdealTree no longer treats the invalid peerOptional edge as a problem, so npm ci proceeds to reification and needs tarballs. + const linterManifest = registry.manifest({ name: 'linter' }) + await registry.tarball({ + manifest: linterManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'linter-tarball'), + }) + + const scannerManifest = registry.manifest({ name: 'scanner' }) + await registry.tarball({ + manifest: scannerManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'scanner-tarball'), + }) + + const hintManifest = registry.manifest({ name: 'hint' }) + await registry.tarball({ + manifest: hintManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'hint-tarball'), + }) + + const fetcherManifest = registry.manifest({ + name: 'fetcher', + versions: ['1.0.0', '1.1.0'], + }) + await registry.tarball({ + manifest: fetcherManifest.versions['1.1.0'], + tarball: path.join(npm.prefix, 'fetcher-1.1.0-tarball'), + }) + + // npm ci should succeed - the lockfile is valid and the fix ensures the peerOptional edge doesn't cause a version mismatch. + await npm.exec('ci', []) + + const installedFetcher = JSON.parse( + fs.readFileSync( + path.join(npm.prefix, 'node_modules', 'fetcher', 'package.json'), 'utf8' + ) + ) + t.equal( + installedFetcher.version, + '1.1.0', + 'installed the locked fetcher version, not the peer dep version' + ) +}) diff --git a/deps/npm/test/lib/commands/completion.js b/deps/npm/test/lib/commands/completion.js index e9ed95929fc345..f3a2c4e12ff8fa 100644 --- a/deps/npm/test/lib/commands/completion.js +++ b/deps/npm/test/lib/commands/completion.js @@ -186,6 +186,141 @@ t.test('completion', async t => { await completion.exec(['npm', '--registry', 'install']) t.matchSnapshot(outputs, 'does not try to complete option arguments in the middle of a command') }) + + // Test custom definition flag that requires a value (non-Boolean) + t.test('completion after custom definition flag requiring value', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 4, 'npm trust github --file value') + + await completion.exec(['npm', 'trust', 'github', '--file', 'value']) + t.matchSnapshot(outputs, 'custom definition non-Boolean flag handled') + }) + + t.test('trust subcommands', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 2, 'npm trust ') + + await completion.exec(['npm', 'trust', '']) + t.matchSnapshot(outputs, 'trust subcommands') + }) + + t.test('trust filtered subcommands', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 2, 'npm trust g') + + await completion.exec(['npm', 'trust', 'g']) + t.matchSnapshot(outputs, 'trust filtered subcommands') + }) + + t.test('trust github flags', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 3, 'npm trust github --re') + + await completion.exec(['npm', 'trust', 'github', '--re']) + t.matchSnapshot(outputs, 'trust github flags with custom definitions') + }) + + t.test('trust gitlab flags', async t => { + const { outputs, completion } = await loadMockCompletionComp(t, 3, 'npm trust gitlab --pro') + + await completion.exec(['npm', 'trust', 'gitlab', '--pro']) + t.matchSnapshot(outputs, 'trust gitlab flags with custom definitions') + }) + + // Test to ensure custom definition aliases are recognized + t.test('custom definition with alias', async t => { + const { completion } = await loadMockCompletionComp(t, 3, 'npm trust github --repo') + await completion.exec(['npm', 'trust', 'github', '--repo']) + t.pass('custom alias handled') + }) + + // Test to ensure the code handles undefined word gracefully + t.test('completion with undefined current word', async t => { + const { completion } = await loadMockCompletion(t, { + globals: { + 'process.env.COMP_CWORD': '3', + 'process.env.COMP_LINE': 'npm trust github ', + 'process.env.COMP_POINT': '19', + }, + }) + await completion.exec(['npm', 'trust', 'github']) + t.pass('undefined word handled') + }) + + // Test custom definition Boolean type checking (covers isFlag with custom defs) + t.test('completion after Boolean flag from custom definitions', async t => { + const { completion } = await loadMockCompletionComp(t, 4, 'npm trust github --yes ') + await completion.exec(['npm', 'trust', 'github', '--yes', '']) + t.pass('Boolean custom definition handled') + }) + + // Test custom definition non-Boolean type (requires value) + t.test('completion after non-Boolean custom definition flag', async t => { + const { completion } = await loadMockCompletionComp(t, 4, 'npm trust github --file ') + await completion.exec(['npm', 'trust', 'github', '--file', '']) + t.pass('non-Boolean custom definition handled') + }) + + // Test to trigger isFlag with custom definition alias + t.test('completion after custom definition flag with alias', async t => { + const { completion } = await loadMockCompletionComp(t, 4, 'npm trust github --repo ') + await completion.exec(['npm', 'trust', 'github', '--repo', '']) + t.pass('custom definition alias handled in isFlag') + }) + + // Test to cover shorthand fallback in isFlag (line 345) + t.test('completion with unknown flag', async t => { + const { completion } = await loadMockCompletionComp(t, 3, 'npm install --unknown ') + await completion.exec(['npm', 'install', '--unknown', '']) + t.pass('unknown flag handled via shorthand fallback') + }) + + // Test to cover line 110 - cursor in middle of word + t.test('completion with cursor in middle of word', async t => { + const { completion } = await loadMockCompletion(t, { + globals: { + 'process.env.COMP_CWORD': '1', + 'process.env.COMP_LINE': 'npm install', + 'process.env.COMP_POINT': '7', // cursor after "npm ins" + }, + }) + await completion.exec(['npm', 'ins']) + t.pass('cursor in middle of word handled') + }) + + // Test to cover line 110 - with escaped/quoted word + t.test('completion with escaped word', async t => { + const { completion } = await loadMockCompletion(t, { + globals: { + 'process.env.COMP_CWORD': '1', + 'process.env.COMP_LINE': 'npm inst', + 'process.env.COMP_POINT': '8', // cursor after "npm inst" + }, + }) + await completion.exec(['npm', 'install']) // args has full word but COMP_LINE is partial + t.pass('escaped word handled') + }) + + // Test to cover line 261 - command with definitions (not subcommand) + t.test('completion for command with definitions', async t => { + const { completion } = await loadMockCompletionComp(t, 2, 'npm completion --') + await completion.exec(['npm', 'completion', '--']) + t.pass('command with definitions handled') + }) + + // Test to cover line 141 - false branch where '--' IS in partialWords + t.test('completion with double-dash escape in command line', async t => { + // This tests the false branch at line 141 where partialWords contains '--' + // The '--' escape prevents flag completion + // COMP_CWORD should point to the word AFTER '--' + const { outputs, completion } = await loadMockCompletionComp(t, 3, 'npm install -- pkg') + await completion.exec(['npm', 'install', '--', 'pkg']) + t.matchSnapshot(outputs, 'double-dash escape handled') + }) + + // Test to cover line 142 - false branch where word doesn't start with '-' + t.test('completion with non-flag word', async t => { + // Inside the outer if (no '--' in partialWords) but word doesn't start with '-' + const { outputs, completion } = await loadMockCompletionComp(t, 2, 'npm install pack') + await completion.exec(['npm', 'install', 'pack']) + t.matchSnapshot(outputs, 'non-flag word completion') + }) }) t.test('windows without bash', async t => { diff --git a/deps/npm/test/lib/commands/edit.js b/deps/npm/test/lib/commands/edit.js index ae6826f7f98ade..b55bb2df218ba2 100644 --- a/deps/npm/test/lib/commands/edit.js +++ b/deps/npm/test/lib/commands/edit.js @@ -3,6 +3,20 @@ const path = require('node:path') const tspawk = require('../../fixtures/tspawk') const { load: loadMockNpm } = require('../../fixtures/mock-npm') +t.test('completion', async t => { + const { edit } = await loadMockNpm(t, { + command: 'edit', + prefixDir: { + node_modules: { + foo: {}, + bar: {}, + }, + }, + }) + const res = await edit.completion({ conf: { argv: { remain: ['npm', 'edit'] } } }) + t.match(res, ['bar', 'foo']) +}) + const spawk = tspawk(t) const npmConfig = { diff --git a/deps/npm/test/lib/commands/explain.js b/deps/npm/test/lib/commands/explain.js index b55371c8b7e5c4..d702019e9202a3 100644 --- a/deps/npm/test/lib/commands/explain.js +++ b/deps/npm/test/lib/commands/explain.js @@ -2,6 +2,22 @@ const t = require('tap') const { resolve } = require('node:path') const mockNpm = require('../../fixtures/mock-npm.js') +t.test('completion', async t => { + const { explain } = await mockNpm(t, { + command: 'explain', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await explain.completion({ conf: { argv: { remain: ['npm', 'explain'] } } }) + t.type(res, Array) +}) + const mockExplain = async (t, opts) => { const mock = await mockNpm(t, { command: 'explain', diff --git a/deps/npm/test/lib/commands/explore.js b/deps/npm/test/lib/commands/explore.js index 6988dca90fbfb0..b40de9817bff60 100644 --- a/deps/npm/test/lib/commands/explore.js +++ b/deps/npm/test/lib/commands/explore.js @@ -2,6 +2,20 @@ const t = require('tap') const mockNpm = require('../../fixtures/mock-npm') const { cleanCwd } = require('../../fixtures/clean-snapshot') +t.test('completion', async t => { + const { explore } = await mockNpm(t, { + command: 'explore', + prefixDir: { + node_modules: { + foo: {}, + bar: {}, + }, + }, + }) + const res = await explore.completion({ conf: { argv: { remain: ['npm', 'explore'] } } }) + t.match(res, ['bar', 'foo']) +}) + const mockExplore = async (t, exec, { PJ_ERROR = null, RUN_SCRIPT_ERROR = null, diff --git a/deps/npm/test/lib/commands/fund.js b/deps/npm/test/lib/commands/fund.js index 277190e7a1a481..95521fb6da650e 100644 --- a/deps/npm/test/lib/commands/fund.js +++ b/deps/npm/test/lib/commands/fund.js @@ -1,6 +1,22 @@ const t = require('tap') const mockNpm = require('../../fixtures/mock-npm') +t.test('completion', async t => { + const { fund } = await mockNpm(t, { + command: 'fund', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await fund.completion({ conf: { argv: { remain: ['npm', 'fund'] } } }) + t.type(res, Array) +}) + const version = '1.0.0' const funding = { diff --git a/deps/npm/test/lib/commands/get.js b/deps/npm/test/lib/commands/get.js index dec634f835172e..6a1db696282173 100644 --- a/deps/npm/test/lib/commands/get.js +++ b/deps/npm/test/lib/commands/get.js @@ -1,6 +1,12 @@ const t = require('tap') const { load: loadMockNpm } = require('../../fixtures/mock-npm') +t.test('completion', async t => { + const { get } = await loadMockNpm(t, { command: 'get' }) + const res = await get.completion({ conf: { argv: { remain: ['npm', 'get'] } } }) + t.type(res, Array) +}) + t.test('should retrieve values from config', async t => { const name = 'editor' const value = 'vigor' diff --git a/deps/npm/test/lib/commands/install.js b/deps/npm/test/lib/commands/install.js index d886ed787166cb..584690b68b5c62 100644 --- a/deps/npm/test/lib/commands/install.js +++ b/deps/npm/test/lib/commands/install.js @@ -1,3 +1,4 @@ +const fs = require('node:fs') const tspawk = require('../../fixtures/tspawk') const { cleanCwd, @@ -247,7 +248,7 @@ t.test('exec commands', async t => { npm.exec('install', ['npm/npm']), { code: 'EALLOWGIT', - message: 'Fetching packages from git has been disabled', + message: 'Fetching packages of type "git" have been disabled', package: 'github:npm/npm', } ) @@ -267,7 +268,7 @@ t.test('exec commands', async t => { }) await t.rejects( npm.exec('install', ['./abbrev']), - /Fetching packages from git has been disabled/ + /Fetching packages of type "git" have been disabled/ ) }) }) @@ -770,3 +771,272 @@ t.test('devEngines', async t => { t.ok(!output.includes('EBADDEVENGINES')) }) }) + +// Issue #8726 - npm install should re-resolve to satisfy peerOptional constraints +// https://github.com/npm/cli/issues/8726 +// +// When a lockfile has fetcher@1.1.0 but a peerOptional wants fetcher@1.0.0 (exact), npm install (save: true) should re-resolve fetcher to 1.0.0 to satisfy both the regular dep range (^1.0.0) and the exact peerOptional constraint. +t.test('issue-8726: npm install re-resolves to satisfy peerOptional constraint', async t => { + const { npm, registry } = await loadMockNpm(t, { + config: { audit: false, 'ignore-scripts': true }, + prefixDir: { + 'linter-tarball': { + 'package.json': JSON.stringify({ + name: 'linter', + version: '1.0.0', + dependencies: { scanner: '1.0.0' }, + }), + }, + 'scanner-tarball': { + 'package.json': JSON.stringify({ + name: 'scanner', + version: '1.0.0', + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }), + }, + 'hint-tarball': { + 'package.json': JSON.stringify({ + name: 'hint', + version: '1.0.0', + dependencies: { fetcher: '^1.0.0' }, + }), + }, + 'fetcher-1.0.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.0.0' }), + }, + 'fetcher-1.1.0-tarball': { + 'package.json': JSON.stringify({ name: 'fetcher', version: '1.1.0' }), + }, + 'package.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + devDependencies: { + linter: '1.0.0', + hint: '1.0.0', + }, + }), + 'package-lock.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + lockfileVersion: 3, + requires: true, + packages: { + '': { + name: 'test-package', + version: '1.0.0', + devDependencies: { linter: '1.0.0', hint: '1.0.0' }, + }, + 'node_modules/linter': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/linter/-/linter-1.0.0.tgz', + dev: true, + dependencies: { scanner: '1.0.0' }, + }, + 'node_modules/scanner': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/scanner/-/scanner-1.0.0.tgz', + dev: true, + peerDependencies: { fetcher: '1.0.0' }, + peerDependenciesMeta: { fetcher: { optional: true } }, + }, + 'node_modules/hint': { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/hint/-/hint-1.0.0.tgz', + dev: true, + dependencies: { fetcher: '^1.0.0' }, + }, + 'node_modules/fetcher': { + version: '1.1.0', + resolved: 'https://registry.npmjs.org/fetcher/-/fetcher-1.1.0.tgz', + dev: true, + }, + }, + }), + }, + }) + + // Only set up mocks that npm install actually needs: tarballs for all installed packages (linter, scanner, hint, fetcher@1.0.0) and the fetcher packument (needed for re-resolution via #problemEdges). + // Packuments for linter/scanner/hint are NOT needed (already in lockfile). + // Fetcher@1.1.0 tarball is NOT needed (gets replaced by 1.0.0). + const linterManifest = registry.manifest({ name: 'linter' }) + await registry.tarball({ + manifest: linterManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'linter-tarball'), + }) + + const scannerManifest = registry.manifest({ name: 'scanner' }) + await registry.tarball({ + manifest: scannerManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'scanner-tarball'), + }) + + const hintManifest = registry.manifest({ name: 'hint' }) + await registry.tarball({ + manifest: hintManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'hint-tarball'), + }) + + const fetcherManifest = registry.manifest({ + name: 'fetcher', + versions: ['1.0.0', '1.1.0'], + }) + await registry.package({ manifest: fetcherManifest }) + await registry.tarball({ + manifest: fetcherManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'fetcher-1.0.0-tarball'), + }) + + await npm.exec('install', []) + + // Read the updated lockfile and verify fetcher was re-resolved to 1.0.0 + const lockfile = JSON.parse( + fs.readFileSync(path.join(npm.prefix, 'package-lock.json'), 'utf8') + ) + t.equal( + lockfile.packages['node_modules/fetcher'].version, + '1.0.0', + 'lockfile updated fetcher to satisfy peerOptional constraint' + ) + + // Also verify the installed package + const installedFetcher = JSON.parse( + fs.readFileSync( + path.join(npm.prefix, 'node_modules', 'fetcher', 'package.json'), 'utf8' + ) + ) + t.equal( + installedFetcher.version, + '1.0.0', + 'installed fetcher version satisfies peerOptional constraint' + ) +}) + +// Issue #8726 - fresh npm install (no lockfile) should pick a version that satisfies both the regular dep range AND the exact peerOptional constraint, even when the peerOptional holder is processed BEFORE the dep is placed. +// https://github.com/npm/cli/issues/8726 +// +// This test uses package names that reproduce the real-world alphabetical ordering from the original issue (addons-linter < htmlhint), which causes addons-scanner to be processed from the queue BEFORE htmlhint places node-fetcher. +// At that point the peerOptional edge has no destination (MISSING, valid for peerOptional). +// Later, htmlhint places node-fetcher@1.1.0 and the edge becomes INVALID. +// The fix re-queues addons-scanner so #problemEdges can trigger re-resolution of node-fetcher to 1.0.0. +// +// Dependency graph: +// root -> addons-linter@1.0.0 -> addons-scanner@1.0.0 -> PEER_OPTIONAL node-fetcher@1.0.0 +// root -> htmlhint@1.0.0 -> node-fetcher@^1.0.0 +// +// Processing order (alphabetical): addons-linter, then addons-scanner (dep of addons-linter), THEN htmlhint (which places node-fetcher@1.1.0) +t.test('issue-8726: fresh install re-queues scanner when dep placed later', async t => { + const { npm, registry } = await loadMockNpm(t, { + config: { audit: false, 'ignore-scripts': true }, + prefixDir: { + 'addons-linter-tarball': { + 'package.json': JSON.stringify({ + name: 'addons-linter', + version: '1.0.0', + dependencies: { 'addons-scanner': '1.0.0' }, + }), + }, + 'addons-scanner-tarball': { + 'package.json': JSON.stringify({ + name: 'addons-scanner', + version: '1.0.0', + peerDependencies: { 'node-fetcher': '1.0.0' }, + peerDependenciesMeta: { 'node-fetcher': { optional: true } }, + }), + }, + 'htmlhint-tarball': { + 'package.json': JSON.stringify({ + name: 'htmlhint', + version: '1.0.0', + dependencies: { 'node-fetcher': '^1.0.0' }, + }), + }, + 'node-fetcher-1.0.0-tarball': { + 'package.json': JSON.stringify({ name: 'node-fetcher', version: '1.0.0' }), + }, + 'node-fetcher-1.1.0-tarball': { + 'package.json': JSON.stringify({ name: 'node-fetcher', version: '1.1.0' }), + }, + 'package.json': JSON.stringify({ + name: 'test-package', + version: '1.0.0', + devDependencies: { + 'addons-linter': '1.0.0', + htmlhint: '1.0.0', + }, + }), + // NO package-lock.json — this is a fresh install + }, + }) + + // Fresh install needs packuments for all packages + const linterManifest = registry.manifest({ + name: 'addons-linter', + packuments: [{ version: '1.0.0', dependencies: { 'addons-scanner': '1.0.0' } }], + }) + await registry.package({ manifest: linterManifest }) + await registry.tarball({ + manifest: linterManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'addons-linter-tarball'), + }) + + const scannerManifest = registry.manifest({ + name: 'addons-scanner', + packuments: [{ + version: '1.0.0', + peerDependencies: { 'node-fetcher': '1.0.0' }, + peerDependenciesMeta: { 'node-fetcher': { optional: true } }, + }], + }) + await registry.package({ manifest: scannerManifest }) + await registry.tarball({ + manifest: scannerManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'addons-scanner-tarball'), + }) + + const hintManifest = registry.manifest({ + name: 'htmlhint', + packuments: [{ version: '1.0.0', dependencies: { 'node-fetcher': '^1.0.0' } }], + }) + await registry.package({ manifest: hintManifest }) + await registry.tarball({ + manifest: hintManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'htmlhint-tarball'), + }) + + const fetcherManifest = registry.manifest({ + name: 'node-fetcher', + packuments: [{ version: '1.0.0' }, { version: '1.1.0' }], + }) + // Packument is fetched twice: once when htmlhint resolves node-fetcher@^1.0.0 (picking 1.1.0), and again when addons-scanner is re-queued and re-resolves node-fetcher (picking 1.0.0 to satisfy the exact peerOptional spec). + await registry.package({ manifest: fetcherManifest, times: 2 }) + await registry.tarball({ + manifest: fetcherManifest.versions['1.0.0'], + tarball: path.join(npm.prefix, 'node-fetcher-1.0.0-tarball'), + }) + // node-fetcher@1.1.0 tarball is NOT needed: it's replaced by 1.0.0 during tree building (before reification), so it's never downloaded. + + await npm.exec('install', []) + + // Verify the lockfile has node-fetcher@1.0.0 + const lockfile = JSON.parse( + fs.readFileSync(path.join(npm.prefix, 'package-lock.json'), 'utf8') + ) + t.equal( + lockfile.packages['node_modules/node-fetcher'].version, + '1.0.0', + 'fresh install picks node-fetcher@1.0.0 satisfying peerOptional constraint' + ) + + // Also verify the installed package + const installedFetcher = JSON.parse( + fs.readFileSync( + path.join(npm.prefix, 'node_modules', 'node-fetcher', 'package.json'), 'utf8' + ) + ) + t.equal( + installedFetcher.version, + '1.0.0', + 'installed node-fetcher version satisfies peerOptional constraint' + ) +}) diff --git a/deps/npm/test/lib/commands/ls.js b/deps/npm/test/lib/commands/ls.js index c876af9e83ddfc..1de85b8cfd0959 100644 --- a/deps/npm/test/lib/commands/ls.js +++ b/deps/npm/test/lib/commands/ls.js @@ -5285,3 +5285,19 @@ t.test('ls --package-lock-only', async t => { }) }) }) + +t.test('completion', async t => { + const { ls } = await mockNpm(t, { + command: 'ls', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await ls.completion({ conf: { argv: { remain: ['npm', 'ls'] } } }) + t.type(res, Array) +}) diff --git a/deps/npm/test/lib/commands/publish.js b/deps/npm/test/lib/commands/publish.js index e444121b77e113..4bba640b6d8a3b 100644 --- a/deps/npm/test/lib/commands/publish.js +++ b/deps/npm/test/lib/commands/publish.js @@ -55,7 +55,7 @@ t.test('respects publishConfig.registry, runs appropriate scripts', async t => { t.equal(fs.existsSync(path.join(prefix, 'scripts-prepublish')), false, 'did not run prepublish') t.equal(fs.existsSync(path.join(prefix, 'scripts-publish')), true, 'ran publish') t.equal(fs.existsSync(path.join(prefix, 'scripts-postpublish')), true, 'ran postpublish') - t.same(logs.warn, ['Unknown publishConfig config "other". This will stop working in the next major version of npm.']) + t.same(logs.warn, ['Unknown publishConfig config "other". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.']) }) t.test('re-loads publishConfig.registry if added during script process', async t => { diff --git a/deps/npm/test/lib/commands/rebuild.js b/deps/npm/test/lib/commands/rebuild.js index aa5578460b90fe..0062362b61329b 100644 --- a/deps/npm/test/lib/commands/rebuild.js +++ b/deps/npm/test/lib/commands/rebuild.js @@ -205,3 +205,19 @@ t.test('global prefix', async t => { 'should output success msg' ) }) + +t.test('completion', async t => { + const { rebuild } = await setupMockNpm(t, { + command: 'rebuild', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await rebuild.completion({ conf: { argv: { remain: ['npm', 'rebuild'] } } }) + t.type(res, Array) +}) diff --git a/deps/npm/test/lib/commands/set.js b/deps/npm/test/lib/commands/set.js index a4a2a7349ef1a9..8574b80345e5c5 100644 --- a/deps/npm/test/lib/commands/set.js +++ b/deps/npm/test/lib/commands/set.js @@ -4,6 +4,12 @@ const mockNpm = require('../../fixtures/mock-npm') const { join } = require('node:path') const { cleanNewlines } = require('../../fixtures/clean-snapshot') +t.test('completion', async t => { + const { set } = await mockNpm(t, { command: 'set' }) + const res = await set.completion({ conf: { argv: { remain: ['npm', 'set'] } } }) + t.type(res, Array) +}) + t.test('no args', async t => { const { npm } = await mockNpm(t) t.rejects(npm.exec('set', []), /Usage:/, 'prints usage') diff --git a/deps/npm/test/lib/commands/trust/github.js b/deps/npm/test/lib/commands/trust/github.js new file mode 100644 index 00000000000000..a2b16d272bde15 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/github.js @@ -0,0 +1,153 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') +const realProcLog = require('proc-log') + +const packageName = '@npmcli/test-package' + +t.test('github with all options provided', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--yes', '--file', 'workflow.yml', '--repository', 'owner/repo', '--environment', 'production']) +}) + +t.test('github with invalid repository format', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--yes', '--file', 'workflow.yml', '--repository', 'invalid']), + { message: /must be specified in the format owner\/repository/ } + ) +}) + +t.test('github with file as path', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--yes', '--file', '.github/workflows/ci.yml', '--repository', 'owner/repo']), + { message: /must be just a file not a path/ } + ) +}) + +t.test('github without environment', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--yes', '--file', 'workflow.yml', '--repository', 'owner/repo']) +}) + +t.test('bodyToOptions with all fields', t => { + const TrustGitHub = require('../../../../lib/commands/trust/github.js') + + const body = { + id: 'test-id', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + environment: 'prod', + }, + } + + const options = TrustGitHub.bodyToOptions(body) + + t.equal(options.id, 'test-id', 'id should be set') + t.equal(options.type, 'github', 'type should be set') + t.equal(options.file, 'test.yml', 'file should be set') + t.equal(options.repository, 'owner/repo', 'repository should be set') + t.equal(options.environment, 'prod', 'environment should be set') + t.end() +}) diff --git a/deps/npm/test/lib/commands/trust/gitlab.js b/deps/npm/test/lib/commands/trust/gitlab.js new file mode 100644 index 00000000000000..0b60196830c5f7 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/gitlab.js @@ -0,0 +1,153 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') +const realProcLog = require('proc-log') + +const packageName = '@npmcli/test-package' + +t.test('gitlab with all options provided', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab-ci.yml', '--project', 'group/subgroup/repo', '--environment', 'production']) +}) + +t.test('gitlab with invalid project format', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab-ci.yml', '--project', 'invalid']), + { message: /must be specified in the format/ } + ) +}) + +t.test('gitlab with file as path', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab/ci.yml', '--project', 'group/repo']), + { message: /must be just a file not a path/ } + ) +}) + +t.test('gitlab without environment', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['gitlab', packageName, '--yes', '--file', '.gitlab-ci.yml', '--project', 'group/repo']) +}) + +t.test('bodyToOptions with all fields', t => { + const TrustGitLab = require('../../../../lib/commands/trust/gitlab.js') + + const body = { + id: 'test-id', + type: 'gitlab', + claims: { + project_path: 'group/repo', + ci_config_ref_uri: { + file: '.gitlab-ci.yml', + }, + environment: 'prod', + }, + } + + const options = TrustGitLab.bodyToOptions(body) + + t.equal(options.id, 'test-id', 'id should be set') + t.equal(options.type, 'gitlab', 'type should be set') + t.equal(options.file, '.gitlab-ci.yml', 'file should be set') + t.equal(options.project, 'group/repo', 'project should be set') + t.equal(options.environment, 'prod', 'environment should be set') + t.end() +}) diff --git a/deps/npm/test/lib/commands/trust/list.js b/deps/npm/test/lib/commands/trust/list.js new file mode 100644 index 00000000000000..99d25b66bc90c8 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/list.js @@ -0,0 +1,256 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') + +const packageName = '@npmcli/test-package' + +t.test('list with package name argument', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + }, + environment: 'production', + }, + { + id: 'test-id-2', + type: 'gitlab', + claims: { + project_id: '12345', + ref_path: 'refs/heads/main', + pipeline_source: 'push', + }, + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list', packageName]) +}) + +t.test('list without package name (uses package.json)', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list']) +}) + +t.test('list with no trust configurations', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustList({ packageName, body: [] }) + + await npm.exec('trust', ['list', packageName]) +}) + +t.test('list without package name and no package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: {}, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['list']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('list without package name and no name in package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['list']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('list with --json flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + json: true, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + }, + environment: 'production', + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list', packageName]) +}) + +t.test('list with scoped package', async t => { + const scopedPackage = '@scope/package' + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: scopedPackage, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'github', + claims: { + repository: 'owner/repo', + workflow_ref: { + file: 'test.yml', + }, + }, + }, + ] + + registry.trustList({ packageName: scopedPackage, body: trustConfigs }) + + await npm.exec('trust', ['list', scopedPackage]) +}) + +t.test('list with unknown trust type', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustConfigs = [ + { + id: 'test-id-1', + type: 'unknown-type', + claims: { + custom: 'value', + }, + }, + ] + + registry.trustList({ packageName, body: trustConfigs }) + + await npm.exec('trust', ['list', packageName]) +}) diff --git a/deps/npm/test/lib/commands/trust/revoke.js b/deps/npm/test/lib/commands/trust/revoke.js new file mode 100644 index 00000000000000..d44d576664c866 --- /dev/null +++ b/deps/npm/test/lib/commands/trust/revoke.js @@ -0,0 +1,319 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../../../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') + +const packageName = '@npmcli/test-package' + +t.test('revoke with package name argument and id', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-1' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke without package name (uses package.json)', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-2' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', '--id', trustId]) +}) + +t.test('revoke with dry-run flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + // No registry mock needed since dry-run should not make network requests + const trustId = 'test-id-3' + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke without package name and no package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: {}, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', '--id', 'test-id']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('revoke without package name and no name in package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', '--id', 'test-id']), + { message: /Package name must be specified either as an argument or in the package\.json file/ } + ) +}) + +t.test('revoke without id flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', packageName]), + { message: /ID of the trusted relationship to revoke must be specified with the --id option/ } + ) +}) + +t.test('revoke with scoped package', async t => { + const scopedPackage = '@scope/package' + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: scopedPackage, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-scoped' + registry.trustRevoke({ packageName: scopedPackage, id: trustId }) + + await npm.exec('trust', ['revoke', scopedPackage, '--id', trustId]) +}) + +t.test('revoke with special characters in id', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id/with:special@chars' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke with 404 response', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'non-existent-id' + registry.trustRevoke({ + packageName, + id: trustId, + responseCode: 404, + body: { error: 'Not Found' }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', packageName, '--id', trustId]), + { statusCode: 404 } + ) +}) + +t.test('revoke with 500 response', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-error' + registry.trustRevoke({ + packageName, + id: trustId, + responseCode: 500, + body: { error: 'Internal Server Error' }, + }) + + await t.rejects( + npm.exec('trust', ['revoke', packageName, '--id', trustId]), + { statusCode: 500 } + ) +}) + +t.test('revoke with unscoped package name', async t => { + const unscopedPackage = 'test-package' + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: unscopedPackage, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'test-id-unscoped' + registry.trustRevoke({ packageName: unscopedPackage, id: trustId }) + + await npm.exec('trust', ['revoke', unscopedPackage, '--id', trustId]) +}) + +t.test('revoke with very long id', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = 'a'.repeat(100) + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) + +t.test('revoke with UUID id format', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + const trustId = '550e8400-e29b-41d4-a716-446655440000' + registry.trustRevoke({ packageName, id: trustId }) + + await npm.exec('trust', ['revoke', packageName, '--id', trustId]) +}) diff --git a/deps/npm/test/lib/commands/uninstall.js b/deps/npm/test/lib/commands/uninstall.js index a1ef1745d0f555..2ede1c4c1a72af 100644 --- a/deps/npm/test/lib/commands/uninstall.js +++ b/deps/npm/test/lib/commands/uninstall.js @@ -200,3 +200,17 @@ t.test('non ENOENT error reading from localPrefix package.json', async t => { 'should throw non ENOENT error' ) }) + +t.test('completion', async t => { + const { uninstall } = await _mockNpm(t, { + command: 'uninstall', + prefixDir: { + node_modules: { + foo: {}, + bar: {}, + }, + }, + }) + const res = await uninstall.completion({ conf: { argv: { remain: ['npm', 'uninstall'] } } }) + t.match(res, ['bar', 'foo']) +}) diff --git a/deps/npm/test/lib/commands/unpublish.js b/deps/npm/test/lib/commands/unpublish.js index 996edf2b881fc4..4c8bc5e058afa2 100644 --- a/deps/npm/test/lib/commands/unpublish.js +++ b/deps/npm/test/lib/commands/unpublish.js @@ -409,7 +409,7 @@ t.test('publishConfig no spec', async t => { t.equal(joinedOutput(), '- test-package') t.same(logs.warn, [ 'using --force Recommended protections disabled.', - 'Unknown publishConfig config "other". This will stop working in the next major version of npm.', + 'Unknown publishConfig config "other". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.', ]) }) diff --git a/deps/npm/test/lib/commands/update.js b/deps/npm/test/lib/commands/update.js index e84e2c3142141b..a8c68bd65bb361 100644 --- a/deps/npm/test/lib/commands/update.js +++ b/deps/npm/test/lib/commands/update.js @@ -79,3 +79,19 @@ t.test('update --global', async t => { t.match(ctor.path, globalPrefix) t.ok(ctor.path.startsWith(globalPrefix)) }) + +t.test('completion', async t => { + const { update } = await _mockNpm(t, { + command: 'update', + prefixDir: { + node_modules: { + foo: { + 'package.json': JSON.stringify({ name: 'foo', version: '1.0.0' }), + }, + }, + 'package.json': JSON.stringify({ name: 'project', version: '1.0.0' }), + }, + }) + const res = await update.completion({ conf: { argv: { remain: ['npm', 'update'] } } }) + t.type(res, Array) +}) diff --git a/deps/npm/test/lib/commands/view.js b/deps/npm/test/lib/commands/view.js index e5e0fbff981c92..f1b7b5895113b9 100644 --- a/deps/npm/test/lib/commands/view.js +++ b/deps/npm/test/lib/commands/view.js @@ -837,6 +837,6 @@ t.test('allow-git=none', async t => { await t.rejects(view.exec(['npm/npm']), { code: 'EALLOWGIT', package: 'github:npm/npm', - message: 'Fetching packages from git has been disabled', + message: 'Fetching packages of type "git" have been disabled', }) }) diff --git a/deps/npm/test/lib/docs.js b/deps/npm/test/lib/docs.js index 833e58831ea51d..4b4a438997f15d 100644 --- a/deps/npm/test/lib/docs.js +++ b/deps/npm/test/lib/docs.js @@ -90,16 +90,27 @@ t.test('basic usage', async t => { t.test('usage', async t => { const readdir = async (dir, ext) => { - const files = await fs.readdir(dir) - return files.filter(f => extname(f) === ext).map(f => basename(f, ext)) + const files = await fs.readdir(dir, { withFileTypes: true }) + return files + .filter(f => { + // Include .js files + if (f.isFile() && extname(f.name) === ext) { + return true + } + // Include directories (which should have an index.js) + if (f.isDirectory()) { + return true + } + return false + }) + .map(f => f.isDirectory() ? f.name : basename(f.name, ext)) } const fsCommands = await readdir(resolve(__dirname, '../../lib/commands'), '.js') const docsCommands = await readdir(join(docs.paths.content, 'commands'), docs.DOC_EXT) const bareCommands = ['npm', 'npx'] - // XXX: These extra commands exist as js files but not as docs pages - const allDocs = docsCommands.concat(['get', 'set', 'll']).map(n => n.replace('npm-', '')) + const allDocs = docsCommands.map(n => n.replace('npm-', '')) // ensure that the list of js files in commands, docs files, and the command list // are all in sync. eg, this will error if a command is removed but not its docs file @@ -125,7 +136,7 @@ t.test('usage', async t => { } const usage = docs.usage(docs.TAGS.USAGE, { path: cmd }) - const params = docs.params(docs.TAGS.CONFIG, { path: cmd }) + const params = docs.definitions(docs.TAGS.CONFIG, { path: cmd }) .split('\n') .filter(l => l.startsWith('#### ')) .join('\n') || 'NO PARAMS' diff --git a/deps/npm/test/lib/npm.js b/deps/npm/test/lib/npm.js index b4ac509adb4952..c4c0d720e86e8c 100644 --- a/deps/npm/test/lib/npm.js +++ b/deps/npm/test/lib/npm.js @@ -1,6 +1,6 @@ const t = require('tap') const { resolve, dirname, join } = require('node:path') -const fs = require('node:fs') +const fs = require('node:fs/promises') const { time } = require('proc-log') const { load: loadMockNpm } = require('../fixtures/mock-npm.js') const mockGlobals = require('@npmcli/mock-globals') @@ -327,11 +327,11 @@ t.test('debug log', async t => { const logsDir = join(testdir, 'my_logs_dir') // make logs dir a file before load so it files - fs.writeFileSync(logsDir, 'A_TEXT_FILE') + await fs.writeFile(logsDir, 'A_TEXT_FILE') await t.resolves(npm.load(), 'loads with invalid logs dir') t.equal(npm.logFiles.length, 0, 'no log files array') - t.strictSame(fs.readFileSync(logsDir, 'utf-8'), 'A_TEXT_FILE') + t.strictSame(await fs.readFile(logsDir, 'utf-8'), 'A_TEXT_FILE') }) }) @@ -339,7 +339,7 @@ t.test('cache dir', async t => { t.test('creates a cache dir', async t => { const { npm } = await loadMockNpm(t) - t.ok(fs.existsSync(npm.cache), 'cache dir exists') + await t.resolves(fs.access(npm.cache), 'cache dir exists') }) t.test('can load with a bad cache dir', async t => { @@ -352,7 +352,7 @@ t.test('cache dir', async t => { await t.resolves(npm.load(), 'loads with cache dir as a file') - t.equal(fs.readFileSync(cache, 'utf-8'), 'A_TEXT_FILE') + t.equal(await fs.readFile(cache, 'utf-8'), 'A_TEXT_FILE') }) }) @@ -497,6 +497,233 @@ t.test('implicit workspace accept', async t => { await t.rejects(mock.npm.exec('org', []), /.*Usage/) }) +t.test('subcommand handling', async t => { + t.test('no subcommand provided', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('trust', []), + /Usage/, + 'throws usage error when no subcommand provided' + ) + }) + + t.test('unknown subcommand', async t => { + const { npm } = await loadMockNpm(t) + await t.rejects( + npm.exec('trust', ['unknown-subcommand']), + /Unknown subcommand: unknown-subcommand/, + 'throws error for unknown subcommand' + ) + }) + + t.test('subcommand help with --usage', async t => { + const { npm, outputs } = await loadMockNpm(t, { + config: { + usage: true, + }, + }) + await npm.exec('trust', ['github']) + t.ok(outputs.length > 0, 'outputs help text') + // Check if output was generated - the format may be different + t.ok(outputs.some(o => o && o[0]), 'has output content') + }) +}) + +t.test('exec edge cases', async t => { + t.test('command calls exec again - covers else branch at line 207', async t => { + const { npm, outputs } = await loadMockNpm(t) + // 'get' command calls npm.exec('config', ['get', ...]) internally + // The first exec() sets #command, then when it re-enters exec(), + // the else branch (line 217) is taken because #command is already set + await npm.exec('get', ['registry']) + t.ok(outputs.length > 0, 'command executed and produced output') + }) + + t.test('exec without args parameter - covers default args branch', async t => { + const Npm = require('../../lib/npm.js') + const npm = new Npm() + await npm.load() + npm.argv = ['test'] + // Call exec without second parameter - should use default args = this.argv + await npm.exec('run') + t.pass('exec called without second argument') + }) + + t.test('--versions flag sets argv to version', async t => { + const { npm } = await loadMockNpm(t, { + config: { versions: true }, + }) + t.equal(npm.argv.length, 0, 'argv is empty after version command runs') + t.equal(npm.config.get('usage'), false, 'usage is set to false') + }) + + t.test('color true sets COLOR env to 1', async t => { + await loadMockNpm(t, { + config: { color: 'always' }, + }) + t.equal(process.env.COLOR, '1', 'COLOR env is set to 1 when color is truthy') + }) + + t.test('command without subcommands', async t => { + const { npm } = await loadMockNpm(t) + // Test a command that doesn't have subcommands (line 249 branch) + await t.rejects(npm.exec('org', []), /Usage/) + }) + + t.test('command with workspaces support', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + packages: { + a: { + 'package.json': JSON.stringify({ + name: 'a', + version: '1.0.0', + scripts: { test: 'echo test' }, + }), + }, + }, + 'package.json': JSON.stringify({ + name: 'root', + version: '1.0.0', + workspaces: ['./packages/a'], + }), + }, + config: { + workspace: ['./packages/a'], + }, + }) + // Test a command that supports workspaces to trigger execWorkspaces path (line 321) + await npm.exec('run', ['test']) + t.pass('executes with workspaces') + }) + + t.test('execCommandClass with default commandPath', async t => { + const { npm } = await loadMockNpm(t) + // Create a simple command instance + const Command = npm.constructor.cmd('version') + const commandInstance = new Command(npm) + + // Call execCommandClass without providing commandPath (using default []) + await npm.execCommandClass(commandInstance, []) + + t.pass('execCommandClass works with default commandPath parameter') + }) + + t.test('command with definitions executes exec() without workspaces', async t => { + const BaseCommand = require('../../lib/base-cmd.js') + const Definition = require('@npmcli/config/lib/definitions/definition.js') + + let execCalled = false + let execArgs = null + let execFlags = null + + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: 'test-pkg', + version: '1.0.0', + }), + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-cmd' + static description = 'Test command with definitions' + static workspaces = true + static definitions = [ + new Definition('testflag', { + type: String, + default: 'default-value', + description: 'A test flag', + }), + ] + + async exec (args, flags) { + execCalled = true + execArgs = args + execFlags = flags + } + + async execWorkspaces () { + throw new Error('execWorkspaces should not be called') + } + } + + const command = new TestCommand(npm) + // Set config.argv so flags() can parse the positional args + npm.config.argv = [process.argv[0], process.argv[1], 'test-cmd', 'arg1', 'arg2'] + await npm.execCommandClass(command, ['arg1', 'arg2'], ['test-cmd']) + + t.equal(execCalled, true, 'exec() was called') + t.same(execArgs, ['arg1', 'arg2'], 'positional args passed correctly') + t.ok(execFlags, 'flags object passed') + t.equal(execFlags.testflag, 'default-value', 'flag has default value') + }) + + t.test('command with definitions executes execWorkspaces() with workspaces', async t => { + const BaseCommand = require('../../lib/base-cmd.js') + const Definition = require('@npmcli/config/lib/definitions/definition.js') + + let execWorkspacesCalled = false + let execArgs = null + let execFlags = null + + const { npm } = await loadMockNpm(t, { + prefixDir: { + packages: { + a: { + 'package.json': JSON.stringify({ + name: 'workspace-a', + version: '1.0.0', + }), + }, + }, + 'package.json': JSON.stringify({ + name: 'root', + version: '1.0.0', + workspaces: ['./packages/a'], + }), + }, + config: { + workspace: ['./packages/a'], + }, + }) + + class TestCommand extends BaseCommand { + static name = 'test-cmd' + static description = 'Test command with definitions' + static workspaces = true + static definitions = [ + new Definition('testflag', { + type: String, + default: 'ws-default', + description: 'A test flag', + }), + ] + + async exec () { + throw new Error('exec should not be called') + } + + async execWorkspaces (args, flags) { + execWorkspacesCalled = true + execArgs = args + execFlags = flags + } + } + + const command = new TestCommand(npm) + // Set config.argv so flags() can parse the positional args + npm.config.argv = [process.argv[0], process.argv[1], 'test-cmd', 'wsarg1'] + await npm.execCommandClass(command, ['wsarg1'], ['test-cmd']) + + t.equal(execWorkspacesCalled, true, 'execWorkspaces() was called') + t.same(execArgs, ['wsarg1'], 'positional args passed correctly') + t.ok(execFlags, 'flags object passed') + t.equal(execFlags.testflag, 'ws-default', 'flag has default value') + }) +}) + t.test('usage', async t => { t.test('with browser', async t => { const { npm } = await loadMockNpm(t, { globals: { process: { platform: 'posix' } } }) @@ -559,11 +786,3 @@ t.test('usage', async t => { } }) }) - -t.test('print usage if non-command param provided', async t => { - const { npm, joinedOutput } = await loadMockNpm(t) - - await t.rejects(npm.exec('tset'), { command: 'tset', exitCode: 1 }) - t.match(joinedOutput(), 'Unknown command: "tset"') - t.match(joinedOutput(), 'Did you mean this?') -}) diff --git a/deps/npm/test/lib/trust-cmd.js b/deps/npm/test/lib/trust-cmd.js new file mode 100644 index 00000000000000..f0c52aadbd2c4a --- /dev/null +++ b/deps/npm/test/lib/trust-cmd.js @@ -0,0 +1,848 @@ +const t = require('tap') +const { load: loadMockNpm } = require('../fixtures/mock-npm.js') +const MockRegistry = require('@npmcli/mock-registry') +const realProcLog = require('proc-log') +const TrustCommand = require('../../lib/trust-cmd.js') + +const packageName = '@npmcli/test-package' + +t.test('trust-cmd via trust github with read function called', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) +}) + +t.test('trust-cmd via trust github with all options', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + yes: true, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli', '--environment', 'production']) +}) + +t.test('trust-cmd via trust github infers from package.json', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://github.com/npm/cli', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', '--yes', '--file', 'workflow.yml']) +}) + +t.test('trust-cmd via trust github with dry-run', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + t.ok(joinedOutput().includes('Establishing trust'), 'shows notice about establishing trust') +}) + +t.test('trust-cmd via trust github missing package name', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: {}, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: /Package name must be specified/ }, + 'throws when no package name' + ) +}) + +t.test('trust-cmd via trust github missing file', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--repository', 'npm/cli']), + { message: /must be specified with the file option/ }, + 'throws when no file' + ) +}) + +t.test('trust-cmd via trust github invalid file extension', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.txt', '--repository', 'npm/cli']), + { message: /must end in \.yml or \.yaml/ }, + 'throws when file has wrong extension' + ) +}) + +t.test('trust-cmd via trust github missing repository', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml']), + { message: /must be specified with repository option/ }, + 'throws when no repository' + ) +}) + +t.test('trust-cmd via trust github with custom registry warning', async t => { + const { npm, logs } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + registry: 'https://custom.registry.com/', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + t.ok(logs.warn.some(l => l.includes('may not support trusted publishing')), 'warns about custom registry') +}) + +t.test('trust-cmd via trust github with --json', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + json: true, + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + const output = joinedOutput() + t.ok(output.includes(packageName), 'JSON output includes package name') + t.ok(output.includes('workflow.yml'), 'JSON output includes file') +}) + +t.test('trust-cmd via trust github with user confirmation no', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'n', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when user declines' + ) +}) + +t.test('trust-cmd via trust github with --no-yes', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + yes: false, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when --no-yes flag is set' + ) +}) + +t.test('trust-cmd via trust github with invalid answer', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'maybe', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when user gives invalid answer' + ) +}) + +t.test('trust-cmd via trust github with user confirmation Y uppercase', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'Y', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) +}) + +t.test('trust-cmd via trust github with user enters empty string', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => '', + }, + }, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: 'User cancelled operation' }, + 'throws when user enters empty string' + ) +}) + +t.test('trust-cmd via trust github with mismatched repo type', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://gitlab.com/npm/cli', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', '--file', 'workflow.yml']), + { message: /Repository in package.json is not a GitHub repository/ }, + 'throws when repository type does not match provider' + ) +}) + +t.test('trust-cmd via trust github with mismatched repo type but flag provided', async t => { + const { npm, logs } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://gitlab.com/owner/old-repo', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', '--file', 'workflow.yml', '--repository', 'owner/new-repo']) + + t.ok(logs.warn.some(l => l.includes('Repository in package.json is not a GitHub repository')), 'warns about repository type mismatch') +}) + +t.test('trust-cmd via trust github with different repo in package.json', async t => { + const { npm, logs } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://github.com/owner/old-repo', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + 'dry-run': true, + }, + }) + + await npm.exec('trust', ['github', '--file', 'workflow.yml', '--repository', 'owner/new-repo']) + + t.ok(logs.warn.some(l => l.includes('differs from provided')), 'warns about repository mismatch') +}) + +t.test('trust-cmd via trust github with user confirmation yes spelled out', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + 'proc-log': { + ...realProcLog, + input: { + ...realProcLog.input, + read: async () => 'yes', + }, + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) +}) + +t.test('trust-cmd via trust github showing response with id and type', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ + packageName, + body: { + id: 'config-id-123', + type: 'github', + claims: { + repository: 'npm/cli', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + const output = joinedOutput() + t.ok(output.includes('type:'), 'output shows type field') + t.ok(output.includes('id:'), 'output shows id field') +}) + +t.test('trust-cmd via trust github missing repository when package name differs', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: 'other-package', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml']), + { message: /must be specified with repository option/ }, + 'throws when no repository and package name differs' + ) +}) + +t.test('TrustCommand - createConfig', async t => { + const { npm } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ packageName }) + + const response = await cmd.createConfig(packageName, [{ type: 'test' }]) + t.ok(response, 'returns a response') +}) + +t.test('TrustCommand - bodyToOptions', t => { + const body = { + id: 'test-id', + type: 'test-type', + other: 'ignored', + } + + const options = TrustCommand.bodyToOptions(body) + + t.equal(options.id, 'test-id', 'includes id') + t.equal(options.type, 'test-type', 'includes type') + t.notOk(options.other, 'does not include other fields') + t.end() +}) + +t.test('TrustCommand - bodyToOptions with missing fields', t => { + const body = {} + + const options = TrustCommand.bodyToOptions(body) + + t.same(options, {}, 'returns empty object when no fields') + t.end() +}) + +t.test('TrustCommand - NPM_FRONTEND constant', t => { + t.equal(TrustCommand.NPM_FRONTEND, 'https://www.npmjs.com', 'exports NPM_FRONTEND constant') + t.end() +}) +t.test('trust-cmd via trust github showing fromPackageJson indicator', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + repository: 'https://github.com/npm/cli', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ + packageName, + body: { + id: 'config-id-123', + type: 'github', + claims: { + repository: 'npm/cli', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml']) + + const output = joinedOutput() + t.ok(output.includes('from package.json'), 'output shows fromPackageJson indicator') +}) + +t.test('trust-cmd via trust github showing URLs for fields', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + mocks: { + read: { + read: async () => 'y', + }, + }, + }) + + const registry = new MockRegistry({ + tap: t, + registry: npm.config.get('registry'), + authorization: 'test-auth-token', + }) + + registry.trustCreate({ + packageName, + body: { + id: 'config-id-123', + type: 'github', + claims: { + repository: 'npm/cli', + workflow_ref: { + file: 'workflow.yml', + }, + }, + }, + }) + + await npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']) + + const output = joinedOutput() + t.match(output, /https:\/\/github\.com\/npm\/cli\b/, 'output shows repository URL') +}) + +t.test('trust-cmd via trust github with yes=false flag', async t => { + const { npm } = await loadMockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: packageName, + version: '1.0.0', + }), + }, + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + yes: false, + }, + }) + + await t.rejects( + npm.exec('trust', ['github', packageName, '--file', 'workflow.yml', '--repository', 'npm/cli']), + { message: /User cancelled operation/ }, + 'throws when yes is explicitly false' + ) +}) + +t.test('TrustCommand - logOptions with no values', async t => { + const { npm } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with no values object + cmd.logOptions({}) + t.pass('logOptions handles missing values object') +}) + +t.test('TrustCommand - logOptions with falsey value', async t => { + const { npm } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with a falsey but not null/undefined value + cmd.logOptions({ values: { type: 'test', falseyField: 0, anotherFalsey: false, emptyString: '' } }) + t.pass('logOptions handles falsey values that are not null/undefined') +}) + +t.test('TrustCommand - logOptions with null and undefined values', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with null and undefined values that should be skipped + cmd.logOptions({ values: { type: 'test', id: 'test-id', nullField: null, undefinedField: undefined, validField: 'value' } }) + const output = joinedOutput() + t.ok(output.includes('validField'), 'shows valid field') + t.notOk(output.includes('nullField'), 'skips null field') + t.notOk(output.includes('undefinedField'), 'skips undefined field') +}) + +t.test('TrustCommand - logOptions with fromPackageJson and urls', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with fromPackageJson and urls objects + cmd.logOptions({ + values: { + type: 'github', + id: 'test-id', + repository: 'npm/cli', + file: 'workflow.yml', + }, + fromPackageJson: { + repository: true, + }, + urls: { + repository: 'https://github.com/npm/cli', + file: 'https://github.com/npm/cli/-/blob/HEAD/workflow.yml', + }, + }) + const output = joinedOutput() + t.ok(output.includes('from package.json'), 'shows fromPackageJson indicator') + t.match(output, /https:\/\/github\.com\/npm\/cli\b/, 'shows URL') +}) + +t.test('TrustCommand - logOptions with no urls', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions without urls object + cmd.logOptions({ + values: { + type: 'github', + id: 'test-id', + repository: 'npm/cli', + file: 'workflow.yml', + }, + }) + const output = joinedOutput() + t.ok(output.includes('repository'), 'shows repository field') + t.ok(output.includes('file'), 'shows file field') + t.notOk(output.includes('Links to verify manually'), 'does not show links header when no urls') +}) + +t.test('TrustCommand - logOptions with urls but all values are null', async t => { + const { npm, joinedOutput } = await loadMockNpm(t, { + config: { + '//registry.npmjs.org/:_authToken': 'test-auth-token', + }, + }) + + class TestTrustCmd extends TrustCommand { + static name = 'test' + static description = 'Test command' + } + + const cmd = new TestTrustCmd(npm) + + // Call logOptions with urls object but all values are null/undefined + cmd.logOptions({ + values: { + type: 'github', + id: 'test-id', + repository: 'npm/cli', + file: 'workflow.yml', + }, + urls: { + repository: null, + file: undefined, + }, + }) + const output = joinedOutput() + t.ok(output.includes('repository'), 'shows repository field') + t.ok(output.includes('file'), 'shows file field') + t.notOk(output.includes('Links to verify manually'), 'does not show links header when all urls are null') +})