vercel-cli 48.6.6__py3-none-any.whl → 50.4.6__py3-none-any.whl
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.
- vercel_cli/vendor/dist/index.js +70005 -64961
- vercel_cli/vendor/dist/vc.js +4 -3
- vercel_cli/vendor/node_modules/.package-lock.json +6 -6
- vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md +132 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/framework-helpers.d.ts +5 -4
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/framework-helpers.js +28 -2
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/node-version.js +8 -3
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/read-config-file.d.ts +6 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/read-config-file.js +11 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.d.ts +25 -6
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.js +53 -11
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/generate-node-builder-functions.d.ts +8 -2
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/generate-node-builder-functions.js +4 -2
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/index.d.ts +5 -4
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/index.js +2545 -502
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.d.ts +17 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.js +11 -1
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/python.d.ts +22 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/python.js +85 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/types.d.ts +9 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/lib/python/ast_parser.py +72 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/lib/python/tests/test_ast_parser.py +72 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/package.json +4 -4
- vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +910 -421
- vercel_cli/vendor/node_modules/@vercel/python/package.json +3 -3
- vercel_cli/vendor/node_modules/@vercel/python/vc_init.py +371 -161
- vercel_cli/vendor/node_modules/@vercel/python/vc_init_dev_asgi.py +3 -2
- vercel_cli/vendor/package.json +5 -4
- {vercel_cli-48.6.6.dist-info → vercel_cli-50.4.6.dist-info}/METADATA +1 -1
- {vercel_cli-48.6.6.dist-info → vercel_cli-50.4.6.dist-info}/RECORD +34 -30
- {vercel_cli-48.6.6.dist-info → vercel_cli-50.4.6.dist-info}/WHEEL +1 -1
- /vercel_cli/vendor/dist/{builder-worker.js → builder-worker.cjs} +0 -0
- /vercel_cli/vendor/dist/{get-latest-worker.js → get-latest-worker.cjs} +0 -0
- {vercel_cli-48.6.6.dist-info → vercel_cli-50.4.6.dist-info}/entry_points.txt +0 -0
|
@@ -318,7 +318,7 @@ var require_BufferList = __commonJS({
|
|
|
318
318
|
this.head = this.tail = null;
|
|
319
319
|
this.length = 0;
|
|
320
320
|
};
|
|
321
|
-
BufferList.prototype.join = function
|
|
321
|
+
BufferList.prototype.join = function join6(s) {
|
|
322
322
|
if (this.length === 0)
|
|
323
323
|
return "";
|
|
324
324
|
var p = this.head;
|
|
@@ -2399,56 +2399,56 @@ var require_polyfills = __commonJS({
|
|
|
2399
2399
|
}
|
|
2400
2400
|
var chdir;
|
|
2401
2401
|
module2.exports = patch;
|
|
2402
|
-
function patch(
|
|
2402
|
+
function patch(fs7) {
|
|
2403
2403
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
2404
|
-
patchLchmod(
|
|
2405
|
-
}
|
|
2406
|
-
if (!
|
|
2407
|
-
patchLutimes(
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
if (
|
|
2428
|
-
|
|
2404
|
+
patchLchmod(fs7);
|
|
2405
|
+
}
|
|
2406
|
+
if (!fs7.lutimes) {
|
|
2407
|
+
patchLutimes(fs7);
|
|
2408
|
+
}
|
|
2409
|
+
fs7.chown = chownFix(fs7.chown);
|
|
2410
|
+
fs7.fchown = chownFix(fs7.fchown);
|
|
2411
|
+
fs7.lchown = chownFix(fs7.lchown);
|
|
2412
|
+
fs7.chmod = chmodFix(fs7.chmod);
|
|
2413
|
+
fs7.fchmod = chmodFix(fs7.fchmod);
|
|
2414
|
+
fs7.lchmod = chmodFix(fs7.lchmod);
|
|
2415
|
+
fs7.chownSync = chownFixSync(fs7.chownSync);
|
|
2416
|
+
fs7.fchownSync = chownFixSync(fs7.fchownSync);
|
|
2417
|
+
fs7.lchownSync = chownFixSync(fs7.lchownSync);
|
|
2418
|
+
fs7.chmodSync = chmodFixSync(fs7.chmodSync);
|
|
2419
|
+
fs7.fchmodSync = chmodFixSync(fs7.fchmodSync);
|
|
2420
|
+
fs7.lchmodSync = chmodFixSync(fs7.lchmodSync);
|
|
2421
|
+
fs7.stat = statFix(fs7.stat);
|
|
2422
|
+
fs7.fstat = statFix(fs7.fstat);
|
|
2423
|
+
fs7.lstat = statFix(fs7.lstat);
|
|
2424
|
+
fs7.statSync = statFixSync(fs7.statSync);
|
|
2425
|
+
fs7.fstatSync = statFixSync(fs7.fstatSync);
|
|
2426
|
+
fs7.lstatSync = statFixSync(fs7.lstatSync);
|
|
2427
|
+
if (fs7.chmod && !fs7.lchmod) {
|
|
2428
|
+
fs7.lchmod = function(path7, mode, cb) {
|
|
2429
2429
|
if (cb)
|
|
2430
2430
|
process.nextTick(cb);
|
|
2431
2431
|
};
|
|
2432
|
-
|
|
2432
|
+
fs7.lchmodSync = function() {
|
|
2433
2433
|
};
|
|
2434
2434
|
}
|
|
2435
|
-
if (
|
|
2436
|
-
|
|
2435
|
+
if (fs7.chown && !fs7.lchown) {
|
|
2436
|
+
fs7.lchown = function(path7, uid, gid, cb) {
|
|
2437
2437
|
if (cb)
|
|
2438
2438
|
process.nextTick(cb);
|
|
2439
2439
|
};
|
|
2440
|
-
|
|
2440
|
+
fs7.lchownSync = function() {
|
|
2441
2441
|
};
|
|
2442
2442
|
}
|
|
2443
2443
|
if (platform === "win32") {
|
|
2444
|
-
|
|
2444
|
+
fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : function(fs$rename) {
|
|
2445
2445
|
function rename2(from, to, cb) {
|
|
2446
2446
|
var start = Date.now();
|
|
2447
2447
|
var backoff = 0;
|
|
2448
2448
|
fs$rename(from, to, function CB(er) {
|
|
2449
2449
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
2450
2450
|
setTimeout(function() {
|
|
2451
|
-
|
|
2451
|
+
fs7.stat(to, function(stater, st) {
|
|
2452
2452
|
if (stater && stater.code === "ENOENT")
|
|
2453
2453
|
fs$rename(from, to, CB);
|
|
2454
2454
|
else
|
|
@@ -2466,9 +2466,9 @@ var require_polyfills = __commonJS({
|
|
|
2466
2466
|
if (Object.setPrototypeOf)
|
|
2467
2467
|
Object.setPrototypeOf(rename2, fs$rename);
|
|
2468
2468
|
return rename2;
|
|
2469
|
-
}(
|
|
2469
|
+
}(fs7.rename);
|
|
2470
2470
|
}
|
|
2471
|
-
|
|
2471
|
+
fs7.read = typeof fs7.read !== "function" ? fs7.read : function(fs$read) {
|
|
2472
2472
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
2473
2473
|
var callback;
|
|
2474
2474
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -2476,23 +2476,23 @@ var require_polyfills = __commonJS({
|
|
|
2476
2476
|
callback = function(er, _, __) {
|
|
2477
2477
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
2478
2478
|
eagCounter++;
|
|
2479
|
-
return fs$read.call(
|
|
2479
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
2480
2480
|
}
|
|
2481
2481
|
callback_.apply(this, arguments);
|
|
2482
2482
|
};
|
|
2483
2483
|
}
|
|
2484
|
-
return fs$read.call(
|
|
2484
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
2485
2485
|
}
|
|
2486
2486
|
if (Object.setPrototypeOf)
|
|
2487
2487
|
Object.setPrototypeOf(read, fs$read);
|
|
2488
2488
|
return read;
|
|
2489
|
-
}(
|
|
2490
|
-
|
|
2489
|
+
}(fs7.read);
|
|
2490
|
+
fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : function(fs$readSync) {
|
|
2491
2491
|
return function(fd, buffer, offset, length, position) {
|
|
2492
2492
|
var eagCounter = 0;
|
|
2493
2493
|
while (true) {
|
|
2494
2494
|
try {
|
|
2495
|
-
return fs$readSync.call(
|
|
2495
|
+
return fs$readSync.call(fs7, fd, buffer, offset, length, position);
|
|
2496
2496
|
} catch (er) {
|
|
2497
2497
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
2498
2498
|
eagCounter++;
|
|
@@ -2502,10 +2502,10 @@ var require_polyfills = __commonJS({
|
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
2504
|
};
|
|
2505
|
-
}(
|
|
2506
|
-
function patchLchmod(
|
|
2507
|
-
|
|
2508
|
-
|
|
2505
|
+
}(fs7.readSync);
|
|
2506
|
+
function patchLchmod(fs8) {
|
|
2507
|
+
fs8.lchmod = function(path7, mode, callback) {
|
|
2508
|
+
fs8.open(
|
|
2509
2509
|
path7,
|
|
2510
2510
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
2511
2511
|
mode,
|
|
@@ -2515,8 +2515,8 @@ var require_polyfills = __commonJS({
|
|
|
2515
2515
|
callback(err);
|
|
2516
2516
|
return;
|
|
2517
2517
|
}
|
|
2518
|
-
|
|
2519
|
-
|
|
2518
|
+
fs8.fchmod(fd, mode, function(err2) {
|
|
2519
|
+
fs8.close(fd, function(err22) {
|
|
2520
2520
|
if (callback)
|
|
2521
2521
|
callback(err2 || err22);
|
|
2522
2522
|
});
|
|
@@ -2524,68 +2524,68 @@ var require_polyfills = __commonJS({
|
|
|
2524
2524
|
}
|
|
2525
2525
|
);
|
|
2526
2526
|
};
|
|
2527
|
-
|
|
2528
|
-
var fd =
|
|
2527
|
+
fs8.lchmodSync = function(path7, mode) {
|
|
2528
|
+
var fd = fs8.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
2529
2529
|
var threw = true;
|
|
2530
2530
|
var ret;
|
|
2531
2531
|
try {
|
|
2532
|
-
ret =
|
|
2532
|
+
ret = fs8.fchmodSync(fd, mode);
|
|
2533
2533
|
threw = false;
|
|
2534
2534
|
} finally {
|
|
2535
2535
|
if (threw) {
|
|
2536
2536
|
try {
|
|
2537
|
-
|
|
2537
|
+
fs8.closeSync(fd);
|
|
2538
2538
|
} catch (er) {
|
|
2539
2539
|
}
|
|
2540
2540
|
} else {
|
|
2541
|
-
|
|
2541
|
+
fs8.closeSync(fd);
|
|
2542
2542
|
}
|
|
2543
2543
|
}
|
|
2544
2544
|
return ret;
|
|
2545
2545
|
};
|
|
2546
2546
|
}
|
|
2547
|
-
function patchLutimes(
|
|
2548
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
2549
|
-
|
|
2550
|
-
|
|
2547
|
+
function patchLutimes(fs8) {
|
|
2548
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs8.futimes) {
|
|
2549
|
+
fs8.lutimes = function(path7, at, mt, cb) {
|
|
2550
|
+
fs8.open(path7, constants.O_SYMLINK, function(er, fd) {
|
|
2551
2551
|
if (er) {
|
|
2552
2552
|
if (cb)
|
|
2553
2553
|
cb(er);
|
|
2554
2554
|
return;
|
|
2555
2555
|
}
|
|
2556
|
-
|
|
2557
|
-
|
|
2556
|
+
fs8.futimes(fd, at, mt, function(er2) {
|
|
2557
|
+
fs8.close(fd, function(er22) {
|
|
2558
2558
|
if (cb)
|
|
2559
2559
|
cb(er2 || er22);
|
|
2560
2560
|
});
|
|
2561
2561
|
});
|
|
2562
2562
|
});
|
|
2563
2563
|
};
|
|
2564
|
-
|
|
2565
|
-
var fd =
|
|
2564
|
+
fs8.lutimesSync = function(path7, at, mt) {
|
|
2565
|
+
var fd = fs8.openSync(path7, constants.O_SYMLINK);
|
|
2566
2566
|
var ret;
|
|
2567
2567
|
var threw = true;
|
|
2568
2568
|
try {
|
|
2569
|
-
ret =
|
|
2569
|
+
ret = fs8.futimesSync(fd, at, mt);
|
|
2570
2570
|
threw = false;
|
|
2571
2571
|
} finally {
|
|
2572
2572
|
if (threw) {
|
|
2573
2573
|
try {
|
|
2574
|
-
|
|
2574
|
+
fs8.closeSync(fd);
|
|
2575
2575
|
} catch (er) {
|
|
2576
2576
|
}
|
|
2577
2577
|
} else {
|
|
2578
|
-
|
|
2578
|
+
fs8.closeSync(fd);
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
2581
2581
|
return ret;
|
|
2582
2582
|
};
|
|
2583
|
-
} else if (
|
|
2584
|
-
|
|
2583
|
+
} else if (fs8.futimes) {
|
|
2584
|
+
fs8.lutimes = function(_a, _b, _c, cb) {
|
|
2585
2585
|
if (cb)
|
|
2586
2586
|
process.nextTick(cb);
|
|
2587
2587
|
};
|
|
2588
|
-
|
|
2588
|
+
fs8.lutimesSync = function() {
|
|
2589
2589
|
};
|
|
2590
2590
|
}
|
|
2591
2591
|
}
|
|
@@ -2593,7 +2593,7 @@ var require_polyfills = __commonJS({
|
|
|
2593
2593
|
if (!orig)
|
|
2594
2594
|
return orig;
|
|
2595
2595
|
return function(target, mode, cb) {
|
|
2596
|
-
return orig.call(
|
|
2596
|
+
return orig.call(fs7, target, mode, function(er) {
|
|
2597
2597
|
if (chownErOk(er))
|
|
2598
2598
|
er = null;
|
|
2599
2599
|
if (cb)
|
|
@@ -2606,7 +2606,7 @@ var require_polyfills = __commonJS({
|
|
|
2606
2606
|
return orig;
|
|
2607
2607
|
return function(target, mode) {
|
|
2608
2608
|
try {
|
|
2609
|
-
return orig.call(
|
|
2609
|
+
return orig.call(fs7, target, mode);
|
|
2610
2610
|
} catch (er) {
|
|
2611
2611
|
if (!chownErOk(er))
|
|
2612
2612
|
throw er;
|
|
@@ -2617,7 +2617,7 @@ var require_polyfills = __commonJS({
|
|
|
2617
2617
|
if (!orig)
|
|
2618
2618
|
return orig;
|
|
2619
2619
|
return function(target, uid, gid, cb) {
|
|
2620
|
-
return orig.call(
|
|
2620
|
+
return orig.call(fs7, target, uid, gid, function(er) {
|
|
2621
2621
|
if (chownErOk(er))
|
|
2622
2622
|
er = null;
|
|
2623
2623
|
if (cb)
|
|
@@ -2630,7 +2630,7 @@ var require_polyfills = __commonJS({
|
|
|
2630
2630
|
return orig;
|
|
2631
2631
|
return function(target, uid, gid) {
|
|
2632
2632
|
try {
|
|
2633
|
-
return orig.call(
|
|
2633
|
+
return orig.call(fs7, target, uid, gid);
|
|
2634
2634
|
} catch (er) {
|
|
2635
2635
|
if (!chownErOk(er))
|
|
2636
2636
|
throw er;
|
|
@@ -2655,14 +2655,14 @@ var require_polyfills = __commonJS({
|
|
|
2655
2655
|
if (cb)
|
|
2656
2656
|
cb.apply(this, arguments);
|
|
2657
2657
|
}
|
|
2658
|
-
return options ? orig.call(
|
|
2658
|
+
return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback);
|
|
2659
2659
|
};
|
|
2660
2660
|
}
|
|
2661
2661
|
function statFixSync(orig) {
|
|
2662
2662
|
if (!orig)
|
|
2663
2663
|
return orig;
|
|
2664
2664
|
return function(target, options) {
|
|
2665
|
-
var stats = options ? orig.call(
|
|
2665
|
+
var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target);
|
|
2666
2666
|
if (stats) {
|
|
2667
2667
|
if (stats.uid < 0)
|
|
2668
2668
|
stats.uid += 4294967296;
|
|
@@ -2693,7 +2693,7 @@ var require_legacy_streams = __commonJS({
|
|
|
2693
2693
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
2694
2694
|
var Stream = require("stream").Stream;
|
|
2695
2695
|
module2.exports = legacy;
|
|
2696
|
-
function legacy(
|
|
2696
|
+
function legacy(fs7) {
|
|
2697
2697
|
return {
|
|
2698
2698
|
ReadStream,
|
|
2699
2699
|
WriteStream
|
|
@@ -2738,7 +2738,7 @@ var require_legacy_streams = __commonJS({
|
|
|
2738
2738
|
});
|
|
2739
2739
|
return;
|
|
2740
2740
|
}
|
|
2741
|
-
|
|
2741
|
+
fs7.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
2742
2742
|
if (err) {
|
|
2743
2743
|
self2.emit("error", err);
|
|
2744
2744
|
self2.readable = false;
|
|
@@ -2778,7 +2778,7 @@ var require_legacy_streams = __commonJS({
|
|
|
2778
2778
|
this.busy = false;
|
|
2779
2779
|
this._queue = [];
|
|
2780
2780
|
if (this.fd === null) {
|
|
2781
|
-
this._open =
|
|
2781
|
+
this._open = fs7.open;
|
|
2782
2782
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
2783
2783
|
this.flush();
|
|
2784
2784
|
}
|
|
@@ -2813,7 +2813,7 @@ var require_clone = __commonJS({
|
|
|
2813
2813
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
2814
2814
|
var require_graceful_fs = __commonJS({
|
|
2815
2815
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
2816
|
-
var
|
|
2816
|
+
var fs7 = require("fs");
|
|
2817
2817
|
var polyfills = require_polyfills();
|
|
2818
2818
|
var legacy = require_legacy_streams();
|
|
2819
2819
|
var clone = require_clone();
|
|
@@ -2845,12 +2845,12 @@ var require_graceful_fs = __commonJS({
|
|
|
2845
2845
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
2846
2846
|
console.error(m);
|
|
2847
2847
|
};
|
|
2848
|
-
if (!
|
|
2848
|
+
if (!fs7[gracefulQueue]) {
|
|
2849
2849
|
queue = global[gracefulQueue] || [];
|
|
2850
|
-
publishQueue(
|
|
2851
|
-
|
|
2850
|
+
publishQueue(fs7, queue);
|
|
2851
|
+
fs7.close = function(fs$close) {
|
|
2852
2852
|
function close(fd, cb) {
|
|
2853
|
-
return fs$close.call(
|
|
2853
|
+
return fs$close.call(fs7, fd, function(err) {
|
|
2854
2854
|
if (!err) {
|
|
2855
2855
|
resetQueue();
|
|
2856
2856
|
}
|
|
@@ -2862,40 +2862,40 @@ var require_graceful_fs = __commonJS({
|
|
|
2862
2862
|
value: fs$close
|
|
2863
2863
|
});
|
|
2864
2864
|
return close;
|
|
2865
|
-
}(
|
|
2866
|
-
|
|
2865
|
+
}(fs7.close);
|
|
2866
|
+
fs7.closeSync = function(fs$closeSync) {
|
|
2867
2867
|
function closeSync(fd) {
|
|
2868
|
-
fs$closeSync.apply(
|
|
2868
|
+
fs$closeSync.apply(fs7, arguments);
|
|
2869
2869
|
resetQueue();
|
|
2870
2870
|
}
|
|
2871
2871
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
2872
2872
|
value: fs$closeSync
|
|
2873
2873
|
});
|
|
2874
2874
|
return closeSync;
|
|
2875
|
-
}(
|
|
2875
|
+
}(fs7.closeSync);
|
|
2876
2876
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
2877
2877
|
process.on("exit", function() {
|
|
2878
|
-
debug2(
|
|
2879
|
-
require("assert").equal(
|
|
2878
|
+
debug2(fs7[gracefulQueue]);
|
|
2879
|
+
require("assert").equal(fs7[gracefulQueue].length, 0);
|
|
2880
2880
|
});
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
2883
|
var queue;
|
|
2884
2884
|
if (!global[gracefulQueue]) {
|
|
2885
|
-
publishQueue(global,
|
|
2886
|
-
}
|
|
2887
|
-
module2.exports = patch(clone(
|
|
2888
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
2889
|
-
module2.exports = patch(
|
|
2890
|
-
|
|
2891
|
-
}
|
|
2892
|
-
function patch(
|
|
2893
|
-
polyfills(
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
var fs$readFile =
|
|
2898
|
-
|
|
2885
|
+
publishQueue(global, fs7[gracefulQueue]);
|
|
2886
|
+
}
|
|
2887
|
+
module2.exports = patch(clone(fs7));
|
|
2888
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) {
|
|
2889
|
+
module2.exports = patch(fs7);
|
|
2890
|
+
fs7.__patched = true;
|
|
2891
|
+
}
|
|
2892
|
+
function patch(fs8) {
|
|
2893
|
+
polyfills(fs8);
|
|
2894
|
+
fs8.gracefulify = patch;
|
|
2895
|
+
fs8.createReadStream = createReadStream;
|
|
2896
|
+
fs8.createWriteStream = createWriteStream;
|
|
2897
|
+
var fs$readFile = fs8.readFile;
|
|
2898
|
+
fs8.readFile = readFile4;
|
|
2899
2899
|
function readFile4(path7, options, cb) {
|
|
2900
2900
|
if (typeof options === "function")
|
|
2901
2901
|
cb = options, options = null;
|
|
@@ -2911,8 +2911,8 @@ var require_graceful_fs = __commonJS({
|
|
|
2911
2911
|
});
|
|
2912
2912
|
}
|
|
2913
2913
|
}
|
|
2914
|
-
var fs$writeFile =
|
|
2915
|
-
|
|
2914
|
+
var fs$writeFile = fs8.writeFile;
|
|
2915
|
+
fs8.writeFile = writeFile;
|
|
2916
2916
|
function writeFile(path7, data, options, cb) {
|
|
2917
2917
|
if (typeof options === "function")
|
|
2918
2918
|
cb = options, options = null;
|
|
@@ -2928,9 +2928,9 @@ var require_graceful_fs = __commonJS({
|
|
|
2928
2928
|
});
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
|
-
var fs$appendFile =
|
|
2931
|
+
var fs$appendFile = fs8.appendFile;
|
|
2932
2932
|
if (fs$appendFile)
|
|
2933
|
-
|
|
2933
|
+
fs8.appendFile = appendFile;
|
|
2934
2934
|
function appendFile(path7, data, options, cb) {
|
|
2935
2935
|
if (typeof options === "function")
|
|
2936
2936
|
cb = options, options = null;
|
|
@@ -2946,9 +2946,9 @@ var require_graceful_fs = __commonJS({
|
|
|
2946
2946
|
});
|
|
2947
2947
|
}
|
|
2948
2948
|
}
|
|
2949
|
-
var fs$copyFile =
|
|
2949
|
+
var fs$copyFile = fs8.copyFile;
|
|
2950
2950
|
if (fs$copyFile)
|
|
2951
|
-
|
|
2951
|
+
fs8.copyFile = copyFile;
|
|
2952
2952
|
function copyFile(src, dest, flags, cb) {
|
|
2953
2953
|
if (typeof flags === "function") {
|
|
2954
2954
|
cb = flags;
|
|
@@ -2966,8 +2966,8 @@ var require_graceful_fs = __commonJS({
|
|
|
2966
2966
|
});
|
|
2967
2967
|
}
|
|
2968
2968
|
}
|
|
2969
|
-
var fs$readdir =
|
|
2970
|
-
|
|
2969
|
+
var fs$readdir = fs8.readdir;
|
|
2970
|
+
fs8.readdir = readdir;
|
|
2971
2971
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
2972
2972
|
function readdir(path7, options, cb) {
|
|
2973
2973
|
if (typeof options === "function")
|
|
@@ -3008,21 +3008,21 @@ var require_graceful_fs = __commonJS({
|
|
|
3008
3008
|
}
|
|
3009
3009
|
}
|
|
3010
3010
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
3011
|
-
var legStreams = legacy(
|
|
3011
|
+
var legStreams = legacy(fs8);
|
|
3012
3012
|
ReadStream = legStreams.ReadStream;
|
|
3013
3013
|
WriteStream = legStreams.WriteStream;
|
|
3014
3014
|
}
|
|
3015
|
-
var fs$ReadStream =
|
|
3015
|
+
var fs$ReadStream = fs8.ReadStream;
|
|
3016
3016
|
if (fs$ReadStream) {
|
|
3017
3017
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
3018
3018
|
ReadStream.prototype.open = ReadStream$open;
|
|
3019
3019
|
}
|
|
3020
|
-
var fs$WriteStream =
|
|
3020
|
+
var fs$WriteStream = fs8.WriteStream;
|
|
3021
3021
|
if (fs$WriteStream) {
|
|
3022
3022
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
3023
3023
|
WriteStream.prototype.open = WriteStream$open;
|
|
3024
3024
|
}
|
|
3025
|
-
Object.defineProperty(
|
|
3025
|
+
Object.defineProperty(fs8, "ReadStream", {
|
|
3026
3026
|
get: function() {
|
|
3027
3027
|
return ReadStream;
|
|
3028
3028
|
},
|
|
@@ -3032,7 +3032,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3032
3032
|
enumerable: true,
|
|
3033
3033
|
configurable: true
|
|
3034
3034
|
});
|
|
3035
|
-
Object.defineProperty(
|
|
3035
|
+
Object.defineProperty(fs8, "WriteStream", {
|
|
3036
3036
|
get: function() {
|
|
3037
3037
|
return WriteStream;
|
|
3038
3038
|
},
|
|
@@ -3043,7 +3043,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3043
3043
|
configurable: true
|
|
3044
3044
|
});
|
|
3045
3045
|
var FileReadStream = ReadStream;
|
|
3046
|
-
Object.defineProperty(
|
|
3046
|
+
Object.defineProperty(fs8, "FileReadStream", {
|
|
3047
3047
|
get: function() {
|
|
3048
3048
|
return FileReadStream;
|
|
3049
3049
|
},
|
|
@@ -3054,7 +3054,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3054
3054
|
configurable: true
|
|
3055
3055
|
});
|
|
3056
3056
|
var FileWriteStream = WriteStream;
|
|
3057
|
-
Object.defineProperty(
|
|
3057
|
+
Object.defineProperty(fs8, "FileWriteStream", {
|
|
3058
3058
|
get: function() {
|
|
3059
3059
|
return FileWriteStream;
|
|
3060
3060
|
},
|
|
@@ -3103,13 +3103,13 @@ var require_graceful_fs = __commonJS({
|
|
|
3103
3103
|
});
|
|
3104
3104
|
}
|
|
3105
3105
|
function createReadStream(path7, options) {
|
|
3106
|
-
return new
|
|
3106
|
+
return new fs8.ReadStream(path7, options);
|
|
3107
3107
|
}
|
|
3108
3108
|
function createWriteStream(path7, options) {
|
|
3109
|
-
return new
|
|
3109
|
+
return new fs8.WriteStream(path7, options);
|
|
3110
3110
|
}
|
|
3111
|
-
var fs$open =
|
|
3112
|
-
|
|
3111
|
+
var fs$open = fs8.open;
|
|
3112
|
+
fs8.open = open;
|
|
3113
3113
|
function open(path7, flags, mode, cb) {
|
|
3114
3114
|
if (typeof mode === "function")
|
|
3115
3115
|
cb = mode, mode = null;
|
|
@@ -3125,20 +3125,20 @@ var require_graceful_fs = __commonJS({
|
|
|
3125
3125
|
});
|
|
3126
3126
|
}
|
|
3127
3127
|
}
|
|
3128
|
-
return
|
|
3128
|
+
return fs8;
|
|
3129
3129
|
}
|
|
3130
3130
|
function enqueue(elem) {
|
|
3131
3131
|
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
3132
|
-
|
|
3132
|
+
fs7[gracefulQueue].push(elem);
|
|
3133
3133
|
retry2();
|
|
3134
3134
|
}
|
|
3135
3135
|
var retryTimer;
|
|
3136
3136
|
function resetQueue() {
|
|
3137
3137
|
var now = Date.now();
|
|
3138
|
-
for (var i = 0; i <
|
|
3139
|
-
if (
|
|
3140
|
-
|
|
3141
|
-
|
|
3138
|
+
for (var i = 0; i < fs7[gracefulQueue].length; ++i) {
|
|
3139
|
+
if (fs7[gracefulQueue][i].length > 2) {
|
|
3140
|
+
fs7[gracefulQueue][i][3] = now;
|
|
3141
|
+
fs7[gracefulQueue][i][4] = now;
|
|
3142
3142
|
}
|
|
3143
3143
|
}
|
|
3144
3144
|
retry2();
|
|
@@ -3146,9 +3146,9 @@ var require_graceful_fs = __commonJS({
|
|
|
3146
3146
|
function retry2() {
|
|
3147
3147
|
clearTimeout(retryTimer);
|
|
3148
3148
|
retryTimer = void 0;
|
|
3149
|
-
if (
|
|
3149
|
+
if (fs7[gracefulQueue].length === 0)
|
|
3150
3150
|
return;
|
|
3151
|
-
var elem =
|
|
3151
|
+
var elem = fs7[gracefulQueue].shift();
|
|
3152
3152
|
var fn = elem[0];
|
|
3153
3153
|
var args = elem[1];
|
|
3154
3154
|
var err = elem[2];
|
|
@@ -3170,7 +3170,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3170
3170
|
debug2("RETRY", fn.name, args);
|
|
3171
3171
|
fn.apply(null, args.concat([startTime]));
|
|
3172
3172
|
} else {
|
|
3173
|
-
|
|
3173
|
+
fs7[gracefulQueue].push(elem);
|
|
3174
3174
|
}
|
|
3175
3175
|
}
|
|
3176
3176
|
if (retryTimer === void 0) {
|
|
@@ -3185,7 +3185,7 @@ var require_fs = __commonJS({
|
|
|
3185
3185
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/fs/index.js"(exports2) {
|
|
3186
3186
|
"use strict";
|
|
3187
3187
|
var u = require_universalify().fromCallback;
|
|
3188
|
-
var
|
|
3188
|
+
var fs7 = require_graceful_fs();
|
|
3189
3189
|
var api = [
|
|
3190
3190
|
"access",
|
|
3191
3191
|
"appendFile",
|
|
@@ -3222,27 +3222,27 @@ var require_fs = __commonJS({
|
|
|
3222
3222
|
"utimes",
|
|
3223
3223
|
"writeFile"
|
|
3224
3224
|
].filter((key) => {
|
|
3225
|
-
return typeof
|
|
3225
|
+
return typeof fs7[key] === "function";
|
|
3226
3226
|
});
|
|
3227
|
-
Object.assign(exports2,
|
|
3227
|
+
Object.assign(exports2, fs7);
|
|
3228
3228
|
api.forEach((method) => {
|
|
3229
|
-
exports2[method] = u(
|
|
3229
|
+
exports2[method] = u(fs7[method]);
|
|
3230
3230
|
});
|
|
3231
|
-
exports2.realpath.native = u(
|
|
3231
|
+
exports2.realpath.native = u(fs7.realpath.native);
|
|
3232
3232
|
exports2.exists = function(filename, callback) {
|
|
3233
3233
|
if (typeof callback === "function") {
|
|
3234
|
-
return
|
|
3234
|
+
return fs7.exists(filename, callback);
|
|
3235
3235
|
}
|
|
3236
3236
|
return new Promise((resolve) => {
|
|
3237
|
-
return
|
|
3237
|
+
return fs7.exists(filename, resolve);
|
|
3238
3238
|
});
|
|
3239
3239
|
};
|
|
3240
3240
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
3241
3241
|
if (typeof callback === "function") {
|
|
3242
|
-
return
|
|
3242
|
+
return fs7.read(fd, buffer, offset, length, position, callback);
|
|
3243
3243
|
}
|
|
3244
3244
|
return new Promise((resolve, reject) => {
|
|
3245
|
-
|
|
3245
|
+
fs7.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
3246
3246
|
if (err)
|
|
3247
3247
|
return reject(err);
|
|
3248
3248
|
resolve({ bytesRead, buffer: buffer2 });
|
|
@@ -3251,23 +3251,23 @@ var require_fs = __commonJS({
|
|
|
3251
3251
|
};
|
|
3252
3252
|
exports2.write = function(fd, buffer, ...args) {
|
|
3253
3253
|
if (typeof args[args.length - 1] === "function") {
|
|
3254
|
-
return
|
|
3254
|
+
return fs7.write(fd, buffer, ...args);
|
|
3255
3255
|
}
|
|
3256
3256
|
return new Promise((resolve, reject) => {
|
|
3257
|
-
|
|
3257
|
+
fs7.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
3258
3258
|
if (err)
|
|
3259
3259
|
return reject(err);
|
|
3260
3260
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
3261
3261
|
});
|
|
3262
3262
|
});
|
|
3263
3263
|
};
|
|
3264
|
-
if (typeof
|
|
3264
|
+
if (typeof fs7.writev === "function") {
|
|
3265
3265
|
exports2.writev = function(fd, buffers, ...args) {
|
|
3266
3266
|
if (typeof args[args.length - 1] === "function") {
|
|
3267
|
-
return
|
|
3267
|
+
return fs7.writev(fd, buffers, ...args);
|
|
3268
3268
|
}
|
|
3269
3269
|
return new Promise((resolve, reject) => {
|
|
3270
|
-
|
|
3270
|
+
fs7.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
3271
3271
|
if (err)
|
|
3272
3272
|
return reject(err);
|
|
3273
3273
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
@@ -3300,7 +3300,7 @@ var require_utils = __commonJS({
|
|
|
3300
3300
|
var require_make_dir = __commonJS({
|
|
3301
3301
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
|
|
3302
3302
|
"use strict";
|
|
3303
|
-
var
|
|
3303
|
+
var fs7 = require_fs();
|
|
3304
3304
|
var { checkPath } = require_utils();
|
|
3305
3305
|
var getMode = (options) => {
|
|
3306
3306
|
const defaults = { mode: 511 };
|
|
@@ -3310,14 +3310,14 @@ var require_make_dir = __commonJS({
|
|
|
3310
3310
|
};
|
|
3311
3311
|
module2.exports.makeDir = async (dir, options) => {
|
|
3312
3312
|
checkPath(dir);
|
|
3313
|
-
return
|
|
3313
|
+
return fs7.mkdir(dir, {
|
|
3314
3314
|
mode: getMode(options),
|
|
3315
3315
|
recursive: true
|
|
3316
3316
|
});
|
|
3317
3317
|
};
|
|
3318
3318
|
module2.exports.makeDirSync = (dir, options) => {
|
|
3319
3319
|
checkPath(dir);
|
|
3320
|
-
return
|
|
3320
|
+
return fs7.mkdirSync(dir, {
|
|
3321
3321
|
mode: getMode(options),
|
|
3322
3322
|
recursive: true
|
|
3323
3323
|
});
|
|
@@ -3348,13 +3348,13 @@ var require_mkdirs = __commonJS({
|
|
|
3348
3348
|
var require_utimes = __commonJS({
|
|
3349
3349
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
|
|
3350
3350
|
"use strict";
|
|
3351
|
-
var
|
|
3351
|
+
var fs7 = require_graceful_fs();
|
|
3352
3352
|
function utimesMillis(path7, atime, mtime2, callback) {
|
|
3353
|
-
|
|
3353
|
+
fs7.open(path7, "r+", (err, fd) => {
|
|
3354
3354
|
if (err)
|
|
3355
3355
|
return callback(err);
|
|
3356
|
-
|
|
3357
|
-
|
|
3356
|
+
fs7.futimes(fd, atime, mtime2, (futimesErr) => {
|
|
3357
|
+
fs7.close(fd, (closeErr) => {
|
|
3358
3358
|
if (callback)
|
|
3359
3359
|
callback(futimesErr || closeErr);
|
|
3360
3360
|
});
|
|
@@ -3362,9 +3362,9 @@ var require_utimes = __commonJS({
|
|
|
3362
3362
|
});
|
|
3363
3363
|
}
|
|
3364
3364
|
function utimesMillisSync(path7, atime, mtime2) {
|
|
3365
|
-
const fd =
|
|
3366
|
-
|
|
3367
|
-
return
|
|
3365
|
+
const fd = fs7.openSync(path7, "r+");
|
|
3366
|
+
fs7.futimesSync(fd, atime, mtime2);
|
|
3367
|
+
return fs7.closeSync(fd);
|
|
3368
3368
|
}
|
|
3369
3369
|
module2.exports = {
|
|
3370
3370
|
utimesMillis,
|
|
@@ -3377,11 +3377,11 @@ var require_utimes = __commonJS({
|
|
|
3377
3377
|
var require_stat = __commonJS({
|
|
3378
3378
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
|
|
3379
3379
|
"use strict";
|
|
3380
|
-
var
|
|
3380
|
+
var fs7 = require_fs();
|
|
3381
3381
|
var path7 = require("path");
|
|
3382
3382
|
var util = require("util");
|
|
3383
3383
|
function getStats(src, dest, opts) {
|
|
3384
|
-
const statFunc = opts.dereference ? (file) =>
|
|
3384
|
+
const statFunc = opts.dereference ? (file) => fs7.stat(file, { bigint: true }) : (file) => fs7.lstat(file, { bigint: true });
|
|
3385
3385
|
return Promise.all([
|
|
3386
3386
|
statFunc(src),
|
|
3387
3387
|
statFunc(dest).catch((err) => {
|
|
@@ -3393,7 +3393,7 @@ var require_stat = __commonJS({
|
|
|
3393
3393
|
}
|
|
3394
3394
|
function getStatsSync(src, dest, opts) {
|
|
3395
3395
|
let destStat;
|
|
3396
|
-
const statFunc = opts.dereference ? (file) =>
|
|
3396
|
+
const statFunc = opts.dereference ? (file) => fs7.statSync(file, { bigint: true }) : (file) => fs7.lstatSync(file, { bigint: true });
|
|
3397
3397
|
const srcStat = statFunc(src);
|
|
3398
3398
|
try {
|
|
3399
3399
|
destStat = statFunc(dest);
|
|
@@ -3459,7 +3459,7 @@ var require_stat = __commonJS({
|
|
|
3459
3459
|
const destParent = path7.resolve(path7.dirname(dest));
|
|
3460
3460
|
if (destParent === srcParent || destParent === path7.parse(destParent).root)
|
|
3461
3461
|
return cb();
|
|
3462
|
-
|
|
3462
|
+
fs7.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
3463
3463
|
if (err) {
|
|
3464
3464
|
if (err.code === "ENOENT")
|
|
3465
3465
|
return cb();
|
|
@@ -3478,7 +3478,7 @@ var require_stat = __commonJS({
|
|
|
3478
3478
|
return;
|
|
3479
3479
|
let destStat;
|
|
3480
3480
|
try {
|
|
3481
|
-
destStat =
|
|
3481
|
+
destStat = fs7.statSync(destParent, { bigint: true });
|
|
3482
3482
|
} catch (err) {
|
|
3483
3483
|
if (err.code === "ENOENT")
|
|
3484
3484
|
return;
|
|
@@ -3515,7 +3515,7 @@ var require_stat = __commonJS({
|
|
|
3515
3515
|
var require_copy_sync = __commonJS({
|
|
3516
3516
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports2, module2) {
|
|
3517
3517
|
"use strict";
|
|
3518
|
-
var
|
|
3518
|
+
var fs7 = require_graceful_fs();
|
|
3519
3519
|
var path7 = require("path");
|
|
3520
3520
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
3521
3521
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
@@ -3540,7 +3540,7 @@ var require_copy_sync = __commonJS({
|
|
|
3540
3540
|
if (opts.filter && !opts.filter(src, dest))
|
|
3541
3541
|
return;
|
|
3542
3542
|
const destParent = path7.dirname(dest);
|
|
3543
|
-
if (!
|
|
3543
|
+
if (!fs7.existsSync(destParent))
|
|
3544
3544
|
mkdirsSync(destParent);
|
|
3545
3545
|
return getStats(destStat, src, dest, opts);
|
|
3546
3546
|
}
|
|
@@ -3550,7 +3550,7 @@ var require_copy_sync = __commonJS({
|
|
|
3550
3550
|
return getStats(destStat, src, dest, opts);
|
|
3551
3551
|
}
|
|
3552
3552
|
function getStats(destStat, src, dest, opts) {
|
|
3553
|
-
const statSync2 = opts.dereference ?
|
|
3553
|
+
const statSync2 = opts.dereference ? fs7.statSync : fs7.lstatSync;
|
|
3554
3554
|
const srcStat = statSync2(src);
|
|
3555
3555
|
if (srcStat.isDirectory())
|
|
3556
3556
|
return onDir(srcStat, destStat, src, dest, opts);
|
|
@@ -3571,14 +3571,14 @@ var require_copy_sync = __commonJS({
|
|
|
3571
3571
|
}
|
|
3572
3572
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
3573
3573
|
if (opts.overwrite) {
|
|
3574
|
-
|
|
3574
|
+
fs7.unlinkSync(dest);
|
|
3575
3575
|
return copyFile(srcStat, src, dest, opts);
|
|
3576
3576
|
} else if (opts.errorOnExist) {
|
|
3577
3577
|
throw new Error(`'${dest}' already exists`);
|
|
3578
3578
|
}
|
|
3579
3579
|
}
|
|
3580
3580
|
function copyFile(srcStat, src, dest, opts) {
|
|
3581
|
-
|
|
3581
|
+
fs7.copyFileSync(src, dest);
|
|
3582
3582
|
if (opts.preserveTimestamps)
|
|
3583
3583
|
handleTimestamps(srcStat.mode, src, dest);
|
|
3584
3584
|
return setDestMode(dest, srcStat.mode);
|
|
@@ -3595,10 +3595,10 @@ var require_copy_sync = __commonJS({
|
|
|
3595
3595
|
return setDestMode(dest, srcMode | 128);
|
|
3596
3596
|
}
|
|
3597
3597
|
function setDestMode(dest, srcMode) {
|
|
3598
|
-
return
|
|
3598
|
+
return fs7.chmodSync(dest, srcMode);
|
|
3599
3599
|
}
|
|
3600
3600
|
function setDestTimestamps(src, dest) {
|
|
3601
|
-
const updatedSrcStat =
|
|
3601
|
+
const updatedSrcStat = fs7.statSync(src);
|
|
3602
3602
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
3603
3603
|
}
|
|
3604
3604
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -3607,12 +3607,12 @@ var require_copy_sync = __commonJS({
|
|
|
3607
3607
|
return copyDir(src, dest, opts);
|
|
3608
3608
|
}
|
|
3609
3609
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
3610
|
-
|
|
3610
|
+
fs7.mkdirSync(dest);
|
|
3611
3611
|
copyDir(src, dest, opts);
|
|
3612
3612
|
return setDestMode(dest, srcMode);
|
|
3613
3613
|
}
|
|
3614
3614
|
function copyDir(src, dest, opts) {
|
|
3615
|
-
|
|
3615
|
+
fs7.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
3616
3616
|
}
|
|
3617
3617
|
function copyDirItem(item, src, dest, opts) {
|
|
3618
3618
|
const srcItem = path7.join(src, item);
|
|
@@ -3621,19 +3621,19 @@ var require_copy_sync = __commonJS({
|
|
|
3621
3621
|
return startCopy(destStat, srcItem, destItem, opts);
|
|
3622
3622
|
}
|
|
3623
3623
|
function onLink(destStat, src, dest, opts) {
|
|
3624
|
-
let resolvedSrc =
|
|
3624
|
+
let resolvedSrc = fs7.readlinkSync(src);
|
|
3625
3625
|
if (opts.dereference) {
|
|
3626
3626
|
resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
|
|
3627
3627
|
}
|
|
3628
3628
|
if (!destStat) {
|
|
3629
|
-
return
|
|
3629
|
+
return fs7.symlinkSync(resolvedSrc, dest);
|
|
3630
3630
|
} else {
|
|
3631
3631
|
let resolvedDest;
|
|
3632
3632
|
try {
|
|
3633
|
-
resolvedDest =
|
|
3633
|
+
resolvedDest = fs7.readlinkSync(dest);
|
|
3634
3634
|
} catch (err) {
|
|
3635
3635
|
if (err.code === "EINVAL" || err.code === "UNKNOWN")
|
|
3636
|
-
return
|
|
3636
|
+
return fs7.symlinkSync(resolvedSrc, dest);
|
|
3637
3637
|
throw err;
|
|
3638
3638
|
}
|
|
3639
3639
|
if (opts.dereference) {
|
|
@@ -3642,15 +3642,15 @@ var require_copy_sync = __commonJS({
|
|
|
3642
3642
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
3643
3643
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
3644
3644
|
}
|
|
3645
|
-
if (
|
|
3645
|
+
if (fs7.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
3646
3646
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
3647
3647
|
}
|
|
3648
3648
|
return copyLink(resolvedSrc, dest);
|
|
3649
3649
|
}
|
|
3650
3650
|
}
|
|
3651
3651
|
function copyLink(resolvedSrc, dest) {
|
|
3652
|
-
|
|
3653
|
-
return
|
|
3652
|
+
fs7.unlinkSync(dest);
|
|
3653
|
+
return fs7.symlinkSync(resolvedSrc, dest);
|
|
3654
3654
|
}
|
|
3655
3655
|
module2.exports = copySync;
|
|
3656
3656
|
}
|
|
@@ -3671,13 +3671,13 @@ var require_path_exists = __commonJS({
|
|
|
3671
3671
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
|
|
3672
3672
|
"use strict";
|
|
3673
3673
|
var u = require_universalify().fromPromise;
|
|
3674
|
-
var
|
|
3674
|
+
var fs7 = require_fs();
|
|
3675
3675
|
function pathExists(path7) {
|
|
3676
|
-
return
|
|
3676
|
+
return fs7.access(path7).then(() => true).catch(() => false);
|
|
3677
3677
|
}
|
|
3678
3678
|
module2.exports = {
|
|
3679
3679
|
pathExists: u(pathExists),
|
|
3680
|
-
pathExistsSync:
|
|
3680
|
+
pathExistsSync: fs7.existsSync
|
|
3681
3681
|
};
|
|
3682
3682
|
}
|
|
3683
3683
|
});
|
|
@@ -3686,7 +3686,7 @@ var require_path_exists = __commonJS({
|
|
|
3686
3686
|
var require_copy = __commonJS({
|
|
3687
3687
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
|
|
3688
3688
|
"use strict";
|
|
3689
|
-
var
|
|
3689
|
+
var fs7 = require_graceful_fs();
|
|
3690
3690
|
var path7 = require("path");
|
|
3691
3691
|
var mkdirs = require_mkdirs().mkdirs;
|
|
3692
3692
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -3749,7 +3749,7 @@ var require_copy = __commonJS({
|
|
|
3749
3749
|
return getStats(destStat, src, dest, opts, cb);
|
|
3750
3750
|
}
|
|
3751
3751
|
function getStats(destStat, src, dest, opts, cb) {
|
|
3752
|
-
const stat2 = opts.dereference ?
|
|
3752
|
+
const stat2 = opts.dereference ? fs7.stat : fs7.lstat;
|
|
3753
3753
|
stat2(src, (err, srcStat) => {
|
|
3754
3754
|
if (err)
|
|
3755
3755
|
return cb(err);
|
|
@@ -3773,7 +3773,7 @@ var require_copy = __commonJS({
|
|
|
3773
3773
|
}
|
|
3774
3774
|
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
3775
3775
|
if (opts.overwrite) {
|
|
3776
|
-
|
|
3776
|
+
fs7.unlink(dest, (err) => {
|
|
3777
3777
|
if (err)
|
|
3778
3778
|
return cb(err);
|
|
3779
3779
|
return copyFile(srcStat, src, dest, opts, cb);
|
|
@@ -3784,7 +3784,7 @@ var require_copy = __commonJS({
|
|
|
3784
3784
|
return cb();
|
|
3785
3785
|
}
|
|
3786
3786
|
function copyFile(srcStat, src, dest, opts, cb) {
|
|
3787
|
-
|
|
3787
|
+
fs7.copyFile(src, dest, (err) => {
|
|
3788
3788
|
if (err)
|
|
3789
3789
|
return cb(err);
|
|
3790
3790
|
if (opts.preserveTimestamps)
|
|
@@ -3816,10 +3816,10 @@ var require_copy = __commonJS({
|
|
|
3816
3816
|
});
|
|
3817
3817
|
}
|
|
3818
3818
|
function setDestMode(dest, srcMode, cb) {
|
|
3819
|
-
return
|
|
3819
|
+
return fs7.chmod(dest, srcMode, cb);
|
|
3820
3820
|
}
|
|
3821
3821
|
function setDestTimestamps(src, dest, cb) {
|
|
3822
|
-
|
|
3822
|
+
fs7.stat(src, (err, updatedSrcStat) => {
|
|
3823
3823
|
if (err)
|
|
3824
3824
|
return cb(err);
|
|
3825
3825
|
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
@@ -3831,7 +3831,7 @@ var require_copy = __commonJS({
|
|
|
3831
3831
|
return copyDir(src, dest, opts, cb);
|
|
3832
3832
|
}
|
|
3833
3833
|
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
3834
|
-
|
|
3834
|
+
fs7.mkdir(dest, (err) => {
|
|
3835
3835
|
if (err)
|
|
3836
3836
|
return cb(err);
|
|
3837
3837
|
copyDir(src, dest, opts, (err2) => {
|
|
@@ -3842,7 +3842,7 @@ var require_copy = __commonJS({
|
|
|
3842
3842
|
});
|
|
3843
3843
|
}
|
|
3844
3844
|
function copyDir(src, dest, opts, cb) {
|
|
3845
|
-
|
|
3845
|
+
fs7.readdir(src, (err, items) => {
|
|
3846
3846
|
if (err)
|
|
3847
3847
|
return cb(err);
|
|
3848
3848
|
return copyDirItems(items, src, dest, opts, cb);
|
|
@@ -3869,19 +3869,19 @@ var require_copy = __commonJS({
|
|
|
3869
3869
|
});
|
|
3870
3870
|
}
|
|
3871
3871
|
function onLink(destStat, src, dest, opts, cb) {
|
|
3872
|
-
|
|
3872
|
+
fs7.readlink(src, (err, resolvedSrc) => {
|
|
3873
3873
|
if (err)
|
|
3874
3874
|
return cb(err);
|
|
3875
3875
|
if (opts.dereference) {
|
|
3876
3876
|
resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
|
|
3877
3877
|
}
|
|
3878
3878
|
if (!destStat) {
|
|
3879
|
-
return
|
|
3879
|
+
return fs7.symlink(resolvedSrc, dest, cb);
|
|
3880
3880
|
} else {
|
|
3881
|
-
|
|
3881
|
+
fs7.readlink(dest, (err2, resolvedDest) => {
|
|
3882
3882
|
if (err2) {
|
|
3883
3883
|
if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
|
|
3884
|
-
return
|
|
3884
|
+
return fs7.symlink(resolvedSrc, dest, cb);
|
|
3885
3885
|
return cb(err2);
|
|
3886
3886
|
}
|
|
3887
3887
|
if (opts.dereference) {
|
|
@@ -3899,10 +3899,10 @@ var require_copy = __commonJS({
|
|
|
3899
3899
|
});
|
|
3900
3900
|
}
|
|
3901
3901
|
function copyLink(resolvedSrc, dest, cb) {
|
|
3902
|
-
|
|
3902
|
+
fs7.unlink(dest, (err) => {
|
|
3903
3903
|
if (err)
|
|
3904
3904
|
return cb(err);
|
|
3905
|
-
return
|
|
3905
|
+
return fs7.symlink(resolvedSrc, dest, cb);
|
|
3906
3906
|
});
|
|
3907
3907
|
}
|
|
3908
3908
|
module2.exports = copy;
|
|
@@ -3924,7 +3924,7 @@ var require_copy2 = __commonJS({
|
|
|
3924
3924
|
var require_rimraf = __commonJS({
|
|
3925
3925
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/rimraf.js"(exports2, module2) {
|
|
3926
3926
|
"use strict";
|
|
3927
|
-
var
|
|
3927
|
+
var fs7 = require_graceful_fs();
|
|
3928
3928
|
var path7 = require("path");
|
|
3929
3929
|
var assert7 = require("assert");
|
|
3930
3930
|
var isWindows = process.platform === "win32";
|
|
@@ -3938,9 +3938,9 @@ var require_rimraf = __commonJS({
|
|
|
3938
3938
|
"readdir"
|
|
3939
3939
|
];
|
|
3940
3940
|
methods.forEach((m) => {
|
|
3941
|
-
options[m] = options[m] ||
|
|
3941
|
+
options[m] = options[m] || fs7[m];
|
|
3942
3942
|
m = m + "Sync";
|
|
3943
|
-
options[m] = options[m] ||
|
|
3943
|
+
options[m] = options[m] || fs7[m];
|
|
3944
3944
|
});
|
|
3945
3945
|
options.maxBusyTries = options.maxBusyTries || 3;
|
|
3946
3946
|
}
|
|
@@ -4163,17 +4163,17 @@ var require_rimraf = __commonJS({
|
|
|
4163
4163
|
var require_remove = __commonJS({
|
|
4164
4164
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
|
|
4165
4165
|
"use strict";
|
|
4166
|
-
var
|
|
4166
|
+
var fs7 = require_graceful_fs();
|
|
4167
4167
|
var u = require_universalify().fromCallback;
|
|
4168
4168
|
var rimraf = require_rimraf();
|
|
4169
4169
|
function remove2(path7, callback) {
|
|
4170
|
-
if (
|
|
4171
|
-
return
|
|
4170
|
+
if (fs7.rm)
|
|
4171
|
+
return fs7.rm(path7, { recursive: true, force: true }, callback);
|
|
4172
4172
|
rimraf(path7, callback);
|
|
4173
4173
|
}
|
|
4174
4174
|
function removeSync(path7) {
|
|
4175
|
-
if (
|
|
4176
|
-
return
|
|
4175
|
+
if (fs7.rmSync)
|
|
4176
|
+
return fs7.rmSync(path7, { recursive: true, force: true });
|
|
4177
4177
|
rimraf.sync(path7);
|
|
4178
4178
|
}
|
|
4179
4179
|
module2.exports = {
|
|
@@ -4188,14 +4188,14 @@ var require_empty = __commonJS({
|
|
|
4188
4188
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
|
|
4189
4189
|
"use strict";
|
|
4190
4190
|
var u = require_universalify().fromPromise;
|
|
4191
|
-
var
|
|
4191
|
+
var fs7 = require_fs();
|
|
4192
4192
|
var path7 = require("path");
|
|
4193
4193
|
var mkdir = require_mkdirs();
|
|
4194
4194
|
var remove2 = require_remove();
|
|
4195
4195
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
4196
4196
|
let items;
|
|
4197
4197
|
try {
|
|
4198
|
-
items = await
|
|
4198
|
+
items = await fs7.readdir(dir);
|
|
4199
4199
|
} catch {
|
|
4200
4200
|
return mkdir.mkdirs(dir);
|
|
4201
4201
|
}
|
|
@@ -4204,7 +4204,7 @@ var require_empty = __commonJS({
|
|
|
4204
4204
|
function emptyDirSync(dir) {
|
|
4205
4205
|
let items;
|
|
4206
4206
|
try {
|
|
4207
|
-
items =
|
|
4207
|
+
items = fs7.readdirSync(dir);
|
|
4208
4208
|
} catch {
|
|
4209
4209
|
return mkdir.mkdirsSync(dir);
|
|
4210
4210
|
}
|
|
@@ -4228,21 +4228,21 @@ var require_file = __commonJS({
|
|
|
4228
4228
|
"use strict";
|
|
4229
4229
|
var u = require_universalify().fromCallback;
|
|
4230
4230
|
var path7 = require("path");
|
|
4231
|
-
var
|
|
4231
|
+
var fs7 = require_graceful_fs();
|
|
4232
4232
|
var mkdir = require_mkdirs();
|
|
4233
4233
|
function createFile(file, callback) {
|
|
4234
4234
|
function makeFile() {
|
|
4235
|
-
|
|
4235
|
+
fs7.writeFile(file, "", (err) => {
|
|
4236
4236
|
if (err)
|
|
4237
4237
|
return callback(err);
|
|
4238
4238
|
callback();
|
|
4239
4239
|
});
|
|
4240
4240
|
}
|
|
4241
|
-
|
|
4241
|
+
fs7.stat(file, (err, stats) => {
|
|
4242
4242
|
if (!err && stats.isFile())
|
|
4243
4243
|
return callback();
|
|
4244
4244
|
const dir = path7.dirname(file);
|
|
4245
|
-
|
|
4245
|
+
fs7.stat(dir, (err2, stats2) => {
|
|
4246
4246
|
if (err2) {
|
|
4247
4247
|
if (err2.code === "ENOENT") {
|
|
4248
4248
|
return mkdir.mkdirs(dir, (err3) => {
|
|
@@ -4256,7 +4256,7 @@ var require_file = __commonJS({
|
|
|
4256
4256
|
if (stats2.isDirectory())
|
|
4257
4257
|
makeFile();
|
|
4258
4258
|
else {
|
|
4259
|
-
|
|
4259
|
+
fs7.readdir(dir, (err3) => {
|
|
4260
4260
|
if (err3)
|
|
4261
4261
|
return callback(err3);
|
|
4262
4262
|
});
|
|
@@ -4267,15 +4267,15 @@ var require_file = __commonJS({
|
|
|
4267
4267
|
function createFileSync(file) {
|
|
4268
4268
|
let stats;
|
|
4269
4269
|
try {
|
|
4270
|
-
stats =
|
|
4270
|
+
stats = fs7.statSync(file);
|
|
4271
4271
|
} catch {
|
|
4272
4272
|
}
|
|
4273
4273
|
if (stats && stats.isFile())
|
|
4274
4274
|
return;
|
|
4275
4275
|
const dir = path7.dirname(file);
|
|
4276
4276
|
try {
|
|
4277
|
-
if (!
|
|
4278
|
-
|
|
4277
|
+
if (!fs7.statSync(dir).isDirectory()) {
|
|
4278
|
+
fs7.readdirSync(dir);
|
|
4279
4279
|
}
|
|
4280
4280
|
} catch (err) {
|
|
4281
4281
|
if (err && err.code === "ENOENT")
|
|
@@ -4283,7 +4283,7 @@ var require_file = __commonJS({
|
|
|
4283
4283
|
else
|
|
4284
4284
|
throw err;
|
|
4285
4285
|
}
|
|
4286
|
-
|
|
4286
|
+
fs7.writeFileSync(file, "");
|
|
4287
4287
|
}
|
|
4288
4288
|
module2.exports = {
|
|
4289
4289
|
createFile: u(createFile),
|
|
@@ -4298,20 +4298,20 @@ var require_link = __commonJS({
|
|
|
4298
4298
|
"use strict";
|
|
4299
4299
|
var u = require_universalify().fromCallback;
|
|
4300
4300
|
var path7 = require("path");
|
|
4301
|
-
var
|
|
4301
|
+
var fs7 = require_graceful_fs();
|
|
4302
4302
|
var mkdir = require_mkdirs();
|
|
4303
4303
|
var pathExists = require_path_exists().pathExists;
|
|
4304
4304
|
var { areIdentical } = require_stat();
|
|
4305
4305
|
function createLink(srcpath, dstpath, callback) {
|
|
4306
4306
|
function makeLink(srcpath2, dstpath2) {
|
|
4307
|
-
|
|
4307
|
+
fs7.link(srcpath2, dstpath2, (err) => {
|
|
4308
4308
|
if (err)
|
|
4309
4309
|
return callback(err);
|
|
4310
4310
|
callback(null);
|
|
4311
4311
|
});
|
|
4312
4312
|
}
|
|
4313
|
-
|
|
4314
|
-
|
|
4313
|
+
fs7.lstat(dstpath, (_, dstStat) => {
|
|
4314
|
+
fs7.lstat(srcpath, (err, srcStat) => {
|
|
4315
4315
|
if (err) {
|
|
4316
4316
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
4317
4317
|
return callback(err);
|
|
@@ -4336,11 +4336,11 @@ var require_link = __commonJS({
|
|
|
4336
4336
|
function createLinkSync(srcpath, dstpath) {
|
|
4337
4337
|
let dstStat;
|
|
4338
4338
|
try {
|
|
4339
|
-
dstStat =
|
|
4339
|
+
dstStat = fs7.lstatSync(dstpath);
|
|
4340
4340
|
} catch {
|
|
4341
4341
|
}
|
|
4342
4342
|
try {
|
|
4343
|
-
const srcStat =
|
|
4343
|
+
const srcStat = fs7.lstatSync(srcpath);
|
|
4344
4344
|
if (dstStat && areIdentical(srcStat, dstStat))
|
|
4345
4345
|
return;
|
|
4346
4346
|
} catch (err) {
|
|
@@ -4348,11 +4348,11 @@ var require_link = __commonJS({
|
|
|
4348
4348
|
throw err;
|
|
4349
4349
|
}
|
|
4350
4350
|
const dir = path7.dirname(dstpath);
|
|
4351
|
-
const dirExists =
|
|
4351
|
+
const dirExists = fs7.existsSync(dir);
|
|
4352
4352
|
if (dirExists)
|
|
4353
|
-
return
|
|
4353
|
+
return fs7.linkSync(srcpath, dstpath);
|
|
4354
4354
|
mkdir.mkdirsSync(dir);
|
|
4355
|
-
return
|
|
4355
|
+
return fs7.linkSync(srcpath, dstpath);
|
|
4356
4356
|
}
|
|
4357
4357
|
module2.exports = {
|
|
4358
4358
|
createLink: u(createLink),
|
|
@@ -4366,11 +4366,11 @@ var require_symlink_paths = __commonJS({
|
|
|
4366
4366
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
|
|
4367
4367
|
"use strict";
|
|
4368
4368
|
var path7 = require("path");
|
|
4369
|
-
var
|
|
4369
|
+
var fs7 = require_graceful_fs();
|
|
4370
4370
|
var pathExists = require_path_exists().pathExists;
|
|
4371
4371
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
4372
4372
|
if (path7.isAbsolute(srcpath)) {
|
|
4373
|
-
return
|
|
4373
|
+
return fs7.lstat(srcpath, (err) => {
|
|
4374
4374
|
if (err) {
|
|
4375
4375
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
4376
4376
|
return callback(err);
|
|
@@ -4392,7 +4392,7 @@ var require_symlink_paths = __commonJS({
|
|
|
4392
4392
|
toDst: srcpath
|
|
4393
4393
|
});
|
|
4394
4394
|
} else {
|
|
4395
|
-
return
|
|
4395
|
+
return fs7.lstat(srcpath, (err2) => {
|
|
4396
4396
|
if (err2) {
|
|
4397
4397
|
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
|
4398
4398
|
return callback(err2);
|
|
@@ -4409,7 +4409,7 @@ var require_symlink_paths = __commonJS({
|
|
|
4409
4409
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
4410
4410
|
let exists;
|
|
4411
4411
|
if (path7.isAbsolute(srcpath)) {
|
|
4412
|
-
exists =
|
|
4412
|
+
exists = fs7.existsSync(srcpath);
|
|
4413
4413
|
if (!exists)
|
|
4414
4414
|
throw new Error("absolute srcpath does not exist");
|
|
4415
4415
|
return {
|
|
@@ -4419,14 +4419,14 @@ var require_symlink_paths = __commonJS({
|
|
|
4419
4419
|
} else {
|
|
4420
4420
|
const dstdir = path7.dirname(dstpath);
|
|
4421
4421
|
const relativeToDst = path7.join(dstdir, srcpath);
|
|
4422
|
-
exists =
|
|
4422
|
+
exists = fs7.existsSync(relativeToDst);
|
|
4423
4423
|
if (exists) {
|
|
4424
4424
|
return {
|
|
4425
4425
|
toCwd: relativeToDst,
|
|
4426
4426
|
toDst: srcpath
|
|
4427
4427
|
};
|
|
4428
4428
|
} else {
|
|
4429
|
-
exists =
|
|
4429
|
+
exists = fs7.existsSync(srcpath);
|
|
4430
4430
|
if (!exists)
|
|
4431
4431
|
throw new Error("relative srcpath does not exist");
|
|
4432
4432
|
return {
|
|
@@ -4447,13 +4447,13 @@ var require_symlink_paths = __commonJS({
|
|
|
4447
4447
|
var require_symlink_type = __commonJS({
|
|
4448
4448
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
|
|
4449
4449
|
"use strict";
|
|
4450
|
-
var
|
|
4450
|
+
var fs7 = require_graceful_fs();
|
|
4451
4451
|
function symlinkType(srcpath, type, callback) {
|
|
4452
4452
|
callback = typeof type === "function" ? type : callback;
|
|
4453
4453
|
type = typeof type === "function" ? false : type;
|
|
4454
4454
|
if (type)
|
|
4455
4455
|
return callback(null, type);
|
|
4456
|
-
|
|
4456
|
+
fs7.lstat(srcpath, (err, stats) => {
|
|
4457
4457
|
if (err)
|
|
4458
4458
|
return callback(null, "file");
|
|
4459
4459
|
type = stats && stats.isDirectory() ? "dir" : "file";
|
|
@@ -4465,7 +4465,7 @@ var require_symlink_type = __commonJS({
|
|
|
4465
4465
|
if (type)
|
|
4466
4466
|
return type;
|
|
4467
4467
|
try {
|
|
4468
|
-
stats =
|
|
4468
|
+
stats = fs7.lstatSync(srcpath);
|
|
4469
4469
|
} catch {
|
|
4470
4470
|
return "file";
|
|
4471
4471
|
}
|
|
@@ -4484,7 +4484,7 @@ var require_symlink = __commonJS({
|
|
|
4484
4484
|
"use strict";
|
|
4485
4485
|
var u = require_universalify().fromCallback;
|
|
4486
4486
|
var path7 = require("path");
|
|
4487
|
-
var
|
|
4487
|
+
var fs7 = require_fs();
|
|
4488
4488
|
var _mkdirs = require_mkdirs();
|
|
4489
4489
|
var mkdirs = _mkdirs.mkdirs;
|
|
4490
4490
|
var mkdirsSync = _mkdirs.mkdirsSync;
|
|
@@ -4499,11 +4499,11 @@ var require_symlink = __commonJS({
|
|
|
4499
4499
|
function createSymlink(srcpath, dstpath, type, callback) {
|
|
4500
4500
|
callback = typeof type === "function" ? type : callback;
|
|
4501
4501
|
type = typeof type === "function" ? false : type;
|
|
4502
|
-
|
|
4502
|
+
fs7.lstat(dstpath, (err, stats) => {
|
|
4503
4503
|
if (!err && stats.isSymbolicLink()) {
|
|
4504
4504
|
Promise.all([
|
|
4505
|
-
|
|
4506
|
-
|
|
4505
|
+
fs7.stat(srcpath),
|
|
4506
|
+
fs7.stat(dstpath)
|
|
4507
4507
|
]).then(([srcStat, dstStat]) => {
|
|
4508
4508
|
if (areIdentical(srcStat, dstStat))
|
|
4509
4509
|
return callback(null);
|
|
@@ -4526,11 +4526,11 @@ var require_symlink = __commonJS({
|
|
|
4526
4526
|
if (err3)
|
|
4527
4527
|
return callback(err3);
|
|
4528
4528
|
if (dirExists)
|
|
4529
|
-
return
|
|
4529
|
+
return fs7.symlink(srcpath, dstpath, type2, callback);
|
|
4530
4530
|
mkdirs(dir, (err4) => {
|
|
4531
4531
|
if (err4)
|
|
4532
4532
|
return callback(err4);
|
|
4533
|
-
|
|
4533
|
+
fs7.symlink(srcpath, dstpath, type2, callback);
|
|
4534
4534
|
});
|
|
4535
4535
|
});
|
|
4536
4536
|
});
|
|
@@ -4539,12 +4539,12 @@ var require_symlink = __commonJS({
|
|
|
4539
4539
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
4540
4540
|
let stats;
|
|
4541
4541
|
try {
|
|
4542
|
-
stats =
|
|
4542
|
+
stats = fs7.lstatSync(dstpath);
|
|
4543
4543
|
} catch {
|
|
4544
4544
|
}
|
|
4545
4545
|
if (stats && stats.isSymbolicLink()) {
|
|
4546
|
-
const srcStat =
|
|
4547
|
-
const dstStat =
|
|
4546
|
+
const srcStat = fs7.statSync(srcpath);
|
|
4547
|
+
const dstStat = fs7.statSync(dstpath);
|
|
4548
4548
|
if (areIdentical(srcStat, dstStat))
|
|
4549
4549
|
return;
|
|
4550
4550
|
}
|
|
@@ -4552,11 +4552,11 @@ var require_symlink = __commonJS({
|
|
|
4552
4552
|
srcpath = relative.toDst;
|
|
4553
4553
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
4554
4554
|
const dir = path7.dirname(dstpath);
|
|
4555
|
-
const exists =
|
|
4555
|
+
const exists = fs7.existsSync(dir);
|
|
4556
4556
|
if (exists)
|
|
4557
|
-
return
|
|
4557
|
+
return fs7.symlinkSync(srcpath, dstpath, type);
|
|
4558
4558
|
mkdirsSync(dir);
|
|
4559
|
-
return
|
|
4559
|
+
return fs7.symlinkSync(srcpath, dstpath, type);
|
|
4560
4560
|
}
|
|
4561
4561
|
module2.exports = {
|
|
4562
4562
|
createSymlink: u(createSymlink),
|
|
@@ -4624,9 +4624,9 @@ var require_jsonfile = __commonJS({
|
|
|
4624
4624
|
if (typeof options === "string") {
|
|
4625
4625
|
options = { encoding: options };
|
|
4626
4626
|
}
|
|
4627
|
-
const
|
|
4627
|
+
const fs7 = options.fs || _fs;
|
|
4628
4628
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
4629
|
-
let data = await universalify.fromCallback(
|
|
4629
|
+
let data = await universalify.fromCallback(fs7.readFile)(file, options);
|
|
4630
4630
|
data = stripBom(data);
|
|
4631
4631
|
let obj;
|
|
4632
4632
|
try {
|
|
@@ -4646,10 +4646,10 @@ var require_jsonfile = __commonJS({
|
|
|
4646
4646
|
if (typeof options === "string") {
|
|
4647
4647
|
options = { encoding: options };
|
|
4648
4648
|
}
|
|
4649
|
-
const
|
|
4649
|
+
const fs7 = options.fs || _fs;
|
|
4650
4650
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
4651
4651
|
try {
|
|
4652
|
-
let content =
|
|
4652
|
+
let content = fs7.readFileSync(file, options);
|
|
4653
4653
|
content = stripBom(content);
|
|
4654
4654
|
return JSON.parse(content, options.reviver);
|
|
4655
4655
|
} catch (err) {
|
|
@@ -4662,15 +4662,15 @@ var require_jsonfile = __commonJS({
|
|
|
4662
4662
|
}
|
|
4663
4663
|
}
|
|
4664
4664
|
async function _writeFile(file, obj, options = {}) {
|
|
4665
|
-
const
|
|
4665
|
+
const fs7 = options.fs || _fs;
|
|
4666
4666
|
const str = stringify(obj, options);
|
|
4667
|
-
await universalify.fromCallback(
|
|
4667
|
+
await universalify.fromCallback(fs7.writeFile)(file, str, options);
|
|
4668
4668
|
}
|
|
4669
4669
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
4670
4670
|
function writeFileSync(file, obj, options = {}) {
|
|
4671
|
-
const
|
|
4671
|
+
const fs7 = options.fs || _fs;
|
|
4672
4672
|
const str = stringify(obj, options);
|
|
4673
|
-
return
|
|
4673
|
+
return fs7.writeFileSync(file, str, options);
|
|
4674
4674
|
}
|
|
4675
4675
|
var jsonfile = {
|
|
4676
4676
|
readFile: readFile4,
|
|
@@ -4702,7 +4702,7 @@ var require_output = __commonJS({
|
|
|
4702
4702
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/output/index.js"(exports2, module2) {
|
|
4703
4703
|
"use strict";
|
|
4704
4704
|
var u = require_universalify().fromCallback;
|
|
4705
|
-
var
|
|
4705
|
+
var fs7 = require_graceful_fs();
|
|
4706
4706
|
var path7 = require("path");
|
|
4707
4707
|
var mkdir = require_mkdirs();
|
|
4708
4708
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -4716,21 +4716,21 @@ var require_output = __commonJS({
|
|
|
4716
4716
|
if (err)
|
|
4717
4717
|
return callback(err);
|
|
4718
4718
|
if (itDoes)
|
|
4719
|
-
return
|
|
4719
|
+
return fs7.writeFile(file, data, encoding, callback);
|
|
4720
4720
|
mkdir.mkdirs(dir, (err2) => {
|
|
4721
4721
|
if (err2)
|
|
4722
4722
|
return callback(err2);
|
|
4723
|
-
|
|
4723
|
+
fs7.writeFile(file, data, encoding, callback);
|
|
4724
4724
|
});
|
|
4725
4725
|
});
|
|
4726
4726
|
}
|
|
4727
4727
|
function outputFileSync(file, ...args) {
|
|
4728
4728
|
const dir = path7.dirname(file);
|
|
4729
|
-
if (
|
|
4730
|
-
return
|
|
4729
|
+
if (fs7.existsSync(dir)) {
|
|
4730
|
+
return fs7.writeFileSync(file, ...args);
|
|
4731
4731
|
}
|
|
4732
4732
|
mkdir.mkdirsSync(dir);
|
|
4733
|
-
|
|
4733
|
+
fs7.writeFileSync(file, ...args);
|
|
4734
4734
|
}
|
|
4735
4735
|
module2.exports = {
|
|
4736
4736
|
outputFile: u(outputFile),
|
|
@@ -4789,7 +4789,7 @@ var require_json = __commonJS({
|
|
|
4789
4789
|
var require_move_sync = __commonJS({
|
|
4790
4790
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move-sync/move-sync.js"(exports2, module2) {
|
|
4791
4791
|
"use strict";
|
|
4792
|
-
var
|
|
4792
|
+
var fs7 = require_graceful_fs();
|
|
4793
4793
|
var path7 = require("path");
|
|
4794
4794
|
var copySync = require_copy_sync2().copySync;
|
|
4795
4795
|
var removeSync = require_remove().removeSync;
|
|
@@ -4816,13 +4816,13 @@ var require_move_sync = __commonJS({
|
|
|
4816
4816
|
removeSync(dest);
|
|
4817
4817
|
return rename2(src, dest, overwrite);
|
|
4818
4818
|
}
|
|
4819
|
-
if (
|
|
4819
|
+
if (fs7.existsSync(dest))
|
|
4820
4820
|
throw new Error("dest already exists.");
|
|
4821
4821
|
return rename2(src, dest, overwrite);
|
|
4822
4822
|
}
|
|
4823
4823
|
function rename2(src, dest, overwrite) {
|
|
4824
4824
|
try {
|
|
4825
|
-
|
|
4825
|
+
fs7.renameSync(src, dest);
|
|
4826
4826
|
} catch (err) {
|
|
4827
4827
|
if (err.code !== "EXDEV")
|
|
4828
4828
|
throw err;
|
|
@@ -4855,7 +4855,7 @@ var require_move_sync2 = __commonJS({
|
|
|
4855
4855
|
var require_move = __commonJS({
|
|
4856
4856
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
4857
4857
|
"use strict";
|
|
4858
|
-
var
|
|
4858
|
+
var fs7 = require_graceful_fs();
|
|
4859
4859
|
var path7 = require("path");
|
|
4860
4860
|
var copy = require_copy2().copy;
|
|
4861
4861
|
var remove2 = require_remove().remove;
|
|
@@ -4909,7 +4909,7 @@ var require_move = __commonJS({
|
|
|
4909
4909
|
});
|
|
4910
4910
|
}
|
|
4911
4911
|
function rename2(src, dest, overwrite, cb) {
|
|
4912
|
-
|
|
4912
|
+
fs7.rename(src, dest, (err) => {
|
|
4913
4913
|
if (!err)
|
|
4914
4914
|
return cb();
|
|
4915
4915
|
if (err.code !== "EXDEV")
|
|
@@ -8953,7 +8953,7 @@ var require_buffer_crc32 = __commonJS({
|
|
|
8953
8953
|
// ../../node_modules/.pnpm/yazl@2.5.1/node_modules/yazl/index.js
|
|
8954
8954
|
var require_yazl = __commonJS({
|
|
8955
8955
|
"../../node_modules/.pnpm/yazl@2.5.1/node_modules/yazl/index.js"(exports2) {
|
|
8956
|
-
var
|
|
8956
|
+
var fs7 = require("fs");
|
|
8957
8957
|
var Transform = require("stream").Transform;
|
|
8958
8958
|
var PassThrough = require("stream").PassThrough;
|
|
8959
8959
|
var zlib = require("zlib");
|
|
@@ -8978,7 +8978,7 @@ var require_yazl = __commonJS({
|
|
|
8978
8978
|
options = {};
|
|
8979
8979
|
var entry = new Entry(metadataPath, false, options);
|
|
8980
8980
|
self2.entries.push(entry);
|
|
8981
|
-
|
|
8981
|
+
fs7.stat(realPath, function(err, stats) {
|
|
8982
8982
|
if (err)
|
|
8983
8983
|
return self2.emit("error", err);
|
|
8984
8984
|
if (!stats.isFile())
|
|
@@ -8989,7 +8989,7 @@ var require_yazl = __commonJS({
|
|
|
8989
8989
|
if (options.mode == null)
|
|
8990
8990
|
entry.setFileAttributesMode(stats.mode);
|
|
8991
8991
|
entry.setFileDataPumpFunction(function() {
|
|
8992
|
-
var readStream =
|
|
8992
|
+
var readStream = fs7.createReadStream(realPath);
|
|
8993
8993
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
8994
8994
|
readStream.on("error", function(err2) {
|
|
8995
8995
|
self2.emit("error", err2);
|
|
@@ -10559,7 +10559,7 @@ var require_old = __commonJS({
|
|
|
10559
10559
|
"../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) {
|
|
10560
10560
|
var pathModule = require("path");
|
|
10561
10561
|
var isWindows = process.platform === "win32";
|
|
10562
|
-
var
|
|
10562
|
+
var fs7 = require("fs");
|
|
10563
10563
|
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
|
10564
10564
|
function rethrow() {
|
|
10565
10565
|
var callback;
|
|
@@ -10624,7 +10624,7 @@ var require_old = __commonJS({
|
|
|
10624
10624
|
base = m[0];
|
|
10625
10625
|
previous = "";
|
|
10626
10626
|
if (isWindows && !knownHard[base]) {
|
|
10627
|
-
|
|
10627
|
+
fs7.lstatSync(base);
|
|
10628
10628
|
knownHard[base] = true;
|
|
10629
10629
|
}
|
|
10630
10630
|
}
|
|
@@ -10642,7 +10642,7 @@ var require_old = __commonJS({
|
|
|
10642
10642
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
10643
10643
|
resolvedLink = cache[base];
|
|
10644
10644
|
} else {
|
|
10645
|
-
var stat =
|
|
10645
|
+
var stat = fs7.lstatSync(base);
|
|
10646
10646
|
if (!stat.isSymbolicLink()) {
|
|
10647
10647
|
knownHard[base] = true;
|
|
10648
10648
|
if (cache)
|
|
@@ -10657,8 +10657,8 @@ var require_old = __commonJS({
|
|
|
10657
10657
|
}
|
|
10658
10658
|
}
|
|
10659
10659
|
if (linkTarget === null) {
|
|
10660
|
-
|
|
10661
|
-
linkTarget =
|
|
10660
|
+
fs7.statSync(base);
|
|
10661
|
+
linkTarget = fs7.readlinkSync(base);
|
|
10662
10662
|
}
|
|
10663
10663
|
resolvedLink = pathModule.resolve(previous, linkTarget);
|
|
10664
10664
|
if (cache)
|
|
@@ -10695,7 +10695,7 @@ var require_old = __commonJS({
|
|
|
10695
10695
|
base = m[0];
|
|
10696
10696
|
previous = "";
|
|
10697
10697
|
if (isWindows && !knownHard[base]) {
|
|
10698
|
-
|
|
10698
|
+
fs7.lstat(base, function(err) {
|
|
10699
10699
|
if (err)
|
|
10700
10700
|
return cb(err);
|
|
10701
10701
|
knownHard[base] = true;
|
|
@@ -10723,7 +10723,7 @@ var require_old = __commonJS({
|
|
|
10723
10723
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
|
|
10724
10724
|
return gotResolvedLink(cache[base]);
|
|
10725
10725
|
}
|
|
10726
|
-
return
|
|
10726
|
+
return fs7.lstat(base, gotStat);
|
|
10727
10727
|
}
|
|
10728
10728
|
function gotStat(err, stat) {
|
|
10729
10729
|
if (err)
|
|
@@ -10740,10 +10740,10 @@ var require_old = __commonJS({
|
|
|
10740
10740
|
return gotTarget(null, seenLinks[id], base);
|
|
10741
10741
|
}
|
|
10742
10742
|
}
|
|
10743
|
-
|
|
10743
|
+
fs7.stat(base, function(err2) {
|
|
10744
10744
|
if (err2)
|
|
10745
10745
|
return cb(err2);
|
|
10746
|
-
|
|
10746
|
+
fs7.readlink(base, function(err3, target) {
|
|
10747
10747
|
if (!isWindows)
|
|
10748
10748
|
seenLinks[id] = target;
|
|
10749
10749
|
gotTarget(err3, target);
|
|
@@ -10775,9 +10775,9 @@ var require_fs2 = __commonJS({
|
|
|
10775
10775
|
realpath.realpathSync = realpathSync;
|
|
10776
10776
|
realpath.monkeypatch = monkeypatch;
|
|
10777
10777
|
realpath.unmonkeypatch = unmonkeypatch;
|
|
10778
|
-
var
|
|
10779
|
-
var origRealpath =
|
|
10780
|
-
var origRealpathSync =
|
|
10778
|
+
var fs7 = require("fs");
|
|
10779
|
+
var origRealpath = fs7.realpath;
|
|
10780
|
+
var origRealpathSync = fs7.realpathSync;
|
|
10781
10781
|
var version = process.version;
|
|
10782
10782
|
var ok = /^v[0-5]\./.test(version);
|
|
10783
10783
|
var old = require_old();
|
|
@@ -10815,12 +10815,12 @@ var require_fs2 = __commonJS({
|
|
|
10815
10815
|
}
|
|
10816
10816
|
}
|
|
10817
10817
|
function monkeypatch() {
|
|
10818
|
-
|
|
10819
|
-
|
|
10818
|
+
fs7.realpath = realpath;
|
|
10819
|
+
fs7.realpathSync = realpathSync;
|
|
10820
10820
|
}
|
|
10821
10821
|
function unmonkeypatch() {
|
|
10822
|
-
|
|
10823
|
-
|
|
10822
|
+
fs7.realpath = origRealpath;
|
|
10823
|
+
fs7.realpathSync = origRealpathSync;
|
|
10824
10824
|
}
|
|
10825
10825
|
}
|
|
10826
10826
|
});
|
|
@@ -11540,7 +11540,7 @@ var require_common = __commonJS({
|
|
|
11540
11540
|
function ownProp(obj, field) {
|
|
11541
11541
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
11542
11542
|
}
|
|
11543
|
-
var
|
|
11543
|
+
var fs7 = require("fs");
|
|
11544
11544
|
var path7 = require("path");
|
|
11545
11545
|
var minimatch2 = require_minimatch2();
|
|
11546
11546
|
var isAbsolute = require("path").isAbsolute;
|
|
@@ -11595,7 +11595,7 @@ var require_common = __commonJS({
|
|
|
11595
11595
|
self2.stat = !!options.stat;
|
|
11596
11596
|
self2.noprocess = !!options.noprocess;
|
|
11597
11597
|
self2.absolute = !!options.absolute;
|
|
11598
|
-
self2.fs = options.fs ||
|
|
11598
|
+
self2.fs = options.fs || fs7;
|
|
11599
11599
|
self2.maxLength = options.maxLength || Infinity;
|
|
11600
11600
|
self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
|
|
11601
11601
|
self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
|
|
@@ -12694,7 +12694,7 @@ var require_windows = __commonJS({
|
|
|
12694
12694
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
|
|
12695
12695
|
module2.exports = isexe;
|
|
12696
12696
|
isexe.sync = sync;
|
|
12697
|
-
var
|
|
12697
|
+
var fs7 = require("fs");
|
|
12698
12698
|
function checkPathExt(path7, options) {
|
|
12699
12699
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
12700
12700
|
if (!pathext) {
|
|
@@ -12719,12 +12719,12 @@ var require_windows = __commonJS({
|
|
|
12719
12719
|
return checkPathExt(path7, options);
|
|
12720
12720
|
}
|
|
12721
12721
|
function isexe(path7, options, cb) {
|
|
12722
|
-
|
|
12722
|
+
fs7.stat(path7, function(er, stat) {
|
|
12723
12723
|
cb(er, er ? false : checkStat(stat, path7, options));
|
|
12724
12724
|
});
|
|
12725
12725
|
}
|
|
12726
12726
|
function sync(path7, options) {
|
|
12727
|
-
return checkStat(
|
|
12727
|
+
return checkStat(fs7.statSync(path7), path7, options);
|
|
12728
12728
|
}
|
|
12729
12729
|
}
|
|
12730
12730
|
});
|
|
@@ -12734,14 +12734,14 @@ var require_mode = __commonJS({
|
|
|
12734
12734
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
|
|
12735
12735
|
module2.exports = isexe;
|
|
12736
12736
|
isexe.sync = sync;
|
|
12737
|
-
var
|
|
12737
|
+
var fs7 = require("fs");
|
|
12738
12738
|
function isexe(path7, options, cb) {
|
|
12739
|
-
|
|
12739
|
+
fs7.stat(path7, function(er, stat) {
|
|
12740
12740
|
cb(er, er ? false : checkStat(stat, options));
|
|
12741
12741
|
});
|
|
12742
12742
|
}
|
|
12743
12743
|
function sync(path7, options) {
|
|
12744
|
-
return checkStat(
|
|
12744
|
+
return checkStat(fs7.statSync(path7), options);
|
|
12745
12745
|
}
|
|
12746
12746
|
function checkStat(stat, options) {
|
|
12747
12747
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -12765,7 +12765,7 @@ var require_mode = __commonJS({
|
|
|
12765
12765
|
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
12766
12766
|
var require_isexe = __commonJS({
|
|
12767
12767
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
|
|
12768
|
-
var
|
|
12768
|
+
var fs7 = require("fs");
|
|
12769
12769
|
var core;
|
|
12770
12770
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
12771
12771
|
core = require_windows();
|
|
@@ -13041,7 +13041,7 @@ var require_shebang_command = __commonJS({
|
|
|
13041
13041
|
var require_readShebang = __commonJS({
|
|
13042
13042
|
"../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
13043
13043
|
"use strict";
|
|
13044
|
-
var
|
|
13044
|
+
var fs7 = require("fs");
|
|
13045
13045
|
var shebangCommand = require_shebang_command();
|
|
13046
13046
|
function readShebang(command) {
|
|
13047
13047
|
const size = 150;
|
|
@@ -13054,9 +13054,9 @@ var require_readShebang = __commonJS({
|
|
|
13054
13054
|
}
|
|
13055
13055
|
let fd;
|
|
13056
13056
|
try {
|
|
13057
|
-
fd =
|
|
13058
|
-
|
|
13059
|
-
|
|
13057
|
+
fd = fs7.openSync(command, "r");
|
|
13058
|
+
fs7.readSync(fd, buffer, 0, size, 0);
|
|
13059
|
+
fs7.closeSync(fd);
|
|
13060
13060
|
} catch (e) {
|
|
13061
13061
|
}
|
|
13062
13062
|
return shebangCommand(buffer.toString());
|
|
@@ -14144,7 +14144,7 @@ var require_parse = __commonJS({
|
|
|
14144
14144
|
var escape = require_escape();
|
|
14145
14145
|
var readShebang = require_readShebang();
|
|
14146
14146
|
var semver = require_semver();
|
|
14147
|
-
var
|
|
14147
|
+
var isWin3 = process.platform === "win32";
|
|
14148
14148
|
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
14149
14149
|
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
14150
14150
|
var supportsShellOption = niceTry(() => semver.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
|
|
@@ -14159,7 +14159,7 @@ var require_parse = __commonJS({
|
|
|
14159
14159
|
return parsed.file;
|
|
14160
14160
|
}
|
|
14161
14161
|
function parseNonShell(parsed) {
|
|
14162
|
-
if (!
|
|
14162
|
+
if (!isWin3) {
|
|
14163
14163
|
return parsed;
|
|
14164
14164
|
}
|
|
14165
14165
|
const commandFile = detectShebang(parsed);
|
|
@@ -14181,7 +14181,7 @@ var require_parse = __commonJS({
|
|
|
14181
14181
|
return parsed;
|
|
14182
14182
|
}
|
|
14183
14183
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
14184
|
-
if (
|
|
14184
|
+
if (isWin3) {
|
|
14185
14185
|
parsed.command = typeof parsed.options.shell === "string" ? parsed.options.shell : process.env.comspec || "cmd.exe";
|
|
14186
14186
|
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
|
|
14187
14187
|
parsed.options.windowsVerbatimArguments = true;
|
|
@@ -14224,7 +14224,7 @@ var require_parse = __commonJS({
|
|
|
14224
14224
|
var require_enoent = __commonJS({
|
|
14225
14225
|
"../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
14226
14226
|
"use strict";
|
|
14227
|
-
var
|
|
14227
|
+
var isWin3 = process.platform === "win32";
|
|
14228
14228
|
function notFoundError(original, syscall) {
|
|
14229
14229
|
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
14230
14230
|
code: "ENOENT",
|
|
@@ -14235,7 +14235,7 @@ var require_enoent = __commonJS({
|
|
|
14235
14235
|
});
|
|
14236
14236
|
}
|
|
14237
14237
|
function hookChildProcess(cp, parsed) {
|
|
14238
|
-
if (!
|
|
14238
|
+
if (!isWin3) {
|
|
14239
14239
|
return;
|
|
14240
14240
|
}
|
|
14241
14241
|
const originalEmit = cp.emit;
|
|
@@ -14250,13 +14250,13 @@ var require_enoent = __commonJS({
|
|
|
14250
14250
|
};
|
|
14251
14251
|
}
|
|
14252
14252
|
function verifyENOENT(status, parsed) {
|
|
14253
|
-
if (
|
|
14253
|
+
if (isWin3 && status === 1 && !parsed.file) {
|
|
14254
14254
|
return notFoundError(parsed.original, "spawn");
|
|
14255
14255
|
}
|
|
14256
14256
|
return null;
|
|
14257
14257
|
}
|
|
14258
14258
|
function verifyENOENTSync(status, parsed) {
|
|
14259
|
-
if (
|
|
14259
|
+
if (isWin3 && status === 1 && !parsed.file) {
|
|
14260
14260
|
return notFoundError(parsed.original, "spawnSync");
|
|
14261
14261
|
}
|
|
14262
14262
|
return null;
|
|
@@ -21814,158 +21814,2063 @@ var require_ignore = __commonJS({
|
|
|
21814
21814
|
}
|
|
21815
21815
|
});
|
|
21816
21816
|
|
|
21817
|
-
//
|
|
21818
|
-
var
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21844
|
-
|
|
21845
|
-
|
|
21846
|
-
|
|
21847
|
-
|
|
21848
|
-
|
|
21849
|
-
|
|
21850
|
-
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
|
|
21857
|
-
|
|
21858
|
-
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
|
|
21869
|
-
|
|
21870
|
-
|
|
21871
|
-
|
|
21872
|
-
|
|
21873
|
-
|
|
21874
|
-
|
|
21875
|
-
|
|
21876
|
-
|
|
21877
|
-
|
|
21878
|
-
|
|
21879
|
-
|
|
21880
|
-
|
|
21881
|
-
|
|
21882
|
-
|
|
21883
|
-
|
|
21884
|
-
|
|
21885
|
-
|
|
21886
|
-
|
|
21887
|
-
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
|
|
21817
|
+
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
21818
|
+
var require_which2 = __commonJS({
|
|
21819
|
+
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
|
|
21820
|
+
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
21821
|
+
var path7 = require("path");
|
|
21822
|
+
var COLON = isWindows ? ";" : ":";
|
|
21823
|
+
var isexe = require_isexe();
|
|
21824
|
+
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
21825
|
+
var getPathInfo = (cmd, opt) => {
|
|
21826
|
+
const colon = opt.colon || COLON;
|
|
21827
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
|
|
21828
|
+
// windows always checks the cwd first
|
|
21829
|
+
...isWindows ? [process.cwd()] : [],
|
|
21830
|
+
...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
21831
|
+
"").split(colon)
|
|
21832
|
+
];
|
|
21833
|
+
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
21834
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
21835
|
+
if (isWindows) {
|
|
21836
|
+
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
|
|
21837
|
+
pathExt.unshift("");
|
|
21838
|
+
}
|
|
21839
|
+
return {
|
|
21840
|
+
pathEnv,
|
|
21841
|
+
pathExt,
|
|
21842
|
+
pathExtExe
|
|
21843
|
+
};
|
|
21844
|
+
};
|
|
21845
|
+
var which = (cmd, opt, cb) => {
|
|
21846
|
+
if (typeof opt === "function") {
|
|
21847
|
+
cb = opt;
|
|
21848
|
+
opt = {};
|
|
21849
|
+
}
|
|
21850
|
+
if (!opt)
|
|
21851
|
+
opt = {};
|
|
21852
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
21853
|
+
const found = [];
|
|
21854
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
21855
|
+
if (i === pathEnv.length)
|
|
21856
|
+
return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
21857
|
+
const ppRaw = pathEnv[i];
|
|
21858
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
21859
|
+
const pCmd = path7.join(pathPart, cmd);
|
|
21860
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
21861
|
+
resolve(subStep(p, i, 0));
|
|
21862
|
+
});
|
|
21863
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
21864
|
+
if (ii === pathExt.length)
|
|
21865
|
+
return resolve(step(i + 1));
|
|
21866
|
+
const ext = pathExt[ii];
|
|
21867
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
21868
|
+
if (!er && is) {
|
|
21869
|
+
if (opt.all)
|
|
21870
|
+
found.push(p + ext);
|
|
21871
|
+
else
|
|
21872
|
+
return resolve(p + ext);
|
|
21873
|
+
}
|
|
21874
|
+
return resolve(subStep(p, i, ii + 1));
|
|
21875
|
+
});
|
|
21876
|
+
});
|
|
21877
|
+
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
21878
|
+
};
|
|
21879
|
+
var whichSync = (cmd, opt) => {
|
|
21880
|
+
opt = opt || {};
|
|
21881
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
21882
|
+
const found = [];
|
|
21883
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
21884
|
+
const ppRaw = pathEnv[i];
|
|
21885
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
21886
|
+
const pCmd = path7.join(pathPart, cmd);
|
|
21887
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
21888
|
+
for (let j = 0; j < pathExt.length; j++) {
|
|
21889
|
+
const cur = p + pathExt[j];
|
|
21890
|
+
try {
|
|
21891
|
+
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
|
21892
|
+
if (is) {
|
|
21893
|
+
if (opt.all)
|
|
21894
|
+
found.push(cur);
|
|
21895
|
+
else
|
|
21896
|
+
return cur;
|
|
21897
|
+
}
|
|
21898
|
+
} catch (ex) {
|
|
21899
|
+
}
|
|
21900
|
+
}
|
|
21901
|
+
}
|
|
21902
|
+
if (opt.all && found.length)
|
|
21903
|
+
return found;
|
|
21904
|
+
if (opt.nothrow)
|
|
21905
|
+
return null;
|
|
21906
|
+
throw getNotFoundError(cmd);
|
|
21907
|
+
};
|
|
21908
|
+
module2.exports = which;
|
|
21909
|
+
which.sync = whichSync;
|
|
21910
|
+
}
|
|
21894
21911
|
});
|
|
21895
|
-
module.exports = __toCommonJS(src_exports);
|
|
21896
21912
|
|
|
21897
|
-
//
|
|
21898
|
-
var
|
|
21899
|
-
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
|
|
21906
|
-
|
|
21907
|
-
|
|
21913
|
+
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
21914
|
+
var require_path_key2 = __commonJS({
|
|
21915
|
+
"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
|
|
21916
|
+
"use strict";
|
|
21917
|
+
var pathKey = (options = {}) => {
|
|
21918
|
+
const environment = options.env || process.env;
|
|
21919
|
+
const platform = options.platform || process.platform;
|
|
21920
|
+
if (platform !== "win32") {
|
|
21921
|
+
return "PATH";
|
|
21922
|
+
}
|
|
21923
|
+
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
21924
|
+
};
|
|
21925
|
+
module2.exports = pathKey;
|
|
21926
|
+
module2.exports.default = pathKey;
|
|
21908
21927
|
}
|
|
21909
|
-
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21914
|
-
|
|
21915
|
-
|
|
21916
|
-
|
|
21917
|
-
|
|
21918
|
-
|
|
21919
|
-
|
|
21920
|
-
|
|
21921
|
-
|
|
21922
|
-
|
|
21923
|
-
|
|
21928
|
+
});
|
|
21929
|
+
|
|
21930
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
21931
|
+
var require_resolveCommand2 = __commonJS({
|
|
21932
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
21933
|
+
"use strict";
|
|
21934
|
+
var path7 = require("path");
|
|
21935
|
+
var which = require_which2();
|
|
21936
|
+
var getPathKey = require_path_key2();
|
|
21937
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
21938
|
+
const env = parsed.options.env || process.env;
|
|
21939
|
+
const cwd = process.cwd();
|
|
21940
|
+
const hasCustomCwd = parsed.options.cwd != null;
|
|
21941
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
21942
|
+
if (shouldSwitchCwd) {
|
|
21943
|
+
try {
|
|
21944
|
+
process.chdir(parsed.options.cwd);
|
|
21945
|
+
} catch (err) {
|
|
21946
|
+
}
|
|
21947
|
+
}
|
|
21948
|
+
let resolved;
|
|
21949
|
+
try {
|
|
21950
|
+
resolved = which.sync(parsed.command, {
|
|
21951
|
+
path: env[getPathKey({ env })],
|
|
21952
|
+
pathExt: withoutPathExt ? path7.delimiter : void 0
|
|
21953
|
+
});
|
|
21954
|
+
} catch (e) {
|
|
21955
|
+
} finally {
|
|
21956
|
+
if (shouldSwitchCwd) {
|
|
21957
|
+
process.chdir(cwd);
|
|
21958
|
+
}
|
|
21959
|
+
}
|
|
21960
|
+
if (resolved) {
|
|
21961
|
+
resolved = path7.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
21962
|
+
}
|
|
21963
|
+
return resolved;
|
|
21964
|
+
}
|
|
21965
|
+
function resolveCommand(parsed) {
|
|
21966
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
21967
|
+
}
|
|
21968
|
+
module2.exports = resolveCommand;
|
|
21924
21969
|
}
|
|
21925
|
-
|
|
21926
|
-
|
|
21970
|
+
});
|
|
21971
|
+
|
|
21972
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
21973
|
+
var require_escape2 = __commonJS({
|
|
21974
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
|
|
21975
|
+
"use strict";
|
|
21976
|
+
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
21977
|
+
function escapeCommand(arg) {
|
|
21978
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
21979
|
+
return arg;
|
|
21980
|
+
}
|
|
21981
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
21982
|
+
arg = `${arg}`;
|
|
21983
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
21984
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
21985
|
+
arg = `"${arg}"`;
|
|
21986
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
21987
|
+
if (doubleEscapeMetaChars) {
|
|
21988
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
21989
|
+
}
|
|
21990
|
+
return arg;
|
|
21991
|
+
}
|
|
21992
|
+
module2.exports.command = escapeCommand;
|
|
21993
|
+
module2.exports.argument = escapeArgument;
|
|
21927
21994
|
}
|
|
21928
|
-
|
|
21929
|
-
|
|
21995
|
+
});
|
|
21996
|
+
|
|
21997
|
+
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
21998
|
+
var require_shebang_regex2 = __commonJS({
|
|
21999
|
+
"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
|
|
22000
|
+
"use strict";
|
|
22001
|
+
module2.exports = /^#!(.*)/;
|
|
21930
22002
|
}
|
|
21931
|
-
};
|
|
22003
|
+
});
|
|
21932
22004
|
|
|
21933
|
-
//
|
|
21934
|
-
var
|
|
21935
|
-
|
|
21936
|
-
|
|
21937
|
-
var
|
|
21938
|
-
|
|
21939
|
-
|
|
21940
|
-
|
|
21941
|
-
|
|
21942
|
-
|
|
21943
|
-
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
this.mode = mode;
|
|
21951
|
-
this.contentType = contentType;
|
|
21952
|
-
this.fsPath = fsPath;
|
|
21953
|
-
this.size = size;
|
|
22005
|
+
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
22006
|
+
var require_shebang_command2 = __commonJS({
|
|
22007
|
+
"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
|
|
22008
|
+
"use strict";
|
|
22009
|
+
var shebangRegex = require_shebang_regex2();
|
|
22010
|
+
module2.exports = (string = "") => {
|
|
22011
|
+
const match = string.match(shebangRegex);
|
|
22012
|
+
if (!match) {
|
|
22013
|
+
return null;
|
|
22014
|
+
}
|
|
22015
|
+
const [path7, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
22016
|
+
const binary = path7.split("/").pop();
|
|
22017
|
+
if (binary === "env") {
|
|
22018
|
+
return argument;
|
|
22019
|
+
}
|
|
22020
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
22021
|
+
};
|
|
21954
22022
|
}
|
|
21955
|
-
|
|
21956
|
-
|
|
21957
|
-
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21963
|
-
|
|
21964
|
-
const
|
|
21965
|
-
|
|
21966
|
-
|
|
21967
|
-
|
|
21968
|
-
|
|
22023
|
+
});
|
|
22024
|
+
|
|
22025
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
22026
|
+
var require_readShebang2 = __commonJS({
|
|
22027
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
22028
|
+
"use strict";
|
|
22029
|
+
var fs7 = require("fs");
|
|
22030
|
+
var shebangCommand = require_shebang_command2();
|
|
22031
|
+
function readShebang(command) {
|
|
22032
|
+
const size = 150;
|
|
22033
|
+
const buffer = Buffer.alloc(size);
|
|
22034
|
+
let fd;
|
|
22035
|
+
try {
|
|
22036
|
+
fd = fs7.openSync(command, "r");
|
|
22037
|
+
fs7.readSync(fd, buffer, 0, size, 0);
|
|
22038
|
+
fs7.closeSync(fd);
|
|
22039
|
+
} catch (e) {
|
|
22040
|
+
}
|
|
22041
|
+
return shebangCommand(buffer.toString());
|
|
22042
|
+
}
|
|
22043
|
+
module2.exports = readShebang;
|
|
22044
|
+
}
|
|
22045
|
+
});
|
|
22046
|
+
|
|
22047
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
22048
|
+
var require_parse4 = __commonJS({
|
|
22049
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
22050
|
+
"use strict";
|
|
22051
|
+
var path7 = require("path");
|
|
22052
|
+
var resolveCommand = require_resolveCommand2();
|
|
22053
|
+
var escape = require_escape2();
|
|
22054
|
+
var readShebang = require_readShebang2();
|
|
22055
|
+
var isWin3 = process.platform === "win32";
|
|
22056
|
+
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
22057
|
+
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
22058
|
+
function detectShebang(parsed) {
|
|
22059
|
+
parsed.file = resolveCommand(parsed);
|
|
22060
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
22061
|
+
if (shebang) {
|
|
22062
|
+
parsed.args.unshift(parsed.file);
|
|
22063
|
+
parsed.command = shebang;
|
|
22064
|
+
return resolveCommand(parsed);
|
|
22065
|
+
}
|
|
22066
|
+
return parsed.file;
|
|
22067
|
+
}
|
|
22068
|
+
function parseNonShell(parsed) {
|
|
22069
|
+
if (!isWin3) {
|
|
22070
|
+
return parsed;
|
|
22071
|
+
}
|
|
22072
|
+
const commandFile = detectShebang(parsed);
|
|
22073
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
22074
|
+
if (parsed.options.forceShell || needsShell) {
|
|
22075
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
22076
|
+
parsed.command = path7.normalize(parsed.command);
|
|
22077
|
+
parsed.command = escape.command(parsed.command);
|
|
22078
|
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
22079
|
+
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
22080
|
+
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
|
|
22081
|
+
parsed.command = process.env.comspec || "cmd.exe";
|
|
22082
|
+
parsed.options.windowsVerbatimArguments = true;
|
|
22083
|
+
}
|
|
22084
|
+
return parsed;
|
|
22085
|
+
}
|
|
22086
|
+
function parse3(command, args, options) {
|
|
22087
|
+
if (args && !Array.isArray(args)) {
|
|
22088
|
+
options = args;
|
|
22089
|
+
args = null;
|
|
22090
|
+
}
|
|
22091
|
+
args = args ? args.slice(0) : [];
|
|
22092
|
+
options = Object.assign({}, options);
|
|
22093
|
+
const parsed = {
|
|
22094
|
+
command,
|
|
22095
|
+
args,
|
|
22096
|
+
options,
|
|
22097
|
+
file: void 0,
|
|
22098
|
+
original: {
|
|
22099
|
+
command,
|
|
22100
|
+
args
|
|
22101
|
+
}
|
|
22102
|
+
};
|
|
22103
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
22104
|
+
}
|
|
22105
|
+
module2.exports = parse3;
|
|
22106
|
+
}
|
|
22107
|
+
});
|
|
22108
|
+
|
|
22109
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
22110
|
+
var require_enoent2 = __commonJS({
|
|
22111
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
22112
|
+
"use strict";
|
|
22113
|
+
var isWin3 = process.platform === "win32";
|
|
22114
|
+
function notFoundError(original, syscall) {
|
|
22115
|
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
22116
|
+
code: "ENOENT",
|
|
22117
|
+
errno: "ENOENT",
|
|
22118
|
+
syscall: `${syscall} ${original.command}`,
|
|
22119
|
+
path: original.command,
|
|
22120
|
+
spawnargs: original.args
|
|
22121
|
+
});
|
|
22122
|
+
}
|
|
22123
|
+
function hookChildProcess(cp, parsed) {
|
|
22124
|
+
if (!isWin3) {
|
|
22125
|
+
return;
|
|
22126
|
+
}
|
|
22127
|
+
const originalEmit = cp.emit;
|
|
22128
|
+
cp.emit = function(name, arg1) {
|
|
22129
|
+
if (name === "exit") {
|
|
22130
|
+
const err = verifyENOENT(arg1, parsed);
|
|
22131
|
+
if (err) {
|
|
22132
|
+
return originalEmit.call(cp, "error", err);
|
|
22133
|
+
}
|
|
22134
|
+
}
|
|
22135
|
+
return originalEmit.apply(cp, arguments);
|
|
22136
|
+
};
|
|
22137
|
+
}
|
|
22138
|
+
function verifyENOENT(status, parsed) {
|
|
22139
|
+
if (isWin3 && status === 1 && !parsed.file) {
|
|
22140
|
+
return notFoundError(parsed.original, "spawn");
|
|
22141
|
+
}
|
|
22142
|
+
return null;
|
|
22143
|
+
}
|
|
22144
|
+
function verifyENOENTSync(status, parsed) {
|
|
22145
|
+
if (isWin3 && status === 1 && !parsed.file) {
|
|
22146
|
+
return notFoundError(parsed.original, "spawnSync");
|
|
22147
|
+
}
|
|
22148
|
+
return null;
|
|
22149
|
+
}
|
|
22150
|
+
module2.exports = {
|
|
22151
|
+
hookChildProcess,
|
|
22152
|
+
verifyENOENT,
|
|
22153
|
+
verifyENOENTSync,
|
|
22154
|
+
notFoundError
|
|
22155
|
+
};
|
|
22156
|
+
}
|
|
22157
|
+
});
|
|
22158
|
+
|
|
22159
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
22160
|
+
var require_cross_spawn2 = __commonJS({
|
|
22161
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
|
|
22162
|
+
"use strict";
|
|
22163
|
+
var cp = require("child_process");
|
|
22164
|
+
var parse3 = require_parse4();
|
|
22165
|
+
var enoent = require_enoent2();
|
|
22166
|
+
function spawn2(command, args, options) {
|
|
22167
|
+
const parsed = parse3(command, args, options);
|
|
22168
|
+
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
22169
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
22170
|
+
return spawned;
|
|
22171
|
+
}
|
|
22172
|
+
function spawnSync(command, args, options) {
|
|
22173
|
+
const parsed = parse3(command, args, options);
|
|
22174
|
+
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
22175
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
22176
|
+
return result;
|
|
22177
|
+
}
|
|
22178
|
+
module2.exports = spawn2;
|
|
22179
|
+
module2.exports.spawn = spawn2;
|
|
22180
|
+
module2.exports.sync = spawnSync;
|
|
22181
|
+
module2.exports._parse = parse3;
|
|
22182
|
+
module2.exports._enoent = enoent;
|
|
22183
|
+
}
|
|
22184
|
+
});
|
|
22185
|
+
|
|
22186
|
+
// ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js
|
|
22187
|
+
var require_strip_final_newline = __commonJS({
|
|
22188
|
+
"../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) {
|
|
22189
|
+
"use strict";
|
|
22190
|
+
module2.exports = (input) => {
|
|
22191
|
+
const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
|
|
22192
|
+
const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
|
|
22193
|
+
if (input[input.length - 1] === LF) {
|
|
22194
|
+
input = input.slice(0, input.length - 1);
|
|
22195
|
+
}
|
|
22196
|
+
if (input[input.length - 1] === CR) {
|
|
22197
|
+
input = input.slice(0, input.length - 1);
|
|
22198
|
+
}
|
|
22199
|
+
return input;
|
|
22200
|
+
};
|
|
22201
|
+
}
|
|
22202
|
+
});
|
|
22203
|
+
|
|
22204
|
+
// ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js
|
|
22205
|
+
var require_npm_run_path = __commonJS({
|
|
22206
|
+
"../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
22207
|
+
"use strict";
|
|
22208
|
+
var path7 = require("path");
|
|
22209
|
+
var pathKey = require_path_key2();
|
|
22210
|
+
var npmRunPath = (options) => {
|
|
22211
|
+
options = {
|
|
22212
|
+
cwd: process.cwd(),
|
|
22213
|
+
path: process.env[pathKey()],
|
|
22214
|
+
execPath: process.execPath,
|
|
22215
|
+
...options
|
|
22216
|
+
};
|
|
22217
|
+
let previous;
|
|
22218
|
+
let cwdPath = path7.resolve(options.cwd);
|
|
22219
|
+
const result = [];
|
|
22220
|
+
while (previous !== cwdPath) {
|
|
22221
|
+
result.push(path7.join(cwdPath, "node_modules/.bin"));
|
|
22222
|
+
previous = cwdPath;
|
|
22223
|
+
cwdPath = path7.resolve(cwdPath, "..");
|
|
22224
|
+
}
|
|
22225
|
+
const execPathDir = path7.resolve(options.cwd, options.execPath, "..");
|
|
22226
|
+
result.push(execPathDir);
|
|
22227
|
+
return result.concat(options.path).join(path7.delimiter);
|
|
22228
|
+
};
|
|
22229
|
+
module2.exports = npmRunPath;
|
|
22230
|
+
module2.exports.default = npmRunPath;
|
|
22231
|
+
module2.exports.env = (options) => {
|
|
22232
|
+
options = {
|
|
22233
|
+
env: process.env,
|
|
22234
|
+
...options
|
|
22235
|
+
};
|
|
22236
|
+
const env = { ...options.env };
|
|
22237
|
+
const path8 = pathKey({ env });
|
|
22238
|
+
options.path = env[path8];
|
|
22239
|
+
env[path8] = module2.exports(options);
|
|
22240
|
+
return env;
|
|
22241
|
+
};
|
|
22242
|
+
}
|
|
22243
|
+
});
|
|
22244
|
+
|
|
22245
|
+
// ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js
|
|
22246
|
+
var require_mimic_fn = __commonJS({
|
|
22247
|
+
"../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) {
|
|
22248
|
+
"use strict";
|
|
22249
|
+
var mimicFn = (to, from) => {
|
|
22250
|
+
for (const prop of Reflect.ownKeys(from)) {
|
|
22251
|
+
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
22252
|
+
}
|
|
22253
|
+
return to;
|
|
22254
|
+
};
|
|
22255
|
+
module2.exports = mimicFn;
|
|
22256
|
+
module2.exports.default = mimicFn;
|
|
22257
|
+
}
|
|
22258
|
+
});
|
|
22259
|
+
|
|
22260
|
+
// ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js
|
|
22261
|
+
var require_onetime = __commonJS({
|
|
22262
|
+
"../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) {
|
|
22263
|
+
"use strict";
|
|
22264
|
+
var mimicFn = require_mimic_fn();
|
|
22265
|
+
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
22266
|
+
var onetime = (function_, options = {}) => {
|
|
22267
|
+
if (typeof function_ !== "function") {
|
|
22268
|
+
throw new TypeError("Expected a function");
|
|
22269
|
+
}
|
|
22270
|
+
let returnValue;
|
|
22271
|
+
let callCount = 0;
|
|
22272
|
+
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
22273
|
+
const onetime2 = function(...arguments_) {
|
|
22274
|
+
calledFunctions.set(onetime2, ++callCount);
|
|
22275
|
+
if (callCount === 1) {
|
|
22276
|
+
returnValue = function_.apply(this, arguments_);
|
|
22277
|
+
function_ = null;
|
|
22278
|
+
} else if (options.throw === true) {
|
|
22279
|
+
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
22280
|
+
}
|
|
22281
|
+
return returnValue;
|
|
22282
|
+
};
|
|
22283
|
+
mimicFn(onetime2, function_);
|
|
22284
|
+
calledFunctions.set(onetime2, callCount);
|
|
22285
|
+
return onetime2;
|
|
22286
|
+
};
|
|
22287
|
+
module2.exports = onetime;
|
|
22288
|
+
module2.exports.default = onetime;
|
|
22289
|
+
module2.exports.callCount = (function_) => {
|
|
22290
|
+
if (!calledFunctions.has(function_)) {
|
|
22291
|
+
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
22292
|
+
}
|
|
22293
|
+
return calledFunctions.get(function_);
|
|
22294
|
+
};
|
|
22295
|
+
}
|
|
22296
|
+
});
|
|
22297
|
+
|
|
22298
|
+
// ../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/core.js
|
|
22299
|
+
var require_core2 = __commonJS({
|
|
22300
|
+
"../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/core.js"(exports2) {
|
|
22301
|
+
"use strict";
|
|
22302
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22303
|
+
exports2.SIGNALS = void 0;
|
|
22304
|
+
var SIGNALS = [
|
|
22305
|
+
{
|
|
22306
|
+
name: "SIGHUP",
|
|
22307
|
+
number: 1,
|
|
22308
|
+
action: "terminate",
|
|
22309
|
+
description: "Terminal closed",
|
|
22310
|
+
standard: "posix"
|
|
22311
|
+
},
|
|
22312
|
+
{
|
|
22313
|
+
name: "SIGINT",
|
|
22314
|
+
number: 2,
|
|
22315
|
+
action: "terminate",
|
|
22316
|
+
description: "User interruption with CTRL-C",
|
|
22317
|
+
standard: "ansi"
|
|
22318
|
+
},
|
|
22319
|
+
{
|
|
22320
|
+
name: "SIGQUIT",
|
|
22321
|
+
number: 3,
|
|
22322
|
+
action: "core",
|
|
22323
|
+
description: "User interruption with CTRL-\\",
|
|
22324
|
+
standard: "posix"
|
|
22325
|
+
},
|
|
22326
|
+
{
|
|
22327
|
+
name: "SIGILL",
|
|
22328
|
+
number: 4,
|
|
22329
|
+
action: "core",
|
|
22330
|
+
description: "Invalid machine instruction",
|
|
22331
|
+
standard: "ansi"
|
|
22332
|
+
},
|
|
22333
|
+
{
|
|
22334
|
+
name: "SIGTRAP",
|
|
22335
|
+
number: 5,
|
|
22336
|
+
action: "core",
|
|
22337
|
+
description: "Debugger breakpoint",
|
|
22338
|
+
standard: "posix"
|
|
22339
|
+
},
|
|
22340
|
+
{
|
|
22341
|
+
name: "SIGABRT",
|
|
22342
|
+
number: 6,
|
|
22343
|
+
action: "core",
|
|
22344
|
+
description: "Aborted",
|
|
22345
|
+
standard: "ansi"
|
|
22346
|
+
},
|
|
22347
|
+
{
|
|
22348
|
+
name: "SIGIOT",
|
|
22349
|
+
number: 6,
|
|
22350
|
+
action: "core",
|
|
22351
|
+
description: "Aborted",
|
|
22352
|
+
standard: "bsd"
|
|
22353
|
+
},
|
|
22354
|
+
{
|
|
22355
|
+
name: "SIGBUS",
|
|
22356
|
+
number: 7,
|
|
22357
|
+
action: "core",
|
|
22358
|
+
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
22359
|
+
standard: "bsd"
|
|
22360
|
+
},
|
|
22361
|
+
{
|
|
22362
|
+
name: "SIGEMT",
|
|
22363
|
+
number: 7,
|
|
22364
|
+
action: "terminate",
|
|
22365
|
+
description: "Command should be emulated but is not implemented",
|
|
22366
|
+
standard: "other"
|
|
22367
|
+
},
|
|
22368
|
+
{
|
|
22369
|
+
name: "SIGFPE",
|
|
22370
|
+
number: 8,
|
|
22371
|
+
action: "core",
|
|
22372
|
+
description: "Floating point arithmetic error",
|
|
22373
|
+
standard: "ansi"
|
|
22374
|
+
},
|
|
22375
|
+
{
|
|
22376
|
+
name: "SIGKILL",
|
|
22377
|
+
number: 9,
|
|
22378
|
+
action: "terminate",
|
|
22379
|
+
description: "Forced termination",
|
|
22380
|
+
standard: "posix",
|
|
22381
|
+
forced: true
|
|
22382
|
+
},
|
|
22383
|
+
{
|
|
22384
|
+
name: "SIGUSR1",
|
|
22385
|
+
number: 10,
|
|
22386
|
+
action: "terminate",
|
|
22387
|
+
description: "Application-specific signal",
|
|
22388
|
+
standard: "posix"
|
|
22389
|
+
},
|
|
22390
|
+
{
|
|
22391
|
+
name: "SIGSEGV",
|
|
22392
|
+
number: 11,
|
|
22393
|
+
action: "core",
|
|
22394
|
+
description: "Segmentation fault",
|
|
22395
|
+
standard: "ansi"
|
|
22396
|
+
},
|
|
22397
|
+
{
|
|
22398
|
+
name: "SIGUSR2",
|
|
22399
|
+
number: 12,
|
|
22400
|
+
action: "terminate",
|
|
22401
|
+
description: "Application-specific signal",
|
|
22402
|
+
standard: "posix"
|
|
22403
|
+
},
|
|
22404
|
+
{
|
|
22405
|
+
name: "SIGPIPE",
|
|
22406
|
+
number: 13,
|
|
22407
|
+
action: "terminate",
|
|
22408
|
+
description: "Broken pipe or socket",
|
|
22409
|
+
standard: "posix"
|
|
22410
|
+
},
|
|
22411
|
+
{
|
|
22412
|
+
name: "SIGALRM",
|
|
22413
|
+
number: 14,
|
|
22414
|
+
action: "terminate",
|
|
22415
|
+
description: "Timeout or timer",
|
|
22416
|
+
standard: "posix"
|
|
22417
|
+
},
|
|
22418
|
+
{
|
|
22419
|
+
name: "SIGTERM",
|
|
22420
|
+
number: 15,
|
|
22421
|
+
action: "terminate",
|
|
22422
|
+
description: "Termination",
|
|
22423
|
+
standard: "ansi"
|
|
22424
|
+
},
|
|
22425
|
+
{
|
|
22426
|
+
name: "SIGSTKFLT",
|
|
22427
|
+
number: 16,
|
|
22428
|
+
action: "terminate",
|
|
22429
|
+
description: "Stack is empty or overflowed",
|
|
22430
|
+
standard: "other"
|
|
22431
|
+
},
|
|
22432
|
+
{
|
|
22433
|
+
name: "SIGCHLD",
|
|
22434
|
+
number: 17,
|
|
22435
|
+
action: "ignore",
|
|
22436
|
+
description: "Child process terminated, paused or unpaused",
|
|
22437
|
+
standard: "posix"
|
|
22438
|
+
},
|
|
22439
|
+
{
|
|
22440
|
+
name: "SIGCLD",
|
|
22441
|
+
number: 17,
|
|
22442
|
+
action: "ignore",
|
|
22443
|
+
description: "Child process terminated, paused or unpaused",
|
|
22444
|
+
standard: "other"
|
|
22445
|
+
},
|
|
22446
|
+
{
|
|
22447
|
+
name: "SIGCONT",
|
|
22448
|
+
number: 18,
|
|
22449
|
+
action: "unpause",
|
|
22450
|
+
description: "Unpaused",
|
|
22451
|
+
standard: "posix",
|
|
22452
|
+
forced: true
|
|
22453
|
+
},
|
|
22454
|
+
{
|
|
22455
|
+
name: "SIGSTOP",
|
|
22456
|
+
number: 19,
|
|
22457
|
+
action: "pause",
|
|
22458
|
+
description: "Paused",
|
|
22459
|
+
standard: "posix",
|
|
22460
|
+
forced: true
|
|
22461
|
+
},
|
|
22462
|
+
{
|
|
22463
|
+
name: "SIGTSTP",
|
|
22464
|
+
number: 20,
|
|
22465
|
+
action: "pause",
|
|
22466
|
+
description: 'Paused using CTRL-Z or "suspend"',
|
|
22467
|
+
standard: "posix"
|
|
22468
|
+
},
|
|
22469
|
+
{
|
|
22470
|
+
name: "SIGTTIN",
|
|
22471
|
+
number: 21,
|
|
22472
|
+
action: "pause",
|
|
22473
|
+
description: "Background process cannot read terminal input",
|
|
22474
|
+
standard: "posix"
|
|
22475
|
+
},
|
|
22476
|
+
{
|
|
22477
|
+
name: "SIGBREAK",
|
|
22478
|
+
number: 21,
|
|
22479
|
+
action: "terminate",
|
|
22480
|
+
description: "User interruption with CTRL-BREAK",
|
|
22481
|
+
standard: "other"
|
|
22482
|
+
},
|
|
22483
|
+
{
|
|
22484
|
+
name: "SIGTTOU",
|
|
22485
|
+
number: 22,
|
|
22486
|
+
action: "pause",
|
|
22487
|
+
description: "Background process cannot write to terminal output",
|
|
22488
|
+
standard: "posix"
|
|
22489
|
+
},
|
|
22490
|
+
{
|
|
22491
|
+
name: "SIGURG",
|
|
22492
|
+
number: 23,
|
|
22493
|
+
action: "ignore",
|
|
22494
|
+
description: "Socket received out-of-band data",
|
|
22495
|
+
standard: "bsd"
|
|
22496
|
+
},
|
|
22497
|
+
{
|
|
22498
|
+
name: "SIGXCPU",
|
|
22499
|
+
number: 24,
|
|
22500
|
+
action: "core",
|
|
22501
|
+
description: "Process timed out",
|
|
22502
|
+
standard: "bsd"
|
|
22503
|
+
},
|
|
22504
|
+
{
|
|
22505
|
+
name: "SIGXFSZ",
|
|
22506
|
+
number: 25,
|
|
22507
|
+
action: "core",
|
|
22508
|
+
description: "File too big",
|
|
22509
|
+
standard: "bsd"
|
|
22510
|
+
},
|
|
22511
|
+
{
|
|
22512
|
+
name: "SIGVTALRM",
|
|
22513
|
+
number: 26,
|
|
22514
|
+
action: "terminate",
|
|
22515
|
+
description: "Timeout or timer",
|
|
22516
|
+
standard: "bsd"
|
|
22517
|
+
},
|
|
22518
|
+
{
|
|
22519
|
+
name: "SIGPROF",
|
|
22520
|
+
number: 27,
|
|
22521
|
+
action: "terminate",
|
|
22522
|
+
description: "Timeout or timer",
|
|
22523
|
+
standard: "bsd"
|
|
22524
|
+
},
|
|
22525
|
+
{
|
|
22526
|
+
name: "SIGWINCH",
|
|
22527
|
+
number: 28,
|
|
22528
|
+
action: "ignore",
|
|
22529
|
+
description: "Terminal window size changed",
|
|
22530
|
+
standard: "bsd"
|
|
22531
|
+
},
|
|
22532
|
+
{
|
|
22533
|
+
name: "SIGIO",
|
|
22534
|
+
number: 29,
|
|
22535
|
+
action: "terminate",
|
|
22536
|
+
description: "I/O is available",
|
|
22537
|
+
standard: "other"
|
|
22538
|
+
},
|
|
22539
|
+
{
|
|
22540
|
+
name: "SIGPOLL",
|
|
22541
|
+
number: 29,
|
|
22542
|
+
action: "terminate",
|
|
22543
|
+
description: "Watched event",
|
|
22544
|
+
standard: "other"
|
|
22545
|
+
},
|
|
22546
|
+
{
|
|
22547
|
+
name: "SIGINFO",
|
|
22548
|
+
number: 29,
|
|
22549
|
+
action: "ignore",
|
|
22550
|
+
description: "Request for process information",
|
|
22551
|
+
standard: "other"
|
|
22552
|
+
},
|
|
22553
|
+
{
|
|
22554
|
+
name: "SIGPWR",
|
|
22555
|
+
number: 30,
|
|
22556
|
+
action: "terminate",
|
|
22557
|
+
description: "Device running out of power",
|
|
22558
|
+
standard: "systemv"
|
|
22559
|
+
},
|
|
22560
|
+
{
|
|
22561
|
+
name: "SIGSYS",
|
|
22562
|
+
number: 31,
|
|
22563
|
+
action: "core",
|
|
22564
|
+
description: "Invalid system call",
|
|
22565
|
+
standard: "other"
|
|
22566
|
+
},
|
|
22567
|
+
{
|
|
22568
|
+
name: "SIGUNUSED",
|
|
22569
|
+
number: 31,
|
|
22570
|
+
action: "terminate",
|
|
22571
|
+
description: "Invalid system call",
|
|
22572
|
+
standard: "other"
|
|
22573
|
+
}
|
|
22574
|
+
];
|
|
22575
|
+
exports2.SIGNALS = SIGNALS;
|
|
22576
|
+
}
|
|
22577
|
+
});
|
|
22578
|
+
|
|
22579
|
+
// ../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/realtime.js
|
|
22580
|
+
var require_realtime = __commonJS({
|
|
22581
|
+
"../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/realtime.js"(exports2) {
|
|
22582
|
+
"use strict";
|
|
22583
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22584
|
+
exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0;
|
|
22585
|
+
var getRealtimeSignals = function() {
|
|
22586
|
+
const length = SIGRTMAX - SIGRTMIN + 1;
|
|
22587
|
+
return Array.from({ length }, getRealtimeSignal);
|
|
22588
|
+
};
|
|
22589
|
+
exports2.getRealtimeSignals = getRealtimeSignals;
|
|
22590
|
+
var getRealtimeSignal = function(value, index) {
|
|
22591
|
+
return {
|
|
22592
|
+
name: `SIGRT${index + 1}`,
|
|
22593
|
+
number: SIGRTMIN + index,
|
|
22594
|
+
action: "terminate",
|
|
22595
|
+
description: "Application-specific signal (realtime)",
|
|
22596
|
+
standard: "posix"
|
|
22597
|
+
};
|
|
22598
|
+
};
|
|
22599
|
+
var SIGRTMIN = 34;
|
|
22600
|
+
var SIGRTMAX = 64;
|
|
22601
|
+
exports2.SIGRTMAX = SIGRTMAX;
|
|
22602
|
+
}
|
|
22603
|
+
});
|
|
22604
|
+
|
|
22605
|
+
// ../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/signals.js
|
|
22606
|
+
var require_signals = __commonJS({
|
|
22607
|
+
"../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/signals.js"(exports2) {
|
|
22608
|
+
"use strict";
|
|
22609
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22610
|
+
exports2.getSignals = void 0;
|
|
22611
|
+
var _os = require("os");
|
|
22612
|
+
var _core = require_core2();
|
|
22613
|
+
var _realtime = require_realtime();
|
|
22614
|
+
var getSignals = function() {
|
|
22615
|
+
const realtimeSignals = (0, _realtime.getRealtimeSignals)();
|
|
22616
|
+
const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
22617
|
+
return signals;
|
|
22618
|
+
};
|
|
22619
|
+
exports2.getSignals = getSignals;
|
|
22620
|
+
var normalizeSignal = function({
|
|
22621
|
+
name,
|
|
22622
|
+
number: defaultNumber,
|
|
22623
|
+
description,
|
|
22624
|
+
action,
|
|
22625
|
+
forced = false,
|
|
22626
|
+
standard
|
|
22627
|
+
}) {
|
|
22628
|
+
const {
|
|
22629
|
+
signals: { [name]: constantSignal }
|
|
22630
|
+
} = _os.constants;
|
|
22631
|
+
const supported = constantSignal !== void 0;
|
|
22632
|
+
const number = supported ? constantSignal : defaultNumber;
|
|
22633
|
+
return { name, number, description, supported, action, forced, standard };
|
|
22634
|
+
};
|
|
22635
|
+
}
|
|
22636
|
+
});
|
|
22637
|
+
|
|
22638
|
+
// ../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/main.js
|
|
22639
|
+
var require_main = __commonJS({
|
|
22640
|
+
"../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/main.js"(exports2) {
|
|
22641
|
+
"use strict";
|
|
22642
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
22643
|
+
exports2.signalsByNumber = exports2.signalsByName = void 0;
|
|
22644
|
+
var _os = require("os");
|
|
22645
|
+
var _signals = require_signals();
|
|
22646
|
+
var _realtime = require_realtime();
|
|
22647
|
+
var getSignalsByName = function() {
|
|
22648
|
+
const signals = (0, _signals.getSignals)();
|
|
22649
|
+
return signals.reduce(getSignalByName, {});
|
|
22650
|
+
};
|
|
22651
|
+
var getSignalByName = function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) {
|
|
22652
|
+
return {
|
|
22653
|
+
...signalByNameMemo,
|
|
22654
|
+
[name]: { name, number, description, supported, action, forced, standard }
|
|
22655
|
+
};
|
|
22656
|
+
};
|
|
22657
|
+
var signalsByName = getSignalsByName();
|
|
22658
|
+
exports2.signalsByName = signalsByName;
|
|
22659
|
+
var getSignalsByNumber = function() {
|
|
22660
|
+
const signals = (0, _signals.getSignals)();
|
|
22661
|
+
const length = _realtime.SIGRTMAX + 1;
|
|
22662
|
+
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals));
|
|
22663
|
+
return Object.assign({}, ...signalsA);
|
|
22664
|
+
};
|
|
22665
|
+
var getSignalByNumber = function(number, signals) {
|
|
22666
|
+
const signal = findSignalByNumber(number, signals);
|
|
22667
|
+
if (signal === void 0) {
|
|
22668
|
+
return {};
|
|
22669
|
+
}
|
|
22670
|
+
const { name, description, supported, action, forced, standard } = signal;
|
|
22671
|
+
return {
|
|
22672
|
+
[number]: {
|
|
22673
|
+
name,
|
|
22674
|
+
number,
|
|
22675
|
+
description,
|
|
22676
|
+
supported,
|
|
22677
|
+
action,
|
|
22678
|
+
forced,
|
|
22679
|
+
standard
|
|
22680
|
+
}
|
|
22681
|
+
};
|
|
22682
|
+
};
|
|
22683
|
+
var findSignalByNumber = function(number, signals) {
|
|
22684
|
+
const signal = signals.find(({ name }) => _os.constants.signals[name] === number);
|
|
22685
|
+
if (signal !== void 0) {
|
|
22686
|
+
return signal;
|
|
22687
|
+
}
|
|
22688
|
+
return signals.find((signalA) => signalA.number === number);
|
|
22689
|
+
};
|
|
22690
|
+
var signalsByNumber = getSignalsByNumber();
|
|
22691
|
+
exports2.signalsByNumber = signalsByNumber;
|
|
22692
|
+
}
|
|
22693
|
+
});
|
|
22694
|
+
|
|
22695
|
+
// ../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/error.js
|
|
22696
|
+
var require_error = __commonJS({
|
|
22697
|
+
"../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/error.js"(exports2, module2) {
|
|
22698
|
+
"use strict";
|
|
22699
|
+
var { signalsByName } = require_main();
|
|
22700
|
+
var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
22701
|
+
if (timedOut) {
|
|
22702
|
+
return `timed out after ${timeout} milliseconds`;
|
|
22703
|
+
}
|
|
22704
|
+
if (isCanceled) {
|
|
22705
|
+
return "was canceled";
|
|
22706
|
+
}
|
|
22707
|
+
if (errorCode !== void 0) {
|
|
22708
|
+
return `failed with ${errorCode}`;
|
|
22709
|
+
}
|
|
22710
|
+
if (signal !== void 0) {
|
|
22711
|
+
return `was killed with ${signal} (${signalDescription})`;
|
|
22712
|
+
}
|
|
22713
|
+
if (exitCode !== void 0) {
|
|
22714
|
+
return `failed with exit code ${exitCode}`;
|
|
22715
|
+
}
|
|
22716
|
+
return "failed";
|
|
22717
|
+
};
|
|
22718
|
+
var makeError = ({
|
|
22719
|
+
stdout,
|
|
22720
|
+
stderr,
|
|
22721
|
+
all,
|
|
22722
|
+
error,
|
|
22723
|
+
signal,
|
|
22724
|
+
exitCode,
|
|
22725
|
+
command,
|
|
22726
|
+
timedOut,
|
|
22727
|
+
isCanceled,
|
|
22728
|
+
killed,
|
|
22729
|
+
parsed: { options: { timeout } }
|
|
22730
|
+
}) => {
|
|
22731
|
+
exitCode = exitCode === null ? void 0 : exitCode;
|
|
22732
|
+
signal = signal === null ? void 0 : signal;
|
|
22733
|
+
const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
|
|
22734
|
+
const errorCode = error && error.code;
|
|
22735
|
+
const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled });
|
|
22736
|
+
const message = `Command ${prefix}: ${command}`;
|
|
22737
|
+
if (error instanceof Error) {
|
|
22738
|
+
error.originalMessage = error.message;
|
|
22739
|
+
error.message = `${message}
|
|
22740
|
+
${error.message}`;
|
|
22741
|
+
} else {
|
|
22742
|
+
error = new Error(message);
|
|
22743
|
+
}
|
|
22744
|
+
error.command = command;
|
|
22745
|
+
error.exitCode = exitCode;
|
|
22746
|
+
error.signal = signal;
|
|
22747
|
+
error.signalDescription = signalDescription;
|
|
22748
|
+
error.stdout = stdout;
|
|
22749
|
+
error.stderr = stderr;
|
|
22750
|
+
if (all !== void 0) {
|
|
22751
|
+
error.all = all;
|
|
22752
|
+
}
|
|
22753
|
+
if ("bufferedData" in error) {
|
|
22754
|
+
delete error.bufferedData;
|
|
22755
|
+
}
|
|
22756
|
+
error.failed = true;
|
|
22757
|
+
error.timedOut = Boolean(timedOut);
|
|
22758
|
+
error.isCanceled = isCanceled;
|
|
22759
|
+
error.killed = killed && !timedOut;
|
|
22760
|
+
return error;
|
|
22761
|
+
};
|
|
22762
|
+
module2.exports = makeError;
|
|
22763
|
+
}
|
|
22764
|
+
});
|
|
22765
|
+
|
|
22766
|
+
// ../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stdio.js
|
|
22767
|
+
var require_stdio = __commonJS({
|
|
22768
|
+
"../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stdio.js"(exports2, module2) {
|
|
22769
|
+
"use strict";
|
|
22770
|
+
var aliases = ["stdin", "stdout", "stderr"];
|
|
22771
|
+
var hasAlias = (opts) => aliases.some((alias) => opts[alias] !== void 0);
|
|
22772
|
+
var normalizeStdio = (opts) => {
|
|
22773
|
+
if (!opts) {
|
|
22774
|
+
return;
|
|
22775
|
+
}
|
|
22776
|
+
const { stdio } = opts;
|
|
22777
|
+
if (stdio === void 0) {
|
|
22778
|
+
return aliases.map((alias) => opts[alias]);
|
|
22779
|
+
}
|
|
22780
|
+
if (hasAlias(opts)) {
|
|
22781
|
+
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
|
|
22782
|
+
}
|
|
22783
|
+
if (typeof stdio === "string") {
|
|
22784
|
+
return stdio;
|
|
22785
|
+
}
|
|
22786
|
+
if (!Array.isArray(stdio)) {
|
|
22787
|
+
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
22788
|
+
}
|
|
22789
|
+
const length = Math.max(stdio.length, aliases.length);
|
|
22790
|
+
return Array.from({ length }, (value, index) => stdio[index]);
|
|
22791
|
+
};
|
|
22792
|
+
module2.exports = normalizeStdio;
|
|
22793
|
+
module2.exports.node = (opts) => {
|
|
22794
|
+
const stdio = normalizeStdio(opts);
|
|
22795
|
+
if (stdio === "ipc") {
|
|
22796
|
+
return "ipc";
|
|
22797
|
+
}
|
|
22798
|
+
if (stdio === void 0 || typeof stdio === "string") {
|
|
22799
|
+
return [stdio, stdio, stdio, "ipc"];
|
|
22800
|
+
}
|
|
22801
|
+
if (stdio.includes("ipc")) {
|
|
22802
|
+
return stdio;
|
|
22803
|
+
}
|
|
22804
|
+
return [...stdio, "ipc"];
|
|
22805
|
+
};
|
|
22806
|
+
}
|
|
22807
|
+
});
|
|
22808
|
+
|
|
22809
|
+
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
|
|
22810
|
+
var require_signals2 = __commonJS({
|
|
22811
|
+
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) {
|
|
22812
|
+
module2.exports = [
|
|
22813
|
+
"SIGABRT",
|
|
22814
|
+
"SIGALRM",
|
|
22815
|
+
"SIGHUP",
|
|
22816
|
+
"SIGINT",
|
|
22817
|
+
"SIGTERM"
|
|
22818
|
+
];
|
|
22819
|
+
if (process.platform !== "win32") {
|
|
22820
|
+
module2.exports.push(
|
|
22821
|
+
"SIGVTALRM",
|
|
22822
|
+
"SIGXCPU",
|
|
22823
|
+
"SIGXFSZ",
|
|
22824
|
+
"SIGUSR2",
|
|
22825
|
+
"SIGTRAP",
|
|
22826
|
+
"SIGSYS",
|
|
22827
|
+
"SIGQUIT",
|
|
22828
|
+
"SIGIOT"
|
|
22829
|
+
// should detect profiler and enable/disable accordingly.
|
|
22830
|
+
// see #21
|
|
22831
|
+
// 'SIGPROF'
|
|
22832
|
+
);
|
|
22833
|
+
}
|
|
22834
|
+
if (process.platform === "linux") {
|
|
22835
|
+
module2.exports.push(
|
|
22836
|
+
"SIGIO",
|
|
22837
|
+
"SIGPOLL",
|
|
22838
|
+
"SIGPWR",
|
|
22839
|
+
"SIGSTKFLT",
|
|
22840
|
+
"SIGUNUSED"
|
|
22841
|
+
);
|
|
22842
|
+
}
|
|
22843
|
+
}
|
|
22844
|
+
});
|
|
22845
|
+
|
|
22846
|
+
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
22847
|
+
var require_signal_exit = __commonJS({
|
|
22848
|
+
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
|
|
22849
|
+
var process2 = global.process;
|
|
22850
|
+
var processOk = function(process3) {
|
|
22851
|
+
return 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";
|
|
22852
|
+
};
|
|
22853
|
+
if (!processOk(process2)) {
|
|
22854
|
+
module2.exports = function() {
|
|
22855
|
+
return function() {
|
|
22856
|
+
};
|
|
22857
|
+
};
|
|
22858
|
+
} else {
|
|
22859
|
+
assert7 = require("assert");
|
|
22860
|
+
signals = require_signals2();
|
|
22861
|
+
isWin3 = /^win/i.test(process2.platform);
|
|
22862
|
+
EE = require("events");
|
|
22863
|
+
if (typeof EE !== "function") {
|
|
22864
|
+
EE = EE.EventEmitter;
|
|
22865
|
+
}
|
|
22866
|
+
if (process2.__signal_exit_emitter__) {
|
|
22867
|
+
emitter = process2.__signal_exit_emitter__;
|
|
22868
|
+
} else {
|
|
22869
|
+
emitter = process2.__signal_exit_emitter__ = new EE();
|
|
22870
|
+
emitter.count = 0;
|
|
22871
|
+
emitter.emitted = {};
|
|
22872
|
+
}
|
|
22873
|
+
if (!emitter.infinite) {
|
|
22874
|
+
emitter.setMaxListeners(Infinity);
|
|
22875
|
+
emitter.infinite = true;
|
|
22876
|
+
}
|
|
22877
|
+
module2.exports = function(cb, opts) {
|
|
22878
|
+
if (!processOk(global.process)) {
|
|
22879
|
+
return function() {
|
|
22880
|
+
};
|
|
22881
|
+
}
|
|
22882
|
+
assert7.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
22883
|
+
if (loaded === false) {
|
|
22884
|
+
load();
|
|
22885
|
+
}
|
|
22886
|
+
var ev = "exit";
|
|
22887
|
+
if (opts && opts.alwaysLast) {
|
|
22888
|
+
ev = "afterexit";
|
|
22889
|
+
}
|
|
22890
|
+
var remove2 = function() {
|
|
22891
|
+
emitter.removeListener(ev, cb);
|
|
22892
|
+
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
|
|
22893
|
+
unload();
|
|
22894
|
+
}
|
|
22895
|
+
};
|
|
22896
|
+
emitter.on(ev, cb);
|
|
22897
|
+
return remove2;
|
|
22898
|
+
};
|
|
22899
|
+
unload = function unload2() {
|
|
22900
|
+
if (!loaded || !processOk(global.process)) {
|
|
22901
|
+
return;
|
|
22902
|
+
}
|
|
22903
|
+
loaded = false;
|
|
22904
|
+
signals.forEach(function(sig) {
|
|
22905
|
+
try {
|
|
22906
|
+
process2.removeListener(sig, sigListeners[sig]);
|
|
22907
|
+
} catch (er) {
|
|
22908
|
+
}
|
|
22909
|
+
});
|
|
22910
|
+
process2.emit = originalProcessEmit;
|
|
22911
|
+
process2.reallyExit = originalProcessReallyExit;
|
|
22912
|
+
emitter.count -= 1;
|
|
22913
|
+
};
|
|
22914
|
+
module2.exports.unload = unload;
|
|
22915
|
+
emit = function emit2(event, code, signal) {
|
|
22916
|
+
if (emitter.emitted[event]) {
|
|
22917
|
+
return;
|
|
22918
|
+
}
|
|
22919
|
+
emitter.emitted[event] = true;
|
|
22920
|
+
emitter.emit(event, code, signal);
|
|
22921
|
+
};
|
|
22922
|
+
sigListeners = {};
|
|
22923
|
+
signals.forEach(function(sig) {
|
|
22924
|
+
sigListeners[sig] = function listener() {
|
|
22925
|
+
if (!processOk(global.process)) {
|
|
22926
|
+
return;
|
|
22927
|
+
}
|
|
22928
|
+
var listeners = process2.listeners(sig);
|
|
22929
|
+
if (listeners.length === emitter.count) {
|
|
22930
|
+
unload();
|
|
22931
|
+
emit("exit", null, sig);
|
|
22932
|
+
emit("afterexit", null, sig);
|
|
22933
|
+
if (isWin3 && sig === "SIGHUP") {
|
|
22934
|
+
sig = "SIGINT";
|
|
22935
|
+
}
|
|
22936
|
+
process2.kill(process2.pid, sig);
|
|
22937
|
+
}
|
|
22938
|
+
};
|
|
22939
|
+
});
|
|
22940
|
+
module2.exports.signals = function() {
|
|
22941
|
+
return signals;
|
|
22942
|
+
};
|
|
22943
|
+
loaded = false;
|
|
22944
|
+
load = function load2() {
|
|
22945
|
+
if (loaded || !processOk(global.process)) {
|
|
22946
|
+
return;
|
|
22947
|
+
}
|
|
22948
|
+
loaded = true;
|
|
22949
|
+
emitter.count += 1;
|
|
22950
|
+
signals = signals.filter(function(sig) {
|
|
22951
|
+
try {
|
|
22952
|
+
process2.on(sig, sigListeners[sig]);
|
|
22953
|
+
return true;
|
|
22954
|
+
} catch (er) {
|
|
22955
|
+
return false;
|
|
22956
|
+
}
|
|
22957
|
+
});
|
|
22958
|
+
process2.emit = processEmit;
|
|
22959
|
+
process2.reallyExit = processReallyExit;
|
|
22960
|
+
};
|
|
22961
|
+
module2.exports.load = load;
|
|
22962
|
+
originalProcessReallyExit = process2.reallyExit;
|
|
22963
|
+
processReallyExit = function processReallyExit2(code) {
|
|
22964
|
+
if (!processOk(global.process)) {
|
|
22965
|
+
return;
|
|
22966
|
+
}
|
|
22967
|
+
process2.exitCode = code || /* istanbul ignore next */
|
|
22968
|
+
0;
|
|
22969
|
+
emit("exit", process2.exitCode, null);
|
|
22970
|
+
emit("afterexit", process2.exitCode, null);
|
|
22971
|
+
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
22972
|
+
};
|
|
22973
|
+
originalProcessEmit = process2.emit;
|
|
22974
|
+
processEmit = function processEmit2(ev, arg) {
|
|
22975
|
+
if (ev === "exit" && processOk(global.process)) {
|
|
22976
|
+
if (arg !== void 0) {
|
|
22977
|
+
process2.exitCode = arg;
|
|
22978
|
+
}
|
|
22979
|
+
var ret = originalProcessEmit.apply(this, arguments);
|
|
22980
|
+
emit("exit", process2.exitCode, null);
|
|
22981
|
+
emit("afterexit", process2.exitCode, null);
|
|
22982
|
+
return ret;
|
|
22983
|
+
} else {
|
|
22984
|
+
return originalProcessEmit.apply(this, arguments);
|
|
22985
|
+
}
|
|
22986
|
+
};
|
|
22987
|
+
}
|
|
22988
|
+
var assert7;
|
|
22989
|
+
var signals;
|
|
22990
|
+
var isWin3;
|
|
22991
|
+
var EE;
|
|
22992
|
+
var emitter;
|
|
22993
|
+
var unload;
|
|
22994
|
+
var emit;
|
|
22995
|
+
var sigListeners;
|
|
22996
|
+
var loaded;
|
|
22997
|
+
var load;
|
|
22998
|
+
var originalProcessReallyExit;
|
|
22999
|
+
var processReallyExit;
|
|
23000
|
+
var originalProcessEmit;
|
|
23001
|
+
var processEmit;
|
|
23002
|
+
}
|
|
23003
|
+
});
|
|
23004
|
+
|
|
23005
|
+
// ../../node_modules/.pnpm/p-finally@2.0.1/node_modules/p-finally/index.js
|
|
23006
|
+
var require_p_finally = __commonJS({
|
|
23007
|
+
"../../node_modules/.pnpm/p-finally@2.0.1/node_modules/p-finally/index.js"(exports2, module2) {
|
|
23008
|
+
"use strict";
|
|
23009
|
+
module2.exports = async (promise, onFinally = () => {
|
|
23010
|
+
}) => {
|
|
23011
|
+
let value;
|
|
23012
|
+
try {
|
|
23013
|
+
value = await promise;
|
|
23014
|
+
} catch (error) {
|
|
23015
|
+
await onFinally();
|
|
23016
|
+
throw error;
|
|
23017
|
+
}
|
|
23018
|
+
await onFinally();
|
|
23019
|
+
return value;
|
|
23020
|
+
};
|
|
23021
|
+
}
|
|
23022
|
+
});
|
|
23023
|
+
|
|
23024
|
+
// ../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/kill.js
|
|
23025
|
+
var require_kill = __commonJS({
|
|
23026
|
+
"../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/kill.js"(exports2, module2) {
|
|
23027
|
+
"use strict";
|
|
23028
|
+
var os = require("os");
|
|
23029
|
+
var onExit = require_signal_exit();
|
|
23030
|
+
var pFinally = require_p_finally();
|
|
23031
|
+
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
23032
|
+
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
23033
|
+
const killResult = kill(signal);
|
|
23034
|
+
setKillTimeout(kill, signal, options, killResult);
|
|
23035
|
+
return killResult;
|
|
23036
|
+
};
|
|
23037
|
+
var setKillTimeout = (kill, signal, options, killResult) => {
|
|
23038
|
+
if (!shouldForceKill(signal, options, killResult)) {
|
|
23039
|
+
return;
|
|
23040
|
+
}
|
|
23041
|
+
const timeout = getForceKillAfterTimeout(options);
|
|
23042
|
+
setTimeout(() => {
|
|
23043
|
+
kill("SIGKILL");
|
|
23044
|
+
}, timeout).unref();
|
|
23045
|
+
};
|
|
23046
|
+
var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => {
|
|
23047
|
+
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
23048
|
+
};
|
|
23049
|
+
var isSigterm = (signal) => {
|
|
23050
|
+
return signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
23051
|
+
};
|
|
23052
|
+
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
23053
|
+
if (forceKillAfterTimeout === true) {
|
|
23054
|
+
return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
23055
|
+
}
|
|
23056
|
+
if (!Number.isInteger(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
|
|
23057
|
+
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
|
|
23058
|
+
}
|
|
23059
|
+
return forceKillAfterTimeout;
|
|
23060
|
+
};
|
|
23061
|
+
var spawnedCancel = (spawned, context) => {
|
|
23062
|
+
const killResult = spawned.kill();
|
|
23063
|
+
if (killResult) {
|
|
23064
|
+
context.isCanceled = true;
|
|
23065
|
+
}
|
|
23066
|
+
};
|
|
23067
|
+
var timeoutKill = (spawned, signal, reject) => {
|
|
23068
|
+
spawned.kill(signal);
|
|
23069
|
+
reject(Object.assign(new Error("Timed out"), { timedOut: true, signal }));
|
|
23070
|
+
};
|
|
23071
|
+
var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
|
|
23072
|
+
if (timeout === 0 || timeout === void 0) {
|
|
23073
|
+
return spawnedPromise;
|
|
23074
|
+
}
|
|
23075
|
+
if (!Number.isInteger(timeout) || timeout < 0) {
|
|
23076
|
+
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
23077
|
+
}
|
|
23078
|
+
let timeoutId;
|
|
23079
|
+
const timeoutPromise = new Promise((resolve, reject) => {
|
|
23080
|
+
timeoutId = setTimeout(() => {
|
|
23081
|
+
timeoutKill(spawned, killSignal, reject);
|
|
23082
|
+
}, timeout);
|
|
23083
|
+
});
|
|
23084
|
+
const safeSpawnedPromise = pFinally(spawnedPromise, () => {
|
|
23085
|
+
clearTimeout(timeoutId);
|
|
23086
|
+
});
|
|
23087
|
+
return Promise.race([timeoutPromise, safeSpawnedPromise]);
|
|
23088
|
+
};
|
|
23089
|
+
var setExitHandler = (spawned, { cleanup, detached }, timedPromise) => {
|
|
23090
|
+
if (!cleanup || detached) {
|
|
23091
|
+
return timedPromise;
|
|
23092
|
+
}
|
|
23093
|
+
const removeExitHandler = onExit(() => {
|
|
23094
|
+
spawned.kill();
|
|
23095
|
+
});
|
|
23096
|
+
return pFinally(timedPromise, removeExitHandler);
|
|
23097
|
+
};
|
|
23098
|
+
module2.exports = {
|
|
23099
|
+
spawnedKill,
|
|
23100
|
+
spawnedCancel,
|
|
23101
|
+
setupTimeout,
|
|
23102
|
+
setExitHandler
|
|
23103
|
+
};
|
|
23104
|
+
}
|
|
23105
|
+
});
|
|
23106
|
+
|
|
23107
|
+
// ../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js
|
|
23108
|
+
var require_is_stream = __commonJS({
|
|
23109
|
+
"../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) {
|
|
23110
|
+
"use strict";
|
|
23111
|
+
var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
|
23112
|
+
isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
|
23113
|
+
isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object";
|
|
23114
|
+
isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream);
|
|
23115
|
+
isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function";
|
|
23116
|
+
module2.exports = isStream;
|
|
23117
|
+
}
|
|
23118
|
+
});
|
|
23119
|
+
|
|
23120
|
+
// ../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js
|
|
23121
|
+
var require_pump = __commonJS({
|
|
23122
|
+
"../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js"(exports2, module2) {
|
|
23123
|
+
var once = require_once();
|
|
23124
|
+
var eos2 = require_end_of_stream();
|
|
23125
|
+
var fs7;
|
|
23126
|
+
try {
|
|
23127
|
+
fs7 = require("fs");
|
|
23128
|
+
} catch (e) {
|
|
23129
|
+
}
|
|
23130
|
+
var noop = function() {
|
|
23131
|
+
};
|
|
23132
|
+
var ancient = /^v?\.0/.test(process.version);
|
|
23133
|
+
var isFn = function(fn) {
|
|
23134
|
+
return typeof fn === "function";
|
|
23135
|
+
};
|
|
23136
|
+
var isFS = function(stream) {
|
|
23137
|
+
if (!ancient)
|
|
23138
|
+
return false;
|
|
23139
|
+
if (!fs7)
|
|
23140
|
+
return false;
|
|
23141
|
+
return (stream instanceof (fs7.ReadStream || noop) || stream instanceof (fs7.WriteStream || noop)) && isFn(stream.close);
|
|
23142
|
+
};
|
|
23143
|
+
var isRequest = function(stream) {
|
|
23144
|
+
return stream.setHeader && isFn(stream.abort);
|
|
23145
|
+
};
|
|
23146
|
+
var destroyer = function(stream, reading, writing, callback) {
|
|
23147
|
+
callback = once(callback);
|
|
23148
|
+
var closed = false;
|
|
23149
|
+
stream.on("close", function() {
|
|
23150
|
+
closed = true;
|
|
23151
|
+
});
|
|
23152
|
+
eos2(stream, { readable: reading, writable: writing }, function(err) {
|
|
23153
|
+
if (err)
|
|
23154
|
+
return callback(err);
|
|
23155
|
+
closed = true;
|
|
23156
|
+
callback();
|
|
23157
|
+
});
|
|
23158
|
+
var destroyed = false;
|
|
23159
|
+
return function(err) {
|
|
23160
|
+
if (closed)
|
|
23161
|
+
return;
|
|
23162
|
+
if (destroyed)
|
|
23163
|
+
return;
|
|
23164
|
+
destroyed = true;
|
|
23165
|
+
if (isFS(stream))
|
|
23166
|
+
return stream.close(noop);
|
|
23167
|
+
if (isRequest(stream))
|
|
23168
|
+
return stream.abort();
|
|
23169
|
+
if (isFn(stream.destroy))
|
|
23170
|
+
return stream.destroy();
|
|
23171
|
+
callback(err || new Error("stream was destroyed"));
|
|
23172
|
+
};
|
|
23173
|
+
};
|
|
23174
|
+
var call = function(fn) {
|
|
23175
|
+
fn();
|
|
23176
|
+
};
|
|
23177
|
+
var pipe = function(from, to) {
|
|
23178
|
+
return from.pipe(to);
|
|
23179
|
+
};
|
|
23180
|
+
var pump = function() {
|
|
23181
|
+
var streams = Array.prototype.slice.call(arguments);
|
|
23182
|
+
var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop;
|
|
23183
|
+
if (Array.isArray(streams[0]))
|
|
23184
|
+
streams = streams[0];
|
|
23185
|
+
if (streams.length < 2)
|
|
23186
|
+
throw new Error("pump requires two streams per minimum");
|
|
23187
|
+
var error;
|
|
23188
|
+
var destroys = streams.map(function(stream, i) {
|
|
23189
|
+
var reading = i < streams.length - 1;
|
|
23190
|
+
var writing = i > 0;
|
|
23191
|
+
return destroyer(stream, reading, writing, function(err) {
|
|
23192
|
+
if (!error)
|
|
23193
|
+
error = err;
|
|
23194
|
+
if (err)
|
|
23195
|
+
destroys.forEach(call);
|
|
23196
|
+
if (reading)
|
|
23197
|
+
return;
|
|
23198
|
+
destroys.forEach(call);
|
|
23199
|
+
callback(error);
|
|
23200
|
+
});
|
|
23201
|
+
});
|
|
23202
|
+
return streams.reduce(pipe);
|
|
23203
|
+
};
|
|
23204
|
+
module2.exports = pump;
|
|
23205
|
+
}
|
|
23206
|
+
});
|
|
23207
|
+
|
|
23208
|
+
// ../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/buffer-stream.js
|
|
23209
|
+
var require_buffer_stream = __commonJS({
|
|
23210
|
+
"../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/buffer-stream.js"(exports2, module2) {
|
|
23211
|
+
"use strict";
|
|
23212
|
+
var { PassThrough: PassThroughStream } = require("stream");
|
|
23213
|
+
module2.exports = (options) => {
|
|
23214
|
+
options = { ...options };
|
|
23215
|
+
const { array } = options;
|
|
23216
|
+
let { encoding } = options;
|
|
23217
|
+
const isBuffer = encoding === "buffer";
|
|
23218
|
+
let objectMode = false;
|
|
23219
|
+
if (array) {
|
|
23220
|
+
objectMode = !(encoding || isBuffer);
|
|
23221
|
+
} else {
|
|
23222
|
+
encoding = encoding || "utf8";
|
|
23223
|
+
}
|
|
23224
|
+
if (isBuffer) {
|
|
23225
|
+
encoding = null;
|
|
23226
|
+
}
|
|
23227
|
+
const stream = new PassThroughStream({ objectMode });
|
|
23228
|
+
if (encoding) {
|
|
23229
|
+
stream.setEncoding(encoding);
|
|
23230
|
+
}
|
|
23231
|
+
let length = 0;
|
|
23232
|
+
const chunks = [];
|
|
23233
|
+
stream.on("data", (chunk) => {
|
|
23234
|
+
chunks.push(chunk);
|
|
23235
|
+
if (objectMode) {
|
|
23236
|
+
length = chunks.length;
|
|
23237
|
+
} else {
|
|
23238
|
+
length += chunk.length;
|
|
23239
|
+
}
|
|
23240
|
+
});
|
|
23241
|
+
stream.getBufferedValue = () => {
|
|
23242
|
+
if (array) {
|
|
23243
|
+
return chunks;
|
|
23244
|
+
}
|
|
23245
|
+
return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
|
|
23246
|
+
};
|
|
23247
|
+
stream.getBufferedLength = () => length;
|
|
23248
|
+
return stream;
|
|
23249
|
+
};
|
|
23250
|
+
}
|
|
23251
|
+
});
|
|
23252
|
+
|
|
23253
|
+
// ../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/index.js
|
|
23254
|
+
var require_get_stream = __commonJS({
|
|
23255
|
+
"../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/index.js"(exports2, module2) {
|
|
23256
|
+
"use strict";
|
|
23257
|
+
var { constants: BufferConstants } = require("buffer");
|
|
23258
|
+
var pump = require_pump();
|
|
23259
|
+
var bufferStream = require_buffer_stream();
|
|
23260
|
+
var MaxBufferError = class extends Error {
|
|
23261
|
+
constructor() {
|
|
23262
|
+
super("maxBuffer exceeded");
|
|
23263
|
+
this.name = "MaxBufferError";
|
|
23264
|
+
}
|
|
23265
|
+
};
|
|
23266
|
+
async function getStream(inputStream, options) {
|
|
23267
|
+
if (!inputStream) {
|
|
23268
|
+
return Promise.reject(new Error("Expected a stream"));
|
|
23269
|
+
}
|
|
23270
|
+
options = {
|
|
23271
|
+
maxBuffer: Infinity,
|
|
23272
|
+
...options
|
|
23273
|
+
};
|
|
23274
|
+
const { maxBuffer } = options;
|
|
23275
|
+
let stream;
|
|
23276
|
+
await new Promise((resolve, reject) => {
|
|
23277
|
+
const rejectPromise = (error) => {
|
|
23278
|
+
if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
23279
|
+
error.bufferedData = stream.getBufferedValue();
|
|
23280
|
+
}
|
|
23281
|
+
reject(error);
|
|
23282
|
+
};
|
|
23283
|
+
stream = pump(inputStream, bufferStream(options), (error) => {
|
|
23284
|
+
if (error) {
|
|
23285
|
+
rejectPromise(error);
|
|
23286
|
+
return;
|
|
23287
|
+
}
|
|
23288
|
+
resolve();
|
|
23289
|
+
});
|
|
23290
|
+
stream.on("data", () => {
|
|
23291
|
+
if (stream.getBufferedLength() > maxBuffer) {
|
|
23292
|
+
rejectPromise(new MaxBufferError());
|
|
23293
|
+
}
|
|
23294
|
+
});
|
|
23295
|
+
});
|
|
23296
|
+
return stream.getBufferedValue();
|
|
23297
|
+
}
|
|
23298
|
+
module2.exports = getStream;
|
|
23299
|
+
module2.exports.default = getStream;
|
|
23300
|
+
module2.exports.buffer = (stream, options) => getStream(stream, { ...options, encoding: "buffer" });
|
|
23301
|
+
module2.exports.array = (stream, options) => getStream(stream, { ...options, array: true });
|
|
23302
|
+
module2.exports.MaxBufferError = MaxBufferError;
|
|
23303
|
+
}
|
|
23304
|
+
});
|
|
23305
|
+
|
|
23306
|
+
// ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
|
|
23307
|
+
var require_merge_stream = __commonJS({
|
|
23308
|
+
"../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) {
|
|
23309
|
+
"use strict";
|
|
23310
|
+
var { PassThrough } = require("stream");
|
|
23311
|
+
module2.exports = function() {
|
|
23312
|
+
var sources = [];
|
|
23313
|
+
var output = new PassThrough({ objectMode: true });
|
|
23314
|
+
output.setMaxListeners(0);
|
|
23315
|
+
output.add = add;
|
|
23316
|
+
output.isEmpty = isEmpty;
|
|
23317
|
+
output.on("unpipe", remove2);
|
|
23318
|
+
Array.prototype.slice.call(arguments).forEach(add);
|
|
23319
|
+
return output;
|
|
23320
|
+
function add(source) {
|
|
23321
|
+
if (Array.isArray(source)) {
|
|
23322
|
+
source.forEach(add);
|
|
23323
|
+
return this;
|
|
23324
|
+
}
|
|
23325
|
+
sources.push(source);
|
|
23326
|
+
source.once("end", remove2.bind(null, source));
|
|
23327
|
+
source.once("error", output.emit.bind(output, "error"));
|
|
23328
|
+
source.pipe(output, { end: false });
|
|
23329
|
+
return this;
|
|
23330
|
+
}
|
|
23331
|
+
function isEmpty() {
|
|
23332
|
+
return sources.length == 0;
|
|
23333
|
+
}
|
|
23334
|
+
function remove2(source) {
|
|
23335
|
+
sources = sources.filter(function(it) {
|
|
23336
|
+
return it !== source;
|
|
23337
|
+
});
|
|
23338
|
+
if (!sources.length && output.readable) {
|
|
23339
|
+
output.end();
|
|
23340
|
+
}
|
|
23341
|
+
}
|
|
23342
|
+
};
|
|
23343
|
+
}
|
|
23344
|
+
});
|
|
23345
|
+
|
|
23346
|
+
// ../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stream.js
|
|
23347
|
+
var require_stream2 = __commonJS({
|
|
23348
|
+
"../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stream.js"(exports2, module2) {
|
|
23349
|
+
"use strict";
|
|
23350
|
+
var isStream = require_is_stream();
|
|
23351
|
+
var getStream = require_get_stream();
|
|
23352
|
+
var mergeStream = require_merge_stream();
|
|
23353
|
+
var handleInput = (spawned, input) => {
|
|
23354
|
+
if (input === void 0 || spawned.stdin === void 0) {
|
|
23355
|
+
return;
|
|
23356
|
+
}
|
|
23357
|
+
if (isStream(input)) {
|
|
23358
|
+
input.pipe(spawned.stdin);
|
|
23359
|
+
} else {
|
|
23360
|
+
spawned.stdin.end(input);
|
|
23361
|
+
}
|
|
23362
|
+
};
|
|
23363
|
+
var makeAllStream = (spawned, { all }) => {
|
|
23364
|
+
if (!all || !spawned.stdout && !spawned.stderr) {
|
|
23365
|
+
return;
|
|
23366
|
+
}
|
|
23367
|
+
const mixed = mergeStream();
|
|
23368
|
+
if (spawned.stdout) {
|
|
23369
|
+
mixed.add(spawned.stdout);
|
|
23370
|
+
}
|
|
23371
|
+
if (spawned.stderr) {
|
|
23372
|
+
mixed.add(spawned.stderr);
|
|
23373
|
+
}
|
|
23374
|
+
return mixed;
|
|
23375
|
+
};
|
|
23376
|
+
var getBufferedData = async (stream, streamPromise) => {
|
|
23377
|
+
if (!stream) {
|
|
23378
|
+
return;
|
|
23379
|
+
}
|
|
23380
|
+
stream.destroy();
|
|
23381
|
+
try {
|
|
23382
|
+
return await streamPromise;
|
|
23383
|
+
} catch (error) {
|
|
23384
|
+
return error.bufferedData;
|
|
23385
|
+
}
|
|
23386
|
+
};
|
|
23387
|
+
var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
|
|
23388
|
+
if (!stream || !buffer) {
|
|
23389
|
+
return;
|
|
23390
|
+
}
|
|
23391
|
+
if (encoding) {
|
|
23392
|
+
return getStream(stream, { encoding, maxBuffer });
|
|
23393
|
+
}
|
|
23394
|
+
return getStream.buffer(stream, { maxBuffer });
|
|
23395
|
+
};
|
|
23396
|
+
var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
23397
|
+
const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
|
|
23398
|
+
const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer });
|
|
23399
|
+
const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
|
|
23400
|
+
try {
|
|
23401
|
+
return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
|
|
23402
|
+
} catch (error) {
|
|
23403
|
+
return Promise.all([
|
|
23404
|
+
{ error, signal: error.signal, timedOut: error.timedOut },
|
|
23405
|
+
getBufferedData(stdout, stdoutPromise),
|
|
23406
|
+
getBufferedData(stderr, stderrPromise),
|
|
23407
|
+
getBufferedData(all, allPromise)
|
|
23408
|
+
]);
|
|
23409
|
+
}
|
|
23410
|
+
};
|
|
23411
|
+
var validateInputSync = ({ input }) => {
|
|
23412
|
+
if (isStream(input)) {
|
|
23413
|
+
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
23414
|
+
}
|
|
23415
|
+
};
|
|
23416
|
+
module2.exports = {
|
|
23417
|
+
handleInput,
|
|
23418
|
+
makeAllStream,
|
|
23419
|
+
getSpawnedResult,
|
|
23420
|
+
validateInputSync
|
|
23421
|
+
};
|
|
23422
|
+
}
|
|
23423
|
+
});
|
|
23424
|
+
|
|
23425
|
+
// ../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/promise.js
|
|
23426
|
+
var require_promise = __commonJS({
|
|
23427
|
+
"../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/promise.js"(exports2, module2) {
|
|
23428
|
+
"use strict";
|
|
23429
|
+
var mergePromiseProperty = (spawned, promise, property) => {
|
|
23430
|
+
const value = typeof promise === "function" ? (...args) => promise()[property](...args) : promise[property].bind(promise);
|
|
23431
|
+
Object.defineProperty(spawned, property, {
|
|
23432
|
+
value,
|
|
23433
|
+
writable: true,
|
|
23434
|
+
enumerable: false,
|
|
23435
|
+
configurable: true
|
|
23436
|
+
});
|
|
23437
|
+
};
|
|
23438
|
+
var mergePromise = (spawned, promise) => {
|
|
23439
|
+
mergePromiseProperty(spawned, promise, "then");
|
|
23440
|
+
mergePromiseProperty(spawned, promise, "catch");
|
|
23441
|
+
if (Promise.prototype.finally) {
|
|
23442
|
+
mergePromiseProperty(spawned, promise, "finally");
|
|
23443
|
+
}
|
|
23444
|
+
return spawned;
|
|
23445
|
+
};
|
|
23446
|
+
var getSpawnedPromise = (spawned) => {
|
|
23447
|
+
return new Promise((resolve, reject) => {
|
|
23448
|
+
spawned.on("exit", (exitCode, signal) => {
|
|
23449
|
+
resolve({ exitCode, signal });
|
|
23450
|
+
});
|
|
23451
|
+
spawned.on("error", (error) => {
|
|
23452
|
+
reject(error);
|
|
23453
|
+
});
|
|
23454
|
+
if (spawned.stdin) {
|
|
23455
|
+
spawned.stdin.on("error", (error) => {
|
|
23456
|
+
reject(error);
|
|
23457
|
+
});
|
|
23458
|
+
}
|
|
23459
|
+
});
|
|
23460
|
+
};
|
|
23461
|
+
module2.exports = {
|
|
23462
|
+
mergePromise,
|
|
23463
|
+
getSpawnedPromise
|
|
23464
|
+
};
|
|
23465
|
+
}
|
|
23466
|
+
});
|
|
23467
|
+
|
|
23468
|
+
// ../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/command.js
|
|
23469
|
+
var require_command = __commonJS({
|
|
23470
|
+
"../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/command.js"(exports2, module2) {
|
|
23471
|
+
"use strict";
|
|
23472
|
+
var SPACES_REGEXP = / +/g;
|
|
23473
|
+
var joinCommand = (file, args = []) => {
|
|
23474
|
+
if (!Array.isArray(args)) {
|
|
23475
|
+
return file;
|
|
23476
|
+
}
|
|
23477
|
+
return [file, ...args].join(" ");
|
|
23478
|
+
};
|
|
23479
|
+
var handleEscaping = (tokens, token, index) => {
|
|
23480
|
+
if (index === 0) {
|
|
23481
|
+
return [token];
|
|
23482
|
+
}
|
|
23483
|
+
const previousToken = tokens[tokens.length - 1];
|
|
23484
|
+
if (previousToken.endsWith("\\")) {
|
|
23485
|
+
return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`];
|
|
23486
|
+
}
|
|
23487
|
+
return [...tokens, token];
|
|
23488
|
+
};
|
|
23489
|
+
var parseCommand = (command) => {
|
|
23490
|
+
return command.trim().split(SPACES_REGEXP).reduce(handleEscaping, []);
|
|
23491
|
+
};
|
|
23492
|
+
module2.exports = {
|
|
23493
|
+
joinCommand,
|
|
23494
|
+
parseCommand
|
|
23495
|
+
};
|
|
23496
|
+
}
|
|
23497
|
+
});
|
|
23498
|
+
|
|
23499
|
+
// ../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/index.js
|
|
23500
|
+
var require_execa = __commonJS({
|
|
23501
|
+
"../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/index.js"(exports2, module2) {
|
|
23502
|
+
"use strict";
|
|
23503
|
+
var path7 = require("path");
|
|
23504
|
+
var childProcess = require("child_process");
|
|
23505
|
+
var crossSpawn = require_cross_spawn2();
|
|
23506
|
+
var stripFinalNewline = require_strip_final_newline();
|
|
23507
|
+
var npmRunPath = require_npm_run_path();
|
|
23508
|
+
var onetime = require_onetime();
|
|
23509
|
+
var makeError = require_error();
|
|
23510
|
+
var normalizeStdio = require_stdio();
|
|
23511
|
+
var { spawnedKill, spawnedCancel, setupTimeout, setExitHandler } = require_kill();
|
|
23512
|
+
var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream2();
|
|
23513
|
+
var { mergePromise, getSpawnedPromise } = require_promise();
|
|
23514
|
+
var { joinCommand, parseCommand } = require_command();
|
|
23515
|
+
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
23516
|
+
var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
23517
|
+
const env = extendEnv ? { ...process.env, ...envOption } : envOption;
|
|
23518
|
+
if (preferLocal) {
|
|
23519
|
+
return npmRunPath.env({ env, cwd: localDir, execPath });
|
|
23520
|
+
}
|
|
23521
|
+
return env;
|
|
23522
|
+
};
|
|
23523
|
+
var handleArgs = (file, args, options = {}) => {
|
|
23524
|
+
const parsed = crossSpawn._parse(file, args, options);
|
|
23525
|
+
file = parsed.command;
|
|
23526
|
+
args = parsed.args;
|
|
23527
|
+
options = parsed.options;
|
|
23528
|
+
options = {
|
|
23529
|
+
maxBuffer: DEFAULT_MAX_BUFFER,
|
|
23530
|
+
buffer: true,
|
|
23531
|
+
stripFinalNewline: true,
|
|
23532
|
+
extendEnv: true,
|
|
23533
|
+
preferLocal: false,
|
|
23534
|
+
localDir: options.cwd || process.cwd(),
|
|
23535
|
+
execPath: process.execPath,
|
|
23536
|
+
encoding: "utf8",
|
|
23537
|
+
reject: true,
|
|
23538
|
+
cleanup: true,
|
|
23539
|
+
all: false,
|
|
23540
|
+
...options,
|
|
23541
|
+
windowsHide: true
|
|
23542
|
+
};
|
|
23543
|
+
options.env = getEnv(options);
|
|
23544
|
+
options.stdio = normalizeStdio(options);
|
|
23545
|
+
if (process.platform === "win32" && path7.basename(file, ".exe") === "cmd") {
|
|
23546
|
+
args.unshift("/q");
|
|
23547
|
+
}
|
|
23548
|
+
return { file, args, options, parsed };
|
|
23549
|
+
};
|
|
23550
|
+
var handleOutput = (options, value, error) => {
|
|
23551
|
+
if (typeof value !== "string" && !Buffer.isBuffer(value)) {
|
|
23552
|
+
return error === void 0 ? void 0 : "";
|
|
23553
|
+
}
|
|
23554
|
+
if (options.stripFinalNewline) {
|
|
23555
|
+
return stripFinalNewline(value);
|
|
23556
|
+
}
|
|
23557
|
+
return value;
|
|
23558
|
+
};
|
|
23559
|
+
var execa2 = (file, args, options) => {
|
|
23560
|
+
const parsed = handleArgs(file, args, options);
|
|
23561
|
+
const command = joinCommand(file, args);
|
|
23562
|
+
let spawned;
|
|
23563
|
+
try {
|
|
23564
|
+
spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
|
|
23565
|
+
} catch (error) {
|
|
23566
|
+
const dummySpawned = new childProcess.ChildProcess();
|
|
23567
|
+
const errorPromise = Promise.reject(makeError({
|
|
23568
|
+
error,
|
|
23569
|
+
stdout: "",
|
|
23570
|
+
stderr: "",
|
|
23571
|
+
all: "",
|
|
23572
|
+
command,
|
|
23573
|
+
parsed,
|
|
23574
|
+
timedOut: false,
|
|
23575
|
+
isCanceled: false,
|
|
23576
|
+
killed: false
|
|
23577
|
+
}));
|
|
23578
|
+
return mergePromise(dummySpawned, errorPromise);
|
|
23579
|
+
}
|
|
23580
|
+
const spawnedPromise = getSpawnedPromise(spawned);
|
|
23581
|
+
const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
|
|
23582
|
+
const processDone = setExitHandler(spawned, parsed.options, timedPromise);
|
|
23583
|
+
const context = { isCanceled: false };
|
|
23584
|
+
spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
|
|
23585
|
+
spawned.cancel = spawnedCancel.bind(null, spawned, context);
|
|
23586
|
+
const handlePromise = async () => {
|
|
23587
|
+
const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
|
|
23588
|
+
const stdout = handleOutput(parsed.options, stdoutResult);
|
|
23589
|
+
const stderr = handleOutput(parsed.options, stderrResult);
|
|
23590
|
+
const all = handleOutput(parsed.options, allResult);
|
|
23591
|
+
if (error || exitCode !== 0 || signal !== null) {
|
|
23592
|
+
const returnedError = makeError({
|
|
23593
|
+
error,
|
|
23594
|
+
exitCode,
|
|
23595
|
+
signal,
|
|
23596
|
+
stdout,
|
|
23597
|
+
stderr,
|
|
23598
|
+
all,
|
|
23599
|
+
command,
|
|
23600
|
+
parsed,
|
|
23601
|
+
timedOut,
|
|
23602
|
+
isCanceled: context.isCanceled,
|
|
23603
|
+
killed: spawned.killed
|
|
23604
|
+
});
|
|
23605
|
+
if (!parsed.options.reject) {
|
|
23606
|
+
return returnedError;
|
|
23607
|
+
}
|
|
23608
|
+
throw returnedError;
|
|
23609
|
+
}
|
|
23610
|
+
return {
|
|
23611
|
+
command,
|
|
23612
|
+
exitCode: 0,
|
|
23613
|
+
stdout,
|
|
23614
|
+
stderr,
|
|
23615
|
+
all,
|
|
23616
|
+
failed: false,
|
|
23617
|
+
timedOut: false,
|
|
23618
|
+
isCanceled: false,
|
|
23619
|
+
killed: false
|
|
23620
|
+
};
|
|
23621
|
+
};
|
|
23622
|
+
const handlePromiseOnce = onetime(handlePromise);
|
|
23623
|
+
crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
|
|
23624
|
+
handleInput(spawned, parsed.options.input);
|
|
23625
|
+
spawned.all = makeAllStream(spawned, parsed.options);
|
|
23626
|
+
return mergePromise(spawned, handlePromiseOnce);
|
|
23627
|
+
};
|
|
23628
|
+
module2.exports = execa2;
|
|
23629
|
+
module2.exports.sync = (file, args, options) => {
|
|
23630
|
+
const parsed = handleArgs(file, args, options);
|
|
23631
|
+
const command = joinCommand(file, args);
|
|
23632
|
+
validateInputSync(parsed.options);
|
|
23633
|
+
let result;
|
|
23634
|
+
try {
|
|
23635
|
+
result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
|
|
23636
|
+
} catch (error) {
|
|
23637
|
+
throw makeError({
|
|
23638
|
+
error,
|
|
23639
|
+
stdout: "",
|
|
23640
|
+
stderr: "",
|
|
23641
|
+
all: "",
|
|
23642
|
+
command,
|
|
23643
|
+
parsed,
|
|
23644
|
+
timedOut: false,
|
|
23645
|
+
isCanceled: false,
|
|
23646
|
+
killed: false
|
|
23647
|
+
});
|
|
23648
|
+
}
|
|
23649
|
+
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
|
23650
|
+
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
|
23651
|
+
if (result.error || result.status !== 0 || result.signal !== null) {
|
|
23652
|
+
const error = makeError({
|
|
23653
|
+
stdout,
|
|
23654
|
+
stderr,
|
|
23655
|
+
error: result.error,
|
|
23656
|
+
signal: result.signal,
|
|
23657
|
+
exitCode: result.status,
|
|
23658
|
+
command,
|
|
23659
|
+
parsed,
|
|
23660
|
+
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
|
23661
|
+
isCanceled: false,
|
|
23662
|
+
killed: result.signal !== null
|
|
23663
|
+
});
|
|
23664
|
+
if (!parsed.options.reject) {
|
|
23665
|
+
return error;
|
|
23666
|
+
}
|
|
23667
|
+
throw error;
|
|
23668
|
+
}
|
|
23669
|
+
return {
|
|
23670
|
+
command,
|
|
23671
|
+
exitCode: 0,
|
|
23672
|
+
stdout,
|
|
23673
|
+
stderr,
|
|
23674
|
+
failed: false,
|
|
23675
|
+
timedOut: false,
|
|
23676
|
+
isCanceled: false,
|
|
23677
|
+
killed: false
|
|
23678
|
+
};
|
|
23679
|
+
};
|
|
23680
|
+
module2.exports.command = (command, options) => {
|
|
23681
|
+
const [file, ...args] = parseCommand(command);
|
|
23682
|
+
return execa2(file, args, options);
|
|
23683
|
+
};
|
|
23684
|
+
module2.exports.commandSync = (command, options) => {
|
|
23685
|
+
const [file, ...args] = parseCommand(command);
|
|
23686
|
+
return execa2.sync(file, args, options);
|
|
23687
|
+
};
|
|
23688
|
+
module2.exports.node = (scriptPath, args, options = {}) => {
|
|
23689
|
+
if (args && !Array.isArray(args) && typeof args === "object") {
|
|
23690
|
+
options = args;
|
|
23691
|
+
args = [];
|
|
23692
|
+
}
|
|
23693
|
+
const stdio = normalizeStdio.node(options);
|
|
23694
|
+
const { nodePath = process.execPath, nodeOptions = process.execArgv } = options;
|
|
23695
|
+
return execa2(
|
|
23696
|
+
nodePath,
|
|
23697
|
+
[
|
|
23698
|
+
...nodeOptions,
|
|
23699
|
+
scriptPath,
|
|
23700
|
+
...Array.isArray(args) ? args : []
|
|
23701
|
+
],
|
|
23702
|
+
{
|
|
23703
|
+
...options,
|
|
23704
|
+
stdin: void 0,
|
|
23705
|
+
stdout: void 0,
|
|
23706
|
+
stderr: void 0,
|
|
23707
|
+
stdio,
|
|
23708
|
+
shell: false
|
|
23709
|
+
}
|
|
23710
|
+
);
|
|
23711
|
+
};
|
|
23712
|
+
}
|
|
23713
|
+
});
|
|
23714
|
+
|
|
23715
|
+
// src/index.ts
|
|
23716
|
+
var src_exports = {};
|
|
23717
|
+
__export(src_exports, {
|
|
23718
|
+
BACKEND_FRAMEWORKS: () => BACKEND_FRAMEWORKS,
|
|
23719
|
+
BUILDER_COMPILE_STEP: () => BUILDER_COMPILE_STEP,
|
|
23720
|
+
BUILDER_INSTALLER_STEP: () => BUILDER_INSTALLER_STEP,
|
|
23721
|
+
BunVersion: () => BunVersion,
|
|
23722
|
+
EdgeFunction: () => EdgeFunction,
|
|
23723
|
+
FileBlob: () => FileBlob,
|
|
23724
|
+
FileFsRef: () => file_fs_ref_default,
|
|
23725
|
+
FileRef: () => FileRef,
|
|
23726
|
+
Lambda: () => Lambda,
|
|
23727
|
+
NODE_VERSIONS: () => NODE_VERSIONS,
|
|
23728
|
+
NodeVersion: () => NodeVersion,
|
|
23729
|
+
NodejsLambda: () => NodejsLambda,
|
|
23730
|
+
NowBuildError: () => NowBuildError,
|
|
23731
|
+
Prerender: () => Prerender,
|
|
23732
|
+
Span: () => Span,
|
|
23733
|
+
Version: () => Version,
|
|
23734
|
+
buildsSchema: () => buildsSchema,
|
|
23735
|
+
cloneEnv: () => cloneEnv,
|
|
23736
|
+
createLambda: () => createLambda,
|
|
23737
|
+
debug: () => debug,
|
|
23738
|
+
defaultCachePathGlob: () => defaultCachePathGlob,
|
|
23739
|
+
detectPackageManager: () => detectPackageManager,
|
|
23740
|
+
download: () => download,
|
|
23741
|
+
downloadFile: () => downloadFile,
|
|
23742
|
+
execCommand: () => execCommand,
|
|
23743
|
+
findPackageJson: () => findPackageJson,
|
|
23744
|
+
functionsSchema: () => functionsSchema,
|
|
23745
|
+
generateNodeBuilderFunctions: () => generateNodeBuilderFunctions,
|
|
23746
|
+
getDiscontinuedNodeVersions: () => getDiscontinuedNodeVersions,
|
|
23747
|
+
getEnvForPackageManager: () => getEnvForPackageManager,
|
|
23748
|
+
getIgnoreFilter: () => get_ignore_filter_default,
|
|
23749
|
+
getInstalledPackageVersion: () => getInstalledPackageVersion,
|
|
23750
|
+
getLambdaOptionsFromFunction: () => getLambdaOptionsFromFunction,
|
|
23751
|
+
getLatestNodeVersion: () => getLatestNodeVersion,
|
|
23752
|
+
getNodeBinPath: () => getNodeBinPath,
|
|
23753
|
+
getNodeBinPaths: () => getNodeBinPaths,
|
|
23754
|
+
getNodeVersion: () => getNodeVersion,
|
|
23755
|
+
getOsRelease: () => getOsRelease,
|
|
23756
|
+
getPackageJson: () => getPackageJson,
|
|
23757
|
+
getPathForPackageManager: () => getPathForPackageManager,
|
|
23758
|
+
getPlatformEnv: () => getPlatformEnv,
|
|
23759
|
+
getPrefixedEnvVars: () => getPrefixedEnvVars,
|
|
23760
|
+
getPrettyError: () => getPrettyError,
|
|
23761
|
+
getProvidedRuntime: () => getProvidedRuntime,
|
|
23762
|
+
getScriptName: () => getScriptName,
|
|
23763
|
+
getSpawnOptions: () => getSpawnOptions,
|
|
23764
|
+
getSupportedBunVersion: () => getSupportedBunVersion,
|
|
23765
|
+
getSupportedNodeVersion: () => getSupportedNodeVersion,
|
|
23766
|
+
getWriteableDirectory: () => getWritableDirectory,
|
|
23767
|
+
glob: () => glob,
|
|
23768
|
+
hardLinkDir: () => hardLinkDir,
|
|
23769
|
+
installDependencies: () => installDependencies,
|
|
23770
|
+
isBackendBuilder: () => isBackendBuilder,
|
|
23771
|
+
isBackendFramework: () => isBackendFramework,
|
|
23772
|
+
isBunVersion: () => isBunVersion,
|
|
23773
|
+
isDirectory: () => isDirectory,
|
|
23774
|
+
isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
|
|
23775
|
+
isExperimentalBackendsWithoutIntrospectionEnabled: () => isExperimentalBackendsWithoutIntrospectionEnabled,
|
|
23776
|
+
isPythonEntrypoint: () => isPythonEntrypoint,
|
|
23777
|
+
isSymbolicLink: () => isSymbolicLink,
|
|
23778
|
+
normalizePath: () => normalizePath,
|
|
23779
|
+
readConfigFile: () => readConfigFile,
|
|
23780
|
+
rename: () => rename,
|
|
23781
|
+
resetCustomInstallCommandSet: () => resetCustomInstallCommandSet,
|
|
23782
|
+
runBundleInstall: () => runBundleInstall,
|
|
23783
|
+
runCustomInstallCommand: () => runCustomInstallCommand,
|
|
23784
|
+
runNpmInstall: () => runNpmInstall,
|
|
23785
|
+
runPackageJsonScript: () => runPackageJsonScript,
|
|
23786
|
+
runPipInstall: () => runPipInstall,
|
|
23787
|
+
runShellScript: () => runShellScript,
|
|
23788
|
+
runStdlibPyScript: () => runStdlibPyScript,
|
|
23789
|
+
scanParentDirs: () => scanParentDirs,
|
|
23790
|
+
shouldServe: () => shouldServe,
|
|
23791
|
+
shouldUseExperimentalBackends: () => shouldUseExperimentalBackends,
|
|
23792
|
+
spawnAsync: () => spawnAsync,
|
|
23793
|
+
spawnCommand: () => spawnCommand,
|
|
23794
|
+
streamToBuffer: () => streamToBuffer,
|
|
23795
|
+
streamToBufferChunks: () => streamToBufferChunks,
|
|
23796
|
+
traverseUpDirectories: () => traverseUpDirectories,
|
|
23797
|
+
validateNpmrc: () => validateNpmrc,
|
|
23798
|
+
walkParentDirs: () => walkParentDirs
|
|
23799
|
+
});
|
|
23800
|
+
module.exports = __toCommonJS(src_exports);
|
|
23801
|
+
|
|
23802
|
+
// src/file-blob.ts
|
|
23803
|
+
var import_assert = __toESM(require("assert"));
|
|
23804
|
+
var import_into_stream = __toESM(require_into_stream());
|
|
23805
|
+
var FileBlob = class _FileBlob {
|
|
23806
|
+
constructor({ mode = 33188, contentType, data }) {
|
|
23807
|
+
(0, import_assert.default)(typeof mode === "number");
|
|
23808
|
+
(0, import_assert.default)(typeof data === "string" || Buffer.isBuffer(data));
|
|
23809
|
+
this.type = "FileBlob";
|
|
23810
|
+
this.mode = mode;
|
|
23811
|
+
this.contentType = contentType;
|
|
23812
|
+
this.data = data;
|
|
23813
|
+
}
|
|
23814
|
+
static async fromStream({
|
|
23815
|
+
mode = 33188,
|
|
23816
|
+
contentType,
|
|
23817
|
+
stream
|
|
23818
|
+
}) {
|
|
23819
|
+
(0, import_assert.default)(typeof mode === "number");
|
|
23820
|
+
(0, import_assert.default)(typeof stream.pipe === "function");
|
|
23821
|
+
const chunks = [];
|
|
23822
|
+
await new Promise((resolve, reject) => {
|
|
23823
|
+
stream.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
|
|
23824
|
+
stream.on("error", (error) => reject(error));
|
|
23825
|
+
stream.on("end", () => resolve());
|
|
23826
|
+
});
|
|
23827
|
+
const data = Buffer.concat(chunks);
|
|
23828
|
+
return new _FileBlob({ mode, contentType, data });
|
|
23829
|
+
}
|
|
23830
|
+
async toStreamAsync() {
|
|
23831
|
+
return this.toStream();
|
|
23832
|
+
}
|
|
23833
|
+
toStream() {
|
|
23834
|
+
return (0, import_into_stream.default)(this.data);
|
|
23835
|
+
}
|
|
23836
|
+
};
|
|
23837
|
+
|
|
23838
|
+
// src/file-fs-ref.ts
|
|
23839
|
+
var import_assert2 = __toESM(require("assert"));
|
|
23840
|
+
var import_fs_extra = __toESM(require_lib());
|
|
23841
|
+
var import_multistream = __toESM(require_multistream());
|
|
23842
|
+
var import_path = __toESM(require("path"));
|
|
23843
|
+
var import_async_sema = __toESM(require_async_sema());
|
|
23844
|
+
var semaToPreventEMFILE = new import_async_sema.default(20);
|
|
23845
|
+
var FileFsRef = class _FileFsRef {
|
|
23846
|
+
constructor({
|
|
23847
|
+
mode = 33188,
|
|
23848
|
+
contentType,
|
|
23849
|
+
fsPath,
|
|
23850
|
+
size
|
|
23851
|
+
}) {
|
|
23852
|
+
(0, import_assert2.default)(typeof mode === "number");
|
|
23853
|
+
(0, import_assert2.default)(typeof fsPath === "string");
|
|
23854
|
+
this.type = "FileFsRef";
|
|
23855
|
+
this.mode = mode;
|
|
23856
|
+
this.contentType = contentType;
|
|
23857
|
+
this.fsPath = fsPath;
|
|
23858
|
+
this.size = size;
|
|
23859
|
+
}
|
|
23860
|
+
static async fromFsPath({
|
|
23861
|
+
mode,
|
|
23862
|
+
contentType,
|
|
23863
|
+
fsPath,
|
|
23864
|
+
size
|
|
23865
|
+
}) {
|
|
23866
|
+
let m = mode;
|
|
23867
|
+
let s = size;
|
|
23868
|
+
if (!m || typeof s === "undefined") {
|
|
23869
|
+
const stat = await import_fs_extra.default.lstat(fsPath);
|
|
23870
|
+
m = stat.mode;
|
|
23871
|
+
s = stat.size;
|
|
23872
|
+
}
|
|
23873
|
+
return new _FileFsRef({ mode: m, contentType, fsPath, size: s });
|
|
21969
23874
|
}
|
|
21970
23875
|
static async fromStream({
|
|
21971
23876
|
mode = 33188,
|
|
@@ -22399,6 +24304,7 @@ var Lambda = class {
|
|
|
22399
24304
|
const {
|
|
22400
24305
|
handler,
|
|
22401
24306
|
runtime,
|
|
24307
|
+
runtimeLanguage,
|
|
22402
24308
|
maxDuration,
|
|
22403
24309
|
architecture,
|
|
22404
24310
|
memory,
|
|
@@ -22412,7 +24318,8 @@ var Lambda = class {
|
|
|
22412
24318
|
operationType,
|
|
22413
24319
|
framework,
|
|
22414
24320
|
experimentalTriggers,
|
|
22415
|
-
supportsCancellation
|
|
24321
|
+
supportsCancellation,
|
|
24322
|
+
shouldDisableAutomaticFetchInstrumentation
|
|
22416
24323
|
} = opts;
|
|
22417
24324
|
if ("files" in opts) {
|
|
22418
24325
|
(0, import_assert4.default)(typeof opts.files === "object", '"files" must be an object');
|
|
@@ -22429,6 +24336,12 @@ var Lambda = class {
|
|
|
22429
24336
|
'"architecture" must be either "x86_64" or "arm64"'
|
|
22430
24337
|
);
|
|
22431
24338
|
}
|
|
24339
|
+
if (runtimeLanguage !== void 0) {
|
|
24340
|
+
(0, import_assert4.default)(
|
|
24341
|
+
runtimeLanguage === "rust" || runtimeLanguage === "go",
|
|
24342
|
+
'"runtimeLanguage" is invalid. Valid options: "rust", "go"'
|
|
24343
|
+
);
|
|
24344
|
+
}
|
|
22432
24345
|
if ("experimentalAllowBundling" in opts && opts.experimentalAllowBundling !== void 0) {
|
|
22433
24346
|
(0, import_assert4.default)(
|
|
22434
24347
|
typeof opts.experimentalAllowBundling === "boolean",
|
|
@@ -22552,6 +24465,7 @@ var Lambda = class {
|
|
|
22552
24465
|
this.files = "files" in opts ? opts.files : void 0;
|
|
22553
24466
|
this.handler = handler;
|
|
22554
24467
|
this.runtime = runtime;
|
|
24468
|
+
this.runtimeLanguage = runtimeLanguage;
|
|
22555
24469
|
this.architecture = getDefaultLambdaArchitecture(architecture);
|
|
22556
24470
|
this.memory = memory;
|
|
22557
24471
|
this.maxDuration = maxDuration;
|
|
@@ -22566,6 +24480,7 @@ var Lambda = class {
|
|
|
22566
24480
|
this.experimentalAllowBundling = "experimentalAllowBundling" in opts ? opts.experimentalAllowBundling : void 0;
|
|
22567
24481
|
this.experimentalTriggers = experimentalTriggers;
|
|
22568
24482
|
this.supportsCancellation = supportsCancellation;
|
|
24483
|
+
this.shouldDisableAutomaticFetchInstrumentation = shouldDisableAutomaticFetchInstrumentation;
|
|
22569
24484
|
}
|
|
22570
24485
|
async createZip() {
|
|
22571
24486
|
let { zipBuffer } = this;
|
|
@@ -22922,7 +24837,7 @@ function rename(files, delegate) {
|
|
|
22922
24837
|
// src/fs/run-user-scripts.ts
|
|
22923
24838
|
var import_assert6 = __toESM(require("assert"));
|
|
22924
24839
|
var import_fs_extra7 = __toESM(require_lib());
|
|
22925
|
-
var
|
|
24840
|
+
var import_path6 = __toESM(require("path"));
|
|
22926
24841
|
var import_async_sema4 = __toESM(require_async_sema());
|
|
22927
24842
|
var import_cross_spawn = __toESM(require_cross_spawn());
|
|
22928
24843
|
var import_semver2 = __toESM(require_semver2());
|
|
@@ -22960,6 +24875,11 @@ var BunVersion = class extends Version {
|
|
|
22960
24875
|
|
|
22961
24876
|
// src/fs/node-version.ts
|
|
22962
24877
|
var NODE_VERSIONS = [
|
|
24878
|
+
new NodeVersion({
|
|
24879
|
+
major: 24,
|
|
24880
|
+
range: "24.x",
|
|
24881
|
+
runtime: "nodejs24.x"
|
|
24882
|
+
}),
|
|
22963
24883
|
new NodeVersion({
|
|
22964
24884
|
major: 22,
|
|
22965
24885
|
range: "22.x",
|
|
@@ -23059,7 +24979,7 @@ async function getSupportedNodeVersion(engineRange, isAuto = false, availableVer
|
|
|
23059
24979
|
if (!found) {
|
|
23060
24980
|
throw new NowBuildError({
|
|
23061
24981
|
code: "BUILD_UTILS_NODE_VERSION_INVALID",
|
|
23062
|
-
link: "
|
|
24982
|
+
link: "https://vercel.link/node-version",
|
|
23063
24983
|
message: `Found invalid Node.js Version: "${engineRange}". ${getHint(
|
|
23064
24984
|
isAuto,
|
|
23065
24985
|
availableVersions
|
|
@@ -23074,7 +24994,7 @@ async function getSupportedNodeVersion(engineRange, isAuto = false, availableVer
|
|
|
23074
24994
|
const intro = `Node.js Version "${selection.range}" is discontinued and must be upgraded.`;
|
|
23075
24995
|
throw new NowBuildError({
|
|
23076
24996
|
code: "BUILD_UTILS_NODE_VERSION_DISCONTINUED",
|
|
23077
|
-
link: "
|
|
24997
|
+
link: "https://vercel.link/node-version",
|
|
23078
24998
|
message: `${intro} ${getHint(isAuto)}`
|
|
23079
24999
|
});
|
|
23080
25000
|
}
|
|
@@ -23124,6 +25044,7 @@ var import_js_yaml = __toESM(require_js_yaml2());
|
|
|
23124
25044
|
var import_toml = __toESM(require_toml());
|
|
23125
25045
|
var import_fs_extra6 = __toESM(require_lib());
|
|
23126
25046
|
var import_error_utils = __toESM(require_dist());
|
|
25047
|
+
var import_path5 = require("path");
|
|
23127
25048
|
async function readFileOrNull(file) {
|
|
23128
25049
|
try {
|
|
23129
25050
|
const data = await (0, import_fs_extra6.readFile)(file);
|
|
@@ -23159,6 +25080,14 @@ async function readConfigFile(files) {
|
|
|
23159
25080
|
}
|
|
23160
25081
|
return null;
|
|
23161
25082
|
}
|
|
25083
|
+
async function getPackageJson(dir) {
|
|
25084
|
+
const packagePath = (0, import_path5.join)(dir, "package.json");
|
|
25085
|
+
try {
|
|
25086
|
+
return JSON.parse(await (0, import_fs_extra6.readFile)(packagePath, "utf8"));
|
|
25087
|
+
} catch (err) {
|
|
25088
|
+
return {};
|
|
25089
|
+
}
|
|
25090
|
+
}
|
|
23162
25091
|
|
|
23163
25092
|
// src/clone-env.ts
|
|
23164
25093
|
var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
|
|
@@ -23229,13 +25158,13 @@ function* traverseUpDirectories({
|
|
|
23229
25158
|
start,
|
|
23230
25159
|
base
|
|
23231
25160
|
}) {
|
|
23232
|
-
let current =
|
|
23233
|
-
const normalizedRoot = base ?
|
|
25161
|
+
let current = import_path6.default.normalize(start);
|
|
25162
|
+
const normalizedRoot = base ? import_path6.default.normalize(base) : void 0;
|
|
23234
25163
|
while (current) {
|
|
23235
25164
|
yield current;
|
|
23236
25165
|
if (current === normalizedRoot)
|
|
23237
25166
|
break;
|
|
23238
|
-
const next =
|
|
25167
|
+
const next = import_path6.default.join(current, "..");
|
|
23239
25168
|
current = next === current ? void 0 : next;
|
|
23240
25169
|
}
|
|
23241
25170
|
}
|
|
@@ -23245,29 +25174,29 @@ async function readProjectRootInfo({
|
|
|
23245
25174
|
}) {
|
|
23246
25175
|
let curRootPackageJsonPath;
|
|
23247
25176
|
for (const dir of traverseUpDirectories({ start, base })) {
|
|
23248
|
-
const packageJsonPath =
|
|
25177
|
+
const packageJsonPath = import_path6.default.join(dir, "package.json");
|
|
23249
25178
|
if (await import_fs_extra7.default.pathExists(packageJsonPath)) {
|
|
23250
25179
|
curRootPackageJsonPath = packageJsonPath;
|
|
23251
25180
|
}
|
|
23252
25181
|
}
|
|
23253
25182
|
return curRootPackageJsonPath ? {
|
|
23254
25183
|
packageJson: await import_fs_extra7.default.readJson(curRootPackageJsonPath),
|
|
23255
|
-
rootDir:
|
|
25184
|
+
rootDir: import_path6.default.dirname(curRootPackageJsonPath)
|
|
23256
25185
|
} : void 0;
|
|
23257
25186
|
}
|
|
23258
25187
|
async function getNodeBinPath({
|
|
23259
25188
|
cwd
|
|
23260
25189
|
}) {
|
|
23261
25190
|
const { lockfilePath } = await scanParentDirs(cwd);
|
|
23262
|
-
const dir =
|
|
23263
|
-
return
|
|
25191
|
+
const dir = import_path6.default.dirname(lockfilePath || cwd);
|
|
25192
|
+
return import_path6.default.join(dir, "node_modules", ".bin");
|
|
23264
25193
|
}
|
|
23265
25194
|
function getNodeBinPaths({
|
|
23266
25195
|
start,
|
|
23267
25196
|
base
|
|
23268
25197
|
}) {
|
|
23269
25198
|
return Array.from(traverseUpDirectories({ start, base })).map(
|
|
23270
|
-
(dir) =>
|
|
25199
|
+
(dir) => import_path6.default.join(dir, "node_modules/.bin")
|
|
23271
25200
|
);
|
|
23272
25201
|
}
|
|
23273
25202
|
async function chmodPlusX(fsPath) {
|
|
@@ -23279,10 +25208,10 @@ async function chmodPlusX(fsPath) {
|
|
|
23279
25208
|
await import_fs_extra7.default.chmod(fsPath, base8);
|
|
23280
25209
|
}
|
|
23281
25210
|
async function runShellScript(fsPath, args = [], spawnOpts) {
|
|
23282
|
-
(0, import_assert6.default)(
|
|
23283
|
-
const destPath =
|
|
25211
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(fsPath));
|
|
25212
|
+
const destPath = import_path6.default.dirname(fsPath);
|
|
23284
25213
|
await chmodPlusX(fsPath);
|
|
23285
|
-
const command = `./${
|
|
25214
|
+
const command = `./${import_path6.default.basename(fsPath)}`;
|
|
23286
25215
|
await spawnAsync(command, args, {
|
|
23287
25216
|
...spawnOpts,
|
|
23288
25217
|
cwd: destPath,
|
|
@@ -23300,7 +25229,7 @@ function getSpawnOptions(meta, nodeVersion) {
|
|
|
23300
25229
|
if (!meta.isDev) {
|
|
23301
25230
|
let found = false;
|
|
23302
25231
|
const oldPath = opts.env.PATH || process.env.PATH || "";
|
|
23303
|
-
const pathSegments = oldPath.split(
|
|
25232
|
+
const pathSegments = oldPath.split(import_path6.default.delimiter).map((segment) => {
|
|
23304
25233
|
if (/^\/node[0-9]+\/bin/.test(segment)) {
|
|
23305
25234
|
found = true;
|
|
23306
25235
|
return `/node${nodeVersion.major}/bin`;
|
|
@@ -23310,7 +25239,7 @@ function getSpawnOptions(meta, nodeVersion) {
|
|
|
23310
25239
|
if (!found) {
|
|
23311
25240
|
pathSegments.unshift(`/node${nodeVersion.major}/bin`);
|
|
23312
25241
|
}
|
|
23313
|
-
opts.env.PATH = pathSegments.filter(Boolean).join(
|
|
25242
|
+
opts.env.PATH = pathSegments.filter(Boolean).join(import_path6.default.delimiter);
|
|
23314
25243
|
}
|
|
23315
25244
|
return opts;
|
|
23316
25245
|
}
|
|
@@ -23323,7 +25252,7 @@ async function getNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PRO
|
|
|
23323
25252
|
latestVersion.runtime = "nodejs";
|
|
23324
25253
|
return latestVersion;
|
|
23325
25254
|
}
|
|
23326
|
-
const { packageJson } = await
|
|
25255
|
+
const { packageJson } = await findPackageJson(destPath, true);
|
|
23327
25256
|
const configuredVersion = config.nodeVersion || fallbackVersion;
|
|
23328
25257
|
const packageJsonVersion = packageJson?.engines?.node;
|
|
23329
25258
|
const supportedNodeVersion = await getSupportedNodeVersion(
|
|
@@ -23335,23 +25264,23 @@ async function getNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PRO
|
|
|
23335
25264
|
const { node } = packageJson.engines;
|
|
23336
25265
|
if (configuredVersion && !(0, import_semver2.intersects)(configuredVersion, supportedNodeVersion.range)) {
|
|
23337
25266
|
console.warn(
|
|
23338
|
-
`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More:
|
|
25267
|
+
`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More: https://vercel.link/node-version`
|
|
23339
25268
|
);
|
|
23340
25269
|
}
|
|
23341
25270
|
if ((0, import_semver2.coerce)(node)?.raw === node) {
|
|
23342
25271
|
console.warn(
|
|
23343
|
-
`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More:
|
|
25272
|
+
`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: https://vercel.link/node-version`
|
|
23344
25273
|
);
|
|
23345
25274
|
} else if ((0, import_semver2.validRange)(node) && (0, import_semver2.intersects)(`${latestVersion.major + 1}.x`, node)) {
|
|
23346
25275
|
console.warn(
|
|
23347
|
-
`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More:
|
|
25276
|
+
`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: https://vercel.link/node-version`
|
|
23348
25277
|
);
|
|
23349
25278
|
}
|
|
23350
25279
|
}
|
|
23351
25280
|
return supportedNodeVersion;
|
|
23352
25281
|
}
|
|
23353
|
-
async function
|
|
23354
|
-
(0, import_assert6.default)(
|
|
25282
|
+
async function findPackageJson(destPath, readPackageJson = false, base = "/") {
|
|
25283
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
23355
25284
|
const pkgJsonPath = await walkParentDirs({
|
|
23356
25285
|
base,
|
|
23357
25286
|
start: destPath,
|
|
@@ -23367,6 +25296,18 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
|
|
|
23367
25296
|
);
|
|
23368
25297
|
}
|
|
23369
25298
|
}
|
|
25299
|
+
return {
|
|
25300
|
+
packageJsonPath: pkgJsonPath || void 0,
|
|
25301
|
+
packageJson
|
|
25302
|
+
};
|
|
25303
|
+
}
|
|
25304
|
+
async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
|
|
25305
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
25306
|
+
const { packageJsonPath: pkgJsonPath, packageJson } = await findPackageJson(
|
|
25307
|
+
destPath,
|
|
25308
|
+
readPackageJson,
|
|
25309
|
+
base
|
|
25310
|
+
);
|
|
23370
25311
|
const {
|
|
23371
25312
|
paths: [
|
|
23372
25313
|
yarnLockPath,
|
|
@@ -23464,8 +25405,8 @@ async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
|
|
23464
25405
|
if (turboVersionSpecifierSupportsCorepack(turboVersionRange)) {
|
|
23465
25406
|
return true;
|
|
23466
25407
|
}
|
|
23467
|
-
const turboJsonPath =
|
|
23468
|
-
const turboJsoncPath =
|
|
25408
|
+
const turboJsonPath = import_path6.default.join(rootDir, "turbo.json");
|
|
25409
|
+
const turboJsoncPath = import_path6.default.join(rootDir, "turbo.jsonc");
|
|
23469
25410
|
const [turboJsonExists, turboJsoncExists] = await Promise.all([
|
|
23470
25411
|
import_fs_extra7.default.pathExists(turboJsonPath),
|
|
23471
25412
|
import_fs_extra7.default.pathExists(turboJsoncPath)
|
|
@@ -23482,7 +25423,7 @@ async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
|
|
23482
25423
|
turboJson = import_json5.default.parse(await import_fs_extra7.default.readFile(turboConfigPath, "utf8"));
|
|
23483
25424
|
} catch (err) {
|
|
23484
25425
|
console.warn(
|
|
23485
|
-
`WARNING: Failed to parse ${
|
|
25426
|
+
`WARNING: Failed to parse ${import_path6.default.basename(turboConfigPath)}`
|
|
23486
25427
|
);
|
|
23487
25428
|
}
|
|
23488
25429
|
}
|
|
@@ -23542,10 +25483,10 @@ async function walkParentDirs({
|
|
|
23542
25483
|
start,
|
|
23543
25484
|
filename
|
|
23544
25485
|
}) {
|
|
23545
|
-
(0, import_assert6.default)(
|
|
23546
|
-
(0, import_assert6.default)(
|
|
25486
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(base), 'Expected "base" to be absolute path');
|
|
25487
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(start), 'Expected "start" to be absolute path');
|
|
23547
25488
|
for (const dir of traverseUpDirectories({ start, base })) {
|
|
23548
|
-
const fullPath =
|
|
25489
|
+
const fullPath = import_path6.default.join(dir, filename);
|
|
23549
25490
|
if (await import_fs_extra7.default.pathExists(fullPath)) {
|
|
23550
25491
|
return fullPath;
|
|
23551
25492
|
}
|
|
@@ -23559,12 +25500,12 @@ async function walkParentDirsMulti({
|
|
|
23559
25500
|
}) {
|
|
23560
25501
|
let packageManager;
|
|
23561
25502
|
for (const dir of traverseUpDirectories({ start, base })) {
|
|
23562
|
-
const fullPaths = filenames.map((f) =>
|
|
25503
|
+
const fullPaths = filenames.map((f) => import_path6.default.join(dir, f));
|
|
23563
25504
|
const existResults = await Promise.all(
|
|
23564
25505
|
fullPaths.map((f) => import_fs_extra7.default.pathExists(f))
|
|
23565
25506
|
);
|
|
23566
25507
|
const foundOneOrMore = existResults.some((b) => b);
|
|
23567
|
-
const packageJsonPath =
|
|
25508
|
+
const packageJsonPath = import_path6.default.join(dir, "package.json");
|
|
23568
25509
|
const packageJson = await import_fs_extra7.default.readJSON(packageJsonPath).catch(() => null);
|
|
23569
25510
|
if (packageJson?.packageManager) {
|
|
23570
25511
|
packageManager = packageJson.packageManager;
|
|
@@ -23586,7 +25527,7 @@ function getInstallCommandForPackageManager(packageManager, args) {
|
|
|
23586
25527
|
case "npm":
|
|
23587
25528
|
return {
|
|
23588
25529
|
prettyCommand: "npm install",
|
|
23589
|
-
commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit"
|
|
25530
|
+
commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit"])
|
|
23590
25531
|
};
|
|
23591
25532
|
case "pnpm":
|
|
23592
25533
|
return {
|
|
@@ -23638,12 +25579,16 @@ function checkIfAlreadyInstalled(runNpmInstallSet, packageJsonPath) {
|
|
|
23638
25579
|
return { alreadyInstalled, runNpmInstallSet: initializedRunNpmInstallSet };
|
|
23639
25580
|
}
|
|
23640
25581
|
var runNpmInstallSema = new import_async_sema4.default(1);
|
|
25582
|
+
var customInstallCommandSet;
|
|
25583
|
+
function resetCustomInstallCommandSet() {
|
|
25584
|
+
customInstallCommandSet = void 0;
|
|
25585
|
+
}
|
|
23641
25586
|
async function runNpmInstall(destPath, args = [], spawnOpts, meta, projectCreatedAt) {
|
|
23642
25587
|
if (meta?.isDev) {
|
|
23643
25588
|
debug("Skipping dependency installation because dev mode is enabled");
|
|
23644
25589
|
return false;
|
|
23645
25590
|
}
|
|
23646
|
-
(0, import_assert6.default)(
|
|
25591
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
23647
25592
|
try {
|
|
23648
25593
|
await runNpmInstallSema.acquire();
|
|
23649
25594
|
const {
|
|
@@ -23669,6 +25614,14 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, projectCreate
|
|
|
23669
25614
|
if (alreadyInstalled) {
|
|
23670
25615
|
return false;
|
|
23671
25616
|
}
|
|
25617
|
+
if (process.env.VERCEL_INSTALL_COMPLETED === "1") {
|
|
25618
|
+
debug(
|
|
25619
|
+
`Skipping dependency installation for ${packageJsonPath} because VERCEL_INSTALL_COMPLETED is set`
|
|
25620
|
+
);
|
|
25621
|
+
runNpmInstallSet.add(packageJsonPath);
|
|
25622
|
+
meta.runNpmInstallSet = runNpmInstallSet;
|
|
25623
|
+
return false;
|
|
25624
|
+
}
|
|
23672
25625
|
meta.runNpmInstallSet = runNpmInstallSet;
|
|
23673
25626
|
}
|
|
23674
25627
|
if (cliType === "yarn") {
|
|
@@ -23753,11 +25706,11 @@ function getEnvForPackageManager({
|
|
|
23753
25706
|
};
|
|
23754
25707
|
const alreadyInPath = (newPath2) => {
|
|
23755
25708
|
const oldPath = env.PATH ?? "";
|
|
23756
|
-
return oldPath.split(
|
|
25709
|
+
return oldPath.split(import_path6.default.delimiter).includes(newPath2);
|
|
23757
25710
|
};
|
|
23758
25711
|
if (newPath && !alreadyInPath(newPath)) {
|
|
23759
25712
|
const oldPath = env.PATH + "";
|
|
23760
|
-
newEnv.PATH = `${newPath}${
|
|
25713
|
+
newEnv.PATH = `${newPath}${import_path6.default.delimiter}${oldPath}`;
|
|
23761
25714
|
if (detectedLockfile && detectedPackageManager) {
|
|
23762
25715
|
const detectedV9PnpmLockfile = detectedLockfile === "pnpm-lock.yaml" && lockfileVersion === 9;
|
|
23763
25716
|
const pnpm10UsingPackageJsonPackageManager = detectedPackageManager === "pnpm@10.x" && packageJsonPackageManager;
|
|
@@ -23779,11 +25732,6 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
23779
25732
|
`Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
|
|
23780
25733
|
);
|
|
23781
25734
|
}
|
|
23782
|
-
if (cliType === "bun") {
|
|
23783
|
-
console.warn(
|
|
23784
|
-
"Warning: Bun is used as a package manager at build time only, not at runtime with Functions"
|
|
23785
|
-
);
|
|
23786
|
-
}
|
|
23787
25735
|
}
|
|
23788
25736
|
}
|
|
23789
25737
|
if (cliType === "yarn" && !env.YARN_NODE_LINKER) {
|
|
@@ -24041,7 +25989,7 @@ function getPathForPackageManager({
|
|
|
24041
25989
|
}
|
|
24042
25990
|
const alreadyInPath = (newPath) => {
|
|
24043
25991
|
const oldPath = env.PATH ?? "";
|
|
24044
|
-
return oldPath.split(
|
|
25992
|
+
return oldPath.split(import_path6.default.delimiter).includes(newPath);
|
|
24045
25993
|
};
|
|
24046
25994
|
switch (true) {
|
|
24047
25995
|
case (cliType === "yarn" && !env.YARN_NODE_LINKER):
|
|
@@ -24063,6 +26011,24 @@ async function runCustomInstallCommand({
|
|
|
24063
26011
|
spawnOpts,
|
|
24064
26012
|
projectCreatedAt
|
|
24065
26013
|
}) {
|
|
26014
|
+
const normalizedPath = import_path6.default.normalize(destPath);
|
|
26015
|
+
const { alreadyInstalled, runNpmInstallSet } = checkIfAlreadyInstalled(
|
|
26016
|
+
customInstallCommandSet,
|
|
26017
|
+
normalizedPath
|
|
26018
|
+
);
|
|
26019
|
+
customInstallCommandSet = runNpmInstallSet;
|
|
26020
|
+
if (alreadyInstalled) {
|
|
26021
|
+
debug(
|
|
26022
|
+
`Skipping custom install command for ${normalizedPath} because it was already run`
|
|
26023
|
+
);
|
|
26024
|
+
return false;
|
|
26025
|
+
}
|
|
26026
|
+
if (process.env.VERCEL_INSTALL_COMPLETED === "1") {
|
|
26027
|
+
debug(
|
|
26028
|
+
`Skipping custom install command for ${normalizedPath} because VERCEL_INSTALL_COMPLETED is set`
|
|
26029
|
+
);
|
|
26030
|
+
return false;
|
|
26031
|
+
}
|
|
24066
26032
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
24067
26033
|
const {
|
|
24068
26034
|
cliType,
|
|
@@ -24086,9 +26052,10 @@ async function runCustomInstallCommand({
|
|
|
24086
26052
|
env,
|
|
24087
26053
|
cwd: destPath
|
|
24088
26054
|
});
|
|
26055
|
+
return true;
|
|
24089
26056
|
}
|
|
24090
26057
|
async function runPackageJsonScript(destPath, scriptNames, spawnOpts, projectCreatedAt) {
|
|
24091
|
-
(0, import_assert6.default)(
|
|
26058
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
24092
26059
|
const {
|
|
24093
26060
|
packageJson,
|
|
24094
26061
|
cliType,
|
|
@@ -24138,7 +26105,7 @@ async function runBundleInstall(destPath, args = [], spawnOpts, meta) {
|
|
|
24138
26105
|
debug("Skipping dependency installation because dev mode is enabled");
|
|
24139
26106
|
return;
|
|
24140
26107
|
}
|
|
24141
|
-
(0, import_assert6.default)(
|
|
26108
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
24142
26109
|
const opts = { ...spawnOpts, cwd: destPath, prettyCommand: "bundle install" };
|
|
24143
26110
|
await spawnAsync("bundle", args.concat(["install"]), opts);
|
|
24144
26111
|
}
|
|
@@ -24147,7 +26114,7 @@ async function runPipInstall(destPath, args = [], spawnOpts, meta) {
|
|
|
24147
26114
|
debug("Skipping dependency installation because dev mode is enabled");
|
|
24148
26115
|
return;
|
|
24149
26116
|
}
|
|
24150
|
-
(0, import_assert6.default)(
|
|
26117
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
24151
26118
|
const opts = { ...spawnOpts, cwd: destPath, prettyCommand: "pip3 install" };
|
|
24152
26119
|
await spawnAsync(
|
|
24153
26120
|
"pip3",
|
|
@@ -24171,7 +26138,7 @@ var installDependencies = (0, import_util2.deprecate)(
|
|
|
24171
26138
|
);
|
|
24172
26139
|
|
|
24173
26140
|
// src/get-ignore-filter.ts
|
|
24174
|
-
var
|
|
26141
|
+
var import_path7 = __toESM(require("path"));
|
|
24175
26142
|
var import_fs_extra8 = __toESM(require_lib());
|
|
24176
26143
|
var import_ignore = __toESM(require_ignore());
|
|
24177
26144
|
function isCodedError(error) {
|
|
@@ -24191,12 +26158,12 @@ async function get_ignore_filter_default(downloadPath, rootDirectory) {
|
|
|
24191
26158
|
throw error;
|
|
24192
26159
|
}
|
|
24193
26160
|
};
|
|
24194
|
-
const vercelIgnorePath =
|
|
26161
|
+
const vercelIgnorePath = import_path7.default.join(
|
|
24195
26162
|
downloadPath,
|
|
24196
26163
|
rootDirectory || "",
|
|
24197
26164
|
".vercelignore"
|
|
24198
26165
|
);
|
|
24199
|
-
const nowIgnorePath =
|
|
26166
|
+
const nowIgnorePath = import_path7.default.join(
|
|
24200
26167
|
downloadPath,
|
|
24201
26168
|
rootDirectory || "",
|
|
24202
26169
|
".nowignore"
|
|
@@ -24259,22 +26226,22 @@ function getPrefixedEnvVars({
|
|
|
24259
26226
|
}
|
|
24260
26227
|
|
|
24261
26228
|
// src/hard-link-dir.ts
|
|
24262
|
-
var
|
|
26229
|
+
var import_path8 = __toESM(require("path"));
|
|
24263
26230
|
var import_fs2 = require("fs");
|
|
24264
26231
|
async function hardLinkDir(src, destDirs) {
|
|
24265
26232
|
if (destDirs.length === 0)
|
|
24266
26233
|
return;
|
|
24267
|
-
destDirs = destDirs.filter((destDir) =>
|
|
26234
|
+
destDirs = destDirs.filter((destDir) => import_path8.default.relative(destDir, src) !== "");
|
|
24268
26235
|
const files = await import_fs2.promises.readdir(src);
|
|
24269
26236
|
await Promise.all(
|
|
24270
26237
|
files.map(async (file) => {
|
|
24271
26238
|
if (file === "node_modules")
|
|
24272
26239
|
return;
|
|
24273
|
-
const srcFile =
|
|
26240
|
+
const srcFile = import_path8.default.join(src, file);
|
|
24274
26241
|
if ((await import_fs2.promises.lstat(srcFile)).isDirectory()) {
|
|
24275
26242
|
const destSubdirs = await Promise.all(
|
|
24276
26243
|
destDirs.map(async (destDir) => {
|
|
24277
|
-
const destSubdir =
|
|
26244
|
+
const destSubdir = import_path8.default.join(destDir, file);
|
|
24278
26245
|
try {
|
|
24279
26246
|
await import_fs2.promises.mkdir(destSubdir, { recursive: true });
|
|
24280
26247
|
} catch (err) {
|
|
@@ -24289,7 +26256,7 @@ async function hardLinkDir(src, destDirs) {
|
|
|
24289
26256
|
}
|
|
24290
26257
|
await Promise.all(
|
|
24291
26258
|
destDirs.map(async (destDir) => {
|
|
24292
|
-
const destFile =
|
|
26259
|
+
const destFile = import_path8.default.join(destDir, file);
|
|
24293
26260
|
try {
|
|
24294
26261
|
await linkOrCopyFile(srcFile, destFile);
|
|
24295
26262
|
} catch (err) {
|
|
@@ -24308,7 +26275,7 @@ async function linkOrCopyFile(srcFile, destFile) {
|
|
|
24308
26275
|
await linkOrCopy(srcFile, destFile);
|
|
24309
26276
|
} catch (err) {
|
|
24310
26277
|
if (err.code === "ENOENT") {
|
|
24311
|
-
await import_fs2.promises.mkdir(
|
|
26278
|
+
await import_fs2.promises.mkdir(import_path8.default.dirname(destFile), { recursive: true });
|
|
24312
26279
|
await linkOrCopy(srcFile, destFile);
|
|
24313
26280
|
return;
|
|
24314
26281
|
}
|
|
@@ -24328,10 +26295,10 @@ async function linkOrCopy(srcFile, destFile) {
|
|
|
24328
26295
|
}
|
|
24329
26296
|
|
|
24330
26297
|
// src/validate-npmrc.ts
|
|
24331
|
-
var
|
|
26298
|
+
var import_path9 = require("path");
|
|
24332
26299
|
var import_promises = require("fs/promises");
|
|
24333
26300
|
async function validateNpmrc(cwd) {
|
|
24334
|
-
const npmrc = await (0, import_promises.readFile)((0,
|
|
26301
|
+
const npmrc = await (0, import_promises.readFile)((0, import_path9.join)(cwd, ".npmrc"), "utf-8").catch((err) => {
|
|
24335
26302
|
if (err.code !== "ENOENT")
|
|
24336
26303
|
throw err;
|
|
24337
26304
|
});
|
|
@@ -24392,7 +26359,7 @@ async function getProvidedRuntime() {
|
|
|
24392
26359
|
}
|
|
24393
26360
|
|
|
24394
26361
|
// src/should-serve.ts
|
|
24395
|
-
var
|
|
26362
|
+
var import_path10 = require("path");
|
|
24396
26363
|
var shouldServe = ({
|
|
24397
26364
|
entrypoint,
|
|
24398
26365
|
files,
|
|
@@ -24403,7 +26370,7 @@ var shouldServe = ({
|
|
|
24403
26370
|
if (entrypoint === requestPath && hasProp(files, entrypoint)) {
|
|
24404
26371
|
return true;
|
|
24405
26372
|
}
|
|
24406
|
-
const { dir, name } = (0,
|
|
26373
|
+
const { dir, name } = (0, import_path10.parse)(entrypoint);
|
|
24407
26374
|
if (name === "index" && dir === requestPath && hasProp(files, entrypoint)) {
|
|
24408
26375
|
return true;
|
|
24409
26376
|
}
|
|
@@ -24610,7 +26577,7 @@ var defaultCachePathGlob = "**/{node_modules,.yarn/cache}/**";
|
|
|
24610
26577
|
var import_node_path = require("path");
|
|
24611
26578
|
var import_node_fs = __toESM(require("fs"));
|
|
24612
26579
|
var import_node_module = require("module");
|
|
24613
|
-
function generateNodeBuilderFunctions(frameworkName, regex, validFilenames, validExtensions, nodeBuild) {
|
|
26580
|
+
function generateNodeBuilderFunctions(frameworkName, regex, validFilenames, validExtensions, nodeBuild, opts) {
|
|
24614
26581
|
const entrypointsForMessage = validFilenames.map((filename) => `- ${filename}.{${validExtensions.join(",")}}`).join("\n");
|
|
24615
26582
|
const require_ = (0, import_node_module.createRequire)(__filename);
|
|
24616
26583
|
const build = async (args) => {
|
|
@@ -24632,7 +26599,9 @@ function generateNodeBuilderFunctions(frameworkName, regex, validFilenames, vali
|
|
|
24632
26599
|
considerBuildCommand: true,
|
|
24633
26600
|
entrypointCallback: async () => {
|
|
24634
26601
|
return entrypointCallback(args);
|
|
24635
|
-
}
|
|
26602
|
+
},
|
|
26603
|
+
checks: opts?.checks ?? (() => {
|
|
26604
|
+
})
|
|
24636
26605
|
});
|
|
24637
26606
|
let version = void 0;
|
|
24638
26607
|
try {
|
|
@@ -24771,21 +26740,88 @@ var BACKEND_FRAMEWORKS = [
|
|
|
24771
26740
|
"express",
|
|
24772
26741
|
"hono",
|
|
24773
26742
|
"h3",
|
|
26743
|
+
"koa",
|
|
24774
26744
|
"nestjs",
|
|
24775
|
-
"fastify"
|
|
26745
|
+
"fastify",
|
|
26746
|
+
"elysia"
|
|
26747
|
+
];
|
|
26748
|
+
var BACKEND_BUILDERS = [
|
|
26749
|
+
"@vercel/express",
|
|
26750
|
+
"@vercel/hono",
|
|
26751
|
+
"@vercel/h3",
|
|
26752
|
+
"@vercel/koa",
|
|
26753
|
+
"@vercel/nestjs",
|
|
26754
|
+
"@vercel/fastify",
|
|
26755
|
+
"@vercel/elysia"
|
|
24776
26756
|
];
|
|
24777
26757
|
function isBackendFramework(framework) {
|
|
24778
26758
|
if (!framework)
|
|
24779
26759
|
return false;
|
|
24780
26760
|
return BACKEND_FRAMEWORKS.includes(framework);
|
|
24781
26761
|
}
|
|
26762
|
+
function isExperimentalBackendsWithoutIntrospectionEnabled() {
|
|
26763
|
+
return process.env.VERCEL_BACKENDS_BUILDS === "1";
|
|
26764
|
+
}
|
|
24782
26765
|
function isExperimentalBackendsEnabled() {
|
|
24783
|
-
return process.env.VERCEL_EXPERIMENTAL_BACKENDS === "1" || // Previously used for experimental express and hono builds
|
|
26766
|
+
return isExperimentalBackendsWithoutIntrospectionEnabled() || process.env.VERCEL_EXPERIMENTAL_BACKENDS === "1" || // Previously used for experimental express and hono builds
|
|
24784
26767
|
process.env.VERCEL_EXPERIMENTAL_EXPRESS_BUILD === "1" || process.env.VERCEL_EXPERIMENTAL_HONO_BUILD === "1";
|
|
24785
26768
|
}
|
|
26769
|
+
function isBackendBuilder(builder) {
|
|
26770
|
+
if (!builder)
|
|
26771
|
+
return false;
|
|
26772
|
+
const use = builder.use;
|
|
26773
|
+
return BACKEND_BUILDERS.includes(use);
|
|
26774
|
+
}
|
|
24786
26775
|
function shouldUseExperimentalBackends(framework) {
|
|
24787
26776
|
return isExperimentalBackendsEnabled() && isBackendFramework(framework);
|
|
24788
26777
|
}
|
|
26778
|
+
|
|
26779
|
+
// src/python.ts
|
|
26780
|
+
var import_fs3 = __toESM(require("fs"));
|
|
26781
|
+
var import_path11 = require("path");
|
|
26782
|
+
var import_execa = __toESM(require_execa());
|
|
26783
|
+
var isWin2 = process.platform === "win32";
|
|
26784
|
+
async function runStdlibPyScript(options) {
|
|
26785
|
+
const { scriptName, pythonPath, args = [], cwd } = options;
|
|
26786
|
+
const scriptPath = (0, import_path11.join)(__dirname, "..", "lib", "python", `${scriptName}.py`);
|
|
26787
|
+
if (!import_fs3.default.existsSync(scriptPath)) {
|
|
26788
|
+
throw new Error(`Python script not found: ${scriptPath}`);
|
|
26789
|
+
}
|
|
26790
|
+
const pythonCmd = pythonPath ?? (isWin2 ? "python" : "python3");
|
|
26791
|
+
debug(
|
|
26792
|
+
`Running stdlib Python script: ${pythonCmd} ${scriptPath} ${args.join(" ")}`
|
|
26793
|
+
);
|
|
26794
|
+
try {
|
|
26795
|
+
const result = await (0, import_execa.default)(pythonCmd, [scriptPath, ...args], { cwd });
|
|
26796
|
+
return { exitCode: 0, stdout: result.stdout, stderr: result.stderr };
|
|
26797
|
+
} catch (err) {
|
|
26798
|
+
const execaErr = err;
|
|
26799
|
+
return {
|
|
26800
|
+
exitCode: execaErr.exitCode ?? 1,
|
|
26801
|
+
stdout: execaErr.stdout ?? "",
|
|
26802
|
+
stderr: execaErr.stderr ?? ""
|
|
26803
|
+
};
|
|
26804
|
+
}
|
|
26805
|
+
}
|
|
26806
|
+
async function isPythonEntrypoint(file) {
|
|
26807
|
+
try {
|
|
26808
|
+
const fsPath = file.fsPath;
|
|
26809
|
+
if (!fsPath)
|
|
26810
|
+
return false;
|
|
26811
|
+
const content = await import_fs3.default.promises.readFile(fsPath, "utf-8");
|
|
26812
|
+
if (!content.includes("app") && !content.includes("handler") && !content.includes("Handler")) {
|
|
26813
|
+
return false;
|
|
26814
|
+
}
|
|
26815
|
+
const result = await runStdlibPyScript({
|
|
26816
|
+
scriptName: "ast_parser",
|
|
26817
|
+
args: [fsPath]
|
|
26818
|
+
});
|
|
26819
|
+
return result.exitCode === 0;
|
|
26820
|
+
} catch (err) {
|
|
26821
|
+
debug(`Failed to check Python entrypoint: ${err}`);
|
|
26822
|
+
return false;
|
|
26823
|
+
}
|
|
26824
|
+
}
|
|
24789
26825
|
// Annotate the CommonJS export names for ESM import in node:
|
|
24790
26826
|
0 && (module.exports = {
|
|
24791
26827
|
BACKEND_FRAMEWORKS,
|
|
@@ -24813,6 +26849,7 @@ function shouldUseExperimentalBackends(framework) {
|
|
|
24813
26849
|
download,
|
|
24814
26850
|
downloadFile,
|
|
24815
26851
|
execCommand,
|
|
26852
|
+
findPackageJson,
|
|
24816
26853
|
functionsSchema,
|
|
24817
26854
|
generateNodeBuilderFunctions,
|
|
24818
26855
|
getDiscontinuedNodeVersions,
|
|
@@ -24825,6 +26862,7 @@ function shouldUseExperimentalBackends(framework) {
|
|
|
24825
26862
|
getNodeBinPaths,
|
|
24826
26863
|
getNodeVersion,
|
|
24827
26864
|
getOsRelease,
|
|
26865
|
+
getPackageJson,
|
|
24828
26866
|
getPathForPackageManager,
|
|
24829
26867
|
getPlatformEnv,
|
|
24830
26868
|
getPrefixedEnvVars,
|
|
@@ -24838,20 +26876,25 @@ function shouldUseExperimentalBackends(framework) {
|
|
|
24838
26876
|
glob,
|
|
24839
26877
|
hardLinkDir,
|
|
24840
26878
|
installDependencies,
|
|
26879
|
+
isBackendBuilder,
|
|
24841
26880
|
isBackendFramework,
|
|
24842
26881
|
isBunVersion,
|
|
24843
26882
|
isDirectory,
|
|
24844
26883
|
isExperimentalBackendsEnabled,
|
|
26884
|
+
isExperimentalBackendsWithoutIntrospectionEnabled,
|
|
26885
|
+
isPythonEntrypoint,
|
|
24845
26886
|
isSymbolicLink,
|
|
24846
26887
|
normalizePath,
|
|
24847
26888
|
readConfigFile,
|
|
24848
26889
|
rename,
|
|
26890
|
+
resetCustomInstallCommandSet,
|
|
24849
26891
|
runBundleInstall,
|
|
24850
26892
|
runCustomInstallCommand,
|
|
24851
26893
|
runNpmInstall,
|
|
24852
26894
|
runPackageJsonScript,
|
|
24853
26895
|
runPipInstall,
|
|
24854
26896
|
runShellScript,
|
|
26897
|
+
runStdlibPyScript,
|
|
24855
26898
|
scanParentDirs,
|
|
24856
26899
|
shouldServe,
|
|
24857
26900
|
shouldUseExperimentalBackends,
|