Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- node24/node_modules/corepack/CHANGELOG.md +590 -0
- node24/node_modules/corepack/LICENSE.md +7 -0
- node24/node_modules/corepack/README.md +381 -0
- node24/node_modules/corepack/package.json +102 -0
- node24/node_modules/npm/.npmrc +0 -0
- node24/node_modules/npm/LICENSE +235 -0
- node24/node_modules/npm/README.md +53 -0
- node24/node_modules/npm/bin/npm +65 -0
- node24/node_modules/npm/bin/npm-cli.js +2 -0
- node24/node_modules/npm/bin/npm-prefix.js +30 -0
- node24/node_modules/npm/bin/npm.cmd +20 -0
- node24/node_modules/npm/bin/npm.ps1 +50 -0
- node24/node_modules/npm/bin/npx +65 -0
- node24/node_modules/npm/bin/npx-cli.js +130 -0
- node24/node_modules/npm/bin/npx.cmd +20 -0
- node24/node_modules/npm/bin/npx.ps1 +50 -0
- node24/node_modules/npm/index.js +5 -0
- node24/node_modules/npm/lib/arborist-cmd.js +49 -0
- node24/node_modules/npm/lib/base-cmd.js +435 -0
- node24/node_modules/npm/lib/cli.js +12 -0
- node24/node_modules/npm/lib/lifecycle-cmd.js +20 -0
- node24/node_modules/npm/lib/npm.js +525 -0
- node24/node_modules/npm/lib/package-url-cmd.js +63 -0
- node24/node_modules/npm/lib/trust-cmd.js +284 -0
- node24/node_modules/npm/node_modules/abbrev/LICENSE +46 -0
- node24/node_modules/npm/node_modules/abbrev/package.json +41 -0
- node24/node_modules/npm/node_modules/agent-base/LICENSE +22 -0
- node24/node_modules/npm/node_modules/agent-base/package.json +46 -0
- node24/node_modules/npm/node_modules/aproba/LICENSE +14 -0
- node24/node_modules/npm/node_modules/aproba/index.js +105 -0
- node24/node_modules/npm/node_modules/aproba/package.json +35 -0
- node24/node_modules/npm/node_modules/archy/LICENSE +18 -0
- node24/node_modules/npm/node_modules/archy/index.js +35 -0
- node24/node_modules/npm/node_modules/archy/package.json +40 -0
- node24/node_modules/npm/node_modules/balanced-match/LICENSE.md +23 -0
- node24/node_modules/npm/node_modules/balanced-match/package.json +68 -0
- node24/node_modules/npm/node_modules/bin-links/LICENSE +15 -0
- node24/node_modules/npm/node_modules/bin-links/package.json +61 -0
- node24/node_modules/npm/node_modules/binary-extensions/binary-extensions.json +264 -0
- node24/node_modules/npm/node_modules/binary-extensions/index.js +3 -0
- node24/node_modules/npm/node_modules/binary-extensions/license +10 -0
- node24/node_modules/npm/node_modules/binary-extensions/package.json +45 -0
- node24/node_modules/npm/node_modules/brace-expansion/LICENSE +23 -0
- node24/node_modules/npm/node_modules/brace-expansion/package.json +64 -0
- node24/node_modules/npm/node_modules/cacache/LICENSE.md +16 -0
- node24/node_modules/npm/node_modules/cacache/package.json +81 -0
- node24/node_modules/npm/node_modules/chalk/license +9 -0
- node24/node_modules/npm/node_modules/chalk/package.json +83 -0
- node24/node_modules/npm/node_modules/chownr/LICENSE.md +63 -0
- node24/node_modules/npm/node_modules/chownr/package.json +69 -0
node24/node_modules/corepack/CHANGELOG.md
ADDED
|
@@ -0,0 +1,590 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Changelog
|
| 2 |
+
|
| 3 |
+
## [0.34.6](https://github.com/nodejs/corepack/compare/v0.34.5...v0.34.6) (2026-01-23)
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
### Bug Fixes
|
| 7 |
+
|
| 8 |
+
* **docs:** fix PowerShell functions suggestions ([#784](https://github.com/nodejs/corepack/issues/784)) ([b1544c8](https://github.com/nodejs/corepack/commit/b1544c82a63781bd77d49f7b566fefd0104b7d6d))
|
| 9 |
+
* update package manager versions ([#778](https://github.com/nodejs/corepack/issues/778)) ([efed597](https://github.com/nodejs/corepack/commit/efed59797d30caa362a1fa8475cd7d17dc3b7282))
|
| 10 |
+
|
| 11 |
+
## [0.34.5](https://github.com/nodejs/corepack/compare/v0.34.4...v0.34.5) (2025-11-24)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
### Bug Fixes
|
| 15 |
+
|
| 16 |
+
* **pnpm:** fix bin path for v11 ([#776](https://github.com/nodejs/corepack/issues/776)) ([0c8048a](https://github.com/nodejs/corepack/commit/0c8048adc61651f6eb798448675d3ecc4a7e26a9))
|
| 17 |
+
* update package manager versions ([#773](https://github.com/nodejs/corepack/issues/773)) ([06c286b](https://github.com/nodejs/corepack/commit/06c286b5fc171e43090b5eed5cd501bc9580927f))
|
| 18 |
+
|
| 19 |
+
## [0.34.4](https://github.com/nodejs/corepack/compare/v0.34.3...v0.34.4) (2025-11-14)
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
### Bug Fixes
|
| 23 |
+
|
| 24 |
+
* bump pnpm version in `config.json` ([#768](https://github.com/nodejs/corepack/issues/768)) ([99a9a6e](https://github.com/nodejs/corepack/commit/99a9a6eb1b6e918ceb896b3d558bb5ed583bdc70))
|
| 25 |
+
* ignore devEngines version range when CLI provides a version ([#762](https://github.com/nodejs/corepack/issues/762)) ([ac518c4](https://github.com/nodejs/corepack/commit/ac518c4106f8d9ceb4e85e6c3614b1eba5d03fcb))
|
| 26 |
+
* use `lstatSync` in `generatePosixLink` ([#767](https://github.com/nodejs/corepack/issues/767)) ([a02bea0](https://github.com/nodejs/corepack/commit/a02bea078eb584ed7492ec561626987e35386bae))
|
| 27 |
+
|
| 28 |
+
## [0.34.3](https://github.com/nodejs/corepack/compare/v0.34.2...v0.34.3) (2025-11-07)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### Bug Fixes
|
| 32 |
+
|
| 33 |
+
* update package manager versions ([#765](https://github.com/nodejs/corepack/issues/765)) ([13a2e98](https://github.com/nodejs/corepack/commit/13a2e989ee37694a7ec1b1d60acdaa28f90642d1))
|
| 34 |
+
* Yarn switch install support and tests ([#761](https://github.com/nodejs/corepack/issues/761)) ([d04d483](https://github.com/nodejs/corepack/commit/d04d4839aeecaf4fca989c577f6c000dc90be933))
|
| 35 |
+
|
| 36 |
+
## [0.34.2](https://github.com/nodejs/corepack/compare/v0.34.1...v0.34.2) (2025-10-31)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
### Bug Fixes
|
| 40 |
+
|
| 41 |
+
* bump package manager versions ([#754](https://github.com/nodejs/corepack/issues/754)) ([35e3869](https://github.com/nodejs/corepack/commit/35e3869f3f4d21bbfccdf78ea564ab0723d6f36f))
|
| 42 |
+
* fix potential race condition in `node-tar` ([#757](https://github.com/nodejs/corepack/pull/757)) ([78808a7](78808a72691655fe5140c02ae41d4baef88cd9fa))
|
| 43 |
+
|
| 44 |
+
## [0.34.1](https://github.com/nodejs/corepack/compare/v0.34.0...v0.34.1) (2025-10-17)
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
### Bug Fixes
|
| 48 |
+
|
| 49 |
+
* incorrect registry origin check ([#743](https://github.com/nodejs/corepack/issues/743)) ([cc840b2](https://github.com/nodejs/corepack/commit/cc840b2d232a29c225d2436d350640f0035ed28b))
|
| 50 |
+
* update package manager versions ([#728](https://github.com/nodejs/corepack/issues/728)) ([78ce029](https://github.com/nodejs/corepack/commit/78ce0297a9152bb5c68f724821a9a0095b408334))
|
| 51 |
+
|
| 52 |
+
## [0.34.0](https://github.com/nodejs/corepack/compare/v0.33.0...v0.34.0) (2025-07-19)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
### ⚠ BREAKING CHANGES
|
| 56 |
+
|
| 57 |
+
* drop Node.js 18.x and 23.x support
|
| 58 |
+
|
| 59 |
+
### Features
|
| 60 |
+
|
| 61 |
+
* update package manager versions ([#719](https://github.com/nodejs/corepack/issues/719)) ([7707ea7](https://github.com/nodejs/corepack/commit/7707ea7350c129ad3aae8ca08e9e80fcf164dcb6))
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
### Miscellaneous Chores
|
| 65 |
+
|
| 66 |
+
* remove Node.js 18.x and 23.x usage, add 24.x ([#718](https://github.com/nodejs/corepack/issues/718)) ([783a42f](https://github.com/nodejs/corepack/commit/783a42fbe35371964e9dde75e2263b179f53bc0c))
|
| 67 |
+
|
| 68 |
+
## [0.33.0](https://github.com/nodejs/corepack/compare/v0.32.0...v0.33.0) (2025-06-02)
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
### Features
|
| 72 |
+
|
| 73 |
+
* Adds guard to avoid stepping on Yarn's feet ([#714](https://github.com/nodejs/corepack/issues/714)) ([5fc3691](https://github.com/nodejs/corepack/commit/5fc3691354eb5bdeca17a9495b234584353f0151))
|
| 74 |
+
* update package manager versions ([#671](https://github.com/nodejs/corepack/issues/671)) ([b45b3a3](https://github.com/nodejs/corepack/commit/b45b3a3244bacfbaf65188ae8c04209a1e98307d))
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
### Bug Fixes
|
| 78 |
+
|
| 79 |
+
* debug text typo ([#698](https://github.com/nodejs/corepack/issues/698)) ([0b94797](https://github.com/nodejs/corepack/commit/0b94797f96e30e46e466873fe7d437d0471cd92c))
|
| 80 |
+
|
| 81 |
+
## [0.32.0](https://github.com/nodejs/corepack/compare/v0.31.0...v0.32.0) (2025-02-28)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
### Features
|
| 85 |
+
|
| 86 |
+
* add limited support for `devEngines` ([#643](https://github.com/nodejs/corepack/issues/643)) ([b456268](https://github.com/nodejs/corepack/commit/b4562688513f23e37e37b0d69a0daff33ca84c8d))
|
| 87 |
+
* add more informative error when fetching latest stable fails ([#644](https://github.com/nodejs/corepack/issues/644)) ([53b1fe7](https://github.com/nodejs/corepack/commit/53b1fe75c47c06bd72a8b8f8bb699a47c9ca32fb))
|
| 88 |
+
* add support for `.corepack.env` ([#642](https://github.com/nodejs/corepack/issues/642)) ([9b95b46](https://github.com/nodejs/corepack/commit/9b95b46f05e50fe1c60f05309c210ba8fe4e23c5))
|
| 89 |
+
* update package manager versions ([#617](https://github.com/nodejs/corepack/issues/617)) ([b83bb5e](https://github.com/nodejs/corepack/commit/b83bb5ec150980c998b9c7053dff307d912cb508))
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
### Bug Fixes
|
| 93 |
+
|
| 94 |
+
* do not resolve fallback descriptor when `packageManager` is defined ([#632](https://github.com/nodejs/corepack/issues/632)) ([12e77e5](https://github.com/nodejs/corepack/commit/12e77e506946d42a0de9ce8e68d75af8454d6776))
|
| 95 |
+
* **doc:** fix link to proxy library ([#636](https://github.com/nodejs/corepack/issues/636)) ([bae0839](https://github.com/nodejs/corepack/commit/bae08397943d4b99437389b4286546361091f4b3))
|
| 96 |
+
* replace explicit with specify as verb ([#665](https://github.com/nodejs/corepack/issues/665)) ([351d86c](https://github.com/nodejs/corepack/commit/351d86c20226a8c18bfe212be27401f2908b1595))
|
| 97 |
+
* **use:** do not throw on invalid `packageManager` ([#663](https://github.com/nodejs/corepack/issues/663)) ([4be72f6](https://github.com/nodejs/corepack/commit/4be72f6941afa0c9b2b7d26635016bb7b560df8a))
|
| 98 |
+
|
| 99 |
+
## [0.31.0](https://github.com/nodejs/corepack/compare/v0.30.0...v0.31.0) (2025-01-27)
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
### ⚠ BREAKING CHANGES
|
| 103 |
+
|
| 104 |
+
* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594))
|
| 105 |
+
|
| 106 |
+
### Features
|
| 107 |
+
|
| 108 |
+
* update package manager versions ([#595](https://github.com/nodejs/corepack/issues/595)) ([c7a9bde](https://github.com/nodejs/corepack/commit/c7a9bde16dcbbb7e6ef03fef740656cde7ade360))
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
### Bug Fixes
|
| 112 |
+
|
| 113 |
+
* only print message for `UsageError`s ([#602](https://github.com/nodejs/corepack/issues/602)) ([72a588c](https://github.com/nodejs/corepack/commit/72a588c2370c17e415b24fe389efdafb3c84e90b))
|
| 114 |
+
* update npm registry keys ([#614](https://github.com/nodejs/corepack/issues/614)) ([8c90caa](https://github.com/nodejs/corepack/commit/8c90caab7f1c5c9b89f1de113bc1dfc441bf25d2))
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
### Miscellaneous Chores
|
| 118 |
+
|
| 119 |
+
* drop support for Node.js 21.x ([#594](https://github.com/nodejs/corepack/issues/594)) ([8bebc0c](https://github.com/nodejs/corepack/commit/8bebc0c0a5cbcdeec41673dcbaf581e6e1c1be11))
|
| 120 |
+
|
| 121 |
+
## [0.30.0](https://github.com/nodejs/corepack/compare/v0.29.4...v0.30.0) (2024-11-23)
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
### Features
|
| 125 |
+
|
| 126 |
+
* update package manager versions ([#578](https://github.com/nodejs/corepack/issues/578)) ([a286c8f](https://github.com/nodejs/corepack/commit/a286c8f5537ea9ecf9b6ff53c7bc3e8da4e3c8bb))
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
### Performance Improvements
|
| 130 |
+
|
| 131 |
+
* prefer `module.enableCompileCache` over `v8-compile-cache` ([#574](https://github.com/nodejs/corepack/issues/574)) ([cba6905](https://github.com/nodejs/corepack/commit/cba690575bd606faeee54bd512ccb8797d49055f))
|
| 132 |
+
|
| 133 |
+
## [0.29.4](https://github.com/nodejs/corepack/compare/v0.29.3...v0.29.4) (2024-09-07)
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
### Features
|
| 137 |
+
|
| 138 |
+
* update package manager versions ([#543](https://github.com/nodejs/corepack/issues/543)) ([b819e40](https://github.com/nodejs/corepack/commit/b819e404dbb23c4ae3d5dbe55e21de74d714ee9c))
|
| 139 |
+
|
| 140 |
+
## [0.29.3](https://github.com/nodejs/corepack/compare/v0.29.2...v0.29.3) (2024-07-21)
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
### Bug Fixes
|
| 144 |
+
|
| 145 |
+
* fallback to `shasum` when `integrity` is not defined ([#542](https://github.com/nodejs/corepack/issues/542)) ([eb63873](https://github.com/nodejs/corepack/commit/eb63873c6c617a2f8ac7106e26ccfe8aa3ae1fb9))
|
| 146 |
+
* make `DEBUG=corepack` more useful ([#538](https://github.com/nodejs/corepack/issues/538)) ([6019d7b](https://github.com/nodejs/corepack/commit/6019d7b56e85bd8b7b58a1a487922c707e70e30e))
|
| 147 |
+
|
| 148 |
+
## [0.29.2](https://github.com/nodejs/corepack/compare/v0.29.1...v0.29.2) (2024-07-13)
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
### Bug Fixes
|
| 152 |
+
|
| 153 |
+
* trigger release after 0.29.1 failed to publish ([18e29ce](https://github.com/nodejs/corepack/commit/18e29ce3c465b64d48ccf3feef7cd1be94da70b0))
|
| 154 |
+
|
| 155 |
+
## [0.29.1](https://github.com/nodejs/corepack/compare/v0.29.0...v0.29.1) (2024-07-13)
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
### Bug Fixes
|
| 159 |
+
|
| 160 |
+
* trigger release after 0.29.0 failed to publish ([e6ba066](https://github.com/nodejs/corepack/commit/e6ba06657b0985c112f288932ca39c0562129566))
|
| 161 |
+
|
| 162 |
+
## [0.29.0](https://github.com/nodejs/corepack/compare/v0.28.2...v0.29.0) (2024-07-12)
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
### Features
|
| 166 |
+
|
| 167 |
+
* parallelize linking, unlinking and installing ([#524](https://github.com/nodejs/corepack/issues/524)) ([f0734e6](https://github.com/nodejs/corepack/commit/f0734e6e8023ff361dac179c0d8656740d550c27))
|
| 168 |
+
* update package manager versions ([#492](https://github.com/nodejs/corepack/issues/492)) ([3e3b046](https://github.com/nodejs/corepack/commit/3e3b04619cb4a91f207a72fb450f6fc4e2f01aec))
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
### Bug Fixes
|
| 172 |
+
|
| 173 |
+
* replace npm registry domain in tarball URL ([#502](https://github.com/nodejs/corepack/issues/502)) ([db6fae5](https://github.com/nodejs/corepack/commit/db6fae50cf44884d1e9a6f7e99402e7e807ba3ca))
|
| 174 |
+
* selectively import required semver functions ([#511](https://github.com/nodejs/corepack/issues/511)) ([e7ad533](https://github.com/nodejs/corepack/commit/e7ad533d43dc9495493f0d883c3cbbb94caa1d41))
|
| 175 |
+
|
| 176 |
+
## [0.28.2](https://github.com/nodejs/corepack/compare/v0.28.1...v0.28.2) (2024-05-31)
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
### Features
|
| 180 |
+
|
| 181 |
+
* update package manager versions ([#481](https://github.com/nodejs/corepack/issues/481)) ([e1abb83](https://github.com/nodejs/corepack/commit/e1abb832416a793b490b2b51b4082fe822fc932c))
|
| 182 |
+
|
| 183 |
+
## [0.28.1](https://github.com/nodejs/corepack/compare/v0.28.0...v0.28.1) (2024-05-10)
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
### Features
|
| 187 |
+
|
| 188 |
+
* add support for `COREPACK_INTEGRITY_KEYS=0` ([#470](https://github.com/nodejs/corepack/issues/470)) ([f15ebc2](https://github.com/nodejs/corepack/commit/f15ebc289ebcd6a86580f15ae3c4ef0e1be37c4b))
|
| 189 |
+
* update package manager versions ([#469](https://github.com/nodejs/corepack/issues/469)) ([985895b](https://github.com/nodejs/corepack/commit/985895bccb5ec68b3645c540d8500c572e1ccadb))
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
### Bug Fixes
|
| 193 |
+
|
| 194 |
+
* COREPACK_NPM_REGISTRY should allow for username/password auth ([#466](https://github.com/nodejs/corepack/issues/466)) ([6efa349](https://github.com/nodejs/corepack/commit/6efa34988229918debe6e881d45ba6715282f283))
|
| 195 |
+
|
| 196 |
+
## [0.28.0](https://github.com/nodejs/corepack/compare/v0.27.0...v0.28.0) (2024-04-20)
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
### ⚠ BREAKING CHANGES
|
| 200 |
+
|
| 201 |
+
* call `executePackageManagerRequest` directly ([#430](https://github.com/nodejs/corepack/issues/430))
|
| 202 |
+
|
| 203 |
+
### Bug Fixes
|
| 204 |
+
|
| 205 |
+
* call `executePackageManagerRequest` directly ([#430](https://github.com/nodejs/corepack/issues/430)) ([0f9b748](https://github.com/nodejs/corepack/commit/0f9b74864048d5dc150a63cc582966af0c5f363f))
|
| 206 |
+
|
| 207 |
+
## [0.27.0](https://github.com/nodejs/corepack/compare/v0.26.0...v0.27.0) (2024-04-19)
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
### ⚠ BREAKING CHANGES
|
| 211 |
+
|
| 212 |
+
* attempting to download a version from the npm registry (or a mirror) that was published using the now deprecated PGP signature without providing a hash will trigger an error. Users can disable the signature verification using a environment variable.
|
| 213 |
+
|
| 214 |
+
### Features
|
| 215 |
+
|
| 216 |
+
* separate read and write operations on lastKnownGood.json ([#446](https://github.com/nodejs/corepack/issues/446)) ([c449adc](https://github.com/nodejs/corepack/commit/c449adc81822a604ee8f00ae2b53fc411535f96d))
|
| 217 |
+
* update package manager versions ([#425](https://github.com/nodejs/corepack/issues/425)) ([1423190](https://github.com/nodejs/corepack/commit/142319056424b1e0da2bdbe801c52c5910023707))
|
| 218 |
+
* update package manager versions ([#462](https://github.com/nodejs/corepack/issues/462)) ([56816c2](https://github.com/nodejs/corepack/commit/56816c2b7ebc9926f07048b0ec4ff6025bb4e293))
|
| 219 |
+
* verify integrity signature when downloading from npm registry ([#432](https://github.com/nodejs/corepack/issues/432)) ([e561dd0](https://github.com/nodejs/corepack/commit/e561dd00bbacc5bc15a492fc36574fa0e37bff7b))
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
### Bug Fixes
|
| 223 |
+
|
| 224 |
+
* add path to `package.json` in error message ([#456](https://github.com/nodejs/corepack/issues/456)) ([32a93ea](https://github.com/nodejs/corepack/commit/32a93ea4f51eb7db7dc95a16c5719695edf4b53e))
|
| 225 |
+
* correctly set `Dispatcher` prototype for `ProxyAgent` ([#451](https://github.com/nodejs/corepack/issues/451)) ([73d9a1e](https://github.com/nodejs/corepack/commit/73d9a1e2d2f84906bf01952f1dca8adab576b7bf))
|
| 226 |
+
* download fewer metadata from npm registry ([#436](https://github.com/nodejs/corepack/issues/436)) ([082fabf](https://github.com/nodejs/corepack/commit/082fabf8b15658e69e4fb62bb854fe9aace78b70))
|
| 227 |
+
* hash check when downloading Yarn Berry from npm ([#439](https://github.com/nodejs/corepack/issues/439)) ([4672162](https://github.com/nodejs/corepack/commit/467216281e1719a739d0eeea370b335adfb37b8d))
|
| 228 |
+
* Incorrect authorization prefix for basic auth, and undocumented env var ([#454](https://github.com/nodejs/corepack/issues/454)) ([2d63536](https://github.com/nodejs/corepack/commit/2d63536413971d43f570deb035845aa0bd5202f0))
|
| 229 |
+
* re-add support for custom registries with auth ([#397](https://github.com/nodejs/corepack/issues/397)) ([d267753](https://github.com/nodejs/corepack/commit/d2677538cdb613fcab6d2a45bb07f349bdc65c2b))
|
| 230 |
+
|
| 231 |
+
## [0.26.0](https://github.com/nodejs/corepack/compare/v0.25.2...v0.26.0) (2024-03-08)
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
### Features
|
| 235 |
+
|
| 236 |
+
* Pins the package manager as it's used for the first time ([#413](https://github.com/nodejs/corepack/issues/413)) ([8b6c6d4](https://github.com/nodejs/corepack/commit/8b6c6d4b2b7a9d61ae6c33c07e12354bd5afc2ba))
|
| 237 |
+
* update package manager versions ([#415](https://github.com/nodejs/corepack/issues/415)) ([e8edba7](https://github.com/nodejs/corepack/commit/e8edba771bca6fb10c855c04eee8102ffa792d58))
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
### Bug Fixes
|
| 241 |
+
|
| 242 |
+
* group the download prompt together ([#391](https://github.com/nodejs/corepack/issues/391)) ([00506b2](https://github.com/nodejs/corepack/commit/00506b2a15dd87ec03240578077a35b7980e00c1))
|
| 243 |
+
* ignore `EROFS` errors ([#421](https://github.com/nodejs/corepack/issues/421)) ([b7ec137](https://github.com/nodejs/corepack/commit/b7ec137210efd35c3461321b6434e3e13a87d42f))
|
| 244 |
+
* improve support for `COREPACK_NPM_REGISTRY` with Yarn Berry ([#396](https://github.com/nodejs/corepack/issues/396)) ([47be27c](https://github.com/nodejs/corepack/commit/47be27c9db988e10f651d23b3f53bcf55318a894))
|
| 245 |
+
* Windows malicious file analysis waiting problem ([#398](https://github.com/nodejs/corepack/issues/398)) ([295a1cd](https://github.com/nodejs/corepack/commit/295a1cdb9cbbbce8434e8d82b96eb63e57c46c1a))
|
| 246 |
+
|
| 247 |
+
## [0.25.2](https://github.com/nodejs/corepack/compare/v0.25.1...v0.25.2) (2024-02-21)
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
### Features
|
| 251 |
+
|
| 252 |
+
* update package manager versions ([#362](https://github.com/nodejs/corepack/issues/362)) ([1423312](https://github.com/nodejs/corepack/commit/1423312a0eb7844dcdd43ae8a63cf12dcacedb2b))
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
### Bug Fixes
|
| 256 |
+
|
| 257 |
+
* do not hard fail if Corepack home folder cannot be created ([#382](https://github.com/nodejs/corepack/issues/382)) ([9834f57](https://github.com/nodejs/corepack/commit/9834f5790a99ce2c6c283321bb38b02e5561b7ca))
|
| 258 |
+
* do not show download prompt when downloading JSON ([#383](https://github.com/nodejs/corepack/issues/383)) ([bc137a0](https://github.com/nodejs/corepack/commit/bc137a0073c3343ce2d552b6e13bfd2a48f08351))
|
| 259 |
+
|
| 260 |
+
## [0.25.1](https://github.com/nodejs/corepack/compare/v0.25.0...v0.25.1) (2024-02-20)
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
### Bug Fixes
|
| 264 |
+
|
| 265 |
+
* use valid semver range for `engines.node` ([#378](https://github.com/nodejs/corepack/issues/378)) ([f2185fe](https://github.com/nodejs/corepack/commit/f2185fefa145cc75fca082acc169f8aaef637ca2))
|
| 266 |
+
|
| 267 |
+
## [0.25.0](https://github.com/nodejs/corepack/compare/v0.24.1...v0.25.0) (2024-02-20)
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
### ⚠ BREAKING CHANGES
|
| 271 |
+
|
| 272 |
+
* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351))
|
| 273 |
+
* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375))
|
| 274 |
+
* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365))
|
| 275 |
+
* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373))
|
| 276 |
+
* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360))
|
| 277 |
+
|
| 278 |
+
### Features
|
| 279 |
+
|
| 280 |
+
* add `corepack cache` command ([#363](https://github.com/nodejs/corepack/issues/363)) ([f442366](https://github.com/nodejs/corepack/commit/f442366c1c00d0c3f388b757c3797504f9a6b62e))
|
| 281 |
+
* add support for URL in `"packageManager"` ([#359](https://github.com/nodejs/corepack/issues/359)) ([4a8ce6d](https://github.com/nodejs/corepack/commit/4a8ce6d42f081047a341f36067696346c9f3e1ea))
|
| 282 |
+
* bump Known Good Release when downloading new version ([#364](https://github.com/nodejs/corepack/issues/364)) ([a56c13b](https://github.com/nodejs/corepack/commit/a56c13bd0b1c11e50361b8b4b6f8a53571e3981a))
|
| 283 |
+
* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360)) ([6b8d87f](https://github.com/nodejs/corepack/commit/6b8d87f2374f79855b24d659f2a2579d6b39f54f))
|
| 284 |
+
* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351)) ([d9c70b9](https://github.com/nodejs/corepack/commit/d9c70b91f698787d693406626a73dc95cb18bc1d))
|
| 285 |
+
* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373)) ([54e9510](https://github.com/nodejs/corepack/commit/54e9510cdaf6ed08c9dea1ed3999fa65116cb4c7))
|
| 286 |
+
* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365)) ([fe6a307](https://github.com/nodejs/corepack/commit/fe6a3072f64efa810b90e4ee52e0b3ff14c63184))
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
### Bug Fixes
|
| 290 |
+
|
| 291 |
+
* remove unsafe remove of install folder ([#372](https://github.com/nodejs/corepack/issues/372)) ([65880ca](https://github.com/nodejs/corepack/commit/65880cafed5f4195f8e7656ca9af4cbcbb7682d3))
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
### Miscellaneous Chores
|
| 295 |
+
|
| 296 |
+
* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375)) ([9a1cb38](https://github.com/nodejs/corepack/commit/9a1cb385bba9ade8e9fbf5517c2bdff60295f9ed))
|
| 297 |
+
|
| 298 |
+
## [0.24.1](https://github.com/nodejs/corepack/compare/v0.24.0...v0.24.1) (2024-01-13)
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
### Features
|
| 302 |
+
|
| 303 |
+
* update package manager versions ([#348](https://github.com/nodejs/corepack/issues/348)) ([cc3ada7](https://github.com/nodejs/corepack/commit/cc3ada73bccd0a5b0ff16834e518efa521c9eea4))
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
### Bug Fixes
|
| 307 |
+
|
| 308 |
+
* **use:** create `package.json` when calling `corepack use` on empty dir ([#350](https://github.com/nodejs/corepack/issues/350)) ([2950a8a](https://github.com/nodejs/corepack/commit/2950a8a30b64b4598abc354e45400e83d56e541b))
|
| 309 |
+
|
| 310 |
+
## [0.24.0](https://github.com/nodejs/corepack/compare/v0.23.0...v0.24.0) (2023-12-29)
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
### Features
|
| 314 |
+
|
| 315 |
+
* add support for HTTP redirect ([#341](https://github.com/nodejs/corepack/issues/341)) ([6df5063](https://github.com/nodejs/corepack/commit/6df5063b14868ff21499a051e5122fa7211be6ed))
|
| 316 |
+
* add support for rangeless commands ([#338](https://github.com/nodejs/corepack/issues/338)) ([9bee415](https://github.com/nodejs/corepack/commit/9bee4150815113d97f0bd77d62c8d999cfd68ad3))
|
| 317 |
+
* update package manager versions ([#330](https://github.com/nodejs/corepack/issues/330)) ([cfcc280](https://github.com/nodejs/corepack/commit/cfcc28047a788daeef2c0b15ee35a8b1a8149bb6))
|
| 318 |
+
* **yarn:** fallback to npm when `COREPACK_NPM_REGISTRY` is set ([#339](https://github.com/nodejs/corepack/issues/339)) ([0717c6a](https://github.com/nodejs/corepack/commit/0717c6af898e075f57c5694d699a3c51e79a024c))
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
### Bug Fixes
|
| 322 |
+
|
| 323 |
+
* clarify `EACCES` errors ([#343](https://github.com/nodejs/corepack/issues/343)) ([518bed8](https://github.com/nodejs/corepack/commit/518bed8b7d7c313163c79d31cb9bbc023dba6560))
|
| 324 |
+
|
| 325 |
+
## [0.23.0](https://github.com/nodejs/corepack/compare/v0.22.0...v0.23.0) (2023-11-05)
|
| 326 |
+
|
| 327 |
+
|
| 328 |
+
### Features
|
| 329 |
+
|
| 330 |
+
* update package manager versions ([#325](https://github.com/nodejs/corepack/issues/325)) ([450cd33](https://github.com/nodejs/corepack/commit/450cd332d00d3428f49ed09a4235bd12139931c9))
|
| 331 |
+
|
| 332 |
+
## [0.22.0](https://github.com/nodejs/corepack/compare/v0.21.0...v0.22.0) (2023-10-21)
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
### Features
|
| 336 |
+
|
| 337 |
+
* allow fallback to application/json for custom registries ([#314](https://github.com/nodejs/corepack/issues/314)) ([92f8e71](https://github.com/nodejs/corepack/commit/92f8e71f8c97c44f404ce9b7df8787a4292e6830))
|
| 338 |
+
* update package manager versions ([#318](https://github.com/nodejs/corepack/issues/318)) ([0bd2577](https://github.com/nodejs/corepack/commit/0bd2577bb4c6c3a5a33ecdb3b6ca2ff244c54f28))
|
| 339 |
+
|
| 340 |
+
## [0.21.0](https://github.com/nodejs/corepack/compare/v0.20.0...v0.21.0) (2023-10-08)
|
| 341 |
+
|
| 342 |
+
|
| 343 |
+
### ⚠ BREAKING CHANGES
|
| 344 |
+
|
| 345 |
+
* remove support for Node.js 16.x
|
| 346 |
+
|
| 347 |
+
### Features
|
| 348 |
+
|
| 349 |
+
* update package manager versions ([#297](https://github.com/nodejs/corepack/issues/297)) ([503e135](https://github.com/nodejs/corepack/commit/503e135878935cc881ebd94b48d5eca94ec4c27b))
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
### Miscellaneous Chores
|
| 353 |
+
|
| 354 |
+
* update supported Node.js versions ([#309](https://github.com/nodejs/corepack/issues/309)) ([787e24d](https://github.com/nodejs/corepack/commit/787e24df609513702eafcd8c6a5f03544d7d45cc))
|
| 355 |
+
|
| 356 |
+
## [0.20.0](https://github.com/nodejs/corepack/compare/v0.19.0...v0.20.0) (2023-08-29)
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
### Features
|
| 360 |
+
|
| 361 |
+
* refactor the CLI interface ([#291](https://github.com/nodejs/corepack/issues/291)) ([fe3e5cd](https://github.com/nodejs/corepack/commit/fe3e5cd86c45db0d87c7fdea87d57d59b0bdcb78))
|
| 362 |
+
* update package manager versions ([#292](https://github.com/nodejs/corepack/issues/292)) ([be9c286](https://github.com/nodejs/corepack/commit/be9c286846443ff03081e736fdf4a0ff031fbd38))
|
| 363 |
+
|
| 364 |
+
## [0.19.0](https://github.com/nodejs/corepack/compare/v0.18.1...v0.19.0) (2023-06-24)
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
### Features
|
| 368 |
+
|
| 369 |
+
* support ESM ([#270](https://github.com/nodejs/corepack/issues/270)) ([be2489c](https://github.com/nodejs/corepack/commit/be2489cd0aaabf26a019e1c089a3c8bcc329e94a))
|
| 370 |
+
* update package manager versions ([#280](https://github.com/nodejs/corepack/issues/280)) ([4188f2b](https://github.com/nodejs/corepack/commit/4188f2b4671228339fe16f9f566e7bac0c2c4f6d))
|
| 371 |
+
|
| 372 |
+
## [0.18.1](https://github.com/nodejs/corepack/compare/v0.18.0...v0.18.1) (2023-06-13)
|
| 373 |
+
|
| 374 |
+
|
| 375 |
+
### Features
|
| 376 |
+
|
| 377 |
+
* update package manager versions ([#272](https://github.com/nodejs/corepack/issues/272)) ([5345774](https://github.com/nodejs/corepack/commit/53457747a26a5de3debbd0d9282b338186bbd7c3))
|
| 378 |
+
|
| 379 |
+
|
| 380 |
+
### Bug Fixes
|
| 381 |
+
|
| 382 |
+
* disable `v8-compile-cache` when using `npm@>=9.7.0` ([#276](https://github.com/nodejs/corepack/issues/276)) ([2f3678c](https://github.com/nodejs/corepack/commit/2f3678cd7915978f4e2ce7a32cbe5db58e9d0b8d))
|
| 383 |
+
* don't override `process.exitCode` ([#268](https://github.com/nodejs/corepack/issues/268)) ([17d1f3d](https://github.com/nodejs/corepack/commit/17d1f3dd41ef6127228d427fd5cca373d6c97f0f))
|
| 384 |
+
|
| 385 |
+
## [0.18.0](https://github.com/nodejs/corepack/compare/v0.17.2...v0.18.0) (2023-05-19)
|
| 386 |
+
|
| 387 |
+
|
| 388 |
+
### ⚠ BREAKING CHANGES
|
| 389 |
+
|
| 390 |
+
* remove support for Node.js 14.x
|
| 391 |
+
|
| 392 |
+
### Features
|
| 393 |
+
|
| 394 |
+
* update package manager versions ([#256](https://github.com/nodejs/corepack/issues/256)) ([7b61ff6](https://github.com/nodejs/corepack/commit/7b61ff6bc797ec4ed50c2ba1e1f1689264cbf4fc))
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
### Bug Fixes
|
| 398 |
+
|
| 399 |
+
* **doc:** add a note about troubleshooting network errors ([#259](https://github.com/nodejs/corepack/issues/259)) ([aa3cbdb](https://github.com/nodejs/corepack/commit/aa3cbdb54fb21b8e0adde96dc781cdf750932843))
|
| 400 |
+
|
| 401 |
+
|
| 402 |
+
### Miscellaneous Chores
|
| 403 |
+
|
| 404 |
+
* update supported Node.js versions ([#258](https://github.com/nodejs/corepack/issues/258)) ([74f679d](https://github.com/nodejs/corepack/commit/74f679d8a72cc10a3720fc679b95e9bd086d95be))
|
| 405 |
+
|
| 406 |
+
## [0.17.2](https://github.com/nodejs/corepack/compare/v0.17.1...v0.17.2) (2023-04-07)
|
| 407 |
+
|
| 408 |
+
|
| 409 |
+
### Features
|
| 410 |
+
|
| 411 |
+
* update package manager versions ([#249](https://github.com/nodejs/corepack/issues/249)) ([2507e9b](https://github.com/nodejs/corepack/commit/2507e9b317eacdeb939aee086de5711218ebd794))
|
| 412 |
+
|
| 413 |
+
## [0.17.1](https://github.com/nodejs/corepack/compare/v0.17.0...v0.17.1) (2023-03-17)
|
| 414 |
+
|
| 415 |
+
|
| 416 |
+
### Features
|
| 417 |
+
|
| 418 |
+
* update package manager versions ([#245](https://github.com/nodejs/corepack/issues/245)) ([673f3b7](https://github.com/nodejs/corepack/commit/673f3b7f18421a49da1e2c55656666a74ce94474))
|
| 419 |
+
|
| 420 |
+
## [0.17.0](https://github.com/nodejs/corepack/compare/v0.16.0...v0.17.0) (2023-02-24)
|
| 421 |
+
|
| 422 |
+
|
| 423 |
+
### ⚠ BREAKING CHANGES
|
| 424 |
+
|
| 425 |
+
* add `"exports"` to the `package.json` ([#239](https://github.com/nodejs/corepack/issues/239))
|
| 426 |
+
|
| 427 |
+
### Features
|
| 428 |
+
|
| 429 |
+
* update package manager versions ([#242](https://github.com/nodejs/corepack/issues/242)) ([5141639](https://github.com/nodejs/corepack/commit/5141639af8198a343105be1e98a74f7c9e152472))
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
### Bug Fixes
|
| 433 |
+
|
| 434 |
+
* add `"exports"` to the `package.json` ([#239](https://github.com/nodejs/corepack/issues/239)) ([8e12d08](https://github.com/nodejs/corepack/commit/8e12d088dec171c03e90f623895a1fbf867130e6))
|
| 435 |
+
|
| 436 |
+
## [0.16.0](https://github.com/nodejs/corepack/compare/v0.15.3...v0.16.0) (2023-02-17)
|
| 437 |
+
|
| 438 |
+
|
| 439 |
+
### Features
|
| 440 |
+
|
| 441 |
+
* update package manager versions ([#228](https://github.com/nodejs/corepack/issues/228)) ([bb000f9](https://github.com/nodejs/corepack/commit/bb000f9c10a1fbd85f2c15a90218d90b42473130))
|
| 442 |
+
* build: migrate to ESBuild ([#229](https://github.com/nodejs/corepack/pull/229)) ([15ceb83](https://github.com/nodejs/corepack/commit/15ceb832a34a223efbe3d3f9cb792d9101a7022a))
|
| 443 |
+
|
| 444 |
+
|
| 445 |
+
### Bug Fixes
|
| 446 |
+
|
| 447 |
+
* npm registry override ([#219](https://github.com/nodejs/corepack/issues/219)) ([1b35362](https://github.com/nodejs/corepack/commit/1b353624e644874d9ef6c9acaf6d1254bff3015a))
|
| 448 |
+
|
| 449 |
+
## [0.15.3](https://github.com/nodejs/corepack/compare/v0.15.2...v0.15.3) (2022-12-30)
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
### Features
|
| 453 |
+
|
| 454 |
+
* update package manager versions ([#215](https://github.com/nodejs/corepack/issues/215)) ([f84cfcb](https://github.com/nodejs/corepack/commit/f84cfcb00ffb985d44b6aa0b563b2b4056a8f0d0))
|
| 455 |
+
|
| 456 |
+
## [0.15.2](https://github.com/nodejs/corepack/compare/v0.15.1...v0.15.2) (2022-11-25)
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
### Features
|
| 460 |
+
|
| 461 |
+
* update package manager versions ([#211](https://github.com/nodejs/corepack/issues/211)) ([c536c0c](https://github.com/nodejs/corepack/commit/c536c0c27c137c87a14487a2c2a63a1fe6bf88ec))
|
| 462 |
+
|
| 463 |
+
## [0.15.1](https://github.com/nodejs/corepack/compare/v0.15.0...v0.15.1) (2022-11-04)
|
| 464 |
+
|
| 465 |
+
|
| 466 |
+
### Features
|
| 467 |
+
|
| 468 |
+
* update package manager versions ([#205](https://github.com/nodejs/corepack/issues/205)) ([5bfac11](https://github.com/nodejs/corepack/commit/5bfac11715474a4318c67fc806fd1ff4252c683a))
|
| 469 |
+
|
| 470 |
+
## [0.15.0](https://github.com/nodejs/corepack/compare/v0.14.2...v0.15.0) (2022-10-28)
|
| 471 |
+
|
| 472 |
+
|
| 473 |
+
### Features
|
| 474 |
+
|
| 475 |
+
* add support for configurable registries and applicable auth options ([#186](https://github.com/nodejs/corepack/issues/186)) ([662ae90](https://github.com/nodejs/corepack/commit/662ae9057c7360cb05e9476914e611a9bf0074db))
|
| 476 |
+
* update package manager versions ([#193](https://github.com/nodejs/corepack/issues/193)) ([0ec3a73](https://github.com/nodejs/corepack/commit/0ec3a7384729c5cf4ac566d91f1a4bb74e08a64f))
|
| 477 |
+
* when strict checking is off, treat like transparent ([#197](https://github.com/nodejs/corepack/issues/197)) ([5eadc50](https://github.com/nodejs/corepack/commit/5eadc50192e205c60bfb1cad91854e9014a747b8))
|
| 478 |
+
|
| 479 |
+
|
| 480 |
+
### Bug Fixes
|
| 481 |
+
|
| 482 |
+
* **doc:** add package configuration instruction to readme ([#188](https://github.com/nodejs/corepack/issues/188)) ([0b7abb9](https://github.com/nodejs/corepack/commit/0b7abb9833d332bad97902260d31652482c274a0))
|
| 483 |
+
* recreate cache folder if necessary ([#200](https://github.com/nodejs/corepack/issues/200)) ([7b5f2f9](https://github.com/nodejs/corepack/commit/7b5f2f9fcb24fe3fe517a96deaac7f32854f3124))
|
| 484 |
+
|
| 485 |
+
## [0.14.2](https://github.com/nodejs/corepack/compare/v0.14.1...v0.14.2) (2022-09-24)
|
| 486 |
+
|
| 487 |
+
### Features
|
| 488 |
+
|
| 489 |
+
* update package manager versions ([#184](https://github.com/nodejs/corepack/issues/184)) ([84ae313](https://github.com/nodejs/corepack/commit/84ae3139e4b9a86d97465e36b50beb9201fda732))
|
| 490 |
+
|
| 491 |
+
## [0.14.1](https://github.com/nodejs/corepack/compare/v0.14.0...v0.14.1) (2022-09-16)
|
| 492 |
+
|
| 493 |
+
|
| 494 |
+
### Features
|
| 495 |
+
|
| 496 |
+
* update package manager versions ([#179](https://github.com/nodejs/corepack/issues/179)) ([0b88dcb](https://github.com/nodejs/corepack/commit/0b88dcbaaf190117c6f407b6632a4b3b10da8ad9))
|
| 497 |
+
|
| 498 |
+
## [0.14.0](https://github.com/nodejs/corepack/compare/v0.13.0...v0.14.0) (2022-09-02)
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
### Features
|
| 502 |
+
|
| 503 |
+
* add `COREPACK_ENABLE_STRICT` env variable ([#167](https://github.com/nodejs/corepack/issues/167)) ([92b52f6](https://github.com/nodejs/corepack/commit/92b52f6b4918aff968c0942b89fc722ebf57bce2))
|
| 504 |
+
* update package manager versions ([#170](https://github.com/nodejs/corepack/issues/170)) ([6f70bfc](https://github.com/nodejs/corepack/commit/6f70bfc4b6a8a57cccb1ff9cbf2f49240648f1ed))
|
| 505 |
+
|
| 506 |
+
|
| 507 |
+
### Bug Fixes
|
| 508 |
+
|
| 509 |
+
* handle tags including numbers in `prepare` command ([#165](https://github.com/nodejs/corepack/issues/165)) ([5a0727b](https://github.com/nodejs/corepack/commit/5a0727b43976e0dc299151876c0dde2c4a85174d))
|
| 510 |
+
|
| 511 |
+
## [0.13.0](https://github.com/nodejs/corepack/compare/v0.12.3...v0.13.0) (2022-08-19)
|
| 512 |
+
|
| 513 |
+
|
| 514 |
+
### Features
|
| 515 |
+
|
| 516 |
+
* do not use `~/.node` as default value for `COREPACK_HOME` ([#152](https://github.com/nodejs/corepack/issues/152)) ([09e24cf](https://github.com/nodejs/corepack/commit/09e24cf497de27fe92668cf0a8e555f2c7e2530d))
|
| 517 |
+
* download the latest version instead of a pinned one ([#134](https://github.com/nodejs/corepack/issues/134)) ([055b928](https://github.com/nodejs/corepack/commit/055b92807f711b5c8c8be6e62b8d3ce83e1ff002))
|
| 518 |
+
* update package manager versions ([#163](https://github.com/nodejs/corepack/issues/163)) ([af38d5a](https://github.com/nodejs/corepack/commit/af38d5afbbc10d61265b2f4687c5cc498b059b41))
|
| 519 |
+
|
| 520 |
+
## [0.12.3](https://github.com/nodejs/corepack/compare/v0.12.2...v0.12.3) (2022-08-12)
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
### Features
|
| 524 |
+
|
| 525 |
+
* update package manager versions ([#160](https://github.com/nodejs/corepack/issues/160)) ([ad092a7](https://github.com/nodejs/corepack/commit/ad092a7fb4296143fa5224c04dbd628451b3c158))
|
| 526 |
+
|
| 527 |
+
## [0.12.2](https://github.com/nodejs/corepack/compare/v0.12.1...v0.12.2) (2022-08-05)
|
| 528 |
+
|
| 529 |
+
### Features
|
| 530 |
+
|
| 531 |
+
* update package manager versions ([#154](https://github.com/nodejs/corepack/issues/154)) ([4b95fd3](https://github.com/nodejs/corepack/commit/4b95fd3b926659855970a887c893c10db0b98e5d))
|
| 532 |
+
|
| 533 |
+
## [0.12.1](https://github.com/nodejs/corepack/compare/v0.12.0...v0.12.1) (2022-07-21)
|
| 534 |
+
|
| 535 |
+
|
| 536 |
+
### Bug Fixes
|
| 537 |
+
|
| 538 |
+
* **doc:** update DESIGN.md s/engines.pm/packageManager/ ([#141](https://github.com/nodejs/corepack/issues/141)) ([d6039c5](https://github.com/nodejs/corepack/commit/d6039c5b16cdddb33069b9aa864854ed16d17e4e))
|
| 539 |
+
* update package manager versions ([#146](https://github.com/nodejs/corepack/issues/146)) ([fdb187a](https://github.com/nodejs/corepack/commit/fdb187a640de77df9b3688623ba510bdafda8702))
|
| 540 |
+
|
| 541 |
+
## [0.12.0](https://github.com/nodejs/corepack/compare/v0.11.2...v0.12.0) (2022-07-09)
|
| 542 |
+
|
| 543 |
+
|
| 544 |
+
### Features
|
| 545 |
+
|
| 546 |
+
* add support for hash checking ([#133](https://github.com/nodejs/corepack/issues/133)) ([6a480a7](https://github.com/nodejs/corepack/commit/6a480a72c2e9fc6725f2ab6dfaf4c52e4d3d2ade))
|
| 547 |
+
* add support for tags and ranges in `prepare` command ([#136](https://github.com/nodejs/corepack/issues/136)) ([29da06c](https://github.com/nodejs/corepack/commit/29da06c515e917829e5ffbedb34284a6597e9d56))
|
| 548 |
+
* update package manager versions ([#129](https://github.com/nodejs/corepack/issues/129)) ([2470f58](https://github.com/nodejs/corepack/commit/2470f58b74491a1301221df643c55be5adf1d349))
|
| 549 |
+
* update package manager versions ([#139](https://github.com/nodejs/corepack/issues/139)) ([cd0dcad](https://github.com/nodejs/corepack/commit/cd0dcade85621199048d7ca30dfc3efce11e1f37))
|
| 550 |
+
|
| 551 |
+
|
| 552 |
+
### Bug Fixes
|
| 553 |
+
|
| 554 |
+
* streamline the cache exploration ([#135](https://github.com/nodejs/corepack/issues/135)) ([185da44](https://github.com/nodejs/corepack/commit/185da44078fd1ca34aec2e4e6f8a52ecffcf3c11))
|
| 555 |
+
|
| 556 |
+
## [0.11.2](https://github.com/nodejs/corepack/compare/v0.11.1...v0.11.2) (2022-06-13)
|
| 557 |
+
|
| 558 |
+
### Bug Fixes
|
| 559 |
+
|
| 560 |
+
* only set bins on pack ([#127](https://github.com/nodejs/corepack/issues/127)) ([7ae489a](https://github.com/nodejs/corepack/commit/7ae489a86c3fe584b9915f4ec57deb7c316c1a25))
|
| 561 |
+
|
| 562 |
+
## [0.11.1](https://github.com/nodejs/corepack/compare/v0.11.0...v0.11.1) (2022-06-12)
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
### Bug Fixes
|
| 566 |
+
|
| 567 |
+
* **ci:** YAML formatting in publish workflow ([#124](https://github.com/nodejs/corepack/issues/124)) ([01c7d63](https://github.com/nodejs/corepack/commit/01c7d638b04a1340b3939a7985e24b586e344995))
|
| 568 |
+
|
| 569 |
+
## 0.11.0 (2022-06-12)
|
| 570 |
+
|
| 571 |
+
|
| 572 |
+
### Features
|
| 573 |
+
|
| 574 |
+
* auto setup proxy for http requests ([#69](https://github.com/nodejs/corepack/issues/69)) ([876ce02](https://github.com/nodejs/corepack/commit/876ce02fe7385ea5bc896b2dc93d1fb320361c64))
|
| 575 |
+
|
| 576 |
+
|
| 577 |
+
### Bug Fixes
|
| 578 |
+
|
| 579 |
+
* avoid symlinks to work on Windows ([#13](https://github.com/nodejs/corepack/issues/13)) ([b56df30](https://github.com/nodejs/corepack/commit/b56df30796da9c7cb0ba5e1bb7152c81582abba6))
|
| 580 |
+
* avoid using eval to get the corepack version ([#45](https://github.com/nodejs/corepack/issues/45)) ([78d94eb](https://github.com/nodejs/corepack/commit/78d94eb297444d7558e8b4395f0108c97117f8ab))
|
| 581 |
+
* bin file name for pnpm >=6.0 ([#35](https://github.com/nodejs/corepack/issues/35)) ([8ff2499](https://github.com/nodejs/corepack/commit/8ff2499e831c8cf2dea604ea985d830afc8a479e))
|
| 582 |
+
* generate cmd shim files ([a900b4d](https://github.com/nodejs/corepack/commit/a900b4db12fcd4d99c0a4d011b426cdc6485d323))
|
| 583 |
+
* handle package managers with a bin array correctly ([#20](https://github.com/nodejs/corepack/issues/20)) ([1836d17](https://github.com/nodejs/corepack/commit/1836d17b4fc4c0164df2fe1ccaca4d2f16f6f2d1))
|
| 584 |
+
* handle parallel installs ([#84](https://github.com/nodejs/corepack/issues/84)) ([5cfc6c9](https://github.com/nodejs/corepack/commit/5cfc6c9df0dbec8e4de4324be37aa0a54a300552))
|
| 585 |
+
* handle prereleases ([#32](https://github.com/nodejs/corepack/issues/32)) ([2a46b6d](https://github.com/nodejs/corepack/commit/2a46b6d13adae139141012254ef670d6ddcb5d11))
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
### Performance Improvements
|
| 589 |
+
|
| 590 |
+
* load binaries in the same process ([#97](https://github.com/nodejs/corepack/issues/97)) ([5ff6e82](https://github.com/nodejs/corepack/commit/5ff6e82028e58448ba5ba986854b61ecdc69885b))
|
node24/node_modules/corepack/LICENSE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
**Copyright © Corepack contributors**
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
| 4 |
+
|
| 5 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 6 |
+
|
| 7 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
node24/node_modules/corepack/README.md
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# <img src="./icon.svg" height="25" /> corepack
|
| 2 |
+
|
| 3 |
+
[](https://slack-invite.openjsf.org/)
|
| 4 |
+
|
| 5 |
+
Corepack is a zero-runtime-dependency Node.js script that acts as a bridge
|
| 6 |
+
between Node.js projects and the package managers they are intended to be used
|
| 7 |
+
with during development. In practical terms, **Corepack lets you use Yarn, npm,
|
| 8 |
+
and pnpm without having to install them**.
|
| 9 |
+
|
| 10 |
+
## How to Install
|
| 11 |
+
|
| 12 |
+
### Default Installs
|
| 13 |
+
|
| 14 |
+
Corepack is distributed with Node.js from version 14.19.0 up to (but not including) 25.0.0.
|
| 15 |
+
Run `corepack enable` to install the required Yarn and pnpm binaries on your path.
|
| 16 |
+
|
| 17 |
+
### Manual Installs
|
| 18 |
+
|
| 19 |
+
<details>
|
| 20 |
+
<summary>Install Corepack using npm</summary>
|
| 21 |
+
|
| 22 |
+
First uninstall your global Yarn and pnpm binaries (just leave npm). In general,
|
| 23 |
+
you'd do this by running the following command:
|
| 24 |
+
|
| 25 |
+
```shell
|
| 26 |
+
npm uninstall -g yarn pnpm
|
| 27 |
+
|
| 28 |
+
# That should be enough, but if you installed Yarn without going through npm it might
|
| 29 |
+
# be more tedious - for example, you might need to run `brew uninstall yarn` as well.
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
Then install Corepack:
|
| 33 |
+
|
| 34 |
+
```shell
|
| 35 |
+
npm install -g corepack
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
We do acknowledge the irony and overhead of using npm to install Corepack, which
|
| 39 |
+
is at least part of why the preferred option is to use the Corepack version that
|
| 40 |
+
is distributed along with Node.js itself.
|
| 41 |
+
|
| 42 |
+
</details>
|
| 43 |
+
|
| 44 |
+
<details><summary>Update Corepack using npm</summary>
|
| 45 |
+
|
| 46 |
+
To install the latest version of Corepack, use:
|
| 47 |
+
|
| 48 |
+
```shell
|
| 49 |
+
npm install -g corepack@latest
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
If Corepack was installed on your system using a Node.js Windows Installer
|
| 53 |
+
`.msi` package then you might need to remove it before attempting to install a
|
| 54 |
+
different version of Corepack using npm. You can select the Modify option of the
|
| 55 |
+
Node.js app settings to access the Windows Installer feature selection, and on
|
| 56 |
+
the "corepack manager" feature of the Node.js `.msi` package by selecting
|
| 57 |
+
"Entire feature will be unavailable". See
|
| 58 |
+
[Repair apps and programs in Windows](https://support.microsoft.com/en-us/windows/repair-apps-and-programs-in-windows-e90eefe4-d0a2-7c1b-dd59-949a9030f317)
|
| 59 |
+
for instructions on accessing the Windows apps page to modify settings.
|
| 60 |
+
|
| 61 |
+
</details>
|
| 62 |
+
|
| 63 |
+
<details><summary>Install Corepack from source</summary>
|
| 64 |
+
|
| 65 |
+
See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
| 66 |
+
|
| 67 |
+
</details>
|
| 68 |
+
|
| 69 |
+
## Usage
|
| 70 |
+
|
| 71 |
+
### When Building Packages
|
| 72 |
+
|
| 73 |
+
Just use your package managers as you usually would. Run `yarn install` in Yarn
|
| 74 |
+
projects, `pnpm install` in pnpm projects, and `npm` in npm projects. Corepack
|
| 75 |
+
will catch these calls, and depending on the situation:
|
| 76 |
+
|
| 77 |
+
- **If the local project is configured for the package manager you're using**,
|
| 78 |
+
Corepack will download and cache the latest compatible version.
|
| 79 |
+
|
| 80 |
+
- **If the local project is configured for a different package manager**,
|
| 81 |
+
Corepack will request you to run the command again using the right package
|
| 82 |
+
manager - thus avoiding corruptions of your install artifacts.
|
| 83 |
+
|
| 84 |
+
- **If the local project isn't configured for any package manager**, Corepack
|
| 85 |
+
will assume that you know what you're doing, and will use whatever package
|
| 86 |
+
manager version has been pinned as "known good release". Check the relevant
|
| 87 |
+
section for more details.
|
| 88 |
+
|
| 89 |
+
### When Authoring Packages
|
| 90 |
+
|
| 91 |
+
Set your package's manager with the `packageManager` field in `package.json`:
|
| 92 |
+
|
| 93 |
+
```json
|
| 94 |
+
{
|
| 95 |
+
"packageManager": "yarn@3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"
|
| 96 |
+
}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
Here, `yarn` is the name of the package manager, specified at version `3.2.3`,
|
| 100 |
+
along with the SHA-224 hash of this version for validation.
|
| 101 |
+
`packageManager@x.y.z` is required. The hash is optional but strongly
|
| 102 |
+
recommended as a security practice. Permitted values for the package manager are
|
| 103 |
+
`yarn`, `npm`, and `pnpm`.
|
| 104 |
+
|
| 105 |
+
You can also provide a URL to a `.js` file (which will be interpreted as a
|
| 106 |
+
CommonJS module) or a `.tgz` file (which will be interpreted as a package, and
|
| 107 |
+
the `"bin"` field of the `package.json` will be used to determine which file to
|
| 108 |
+
use in the archive).
|
| 109 |
+
|
| 110 |
+
```json
|
| 111 |
+
{
|
| 112 |
+
"packageManager": "yarn@https://registry.npmjs.org/@yarnpkg/cli-dist/-/cli-dist-3.2.3.tgz#sha224.16a0797d1710d1fb7ec40ab5c3801b68370a612a9b66ba117ad9924b"
|
| 113 |
+
}
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
#### `devEngines.packageManager`
|
| 117 |
+
|
| 118 |
+
When a `devEngines.packageManager` field is defined, and is an object containing
|
| 119 |
+
a `"name"` field (can also optionally contain `version` and `onFail` fields),
|
| 120 |
+
Corepack will use it to validate you're using a compatible package manager.
|
| 121 |
+
|
| 122 |
+
Depending on the value of `devEngines.packageManager.onFail`:
|
| 123 |
+
|
| 124 |
+
- if set to `ignore`, Corepack won't print any warning or error.
|
| 125 |
+
- if unset or set to `error`, Corepack will throw an error in case of a mismatch.
|
| 126 |
+
- if set to `warn` or some other value, Corepack will print a warning in case
|
| 127 |
+
of mismatch.
|
| 128 |
+
|
| 129 |
+
If the top-level `packageManager` field is missing, Corepack will use the
|
| 130 |
+
package manager defined in `devEngines.packageManager` – in which case you must
|
| 131 |
+
provide a specific version in `devEngines.packageManager.version`, ideally with
|
| 132 |
+
a hash, as explained in the previous section:
|
| 133 |
+
|
| 134 |
+
```json
|
| 135 |
+
{
|
| 136 |
+
"devEngines":{
|
| 137 |
+
"packageManager": {
|
| 138 |
+
"name": "yarn",
|
| 139 |
+
"version": "3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
## Known Good Releases
|
| 146 |
+
|
| 147 |
+
When running Corepack within projects that don't list a supported package
|
| 148 |
+
manager, it will default to a set of Known Good Releases.
|
| 149 |
+
|
| 150 |
+
If there is no Known Good Release for the requested package manager, Corepack
|
| 151 |
+
looks up the npm registry for the latest available version and cache it for
|
| 152 |
+
future use.
|
| 153 |
+
|
| 154 |
+
The Known Good Releases can be updated system-wide using `corepack install -g`.
|
| 155 |
+
When Corepack downloads a new version of a given package manager on the same
|
| 156 |
+
major line as the Known Good Release, it auto-updates it by default.
|
| 157 |
+
|
| 158 |
+
## Offline Workflow
|
| 159 |
+
|
| 160 |
+
The utility commands detailed in the next section.
|
| 161 |
+
|
| 162 |
+
- Either you can use the network while building your container image, in which
|
| 163 |
+
case you'll simply run `corepack pack` to make sure that your image
|
| 164 |
+
includes the Last Known Good release for the specified package manager.
|
| 165 |
+
|
| 166 |
+
- Or you're publishing your project to a system where the network is
|
| 167 |
+
unavailable, in which case you'll preemptively generate a package manager
|
| 168 |
+
archive from your local computer (using `corepack pack -o`) before storing
|
| 169 |
+
it somewhere your container will be able to access (for example within your
|
| 170 |
+
repository). After that it'll just be a matter of running
|
| 171 |
+
`corepack install -g --cache-only <path/to/corepack.tgz>` to setup the cache.
|
| 172 |
+
|
| 173 |
+
## Utility Commands
|
| 174 |
+
|
| 175 |
+
### `corepack <binary name>[@<version>] [... args]`
|
| 176 |
+
|
| 177 |
+
This meta-command runs the specified package manager in the local folder. You
|
| 178 |
+
can use it to force an install to run with a given version, which can be useful
|
| 179 |
+
when looking for regressions.
|
| 180 |
+
|
| 181 |
+
Note that those commands still check whether the local project is configured for
|
| 182 |
+
the given package manager (ie you won't be able to run `corepack yarn install`
|
| 183 |
+
on a project where the `packageManager` field references `pnpm`).
|
| 184 |
+
|
| 185 |
+
### `corepack cache clean`
|
| 186 |
+
|
| 187 |
+
Clears the local `COREPACK_HOME` cache directory.
|
| 188 |
+
|
| 189 |
+
### `corepack cache clear`
|
| 190 |
+
|
| 191 |
+
Clears the local `COREPACK_HOME` cache directory.
|
| 192 |
+
|
| 193 |
+
### `corepack enable [... name]`
|
| 194 |
+
|
| 195 |
+
| Option | Description |
|
| 196 |
+
| --------------------- | --------------------------------------- |
|
| 197 |
+
| `--install-directory` | Add the shims to the specified location |
|
| 198 |
+
|
| 199 |
+
This command will detect where Corepack is installed and will create shims next
|
| 200 |
+
to it for each of the specified package managers (or all of them if the command
|
| 201 |
+
is called without parameters). Note that the npm shims will not be installed
|
| 202 |
+
unless explicitly requested, as npm is currently distributed with Node.js
|
| 203 |
+
through other means.
|
| 204 |
+
|
| 205 |
+
If the file system where the `corepack` binary is located is read-only, this
|
| 206 |
+
command will fail. A workaround is to add the binaries as alias in your
|
| 207 |
+
shell configuration file (e.g. in `~/.bash_aliases`):
|
| 208 |
+
|
| 209 |
+
```sh
|
| 210 |
+
alias yarn="corepack yarn"
|
| 211 |
+
alias yarnpkg="corepack yarnpkg"
|
| 212 |
+
alias pnpm="corepack pnpm"
|
| 213 |
+
alias pnpx="corepack pnpx"
|
| 214 |
+
alias npm="corepack npm"
|
| 215 |
+
alias npx="corepack npx"
|
| 216 |
+
```
|
| 217 |
+
|
| 218 |
+
On Windows PowerShell, you can add functions using the `$PROFILE` automatic
|
| 219 |
+
variable:
|
| 220 |
+
|
| 221 |
+
```powershell
|
| 222 |
+
echo 'function yarn { corepack yarn @args }' >> $PROFILE
|
| 223 |
+
echo 'function yarnpkg { corepack yarnpkg @args }' >> $PROFILE
|
| 224 |
+
echo 'function pnpm { corepack pnpm @args }' >> $PROFILE
|
| 225 |
+
echo 'function pnpx { corepack pnpx @args }' >> $PROFILE
|
| 226 |
+
echo 'function npm { corepack npm @args }' >> $PROFILE
|
| 227 |
+
echo 'function npx { corepack npx @args }' >> $PROFILE
|
| 228 |
+
```
|
| 229 |
+
|
| 230 |
+
### `corepack disable [... name]`
|
| 231 |
+
|
| 232 |
+
| Option | Description |
|
| 233 |
+
| --------------------- | ------------------------------------------ |
|
| 234 |
+
| `--install-directory` | Remove the shims to the specified location |
|
| 235 |
+
|
| 236 |
+
This command will detect where Node.js is installed and will remove the shims
|
| 237 |
+
from there.
|
| 238 |
+
|
| 239 |
+
### `corepack install`
|
| 240 |
+
|
| 241 |
+
Download and install the package manager configured in the local project.
|
| 242 |
+
This command doesn't change the global version used when running the package
|
| 243 |
+
manager from outside the project (use the \`-g,--global\` flag if you wish
|
| 244 |
+
to do this).
|
| 245 |
+
|
| 246 |
+
### `corepack install <-g,--global> [... name[@<version>]]`
|
| 247 |
+
|
| 248 |
+
Install the selected package managers and install them on the system.
|
| 249 |
+
|
| 250 |
+
Package managers thus installed will be configured as the new default when
|
| 251 |
+
calling their respective binaries outside of projects defining the
|
| 252 |
+
`packageManager` field.
|
| 253 |
+
|
| 254 |
+
### `corepack pack [... name[@<version>]]`
|
| 255 |
+
|
| 256 |
+
| Option | Description |
|
| 257 |
+
| --------------------- | ------------------------------------------ |
|
| 258 |
+
| `--json ` | Print the output folder rather than logs |
|
| 259 |
+
| `-o,--output ` | Path where to generate the archive |
|
| 260 |
+
|
| 261 |
+
Download the selected package managers and store them inside a tarball
|
| 262 |
+
suitable for use with `corepack install -g`.
|
| 263 |
+
|
| 264 |
+
### `corepack use <name[@<version>]>`
|
| 265 |
+
|
| 266 |
+
When run, this command will retrieve the latest release matching the provided
|
| 267 |
+
descriptor, assign it to the project's package.json file, and automatically
|
| 268 |
+
perform an install.
|
| 269 |
+
|
| 270 |
+
### `corepack up`
|
| 271 |
+
|
| 272 |
+
Retrieve the latest available version for the current major release line of
|
| 273 |
+
the package manager used in the local project, and update the project to use
|
| 274 |
+
it.
|
| 275 |
+
|
| 276 |
+
Unlike `corepack use` this command doesn't take a package manager name nor a
|
| 277 |
+
version range, as it will always select the latest available version from the
|
| 278 |
+
range specified in `devEngines.packageManager.version`, or fallback to the
|
| 279 |
+
same major line. Should you need to upgrade to a new major, use an explicit
|
| 280 |
+
`corepack use {name}@latest` call (or simply `corepack use {name}`).
|
| 281 |
+
|
| 282 |
+
## Environment Variables
|
| 283 |
+
|
| 284 |
+
- `COREPACK_DEFAULT_TO_LATEST` can be set to `0` in order to instruct Corepack
|
| 285 |
+
not to lookup on the remote registry for the latest version of the selected
|
| 286 |
+
package manager, and to not update the Last Known Good version when it
|
| 287 |
+
downloads a new version of the same major line.
|
| 288 |
+
|
| 289 |
+
- `COREPACK_ENABLE_AUTO_PIN` can be set to `1` to instruct Corepack to
|
| 290 |
+
update the `packageManager` field when it detects that the local package
|
| 291 |
+
doesn't list it. In general we recommend to always list a `packageManager`
|
| 292 |
+
field (which you can easily set through `corepack use [name]@[version]`), as
|
| 293 |
+
it ensures that your project installs are always deterministic.
|
| 294 |
+
|
| 295 |
+
- `COREPACK_ENABLE_DOWNLOAD_PROMPT` can be set to `0` to
|
| 296 |
+
prevent Corepack showing the URL when it needs to download software, or can be
|
| 297 |
+
set to `1` to have the URL shown. By default, when Corepack is called
|
| 298 |
+
explicitly (e.g. `corepack pnpm …`), it is set to `0`; when Corepack is called
|
| 299 |
+
implicitly (e.g. `pnpm …`), it is set to `1`.
|
| 300 |
+
The default value cannot be overridden in a `.corepack.env` file.
|
| 301 |
+
When standard input is a TTY and no CI environment is detected, Corepack will
|
| 302 |
+
ask for user input before starting the download.
|
| 303 |
+
|
| 304 |
+
- `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS` can be set to `1` to allow use of
|
| 305 |
+
custom URLs to load a package manager known by Corepack (`yarn`, `npm`, and
|
| 306 |
+
`pnpm`).
|
| 307 |
+
|
| 308 |
+
- `COREPACK_ENABLE_NETWORK` can be set to `0` to prevent Corepack from accessing
|
| 309 |
+
the network (in which case you'll be responsible for hydrating the package
|
| 310 |
+
manager versions that will be required for the projects you'll run, using
|
| 311 |
+
`corepack install -g --cache-only`).
|
| 312 |
+
|
| 313 |
+
- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from throwing
|
| 314 |
+
error if the package manager does not correspond to the one defined for the
|
| 315 |
+
current project. This means that if a user is using the package manager
|
| 316 |
+
specified in the current project, it will use the version specified by the
|
| 317 |
+
project's `packageManager` field. But if the user is using other package
|
| 318 |
+
manager different from the one specified for the current project, it will use
|
| 319 |
+
the system-wide package manager version.
|
| 320 |
+
|
| 321 |
+
- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from
|
| 322 |
+
checking if the package manager corresponds to the one defined for the current
|
| 323 |
+
project. This means that it will always use the system-wide package manager
|
| 324 |
+
regardless of what is being specified in the project's `packageManager` field.
|
| 325 |
+
|
| 326 |
+
- `COREPACK_ENV_FILE` can be set to `0` to request Corepack to not attempt to
|
| 327 |
+
load `.corepack.env`; it can be set to a path to specify a different env file.
|
| 328 |
+
Only keys that start with `COREPACK_` and are not in the exception list
|
| 329 |
+
(`COREPACK_ENABLE_DOWNLOAD_PROMPT` and `COREPACK_ENV_FILE` are ignored)
|
| 330 |
+
will be taken into account.
|
| 331 |
+
For Node.js 18.x users, this setting has no effect as that version doesn't
|
| 332 |
+
support parsing of `.env` files.
|
| 333 |
+
|
| 334 |
+
- `COREPACK_HOME` can be set in order to define where Corepack should install
|
| 335 |
+
the package managers. By default it is set to `%LOCALAPPDATA%\node\corepack`
|
| 336 |
+
on Windows, and to `$HOME/.cache/node/corepack` everywhere else.
|
| 337 |
+
|
| 338 |
+
- `COREPACK_ROOT` has no functional impact on Corepack itself; it's
|
| 339 |
+
automatically being set in your environment by Corepack when it shells out to
|
| 340 |
+
the underlying package managers, so that they can feature-detect its presence
|
| 341 |
+
(useful for commands like `yarn init`).
|
| 342 |
+
|
| 343 |
+
- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving
|
| 344 |
+
package managers from npm. Default value is `https://registry.npmjs.org`
|
| 345 |
+
|
| 346 |
+
- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting
|
| 347 |
+
to a npm type registry.
|
| 348 |
+
|
| 349 |
+
- `COREPACK_NPM_USERNAME` and `COREPACK_NPM_PASSWORD` to set a Basic
|
| 350 |
+
authorization header when connecting to a npm type registry. Note that both
|
| 351 |
+
environment variables are required and as plain text. If you want to send an
|
| 352 |
+
empty password, explicitly set `COREPACK_NPM_PASSWORD` to an empty string.
|
| 353 |
+
|
| 354 |
+
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through
|
| 355 |
+
[`proxy-from-env`](https://github.com/Rob--W/proxy-from-env).
|
| 356 |
+
|
| 357 |
+
- `COREPACK_INTEGRITY_KEYS` can be set to an empty string or `0` to
|
| 358 |
+
instruct Corepack to skip integrity checks, or to a JSON string containing
|
| 359 |
+
custom keys.
|
| 360 |
+
|
| 361 |
+
## Troubleshooting
|
| 362 |
+
|
| 363 |
+
The environment variable `DEBUG` can be set to `corepack` to enable additional debug logging.
|
| 364 |
+
|
| 365 |
+
### Networking
|
| 366 |
+
|
| 367 |
+
There are a wide variety of networking issues that can occur while running
|
| 368 |
+
`corepack` commands. Things to check:
|
| 369 |
+
|
| 370 |
+
- Make sure your network connection is active.
|
| 371 |
+
- Make sure the host for your request can be resolved by your DNS; try using
|
| 372 |
+
`curl [URL]` (ipv4) and `curl -6 [URL]` (ipv6) from your shell.
|
| 373 |
+
- Check your proxy settings (see [Environment Variables](#environment-variables)).
|
| 374 |
+
|
| 375 |
+
## Contributing
|
| 376 |
+
|
| 377 |
+
See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
| 378 |
+
|
| 379 |
+
## License (MIT)
|
| 380 |
+
|
| 381 |
+
See [`LICENSE.md`](./LICENSE.md).
|
node24/node_modules/corepack/package.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "corepack",
|
| 3 |
+
"version": "0.34.6",
|
| 4 |
+
"homepage": "https://github.com/nodejs/corepack#readme",
|
| 5 |
+
"bugs": {
|
| 6 |
+
"url": "https://github.com/nodejs/corepack/issues"
|
| 7 |
+
},
|
| 8 |
+
"repository": {
|
| 9 |
+
"type": "git",
|
| 10 |
+
"url": "https://github.com/nodejs/corepack.git"
|
| 11 |
+
},
|
| 12 |
+
"engines": {
|
| 13 |
+
"node": "^20.10.0 || ^22.11.0 || >=24.0.0"
|
| 14 |
+
},
|
| 15 |
+
"exports": {
|
| 16 |
+
"./package.json": "./package.json"
|
| 17 |
+
},
|
| 18 |
+
"license": "MIT",
|
| 19 |
+
"packageManager": "yarn@4.11.0+sha224.209a3e277c6bbc03df6e4206fbfcb0c1621c27ecf0688f79a0c619f0",
|
| 20 |
+
"devDependencies": {
|
| 21 |
+
"@types/debug": "^4.1.5",
|
| 22 |
+
"@types/node": "^20.4.6",
|
| 23 |
+
"@types/proxy-from-env": "^1",
|
| 24 |
+
"@types/semver": "^7.1.0",
|
| 25 |
+
"@types/which": "^3.0.0",
|
| 26 |
+
"@yarnpkg/eslint-config": "^3.0.0",
|
| 27 |
+
"@yarnpkg/fslib": "^3.0.0-rc.48",
|
| 28 |
+
"@zkochan/cmd-shim": "^6.0.0",
|
| 29 |
+
"better-sqlite3": "^11.7.2",
|
| 30 |
+
"clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch",
|
| 31 |
+
"debug": "^4.1.1",
|
| 32 |
+
"esbuild": "^0.25.0",
|
| 33 |
+
"eslint": "^9.22.0",
|
| 34 |
+
"proxy-from-env": "^1.1.0",
|
| 35 |
+
"semver": "^7.6.3",
|
| 36 |
+
"supports-color": "^10.0.0",
|
| 37 |
+
"tar": "^7.5.4",
|
| 38 |
+
"tsx": "^4.16.2",
|
| 39 |
+
"typescript": "^5.7.3",
|
| 40 |
+
"undici": "^6.21.2",
|
| 41 |
+
"v8-compile-cache": "^2.3.0",
|
| 42 |
+
"vitest": "^3.0.5",
|
| 43 |
+
"which": "^5.0.0"
|
| 44 |
+
},
|
| 45 |
+
"resolutions": {
|
| 46 |
+
"undici-types": "6.x"
|
| 47 |
+
},
|
| 48 |
+
"scripts": {
|
| 49 |
+
"build": "run clean && run build:bundle && tsx ./mkshims.ts",
|
| 50 |
+
"build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node18.17.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'",
|
| 51 |
+
"clean": "run rimraf dist shims",
|
| 52 |
+
"corepack": "tsx ./sources/_cli.ts",
|
| 53 |
+
"lint": "eslint .",
|
| 54 |
+
"prepack": "yarn build",
|
| 55 |
+
"postpack": "run clean",
|
| 56 |
+
"rimraf": "node -e 'for(let i=2;i<process.argv.length;i++)fs.rmSync(process.argv[i],{recursive:true,force:true});'",
|
| 57 |
+
"typecheck": "tsc --noEmit",
|
| 58 |
+
"test": "vitest"
|
| 59 |
+
},
|
| 60 |
+
"files": [
|
| 61 |
+
"dist",
|
| 62 |
+
"shims",
|
| 63 |
+
"LICENSE.md"
|
| 64 |
+
],
|
| 65 |
+
"publishConfig": {
|
| 66 |
+
"bin": {
|
| 67 |
+
"corepack": "./dist/corepack.js",
|
| 68 |
+
"pnpm": "./dist/pnpm.js",
|
| 69 |
+
"pnpx": "./dist/pnpx.js",
|
| 70 |
+
"yarn": "./dist/yarn.js",
|
| 71 |
+
"yarnpkg": "./dist/yarnpkg.js"
|
| 72 |
+
},
|
| 73 |
+
"executableFiles": [
|
| 74 |
+
"./dist/npm.js",
|
| 75 |
+
"./dist/npx.js",
|
| 76 |
+
"./dist/pnpm.js",
|
| 77 |
+
"./dist/pnpx.js",
|
| 78 |
+
"./dist/yarn.js",
|
| 79 |
+
"./dist/yarnpkg.js",
|
| 80 |
+
"./dist/corepack.js",
|
| 81 |
+
"./shims/npm",
|
| 82 |
+
"./shims/npm.ps1",
|
| 83 |
+
"./shims/npx",
|
| 84 |
+
"./shims/npx.ps1",
|
| 85 |
+
"./shims/pnpm",
|
| 86 |
+
"./shims/pnpm.ps1",
|
| 87 |
+
"./shims/pnpx",
|
| 88 |
+
"./shims/pnpx.ps1",
|
| 89 |
+
"./shims/yarn",
|
| 90 |
+
"./shims/yarn.ps1",
|
| 91 |
+
"./shims/yarnpkg",
|
| 92 |
+
"./shims/yarnpkg.ps1"
|
| 93 |
+
]
|
| 94 |
+
},
|
| 95 |
+
"bin": {
|
| 96 |
+
"corepack": "./dist/corepack.js",
|
| 97 |
+
"pnpm": "./dist/pnpm.js",
|
| 98 |
+
"pnpx": "./dist/pnpx.js",
|
| 99 |
+
"yarn": "./dist/yarn.js",
|
| 100 |
+
"yarnpkg": "./dist/yarnpkg.js"
|
| 101 |
+
}
|
| 102 |
+
}
|
node24/node_modules/npm/.npmrc
ADDED
|
File without changes
|
node24/node_modules/npm/LICENSE
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The npm application
|
| 2 |
+
Copyright (c) npm, Inc. and Contributors
|
| 3 |
+
Licensed on the terms of The Artistic License 2.0
|
| 4 |
+
|
| 5 |
+
Node package dependencies of the npm application
|
| 6 |
+
Copyright (c) their respective copyright owners
|
| 7 |
+
Licensed on their respective license terms
|
| 8 |
+
|
| 9 |
+
The npm public registry at https://registry.npmjs.org
|
| 10 |
+
and the npm website at https://www.npmjs.com
|
| 11 |
+
Operated by npm, Inc.
|
| 12 |
+
Use governed by terms published on https://www.npmjs.com
|
| 13 |
+
|
| 14 |
+
"Node.js"
|
| 15 |
+
Trademark Joyent, Inc., https://joyent.com
|
| 16 |
+
Neither npm nor npm, Inc. are affiliated with Joyent, Inc.
|
| 17 |
+
|
| 18 |
+
The Node.js application
|
| 19 |
+
Project of Node Foundation, https://nodejs.org
|
| 20 |
+
|
| 21 |
+
The npm Logo
|
| 22 |
+
Copyright (c) Mathias Pettersson and Brian Hammond
|
| 23 |
+
|
| 24 |
+
"Gubblebum Blocky" typeface
|
| 25 |
+
Copyright (c) Tjarda Koster, https://jelloween.deviantart.com
|
| 26 |
+
Used with permission
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
--------
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
The Artistic License 2.0
|
| 33 |
+
|
| 34 |
+
Copyright (c) 2000-2006, The Perl Foundation.
|
| 35 |
+
|
| 36 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 37 |
+
of this license document, but changing it is not allowed.
|
| 38 |
+
|
| 39 |
+
Preamble
|
| 40 |
+
|
| 41 |
+
This license establishes the terms under which a given free software
|
| 42 |
+
Package may be copied, modified, distributed, and/or redistributed.
|
| 43 |
+
The intent is that the Copyright Holder maintains some artistic
|
| 44 |
+
control over the development of that Package while still keeping the
|
| 45 |
+
Package available as open source and free software.
|
| 46 |
+
|
| 47 |
+
You are always permitted to make arrangements wholly outside of this
|
| 48 |
+
license directly with the Copyright Holder of a given Package. If the
|
| 49 |
+
terms of this license do not permit the full use that you propose to
|
| 50 |
+
make of the Package, you should contact the Copyright Holder and seek
|
| 51 |
+
a different licensing arrangement.
|
| 52 |
+
|
| 53 |
+
Definitions
|
| 54 |
+
|
| 55 |
+
"Copyright Holder" means the individual(s) or organization(s)
|
| 56 |
+
named in the copyright notice for the entire Package.
|
| 57 |
+
|
| 58 |
+
"Contributor" means any party that has contributed code or other
|
| 59 |
+
material to the Package, in accordance with the Copyright Holder's
|
| 60 |
+
procedures.
|
| 61 |
+
|
| 62 |
+
"You" and "your" means any person who would like to copy,
|
| 63 |
+
distribute, or modify the Package.
|
| 64 |
+
|
| 65 |
+
"Package" means the collection of files distributed by the
|
| 66 |
+
Copyright Holder, and derivatives of that collection and/or of
|
| 67 |
+
those files. A given Package may consist of either the Standard
|
| 68 |
+
Version, or a Modified Version.
|
| 69 |
+
|
| 70 |
+
"Distribute" means providing a copy of the Package or making it
|
| 71 |
+
accessible to anyone else, or in the case of a company or
|
| 72 |
+
organization, to others outside of your company or organization.
|
| 73 |
+
|
| 74 |
+
"Distributor Fee" means any fee that you charge for Distributing
|
| 75 |
+
this Package or providing support for this Package to another
|
| 76 |
+
party. It does not mean licensing fees.
|
| 77 |
+
|
| 78 |
+
"Standard Version" refers to the Package if it has not been
|
| 79 |
+
modified, or has been modified only in ways explicitly requested
|
| 80 |
+
by the Copyright Holder.
|
| 81 |
+
|
| 82 |
+
"Modified Version" means the Package, if it has been changed, and
|
| 83 |
+
such changes were not explicitly requested by the Copyright
|
| 84 |
+
Holder.
|
| 85 |
+
|
| 86 |
+
"Original License" means this Artistic License as Distributed with
|
| 87 |
+
the Standard Version of the Package, in its current version or as
|
| 88 |
+
it may be modified by The Perl Foundation in the future.
|
| 89 |
+
|
| 90 |
+
"Source" form means the source code, documentation source, and
|
| 91 |
+
configuration files for the Package.
|
| 92 |
+
|
| 93 |
+
"Compiled" form means the compiled bytecode, object code, binary,
|
| 94 |
+
or any other form resulting from mechanical transformation or
|
| 95 |
+
translation of the Source form.
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
Permission for Use and Modification Without Distribution
|
| 99 |
+
|
| 100 |
+
(1) You are permitted to use the Standard Version and create and use
|
| 101 |
+
Modified Versions for any purpose without restriction, provided that
|
| 102 |
+
you do not Distribute the Modified Version.
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
Permissions for Redistribution of the Standard Version
|
| 106 |
+
|
| 107 |
+
(2) You may Distribute verbatim copies of the Source form of the
|
| 108 |
+
Standard Version of this Package in any medium without restriction,
|
| 109 |
+
either gratis or for a Distributor Fee, provided that you duplicate
|
| 110 |
+
all of the original copyright notices and associated disclaimers. At
|
| 111 |
+
your discretion, such verbatim copies may or may not include a
|
| 112 |
+
Compiled form of the Package.
|
| 113 |
+
|
| 114 |
+
(3) You may apply any bug fixes, portability changes, and other
|
| 115 |
+
modifications made available from the Copyright Holder. The resulting
|
| 116 |
+
Package will still be considered the Standard Version, and as such
|
| 117 |
+
will be subject to the Original License.
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
Distribution of Modified Versions of the Package as Source
|
| 121 |
+
|
| 122 |
+
(4) You may Distribute your Modified Version as Source (either gratis
|
| 123 |
+
or for a Distributor Fee, and with or without a Compiled form of the
|
| 124 |
+
Modified Version) provided that you clearly document how it differs
|
| 125 |
+
from the Standard Version, including, but not limited to, documenting
|
| 126 |
+
any non-standard features, executables, or modules, and provided that
|
| 127 |
+
you do at least ONE of the following:
|
| 128 |
+
|
| 129 |
+
(a) make the Modified Version available to the Copyright Holder
|
| 130 |
+
of the Standard Version, under the Original License, so that the
|
| 131 |
+
Copyright Holder may include your modifications in the Standard
|
| 132 |
+
Version.
|
| 133 |
+
|
| 134 |
+
(b) ensure that installation of your Modified Version does not
|
| 135 |
+
prevent the user installing or running the Standard Version. In
|
| 136 |
+
addition, the Modified Version must bear a name that is different
|
| 137 |
+
from the name of the Standard Version.
|
| 138 |
+
|
| 139 |
+
(c) allow anyone who receives a copy of the Modified Version to
|
| 140 |
+
make the Source form of the Modified Version available to others
|
| 141 |
+
under
|
| 142 |
+
|
| 143 |
+
(i) the Original License or
|
| 144 |
+
|
| 145 |
+
(ii) a license that permits the licensee to freely copy,
|
| 146 |
+
modify and redistribute the Modified Version using the same
|
| 147 |
+
licensing terms that apply to the copy that the licensee
|
| 148 |
+
received, and requires that the Source form of the Modified
|
| 149 |
+
Version, and of any works derived from it, be made freely
|
| 150 |
+
available in that license fees are prohibited but Distributor
|
| 151 |
+
Fees are allowed.
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
Distribution of Compiled Forms of the Standard Version
|
| 155 |
+
or Modified Versions without the Source
|
| 156 |
+
|
| 157 |
+
(5) You may Distribute Compiled forms of the Standard Version without
|
| 158 |
+
the Source, provided that you include complete instructions on how to
|
| 159 |
+
get the Source of the Standard Version. Such instructions must be
|
| 160 |
+
valid at the time of your distribution. If these instructions, at any
|
| 161 |
+
time while you are carrying out such distribution, become invalid, you
|
| 162 |
+
must provide new instructions on demand or cease further distribution.
|
| 163 |
+
If you provide valid instructions or cease distribution within thirty
|
| 164 |
+
days after you become aware that the instructions are invalid, then
|
| 165 |
+
you do not forfeit any of your rights under this license.
|
| 166 |
+
|
| 167 |
+
(6) You may Distribute a Modified Version in Compiled form without
|
| 168 |
+
the Source, provided that you comply with Section 4 with respect to
|
| 169 |
+
the Source of the Modified Version.
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
Aggregating or Linking the Package
|
| 173 |
+
|
| 174 |
+
(7) You may aggregate the Package (either the Standard Version or
|
| 175 |
+
Modified Version) with other packages and Distribute the resulting
|
| 176 |
+
aggregation provided that you do not charge a licensing fee for the
|
| 177 |
+
Package. Distributor Fees are permitted, and licensing fees for other
|
| 178 |
+
components in the aggregation are permitted. The terms of this license
|
| 179 |
+
apply to the use and Distribution of the Standard or Modified Versions
|
| 180 |
+
as included in the aggregation.
|
| 181 |
+
|
| 182 |
+
(8) You are permitted to link Modified and Standard Versions with
|
| 183 |
+
other works, to embed the Package in a larger work of your own, or to
|
| 184 |
+
build stand-alone binary or bytecode versions of applications that
|
| 185 |
+
include the Package, and Distribute the result without restriction,
|
| 186 |
+
provided the result does not expose a direct interface to the Package.
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
Items That are Not Considered Part of a Modified Version
|
| 190 |
+
|
| 191 |
+
(9) Works (including, but not limited to, modules and scripts) that
|
| 192 |
+
merely extend or make use of the Package, do not, by themselves, cause
|
| 193 |
+
the Package to be a Modified Version. In addition, such works are not
|
| 194 |
+
considered parts of the Package itself, and are not subject to the
|
| 195 |
+
terms of this license.
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
General Provisions
|
| 199 |
+
|
| 200 |
+
(10) Any use, modification, and distribution of the Standard or
|
| 201 |
+
Modified Versions is governed by this Artistic License. By using,
|
| 202 |
+
modifying or distributing the Package, you accept this license. Do not
|
| 203 |
+
use, modify, or distribute the Package, if you do not accept this
|
| 204 |
+
license.
|
| 205 |
+
|
| 206 |
+
(11) If your Modified Version has been derived from a Modified
|
| 207 |
+
Version made by someone other than you, you are nevertheless required
|
| 208 |
+
to ensure that your Modified Version complies with the requirements of
|
| 209 |
+
this license.
|
| 210 |
+
|
| 211 |
+
(12) This license does not grant you the right to use any trademark,
|
| 212 |
+
service mark, tradename, or logo of the Copyright Holder.
|
| 213 |
+
|
| 214 |
+
(13) This license includes the non-exclusive, worldwide,
|
| 215 |
+
free-of-charge patent license to make, have made, use, offer to sell,
|
| 216 |
+
sell, import and otherwise transfer the Package with respect to any
|
| 217 |
+
patent claims licensable by the Copyright Holder that are necessarily
|
| 218 |
+
infringed by the Package. If you institute patent litigation
|
| 219 |
+
(including a cross-claim or counterclaim) against any party alleging
|
| 220 |
+
that the Package constitutes direct or contributory patent
|
| 221 |
+
infringement, then this Artistic License to you shall terminate on the
|
| 222 |
+
date that such litigation is filed.
|
| 223 |
+
|
| 224 |
+
(14) Disclaimer of Warranty:
|
| 225 |
+
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
|
| 226 |
+
IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
|
| 227 |
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
|
| 228 |
+
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
|
| 229 |
+
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
|
| 230 |
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
| 231 |
+
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
|
| 232 |
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
--------
|
node24/node_modules/npm/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# npm - a JavaScript package manager
|
| 2 |
+
|
| 3 |
+
### Requirements
|
| 4 |
+
|
| 5 |
+
You should be running a currently supported version of [Node.js](https://nodejs.org/en/download/) to run **`npm`**. For a list of which versions of Node.js are currently supported, please see the [Node.js releases](https://nodejs.org/en/about/previous-releases) page.
|
| 6 |
+
|
| 7 |
+
### Installation
|
| 8 |
+
|
| 9 |
+
**`npm`** comes bundled with [**`node`**](https://nodejs.org/), & most third-party distributions, by default. Officially supported downloads/distributions can be found at: [nodejs.org/en/download](https://nodejs.org/en/download)
|
| 10 |
+
|
| 11 |
+
#### Direct Download
|
| 12 |
+
|
| 13 |
+
You can download & install **`npm`** directly from [**npmjs**.com](https://npmjs.com/) using our custom `install.sh` script:
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
curl -qL https://www.npmjs.com/install.sh | sh
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
#### Node Version Managers
|
| 20 |
+
|
| 21 |
+
If you're looking to manage multiple versions of **`Node.js`** &/or **`npm`**, consider using a [node version manager](https://github.com/search?q=node+version+manager+archived%3Afalse&type=repositories&ref=advsearch)
|
| 22 |
+
|
| 23 |
+
### Usage
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
npm <command>
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
### Links & Resources
|
| 30 |
+
|
| 31 |
+
* [**Documentation**](https://docs.npmjs.com/) - Official docs & how-tos for all things **npm**
|
| 32 |
+
* Note: you can also search docs locally with `npm help-search <query>`
|
| 33 |
+
* [**Bug Tracker**](https://github.com/npm/cli/issues) - Search or submit bugs against the CLI
|
| 34 |
+
* [**Community Feedback and Discussions**](https://github.com/orgs/community/discussions/categories/npm) - Contribute ideas & discussion around the npm registry, website & CLI
|
| 35 |
+
* [**RFCs**](https://github.com/npm/rfcs) - Contribute ideas & specifications for the API/design of the npm CLI
|
| 36 |
+
* [**Service Status**](https://status.npmjs.org/) - Monitor the current status & see incident reports for the website & registry
|
| 37 |
+
* [**Project Status**](https://npm.github.io/statusboard/) - See the health of all our maintained OSS projects in one view
|
| 38 |
+
* [**Support**](https://www.npmjs.com/support) - Experiencing problems with the **npm** [website](https://npmjs.com) or [registry](https://registry.npmjs.org)? [File a ticket](https://www.npmjs.com/support)
|
| 39 |
+
|
| 40 |
+
### Acknowledgments
|
| 41 |
+
|
| 42 |
+
* `npm` is configured to use the **npm Public Registry** at [https://registry.npmjs.org](https://registry.npmjs.org) by default; Usage of this registry is subject to **Terms of Use** available at [https://npmjs.com/policies/terms](https://npmjs.com/policies/terms)
|
| 43 |
+
* You can configure `npm` to use any other compatible registry you prefer. You can read more about [configuring third-party registries](https://docs.npmjs.com/cli/v7/using-npm/registry)
|
| 44 |
+
|
| 45 |
+
### FAQ on Branding
|
| 46 |
+
|
| 47 |
+
#### Is it "npm" or "NPM" or "Npm"?
|
| 48 |
+
|
| 49 |
+
**`npm`** should never be capitalized unless it is being displayed in a location that is customarily all-capitals (ex. titles on `man` pages).
|
| 50 |
+
|
| 51 |
+
#### Is "npm" an acronym for "Node Package Manager"?
|
| 52 |
+
|
| 53 |
+
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".
|
node24/node_modules/npm/bin/npm
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
|
| 3 |
+
# This is used by the Node.js installer, which expects the cygwin/mingw
|
| 4 |
+
# shell script to already be present in the npm dependency folder.
|
| 5 |
+
|
| 6 |
+
(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
|
| 7 |
+
|
| 8 |
+
basedir=`dirname "$0"`
|
| 9 |
+
|
| 10 |
+
case `uname` in
|
| 11 |
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
| 12 |
+
esac
|
| 13 |
+
|
| 14 |
+
if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then
|
| 15 |
+
IS_WSL="true"
|
| 16 |
+
fi
|
| 17 |
+
|
| 18 |
+
function no_node_dir {
|
| 19 |
+
# if this didn't work, then everything else below will fail
|
| 20 |
+
echo "Could not determine Node.js install directory" >&2
|
| 21 |
+
exit 1
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
NODE_EXE="$basedir/node.exe"
|
| 25 |
+
if ! [ -x "$NODE_EXE" ]; then
|
| 26 |
+
NODE_EXE="$basedir/node"
|
| 27 |
+
fi
|
| 28 |
+
if ! [ -x "$NODE_EXE" ]; then
|
| 29 |
+
NODE_EXE=node
|
| 30 |
+
fi
|
| 31 |
+
|
| 32 |
+
# this path is passed to node.exe, so it needs to match whatever
|
| 33 |
+
# kind of paths Node.js thinks it's using, typically win32 paths.
|
| 34 |
+
CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)' 2> /dev/null)"
|
| 35 |
+
if [ $? -ne 0 ]; then
|
| 36 |
+
# this fails under WSL 1 so add an additional message. we also suppress stderr above
|
| 37 |
+
# because the actual error raised is not helpful. in WSL 1 node.exe cannot handle
|
| 38 |
+
# output redirection properly. See https://github.com/microsoft/WSL/issues/2370
|
| 39 |
+
if [ "$IS_WSL" == "true" ]; then
|
| 40 |
+
echo "WSL 1 is not supported. Please upgrade to WSL 2 or above." >&2
|
| 41 |
+
fi
|
| 42 |
+
no_node_dir
|
| 43 |
+
fi
|
| 44 |
+
NPM_PREFIX_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-prefix.js"
|
| 45 |
+
NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js"
|
| 46 |
+
NPM_PREFIX=`"$NODE_EXE" "$NPM_PREFIX_JS"`
|
| 47 |
+
if [ $? -ne 0 ]; then
|
| 48 |
+
no_node_dir
|
| 49 |
+
fi
|
| 50 |
+
NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
|
| 51 |
+
|
| 52 |
+
# a path that will fail -f test on any posix bash
|
| 53 |
+
NPM_WSL_PATH="/.."
|
| 54 |
+
|
| 55 |
+
# WSL can run Windows binaries, so we have to give it the win32 path
|
| 56 |
+
# however, WSL bash tests against posix paths, so we need to construct that
|
| 57 |
+
# to know if npm is installed globally.
|
| 58 |
+
if [ "$IS_WSL" == "true" ]; then
|
| 59 |
+
NPM_WSL_PATH=`wslpath "$NPM_PREFIX_NPM_CLI_JS"`
|
| 60 |
+
fi
|
| 61 |
+
if [ -f "$NPM_PREFIX_NPM_CLI_JS" ] || [ -f "$NPM_WSL_PATH" ]; then
|
| 62 |
+
NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
|
| 63 |
+
fi
|
| 64 |
+
|
| 65 |
+
"$NODE_EXE" "$NPM_CLI_JS" "$@"
|
node24/node_modules/npm/bin/npm-cli.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
require('../lib/cli.js')(process)
|
node24/node_modules/npm/bin/npm-prefix.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
// This is a single-use bin to help windows discover the proper prefix for npm
|
| 3 |
+
// without having to load all of npm first
|
| 4 |
+
// It does not accept argv params
|
| 5 |
+
|
| 6 |
+
const path = require('node:path')
|
| 7 |
+
const Config = require('@npmcli/config')
|
| 8 |
+
const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions')
|
| 9 |
+
const config = new Config({
|
| 10 |
+
npmPath: path.dirname(__dirname),
|
| 11 |
+
// argv is explicitly not looked at since prefix is not something that can be changed via argv
|
| 12 |
+
argv: [],
|
| 13 |
+
definitions,
|
| 14 |
+
flatten,
|
| 15 |
+
shorthands,
|
| 16 |
+
excludeNpmCwd: false,
|
| 17 |
+
})
|
| 18 |
+
|
| 19 |
+
async function main () {
|
| 20 |
+
try {
|
| 21 |
+
await config.load()
|
| 22 |
+
// eslint-disable-next-line no-console
|
| 23 |
+
console.log(config.globalPrefix)
|
| 24 |
+
} catch (err) {
|
| 25 |
+
// eslint-disable-next-line no-console
|
| 26 |
+
console.error(err)
|
| 27 |
+
process.exit(1)
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
main()
|
node24/node_modules/npm/bin/npm.cmd
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:: Created by npm, please don't edit manually.
|
| 2 |
+
@ECHO OFF
|
| 3 |
+
|
| 4 |
+
SETLOCAL
|
| 5 |
+
|
| 6 |
+
SET "NODE_EXE=%~dp0\node.exe"
|
| 7 |
+
IF NOT EXIST "%NODE_EXE%" (
|
| 8 |
+
SET "NODE_EXE=node"
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
SET "NPM_PREFIX_JS=%~dp0\node_modules\npm\bin\npm-prefix.js"
|
| 12 |
+
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
|
| 13 |
+
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_PREFIX_JS%"') DO (
|
| 14 |
+
SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
|
| 15 |
+
)
|
| 16 |
+
IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (
|
| 17 |
+
SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
"%NODE_EXE%" "%NPM_CLI_JS%" %*
|
node24/node_modules/npm/bin/npm.ps1
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env pwsh
|
| 2 |
+
|
| 3 |
+
Set-StrictMode -Version 'Latest'
|
| 4 |
+
|
| 5 |
+
$NODE_EXE="$PSScriptRoot/node.exe"
|
| 6 |
+
if (-not (Test-Path $NODE_EXE)) {
|
| 7 |
+
$NODE_EXE="$PSScriptRoot/node"
|
| 8 |
+
}
|
| 9 |
+
if (-not (Test-Path $NODE_EXE)) {
|
| 10 |
+
$NODE_EXE="node"
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
$NPM_PREFIX_JS="$PSScriptRoot/node_modules/npm/bin/npm-prefix.js"
|
| 14 |
+
$NPM_CLI_JS="$PSScriptRoot/node_modules/npm/bin/npm-cli.js"
|
| 15 |
+
$NPM_PREFIX=(& $NODE_EXE $NPM_PREFIX_JS)
|
| 16 |
+
|
| 17 |
+
if ($LASTEXITCODE -ne 0) {
|
| 18 |
+
Write-Host "Could not determine Node.js install directory"
|
| 19 |
+
exit 1
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
$NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
|
| 23 |
+
if (Test-Path $NPM_PREFIX_NPM_CLI_JS) {
|
| 24 |
+
$NPM_CLI_JS=$NPM_PREFIX_NPM_CLI_JS
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
if ($MyInvocation.ExpectingInput) { # takes pipeline input
|
| 28 |
+
$input | & $NODE_EXE $NPM_CLI_JS $args
|
| 29 |
+
} elseif (-not $MyInvocation.Line) { # used "-File" argument
|
| 30 |
+
& $NODE_EXE $NPM_CLI_JS $args
|
| 31 |
+
} else { # used "-Command" argument
|
| 32 |
+
if (($MyInvocation | Get-Member -Name 'Statement') -and $MyInvocation.Statement) {
|
| 33 |
+
$NPM_ORIGINAL_COMMAND = $MyInvocation.Statement
|
| 34 |
+
} else {
|
| 35 |
+
$NPM_ORIGINAL_COMMAND = (
|
| 36 |
+
[Management.Automation.InvocationInfo].GetProperty('ScriptPosition', [Reflection.BindingFlags] 'Instance, NonPublic')
|
| 37 |
+
).GetValue($MyInvocation).Text
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
$NODE_EXE = $NODE_EXE.Replace("``", "````")
|
| 41 |
+
$NPM_CLI_JS = $NPM_CLI_JS.Replace("``", "````")
|
| 42 |
+
|
| 43 |
+
$NPM_COMMAND_ARRAY = [Management.Automation.Language.Parser]::ParseInput($NPM_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
|
| 44 |
+
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text
|
| 45 |
+
$NPM_ARGS = ($NPM_COMMAND_ARRAY | Select-Object -Skip 1) -join ' '
|
| 46 |
+
|
| 47 |
+
Invoke-Expression "& `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS"
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
exit $LASTEXITCODE
|
node24/node_modules/npm/bin/npx
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
|
| 3 |
+
# This is used by the Node.js installer, which expects the cygwin/mingw
|
| 4 |
+
# shell script to already be present in the npm dependency folder.
|
| 5 |
+
|
| 6 |
+
(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
|
| 7 |
+
|
| 8 |
+
basedir=`dirname "$0"`
|
| 9 |
+
|
| 10 |
+
case `uname` in
|
| 11 |
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
| 12 |
+
esac
|
| 13 |
+
|
| 14 |
+
if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then
|
| 15 |
+
IS_WSL="true"
|
| 16 |
+
fi
|
| 17 |
+
|
| 18 |
+
function no_node_dir {
|
| 19 |
+
# if this didn't work, then everything else below will fail
|
| 20 |
+
echo "Could not determine Node.js install directory" >&2
|
| 21 |
+
exit 1
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
NODE_EXE="$basedir/node.exe"
|
| 25 |
+
if ! [ -x "$NODE_EXE" ]; then
|
| 26 |
+
NODE_EXE="$basedir/node"
|
| 27 |
+
fi
|
| 28 |
+
if ! [ -x "$NODE_EXE" ]; then
|
| 29 |
+
NODE_EXE=node
|
| 30 |
+
fi
|
| 31 |
+
|
| 32 |
+
# this path is passed to node.exe, so it needs to match whatever
|
| 33 |
+
# kind of paths Node.js thinks it's using, typically win32 paths.
|
| 34 |
+
CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)' 2> /dev/null)"
|
| 35 |
+
if [ $? -ne 0 ]; then
|
| 36 |
+
# this fails under WSL 1 so add an additional message. we also suppress stderr above
|
| 37 |
+
# because the actual error raised is not helpful. in WSL 1 node.exe cannot handle
|
| 38 |
+
# output redirection properly. See https://github.com/microsoft/WSL/issues/2370
|
| 39 |
+
if [ "$IS_WSL" == "true" ]; then
|
| 40 |
+
echo "WSL 1 is not supported. Please upgrade to WSL 2 or above." >&2
|
| 41 |
+
fi
|
| 42 |
+
no_node_dir
|
| 43 |
+
fi
|
| 44 |
+
NPM_PREFIX_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-prefix.js"
|
| 45 |
+
NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js"
|
| 46 |
+
NPM_PREFIX=`"$NODE_EXE" "$NPM_PREFIX_JS"`
|
| 47 |
+
if [ $? -ne 0 ]; then
|
| 48 |
+
no_node_dir
|
| 49 |
+
fi
|
| 50 |
+
NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
|
| 51 |
+
|
| 52 |
+
# a path that will fail -f test on any posix bash
|
| 53 |
+
NPX_WSL_PATH="/.."
|
| 54 |
+
|
| 55 |
+
# WSL can run Windows binaries, so we have to give it the win32 path
|
| 56 |
+
# however, WSL bash tests against posix paths, so we need to construct that
|
| 57 |
+
# to know if npm is installed globally.
|
| 58 |
+
if [ "$IS_WSL" == "true" ]; then
|
| 59 |
+
NPX_WSL_PATH=`wslpath "$NPM_PREFIX_NPX_CLI_JS"`
|
| 60 |
+
fi
|
| 61 |
+
if [ -f "$NPM_PREFIX_NPX_CLI_JS" ] || [ -f "$NPX_WSL_PATH" ]; then
|
| 62 |
+
NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS"
|
| 63 |
+
fi
|
| 64 |
+
|
| 65 |
+
"$NODE_EXE" "$NPX_CLI_JS" "$@"
|
node24/node_modules/npm/bin/npx-cli.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
|
| 3 |
+
const cli = require('../lib/cli.js')
|
| 4 |
+
|
| 5 |
+
// run the resulting command as `npm exec ...args`
|
| 6 |
+
process.argv[1] = require.resolve('./npm-cli.js')
|
| 7 |
+
process.argv.splice(2, 0, 'exec')
|
| 8 |
+
|
| 9 |
+
// TODO: remove the affordances for removed items in npm v9
|
| 10 |
+
const removedSwitches = new Set([
|
| 11 |
+
'always-spawn',
|
| 12 |
+
'ignore-existing',
|
| 13 |
+
'shell-auto-fallback',
|
| 14 |
+
])
|
| 15 |
+
|
| 16 |
+
const removedOpts = new Set([
|
| 17 |
+
'npm',
|
| 18 |
+
'node-arg',
|
| 19 |
+
'n',
|
| 20 |
+
])
|
| 21 |
+
|
| 22 |
+
const removed = new Set([
|
| 23 |
+
...removedSwitches,
|
| 24 |
+
...removedOpts,
|
| 25 |
+
])
|
| 26 |
+
|
| 27 |
+
const { definitions, shorthands } = require('@npmcli/config/lib/definitions')
|
| 28 |
+
const npmSwitches = Object.entries(definitions)
|
| 29 |
+
.filter(([, { type }]) => type === Boolean ||
|
| 30 |
+
(Array.isArray(type) && type.includes(Boolean)))
|
| 31 |
+
.map(([key]) => key)
|
| 32 |
+
|
| 33 |
+
// things that don't take a value
|
| 34 |
+
const switches = new Set([
|
| 35 |
+
...removedSwitches,
|
| 36 |
+
...npmSwitches,
|
| 37 |
+
'no-install',
|
| 38 |
+
'quiet',
|
| 39 |
+
'q',
|
| 40 |
+
'version',
|
| 41 |
+
'v',
|
| 42 |
+
'help',
|
| 43 |
+
'h',
|
| 44 |
+
])
|
| 45 |
+
|
| 46 |
+
// things that do take a value
|
| 47 |
+
const opts = new Set([
|
| 48 |
+
...removedOpts,
|
| 49 |
+
'package',
|
| 50 |
+
'p',
|
| 51 |
+
'cache',
|
| 52 |
+
'userconfig',
|
| 53 |
+
'call',
|
| 54 |
+
'c',
|
| 55 |
+
'shell',
|
| 56 |
+
'npm',
|
| 57 |
+
'node-arg',
|
| 58 |
+
'n',
|
| 59 |
+
])
|
| 60 |
+
|
| 61 |
+
// break out of loop when we find a positional argument or --
|
| 62 |
+
// If we find a positional arg, we shove -- in front of it, and
|
| 63 |
+
// let the normal npm cli handle the rest.
|
| 64 |
+
let i
|
| 65 |
+
let sawRemovedFlags = false
|
| 66 |
+
for (i = 3; i < process.argv.length; i++) {
|
| 67 |
+
const arg = process.argv[i]
|
| 68 |
+
if (arg === '--') {
|
| 69 |
+
break
|
| 70 |
+
} else if (/^-/.test(arg)) {
|
| 71 |
+
const [key, ...v] = arg.replace(/^-+/, '').split('=')
|
| 72 |
+
|
| 73 |
+
switch (key) {
|
| 74 |
+
case 'p':
|
| 75 |
+
process.argv[i] = ['--package', ...v].join('=')
|
| 76 |
+
break
|
| 77 |
+
|
| 78 |
+
case 'shell':
|
| 79 |
+
process.argv[i] = ['--script-shell', ...v].join('=')
|
| 80 |
+
break
|
| 81 |
+
|
| 82 |
+
case 'no-install':
|
| 83 |
+
process.argv[i] = '--yes=false'
|
| 84 |
+
break
|
| 85 |
+
|
| 86 |
+
default:
|
| 87 |
+
// resolve shorthands and run again
|
| 88 |
+
if (shorthands[key] && !removed.has(key)) {
|
| 89 |
+
const a = [...shorthands[key]]
|
| 90 |
+
if (v.length) {
|
| 91 |
+
a.push(v.join('='))
|
| 92 |
+
}
|
| 93 |
+
process.argv.splice(i, 1, ...a)
|
| 94 |
+
i--
|
| 95 |
+
continue
|
| 96 |
+
}
|
| 97 |
+
break
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
if (removed.has(key)) {
|
| 101 |
+
// eslint-disable-next-line no-console
|
| 102 |
+
console.error(`npx: the --${key} argument has been removed.`)
|
| 103 |
+
sawRemovedFlags = true
|
| 104 |
+
process.argv.splice(i, 1)
|
| 105 |
+
i--
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
if (v.length === 0 && !switches.has(key) &&
|
| 109 |
+
(opts.has(key) || !/^-/.test(process.argv[i + 1]))) {
|
| 110 |
+
// value will be next argument, skip over it.
|
| 111 |
+
if (removed.has(key)) {
|
| 112 |
+
// also remove the value for the cut key.
|
| 113 |
+
process.argv.splice(i + 1, 1)
|
| 114 |
+
} else {
|
| 115 |
+
i++
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
} else {
|
| 119 |
+
// found a positional arg, put -- in front of it, and we're done
|
| 120 |
+
process.argv.splice(i, 0, '--')
|
| 121 |
+
break
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
if (sawRemovedFlags) {
|
| 126 |
+
// eslint-disable-next-line no-console
|
| 127 |
+
console.error('See `npm help exec` for more information')
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
cli(process)
|
node24/node_modules/npm/bin/npx.cmd
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:: Created by npm, please don't edit manually.
|
| 2 |
+
@ECHO OFF
|
| 3 |
+
|
| 4 |
+
SETLOCAL
|
| 5 |
+
|
| 6 |
+
SET "NODE_EXE=%~dp0\node.exe"
|
| 7 |
+
IF NOT EXIST "%NODE_EXE%" (
|
| 8 |
+
SET "NODE_EXE=node"
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
SET "NPM_PREFIX_JS=%~dp0\node_modules\npm\bin\npm-prefix.js"
|
| 12 |
+
SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js"
|
| 13 |
+
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_PREFIX_JS%"') DO (
|
| 14 |
+
SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js"
|
| 15 |
+
)
|
| 16 |
+
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (
|
| 17 |
+
SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%"
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
"%NODE_EXE%" "%NPX_CLI_JS%" %*
|
node24/node_modules/npm/bin/npx.ps1
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env pwsh
|
| 2 |
+
|
| 3 |
+
Set-StrictMode -Version 'Latest'
|
| 4 |
+
|
| 5 |
+
$NODE_EXE="$PSScriptRoot/node.exe"
|
| 6 |
+
if (-not (Test-Path $NODE_EXE)) {
|
| 7 |
+
$NODE_EXE="$PSScriptRoot/node"
|
| 8 |
+
}
|
| 9 |
+
if (-not (Test-Path $NODE_EXE)) {
|
| 10 |
+
$NODE_EXE="node"
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
$NPM_PREFIX_JS="$PSScriptRoot/node_modules/npm/bin/npm-prefix.js"
|
| 14 |
+
$NPX_CLI_JS="$PSScriptRoot/node_modules/npm/bin/npx-cli.js"
|
| 15 |
+
$NPM_PREFIX=(& $NODE_EXE $NPM_PREFIX_JS)
|
| 16 |
+
|
| 17 |
+
if ($LASTEXITCODE -ne 0) {
|
| 18 |
+
Write-Host "Could not determine Node.js install directory"
|
| 19 |
+
exit 1
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
$NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
|
| 23 |
+
if (Test-Path $NPM_PREFIX_NPX_CLI_JS) {
|
| 24 |
+
$NPX_CLI_JS=$NPM_PREFIX_NPX_CLI_JS
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
if ($MyInvocation.ExpectingInput) { # takes pipeline input
|
| 28 |
+
$input | & $NODE_EXE $NPX_CLI_JS $args
|
| 29 |
+
} elseif (-not $MyInvocation.Line) { # used "-File" argument
|
| 30 |
+
& $NODE_EXE $NPX_CLI_JS $args
|
| 31 |
+
} else { # used "-Command" argument
|
| 32 |
+
if (($MyInvocation | Get-Member -Name 'Statement') -and $MyInvocation.Statement) {
|
| 33 |
+
$NPX_ORIGINAL_COMMAND = $MyInvocation.Statement
|
| 34 |
+
} else {
|
| 35 |
+
$NPX_ORIGINAL_COMMAND = (
|
| 36 |
+
[Management.Automation.InvocationInfo].GetProperty('ScriptPosition', [Reflection.BindingFlags] 'Instance, NonPublic')
|
| 37 |
+
).GetValue($MyInvocation).Text
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
$NODE_EXE = $NODE_EXE.Replace("``", "````")
|
| 41 |
+
$NPX_CLI_JS = $NPX_CLI_JS.Replace("``", "````")
|
| 42 |
+
|
| 43 |
+
$NPX_COMMAND_ARRAY = [Management.Automation.Language.Parser]::ParseInput($NPX_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
|
| 44 |
+
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text
|
| 45 |
+
$NPX_ARGS = ($NPX_COMMAND_ARRAY | Select-Object -Skip 1) -join ' '
|
| 46 |
+
|
| 47 |
+
Invoke-Expression "& `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS"
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
exit $LASTEXITCODE
|
node24/node_modules/npm/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if (require.main === module) {
|
| 2 |
+
require('./lib/cli.js')(process)
|
| 3 |
+
} else {
|
| 4 |
+
throw new Error('The programmatic API was removed in npm v8.0.0')
|
| 5 |
+
}
|
node24/node_modules/npm/lib/arborist-cmd.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { log } = require('proc-log')
|
| 2 |
+
const BaseCommand = require('./base-cmd.js')
|
| 3 |
+
|
| 4 |
+
// This is the base for all commands whose execWorkspaces just gets a list of workspace names and passes it on to new Arborist() to be able to run a filtered Arborist.reify() at some point.
|
| 5 |
+
class ArboristCmd extends BaseCommand {
|
| 6 |
+
get isArboristCmd () {
|
| 7 |
+
return true
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
static params = [
|
| 11 |
+
'workspace',
|
| 12 |
+
'workspaces',
|
| 13 |
+
'include-workspace-root',
|
| 14 |
+
'install-links',
|
| 15 |
+
]
|
| 16 |
+
|
| 17 |
+
static workspaces = true
|
| 18 |
+
static ignoreImplicitWorkspace = false
|
| 19 |
+
static checkDevEngines = true
|
| 20 |
+
|
| 21 |
+
constructor (npm) {
|
| 22 |
+
super(npm)
|
| 23 |
+
|
| 24 |
+
const { config } = this.npm
|
| 25 |
+
|
| 26 |
+
// when location isn't set and global isn't true check for a package.json at the localPrefix and set the location to project if found
|
| 27 |
+
const locationProject = config.get('location') === 'project' || (
|
| 28 |
+
config.isDefault('location')
|
| 29 |
+
// this is different then `npm.global` which falls back to checking
|
| 30 |
+
// location which we do not want to use here
|
| 31 |
+
&& !config.get('global')
|
| 32 |
+
&& npm.localPackage
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
// if audit is not set and we are in global mode and location is not project and we assume its not a project related context, then we set audit=false
|
| 36 |
+
if (config.isDefault('audit') && (this.npm.global || !locationProject)) {
|
| 37 |
+
config.set('audit', false)
|
| 38 |
+
} else if (this.npm.global && config.get('audit')) {
|
| 39 |
+
log.warn('config', 'includes both --global and --audit, which is currently unsupported.')
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
async execWorkspaces (args) {
|
| 44 |
+
await this.setWorkspaces()
|
| 45 |
+
return this.exec(args)
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
module.exports = ArboristCmd
|
node24/node_modules/npm/lib/base-cmd.js
ADDED
|
@@ -0,0 +1,435 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { log } = require('proc-log')
|
| 2 |
+
const { definitions, shorthands } = require('@npmcli/config/lib/definitions')
|
| 3 |
+
const nopt = require('nopt')
|
| 4 |
+
|
| 5 |
+
class BaseCommand {
|
| 6 |
+
// these defaults can be overridden by individual commands
|
| 7 |
+
static workspaces = false
|
| 8 |
+
static ignoreImplicitWorkspace = true
|
| 9 |
+
static checkDevEngines = false
|
| 10 |
+
|
| 11 |
+
// these should always be overridden by individual commands
|
| 12 |
+
static name = null
|
| 13 |
+
static description = null
|
| 14 |
+
static params = null
|
| 15 |
+
static definitions = null
|
| 16 |
+
static subcommands = null
|
| 17 |
+
// Number of expected positional arguments (null = unlimited/unchecked)
|
| 18 |
+
static positionals = null
|
| 19 |
+
|
| 20 |
+
// this is a static so that we can read from it without instantiating a command which would require loading the config
|
| 21 |
+
static get describeUsage () {
|
| 22 |
+
return this.getUsage()
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
static getUsage (parentName = null, includeDescriptions = true) {
|
| 26 |
+
const { aliases: cmdAliases } = require('./utils/cmd-list')
|
| 27 |
+
const seenExclusive = new Set()
|
| 28 |
+
const wrapWidth = 80
|
| 29 |
+
const { description, usage = [''], name } = this
|
| 30 |
+
|
| 31 |
+
// Resolve to a definitions array: if the command has its own definitions, use those directly; otherwise resolve params from the global definitions pool.
|
| 32 |
+
let cmdDefs
|
| 33 |
+
if (this.definitions) {
|
| 34 |
+
cmdDefs = this.definitions
|
| 35 |
+
} else if (this.params) {
|
| 36 |
+
cmdDefs = this.params.map(p => definitions[p]).filter(Boolean)
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
// If this is a subcommand, prepend parent name
|
| 40 |
+
const fullCommandName = parentName ? `${parentName} ${name}` : name
|
| 41 |
+
|
| 42 |
+
const fullUsage = [
|
| 43 |
+
`${description}`,
|
| 44 |
+
'',
|
| 45 |
+
'Usage:',
|
| 46 |
+
]
|
| 47 |
+
if (usage) {
|
| 48 |
+
fullUsage.push(...usage.map(u => `npm ${fullCommandName} ${u}`.trim()))
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
if (this.subcommands) {
|
| 52 |
+
for (const sub in this.subcommands) {
|
| 53 |
+
fullUsage.push(`npm ${fullCommandName} ${sub} ${this.subcommands[sub].usage}`)
|
| 54 |
+
}
|
| 55 |
+
fullUsage.push('')
|
| 56 |
+
fullUsage.push('Subcommands:')
|
| 57 |
+
const subcommandEntries = Object.entries(this.subcommands)
|
| 58 |
+
for (let i = 0; i < subcommandEntries.length; i++) {
|
| 59 |
+
const [subName, SubCommand] = subcommandEntries[i]
|
| 60 |
+
fullUsage.push(` ${subName}`)
|
| 61 |
+
if (SubCommand.description) {
|
| 62 |
+
fullUsage.push(` ${SubCommand.description}`)
|
| 63 |
+
}
|
| 64 |
+
// Add space between subcommands except after the last one
|
| 65 |
+
if (i < subcommandEntries.length - 1) {
|
| 66 |
+
fullUsage.push('')
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
fullUsage.push('')
|
| 70 |
+
fullUsage.push(`Run "npm ${name} <subcommand> --help" for more info on a subcommand.`)
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
if (cmdDefs) {
|
| 74 |
+
let results = ''
|
| 75 |
+
let line = ''
|
| 76 |
+
for (const def of cmdDefs) {
|
| 77 |
+
/* istanbul ignore next */
|
| 78 |
+
if (seenExclusive.has(def.key)) {
|
| 79 |
+
continue
|
| 80 |
+
}
|
| 81 |
+
let paramUsage = def.usage
|
| 82 |
+
if (def.exclusive) {
|
| 83 |
+
const exclusiveParams = [paramUsage]
|
| 84 |
+
for (const e of def.exclusive) {
|
| 85 |
+
seenExclusive.add(e)
|
| 86 |
+
const eDef = cmdDefs.find(d => d.key === e) || definitions[e]
|
| 87 |
+
exclusiveParams.push(eDef?.usage)
|
| 88 |
+
}
|
| 89 |
+
paramUsage = `${exclusiveParams.join('|')}`
|
| 90 |
+
}
|
| 91 |
+
paramUsage = `[${paramUsage}]`
|
| 92 |
+
if (line.length + paramUsage.length > wrapWidth) {
|
| 93 |
+
results = [results, line].filter(Boolean).join('\n')
|
| 94 |
+
line = ''
|
| 95 |
+
}
|
| 96 |
+
line = [line, paramUsage].filter(Boolean).join(' ')
|
| 97 |
+
}
|
| 98 |
+
fullUsage.push('')
|
| 99 |
+
fullUsage.push('Options:')
|
| 100 |
+
fullUsage.push([results, line].filter(Boolean).join('\n'))
|
| 101 |
+
|
| 102 |
+
// Add flag descriptions
|
| 103 |
+
if (cmdDefs.length > 0 && includeDescriptions) {
|
| 104 |
+
fullUsage.push('')
|
| 105 |
+
for (const def of cmdDefs) {
|
| 106 |
+
if (def.description) {
|
| 107 |
+
const desc = def.description.trim().split('\n')[0]
|
| 108 |
+
const shortcuts = def.short ? `-${def.short}` : ''
|
| 109 |
+
const aliases = (def.alias || []).map(v => `--${v}`).join('|')
|
| 110 |
+
const mainFlag = `--${def.key}`
|
| 111 |
+
const flagName = [shortcuts, mainFlag, aliases].filter(Boolean).join('|')
|
| 112 |
+
const requiredNote = def.required ? ' (required)' : ''
|
| 113 |
+
fullUsage.push(` ${flagName}${requiredNote}`)
|
| 114 |
+
fullUsage.push(` ${desc}`)
|
| 115 |
+
fullUsage.push('')
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
const aliases = Object.entries(cmdAliases).reduce((p, [k, v]) => {
|
| 122 |
+
return p.concat(v === name ? k : [])
|
| 123 |
+
}, [])
|
| 124 |
+
|
| 125 |
+
if (aliases.length) {
|
| 126 |
+
const plural = aliases.length === 1 ? '' : 'es'
|
| 127 |
+
fullUsage.push('')
|
| 128 |
+
fullUsage.push(`alias${plural}: ${aliases.join(', ')}`)
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
fullUsage.push('')
|
| 132 |
+
fullUsage.push(`Run "npm help ${name}" for more info`)
|
| 133 |
+
|
| 134 |
+
return fullUsage.join('\n')
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
constructor (npm) {
|
| 138 |
+
this.npm = npm
|
| 139 |
+
this.commandArgs = null
|
| 140 |
+
|
| 141 |
+
const { config } = this
|
| 142 |
+
|
| 143 |
+
if (!this.constructor.skipConfigValidation) {
|
| 144 |
+
config.validate()
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
if (config.get('workspaces') === false && config.get('workspace').length) {
|
| 148 |
+
throw new Error('Cannot use --no-workspaces and --workspace at the same time')
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
get config () {
|
| 153 |
+
// Return command-specific config if it exists, otherwise use npm's config
|
| 154 |
+
return this.npm.config
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
get name () {
|
| 158 |
+
return this.constructor.name
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
get description () {
|
| 162 |
+
return this.constructor.description
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
get params () {
|
| 166 |
+
return this.constructor.params
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
get usage () {
|
| 170 |
+
return this.constructor.describeUsage
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
usageError (prefix = '') {
|
| 174 |
+
if (prefix) {
|
| 175 |
+
prefix += '\n\n'
|
| 176 |
+
}
|
| 177 |
+
return Object.assign(new Error(`\n${prefix}${this.usage}`), {
|
| 178 |
+
code: 'EUSAGE',
|
| 179 |
+
})
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
// Compare the number of entries with what was expected
|
| 183 |
+
checkExpected (entries) {
|
| 184 |
+
if (!this.npm.config.isDefault('expect-results')) {
|
| 185 |
+
const expected = this.npm.config.get('expect-results')
|
| 186 |
+
if (!!entries !== !!expected) {
|
| 187 |
+
log.warn(this.name, `Expected ${expected ? '' : 'no '}results, got ${entries}`)
|
| 188 |
+
process.exitCode = 1
|
| 189 |
+
}
|
| 190 |
+
} else if (!this.npm.config.isDefault('expect-result-count')) {
|
| 191 |
+
const expected = this.npm.config.get('expect-result-count')
|
| 192 |
+
if (expected !== entries) {
|
| 193 |
+
log.warn(this.name, `Expected ${expected} result${expected === 1 ? '' : 's'}, got ${entries}`)
|
| 194 |
+
process.exitCode = 1
|
| 195 |
+
}
|
| 196 |
+
}
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
// Checks the devEngines entry in the package.json at this.localPrefix
|
| 200 |
+
async checkDevEngines () {
|
| 201 |
+
const force = this.npm.flatOptions.force
|
| 202 |
+
|
| 203 |
+
const { devEngines } = await require('@npmcli/package-json')
|
| 204 |
+
.normalize(this.npm.config.localPrefix)
|
| 205 |
+
.then(p => p.content)
|
| 206 |
+
.catch(() => ({}))
|
| 207 |
+
|
| 208 |
+
if (typeof devEngines === 'undefined') {
|
| 209 |
+
return
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
const { checkDevEngines, currentEnv } = require('npm-install-checks')
|
| 213 |
+
const current = currentEnv.devEngines({
|
| 214 |
+
nodeVersion: this.npm.nodeVersion,
|
| 215 |
+
npmVersion: this.npm.version,
|
| 216 |
+
})
|
| 217 |
+
|
| 218 |
+
const failures = checkDevEngines(devEngines, current)
|
| 219 |
+
const warnings = failures.filter(f => f.isWarn)
|
| 220 |
+
const errors = failures.filter(f => f.isError)
|
| 221 |
+
|
| 222 |
+
const genMsg = (failure, i = 0) => {
|
| 223 |
+
return [...new Set([
|
| 224 |
+
// eslint-disable-next-line
|
| 225 |
+
i === 0 ? 'The developer of this package has specified the following through devEngines' : '',
|
| 226 |
+
`${failure.message}`,
|
| 227 |
+
`${failure.errors.map(e => e.message).join('\n')}`,
|
| 228 |
+
])].filter(v => v).join('\n')
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
[...warnings, ...(force ? errors : [])].forEach((failure, i) => {
|
| 232 |
+
const message = genMsg(failure, i)
|
| 233 |
+
log.warn('EBADDEVENGINES', message)
|
| 234 |
+
log.warn('EBADDEVENGINES', {
|
| 235 |
+
current: failure.current,
|
| 236 |
+
required: failure.required,
|
| 237 |
+
})
|
| 238 |
+
})
|
| 239 |
+
|
| 240 |
+
if (force) {
|
| 241 |
+
return
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
if (errors.length) {
|
| 245 |
+
const failure = errors[0]
|
| 246 |
+
const message = genMsg(failure)
|
| 247 |
+
throw Object.assign(new Error(message), {
|
| 248 |
+
engine: failure.engine,
|
| 249 |
+
code: 'EBADDEVENGINES',
|
| 250 |
+
current: failure.current,
|
| 251 |
+
required: failure.required,
|
| 252 |
+
})
|
| 253 |
+
}
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
async setWorkspaces () {
|
| 257 |
+
const { relative } = require('node:path')
|
| 258 |
+
|
| 259 |
+
const includeWorkspaceRoot = this.isArboristCmd
|
| 260 |
+
? false
|
| 261 |
+
: this.npm.config.get('include-workspace-root')
|
| 262 |
+
|
| 263 |
+
const prefixInsideCwd = relative(this.npm.localPrefix, process.cwd()).startsWith('..')
|
| 264 |
+
const relativeFrom = prefixInsideCwd ? this.npm.localPrefix : process.cwd()
|
| 265 |
+
|
| 266 |
+
const filters = this.npm.config.get('workspace')
|
| 267 |
+
const getWorkspaces = require('./utils/get-workspaces.js')
|
| 268 |
+
const ws = await getWorkspaces(filters, {
|
| 269 |
+
path: this.npm.localPrefix,
|
| 270 |
+
includeWorkspaceRoot,
|
| 271 |
+
relativeFrom,
|
| 272 |
+
})
|
| 273 |
+
|
| 274 |
+
this.workspaces = ws
|
| 275 |
+
this.workspaceNames = [...ws.keys()]
|
| 276 |
+
this.workspacePaths = [...ws.values()]
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
flags (depth = 1) {
|
| 280 |
+
const commandDefinitions = this.constructor.definitions || []
|
| 281 |
+
|
| 282 |
+
// Build types, shorthands, and defaults from definitions
|
| 283 |
+
const types = {}
|
| 284 |
+
const defaults = {}
|
| 285 |
+
const cmdShorthands = {}
|
| 286 |
+
const aliasMap = {} // Track which aliases map to which main keys
|
| 287 |
+
|
| 288 |
+
for (const def of commandDefinitions) {
|
| 289 |
+
defaults[def.key] = def.default
|
| 290 |
+
types[def.key] = def.type
|
| 291 |
+
|
| 292 |
+
// Handle aliases defined in the definition
|
| 293 |
+
if (def.alias && Array.isArray(def.alias)) {
|
| 294 |
+
for (const aliasKey of def.alias) {
|
| 295 |
+
types[aliasKey] = def.type // Needed for nopt to parse aliases
|
| 296 |
+
if (!aliasMap[def.key]) {
|
| 297 |
+
aliasMap[def.key] = []
|
| 298 |
+
}
|
| 299 |
+
aliasMap[def.key].push(aliasKey)
|
| 300 |
+
}
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
// Handle short options
|
| 304 |
+
if (def.short) {
|
| 305 |
+
const shorts = Array.isArray(def.short) ? def.short : [def.short]
|
| 306 |
+
for (const short of shorts) {
|
| 307 |
+
cmdShorthands[short] = [`--${def.key}`]
|
| 308 |
+
}
|
| 309 |
+
}
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
// Parse args
|
| 313 |
+
let parsed = {}
|
| 314 |
+
let remains = []
|
| 315 |
+
const argv = this.config.argv
|
| 316 |
+
if (argv && argv.length > 0) {
|
| 317 |
+
// config.argv contains the full command line including node, npm, and command names
|
| 318 |
+
// Format: ['node', 'npm', 'command', 'subcommand', 'positional', '--flags']
|
| 319 |
+
// depth tells us how many command names to skip (1 for top-level, 2 for subcommand, etc.)
|
| 320 |
+
const offset = 2 + depth // Skip 'node', 'npm', and all command/subcommand names
|
| 321 |
+
parsed = nopt(types, cmdShorthands, argv, offset)
|
| 322 |
+
remains = parsed.argv.remain
|
| 323 |
+
delete parsed.argv
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
// Validate flags - only if command has definitions (new system)
|
| 327 |
+
if (this.constructor.definitions && this.constructor.definitions.length > 0) {
|
| 328 |
+
this.#validateFlags(parsed, commandDefinitions, remains)
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
// Check for conflicts between main flags and their aliases
|
| 332 |
+
// Also map aliases back to their main keys
|
| 333 |
+
for (const [mainKey, aliases] of Object.entries(aliasMap)) {
|
| 334 |
+
const providedKeys = []
|
| 335 |
+
if (mainKey in parsed) {
|
| 336 |
+
providedKeys.push(mainKey)
|
| 337 |
+
}
|
| 338 |
+
for (const alias of aliases) {
|
| 339 |
+
if (alias in parsed) {
|
| 340 |
+
providedKeys.push(alias)
|
| 341 |
+
}
|
| 342 |
+
}
|
| 343 |
+
if (providedKeys.length > 1) {
|
| 344 |
+
const flagList = providedKeys.map(k => `--${k}`).join(' or ')
|
| 345 |
+
throw new Error(`Please provide only one of ${flagList}`)
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
// If an alias was provided, map it to the main key
|
| 349 |
+
if (providedKeys.length === 1 && providedKeys[0] !== mainKey) {
|
| 350 |
+
const aliasKey = providedKeys[0]
|
| 351 |
+
parsed[mainKey] = parsed[aliasKey]
|
| 352 |
+
delete parsed[aliasKey]
|
| 353 |
+
}
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
// Only include keys that are defined in commandDefinitions (main keys only)
|
| 357 |
+
const filtered = {}
|
| 358 |
+
for (const def of commandDefinitions) {
|
| 359 |
+
if (def.key in parsed) {
|
| 360 |
+
filtered[def.key] = parsed[def.key]
|
| 361 |
+
}
|
| 362 |
+
}
|
| 363 |
+
return [{ ...defaults, ...filtered }, remains]
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
// Validate flags and throw errors for unknown flags or unexpected positionals
|
| 367 |
+
#validateFlags (parsed, commandDefinitions, remains) {
|
| 368 |
+
// Build a set of all valid flag names (global + command-specific + shorthands)
|
| 369 |
+
const validFlags = new Set([
|
| 370 |
+
...Object.keys(definitions),
|
| 371 |
+
...commandDefinitions.map(d => d.key),
|
| 372 |
+
...Object.keys(shorthands), // Add global shorthands like 'verbose', 'dd', etc.
|
| 373 |
+
])
|
| 374 |
+
|
| 375 |
+
// Add aliases to valid flags
|
| 376 |
+
for (const def of commandDefinitions) {
|
| 377 |
+
if (def.alias && Array.isArray(def.alias)) {
|
| 378 |
+
for (const alias of def.alias) {
|
| 379 |
+
validFlags.add(alias)
|
| 380 |
+
}
|
| 381 |
+
}
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
// Check parsed flags against valid flags
|
| 385 |
+
const unknownFlags = []
|
| 386 |
+
for (const key of Object.keys(parsed)) {
|
| 387 |
+
if (!validFlags.has(key)) {
|
| 388 |
+
unknownFlags.push(key)
|
| 389 |
+
}
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
// Throw error if unknown flags were found
|
| 393 |
+
if (unknownFlags.length > 0) {
|
| 394 |
+
const flagList = unknownFlags.map(f => `--${f}`).join(', ')
|
| 395 |
+
throw this.usageError(`Unknown flag${unknownFlags.length > 1 ? 's' : ''}: ${flagList}`)
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
// Remove warnings for command-specific definitions that npm's global config doesn't know about (these were queued as "unknown" during config.load())
|
| 399 |
+
for (const def of commandDefinitions) {
|
| 400 |
+
this.npm.config.removeWarning(def.key)
|
| 401 |
+
if (def.alias && Array.isArray(def.alias)) {
|
| 402 |
+
for (const alias of def.alias) {
|
| 403 |
+
this.npm.config.removeWarning(alias)
|
| 404 |
+
}
|
| 405 |
+
}
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
// Remove warnings for unknown positionals that were actually consumed as flag values by command-specific definitions (e.g., --id <value> where --id is command-specific)
|
| 409 |
+
const remainsSet = new Set(remains)
|
| 410 |
+
for (const unknownPos of this.npm.config.getUnknownPositionals()) {
|
| 411 |
+
if (!remainsSet.has(unknownPos)) {
|
| 412 |
+
// This value was consumed as a flag value, not truly a positional
|
| 413 |
+
this.npm.config.removeUnknownPositional(unknownPos)
|
| 414 |
+
}
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
// Warn about extra positional arguments beyond what the command expects
|
| 418 |
+
const expectedPositionals = this.constructor.positionals
|
| 419 |
+
if (expectedPositionals !== null && remains.length > expectedPositionals) {
|
| 420 |
+
const extraPositionals = remains.slice(expectedPositionals)
|
| 421 |
+
for (const extra of extraPositionals) {
|
| 422 |
+
throw new Error(`Unknown positional argument: ${extra}`)
|
| 423 |
+
}
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
this.npm.config.logWarnings()
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
async exec () {
|
| 430 |
+
// This method should be overridden by commands
|
| 431 |
+
// Subcommand routing is handled in npm.js #exec
|
| 432 |
+
}
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
module.exports = BaseCommand
|
node24/node_modules/npm/lib/cli.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
try {
|
| 2 |
+
const { enableCompileCache } = require('node:module')
|
| 3 |
+
/* istanbul ignore next */
|
| 4 |
+
if (enableCompileCache) {
|
| 5 |
+
enableCompileCache()
|
| 6 |
+
}
|
| 7 |
+
} catch (e) { /* istanbul ignore next */ }
|
| 8 |
+
|
| 9 |
+
const validateEngines = require('./cli/validate-engines.js')
|
| 10 |
+
const cliEntry = require('node:path').resolve(__dirname, 'cli/entry.js')
|
| 11 |
+
|
| 12 |
+
module.exports = (process) => validateEngines(process, () => require(cliEntry))
|
node24/node_modules/npm/lib/lifecycle-cmd.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const BaseCommand = require('./base-cmd.js')
|
| 2 |
+
|
| 3 |
+
// The implementation of commands that are just "run a script"
|
| 4 |
+
// e.g. restart, start, stop, test
|
| 5 |
+
class LifecycleCmd extends BaseCommand {
|
| 6 |
+
static usage = ['[-- <args>]']
|
| 7 |
+
static isShellout = true
|
| 8 |
+
static workspaces = true
|
| 9 |
+
static ignoreImplicitWorkspace = false
|
| 10 |
+
|
| 11 |
+
async exec (args) {
|
| 12 |
+
return this.npm.exec('run', [this.constructor.name, ...args])
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
async execWorkspaces (args) {
|
| 16 |
+
return this.npm.exec('run', [this.constructor.name, ...args])
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
module.exports = LifecycleCmd
|
node24/node_modules/npm/lib/npm.js
ADDED
|
@@ -0,0 +1,525 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { resolve, dirname, join } = require('node:path')
|
| 2 |
+
const Config = require('@npmcli/config')
|
| 3 |
+
const which = require('which')
|
| 4 |
+
const fs = require('node:fs/promises')
|
| 5 |
+
const { definitions, flatten, nerfDarts, shorthands } = require('@npmcli/config/lib/definitions')
|
| 6 |
+
const usage = require('./utils/npm-usage.js')
|
| 7 |
+
const LogFile = require('./utils/log-file.js')
|
| 8 |
+
const Timers = require('./utils/timers.js')
|
| 9 |
+
const Display = require('./utils/display.js')
|
| 10 |
+
const { log, time, output, META } = require('proc-log')
|
| 11 |
+
const { redactLog: replaceInfo } = require('@npmcli/redact')
|
| 12 |
+
const pkg = require('../package.json')
|
| 13 |
+
const { deref } = require('./utils/cmd-list.js')
|
| 14 |
+
const { jsonError, outputError } = require('./utils/output-error.js')
|
| 15 |
+
|
| 16 |
+
class Npm {
|
| 17 |
+
static get version () {
|
| 18 |
+
return pkg.version
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
static cmd (c) {
|
| 22 |
+
const command = deref(c)
|
| 23 |
+
if (!command) {
|
| 24 |
+
throw Object.assign(new Error(`Unknown command ${c}`), {
|
| 25 |
+
code: 'EUNKNOWNCOMMAND',
|
| 26 |
+
command: c,
|
| 27 |
+
})
|
| 28 |
+
}
|
| 29 |
+
return require(`./commands/${command}`)
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
unrefPromises = []
|
| 33 |
+
updateNotification = null
|
| 34 |
+
argv = []
|
| 35 |
+
|
| 36 |
+
#command = null
|
| 37 |
+
#runId = new Date().toISOString().replace(/[.:]/g, '_')
|
| 38 |
+
#title = 'npm'
|
| 39 |
+
#argvClean = []
|
| 40 |
+
#npmRoot = null
|
| 41 |
+
|
| 42 |
+
#display = null
|
| 43 |
+
#logFile = new LogFile()
|
| 44 |
+
#timers = new Timers()
|
| 45 |
+
|
| 46 |
+
// All these options are only used by tests in order to make testing more closely resemble real world usage.
|
| 47 |
+
// For now, npm has no programmatic API so it is ok to add stuff here, but we should not rely on it more than necessary.
|
| 48 |
+
// XXX: make these options not necessary by refactoring @npmcli/config
|
| 49 |
+
// - npmRoot: this is where npm looks for docs files and the builtin config
|
| 50 |
+
// - argv: this allows tests to extend argv in the same way the argv would be passed in via a CLI arg.
|
| 51 |
+
// - excludeNpmCwd: this is a hack to get @npmcli/config to stop walking up dirs to set a local prefix when it encounters the `npmRoot`.
|
| 52 |
+
// this allows tests created by tap inside this repo to not set the local prefix to `npmRoot` since that is the first dir it would encounter when doing implicit detection
|
| 53 |
+
constructor ({
|
| 54 |
+
stdout = process.stdout,
|
| 55 |
+
stderr = process.stderr,
|
| 56 |
+
npmRoot = dirname(__dirname),
|
| 57 |
+
argv = [],
|
| 58 |
+
excludeNpmCwd = false,
|
| 59 |
+
} = {}) {
|
| 60 |
+
this.#display = new Display({ stdout, stderr })
|
| 61 |
+
this.#npmRoot = npmRoot
|
| 62 |
+
this.config = new Config({
|
| 63 |
+
npmPath: this.#npmRoot,
|
| 64 |
+
definitions,
|
| 65 |
+
flatten,
|
| 66 |
+
nerfDarts,
|
| 67 |
+
shorthands,
|
| 68 |
+
argv: [...process.argv, ...argv],
|
| 69 |
+
excludeNpmCwd,
|
| 70 |
+
warn: false,
|
| 71 |
+
})
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
async load () {
|
| 75 |
+
let err
|
| 76 |
+
try {
|
| 77 |
+
return await time.start('npm:load', () => this.#load())
|
| 78 |
+
} catch (e) {
|
| 79 |
+
err = e
|
| 80 |
+
}
|
| 81 |
+
return this.#handleError(err)
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
async #load () {
|
| 85 |
+
await time.start('npm:load:whichnode', async () => {
|
| 86 |
+
// TODO should we throw here?
|
| 87 |
+
const node = await which(process.argv[0]).catch(() => {})
|
| 88 |
+
if (node && node.toUpperCase() !== process.execPath.toUpperCase()) {
|
| 89 |
+
log.verbose('node symlink', node)
|
| 90 |
+
process.execPath = node
|
| 91 |
+
this.config.execPath = node
|
| 92 |
+
}
|
| 93 |
+
})
|
| 94 |
+
|
| 95 |
+
await time.start('npm:load:configload', () => this.config.load())
|
| 96 |
+
|
| 97 |
+
// npm --versions
|
| 98 |
+
if (this.config.get('versions', 'cli')) {
|
| 99 |
+
this.argv = ['version']
|
| 100 |
+
this.config.set('usage', false, 'cli')
|
| 101 |
+
} else {
|
| 102 |
+
this.argv = [...this.config.parsedArgv.remain]
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
// Remove first argv since that is our command as typed
|
| 106 |
+
// Note that this might not be the actual name of the command due to aliases, etc.
|
| 107 |
+
// But we use the raw form of it later in user output so it must be preserved as is.
|
| 108 |
+
const commandArg = this.argv.shift()
|
| 109 |
+
|
| 110 |
+
// This is the actual name of the command that will be run or undefined if deref could not find a match
|
| 111 |
+
const command = deref(commandArg)
|
| 112 |
+
|
| 113 |
+
await this.#display.load({
|
| 114 |
+
command,
|
| 115 |
+
loglevel: this.config.get('loglevel'),
|
| 116 |
+
stdoutColor: this.color,
|
| 117 |
+
stderrColor: this.logColor,
|
| 118 |
+
timing: this.config.get('timing'),
|
| 119 |
+
unicode: this.config.get('unicode'),
|
| 120 |
+
progress: this.flatOptions.progress,
|
| 121 |
+
json: this.config.get('json'),
|
| 122 |
+
heading: this.config.get('heading'),
|
| 123 |
+
})
|
| 124 |
+
process.env.COLOR = this.color ? '1' : '0'
|
| 125 |
+
|
| 126 |
+
// npm -v
|
| 127 |
+
// return from here early so we don't create any caches/logfiles/timers etc
|
| 128 |
+
if (this.config.get('version', 'cli')) {
|
| 129 |
+
output.standard(this.version)
|
| 130 |
+
return { exec: false }
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
// mkdir this separately since the logs dir can be set to a different location.
|
| 134 |
+
// if this fails, then we don't have a cache dir, but we don't want to fail immediately since the command might not need a cache dir (like `npm --version`)
|
| 135 |
+
await time.start('npm:load:mkdirpcache', () =>
|
| 136 |
+
fs.mkdir(this.cache, { recursive: true })
|
| 137 |
+
.catch((e) => log.verbose('cache', `could not create cache: ${e}`)))
|
| 138 |
+
|
| 139 |
+
// it's ok if this fails. user might have specified an invalid dir which we will tell them about at the end
|
| 140 |
+
if (this.config.get('logs-max') > 0) {
|
| 141 |
+
await time.start('npm:load:mkdirplogs', () =>
|
| 142 |
+
fs.mkdir(this.#logsDir, { recursive: true })
|
| 143 |
+
.catch((e) => log.verbose('logfile', `could not create logs-dir: ${e}`)))
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
// note: this MUST be shorter than the actual argv length, because it uses the same memory, so node will truncate it if it's too long.
|
| 147 |
+
// We time this because setting process.title is slow sometimes but we have to do it for security reasons. But still helpful to know how slow it is.
|
| 148 |
+
time.start('npm:load:setTitle', () => {
|
| 149 |
+
const { parsedArgv: { cooked, remain } } = this.config
|
| 150 |
+
// Secrets are mostly in configs, so title is set using only the positional args to keep those from being leaked.
|
| 151 |
+
// We still do a best effort replaceInfo.
|
| 152 |
+
this.#title = ['npm'].concat(replaceInfo(remain)).join(' ').trim()
|
| 153 |
+
process.title = this.#title
|
| 154 |
+
// The cooked argv is also logged separately for debugging purposes.
|
| 155 |
+
// It is cleaned as a best effort by replacing known secrets like basic auth password and strings that look like npm tokens.
|
| 156 |
+
// XXX: for this to be safer the config should create a sanitized version of the argv as it has the full context of what each option contains.
|
| 157 |
+
this.#argvClean = replaceInfo(cooked)
|
| 158 |
+
log.verbose('title', this.title)
|
| 159 |
+
log.verbose('argv', this.#argvClean.map(JSON.stringify).join(' '))
|
| 160 |
+
})
|
| 161 |
+
|
| 162 |
+
// logFile.load returns a promise that resolves when old logs are done being cleaned.
|
| 163 |
+
// We save this promise to an array so that we can await it in tests to ensure more deterministic logging behavior.
|
| 164 |
+
// The process will also hang open if this were to take a long time to resolve, but that is why process.exit is called explicitly in the exit-handler.
|
| 165 |
+
this.unrefPromises.push(this.#logFile.load({
|
| 166 |
+
command,
|
| 167 |
+
path: this.logPath,
|
| 168 |
+
logsMax: this.config.get('logs-max'),
|
| 169 |
+
timing: this.config.get('timing'),
|
| 170 |
+
}))
|
| 171 |
+
|
| 172 |
+
this.#timers.load({
|
| 173 |
+
path: this.logPath,
|
| 174 |
+
timing: this.config.get('timing'),
|
| 175 |
+
})
|
| 176 |
+
|
| 177 |
+
const configScope = this.config.get('scope')
|
| 178 |
+
if (configScope && !/^@/.test(configScope)) {
|
| 179 |
+
this.config.set('scope', `@${configScope}`, this.config.find('scope'))
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
if (this.config.get('force')) {
|
| 183 |
+
log.warn('using --force', 'Recommended protections disabled.')
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
return { exec: true, command: commandArg, args: this.argv }
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
async exec (cmd, args = this.argv) {
|
| 190 |
+
if (!this.#command) {
|
| 191 |
+
let err
|
| 192 |
+
try {
|
| 193 |
+
await this.#exec(cmd, args)
|
| 194 |
+
} catch (e) {
|
| 195 |
+
err = e
|
| 196 |
+
}
|
| 197 |
+
return this.#handleError(err)
|
| 198 |
+
} else {
|
| 199 |
+
return this.#exec(cmd, args)
|
| 200 |
+
}
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
// Call an npm command
|
| 204 |
+
async #exec (cmd, args) {
|
| 205 |
+
const Command = this.constructor.cmd(cmd)
|
| 206 |
+
const command = new Command(this)
|
| 207 |
+
|
| 208 |
+
// since 'test', 'start', 'stop', etc. commands re-enter this function to call the run command, we need to only set it one time.
|
| 209 |
+
if (!this.#command) {
|
| 210 |
+
this.#command = command
|
| 211 |
+
process.env.npm_command = this.command
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
// Only log warnings for legacy commands without definitions or subcommands
|
| 215 |
+
// Commands with definitions will handle warnings in base-cmd flags()
|
| 216 |
+
// Commands with subcommands will delegate to the subcommand to handle warnings
|
| 217 |
+
if (!Command.definitions && !Command.subcommands) {
|
| 218 |
+
this.config.logWarnings()
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
// this needs to be rest after because some commands run this.npm.config.checkUnknown('publishConfig', key)
|
| 222 |
+
this.config.warn = true
|
| 223 |
+
|
| 224 |
+
return this.execCommandClass(command, args, [cmd])
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
// Unified command execution for both top-level commands and subcommands
|
| 228 |
+
// Supports n-depth subcommands, workspaces, and definitions
|
| 229 |
+
async execCommandClass (commandInstance, args, commandPath = []) {
|
| 230 |
+
const Command = commandInstance.constructor
|
| 231 |
+
const commandName = commandPath.join(':')
|
| 232 |
+
|
| 233 |
+
// Handle subcommands if present
|
| 234 |
+
if (Command.subcommands) {
|
| 235 |
+
const subcommandName = args[0]
|
| 236 |
+
|
| 237 |
+
// If help is requested without a subcommand, show main command help
|
| 238 |
+
if (this.config.get('usage') && !subcommandName) {
|
| 239 |
+
return output.standard(commandInstance.usage)
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
// If no subcommand provided, show usage error
|
| 243 |
+
if (!subcommandName) {
|
| 244 |
+
throw commandInstance.usageError()
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
// Check if the subcommand exists
|
| 248 |
+
const SubCommand = Command.subcommands[subcommandName]
|
| 249 |
+
if (!SubCommand) {
|
| 250 |
+
throw commandInstance.usageError(`Unknown subcommand: ${subcommandName}`)
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
// Check if help is requested for the subcommand
|
| 254 |
+
if (this.config.get('usage')) {
|
| 255 |
+
const parentName = commandPath[0]
|
| 256 |
+
return output.standard(SubCommand.getUsage(parentName))
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
// Create subcommand instance and recurse
|
| 260 |
+
const subcommandInstance = new SubCommand(this)
|
| 261 |
+
const subcommandArgs = args.slice(1) // Remove subcommand name from args
|
| 262 |
+
const subcommandPath = [...commandPath, subcommandName]
|
| 263 |
+
|
| 264 |
+
return time.start(`command:${subcommandPath.join(':')}`, () =>
|
| 265 |
+
this.execCommandClass(subcommandInstance, subcommandArgs, subcommandPath))
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
// No subcommands - execute this command
|
| 269 |
+
if (this.config.get('usage')) {
|
| 270 |
+
return output.standard(commandInstance.usage)
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
let execWorkspaces = false
|
| 274 |
+
const hasWsConfig = this.config.get('workspaces') || this.config.get('workspace').length
|
| 275 |
+
// if cwd is a workspace, the default is set to [that workspace]
|
| 276 |
+
const implicitWs = this.config.get('workspace', 'default').length
|
| 277 |
+
// (-ws || -w foo) && (cwd is not a workspace || command is not ignoring implicit workspaces)
|
| 278 |
+
if (hasWsConfig && (!implicitWs || !Command.ignoreImplicitWorkspace)) {
|
| 279 |
+
if (this.global) {
|
| 280 |
+
throw new Error('Workspaces not supported for global packages')
|
| 281 |
+
}
|
| 282 |
+
if (!Command.workspaces) {
|
| 283 |
+
throw Object.assign(new Error('This command does not support workspaces.'), {
|
| 284 |
+
code: 'ENOWORKSPACES',
|
| 285 |
+
})
|
| 286 |
+
}
|
| 287 |
+
execWorkspaces = true
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
// Check dev engines if needed
|
| 291 |
+
if (commandInstance.checkDevEngines && !this.global) {
|
| 292 |
+
await commandInstance.checkDevEngines()
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
// Execute command with or without definitions
|
| 296 |
+
if (Command.definitions) {
|
| 297 |
+
// config.argv contains the full argv with flags (set by Config in production, by MockNpm in tests)
|
| 298 |
+
// Pass depth so flags() knows how many command names to skip
|
| 299 |
+
const [flags, positionalArgs] = commandInstance.flags(commandPath.length)
|
| 300 |
+
return time.start(`command:${commandName}`, () =>
|
| 301 |
+
execWorkspaces
|
| 302 |
+
? commandInstance.execWorkspaces(positionalArgs, flags)
|
| 303 |
+
: commandInstance.exec(positionalArgs, flags))
|
| 304 |
+
} else {
|
| 305 |
+
// Legacy commands without definitions
|
| 306 |
+
this.config.logWarnings()
|
| 307 |
+
return time.start(`command:${commandName}`, () =>
|
| 308 |
+
execWorkspaces ? commandInstance.execWorkspaces(args) : commandInstance.exec(args))
|
| 309 |
+
}
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
// This gets called at the end of the exit handler and during any tests to cleanup all of our listeners
|
| 313 |
+
// Everything in here should be synchronous
|
| 314 |
+
unload () {
|
| 315 |
+
this.#timers.off()
|
| 316 |
+
this.#display.off()
|
| 317 |
+
this.#logFile.off()
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
finish (err) {
|
| 321 |
+
// Finish all our timer work, this will write the file if requested, end timers, etc
|
| 322 |
+
this.#timers.finish({
|
| 323 |
+
id: this.#runId,
|
| 324 |
+
command: this.#argvClean,
|
| 325 |
+
logfiles: this.logFiles,
|
| 326 |
+
version: this.version,
|
| 327 |
+
})
|
| 328 |
+
|
| 329 |
+
output.flush({
|
| 330 |
+
[META]: true,
|
| 331 |
+
// json can be set during a command so we send the final value of it to the display layer here
|
| 332 |
+
json: this.loaded && this.config.get('json'),
|
| 333 |
+
jsonError: jsonError(err, this),
|
| 334 |
+
})
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
exitErrorMessage () {
|
| 338 |
+
if (this.logFiles.length) {
|
| 339 |
+
return `A complete log of this run can be found in: ${this.logFiles}`
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
const logsMax = this.config.get('logs-max')
|
| 343 |
+
if (logsMax <= 0) {
|
| 344 |
+
// user specified no log file
|
| 345 |
+
return `Log files were not written due to the config logs-max=${logsMax}`
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
// could be an error writing to the directory
|
| 349 |
+
return `Log files were not written due to an error writing to the directory: ${this.#logsDir}` +
|
| 350 |
+
'\nYou can rerun the command with `--loglevel=verbose` to see the logs in your terminal'
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
async #handleError (err) {
|
| 354 |
+
if (err) {
|
| 355 |
+
// Get the local package if it exists for a more helpful error message
|
| 356 |
+
const localPkg = await require('@npmcli/package-json')
|
| 357 |
+
.normalize(this.localPrefix)
|
| 358 |
+
.then(p => p.content)
|
| 359 |
+
.catch(() => null)
|
| 360 |
+
Object.assign(err, this.#getError(err, { pkg: localPkg }))
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
this.finish(err)
|
| 364 |
+
|
| 365 |
+
if (err) {
|
| 366 |
+
throw err
|
| 367 |
+
}
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
#getError (rawErr, opts) {
|
| 371 |
+
const { files = [], ...error } = require('./utils/error-message.js').getError(rawErr, {
|
| 372 |
+
npm: this,
|
| 373 |
+
command: this.#command,
|
| 374 |
+
...opts,
|
| 375 |
+
})
|
| 376 |
+
|
| 377 |
+
const { writeFileSync } = require('node:fs')
|
| 378 |
+
for (const [file, content] of files) {
|
| 379 |
+
const filePath = `${this.logPath}${file}`
|
| 380 |
+
const fileContent = `'Log files:\n${this.logFiles.join('\n')}\n\n${content.trim()}\n`
|
| 381 |
+
try {
|
| 382 |
+
writeFileSync(filePath, fileContent)
|
| 383 |
+
error.detail.push(['', `\n\nFor a full report see:\n${filePath}`])
|
| 384 |
+
} catch (fileErr) {
|
| 385 |
+
log.warn('', `Could not write error message to ${file} due to ${fileErr}`)
|
| 386 |
+
}
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
outputError(error)
|
| 390 |
+
|
| 391 |
+
return error
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
get title () {
|
| 395 |
+
return this.#title
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
get loaded () {
|
| 399 |
+
return this.config.loaded
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
get version () {
|
| 403 |
+
return this.constructor.version
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
get command () {
|
| 407 |
+
return this.#command?.name
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
get flatOptions () {
|
| 411 |
+
const { flat } = this.config
|
| 412 |
+
flat.nodeVersion = process.version
|
| 413 |
+
flat.npmVersion = pkg.version
|
| 414 |
+
if (this.command) {
|
| 415 |
+
flat.npmCommand = this.command
|
| 416 |
+
}
|
| 417 |
+
return flat
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
// color and logColor are a special derived values that takes into consideration not only the config, but whether or not we are operating in a tty with the associated output (stdout/stderr)
|
| 421 |
+
get color () {
|
| 422 |
+
return this.flatOptions.color
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
get logColor () {
|
| 426 |
+
return this.flatOptions.logColor
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
get noColorChalk () {
|
| 430 |
+
return this.#display.chalk.noColor
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
get chalk () {
|
| 434 |
+
return this.#display.chalk.stdout
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
get logChalk () {
|
| 438 |
+
return this.#display.chalk.stderr
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
get global () {
|
| 442 |
+
return this.config.get('global') || this.config.get('location') === 'global'
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
get silent () {
|
| 446 |
+
return this.flatOptions.silent
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
get lockfileVersion () {
|
| 450 |
+
return 2
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
get started () {
|
| 454 |
+
return this.#timers.started
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
get logFiles () {
|
| 458 |
+
return this.#logFile.files
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
get #logsDir () {
|
| 462 |
+
return this.config.get('logs-dir') || join(this.cache, '_logs')
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
get logPath () {
|
| 466 |
+
return resolve(this.#logsDir, `${this.#runId}-`)
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
get npmRoot () {
|
| 470 |
+
return this.#npmRoot
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
get cache () {
|
| 474 |
+
return this.config.get('cache')
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
get globalPrefix () {
|
| 478 |
+
return this.config.globalPrefix
|
| 479 |
+
}
|
| 480 |
+
|
| 481 |
+
get localPrefix () {
|
| 482 |
+
return this.config.localPrefix
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
get localPackage () {
|
| 486 |
+
return this.config.localPackage
|
| 487 |
+
}
|
| 488 |
+
|
| 489 |
+
get globalDir () {
|
| 490 |
+
return process.platform !== 'win32'
|
| 491 |
+
? resolve(this.globalPrefix, 'lib', 'node_modules')
|
| 492 |
+
: resolve(this.globalPrefix, 'node_modules')
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
get localDir () {
|
| 496 |
+
return resolve(this.localPrefix, 'node_modules')
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
get dir () {
|
| 500 |
+
return this.global ? this.globalDir : this.localDir
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
get globalBin () {
|
| 504 |
+
const b = this.globalPrefix
|
| 505 |
+
return process.platform !== 'win32' ? resolve(b, 'bin') : b
|
| 506 |
+
}
|
| 507 |
+
|
| 508 |
+
get localBin () {
|
| 509 |
+
return resolve(this.dir, '.bin')
|
| 510 |
+
}
|
| 511 |
+
|
| 512 |
+
get bin () {
|
| 513 |
+
return this.global ? this.globalBin : this.localBin
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
get prefix () {
|
| 517 |
+
return this.global ? this.globalPrefix : this.localPrefix
|
| 518 |
+
}
|
| 519 |
+
|
| 520 |
+
get usage () {
|
| 521 |
+
return usage(this)
|
| 522 |
+
}
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
module.exports = Npm
|
node24/node_modules/npm/lib/package-url-cmd.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const pacote = require('pacote')
|
| 2 |
+
const { openUrl } = require('./utils/open-url.js')
|
| 3 |
+
const { log } = require('proc-log')
|
| 4 |
+
const BaseCommand = require('./base-cmd.js')
|
| 5 |
+
|
| 6 |
+
// Base command for opening urls from a package manifest (bugs, docs, repo)
|
| 7 |
+
class PackageUrlCommand extends BaseCommand {
|
| 8 |
+
static params = [
|
| 9 |
+
'browser',
|
| 10 |
+
'registry',
|
| 11 |
+
'workspace',
|
| 12 |
+
'workspaces',
|
| 13 |
+
'include-workspace-root',
|
| 14 |
+
]
|
| 15 |
+
|
| 16 |
+
static workspaces = true
|
| 17 |
+
static ignoreImplicitWorkspace = false
|
| 18 |
+
static usage = ['[<pkgname> [<pkgname> ...]]']
|
| 19 |
+
|
| 20 |
+
async exec (args) {
|
| 21 |
+
if (!args || !args.length) {
|
| 22 |
+
args = ['.']
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
for (const arg of args) {
|
| 26 |
+
// XXX It is very odd that `where` is how pacote knows to look anywhere other than the cwd.
|
| 27 |
+
const opts = {
|
| 28 |
+
...this.npm.flatOptions,
|
| 29 |
+
where: this.npm.localPrefix,
|
| 30 |
+
fullMetadata: true,
|
| 31 |
+
_isRoot: true,
|
| 32 |
+
}
|
| 33 |
+
const mani = await pacote.manifest(arg, opts)
|
| 34 |
+
const url = this.getUrl(arg, mani)
|
| 35 |
+
log.silly(this.name, 'url', url)
|
| 36 |
+
await openUrl(this.npm, url, `${mani.name} ${this.name} available at the following URL`)
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
async execWorkspaces (args) {
|
| 41 |
+
if (args && args.length) {
|
| 42 |
+
return this.exec(args)
|
| 43 |
+
}
|
| 44 |
+
await this.setWorkspaces()
|
| 45 |
+
return this.exec(this.workspacePaths)
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
// given a manifest, try to get the hosted git info from it based on repository (if a string) or repository.url (if an object)
|
| 49 |
+
// returns null if it's not a valid repo, or not a known hosted repo
|
| 50 |
+
hostedFromMani (mani) {
|
| 51 |
+
const hostedGitInfo = require('hosted-git-info')
|
| 52 |
+
const r = mani.repository
|
| 53 |
+
const rurl = !r ? null
|
| 54 |
+
: typeof r === 'string' ? r
|
| 55 |
+
: typeof r === 'object' && typeof r.url === 'string' ? r.url
|
| 56 |
+
: null
|
| 57 |
+
|
| 58 |
+
// hgi returns undefined sometimes, but let's always return null here
|
| 59 |
+
return (rurl && hostedGitInfo.fromUrl(rurl.replace(/^git\+/, ''))) || null
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
module.exports = PackageUrlCommand
|
node24/node_modules/npm/lib/trust-cmd.js
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const BaseCommand = require('./base-cmd.js')
|
| 2 |
+
const { otplease } = require('./utils/auth.js')
|
| 3 |
+
const npmFetch = require('npm-registry-fetch')
|
| 4 |
+
const npa = require('npm-package-arg')
|
| 5 |
+
const { read: _read } = require('read')
|
| 6 |
+
const { input, output, log, META } = require('proc-log')
|
| 7 |
+
const gitinfo = require('hosted-git-info')
|
| 8 |
+
const pkgJson = require('@npmcli/package-json')
|
| 9 |
+
|
| 10 |
+
const NPM_FRONTEND = 'https://www.npmjs.com'
|
| 11 |
+
|
| 12 |
+
class TrustCommand extends BaseCommand {
|
| 13 |
+
// Helper to format template strings with color
|
| 14 |
+
// Blue text with reset color for interpolated values
|
| 15 |
+
warnString (strings, ...values) {
|
| 16 |
+
const chalk = this.npm.chalk
|
| 17 |
+
const message = strings.reduce((result, str, i) => {
|
| 18 |
+
return result + chalk.blue(str) + (values[i] ? chalk.reset(values[i]) : '')
|
| 19 |
+
}, '')
|
| 20 |
+
return message
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
// Log a warning message with blue formatting
|
| 24 |
+
warn (strings, ...values) {
|
| 25 |
+
log.warn('trust', this.warnString(strings, ...values))
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
// dialogue is non-log text that is different from our usual npm prefix logging
|
| 29 |
+
// it should always show to the user unless --json is specified
|
| 30 |
+
// it's not controled by log levels
|
| 31 |
+
dialogue (strings, ...values) {
|
| 32 |
+
const json = this.config.get('json')
|
| 33 |
+
if (!json) {
|
| 34 |
+
output.standard(this.warnString(strings, ...values))
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
createConfig (pkg, body) {
|
| 39 |
+
const spec = npa(pkg)
|
| 40 |
+
const uri = `/-/package/${spec.escapedName}/trust`
|
| 41 |
+
return otplease(this.npm, this.npm.flatOptions, opts => npmFetch(uri, {
|
| 42 |
+
...opts,
|
| 43 |
+
method: 'POST',
|
| 44 |
+
body: body,
|
| 45 |
+
}))
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
logOptions (options, pad = true) {
|
| 49 |
+
const { values, warnings, fromPackageJson, urls } = { warnings: [], ...options }
|
| 50 |
+
if (warnings && warnings.length > 0) {
|
| 51 |
+
for (const warningMsg of warnings) {
|
| 52 |
+
log.warn('trust', warningMsg)
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
const json = this.config.get('json')
|
| 57 |
+
if (json) {
|
| 58 |
+
// Disable redaction: trust config values (e.g. CircleCI UUIDs) are not secrets
|
| 59 |
+
output.standard(JSON.stringify(options.values, null, 2), { [META]: true, redact: false })
|
| 60 |
+
return
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
const chalk = this.npm.chalk
|
| 64 |
+
const { type, id, ...rest } = values || {}
|
| 65 |
+
|
| 66 |
+
if (values) {
|
| 67 |
+
const lines = []
|
| 68 |
+
if (type) {
|
| 69 |
+
lines.push(`type: ${chalk.green(type)}`)
|
| 70 |
+
}
|
| 71 |
+
if (id) {
|
| 72 |
+
lines.push(`id: ${chalk.green(id)}`)
|
| 73 |
+
}
|
| 74 |
+
for (const [key, value] of Object.entries(rest)) {
|
| 75 |
+
if (value !== null && value !== undefined) {
|
| 76 |
+
const parts = [
|
| 77 |
+
`${chalk.reset(key)}: ${chalk.green(value)}`,
|
| 78 |
+
]
|
| 79 |
+
if (fromPackageJson && fromPackageJson[key]) {
|
| 80 |
+
parts.push(`(${chalk.yellow(`from package.json`)})`)
|
| 81 |
+
}
|
| 82 |
+
lines.push(parts.join(' '))
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
if (pad) {
|
| 86 |
+
output.standard()
|
| 87 |
+
}
|
| 88 |
+
output.standard(lines.join('\n'), { [META]: true, redact: false })
|
| 89 |
+
// Print URLs on their own lines after config, following the same order as rest keys
|
| 90 |
+
if (urls) {
|
| 91 |
+
const urlLines = []
|
| 92 |
+
for (const key of Object.keys(rest)) {
|
| 93 |
+
if (urls[key]) {
|
| 94 |
+
urlLines.push(chalk.blue(urls[key]))
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
if (urlLines.length > 0) {
|
| 98 |
+
output.standard()
|
| 99 |
+
output.standard(urlLines.join('\n'), { [META]: true, redact: false })
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
if (pad) {
|
| 103 |
+
output.standard()
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
async confirmOperation (yes) {
|
| 109 |
+
// Ask for confirmation unless --yes flag is set
|
| 110 |
+
if (yes === true) {
|
| 111 |
+
return
|
| 112 |
+
}
|
| 113 |
+
if (yes === false) {
|
| 114 |
+
throw new Error('User cancelled operation')
|
| 115 |
+
}
|
| 116 |
+
const confirm = await input.read(
|
| 117 |
+
() => _read({ prompt: 'Do you want to proceed? (y/N) ', default: 'n' })
|
| 118 |
+
)
|
| 119 |
+
const normalized = confirm.toLowerCase()
|
| 120 |
+
if (['y', 'yes'].includes(normalized)) {
|
| 121 |
+
return
|
| 122 |
+
}
|
| 123 |
+
throw new Error('User cancelled operation')
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
getFrontendUrl ({ pkgName }) {
|
| 127 |
+
if (this.registryIsDefault) {
|
| 128 |
+
return new URL(`/package/${pkgName}`, NPM_FRONTEND).toString()
|
| 129 |
+
}
|
| 130 |
+
return null
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
getRepositoryFromPackageJson (pkg) {
|
| 134 |
+
const info = gitinfo.fromUrl(pkg.repository?.url || pkg?.repository)
|
| 135 |
+
if (!info) {
|
| 136 |
+
return null
|
| 137 |
+
}
|
| 138 |
+
const repository = info.user + '/' + info.project
|
| 139 |
+
const type = info.type
|
| 140 |
+
return { repository, type }
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
async optionalPkgJson () {
|
| 144 |
+
try {
|
| 145 |
+
const { content } = await pkgJson.normalize(this.npm.prefix)
|
| 146 |
+
return content
|
| 147 |
+
} catch (err) {
|
| 148 |
+
return {}
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
get registryIsDefault () {
|
| 153 |
+
return this.npm.config.defaults.registry === this.npm.config.get('registry')
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
// generic
|
| 157 |
+
static bodyToOptions (body) {
|
| 158 |
+
return {
|
| 159 |
+
...(body.id) && { id: body.id },
|
| 160 |
+
...(body.type) && { type: body.type },
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
async createConfigCommand ({ positionalArgs, flags }) {
|
| 165 |
+
const { providerName, providerEntity, providerHostname } = this.constructor
|
| 166 |
+
const dryRun = this.config.get('dry-run')
|
| 167 |
+
const yes = this.config.get('yes') // deep-lore this allows for --no-yes
|
| 168 |
+
const options = await this.flagsToOptions({ positionalArgs, flags, providerHostname })
|
| 169 |
+
this.dialogue`Establishing trust between ${options.values.package} package and ${providerName}`
|
| 170 |
+
this.dialogue`Anyone with ${providerEntity} write access can publish to ${options.values.package}`
|
| 171 |
+
this.dialogue`Two-factor authentication is required for this operation`
|
| 172 |
+
if (!this.registryIsDefault) {
|
| 173 |
+
this.warn`Registry ${this.npm.config.get('registry')} may not support trusted publishing`
|
| 174 |
+
}
|
| 175 |
+
this.logOptions(options)
|
| 176 |
+
if (dryRun) {
|
| 177 |
+
return
|
| 178 |
+
}
|
| 179 |
+
await this.confirmOperation(yes)
|
| 180 |
+
const trustConfig = this.constructor.optionsToBody(options.values)
|
| 181 |
+
const response = await this.createConfig(options.values.package, [trustConfig])
|
| 182 |
+
const body = await response.json()
|
| 183 |
+
this.dialogue`Trust configuration created successfully for ${options.values.package} with the following settings:`
|
| 184 |
+
this.displayResponseBody({ body, packageName: options.values.package })
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
async flagsToOptions ({ positionalArgs, flags, providerHostname }) {
|
| 188 |
+
const { entityKey, name, providerEntity, providerFile } = this.constructor
|
| 189 |
+
const content = await this.optionalPkgJson()
|
| 190 |
+
const pkgPositional = positionalArgs[0]
|
| 191 |
+
const pkgJsonName = content.name
|
| 192 |
+
const git = this.getRepositoryFromPackageJson(content)
|
| 193 |
+
// the provided positional matches package.json name or no positional provided
|
| 194 |
+
const matchPkg = (!pkgPositional || pkgPositional === pkgJsonName)
|
| 195 |
+
const pkgName = pkgPositional || pkgJsonName
|
| 196 |
+
const usedPkgNameFromPkgJson = !pkgPositional && Boolean(pkgJsonName)
|
| 197 |
+
const invalidPkgJsonProviderType = matchPkg && git && git?.type !== name
|
| 198 |
+
|
| 199 |
+
let entity
|
| 200 |
+
let entitySource
|
| 201 |
+
|
| 202 |
+
if (flags[entityKey]) {
|
| 203 |
+
entity = flags[entityKey]
|
| 204 |
+
entitySource = 'flag'
|
| 205 |
+
} else if (!invalidPkgJsonProviderType && git?.repository) {
|
| 206 |
+
entity = git.repository
|
| 207 |
+
entitySource = 'package.json'
|
| 208 |
+
}
|
| 209 |
+
const mismatchPkgJsonRepository = matchPkg && git && entity !== git.repository
|
| 210 |
+
const usedRepositoryInPkgJson = entitySource === 'package.json'
|
| 211 |
+
|
| 212 |
+
const warnings = []
|
| 213 |
+
if (!pkgName) {
|
| 214 |
+
throw new Error('Package name must be specified either as an argument or in package.json file')
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
if (!flags.file) {
|
| 218 |
+
throw new Error(`${providerFile} must be specified with the file option`)
|
| 219 |
+
}
|
| 220 |
+
if (!flags.file.endsWith('.yml') && !flags.file.endsWith('.yaml')) {
|
| 221 |
+
throw new Error(`${providerFile} must end in .yml or .yaml`)
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
this.validateFile?.(flags.file)
|
| 225 |
+
|
| 226 |
+
if (invalidPkgJsonProviderType) {
|
| 227 |
+
const message = this.warnString`Repository in package.json is not a ${providerEntity}`
|
| 228 |
+
if (!flags[entityKey]) {
|
| 229 |
+
throw new Error(message)
|
| 230 |
+
} else {
|
| 231 |
+
warnings.push(message)
|
| 232 |
+
}
|
| 233 |
+
} else {
|
| 234 |
+
if (mismatchPkgJsonRepository) {
|
| 235 |
+
warnings.push(this.warnString`Repository in package.json (${git.repository}) differs from provided ${providerEntity} (${entity})`)
|
| 236 |
+
}
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
if (!entity && matchPkg) {
|
| 240 |
+
throw new Error(`${providerEntity} must be specified with ${entityKey} option or inferred from the package.json repository field`)
|
| 241 |
+
}
|
| 242 |
+
if (!entity) {
|
| 243 |
+
throw new Error(`${providerEntity} must be specified with ${entityKey} option`)
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
this.validateEntity(entity)
|
| 247 |
+
|
| 248 |
+
return {
|
| 249 |
+
values: {
|
| 250 |
+
package: pkgName,
|
| 251 |
+
file: flags.file,
|
| 252 |
+
[entityKey]: entity,
|
| 253 |
+
...(flags.environment && { environment: flags.environment }),
|
| 254 |
+
},
|
| 255 |
+
fromPackageJson: {
|
| 256 |
+
[entityKey]: usedRepositoryInPkgJson,
|
| 257 |
+
package: usedPkgNameFromPkgJson,
|
| 258 |
+
},
|
| 259 |
+
warnings: warnings,
|
| 260 |
+
urls: {
|
| 261 |
+
package: this.getFrontendUrl({ pkgName }),
|
| 262 |
+
[entityKey]: this.getEntityUrl({ providerHostname, entity }),
|
| 263 |
+
file: this.getEntityUrl({ providerHostname, entity, file: flags.file }),
|
| 264 |
+
},
|
| 265 |
+
}
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
displayResponseBody ({ body, packageName }) {
|
| 269 |
+
if (!body || body.length === 0) {
|
| 270 |
+
this.dialogue`No trust configurations found for package (${packageName})`
|
| 271 |
+
return
|
| 272 |
+
}
|
| 273 |
+
const items = Array.isArray(body) ? body : [body]
|
| 274 |
+
for (const config of items) {
|
| 275 |
+
const values = this.constructor.bodyToOptions(config)
|
| 276 |
+
output.standard()
|
| 277 |
+
this.logOptions({ values }, false)
|
| 278 |
+
}
|
| 279 |
+
output.standard()
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
module.exports = TrustCommand
|
| 284 |
+
module.exports.NPM_FRONTEND = NPM_FRONTEND
|
node24/node_modules/npm/node_modules/abbrev/LICENSE
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This software is dual-licensed under the ISC and MIT licenses.
|
| 2 |
+
You may use this software under EITHER of the following licenses.
|
| 3 |
+
|
| 4 |
+
----------
|
| 5 |
+
|
| 6 |
+
The ISC License
|
| 7 |
+
|
| 8 |
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
| 9 |
+
|
| 10 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
| 11 |
+
purpose with or without fee is hereby granted, provided that the above
|
| 12 |
+
copyright notice and this permission notice appear in all copies.
|
| 13 |
+
|
| 14 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 15 |
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| 16 |
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| 17 |
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| 18 |
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| 19 |
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
| 20 |
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| 21 |
+
|
| 22 |
+
----------
|
| 23 |
+
|
| 24 |
+
Copyright Isaac Z. Schlueter and Contributors
|
| 25 |
+
All rights reserved.
|
| 26 |
+
|
| 27 |
+
Permission is hereby granted, free of charge, to any person
|
| 28 |
+
obtaining a copy of this software and associated documentation
|
| 29 |
+
files (the "Software"), to deal in the Software without
|
| 30 |
+
restriction, including without limitation the rights to use,
|
| 31 |
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 32 |
+
copies of the Software, and to permit persons to whom the
|
| 33 |
+
Software is furnished to do so, subject to the following
|
| 34 |
+
conditions:
|
| 35 |
+
|
| 36 |
+
The above copyright notice and this permission notice shall be
|
| 37 |
+
included in all copies or substantial portions of the Software.
|
| 38 |
+
|
| 39 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 40 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
| 41 |
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 42 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
| 43 |
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
| 44 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
| 45 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 46 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
node24/node_modules/npm/node_modules/abbrev/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "abbrev",
|
| 3 |
+
"version": "4.0.0",
|
| 4 |
+
"description": "Like ruby's abbrev module, but in js",
|
| 5 |
+
"author": "GitHub Inc.",
|
| 6 |
+
"main": "lib/index.js",
|
| 7 |
+
"scripts": {
|
| 8 |
+
"test": "node --test",
|
| 9 |
+
"lint": "npm run eslint",
|
| 10 |
+
"postlint": "template-oss-check",
|
| 11 |
+
"template-oss-apply": "template-oss-apply --force",
|
| 12 |
+
"lintfix": "npm run eslint -- --fix",
|
| 13 |
+
"snap": "node --test --test-update-snapshots",
|
| 14 |
+
"posttest": "npm run lint",
|
| 15 |
+
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
|
| 16 |
+
"test:cover": "node --test --experimental-test-coverage --test-timeout=3000 --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100"
|
| 17 |
+
},
|
| 18 |
+
"repository": {
|
| 19 |
+
"type": "git",
|
| 20 |
+
"url": "git+https://github.com/npm/abbrev-js.git"
|
| 21 |
+
},
|
| 22 |
+
"license": "ISC",
|
| 23 |
+
"devDependencies": {
|
| 24 |
+
"@npmcli/eslint-config": "^5.0.0",
|
| 25 |
+
"@npmcli/template-oss": "4.26.1"
|
| 26 |
+
},
|
| 27 |
+
"files": [
|
| 28 |
+
"bin/",
|
| 29 |
+
"lib/"
|
| 30 |
+
],
|
| 31 |
+
"engines": {
|
| 32 |
+
"node": "^20.17.0 || >=22.9.0"
|
| 33 |
+
},
|
| 34 |
+
"templateOSS": {
|
| 35 |
+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
| 36 |
+
"version": "4.26.1",
|
| 37 |
+
"publish": true,
|
| 38 |
+
"testRunner": "node:test",
|
| 39 |
+
"latestCiVersion": 24
|
| 40 |
+
}
|
| 41 |
+
}
|
node24/node_modules/npm/node_modules/agent-base/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(The MIT License)
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 6 |
+
a copy of this software and associated documentation files (the
|
| 7 |
+
'Software'), to deal in the Software without restriction, including
|
| 8 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 9 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 10 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 11 |
+
the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be
|
| 14 |
+
included in all copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
| 17 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 18 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
| 19 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
| 20 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
| 21 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
| 22 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
node24/node_modules/npm/node_modules/agent-base/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "agent-base",
|
| 3 |
+
"version": "7.1.4",
|
| 4 |
+
"description": "Turn a function into an `http.Agent` instance",
|
| 5 |
+
"main": "./dist/index.js",
|
| 6 |
+
"types": "./dist/index.d.ts",
|
| 7 |
+
"files": [
|
| 8 |
+
"dist"
|
| 9 |
+
],
|
| 10 |
+
"repository": {
|
| 11 |
+
"type": "git",
|
| 12 |
+
"url": "https://github.com/TooTallNate/proxy-agents.git",
|
| 13 |
+
"directory": "packages/agent-base"
|
| 14 |
+
},
|
| 15 |
+
"keywords": [
|
| 16 |
+
"http",
|
| 17 |
+
"agent",
|
| 18 |
+
"base",
|
| 19 |
+
"barebones",
|
| 20 |
+
"https"
|
| 21 |
+
],
|
| 22 |
+
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
|
| 23 |
+
"license": "MIT",
|
| 24 |
+
"devDependencies": {
|
| 25 |
+
"@types/debug": "^4.1.7",
|
| 26 |
+
"@types/jest": "^29.5.1",
|
| 27 |
+
"@types/node": "^14.18.45",
|
| 28 |
+
"@types/semver": "^7.3.13",
|
| 29 |
+
"@types/ws": "^6.0.4",
|
| 30 |
+
"async-listen": "^3.0.0",
|
| 31 |
+
"jest": "^29.5.0",
|
| 32 |
+
"ts-jest": "^29.1.0",
|
| 33 |
+
"typescript": "^5.0.4",
|
| 34 |
+
"ws": "^5.2.4",
|
| 35 |
+
"tsconfig": "0.0.0"
|
| 36 |
+
},
|
| 37 |
+
"engines": {
|
| 38 |
+
"node": ">= 14"
|
| 39 |
+
},
|
| 40 |
+
"scripts": {
|
| 41 |
+
"build": "tsc",
|
| 42 |
+
"test": "jest --env node --verbose --bail",
|
| 43 |
+
"lint": "eslint . --ext .ts",
|
| 44 |
+
"pack": "node ../../scripts/pack.mjs"
|
| 45 |
+
}
|
| 46 |
+
}
|
node24/node_modules/npm/node_modules/aproba/LICENSE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
|
| 2 |
+
|
| 3 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
| 4 |
+
purpose with or without fee is hereby granted, provided that the above
|
| 5 |
+
copyright notice and this permission notice appear in all copies.
|
| 6 |
+
|
| 7 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 8 |
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| 9 |
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| 10 |
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| 11 |
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| 12 |
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
| 13 |
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| 14 |
+
|
node24/node_modules/npm/node_modules/aproba/index.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
module.exports = validate
|
| 3 |
+
|
| 4 |
+
function isArguments (thingy) {
|
| 5 |
+
return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
const types = {
|
| 9 |
+
'*': {label: 'any', check: () => true},
|
| 10 |
+
A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)},
|
| 11 |
+
S: {label: 'string', check: _ => typeof _ === 'string'},
|
| 12 |
+
N: {label: 'number', check: _ => typeof _ === 'number'},
|
| 13 |
+
F: {label: 'function', check: _ => typeof _ === 'function'},
|
| 14 |
+
O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)},
|
| 15 |
+
B: {label: 'boolean', check: _ => typeof _ === 'boolean'},
|
| 16 |
+
E: {label: 'error', check: _ => _ instanceof Error},
|
| 17 |
+
Z: {label: 'null', check: _ => _ == null}
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
function addSchema (schema, arity) {
|
| 21 |
+
const group = arity[schema.length] = arity[schema.length] || []
|
| 22 |
+
if (group.indexOf(schema) === -1) group.push(schema)
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
function validate (rawSchemas, args) {
|
| 26 |
+
if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
|
| 27 |
+
if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
|
| 28 |
+
if (!args) throw missingRequiredArg(1, 'args')
|
| 29 |
+
if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
|
| 30 |
+
if (!types.A.check(args)) throw invalidType(1, ['array'], args)
|
| 31 |
+
const schemas = rawSchemas.split('|')
|
| 32 |
+
const arity = {}
|
| 33 |
+
|
| 34 |
+
schemas.forEach(schema => {
|
| 35 |
+
for (let ii = 0; ii < schema.length; ++ii) {
|
| 36 |
+
const type = schema[ii]
|
| 37 |
+
if (!types[type]) throw unknownType(ii, type)
|
| 38 |
+
}
|
| 39 |
+
if (/E.*E/.test(schema)) throw moreThanOneError(schema)
|
| 40 |
+
addSchema(schema, arity)
|
| 41 |
+
if (/E/.test(schema)) {
|
| 42 |
+
addSchema(schema.replace(/E.*$/, 'E'), arity)
|
| 43 |
+
addSchema(schema.replace(/E/, 'Z'), arity)
|
| 44 |
+
if (schema.length === 1) addSchema('', arity)
|
| 45 |
+
}
|
| 46 |
+
})
|
| 47 |
+
let matching = arity[args.length]
|
| 48 |
+
if (!matching) {
|
| 49 |
+
throw wrongNumberOfArgs(Object.keys(arity), args.length)
|
| 50 |
+
}
|
| 51 |
+
for (let ii = 0; ii < args.length; ++ii) {
|
| 52 |
+
let newMatching = matching.filter(schema => {
|
| 53 |
+
const type = schema[ii]
|
| 54 |
+
const typeCheck = types[type].check
|
| 55 |
+
return typeCheck(args[ii])
|
| 56 |
+
})
|
| 57 |
+
if (!newMatching.length) {
|
| 58 |
+
const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null)
|
| 59 |
+
throw invalidType(ii, labels, args[ii])
|
| 60 |
+
}
|
| 61 |
+
matching = newMatching
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
function missingRequiredArg (num) {
|
| 66 |
+
return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
function unknownType (num, type) {
|
| 70 |
+
return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
function invalidType (num, expectedTypes, value) {
|
| 74 |
+
let valueType
|
| 75 |
+
Object.keys(types).forEach(typeCode => {
|
| 76 |
+
if (types[typeCode].check(value)) valueType = types[typeCode].label
|
| 77 |
+
})
|
| 78 |
+
return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
|
| 79 |
+
englishList(expectedTypes) + ' but got ' + valueType)
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
function englishList (list) {
|
| 83 |
+
return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
function wrongNumberOfArgs (expected, got) {
|
| 87 |
+
const english = englishList(expected)
|
| 88 |
+
const args = expected.every(ex => ex.length === 1)
|
| 89 |
+
? 'argument'
|
| 90 |
+
: 'arguments'
|
| 91 |
+
return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
function moreThanOneError (schema) {
|
| 95 |
+
return newException('ETOOMANYERRORTYPES',
|
| 96 |
+
'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
function newException (code, msg) {
|
| 100 |
+
const err = new TypeError(msg)
|
| 101 |
+
err.code = code
|
| 102 |
+
/* istanbul ignore else */
|
| 103 |
+
if (Error.captureStackTrace) Error.captureStackTrace(err, validate)
|
| 104 |
+
return err
|
| 105 |
+
}
|
node24/node_modules/npm/node_modules/aproba/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "aproba",
|
| 3 |
+
"version": "2.1.0",
|
| 4 |
+
"description": "A ridiculously light-weight argument validator (now browser friendly)",
|
| 5 |
+
"main": "index.js",
|
| 6 |
+
"directories": {
|
| 7 |
+
"test": "test"
|
| 8 |
+
},
|
| 9 |
+
"dependencies": {},
|
| 10 |
+
"devDependencies": {
|
| 11 |
+
"standard": "^11.0.1",
|
| 12 |
+
"tap": "^12.0.1"
|
| 13 |
+
},
|
| 14 |
+
"files": [
|
| 15 |
+
"index.js"
|
| 16 |
+
],
|
| 17 |
+
"scripts": {
|
| 18 |
+
"pretest": "standard",
|
| 19 |
+
"test": "tap --100 -J test/*.js"
|
| 20 |
+
},
|
| 21 |
+
"repository": {
|
| 22 |
+
"type": "git",
|
| 23 |
+
"url": "https://github.com/iarna/aproba"
|
| 24 |
+
},
|
| 25 |
+
"keywords": [
|
| 26 |
+
"argument",
|
| 27 |
+
"validate"
|
| 28 |
+
],
|
| 29 |
+
"author": "Rebecca Turner <me@re-becca.org>",
|
| 30 |
+
"license": "ISC",
|
| 31 |
+
"bugs": {
|
| 32 |
+
"url": "https://github.com/iarna/aproba/issues"
|
| 33 |
+
},
|
| 34 |
+
"homepage": "https://github.com/iarna/aproba"
|
| 35 |
+
}
|
node24/node_modules/npm/node_modules/archy/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This software is released under the MIT license:
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
| 4 |
+
this software and associated documentation files (the "Software"), to deal in
|
| 5 |
+
the Software without restriction, including without limitation the rights to
|
| 6 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
| 7 |
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
| 8 |
+
subject to the following conditions:
|
| 9 |
+
|
| 10 |
+
The above copyright notice and this permission notice shall be included in all
|
| 11 |
+
copies or substantial portions of the Software.
|
| 12 |
+
|
| 13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 15 |
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
| 16 |
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 17 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
| 18 |
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
node24/node_modules/npm/node_modules/archy/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
module.exports = function archy (obj, prefix, opts) {
|
| 2 |
+
if (prefix === undefined) prefix = '';
|
| 3 |
+
if (!opts) opts = {};
|
| 4 |
+
var chr = function (s) {
|
| 5 |
+
var chars = {
|
| 6 |
+
'│' : '|',
|
| 7 |
+
'└' : '`',
|
| 8 |
+
'├' : '+',
|
| 9 |
+
'─' : '-',
|
| 10 |
+
'┬' : '-'
|
| 11 |
+
};
|
| 12 |
+
return opts.unicode === false ? chars[s] : s;
|
| 13 |
+
};
|
| 14 |
+
|
| 15 |
+
if (typeof obj === 'string') obj = { label : obj };
|
| 16 |
+
|
| 17 |
+
var nodes = obj.nodes || [];
|
| 18 |
+
var lines = (obj.label || '').split('\n');
|
| 19 |
+
var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' ';
|
| 20 |
+
|
| 21 |
+
return prefix
|
| 22 |
+
+ lines.join(splitter) + '\n'
|
| 23 |
+
+ nodes.map(function (node, ix) {
|
| 24 |
+
var last = ix === nodes.length - 1;
|
| 25 |
+
var more = node.nodes && node.nodes.length;
|
| 26 |
+
var prefix_ = prefix + (last ? ' ' : chr('│')) + ' ';
|
| 27 |
+
|
| 28 |
+
return prefix
|
| 29 |
+
+ (last ? chr('└') : chr('├')) + chr('─')
|
| 30 |
+
+ (more ? chr('┬') : chr('─')) + ' '
|
| 31 |
+
+ archy(node, prefix_, opts).slice(prefix.length + 2)
|
| 32 |
+
;
|
| 33 |
+
}).join('')
|
| 34 |
+
;
|
| 35 |
+
};
|
node24/node_modules/npm/node_modules/archy/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name" : "archy",
|
| 3 |
+
"version" : "1.0.0",
|
| 4 |
+
"description" : "render nested hierarchies `npm ls` style with unicode pipes",
|
| 5 |
+
"main" : "index.js",
|
| 6 |
+
"devDependencies" : {
|
| 7 |
+
"tap" : "~0.3.3",
|
| 8 |
+
"tape" : "~0.1.1"
|
| 9 |
+
},
|
| 10 |
+
"scripts" : {
|
| 11 |
+
"test" : "tap test"
|
| 12 |
+
},
|
| 13 |
+
"testling" : {
|
| 14 |
+
"files" : "test/*.js",
|
| 15 |
+
"browsers" : {
|
| 16 |
+
"iexplore" : [ "6.0", "7.0", "8.0", "9.0" ],
|
| 17 |
+
"chrome" : [ "20.0" ],
|
| 18 |
+
"firefox" : [ "10.0", "15.0" ],
|
| 19 |
+
"safari" : [ "5.1" ],
|
| 20 |
+
"opera" : [ "12.0" ]
|
| 21 |
+
}
|
| 22 |
+
},
|
| 23 |
+
"repository" : {
|
| 24 |
+
"type" : "git",
|
| 25 |
+
"url" : "http://github.com/substack/node-archy.git"
|
| 26 |
+
},
|
| 27 |
+
"keywords" : [
|
| 28 |
+
"hierarchy",
|
| 29 |
+
"npm ls",
|
| 30 |
+
"unicode",
|
| 31 |
+
"pretty",
|
| 32 |
+
"print"
|
| 33 |
+
],
|
| 34 |
+
"author" : {
|
| 35 |
+
"name" : "James Halliday",
|
| 36 |
+
"email" : "mail@substack.net",
|
| 37 |
+
"url" : "http://substack.net"
|
| 38 |
+
},
|
| 39 |
+
"license" : "MIT"
|
| 40 |
+
}
|
node24/node_modules/npm/node_modules/balanced-match/LICENSE.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(MIT)
|
| 2 |
+
|
| 3 |
+
Original code Copyright Julian Gruber <julian@juliangruber.com>
|
| 4 |
+
|
| 5 |
+
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
|
| 6 |
+
|
| 7 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
| 8 |
+
this software and associated documentation files (the "Software"), to deal in
|
| 9 |
+
the Software without restriction, including without limitation the rights to
|
| 10 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
| 11 |
+
of the Software, and to permit persons to whom the Software is furnished to do
|
| 12 |
+
so, subject to the following conditions:
|
| 13 |
+
|
| 14 |
+
The above copyright notice and this permission notice shall be included in all
|
| 15 |
+
copies or substantial portions of the Software.
|
| 16 |
+
|
| 17 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 18 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 19 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 20 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 21 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 22 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 23 |
+
SOFTWARE.
|
node24/node_modules/npm/node_modules/balanced-match/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "balanced-match",
|
| 3 |
+
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
| 4 |
+
"version": "4.0.4",
|
| 5 |
+
"files": [
|
| 6 |
+
"dist"
|
| 7 |
+
],
|
| 8 |
+
"repository": {
|
| 9 |
+
"type": "git",
|
| 10 |
+
"url": "git://github.com/juliangruber/balanced-match.git"
|
| 11 |
+
},
|
| 12 |
+
"exports": {
|
| 13 |
+
"./package.json": "./package.json",
|
| 14 |
+
".": {
|
| 15 |
+
"import": {
|
| 16 |
+
"types": "./dist/esm/index.d.ts",
|
| 17 |
+
"default": "./dist/esm/index.js"
|
| 18 |
+
},
|
| 19 |
+
"require": {
|
| 20 |
+
"types": "./dist/commonjs/index.d.ts",
|
| 21 |
+
"default": "./dist/commonjs/index.js"
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
},
|
| 25 |
+
"type": "module",
|
| 26 |
+
"scripts": {
|
| 27 |
+
"preversion": "npm test",
|
| 28 |
+
"postversion": "npm publish",
|
| 29 |
+
"prepublishOnly": "git push origin --follow-tags",
|
| 30 |
+
"prepare": "tshy",
|
| 31 |
+
"pretest": "npm run prepare",
|
| 32 |
+
"presnap": "npm run prepare",
|
| 33 |
+
"test": "tap",
|
| 34 |
+
"snap": "tap",
|
| 35 |
+
"format": "prettier --write .",
|
| 36 |
+
"benchmark": "node benchmark/index.js",
|
| 37 |
+
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
|
| 38 |
+
},
|
| 39 |
+
"devDependencies": {
|
| 40 |
+
"@types/brace-expansion": "^1.1.2",
|
| 41 |
+
"@types/node": "^25.2.1",
|
| 42 |
+
"mkdirp": "^3.0.1",
|
| 43 |
+
"prettier": "^3.3.2",
|
| 44 |
+
"tap": "^21.6.2",
|
| 45 |
+
"tshy": "^3.0.2",
|
| 46 |
+
"typedoc": "^0.28.5"
|
| 47 |
+
},
|
| 48 |
+
"keywords": [
|
| 49 |
+
"match",
|
| 50 |
+
"regexp",
|
| 51 |
+
"test",
|
| 52 |
+
"balanced",
|
| 53 |
+
"parse"
|
| 54 |
+
],
|
| 55 |
+
"license": "MIT",
|
| 56 |
+
"engines": {
|
| 57 |
+
"node": "18 || 20 || >=22"
|
| 58 |
+
},
|
| 59 |
+
"tshy": {
|
| 60 |
+
"exports": {
|
| 61 |
+
"./package.json": "./package.json",
|
| 62 |
+
".": "./src/index.ts"
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
"main": "./dist/commonjs/index.js",
|
| 66 |
+
"types": "./dist/commonjs/index.d.ts",
|
| 67 |
+
"module": "./dist/esm/index.js"
|
| 68 |
+
}
|
node24/node_modules/npm/node_modules/bin-links/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The ISC License
|
| 2 |
+
|
| 3 |
+
Copyright (c) npm, Inc.
|
| 4 |
+
|
| 5 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
| 6 |
+
purpose with or without fee is hereby granted, provided that the above
|
| 7 |
+
copyright notice and this permission notice appear in all copies.
|
| 8 |
+
|
| 9 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 10 |
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| 11 |
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| 12 |
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| 13 |
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| 14 |
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
| 15 |
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
node24/node_modules/npm/node_modules/bin-links/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "bin-links",
|
| 3 |
+
"version": "6.0.0",
|
| 4 |
+
"description": "JavaScript package binary linker",
|
| 5 |
+
"main": "./lib/index.js",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"snap": "tap",
|
| 8 |
+
"test": "tap",
|
| 9 |
+
"lint": "npm run eslint",
|
| 10 |
+
"postlint": "template-oss-check",
|
| 11 |
+
"lintfix": "npm run eslint -- --fix",
|
| 12 |
+
"posttest": "npm run lint",
|
| 13 |
+
"template-oss-apply": "template-oss-apply --force",
|
| 14 |
+
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
|
| 15 |
+
},
|
| 16 |
+
"repository": {
|
| 17 |
+
"type": "git",
|
| 18 |
+
"url": "git+https://github.com/npm/bin-links.git"
|
| 19 |
+
},
|
| 20 |
+
"keywords": [
|
| 21 |
+
"npm",
|
| 22 |
+
"link",
|
| 23 |
+
"bins"
|
| 24 |
+
],
|
| 25 |
+
"license": "ISC",
|
| 26 |
+
"dependencies": {
|
| 27 |
+
"cmd-shim": "^8.0.0",
|
| 28 |
+
"npm-normalize-package-bin": "^5.0.0",
|
| 29 |
+
"proc-log": "^6.0.0",
|
| 30 |
+
"read-cmd-shim": "^6.0.0",
|
| 31 |
+
"write-file-atomic": "^7.0.0"
|
| 32 |
+
},
|
| 33 |
+
"devDependencies": {
|
| 34 |
+
"@npmcli/eslint-config": "^5.0.0",
|
| 35 |
+
"@npmcli/template-oss": "4.27.1",
|
| 36 |
+
"require-inject": "^1.4.4",
|
| 37 |
+
"tap": "^16.0.1"
|
| 38 |
+
},
|
| 39 |
+
"tap": {
|
| 40 |
+
"check-coverage": true,
|
| 41 |
+
"coverage-map": "map.js",
|
| 42 |
+
"nyc-arg": [
|
| 43 |
+
"--exclude",
|
| 44 |
+
"tap-snapshots/**"
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
"files": [
|
| 48 |
+
"bin/",
|
| 49 |
+
"lib/"
|
| 50 |
+
],
|
| 51 |
+
"engines": {
|
| 52 |
+
"node": "^20.17.0 || >=22.9.0"
|
| 53 |
+
},
|
| 54 |
+
"author": "GitHub Inc.",
|
| 55 |
+
"templateOSS": {
|
| 56 |
+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
| 57 |
+
"windowsCI": false,
|
| 58 |
+
"version": "4.27.1",
|
| 59 |
+
"publish": true
|
| 60 |
+
}
|
| 61 |
+
}
|
node24/node_modules/npm/node_modules/binary-extensions/binary-extensions.json
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
"3dm",
|
| 3 |
+
"3ds",
|
| 4 |
+
"3g2",
|
| 5 |
+
"3gp",
|
| 6 |
+
"7z",
|
| 7 |
+
"a",
|
| 8 |
+
"aac",
|
| 9 |
+
"adp",
|
| 10 |
+
"afdesign",
|
| 11 |
+
"afphoto",
|
| 12 |
+
"afpub",
|
| 13 |
+
"ai",
|
| 14 |
+
"aif",
|
| 15 |
+
"aiff",
|
| 16 |
+
"alz",
|
| 17 |
+
"ape",
|
| 18 |
+
"apk",
|
| 19 |
+
"appimage",
|
| 20 |
+
"ar",
|
| 21 |
+
"arj",
|
| 22 |
+
"asf",
|
| 23 |
+
"au",
|
| 24 |
+
"avi",
|
| 25 |
+
"bak",
|
| 26 |
+
"baml",
|
| 27 |
+
"bh",
|
| 28 |
+
"bin",
|
| 29 |
+
"bk",
|
| 30 |
+
"bmp",
|
| 31 |
+
"btif",
|
| 32 |
+
"bz2",
|
| 33 |
+
"bzip2",
|
| 34 |
+
"cab",
|
| 35 |
+
"caf",
|
| 36 |
+
"cgm",
|
| 37 |
+
"class",
|
| 38 |
+
"cmx",
|
| 39 |
+
"cpio",
|
| 40 |
+
"cr2",
|
| 41 |
+
"cr3",
|
| 42 |
+
"cur",
|
| 43 |
+
"dat",
|
| 44 |
+
"dcm",
|
| 45 |
+
"deb",
|
| 46 |
+
"dex",
|
| 47 |
+
"djvu",
|
| 48 |
+
"dll",
|
| 49 |
+
"dmg",
|
| 50 |
+
"dng",
|
| 51 |
+
"doc",
|
| 52 |
+
"docm",
|
| 53 |
+
"docx",
|
| 54 |
+
"dot",
|
| 55 |
+
"dotm",
|
| 56 |
+
"dra",
|
| 57 |
+
"DS_Store",
|
| 58 |
+
"dsk",
|
| 59 |
+
"dts",
|
| 60 |
+
"dtshd",
|
| 61 |
+
"dvb",
|
| 62 |
+
"dwg",
|
| 63 |
+
"dxf",
|
| 64 |
+
"ecelp4800",
|
| 65 |
+
"ecelp7470",
|
| 66 |
+
"ecelp9600",
|
| 67 |
+
"egg",
|
| 68 |
+
"eol",
|
| 69 |
+
"eot",
|
| 70 |
+
"epub",
|
| 71 |
+
"exe",
|
| 72 |
+
"f4v",
|
| 73 |
+
"fbs",
|
| 74 |
+
"fh",
|
| 75 |
+
"fla",
|
| 76 |
+
"flac",
|
| 77 |
+
"flatpak",
|
| 78 |
+
"fli",
|
| 79 |
+
"flv",
|
| 80 |
+
"fpx",
|
| 81 |
+
"fst",
|
| 82 |
+
"fvt",
|
| 83 |
+
"g3",
|
| 84 |
+
"gh",
|
| 85 |
+
"gif",
|
| 86 |
+
"graffle",
|
| 87 |
+
"gz",
|
| 88 |
+
"gzip",
|
| 89 |
+
"h261",
|
| 90 |
+
"h263",
|
| 91 |
+
"h264",
|
| 92 |
+
"icns",
|
| 93 |
+
"ico",
|
| 94 |
+
"ief",
|
| 95 |
+
"img",
|
| 96 |
+
"ipa",
|
| 97 |
+
"iso",
|
| 98 |
+
"jar",
|
| 99 |
+
"jpeg",
|
| 100 |
+
"jpg",
|
| 101 |
+
"jpgv",
|
| 102 |
+
"jpm",
|
| 103 |
+
"jxr",
|
| 104 |
+
"key",
|
| 105 |
+
"ktx",
|
| 106 |
+
"lha",
|
| 107 |
+
"lib",
|
| 108 |
+
"lvp",
|
| 109 |
+
"lz",
|
| 110 |
+
"lzh",
|
| 111 |
+
"lzma",
|
| 112 |
+
"lzo",
|
| 113 |
+
"m3u",
|
| 114 |
+
"m4a",
|
| 115 |
+
"m4v",
|
| 116 |
+
"mar",
|
| 117 |
+
"mdi",
|
| 118 |
+
"mht",
|
| 119 |
+
"mid",
|
| 120 |
+
"midi",
|
| 121 |
+
"mj2",
|
| 122 |
+
"mka",
|
| 123 |
+
"mkv",
|
| 124 |
+
"mmr",
|
| 125 |
+
"mng",
|
| 126 |
+
"mobi",
|
| 127 |
+
"mov",
|
| 128 |
+
"movie",
|
| 129 |
+
"mp3",
|
| 130 |
+
"mp4",
|
| 131 |
+
"mp4a",
|
| 132 |
+
"mpeg",
|
| 133 |
+
"mpg",
|
| 134 |
+
"mpga",
|
| 135 |
+
"mxu",
|
| 136 |
+
"nef",
|
| 137 |
+
"npx",
|
| 138 |
+
"numbers",
|
| 139 |
+
"nupkg",
|
| 140 |
+
"o",
|
| 141 |
+
"odp",
|
| 142 |
+
"ods",
|
| 143 |
+
"odt",
|
| 144 |
+
"oga",
|
| 145 |
+
"ogg",
|
| 146 |
+
"ogv",
|
| 147 |
+
"otf",
|
| 148 |
+
"ott",
|
| 149 |
+
"pages",
|
| 150 |
+
"pbm",
|
| 151 |
+
"pcx",
|
| 152 |
+
"pdb",
|
| 153 |
+
"pdf",
|
| 154 |
+
"pea",
|
| 155 |
+
"pgm",
|
| 156 |
+
"pic",
|
| 157 |
+
"png",
|
| 158 |
+
"pnm",
|
| 159 |
+
"pot",
|
| 160 |
+
"potm",
|
| 161 |
+
"potx",
|
| 162 |
+
"ppa",
|
| 163 |
+
"ppam",
|
| 164 |
+
"ppm",
|
| 165 |
+
"pps",
|
| 166 |
+
"ppsm",
|
| 167 |
+
"ppsx",
|
| 168 |
+
"ppt",
|
| 169 |
+
"pptm",
|
| 170 |
+
"pptx",
|
| 171 |
+
"psd",
|
| 172 |
+
"pya",
|
| 173 |
+
"pyc",
|
| 174 |
+
"pyo",
|
| 175 |
+
"pyv",
|
| 176 |
+
"qt",
|
| 177 |
+
"rar",
|
| 178 |
+
"ras",
|
| 179 |
+
"raw",
|
| 180 |
+
"resources",
|
| 181 |
+
"rgb",
|
| 182 |
+
"rip",
|
| 183 |
+
"rlc",
|
| 184 |
+
"rmf",
|
| 185 |
+
"rmvb",
|
| 186 |
+
"rpm",
|
| 187 |
+
"rtf",
|
| 188 |
+
"rz",
|
| 189 |
+
"s3m",
|
| 190 |
+
"s7z",
|
| 191 |
+
"scpt",
|
| 192 |
+
"sgi",
|
| 193 |
+
"shar",
|
| 194 |
+
"snap",
|
| 195 |
+
"sil",
|
| 196 |
+
"sketch",
|
| 197 |
+
"slk",
|
| 198 |
+
"smv",
|
| 199 |
+
"snk",
|
| 200 |
+
"so",
|
| 201 |
+
"stl",
|
| 202 |
+
"suo",
|
| 203 |
+
"sub",
|
| 204 |
+
"swf",
|
| 205 |
+
"tar",
|
| 206 |
+
"tbz",
|
| 207 |
+
"tbz2",
|
| 208 |
+
"tga",
|
| 209 |
+
"tgz",
|
| 210 |
+
"thmx",
|
| 211 |
+
"tif",
|
| 212 |
+
"tiff",
|
| 213 |
+
"tlz",
|
| 214 |
+
"ttc",
|
| 215 |
+
"ttf",
|
| 216 |
+
"txz",
|
| 217 |
+
"udf",
|
| 218 |
+
"uvh",
|
| 219 |
+
"uvi",
|
| 220 |
+
"uvm",
|
| 221 |
+
"uvp",
|
| 222 |
+
"uvs",
|
| 223 |
+
"uvu",
|
| 224 |
+
"viv",
|
| 225 |
+
"vob",
|
| 226 |
+
"war",
|
| 227 |
+
"wav",
|
| 228 |
+
"wax",
|
| 229 |
+
"wbmp",
|
| 230 |
+
"wdp",
|
| 231 |
+
"weba",
|
| 232 |
+
"webm",
|
| 233 |
+
"webp",
|
| 234 |
+
"whl",
|
| 235 |
+
"wim",
|
| 236 |
+
"wm",
|
| 237 |
+
"wma",
|
| 238 |
+
"wmv",
|
| 239 |
+
"wmx",
|
| 240 |
+
"woff",
|
| 241 |
+
"woff2",
|
| 242 |
+
"wrm",
|
| 243 |
+
"wvx",
|
| 244 |
+
"xbm",
|
| 245 |
+
"xif",
|
| 246 |
+
"xla",
|
| 247 |
+
"xlam",
|
| 248 |
+
"xls",
|
| 249 |
+
"xlsb",
|
| 250 |
+
"xlsm",
|
| 251 |
+
"xlsx",
|
| 252 |
+
"xlt",
|
| 253 |
+
"xltm",
|
| 254 |
+
"xltx",
|
| 255 |
+
"xm",
|
| 256 |
+
"xmind",
|
| 257 |
+
"xpi",
|
| 258 |
+
"xpm",
|
| 259 |
+
"xwd",
|
| 260 |
+
"xz",
|
| 261 |
+
"z",
|
| 262 |
+
"zip",
|
| 263 |
+
"zipx"
|
| 264 |
+
]
|
node24/node_modules/npm/node_modules/binary-extensions/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import binaryExtensions from './binary-extensions.json' with {type: 'json'};
|
| 2 |
+
|
| 3 |
+
export default binaryExtensions;
|
node24/node_modules/npm/node_modules/binary-extensions/license
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 4 |
+
Copyright (c) Paul Miller (https://paulmillr.com)
|
| 5 |
+
|
| 6 |
+
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:
|
| 7 |
+
|
| 8 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 9 |
+
|
| 10 |
+
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.
|
node24/node_modules/npm/node_modules/binary-extensions/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "binary-extensions",
|
| 3 |
+
"version": "3.1.0",
|
| 4 |
+
"description": "List of binary file extensions",
|
| 5 |
+
"license": "MIT",
|
| 6 |
+
"repository": "sindresorhus/binary-extensions",
|
| 7 |
+
"funding": "https://github.com/sponsors/sindresorhus",
|
| 8 |
+
"author": {
|
| 9 |
+
"name": "Sindre Sorhus",
|
| 10 |
+
"email": "sindresorhus@gmail.com",
|
| 11 |
+
"url": "https://sindresorhus.com"
|
| 12 |
+
},
|
| 13 |
+
"type": "module",
|
| 14 |
+
"exports": {
|
| 15 |
+
"types": "./index.d.ts",
|
| 16 |
+
"default": "./index.js"
|
| 17 |
+
},
|
| 18 |
+
"sideEffects": false,
|
| 19 |
+
"engines": {
|
| 20 |
+
"node": ">=18.20"
|
| 21 |
+
},
|
| 22 |
+
"scripts": {
|
| 23 |
+
"//test": "xo && ava && tsd",
|
| 24 |
+
"test": "ava && tsd"
|
| 25 |
+
},
|
| 26 |
+
"files": [
|
| 27 |
+
"index.js",
|
| 28 |
+
"index.d.ts",
|
| 29 |
+
"binary-extensions.json"
|
| 30 |
+
],
|
| 31 |
+
"keywords": [
|
| 32 |
+
"binary",
|
| 33 |
+
"extensions",
|
| 34 |
+
"extension",
|
| 35 |
+
"file",
|
| 36 |
+
"json",
|
| 37 |
+
"list",
|
| 38 |
+
"array"
|
| 39 |
+
],
|
| 40 |
+
"devDependencies": {
|
| 41 |
+
"ava": "^6.1.2",
|
| 42 |
+
"tsd": "^0.31.0",
|
| 43 |
+
"xo": "^0.58.0"
|
| 44 |
+
}
|
| 45 |
+
}
|
node24/node_modules/npm/node_modules/brace-expansion/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright Julian Gruber <julian@juliangruber.com>
|
| 4 |
+
|
| 5 |
+
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
|
| 6 |
+
|
| 7 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 8 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 9 |
+
in the Software without restriction, including without limitation the rights
|
| 10 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 11 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 12 |
+
furnished to do so, subject to the following conditions:
|
| 13 |
+
|
| 14 |
+
The above copyright notice and this permission notice shall be included in all
|
| 15 |
+
copies or substantial portions of the Software.
|
| 16 |
+
|
| 17 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 18 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 19 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 20 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 21 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 22 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 23 |
+
SOFTWARE.
|
node24/node_modules/npm/node_modules/brace-expansion/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "brace-expansion",
|
| 3 |
+
"description": "Brace expansion as known from sh/bash",
|
| 4 |
+
"version": "5.0.4",
|
| 5 |
+
"files": [
|
| 6 |
+
"dist"
|
| 7 |
+
],
|
| 8 |
+
"exports": {
|
| 9 |
+
"./package.json": "./package.json",
|
| 10 |
+
".": {
|
| 11 |
+
"import": {
|
| 12 |
+
"types": "./dist/esm/index.d.ts",
|
| 13 |
+
"default": "./dist/esm/index.js"
|
| 14 |
+
},
|
| 15 |
+
"require": {
|
| 16 |
+
"types": "./dist/commonjs/index.d.ts",
|
| 17 |
+
"default": "./dist/commonjs/index.js"
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
"type": "module",
|
| 22 |
+
"scripts": {
|
| 23 |
+
"preversion": "npm test",
|
| 24 |
+
"postversion": "npm publish",
|
| 25 |
+
"prepublishOnly": "git push origin --follow-tags",
|
| 26 |
+
"prepare": "tshy",
|
| 27 |
+
"pretest": "npm run prepare",
|
| 28 |
+
"presnap": "npm run prepare",
|
| 29 |
+
"test": "tap",
|
| 30 |
+
"snap": "tap",
|
| 31 |
+
"format": "prettier --write .",
|
| 32 |
+
"benchmark": "node benchmark/index.js",
|
| 33 |
+
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
|
| 34 |
+
},
|
| 35 |
+
"devDependencies": {
|
| 36 |
+
"@types/brace-expansion": "^1.1.2",
|
| 37 |
+
"@types/node": "^25.2.1",
|
| 38 |
+
"mkdirp": "^3.0.1",
|
| 39 |
+
"prettier": "^3.3.2",
|
| 40 |
+
"tap": "^21.6.2",
|
| 41 |
+
"tshy": "^3.0.2",
|
| 42 |
+
"typedoc": "^0.28.5"
|
| 43 |
+
},
|
| 44 |
+
"dependencies": {
|
| 45 |
+
"balanced-match": "^4.0.2"
|
| 46 |
+
},
|
| 47 |
+
"license": "MIT",
|
| 48 |
+
"engines": {
|
| 49 |
+
"node": "18 || 20 || >=22"
|
| 50 |
+
},
|
| 51 |
+
"tshy": {
|
| 52 |
+
"exports": {
|
| 53 |
+
"./package.json": "./package.json",
|
| 54 |
+
".": "./src/index.ts"
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
"main": "./dist/commonjs/index.js",
|
| 58 |
+
"types": "./dist/commonjs/index.d.ts",
|
| 59 |
+
"module": "./dist/esm/index.js",
|
| 60 |
+
"repository": {
|
| 61 |
+
"type": "git",
|
| 62 |
+
"url": "git+ssh://git@github.com/juliangruber/brace-expansion.git"
|
| 63 |
+
}
|
| 64 |
+
}
|
node24/node_modules/npm/node_modules/cacache/LICENSE.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ISC License
|
| 2 |
+
|
| 3 |
+
Copyright (c) npm, Inc.
|
| 4 |
+
|
| 5 |
+
Permission to use, copy, modify, and/or distribute this software for
|
| 6 |
+
any purpose with or without fee is hereby granted, provided that the
|
| 7 |
+
above copyright notice and this permission notice appear in all copies.
|
| 8 |
+
|
| 9 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
|
| 10 |
+
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
| 11 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
| 12 |
+
COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
|
| 13 |
+
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
| 14 |
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
| 15 |
+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
|
| 16 |
+
USE OR PERFORMANCE OF THIS SOFTWARE.
|
node24/node_modules/npm/node_modules/cacache/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "cacache",
|
| 3 |
+
"version": "20.0.4",
|
| 4 |
+
"cache-version": {
|
| 5 |
+
"content": "2",
|
| 6 |
+
"index": "5"
|
| 7 |
+
},
|
| 8 |
+
"description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",
|
| 9 |
+
"main": "lib/index.js",
|
| 10 |
+
"files": [
|
| 11 |
+
"bin/",
|
| 12 |
+
"lib/"
|
| 13 |
+
],
|
| 14 |
+
"scripts": {
|
| 15 |
+
"test": "tap",
|
| 16 |
+
"snap": "tap",
|
| 17 |
+
"coverage": "tap",
|
| 18 |
+
"test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
|
| 19 |
+
"lint": "npm run eslint",
|
| 20 |
+
"npmclilint": "npmcli-lint",
|
| 21 |
+
"lintfix": "npm run eslint -- --fix",
|
| 22 |
+
"postsnap": "npm run lintfix --",
|
| 23 |
+
"postlint": "template-oss-check",
|
| 24 |
+
"posttest": "npm run lint",
|
| 25 |
+
"template-oss-apply": "template-oss-apply --force",
|
| 26 |
+
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
|
| 27 |
+
},
|
| 28 |
+
"repository": {
|
| 29 |
+
"type": "git",
|
| 30 |
+
"url": "git+https://github.com/npm/cacache.git"
|
| 31 |
+
},
|
| 32 |
+
"keywords": [
|
| 33 |
+
"cache",
|
| 34 |
+
"caching",
|
| 35 |
+
"content-addressable",
|
| 36 |
+
"sri",
|
| 37 |
+
"sri hash",
|
| 38 |
+
"subresource integrity",
|
| 39 |
+
"cache",
|
| 40 |
+
"storage",
|
| 41 |
+
"store",
|
| 42 |
+
"file store",
|
| 43 |
+
"filesystem",
|
| 44 |
+
"disk cache",
|
| 45 |
+
"disk storage"
|
| 46 |
+
],
|
| 47 |
+
"license": "ISC",
|
| 48 |
+
"dependencies": {
|
| 49 |
+
"@npmcli/fs": "^5.0.0",
|
| 50 |
+
"fs-minipass": "^3.0.0",
|
| 51 |
+
"glob": "^13.0.0",
|
| 52 |
+
"lru-cache": "^11.1.0",
|
| 53 |
+
"minipass": "^7.0.3",
|
| 54 |
+
"minipass-collect": "^2.0.1",
|
| 55 |
+
"minipass-flush": "^1.0.5",
|
| 56 |
+
"minipass-pipeline": "^1.2.4",
|
| 57 |
+
"p-map": "^7.0.2",
|
| 58 |
+
"ssri": "^13.0.0"
|
| 59 |
+
},
|
| 60 |
+
"devDependencies": {
|
| 61 |
+
"@npmcli/eslint-config": "^6.0.1",
|
| 62 |
+
"@npmcli/template-oss": "4.29.0",
|
| 63 |
+
"tap": "^16.0.0"
|
| 64 |
+
},
|
| 65 |
+
"engines": {
|
| 66 |
+
"node": "^20.17.0 || >=22.9.0"
|
| 67 |
+
},
|
| 68 |
+
"templateOSS": {
|
| 69 |
+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
| 70 |
+
"windowsCI": false,
|
| 71 |
+
"version": "4.29.0",
|
| 72 |
+
"publish": "true"
|
| 73 |
+
},
|
| 74 |
+
"author": "GitHub Inc.",
|
| 75 |
+
"tap": {
|
| 76 |
+
"nyc-arg": [
|
| 77 |
+
"--exclude",
|
| 78 |
+
"tap-snapshots/**"
|
| 79 |
+
]
|
| 80 |
+
}
|
| 81 |
+
}
|
node24/node_modules/npm/node_modules/chalk/license
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 4 |
+
|
| 5 |
+
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:
|
| 6 |
+
|
| 7 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 8 |
+
|
| 9 |
+
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.
|
node24/node_modules/npm/node_modules/chalk/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "chalk",
|
| 3 |
+
"version": "5.6.2",
|
| 4 |
+
"description": "Terminal string styling done right",
|
| 5 |
+
"license": "MIT",
|
| 6 |
+
"repository": "chalk/chalk",
|
| 7 |
+
"funding": "https://github.com/chalk/chalk?sponsor=1",
|
| 8 |
+
"type": "module",
|
| 9 |
+
"main": "./source/index.js",
|
| 10 |
+
"exports": "./source/index.js",
|
| 11 |
+
"imports": {
|
| 12 |
+
"#ansi-styles": "./source/vendor/ansi-styles/index.js",
|
| 13 |
+
"#supports-color": {
|
| 14 |
+
"node": "./source/vendor/supports-color/index.js",
|
| 15 |
+
"default": "./source/vendor/supports-color/browser.js"
|
| 16 |
+
}
|
| 17 |
+
},
|
| 18 |
+
"types": "./source/index.d.ts",
|
| 19 |
+
"sideEffects": false,
|
| 20 |
+
"engines": {
|
| 21 |
+
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
| 22 |
+
},
|
| 23 |
+
"scripts": {
|
| 24 |
+
"test": "xo && c8 ava && tsd",
|
| 25 |
+
"bench": "matcha benchmark.js"
|
| 26 |
+
},
|
| 27 |
+
"files": [
|
| 28 |
+
"source",
|
| 29 |
+
"!source/index.test-d.ts"
|
| 30 |
+
],
|
| 31 |
+
"keywords": [
|
| 32 |
+
"color",
|
| 33 |
+
"colour",
|
| 34 |
+
"colors",
|
| 35 |
+
"terminal",
|
| 36 |
+
"console",
|
| 37 |
+
"cli",
|
| 38 |
+
"string",
|
| 39 |
+
"ansi",
|
| 40 |
+
"style",
|
| 41 |
+
"styles",
|
| 42 |
+
"tty",
|
| 43 |
+
"formatting",
|
| 44 |
+
"rgb",
|
| 45 |
+
"256",
|
| 46 |
+
"shell",
|
| 47 |
+
"xterm",
|
| 48 |
+
"log",
|
| 49 |
+
"logging",
|
| 50 |
+
"command-line",
|
| 51 |
+
"text"
|
| 52 |
+
],
|
| 53 |
+
"devDependencies": {
|
| 54 |
+
"@types/node": "^16.11.10",
|
| 55 |
+
"ava": "^3.15.0",
|
| 56 |
+
"c8": "^7.10.0",
|
| 57 |
+
"color-convert": "^2.0.1",
|
| 58 |
+
"execa": "^6.0.0",
|
| 59 |
+
"log-update": "^5.0.0",
|
| 60 |
+
"matcha": "^0.7.0",
|
| 61 |
+
"tsd": "^0.19.0",
|
| 62 |
+
"xo": "^0.57.0",
|
| 63 |
+
"yoctodelay": "^2.0.0"
|
| 64 |
+
},
|
| 65 |
+
"xo": {
|
| 66 |
+
"rules": {
|
| 67 |
+
"unicorn/prefer-string-slice": "off",
|
| 68 |
+
"@typescript-eslint/consistent-type-imports": "off",
|
| 69 |
+
"@typescript-eslint/consistent-type-exports": "off",
|
| 70 |
+
"@typescript-eslint/consistent-type-definitions": "off",
|
| 71 |
+
"unicorn/expiring-todo-comments": "off"
|
| 72 |
+
}
|
| 73 |
+
},
|
| 74 |
+
"c8": {
|
| 75 |
+
"reporter": [
|
| 76 |
+
"text",
|
| 77 |
+
"lcov"
|
| 78 |
+
],
|
| 79 |
+
"exclude": [
|
| 80 |
+
"source/vendor"
|
| 81 |
+
]
|
| 82 |
+
}
|
| 83 |
+
}
|
node24/node_modules/npm/node_modules/chownr/LICENSE.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
All packages under `src/` are licensed according to the terms in
|
| 2 |
+
their respective `LICENSE` or `LICENSE.md` files.
|
| 3 |
+
|
| 4 |
+
The remainder of this project is licensed under the Blue Oak
|
| 5 |
+
Model License, as follows:
|
| 6 |
+
|
| 7 |
+
-----
|
| 8 |
+
|
| 9 |
+
# Blue Oak Model License
|
| 10 |
+
|
| 11 |
+
Version 1.0.0
|
| 12 |
+
|
| 13 |
+
## Purpose
|
| 14 |
+
|
| 15 |
+
This license gives everyone as much permission to work with
|
| 16 |
+
this software as possible, while protecting contributors
|
| 17 |
+
from liability.
|
| 18 |
+
|
| 19 |
+
## Acceptance
|
| 20 |
+
|
| 21 |
+
In order to receive this license, you must agree to its
|
| 22 |
+
rules. The rules of this license are both obligations
|
| 23 |
+
under that agreement and conditions to your license.
|
| 24 |
+
You must not do anything with this software that triggers
|
| 25 |
+
a rule that you cannot or will not follow.
|
| 26 |
+
|
| 27 |
+
## Copyright
|
| 28 |
+
|
| 29 |
+
Each contributor licenses you to do everything with this
|
| 30 |
+
software that would otherwise infringe that contributor's
|
| 31 |
+
copyright in it.
|
| 32 |
+
|
| 33 |
+
## Notices
|
| 34 |
+
|
| 35 |
+
You must ensure that everyone who gets a copy of
|
| 36 |
+
any part of this software from you, with or without
|
| 37 |
+
changes, also gets the text of this license or a link to
|
| 38 |
+
<https://blueoakcouncil.org/license/1.0.0>.
|
| 39 |
+
|
| 40 |
+
## Excuse
|
| 41 |
+
|
| 42 |
+
If anyone notifies you in writing that you have not
|
| 43 |
+
complied with [Notices](#notices), you can keep your
|
| 44 |
+
license by taking all practical steps to comply within 30
|
| 45 |
+
days after the notice. If you do not do so, your license
|
| 46 |
+
ends immediately.
|
| 47 |
+
|
| 48 |
+
## Patent
|
| 49 |
+
|
| 50 |
+
Each contributor licenses you to do everything with this
|
| 51 |
+
software that would otherwise infringe any patent claims
|
| 52 |
+
they can license or become able to license.
|
| 53 |
+
|
| 54 |
+
## Reliability
|
| 55 |
+
|
| 56 |
+
No contributor can revoke this license.
|
| 57 |
+
|
| 58 |
+
## No Liability
|
| 59 |
+
|
| 60 |
+
***As far as the law allows, this software comes as is,
|
| 61 |
+
without any warranty or condition, and no contributor
|
| 62 |
+
will be liable to anyone for any damages related to this
|
| 63 |
+
software or this license, under any kind of legal claim.***
|
node24/node_modules/npm/node_modules/chownr/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
| 3 |
+
"name": "chownr",
|
| 4 |
+
"description": "like `chown -R`",
|
| 5 |
+
"version": "3.0.0",
|
| 6 |
+
"repository": {
|
| 7 |
+
"type": "git",
|
| 8 |
+
"url": "git://github.com/isaacs/chownr.git"
|
| 9 |
+
},
|
| 10 |
+
"files": [
|
| 11 |
+
"dist"
|
| 12 |
+
],
|
| 13 |
+
"devDependencies": {
|
| 14 |
+
"@types/node": "^20.12.5",
|
| 15 |
+
"mkdirp": "^3.0.1",
|
| 16 |
+
"prettier": "^3.2.5",
|
| 17 |
+
"rimraf": "^5.0.5",
|
| 18 |
+
"tap": "^18.7.2",
|
| 19 |
+
"tshy": "^1.13.1",
|
| 20 |
+
"typedoc": "^0.25.12"
|
| 21 |
+
},
|
| 22 |
+
"scripts": {
|
| 23 |
+
"prepare": "tshy",
|
| 24 |
+
"pretest": "npm run prepare",
|
| 25 |
+
"test": "tap",
|
| 26 |
+
"preversion": "npm test",
|
| 27 |
+
"postversion": "npm publish",
|
| 28 |
+
"prepublishOnly": "git push origin --follow-tags",
|
| 29 |
+
"format": "prettier --write . --loglevel warn",
|
| 30 |
+
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
|
| 31 |
+
},
|
| 32 |
+
"license": "BlueOak-1.0.0",
|
| 33 |
+
"engines": {
|
| 34 |
+
"node": ">=18"
|
| 35 |
+
},
|
| 36 |
+
"tshy": {
|
| 37 |
+
"exports": {
|
| 38 |
+
"./package.json": "./package.json",
|
| 39 |
+
".": "./src/index.ts"
|
| 40 |
+
}
|
| 41 |
+
},
|
| 42 |
+
"exports": {
|
| 43 |
+
"./package.json": "./package.json",
|
| 44 |
+
".": {
|
| 45 |
+
"import": {
|
| 46 |
+
"types": "./dist/esm/index.d.ts",
|
| 47 |
+
"default": "./dist/esm/index.js"
|
| 48 |
+
},
|
| 49 |
+
"require": {
|
| 50 |
+
"types": "./dist/commonjs/index.d.ts",
|
| 51 |
+
"default": "./dist/commonjs/index.js"
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
},
|
| 55 |
+
"main": "./dist/commonjs/index.js",
|
| 56 |
+
"types": "./dist/commonjs/index.d.ts",
|
| 57 |
+
"type": "module",
|
| 58 |
+
"prettier": {
|
| 59 |
+
"semi": false,
|
| 60 |
+
"printWidth": 75,
|
| 61 |
+
"tabWidth": 2,
|
| 62 |
+
"useTabs": false,
|
| 63 |
+
"singleQuote": true,
|
| 64 |
+
"jsxSingleQuote": false,
|
| 65 |
+
"bracketSameLine": true,
|
| 66 |
+
"arrowParens": "avoid",
|
| 67 |
+
"endOfLine": "lf"
|
| 68 |
+
}
|
| 69 |
+
}
|