vlt 0.0.0-3 → 0.0.0-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +2 -1
  2. package/package.json +17 -10
  3. package/postinstall.cjs +56 -0
  4. package/vlix +25 -0
  5. package/vlr +25 -0
  6. package/vlrx +25 -0
  7. package/vlt +25 -0
  8. package/vlx +25 -0
  9. package/cache-unzip-src-unzip.js +0 -7896
  10. package/cache-unzip-src-unzip.js.map +0 -7
  11. package/chunk-227OF2U2.js +0 -1183
  12. package/chunk-227OF2U2.js.map +0 -7
  13. package/chunk-3HXIYJS2.js +0 -54
  14. package/chunk-3HXIYJS2.js.map +0 -7
  15. package/chunk-AA6MVXJX.js +0 -19823
  16. package/chunk-AA6MVXJX.js.map +0 -7
  17. package/chunk-BCK4ZGNG.js +0 -41
  18. package/chunk-BCK4ZGNG.js.map +0 -7
  19. package/chunk-DH36SF3E.js +0 -35
  20. package/chunk-DH36SF3E.js.map +0 -7
  21. package/chunk-FNKWJ7AZ.js +0 -1379
  22. package/chunk-FNKWJ7AZ.js.map +0 -7
  23. package/chunk-H77UDCL3.js +0 -9820
  24. package/chunk-H77UDCL3.js.map +0 -7
  25. package/chunk-HL76E44L.js +0 -73
  26. package/chunk-HL76E44L.js.map +0 -7
  27. package/chunk-IN7DEH7F.js +0 -44
  28. package/chunk-IN7DEH7F.js.map +0 -7
  29. package/chunk-JLP2QDXQ.js +0 -1137
  30. package/chunk-JLP2QDXQ.js.map +0 -7
  31. package/chunk-JMGSFQ32.js +0 -969
  32. package/chunk-JMGSFQ32.js.map +0 -7
  33. package/chunk-JQRUGUZ3.js +0 -512
  34. package/chunk-JQRUGUZ3.js.map +0 -7
  35. package/chunk-K2BYYPM7.js +0 -8656
  36. package/chunk-K2BYYPM7.js.map +0 -7
  37. package/chunk-LNUDEBGP.js +0 -2071
  38. package/chunk-LNUDEBGP.js.map +0 -7
  39. package/chunk-MV5ZQ3LW.js +0 -1105
  40. package/chunk-MV5ZQ3LW.js.map +0 -7
  41. package/chunk-O7CDQZDW.js +0 -5234
  42. package/chunk-O7CDQZDW.js.map +0 -7
  43. package/chunk-OFW7MWFP.js +0 -82
  44. package/chunk-OFW7MWFP.js.map +0 -7
  45. package/chunk-PGDJ2ZZ6.js +0 -4810
  46. package/chunk-PGDJ2ZZ6.js.map +0 -7
  47. package/chunk-POVPHE2F.js +0 -1864
  48. package/chunk-POVPHE2F.js.map +0 -7
  49. package/chunk-PTVPYZHU.js +0 -72
  50. package/chunk-PTVPYZHU.js.map +0 -7
  51. package/chunk-SXBMMXTY.js +0 -11837
  52. package/chunk-SXBMMXTY.js.map +0 -7
  53. package/chunk-UZZ72UON.js +0 -152
  54. package/chunk-UZZ72UON.js.map +0 -7
  55. package/chunk-V7KRP7IO.js +0 -481
  56. package/chunk-V7KRP7IO.js.map +0 -7
  57. package/chunk-WVNUD273.js +0 -83
  58. package/chunk-WVNUD273.js.map +0 -7
  59. package/chunk-WYPE3MV4.js +0 -62
  60. package/chunk-WYPE3MV4.js.map +0 -7
  61. package/chunk-ZRNJWPYC.js +0 -37
  62. package/chunk-ZRNJWPYC.js.map +0 -7
  63. package/cli-package.json +0 -107
  64. package/config-3QQHUYLI.js +0 -179
  65. package/config-3QQHUYLI.js.map +0 -7
  66. package/devtools-5BBQJTDW.js +0 -16682
  67. package/devtools-5BBQJTDW.js.map +0 -7
  68. package/exec-C6GK336U.js +0 -50
  69. package/exec-C6GK336U.js.map +0 -7
  70. package/gui-IQ4M4K5X.js +0 -46
  71. package/gui-IQ4M4K5X.js.map +0 -7
  72. package/gui-assets/favicon.ico +0 -0
  73. package/gui-assets/fonts/geist-mono.ttf +0 -0
  74. package/gui-assets/fonts/inter.ttf +0 -0
  75. package/gui-assets/images/folder.png +0 -0
  76. package/gui-assets/index.html +0 -34
  77. package/gui-assets/index.js +0 -1549
  78. package/gui-assets/index.js.map +0 -7
  79. package/gui-assets/main.css +0 -1
  80. package/help-R6TSKVEA.js +0 -25
  81. package/help-R6TSKVEA.js.map +0 -7
  82. package/init-UTJGYULC.js +0 -25
  83. package/init-UTJGYULC.js.map +0 -7
  84. package/install-5XDTGLAU.js +0 -56
  85. package/install-5XDTGLAU.js.map +0 -7
  86. package/install-exec-VMPN3JE7.js +0 -28
  87. package/install-exec-VMPN3JE7.js.map +0 -7
  88. package/list-Q7IANZ3I.js +0 -129
  89. package/list-Q7IANZ3I.js.map +0 -7
  90. package/login-VHJEIRVU.js +0 -36
  91. package/login-VHJEIRVU.js.map +0 -7
  92. package/logout-5KMCSSR4.js +0 -36
  93. package/logout-5KMCSSR4.js.map +0 -7
  94. package/pkg-WYFDWETL.js +0 -364
  95. package/pkg-WYFDWETL.js.map +0 -7
  96. package/query-KP4F5D2Y.js +0 -117
  97. package/query-KP4F5D2Y.js.map +0 -7
  98. package/registry-client-package.json +0 -85
  99. package/reporter-LFGXWL6N.js +0 -18
  100. package/reporter-LFGXWL6N.js.map +0 -7
  101. package/rollback-remove-src-remove.js +0 -7398
  102. package/rollback-remove-src-remove.js.map +0 -7
  103. package/run-XNDZH72D.js +0 -68
  104. package/run-XNDZH72D.js.map +0 -7
  105. package/run-exec-NXA33NXJ.js +0 -41
  106. package/run-exec-NXA33NXJ.js.map +0 -7
  107. package/source-JWPG6PR3.js +0 -33
  108. package/source-JWPG6PR3.js.map +0 -7
  109. package/token-6IJNGEMI.js +0 -86
  110. package/token-6IJNGEMI.js.map +0 -7
  111. package/uninstall-MI7NFD27.js +0 -45
  112. package/uninstall-MI7NFD27.js.map +0 -7
  113. package/vlix.js +0 -25
  114. package/vlix.js.map +0 -7
  115. package/vlr.js +0 -25
  116. package/vlr.js.map +0 -7
  117. package/vlrx.js +0 -25
  118. package/vlrx.js.map +0 -7
  119. package/vlt.js +0 -24
  120. package/vlt.js.map +0 -7
  121. package/vlx.js +0 -25
  122. package/vlx.js.map +0 -7
  123. package/whoami-3IEXJF3U.js +0 -46
  124. package/whoami-3IEXJF3U.js.map +0 -7
  125. package/yoga.wasm +0 -0
package/chunk-JLP2QDXQ.js DELETED
@@ -1,1137 +0,0 @@
1
- var global = globalThis;
2
- import {Buffer} from "node:buffer";
3
- import {setImmediate, clearImmediate} from "node:timers";
4
- import {createRequire as _vlt_createRequire} from 'node:module';
5
- var require = _vlt_createRequire(import.meta.filename);
6
- import {
7
- promiseSpawn
8
- } from "./chunk-OFW7MWFP.js";
9
- import {
10
- walkUp
11
- } from "./chunk-JMGSFQ32.js";
12
- import {
13
- PackageJson
14
- } from "./chunk-POVPHE2F.js";
15
- import {
16
- error
17
- } from "./chunk-ZRNJWPYC.js";
18
- import {
19
- __commonJS,
20
- __require,
21
- __toESM
22
- } from "./chunk-3HXIYJS2.js";
23
-
24
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
25
- var require_windows = __commonJS({
26
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
27
- module.exports = isexe;
28
- isexe.sync = sync;
29
- var fs = __require("node:fs");
30
- function checkPathExt(path, options) {
31
- var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
32
- if (!pathext) {
33
- return true;
34
- }
35
- pathext = pathext.split(";");
36
- if (pathext.indexOf("") !== -1) {
37
- return true;
38
- }
39
- for (var i = 0; i < pathext.length; i++) {
40
- var p = pathext[i].toLowerCase();
41
- if (p && path.substr(-p.length).toLowerCase() === p) {
42
- return true;
43
- }
44
- }
45
- return false;
46
- }
47
- function checkStat(stat, path, options) {
48
- if (!stat.isSymbolicLink() && !stat.isFile()) {
49
- return false;
50
- }
51
- return checkPathExt(path, options);
52
- }
53
- function isexe(path, options, cb) {
54
- fs.stat(path, function(er, stat) {
55
- cb(er, er ? false : checkStat(stat, path, options));
56
- });
57
- }
58
- function sync(path, options) {
59
- return checkStat(fs.statSync(path), path, options);
60
- }
61
- }
62
- });
63
-
64
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
65
- var require_mode = __commonJS({
66
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
67
- module.exports = isexe;
68
- isexe.sync = sync;
69
- var fs = __require("node:fs");
70
- function isexe(path, options, cb) {
71
- fs.stat(path, function(er, stat) {
72
- cb(er, er ? false : checkStat(stat, options));
73
- });
74
- }
75
- function sync(path, options) {
76
- return checkStat(fs.statSync(path), options);
77
- }
78
- function checkStat(stat, options) {
79
- return stat.isFile() && checkMode(stat, options);
80
- }
81
- function checkMode(stat, options) {
82
- var mod = stat.mode;
83
- var uid = stat.uid;
84
- var gid = stat.gid;
85
- var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
86
- var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
87
- var u = parseInt("100", 8);
88
- var g = parseInt("010", 8);
89
- var o = parseInt("001", 8);
90
- var ug = u | g;
91
- var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
92
- return ret;
93
- }
94
- }
95
- });
96
-
97
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
98
- var require_isexe = __commonJS({
99
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
100
- var fs = __require("node:fs");
101
- var core;
102
- if (process.platform === "win32" || global.TESTING_WINDOWS) {
103
- core = require_windows();
104
- } else {
105
- core = require_mode();
106
- }
107
- module.exports = isexe;
108
- isexe.sync = sync;
109
- function isexe(path, options, cb) {
110
- if (typeof options === "function") {
111
- cb = options;
112
- options = {};
113
- }
114
- if (!cb) {
115
- if (typeof Promise !== "function") {
116
- throw new TypeError("callback not provided");
117
- }
118
- return new Promise(function(resolve2, reject) {
119
- isexe(path, options || {}, function(er, is) {
120
- if (er) {
121
- reject(er);
122
- } else {
123
- resolve2(is);
124
- }
125
- });
126
- });
127
- }
128
- core(path, options || {}, function(er, is) {
129
- if (er) {
130
- if (er.code === "EACCES" || options && options.ignoreErrors) {
131
- er = null;
132
- is = false;
133
- }
134
- }
135
- cb(er, is);
136
- });
137
- }
138
- function sync(path, options) {
139
- try {
140
- return core.sync(path, options || {});
141
- } catch (er) {
142
- if (options && options.ignoreErrors || er.code === "EACCES") {
143
- return false;
144
- } else {
145
- throw er;
146
- }
147
- }
148
- }
149
- }
150
- });
151
-
152
- // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
153
- var require_which = __commonJS({
154
- "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
155
- var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
156
- var path = __require("node:path");
157
- var COLON = isWindows ? ";" : ":";
158
- var isexe = require_isexe();
159
- var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
160
- var getPathInfo = (cmd, opt) => {
161
- const colon = opt.colon || COLON;
162
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
163
- // windows always checks the cwd first
164
- ...isWindows ? [process.cwd()] : [],
165
- ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
166
- "").split(colon)
167
- ];
168
- const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
169
- const pathExt = isWindows ? pathExtExe.split(colon) : [""];
170
- if (isWindows) {
171
- if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
172
- pathExt.unshift("");
173
- }
174
- return {
175
- pathEnv,
176
- pathExt,
177
- pathExtExe
178
- };
179
- };
180
- var which = (cmd, opt, cb) => {
181
- if (typeof opt === "function") {
182
- cb = opt;
183
- opt = {};
184
- }
185
- if (!opt)
186
- opt = {};
187
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
188
- const found = [];
189
- const step = (i) => new Promise((resolve2, reject) => {
190
- if (i === pathEnv.length)
191
- return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
192
- const ppRaw = pathEnv[i];
193
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
194
- const pCmd = path.join(pathPart, cmd);
195
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
196
- resolve2(subStep(p, i, 0));
197
- });
198
- const subStep = (p, i, ii) => new Promise((resolve2, reject) => {
199
- if (ii === pathExt.length)
200
- return resolve2(step(i + 1));
201
- const ext = pathExt[ii];
202
- isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
203
- if (!er && is) {
204
- if (opt.all)
205
- found.push(p + ext);
206
- else
207
- return resolve2(p + ext);
208
- }
209
- return resolve2(subStep(p, i, ii + 1));
210
- });
211
- });
212
- return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
213
- };
214
- var whichSync = (cmd, opt) => {
215
- opt = opt || {};
216
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
217
- const found = [];
218
- for (let i = 0; i < pathEnv.length; i++) {
219
- const ppRaw = pathEnv[i];
220
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
221
- const pCmd = path.join(pathPart, cmd);
222
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
223
- for (let j = 0; j < pathExt.length; j++) {
224
- const cur = p + pathExt[j];
225
- try {
226
- const is = isexe.sync(cur, { pathExt: pathExtExe });
227
- if (is) {
228
- if (opt.all)
229
- found.push(cur);
230
- else
231
- return cur;
232
- }
233
- } catch (ex) {
234
- }
235
- }
236
- }
237
- if (opt.all && found.length)
238
- return found;
239
- if (opt.nothrow)
240
- return null;
241
- throw getNotFoundError(cmd);
242
- };
243
- module.exports = which;
244
- which.sync = whichSync;
245
- }
246
- });
247
-
248
- // ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
249
- var require_path_key = __commonJS({
250
- "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) {
251
- "use strict";
252
- var pathKey = (options = {}) => {
253
- const environment = options.env || process.env;
254
- const platform = options.platform || process.platform;
255
- if (platform !== "win32") {
256
- return "PATH";
257
- }
258
- return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
259
- };
260
- module.exports = pathKey;
261
- module.exports.default = pathKey;
262
- }
263
- });
264
-
265
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
266
- var require_resolveCommand = __commonJS({
267
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
268
- "use strict";
269
- var path = __require("node:path");
270
- var which = require_which();
271
- var getPathKey = require_path_key();
272
- function resolveCommandAttempt(parsed, withoutPathExt) {
273
- const env = parsed.options.env || process.env;
274
- const cwd = process.cwd();
275
- const hasCustomCwd = parsed.options.cwd != null;
276
- const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
277
- if (shouldSwitchCwd) {
278
- try {
279
- process.chdir(parsed.options.cwd);
280
- } catch (err) {
281
- }
282
- }
283
- let resolved;
284
- try {
285
- resolved = which.sync(parsed.command, {
286
- path: env[getPathKey({ env })],
287
- pathExt: withoutPathExt ? path.delimiter : void 0
288
- });
289
- } catch (e) {
290
- } finally {
291
- if (shouldSwitchCwd) {
292
- process.chdir(cwd);
293
- }
294
- }
295
- if (resolved) {
296
- resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
297
- }
298
- return resolved;
299
- }
300
- function resolveCommand(parsed) {
301
- return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
302
- }
303
- module.exports = resolveCommand;
304
- }
305
- });
306
-
307
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
308
- var require_escape = __commonJS({
309
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
310
- "use strict";
311
- var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
312
- function escapeCommand(arg) {
313
- arg = arg.replace(metaCharsRegExp, "^$1");
314
- return arg;
315
- }
316
- function escapeArgument(arg, doubleEscapeMetaChars) {
317
- arg = `${arg}`;
318
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
319
- arg = arg.replace(/(\\*)$/, "$1$1");
320
- arg = `"${arg}"`;
321
- arg = arg.replace(metaCharsRegExp, "^$1");
322
- if (doubleEscapeMetaChars) {
323
- arg = arg.replace(metaCharsRegExp, "^$1");
324
- }
325
- return arg;
326
- }
327
- module.exports.command = escapeCommand;
328
- module.exports.argument = escapeArgument;
329
- }
330
- });
331
-
332
- // ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
333
- var require_shebang_regex = __commonJS({
334
- "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) {
335
- "use strict";
336
- module.exports = /^#!(.*)/;
337
- }
338
- });
339
-
340
- // ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
341
- var require_shebang_command = __commonJS({
342
- "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) {
343
- "use strict";
344
- var shebangRegex = require_shebang_regex();
345
- module.exports = (string = "") => {
346
- const match = string.match(shebangRegex);
347
- if (!match) {
348
- return null;
349
- }
350
- const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
351
- const binary = path.split("/").pop();
352
- if (binary === "env") {
353
- return argument;
354
- }
355
- return argument ? `${binary} ${argument}` : binary;
356
- };
357
- }
358
- });
359
-
360
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
361
- var require_readShebang = __commonJS({
362
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
363
- "use strict";
364
- var fs = __require("node:fs");
365
- var shebangCommand = require_shebang_command();
366
- function readShebang(command) {
367
- const size = 150;
368
- const buffer = Buffer.alloc(size);
369
- let fd;
370
- try {
371
- fd = fs.openSync(command, "r");
372
- fs.readSync(fd, buffer, 0, size, 0);
373
- fs.closeSync(fd);
374
- } catch (e) {
375
- }
376
- return shebangCommand(buffer.toString());
377
- }
378
- module.exports = readShebang;
379
- }
380
- });
381
-
382
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
383
- var require_parse = __commonJS({
384
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module) {
385
- "use strict";
386
- var path = __require("node:path");
387
- var resolveCommand = require_resolveCommand();
388
- var escape = require_escape();
389
- var readShebang = require_readShebang();
390
- var isWin = process.platform === "win32";
391
- var isExecutableRegExp = /\.(?:com|exe)$/i;
392
- var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
393
- function detectShebang(parsed) {
394
- parsed.file = resolveCommand(parsed);
395
- const shebang = parsed.file && readShebang(parsed.file);
396
- if (shebang) {
397
- parsed.args.unshift(parsed.file);
398
- parsed.command = shebang;
399
- return resolveCommand(parsed);
400
- }
401
- return parsed.file;
402
- }
403
- function parseNonShell(parsed) {
404
- if (!isWin) {
405
- return parsed;
406
- }
407
- const commandFile = detectShebang(parsed);
408
- const needsShell = !isExecutableRegExp.test(commandFile);
409
- if (parsed.options.forceShell || needsShell) {
410
- const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
411
- parsed.command = path.normalize(parsed.command);
412
- parsed.command = escape.command(parsed.command);
413
- parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
414
- const shellCommand = [parsed.command].concat(parsed.args).join(" ");
415
- parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
416
- parsed.command = process.env.comspec || "cmd.exe";
417
- parsed.options.windowsVerbatimArguments = true;
418
- }
419
- return parsed;
420
- }
421
- function parse(command, args, options) {
422
- if (args && !Array.isArray(args)) {
423
- options = args;
424
- args = null;
425
- }
426
- args = args ? args.slice(0) : [];
427
- options = Object.assign({}, options);
428
- const parsed = {
429
- command,
430
- args,
431
- options,
432
- file: void 0,
433
- original: {
434
- command,
435
- args
436
- }
437
- };
438
- return options.shell ? parsed : parseNonShell(parsed);
439
- }
440
- module.exports = parse;
441
- }
442
- });
443
-
444
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
445
- var require_enoent = __commonJS({
446
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
447
- "use strict";
448
- var isWin = process.platform === "win32";
449
- function notFoundError(original, syscall) {
450
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
451
- code: "ENOENT",
452
- errno: "ENOENT",
453
- syscall: `${syscall} ${original.command}`,
454
- path: original.command,
455
- spawnargs: original.args
456
- });
457
- }
458
- function hookChildProcess(cp, parsed) {
459
- if (!isWin) {
460
- return;
461
- }
462
- const originalEmit = cp.emit;
463
- cp.emit = function(name, arg1) {
464
- if (name === "exit") {
465
- const err = verifyENOENT(arg1, parsed, "spawn");
466
- if (err) {
467
- return originalEmit.call(cp, "error", err);
468
- }
469
- }
470
- return originalEmit.apply(cp, arguments);
471
- };
472
- }
473
- function verifyENOENT(status, parsed) {
474
- if (isWin && status === 1 && !parsed.file) {
475
- return notFoundError(parsed.original, "spawn");
476
- }
477
- return null;
478
- }
479
- function verifyENOENTSync(status, parsed) {
480
- if (isWin && status === 1 && !parsed.file) {
481
- return notFoundError(parsed.original, "spawnSync");
482
- }
483
- return null;
484
- }
485
- module.exports = {
486
- hookChildProcess,
487
- verifyENOENT,
488
- verifyENOENTSync,
489
- notFoundError
490
- };
491
- }
492
- });
493
-
494
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
495
- var require_cross_spawn = __commonJS({
496
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module) {
497
- "use strict";
498
- var cp = __require("node:child_process");
499
- var parse = require_parse();
500
- var enoent = require_enoent();
501
- function spawn3(command, args, options) {
502
- const parsed = parse(command, args, options);
503
- const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
504
- enoent.hookChildProcess(spawned, parsed);
505
- return spawned;
506
- }
507
- function spawnSync(command, args, options) {
508
- const parsed = parse(command, args, options);
509
- const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
510
- result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
511
- return result;
512
- }
513
- module.exports = spawn3;
514
- module.exports.spawn = spawn3;
515
- module.exports.sync = spawnSync;
516
- module.exports._parse = parse;
517
- module.exports._enoent = enoent;
518
- }
519
- });
520
-
521
- // ../../node_modules/.pnpm/foreground-child@3.3.0/node_modules/foreground-child/dist/esm/index.js
522
- var import_cross_spawn = __toESM(require_cross_spawn(), 1);
523
- import { spawn as nodeSpawn } from "node:child_process";
524
-
525
- // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
526
- var signals = [];
527
- signals.push("SIGHUP", "SIGINT", "SIGTERM");
528
- if (process.platform !== "win32") {
529
- signals.push(
530
- "SIGALRM",
531
- "SIGABRT",
532
- "SIGVTALRM",
533
- "SIGXCPU",
534
- "SIGXFSZ",
535
- "SIGUSR2",
536
- "SIGTRAP",
537
- "SIGSYS",
538
- "SIGQUIT",
539
- "SIGIOT"
540
- // should detect profiler and enable/disable accordingly.
541
- // see #21
542
- // 'SIGPROF'
543
- );
544
- }
545
- if (process.platform === "linux") {
546
- signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
547
- }
548
-
549
- // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
550
- var processOk = (process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
551
- var kExitEmitter = Symbol.for("signal-exit emitter");
552
- var global2 = globalThis;
553
- var ObjectDefineProperty = Object.defineProperty.bind(Object);
554
- var Emitter = class {
555
- emitted = {
556
- afterExit: false,
557
- exit: false
558
- };
559
- listeners = {
560
- afterExit: [],
561
- exit: []
562
- };
563
- count = 0;
564
- id = Math.random();
565
- constructor() {
566
- if (global2[kExitEmitter]) {
567
- return global2[kExitEmitter];
568
- }
569
- ObjectDefineProperty(global2, kExitEmitter, {
570
- value: this,
571
- writable: false,
572
- enumerable: false,
573
- configurable: false
574
- });
575
- }
576
- on(ev, fn) {
577
- this.listeners[ev].push(fn);
578
- }
579
- removeListener(ev, fn) {
580
- const list = this.listeners[ev];
581
- const i = list.indexOf(fn);
582
- if (i === -1) {
583
- return;
584
- }
585
- if (i === 0 && list.length === 1) {
586
- list.length = 0;
587
- } else {
588
- list.splice(i, 1);
589
- }
590
- }
591
- emit(ev, code, signal) {
592
- if (this.emitted[ev]) {
593
- return false;
594
- }
595
- this.emitted[ev] = true;
596
- let ret = false;
597
- for (const fn of this.listeners[ev]) {
598
- ret = fn(code, signal) === true || ret;
599
- }
600
- if (ev === "exit") {
601
- ret = this.emit("afterExit", code, signal) || ret;
602
- }
603
- return ret;
604
- }
605
- };
606
- var SignalExitBase = class {
607
- };
608
- var signalExitWrap = (handler) => {
609
- return {
610
- onExit(cb, opts) {
611
- return handler.onExit(cb, opts);
612
- },
613
- load() {
614
- return handler.load();
615
- },
616
- unload() {
617
- return handler.unload();
618
- }
619
- };
620
- };
621
- var SignalExitFallback = class extends SignalExitBase {
622
- onExit() {
623
- return () => {
624
- };
625
- }
626
- load() {
627
- }
628
- unload() {
629
- }
630
- };
631
- var SignalExit = class extends SignalExitBase {
632
- // "SIGHUP" throws an `ENOSYS` error on Windows,
633
- // so use a supported signal instead
634
- /* c8 ignore start */
635
- #hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
636
- /* c8 ignore stop */
637
- #emitter = new Emitter();
638
- #process;
639
- #originalProcessEmit;
640
- #originalProcessReallyExit;
641
- #sigListeners = {};
642
- #loaded = false;
643
- constructor(process3) {
644
- super();
645
- this.#process = process3;
646
- this.#sigListeners = {};
647
- for (const sig of signals) {
648
- this.#sigListeners[sig] = () => {
649
- const listeners = this.#process.listeners(sig);
650
- let { count } = this.#emitter;
651
- const p = process3;
652
- if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
653
- count += p.__signal_exit_emitter__.count;
654
- }
655
- if (listeners.length === count) {
656
- this.unload();
657
- const ret = this.#emitter.emit("exit", null, sig);
658
- const s = sig === "SIGHUP" ? this.#hupSig : sig;
659
- if (!ret)
660
- process3.kill(process3.pid, s);
661
- }
662
- };
663
- }
664
- this.#originalProcessReallyExit = process3.reallyExit;
665
- this.#originalProcessEmit = process3.emit;
666
- }
667
- onExit(cb, opts) {
668
- if (!processOk(this.#process)) {
669
- return () => {
670
- };
671
- }
672
- if (this.#loaded === false) {
673
- this.load();
674
- }
675
- const ev = opts?.alwaysLast ? "afterExit" : "exit";
676
- this.#emitter.on(ev, cb);
677
- return () => {
678
- this.#emitter.removeListener(ev, cb);
679
- if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
680
- this.unload();
681
- }
682
- };
683
- }
684
- load() {
685
- if (this.#loaded) {
686
- return;
687
- }
688
- this.#loaded = true;
689
- this.#emitter.count += 1;
690
- for (const sig of signals) {
691
- try {
692
- const fn = this.#sigListeners[sig];
693
- if (fn)
694
- this.#process.on(sig, fn);
695
- } catch (_) {
696
- }
697
- }
698
- this.#process.emit = (ev, ...a) => {
699
- return this.#processEmit(ev, ...a);
700
- };
701
- this.#process.reallyExit = (code) => {
702
- return this.#processReallyExit(code);
703
- };
704
- }
705
- unload() {
706
- if (!this.#loaded) {
707
- return;
708
- }
709
- this.#loaded = false;
710
- signals.forEach((sig) => {
711
- const listener = this.#sigListeners[sig];
712
- if (!listener) {
713
- throw new Error("Listener not defined for signal: " + sig);
714
- }
715
- try {
716
- this.#process.removeListener(sig, listener);
717
- } catch (_) {
718
- }
719
- });
720
- this.#process.emit = this.#originalProcessEmit;
721
- this.#process.reallyExit = this.#originalProcessReallyExit;
722
- this.#emitter.count -= 1;
723
- }
724
- #processReallyExit(code) {
725
- if (!processOk(this.#process)) {
726
- return 0;
727
- }
728
- this.#process.exitCode = code || 0;
729
- this.#emitter.emit("exit", this.#process.exitCode, null);
730
- return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
731
- }
732
- #processEmit(ev, ...args) {
733
- const og = this.#originalProcessEmit;
734
- if (ev === "exit" && processOk(this.#process)) {
735
- if (typeof args[0] === "number") {
736
- this.#process.exitCode = args[0];
737
- }
738
- const ret = og.call(this.#process, ev, ...args);
739
- this.#emitter.emit("exit", this.#process.exitCode, null);
740
- return ret;
741
- } else {
742
- return og.call(this.#process, ev, ...args);
743
- }
744
- }
745
- };
746
- var process2 = globalThis.process;
747
- var {
748
- /**
749
- * Called when the process is exiting, whether via signal, explicit
750
- * exit, or running out of stuff to do.
751
- *
752
- * If the global process object is not suitable for instrumentation,
753
- * then this will be a no-op.
754
- *
755
- * Returns a function that may be used to unload signal-exit.
756
- */
757
- onExit,
758
- /**
759
- * Load the listeners. Likely you never need to call this, unless
760
- * doing a rather deep integration with signal-exit functionality.
761
- * Mostly exposed for the benefit of testing.
762
- *
763
- * @internal
764
- */
765
- load,
766
- /**
767
- * Unload the listeners. Likely you never need to call this, unless
768
- * doing a rather deep integration with signal-exit functionality.
769
- * Mostly exposed for the benefit of testing.
770
- *
771
- * @internal
772
- */
773
- unload
774
- } = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback());
775
-
776
- // ../../node_modules/.pnpm/foreground-child@3.3.0/node_modules/foreground-child/dist/esm/all-signals.js
777
- import constants from "node:constants";
778
- var allSignals = (
779
- // this is the full list of signals that Node will let us do anything with
780
- Object.keys(constants).filter((k) => k.startsWith("SIG") && // https://github.com/tapjs/signal-exit/issues/21
781
- k !== "SIGPROF" && // no sense trying to listen for SIGKILL, it's impossible
782
- k !== "SIGKILL")
783
- );
784
-
785
- // ../../node_modules/.pnpm/foreground-child@3.3.0/node_modules/foreground-child/dist/esm/proxy-signals.js
786
- var proxySignals = (child) => {
787
- const listeners = /* @__PURE__ */ new Map();
788
- for (const sig of allSignals) {
789
- const listener = () => {
790
- try {
791
- child.kill(sig);
792
- } catch (_) {
793
- }
794
- };
795
- try {
796
- process.on(sig, listener);
797
- listeners.set(sig, listener);
798
- } catch (_) {
799
- }
800
- }
801
- const unproxy = () => {
802
- for (const [sig, listener] of listeners) {
803
- process.removeListener(sig, listener);
804
- }
805
- };
806
- child.on("exit", unproxy);
807
- return unproxy;
808
- };
809
-
810
- // ../../node_modules/.pnpm/foreground-child@3.3.0/node_modules/foreground-child/dist/esm/watchdog.js
811
- import { spawn } from "node:child_process";
812
- var watchdogCode = String.raw`
813
- const pid = parseInt(process.argv[1], 10)
814
- process.title = 'node (foreground-child watchdog pid=' + pid + ')'
815
- if (!isNaN(pid)) {
816
- let barked = false
817
- // keepalive
818
- const interval = setInterval(() => {}, 60000)
819
- const bark = () => {
820
- clearInterval(interval)
821
- if (barked) return
822
- barked = true
823
- process.removeListener('SIGHUP', bark)
824
- setTimeout(() => {
825
- try {
826
- process.kill(pid, 'SIGKILL')
827
- setTimeout(() => process.exit(), 200)
828
- } catch (_) {}
829
- }, 500)
830
- })
831
- process.on('SIGHUP', bark)
832
- }
833
- `;
834
- var watchdog = (child) => {
835
- let dogExited = false;
836
- const dog = spawn(process.execPath, ["-e", watchdogCode, String(child.pid)], {
837
- stdio: "ignore"
838
- });
839
- dog.on("exit", () => dogExited = true);
840
- child.on("exit", () => {
841
- if (!dogExited)
842
- dog.kill("SIGKILL");
843
- });
844
- return dog;
845
- };
846
-
847
- // ../../node_modules/.pnpm/foreground-child@3.3.0/node_modules/foreground-child/dist/esm/index.js
848
- var spawn2 = process?.platform === "win32" ? import_cross_spawn.default : nodeSpawn;
849
- var normalizeFgArgs = (fgArgs) => {
850
- let [program, args = [], spawnOpts = {}, cleanup = () => {
851
- }] = fgArgs;
852
- if (typeof args === "function") {
853
- cleanup = args;
854
- spawnOpts = {};
855
- args = [];
856
- } else if (!!args && typeof args === "object" && !Array.isArray(args)) {
857
- if (typeof spawnOpts === "function")
858
- cleanup = spawnOpts;
859
- spawnOpts = args;
860
- args = [];
861
- } else if (typeof spawnOpts === "function") {
862
- cleanup = spawnOpts;
863
- spawnOpts = {};
864
- }
865
- if (Array.isArray(program)) {
866
- const [pp, ...pa] = program;
867
- program = pp;
868
- args = pa;
869
- }
870
- return [program, args, { ...spawnOpts }, cleanup];
871
- };
872
- function foregroundChild(...fgArgs) {
873
- const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs);
874
- spawnOpts.stdio = [0, 1, 2];
875
- if (process.send) {
876
- spawnOpts.stdio.push("ipc");
877
- }
878
- const child = spawn2(program, args, spawnOpts);
879
- const childHangup = () => {
880
- try {
881
- child.kill("SIGHUP");
882
- } catch (_) {
883
- child.kill("SIGTERM");
884
- }
885
- };
886
- const removeOnExit = onExit(childHangup);
887
- proxySignals(child);
888
- const dog = watchdog(child);
889
- let done = false;
890
- child.on("close", async (code, signal) => {
891
- if (done)
892
- return;
893
- done = true;
894
- const result = cleanup(code, signal, {
895
- watchdogPid: dog.pid
896
- });
897
- const res = isPromise(result) ? await result : result;
898
- removeOnExit();
899
- if (res === false)
900
- return;
901
- else if (typeof res === "string") {
902
- signal = res;
903
- code = null;
904
- } else if (typeof res === "number") {
905
- code = res;
906
- signal = null;
907
- }
908
- if (signal) {
909
- setTimeout(() => {
910
- }, 2e3);
911
- try {
912
- process.kill(process.pid, signal);
913
- } catch (_) {
914
- process.kill(process.pid, "SIGTERM");
915
- }
916
- } else {
917
- process.exit(code || 0);
918
- }
919
- });
920
- if (process.send) {
921
- process.removeAllListeners("message");
922
- child.on("message", (message, sendHandle) => {
923
- process.send?.(message, sendHandle);
924
- });
925
- process.on("message", (message, sendHandle) => {
926
- child.send(message, sendHandle);
927
- });
928
- }
929
- return child;
930
- }
931
- var isPromise = (o) => !!o && typeof o === "object" && typeof o.then === "function";
932
-
933
- // ../../src/run/src/index.ts
934
- import { statSync } from "node:fs";
935
- import { delimiter, resolve } from "node:path";
936
- var dotBins = /* @__PURE__ */ new Map();
937
- var dirExists = (p) => {
938
- const cached = dotBins.get(p);
939
- if (cached !== void 0) return cached;
940
- try {
941
- const isDir = statSync(p).isDirectory();
942
- dotBins.set(p, isDir);
943
- return isDir;
944
- } catch {
945
- dotBins.set(p, false);
946
- return false;
947
- }
948
- };
949
- var addPaths = (projectRoot, cwd, env) => {
950
- const { PATH = "" } = env;
951
- const paths = /* @__PURE__ */ new Set();
952
- for (const p of walkUp(cwd)) {
953
- const dotBin = resolve(p, "node_modules/.bin");
954
- if (dirExists(dotBin)) paths.add(dotBin);
955
- if (p === projectRoot) break;
956
- }
957
- for (const p of PATH.split(delimiter)) {
958
- if (p) paths.add(p);
959
- }
960
- env.PATH = [...paths].join(delimiter);
961
- return env;
962
- };
963
- var run = async (options) => runImpl(options, exec, "");
964
- var runFG = async (options) => runImpl(options, execFG, null);
965
- var isRunResult = (v) => !!v && typeof v === "object" && !Array.isArray(v) && "stdout" in v && "stderr" in v && "status" in v && "signal" in v;
966
- var runImpl = async (options, execImpl, empty) => {
967
- const {
968
- arg0,
969
- packageJson = new PackageJson(),
970
- ignoreMissing = false,
971
- manifest,
972
- ...execArgs
973
- } = options;
974
- const pjPath = resolve(options.cwd, "package.json");
975
- const untrustworthy = !!(manifest?.gypfile && arg0 === "install" && manifest.scripts?.install === "node-gyp rebuild");
976
- const pj = (untrustworthy ? void 0 : manifest) ?? packageJson.read(options.cwd);
977
- const { scripts } = pj;
978
- const command = scripts?.[arg0];
979
- if (!command) {
980
- if (ignoreMissing) {
981
- return {
982
- command: "",
983
- /* c8 ignore next */
984
- args: execArgs.args ?? [],
985
- cwd: options.cwd,
986
- status: 0,
987
- signal: null,
988
- stdout: empty,
989
- stderr: empty
990
- // `as` to workaround "could be instantiated with arbitrary type".
991
- // it's private and used in 2 places, we know that it isn't.
992
- };
993
- }
994
- throw error("Script not defined in package.json", {
995
- name: arg0,
996
- cwd: options.cwd,
997
- args: options.args,
998
- path: pjPath,
999
- manifest: pj
1000
- });
1001
- }
1002
- const precommand = !options.ignorePrePost && scripts[`pre${arg0}`];
1003
- const pre = precommand ? await execImpl({
1004
- arg0: precommand,
1005
- ...execArgs,
1006
- args: [],
1007
- env: {
1008
- ...execArgs.env,
1009
- npm_package_json: pjPath,
1010
- npm_lifecycle_event: `pre${arg0}`,
1011
- npm_lifecycle_script: precommand
1012
- }
1013
- }) : void 0;
1014
- if (pre && (pre.status || pre.signal)) {
1015
- return pre;
1016
- }
1017
- const result = await execImpl({
1018
- arg0: command,
1019
- ...execArgs,
1020
- env: {
1021
- ...execArgs.env,
1022
- npm_package_json: pjPath,
1023
- npm_lifecycle_event: arg0,
1024
- npm_lifecycle_script: command
1025
- }
1026
- });
1027
- result.pre = pre;
1028
- if (result.signal || result.status) {
1029
- return result;
1030
- }
1031
- const postcommand = !options.ignorePrePost && scripts[`post${arg0}`];
1032
- if (!postcommand) return result;
1033
- const post = await execImpl({
1034
- arg0: postcommand,
1035
- ...execArgs,
1036
- args: [],
1037
- env: {
1038
- ...execArgs.env,
1039
- npm_package_json: pjPath,
1040
- npm_lifecycle_event: `post${arg0}`,
1041
- npm_lifecycle_script: postcommand
1042
- }
1043
- });
1044
- if (post.status || post.signal) {
1045
- const { status, signal } = post;
1046
- return Object.assign(result, { post, status, signal });
1047
- }
1048
- result.post = post;
1049
- return result;
1050
- };
1051
- var exec = async (options) => {
1052
- const {
1053
- arg0,
1054
- args = [],
1055
- cwd,
1056
- env = {},
1057
- projectRoot,
1058
- "script-shell": shell = true,
1059
- ...spawnOptions
1060
- } = options;
1061
- const p = promiseSpawn(arg0, args, {
1062
- ...spawnOptions,
1063
- shell,
1064
- stdio: "pipe",
1065
- stdioString: true,
1066
- cwd,
1067
- env: addPaths(projectRoot, cwd, {
1068
- ...process.env,
1069
- ...env
1070
- }),
1071
- windowsHide: true
1072
- });
1073
- proxySignals(p.process);
1074
- return await p;
1075
- };
1076
- var execFG = async (options) => {
1077
- const {
1078
- arg0,
1079
- args = [],
1080
- cwd,
1081
- projectRoot,
1082
- env = {},
1083
- "script-shell": shell = true,
1084
- ...spawnOptions
1085
- } = options;
1086
- return new Promise((res) => {
1087
- foregroundChild(
1088
- arg0,
1089
- args,
1090
- {
1091
- ...spawnOptions,
1092
- shell,
1093
- cwd,
1094
- env: addPaths(projectRoot, cwd, {
1095
- ...process.env,
1096
- ...env
1097
- })
1098
- },
1099
- (status, signal) => {
1100
- res({
1101
- command: arg0,
1102
- args,
1103
- cwd,
1104
- stdout: null,
1105
- stderr: null,
1106
- status,
1107
- signal
1108
- });
1109
- return false;
1110
- }
1111
- );
1112
- });
1113
- };
1114
- var runExecImpl = async (options, runImpl2, execImpl) => {
1115
- const { arg0, packageJson = new PackageJson(), ...args } = options;
1116
- const pj = packageJson.read(options.cwd);
1117
- const { scripts } = pj;
1118
- const command = scripts?.[arg0];
1119
- if (command) {
1120
- return runImpl2({ ...args, packageJson, arg0 });
1121
- } else {
1122
- return execImpl({ ...args, arg0 });
1123
- }
1124
- };
1125
- var runExec = async (options) => runExecImpl(options, run, exec);
1126
- var runExecFG = async (options) => runExecImpl(options, runFG, execFG);
1127
-
1128
- export {
1129
- run,
1130
- runFG,
1131
- isRunResult,
1132
- exec,
1133
- execFG,
1134
- runExec,
1135
- runExecFG
1136
- };
1137
- //# sourceMappingURL=chunk-JLP2QDXQ.js.map