codekingpro commited on
Commit
c6b68af
·
verified ·
1 Parent(s): 0df2a01

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. node/node_modules/npm/.npmrc +0 -0
  2. node/node_modules/npm/LICENSE +235 -0
  3. node/node_modules/npm/README.md +53 -0
  4. node/node_modules/npm/bin/npm +65 -0
  5. node/node_modules/npm/bin/npm-cli.js +2 -0
  6. node/node_modules/npm/bin/npm-prefix.js +30 -0
  7. node/node_modules/npm/bin/npm.cmd +20 -0
  8. node/node_modules/npm/bin/npm.ps1 +50 -0
  9. node/node_modules/npm/bin/npx +65 -0
  10. node/node_modules/npm/bin/npx-cli.js +130 -0
  11. node/node_modules/npm/bin/npx.cmd +20 -0
  12. node/node_modules/npm/bin/npx.ps1 +50 -0
  13. node/node_modules/npm/index.js +5 -0
  14. node/node_modules/npm/lib/arborist-cmd.js +49 -0
  15. node/node_modules/npm/lib/base-cmd.js +435 -0
  16. node/node_modules/npm/lib/cli.js +12 -0
  17. node/node_modules/npm/lib/lifecycle-cmd.js +20 -0
  18. node/node_modules/npm/lib/npm.js +525 -0
  19. node/node_modules/npm/lib/package-url-cmd.js +63 -0
  20. node/node_modules/npm/lib/trust-cmd.js +284 -0
  21. node/node_modules/npm/node_modules/abbrev/LICENSE +46 -0
  22. node/node_modules/npm/node_modules/abbrev/package.json +41 -0
  23. node/node_modules/npm/node_modules/agent-base/LICENSE +22 -0
  24. node/node_modules/npm/node_modules/agent-base/package.json +46 -0
  25. node/node_modules/npm/node_modules/aproba/LICENSE +14 -0
  26. node/node_modules/npm/node_modules/aproba/index.js +105 -0
  27. node/node_modules/npm/node_modules/aproba/package.json +35 -0
  28. node/node_modules/npm/node_modules/archy/LICENSE +18 -0
  29. node/node_modules/npm/node_modules/archy/index.js +35 -0
  30. node/node_modules/npm/node_modules/archy/package.json +40 -0
  31. node/node_modules/npm/node_modules/balanced-match/LICENSE.md +23 -0
  32. node/node_modules/npm/node_modules/balanced-match/package.json +68 -0
  33. node/node_modules/npm/node_modules/bin-links/LICENSE +15 -0
  34. node/node_modules/npm/node_modules/bin-links/package.json +61 -0
  35. node/node_modules/npm/node_modules/binary-extensions/binary-extensions.json +264 -0
  36. node/node_modules/npm/node_modules/binary-extensions/index.js +3 -0
  37. node/node_modules/npm/node_modules/binary-extensions/license +10 -0
  38. node/node_modules/npm/node_modules/binary-extensions/package.json +45 -0
  39. node/node_modules/npm/node_modules/brace-expansion/LICENSE +23 -0
  40. node/node_modules/npm/node_modules/brace-expansion/package.json +64 -0
  41. node/node_modules/npm/node_modules/cacache/LICENSE.md +16 -0
  42. node/node_modules/npm/node_modules/cacache/package.json +81 -0
  43. node/node_modules/npm/node_modules/chalk/license +9 -0
  44. node/node_modules/npm/node_modules/chalk/package.json +83 -0
  45. node/node_modules/npm/node_modules/chownr/LICENSE.md +63 -0
  46. node/node_modules/npm/node_modules/chownr/package.json +69 -0
  47. node/node_modules/npm/node_modules/ci-info/LICENSE +21 -0
  48. node/node_modules/npm/node_modules/ci-info/index.js +104 -0
  49. node/node_modules/npm/node_modules/ci-info/package.json +54 -0
  50. node/node_modules/npm/node_modules/ci-info/vendors.json +363 -0
node/node_modules/npm/.npmrc ADDED
File without changes
node/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
+ --------
node/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".
node/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" "$@"
node/node_modules/npm/bin/npm-cli.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ #!/usr/bin/env node
2
+ require('../lib/cli.js')(process)
node/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()
node/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%" %*
node/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
node/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" "$@"
node/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)
node/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%" %*
node/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
node/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
+ }
node/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
node/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
node/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))
node/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
node/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
node/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
node/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
node/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.
node/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
+ }
node/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.
node/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
+ }
node/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
+
node/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
+ }
node/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
+ }
node/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.
node/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
+ };
node/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
+ }
node/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.
node/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
+ }
node/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.
node/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
+ }
node/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
+ ]
node/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;
node/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.
node/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
+ }
node/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.
node/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.5",
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
+ }
node/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.
node/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
+ }
node/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.
node/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
+ }
node/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.***
node/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
+ }
node/node_modules/npm/node_modules/ci-info/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Thomas Watson Steen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
node/node_modules/npm/node_modules/ci-info/index.js ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict'
2
+
3
+ const vendors = require('./vendors.json')
4
+
5
+ const env = process.env
6
+
7
+ // Used for testing only
8
+ Object.defineProperty(exports, '_vendors', {
9
+ value: vendors.map(function (v) {
10
+ return v.constant
11
+ })
12
+ })
13
+
14
+ exports.name = null
15
+ exports.isPR = null
16
+ exports.id = null
17
+
18
+ if (env.CI !== 'false') {
19
+ vendors.forEach(function (vendor) {
20
+ const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
21
+ const isCI = envs.every(function (obj) {
22
+ return checkEnv(obj)
23
+ })
24
+
25
+ exports[vendor.constant] = isCI
26
+
27
+ if (!isCI) {
28
+ return
29
+ }
30
+
31
+ exports.name = vendor.name
32
+ exports.isPR = checkPR(vendor)
33
+ exports.id = vendor.constant
34
+ })
35
+ }
36
+
37
+ exports.isCI = !!(
38
+ env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'
39
+ (env.BUILD_ID || // Jenkins, Cloudbees
40
+ env.BUILD_NUMBER || // Jenkins, TeamCity
41
+ env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari, Cloudflare Pages/Workers
42
+ env.CI_APP_ID || // Appflow
43
+ env.CI_BUILD_ID || // Appflow
44
+ env.CI_BUILD_NUMBER || // Appflow
45
+ env.CI_NAME || // Codeship and others
46
+ env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
47
+ env.RUN_ID || // TaskCluster, dsari
48
+ exports.name ||
49
+ false)
50
+ )
51
+
52
+ function checkEnv (obj) {
53
+ // "env": "CIRRUS"
54
+ if (typeof obj === 'string') return !!env[obj]
55
+
56
+ // "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" }
57
+ if ('env' in obj) {
58
+ // Currently there are no other types, uncomment when there are
59
+ // if ('includes' in obj) {
60
+ return env[obj.env] && env[obj.env].includes(obj.includes)
61
+ // }
62
+ }
63
+
64
+ if ('any' in obj) {
65
+ return obj.any.some(function (k) {
66
+ return !!env[k]
67
+ })
68
+ }
69
+
70
+ return Object.keys(obj).every(function (k) {
71
+ return env[k] === obj[k]
72
+ })
73
+ }
74
+
75
+ function checkPR (vendor) {
76
+ switch (typeof vendor.pr) {
77
+ case 'string':
78
+ // "pr": "CIRRUS_PR"
79
+ return !!env[vendor.pr]
80
+ case 'object':
81
+ if ('env' in vendor.pr) {
82
+ if ('any' in vendor.pr) {
83
+ // "pr": { "env": "CODEBUILD_WEBHOOK_EVENT", "any": ["PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED"] }
84
+ return vendor.pr.any.some(function (key) {
85
+ return env[vendor.pr.env] === key
86
+ })
87
+ } else {
88
+ // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
89
+ return vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne
90
+ }
91
+ } else if ('any' in vendor.pr) {
92
+ // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
93
+ return vendor.pr.any.some(function (key) {
94
+ return !!env[key]
95
+ })
96
+ } else {
97
+ // "pr": { "DRONE_BUILD_EVENT": "pull_request" }
98
+ return checkEnv(vendor.pr)
99
+ }
100
+ default:
101
+ // PR detection not supported for this vendor
102
+ return null
103
+ }
104
+ }
node/node_modules/npm/node_modules/ci-info/package.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ci-info",
3
+ "version": "4.4.0",
4
+ "description": "Get details about the current Continuous Integration environment",
5
+ "main": "index.js",
6
+ "typings": "index.d.ts",
7
+ "type": "commonjs",
8
+ "author": "Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",
9
+ "license": "MIT",
10
+ "repository": "github:watson/ci-info",
11
+ "bugs": "https://github.com/watson/ci-info/issues",
12
+ "homepage": "https://github.com/watson/ci-info",
13
+ "contributors": [
14
+ {
15
+ "name": "Sibiraj",
16
+ "url": "https://github.com/sibiraj-s"
17
+ }
18
+ ],
19
+ "funding": [
20
+ {
21
+ "type": "github",
22
+ "url": "https://github.com/sponsors/sibiraj-s"
23
+ }
24
+ ],
25
+ "keywords": [
26
+ "ci",
27
+ "continuous",
28
+ "integration",
29
+ "test",
30
+ "detect"
31
+ ],
32
+ "files": [
33
+ "vendors.json",
34
+ "index.js",
35
+ "index.d.ts",
36
+ "CHANGELOG.md"
37
+ ],
38
+ "scripts": {
39
+ "build": "node sort-vendors.js && node create-typings.js",
40
+ "lint:fix": "standard --fix",
41
+ "test": "standard && node test.js",
42
+ "prepare": "husky install || true"
43
+ },
44
+ "devDependencies": {
45
+ "clear-module": "^4.1.2",
46
+ "husky": "^9.1.7",
47
+ "publint": "^0.3.12",
48
+ "standard": "^17.1.2",
49
+ "tape": "^5.9.0"
50
+ },
51
+ "engines": {
52
+ "node": ">=8"
53
+ }
54
+ }
node/node_modules/npm/node_modules/ci-info/vendors.json ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "Agola CI",
4
+ "constant": "AGOLA",
5
+ "env": "AGOLA_GIT_REF",
6
+ "pr": "AGOLA_PULL_REQUEST_ID"
7
+ },
8
+ {
9
+ "name": "Alpic",
10
+ "constant": "ALPIC",
11
+ "env": "ALPIC_HOST"
12
+ },
13
+ {
14
+ "name": "Appcircle",
15
+ "constant": "APPCIRCLE",
16
+ "env": "AC_APPCIRCLE",
17
+ "pr": {
18
+ "env": "AC_GIT_PR",
19
+ "ne": "false"
20
+ }
21
+ },
22
+ {
23
+ "name": "AppVeyor",
24
+ "constant": "APPVEYOR",
25
+ "env": "APPVEYOR",
26
+ "pr": "APPVEYOR_PULL_REQUEST_NUMBER"
27
+ },
28
+ {
29
+ "name": "AWS CodeBuild",
30
+ "constant": "CODEBUILD",
31
+ "env": "CODEBUILD_BUILD_ARN",
32
+ "pr": {
33
+ "env": "CODEBUILD_WEBHOOK_EVENT",
34
+ "any": [
35
+ "PULL_REQUEST_CREATED",
36
+ "PULL_REQUEST_UPDATED",
37
+ "PULL_REQUEST_REOPENED"
38
+ ]
39
+ }
40
+ },
41
+ {
42
+ "name": "Azure Pipelines",
43
+ "constant": "AZURE_PIPELINES",
44
+ "env": "TF_BUILD",
45
+ "pr": {
46
+ "BUILD_REASON": "PullRequest"
47
+ }
48
+ },
49
+ {
50
+ "name": "Bamboo",
51
+ "constant": "BAMBOO",
52
+ "env": "bamboo_planKey"
53
+ },
54
+ {
55
+ "name": "Bitbucket Pipelines",
56
+ "constant": "BITBUCKET",
57
+ "env": "BITBUCKET_COMMIT",
58
+ "pr": "BITBUCKET_PR_ID"
59
+ },
60
+ {
61
+ "name": "Bitrise",
62
+ "constant": "BITRISE",
63
+ "env": "BITRISE_IO",
64
+ "pr": "BITRISE_PULL_REQUEST"
65
+ },
66
+ {
67
+ "name": "Buddy",
68
+ "constant": "BUDDY",
69
+ "env": "BUDDY_WORKSPACE_ID",
70
+ "pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
71
+ },
72
+ {
73
+ "name": "Buildkite",
74
+ "constant": "BUILDKITE",
75
+ "env": "BUILDKITE",
76
+ "pr": {
77
+ "env": "BUILDKITE_PULL_REQUEST",
78
+ "ne": "false"
79
+ }
80
+ },
81
+ {
82
+ "name": "CircleCI",
83
+ "constant": "CIRCLE",
84
+ "env": "CIRCLECI",
85
+ "pr": "CIRCLE_PULL_REQUEST"
86
+ },
87
+ {
88
+ "name": "Cirrus CI",
89
+ "constant": "CIRRUS",
90
+ "env": "CIRRUS_CI",
91
+ "pr": "CIRRUS_PR"
92
+ },
93
+ {
94
+ "name": "Cloudflare Pages",
95
+ "constant": "CLOUDFLARE_PAGES",
96
+ "env": "CF_PAGES"
97
+ },
98
+ {
99
+ "name": "Cloudflare Workers",
100
+ "constant": "CLOUDFLARE_WORKERS",
101
+ "env": "WORKERS_CI"
102
+ },
103
+ {
104
+ "name": "Codefresh",
105
+ "constant": "CODEFRESH",
106
+ "env": "CF_BUILD_ID",
107
+ "pr": {
108
+ "any": [
109
+ "CF_PULL_REQUEST_NUMBER",
110
+ "CF_PULL_REQUEST_ID"
111
+ ]
112
+ }
113
+ },
114
+ {
115
+ "name": "Codemagic",
116
+ "constant": "CODEMAGIC",
117
+ "env": "CM_BUILD_ID",
118
+ "pr": "CM_PULL_REQUEST"
119
+ },
120
+ {
121
+ "name": "Codeship",
122
+ "constant": "CODESHIP",
123
+ "env": {
124
+ "CI_NAME": "codeship"
125
+ }
126
+ },
127
+ {
128
+ "name": "Drone",
129
+ "constant": "DRONE",
130
+ "env": "DRONE",
131
+ "pr": {
132
+ "DRONE_BUILD_EVENT": "pull_request"
133
+ }
134
+ },
135
+ {
136
+ "name": "dsari",
137
+ "constant": "DSARI",
138
+ "env": "DSARI"
139
+ },
140
+ {
141
+ "name": "Earthly",
142
+ "constant": "EARTHLY",
143
+ "env": "EARTHLY_CI"
144
+ },
145
+ {
146
+ "name": "Expo Application Services",
147
+ "constant": "EAS",
148
+ "env": "EAS_BUILD"
149
+ },
150
+ {
151
+ "name": "Gerrit",
152
+ "constant": "GERRIT",
153
+ "env": "GERRIT_PROJECT"
154
+ },
155
+ {
156
+ "name": "Gitea Actions",
157
+ "constant": "GITEA_ACTIONS",
158
+ "env": "GITEA_ACTIONS"
159
+ },
160
+ {
161
+ "name": "GitHub Actions",
162
+ "constant": "GITHUB_ACTIONS",
163
+ "env": "GITHUB_ACTIONS",
164
+ "pr": {
165
+ "GITHUB_EVENT_NAME": "pull_request"
166
+ }
167
+ },
168
+ {
169
+ "name": "GitLab CI",
170
+ "constant": "GITLAB",
171
+ "env": "GITLAB_CI",
172
+ "pr": "CI_MERGE_REQUEST_ID"
173
+ },
174
+ {
175
+ "name": "GoCD",
176
+ "constant": "GOCD",
177
+ "env": "GO_PIPELINE_LABEL"
178
+ },
179
+ {
180
+ "name": "Google Cloud Build",
181
+ "constant": "GOOGLE_CLOUD_BUILD",
182
+ "env": "BUILDER_OUTPUT"
183
+ },
184
+ {
185
+ "name": "Harness CI",
186
+ "constant": "HARNESS",
187
+ "env": "HARNESS_BUILD_ID"
188
+ },
189
+ {
190
+ "name": "Heroku",
191
+ "constant": "HEROKU",
192
+ "env": {
193
+ "env": "NODE",
194
+ "includes": "/app/.heroku/node/bin/node"
195
+ }
196
+ },
197
+ {
198
+ "name": "Hudson",
199
+ "constant": "HUDSON",
200
+ "env": "HUDSON_URL"
201
+ },
202
+ {
203
+ "name": "Jenkins",
204
+ "constant": "JENKINS",
205
+ "env": [
206
+ "JENKINS_URL",
207
+ "BUILD_ID"
208
+ ],
209
+ "pr": {
210
+ "any": [
211
+ "ghprbPullId",
212
+ "CHANGE_ID"
213
+ ]
214
+ }
215
+ },
216
+ {
217
+ "name": "LayerCI",
218
+ "constant": "LAYERCI",
219
+ "env": "LAYERCI",
220
+ "pr": "LAYERCI_PULL_REQUEST"
221
+ },
222
+ {
223
+ "name": "Magnum CI",
224
+ "constant": "MAGNUM",
225
+ "env": "MAGNUM"
226
+ },
227
+ {
228
+ "name": "Netlify CI",
229
+ "constant": "NETLIFY",
230
+ "env": "NETLIFY",
231
+ "pr": {
232
+ "env": "PULL_REQUEST",
233
+ "ne": "false"
234
+ }
235
+ },
236
+ {
237
+ "name": "Nevercode",
238
+ "constant": "NEVERCODE",
239
+ "env": "NEVERCODE",
240
+ "pr": {
241
+ "env": "NEVERCODE_PULL_REQUEST",
242
+ "ne": "false"
243
+ }
244
+ },
245
+ {
246
+ "name": "Prow",
247
+ "constant": "PROW",
248
+ "env": "PROW_JOB_ID"
249
+ },
250
+ {
251
+ "name": "ReleaseHub",
252
+ "constant": "RELEASEHUB",
253
+ "env": "RELEASE_BUILD_ID"
254
+ },
255
+ {
256
+ "name": "Render",
257
+ "constant": "RENDER",
258
+ "env": "RENDER",
259
+ "pr": {
260
+ "IS_PULL_REQUEST": "true"
261
+ }
262
+ },
263
+ {
264
+ "name": "Sail CI",
265
+ "constant": "SAIL",
266
+ "env": "SAILCI",
267
+ "pr": "SAIL_PULL_REQUEST_NUMBER"
268
+ },
269
+ {
270
+ "name": "Screwdriver",
271
+ "constant": "SCREWDRIVER",
272
+ "env": "SCREWDRIVER",
273
+ "pr": {
274
+ "env": "SD_PULL_REQUEST",
275
+ "ne": "false"
276
+ }
277
+ },
278
+ {
279
+ "name": "Semaphore",
280
+ "constant": "SEMAPHORE",
281
+ "env": "SEMAPHORE",
282
+ "pr": "PULL_REQUEST_NUMBER"
283
+ },
284
+ {
285
+ "name": "Sourcehut",
286
+ "constant": "SOURCEHUT",
287
+ "env": {
288
+ "CI_NAME": "sourcehut"
289
+ }
290
+ },
291
+ {
292
+ "name": "Strider CD",
293
+ "constant": "STRIDER",
294
+ "env": "STRIDER"
295
+ },
296
+ {
297
+ "name": "TaskCluster",
298
+ "constant": "TASKCLUSTER",
299
+ "env": [
300
+ "TASK_ID",
301
+ "RUN_ID"
302
+ ]
303
+ },
304
+ {
305
+ "name": "TeamCity",
306
+ "constant": "TEAMCITY",
307
+ "env": "TEAMCITY_VERSION"
308
+ },
309
+ {
310
+ "name": "Travis CI",
311
+ "constant": "TRAVIS",
312
+ "env": "TRAVIS",
313
+ "pr": {
314
+ "env": "TRAVIS_PULL_REQUEST",
315
+ "ne": "false"
316
+ }
317
+ },
318
+ {
319
+ "name": "Vela",
320
+ "constant": "VELA",
321
+ "env": "VELA",
322
+ "pr": {
323
+ "VELA_PULL_REQUEST": "1"
324
+ }
325
+ },
326
+ {
327
+ "name": "Vercel",
328
+ "constant": "VERCEL",
329
+ "env": {
330
+ "any": [
331
+ "NOW_BUILDER",
332
+ "VERCEL"
333
+ ]
334
+ },
335
+ "pr": "VERCEL_GIT_PULL_REQUEST_ID"
336
+ },
337
+ {
338
+ "name": "Visual Studio App Center",
339
+ "constant": "APPCENTER",
340
+ "env": "APPCENTER_BUILD_ID"
341
+ },
342
+ {
343
+ "name": "Woodpecker",
344
+ "constant": "WOODPECKER",
345
+ "env": {
346
+ "CI": "woodpecker"
347
+ },
348
+ "pr": {
349
+ "CI_BUILD_EVENT": "pull_request"
350
+ }
351
+ },
352
+ {
353
+ "name": "Xcode Cloud",
354
+ "constant": "XCODE_CLOUD",
355
+ "env": "CI_XCODE_PROJECT",
356
+ "pr": "CI_PULL_REQUEST_NUMBER"
357
+ },
358
+ {
359
+ "name": "Xcode Server",
360
+ "constant": "XCODE_SERVER",
361
+ "env": "XCS"
362
+ }
363
+ ]