@prisma/internals 5.23.0-dev.12 → 5.23.0-dev.14
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.
- package/dist/{chunk-75GSZEOY.js → chunk-2OOQS7QH.js} +5 -5
- package/dist/{chunk-ZPRI5BMZ.js → chunk-4O5QP2B2.js} +8 -8
- package/dist/{chunk-5I4BOTBV.js → chunk-5MCWLJSR.js} +3 -9
- package/dist/{chunk-XQUZGA2G.js → chunk-AGXHB3SC.js} +4 -4
- package/dist/{chunk-D4G3OMDH.js → chunk-BKMST2H6.js} +5 -5
- package/dist/{chunk-D7G6TRG2.js → chunk-BUQSP6QY.js} +5 -5
- package/dist/{chunk-AWPFLVB6.js → chunk-CS3NRXVU.js} +20 -139
- package/dist/{chunk-DMI3QKHF.js → chunk-HOTWHBIX.js} +5 -5
- package/dist/{chunk-KLZW2JAY.js → chunk-INEWQP2H.js} +7 -7
- package/dist/{chunk-DSDTYXB5.js → chunk-JHXUXGS2.js} +5 -5
- package/dist/{chunk-ZZV6DPK5.js → chunk-JNJHLV4W.js} +8 -8
- package/dist/{chunk-XBTZEROW.js → chunk-KNV7G3M4.js} +5 -5
- package/dist/{chunk-NYIVM3HW.js → chunk-N2CJJE5H.js} +5 -5
- package/dist/{chunk-NZYA5YF6.js → chunk-N754ZXVC.js} +5 -5
- package/dist/{chunk-IQ3XPQFI.js → chunk-P3ZSXMEW.js} +8 -8
- package/dist/{chunk-VVOW6SAQ.js → chunk-QTCIEQ4O.js} +796 -144
- package/dist/{chunk-WSIDY2ZO.js → chunk-RM2YSS4M.js} +5 -5
- package/dist/{chunk-JLJYCGJU.js → chunk-TRJQZSQL.js} +8 -8
- package/dist/{chunk-OSPVVLY6.js → chunk-WW3WIQC5.js} +8 -8
- package/dist/{chunk-YTL7KK6P.js → chunk-XIDWK5FF.js} +8 -8
- package/dist/{chunk-ZA3RMW2P.js → chunk-ZKAW5JSN.js} +5 -8
- package/dist/{chunk-PFZMGDZR.js → chunk-ZNHVBU7J.js} +7 -7
- package/dist/cli/checkUnsupportedDataProxy.js +14 -14
- package/dist/cli/getSchema.js +19 -19
- package/dist/cli/hashes.js +14 -14
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +13 -13
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +22 -22
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +13 -13
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +13 -13
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +14 -14
- package/dist/get-generators/getGenerators.js +16 -16
- package/dist/index.js +43 -43
- package/dist/sendPanic.js +13 -13
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +13 -13
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +13 -13
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/loadEnvFile.js +13 -13
- package/dist/wasm.js +4 -4
- package/package.json +8 -8
- package/dist/chunk-2DXAGCPS.js +0 -177
- package/dist/chunk-5XRQ7ONW.js +0 -122
- package/dist/chunk-QIVUAERL.js +0 -2202
- package/dist/chunk-QJZIYUVB.js +0 -110
- package/dist/chunk-TFSZCVKC.js +0 -166
- package/dist/chunk-V2VWODV3.js +0 -54
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +0 -132
|
@@ -26,11 +26,10 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export2(
|
|
29
|
+
var chunk_QTCIEQ4O_exports = {};
|
|
30
|
+
__export2(chunk_QTCIEQ4O_exports, {
|
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
33
|
-
checkYarnVersion: () => checkYarnVersion,
|
|
34
33
|
debug: () => debug5,
|
|
35
34
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
36
35
|
formatSchema: () => formatSchema,
|
|
@@ -56,7 +55,7 @@ __export2(chunk_VVOW6SAQ_exports, {
|
|
|
56
55
|
sendPanic: () => sendPanic,
|
|
57
56
|
skipIndex: () => skipIndex
|
|
58
57
|
});
|
|
59
|
-
module.exports = __toCommonJS2(
|
|
58
|
+
module.exports = __toCommonJS2(chunk_QTCIEQ4O_exports);
|
|
60
59
|
var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
|
|
61
60
|
var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
|
|
62
61
|
var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
|
|
@@ -64,7 +63,7 @@ var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
|
|
64
63
|
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
|
65
64
|
var import_chunk_KEBDP2C3 = require("./chunk-KEBDP2C3.js");
|
|
66
65
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
67
|
-
var
|
|
66
|
+
var import_chunk_D4MCOTL5 = require("./chunk-D4MCOTL5.js");
|
|
68
67
|
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
|
69
68
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
70
69
|
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
|
@@ -81,19 +80,17 @@ var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
|
|
|
81
80
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
|
82
81
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
|
83
82
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
83
|
+
var import_chunk_JHXUXGS2 = require("./chunk-JHXUXGS2.js");
|
|
84
|
+
var import_chunk_INEWQP2H = require("./chunk-INEWQP2H.js");
|
|
85
|
+
var import_chunk_JNJHLV4W = require("./chunk-JNJHLV4W.js");
|
|
86
|
+
var import_chunk_4O5QP2B2 = require("./chunk-4O5QP2B2.js");
|
|
88
87
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
89
88
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
90
|
-
var
|
|
89
|
+
var import_chunk_N2CJJE5H = require("./chunk-N2CJJE5H.js");
|
|
91
90
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
|
92
91
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
93
92
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
94
|
-
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
|
95
93
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
96
|
-
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
|
97
94
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
|
98
95
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
99
96
|
var import_chunk_4NFLAUKD = require("./chunk-4NFLAUKD.js");
|
|
@@ -2507,6 +2504,778 @@ var init_async = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
2507
2504
|
async_default = index;
|
|
2508
2505
|
}
|
|
2509
2506
|
});
|
|
2507
|
+
var require_polyfills = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2508
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
|
|
2509
|
+
"use strict";
|
|
2510
|
+
var constants2 = (0, import_chunk_WWAWV7DQ.__require)("constants");
|
|
2511
|
+
var origCwd = process.cwd;
|
|
2512
|
+
var cwd = null;
|
|
2513
|
+
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
2514
|
+
process.cwd = function() {
|
|
2515
|
+
if (!cwd)
|
|
2516
|
+
cwd = origCwd.call(process);
|
|
2517
|
+
return cwd;
|
|
2518
|
+
};
|
|
2519
|
+
try {
|
|
2520
|
+
process.cwd();
|
|
2521
|
+
} catch (er) {
|
|
2522
|
+
}
|
|
2523
|
+
if (typeof process.chdir === "function") {
|
|
2524
|
+
chdir = process.chdir;
|
|
2525
|
+
process.chdir = function(d2) {
|
|
2526
|
+
cwd = null;
|
|
2527
|
+
chdir.call(process, d2);
|
|
2528
|
+
};
|
|
2529
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
|
2530
|
+
}
|
|
2531
|
+
var chdir;
|
|
2532
|
+
module2.exports = patch;
|
|
2533
|
+
function patch(fs8) {
|
|
2534
|
+
if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
2535
|
+
patchLchmod(fs8);
|
|
2536
|
+
}
|
|
2537
|
+
if (!fs8.lutimes) {
|
|
2538
|
+
patchLutimes(fs8);
|
|
2539
|
+
}
|
|
2540
|
+
fs8.chown = chownFix(fs8.chown);
|
|
2541
|
+
fs8.fchown = chownFix(fs8.fchown);
|
|
2542
|
+
fs8.lchown = chownFix(fs8.lchown);
|
|
2543
|
+
fs8.chmod = chmodFix(fs8.chmod);
|
|
2544
|
+
fs8.fchmod = chmodFix(fs8.fchmod);
|
|
2545
|
+
fs8.lchmod = chmodFix(fs8.lchmod);
|
|
2546
|
+
fs8.chownSync = chownFixSync(fs8.chownSync);
|
|
2547
|
+
fs8.fchownSync = chownFixSync(fs8.fchownSync);
|
|
2548
|
+
fs8.lchownSync = chownFixSync(fs8.lchownSync);
|
|
2549
|
+
fs8.chmodSync = chmodFixSync(fs8.chmodSync);
|
|
2550
|
+
fs8.fchmodSync = chmodFixSync(fs8.fchmodSync);
|
|
2551
|
+
fs8.lchmodSync = chmodFixSync(fs8.lchmodSync);
|
|
2552
|
+
fs8.stat = statFix(fs8.stat);
|
|
2553
|
+
fs8.fstat = statFix(fs8.fstat);
|
|
2554
|
+
fs8.lstat = statFix(fs8.lstat);
|
|
2555
|
+
fs8.statSync = statFixSync(fs8.statSync);
|
|
2556
|
+
fs8.fstatSync = statFixSync(fs8.fstatSync);
|
|
2557
|
+
fs8.lstatSync = statFixSync(fs8.lstatSync);
|
|
2558
|
+
if (fs8.chmod && !fs8.lchmod) {
|
|
2559
|
+
fs8.lchmod = function(path8, mode, cb) {
|
|
2560
|
+
if (cb) process.nextTick(cb);
|
|
2561
|
+
};
|
|
2562
|
+
fs8.lchmodSync = function() {
|
|
2563
|
+
};
|
|
2564
|
+
}
|
|
2565
|
+
if (fs8.chown && !fs8.lchown) {
|
|
2566
|
+
fs8.lchown = function(path8, uid, gid, cb) {
|
|
2567
|
+
if (cb) process.nextTick(cb);
|
|
2568
|
+
};
|
|
2569
|
+
fs8.lchownSync = function() {
|
|
2570
|
+
};
|
|
2571
|
+
}
|
|
2572
|
+
if (platform === "win32") {
|
|
2573
|
+
fs8.rename = typeof fs8.rename !== "function" ? fs8.rename : function(fs$rename) {
|
|
2574
|
+
function rename(from, to, cb) {
|
|
2575
|
+
var start = Date.now();
|
|
2576
|
+
var backoff = 0;
|
|
2577
|
+
fs$rename(from, to, function CB(er) {
|
|
2578
|
+
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
2579
|
+
setTimeout(function() {
|
|
2580
|
+
fs8.stat(to, function(stater, st) {
|
|
2581
|
+
if (stater && stater.code === "ENOENT")
|
|
2582
|
+
fs$rename(from, to, CB);
|
|
2583
|
+
else
|
|
2584
|
+
cb(er);
|
|
2585
|
+
});
|
|
2586
|
+
}, backoff);
|
|
2587
|
+
if (backoff < 100)
|
|
2588
|
+
backoff += 10;
|
|
2589
|
+
return;
|
|
2590
|
+
}
|
|
2591
|
+
if (cb) cb(er);
|
|
2592
|
+
});
|
|
2593
|
+
}
|
|
2594
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
2595
|
+
return rename;
|
|
2596
|
+
}(fs8.rename);
|
|
2597
|
+
}
|
|
2598
|
+
fs8.read = typeof fs8.read !== "function" ? fs8.read : function(fs$read) {
|
|
2599
|
+
function read(fd, buffer, offset, length, position, callback_) {
|
|
2600
|
+
var callback;
|
|
2601
|
+
if (callback_ && typeof callback_ === "function") {
|
|
2602
|
+
var eagCounter = 0;
|
|
2603
|
+
callback = function(er, _2, __) {
|
|
2604
|
+
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
2605
|
+
eagCounter++;
|
|
2606
|
+
return fs$read.call(fs8, fd, buffer, offset, length, position, callback);
|
|
2607
|
+
}
|
|
2608
|
+
callback_.apply(this, arguments);
|
|
2609
|
+
};
|
|
2610
|
+
}
|
|
2611
|
+
return fs$read.call(fs8, fd, buffer, offset, length, position, callback);
|
|
2612
|
+
}
|
|
2613
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
2614
|
+
return read;
|
|
2615
|
+
}(fs8.read);
|
|
2616
|
+
fs8.readSync = typeof fs8.readSync !== "function" ? fs8.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
2617
|
+
return function(fd, buffer, offset, length, position) {
|
|
2618
|
+
var eagCounter = 0;
|
|
2619
|
+
while (true) {
|
|
2620
|
+
try {
|
|
2621
|
+
return fs$readSync.call(fs8, fd, buffer, offset, length, position);
|
|
2622
|
+
} catch (er) {
|
|
2623
|
+
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
2624
|
+
eagCounter++;
|
|
2625
|
+
continue;
|
|
2626
|
+
}
|
|
2627
|
+
throw er;
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
}(fs8.readSync);
|
|
2632
|
+
function patchLchmod(fs9) {
|
|
2633
|
+
fs9.lchmod = function(path8, mode, callback) {
|
|
2634
|
+
fs9.open(
|
|
2635
|
+
path8,
|
|
2636
|
+
constants2.O_WRONLY | constants2.O_SYMLINK,
|
|
2637
|
+
mode,
|
|
2638
|
+
function(err, fd) {
|
|
2639
|
+
if (err) {
|
|
2640
|
+
if (callback) callback(err);
|
|
2641
|
+
return;
|
|
2642
|
+
}
|
|
2643
|
+
fs9.fchmod(fd, mode, function(err2) {
|
|
2644
|
+
fs9.close(fd, function(err22) {
|
|
2645
|
+
if (callback) callback(err2 || err22);
|
|
2646
|
+
});
|
|
2647
|
+
});
|
|
2648
|
+
}
|
|
2649
|
+
);
|
|
2650
|
+
};
|
|
2651
|
+
fs9.lchmodSync = function(path8, mode) {
|
|
2652
|
+
var fd = fs9.openSync(path8, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
|
|
2653
|
+
var threw = true;
|
|
2654
|
+
var ret;
|
|
2655
|
+
try {
|
|
2656
|
+
ret = fs9.fchmodSync(fd, mode);
|
|
2657
|
+
threw = false;
|
|
2658
|
+
} finally {
|
|
2659
|
+
if (threw) {
|
|
2660
|
+
try {
|
|
2661
|
+
fs9.closeSync(fd);
|
|
2662
|
+
} catch (er) {
|
|
2663
|
+
}
|
|
2664
|
+
} else {
|
|
2665
|
+
fs9.closeSync(fd);
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
return ret;
|
|
2669
|
+
};
|
|
2670
|
+
}
|
|
2671
|
+
function patchLutimes(fs9) {
|
|
2672
|
+
if (constants2.hasOwnProperty("O_SYMLINK") && fs9.futimes) {
|
|
2673
|
+
fs9.lutimes = function(path8, at, mt, cb) {
|
|
2674
|
+
fs9.open(path8, constants2.O_SYMLINK, function(er, fd) {
|
|
2675
|
+
if (er) {
|
|
2676
|
+
if (cb) cb(er);
|
|
2677
|
+
return;
|
|
2678
|
+
}
|
|
2679
|
+
fs9.futimes(fd, at, mt, function(er2) {
|
|
2680
|
+
fs9.close(fd, function(er22) {
|
|
2681
|
+
if (cb) cb(er2 || er22);
|
|
2682
|
+
});
|
|
2683
|
+
});
|
|
2684
|
+
});
|
|
2685
|
+
};
|
|
2686
|
+
fs9.lutimesSync = function(path8, at, mt) {
|
|
2687
|
+
var fd = fs9.openSync(path8, constants2.O_SYMLINK);
|
|
2688
|
+
var ret;
|
|
2689
|
+
var threw = true;
|
|
2690
|
+
try {
|
|
2691
|
+
ret = fs9.futimesSync(fd, at, mt);
|
|
2692
|
+
threw = false;
|
|
2693
|
+
} finally {
|
|
2694
|
+
if (threw) {
|
|
2695
|
+
try {
|
|
2696
|
+
fs9.closeSync(fd);
|
|
2697
|
+
} catch (er) {
|
|
2698
|
+
}
|
|
2699
|
+
} else {
|
|
2700
|
+
fs9.closeSync(fd);
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
return ret;
|
|
2704
|
+
};
|
|
2705
|
+
} else if (fs9.futimes) {
|
|
2706
|
+
fs9.lutimes = function(_a, _b, _c, cb) {
|
|
2707
|
+
if (cb) process.nextTick(cb);
|
|
2708
|
+
};
|
|
2709
|
+
fs9.lutimesSync = function() {
|
|
2710
|
+
};
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
function chmodFix(orig) {
|
|
2714
|
+
if (!orig) return orig;
|
|
2715
|
+
return function(target, mode, cb) {
|
|
2716
|
+
return orig.call(fs8, target, mode, function(er) {
|
|
2717
|
+
if (chownErOk(er)) er = null;
|
|
2718
|
+
if (cb) cb.apply(this, arguments);
|
|
2719
|
+
});
|
|
2720
|
+
};
|
|
2721
|
+
}
|
|
2722
|
+
function chmodFixSync(orig) {
|
|
2723
|
+
if (!orig) return orig;
|
|
2724
|
+
return function(target, mode) {
|
|
2725
|
+
try {
|
|
2726
|
+
return orig.call(fs8, target, mode);
|
|
2727
|
+
} catch (er) {
|
|
2728
|
+
if (!chownErOk(er)) throw er;
|
|
2729
|
+
}
|
|
2730
|
+
};
|
|
2731
|
+
}
|
|
2732
|
+
function chownFix(orig) {
|
|
2733
|
+
if (!orig) return orig;
|
|
2734
|
+
return function(target, uid, gid, cb) {
|
|
2735
|
+
return orig.call(fs8, target, uid, gid, function(er) {
|
|
2736
|
+
if (chownErOk(er)) er = null;
|
|
2737
|
+
if (cb) cb.apply(this, arguments);
|
|
2738
|
+
});
|
|
2739
|
+
};
|
|
2740
|
+
}
|
|
2741
|
+
function chownFixSync(orig) {
|
|
2742
|
+
if (!orig) return orig;
|
|
2743
|
+
return function(target, uid, gid) {
|
|
2744
|
+
try {
|
|
2745
|
+
return orig.call(fs8, target, uid, gid);
|
|
2746
|
+
} catch (er) {
|
|
2747
|
+
if (!chownErOk(er)) throw er;
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
}
|
|
2751
|
+
function statFix(orig) {
|
|
2752
|
+
if (!orig) return orig;
|
|
2753
|
+
return function(target, options2, cb) {
|
|
2754
|
+
if (typeof options2 === "function") {
|
|
2755
|
+
cb = options2;
|
|
2756
|
+
options2 = null;
|
|
2757
|
+
}
|
|
2758
|
+
function callback(er, stats) {
|
|
2759
|
+
if (stats) {
|
|
2760
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
|
2761
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
|
2762
|
+
}
|
|
2763
|
+
if (cb) cb.apply(this, arguments);
|
|
2764
|
+
}
|
|
2765
|
+
return options2 ? orig.call(fs8, target, options2, callback) : orig.call(fs8, target, callback);
|
|
2766
|
+
};
|
|
2767
|
+
}
|
|
2768
|
+
function statFixSync(orig) {
|
|
2769
|
+
if (!orig) return orig;
|
|
2770
|
+
return function(target, options2) {
|
|
2771
|
+
var stats = options2 ? orig.call(fs8, target, options2) : orig.call(fs8, target);
|
|
2772
|
+
if (stats) {
|
|
2773
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
|
2774
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
|
2775
|
+
}
|
|
2776
|
+
return stats;
|
|
2777
|
+
};
|
|
2778
|
+
}
|
|
2779
|
+
function chownErOk(er) {
|
|
2780
|
+
if (!er)
|
|
2781
|
+
return true;
|
|
2782
|
+
if (er.code === "ENOSYS")
|
|
2783
|
+
return true;
|
|
2784
|
+
var nonroot = !process.getuid || process.getuid() !== 0;
|
|
2785
|
+
if (nonroot) {
|
|
2786
|
+
if (er.code === "EINVAL" || er.code === "EPERM")
|
|
2787
|
+
return true;
|
|
2788
|
+
}
|
|
2789
|
+
return false;
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
});
|
|
2794
|
+
var require_legacy_streams = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2795
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
2796
|
+
"use strict";
|
|
2797
|
+
var Stream = (0, import_chunk_WWAWV7DQ.__require)("stream").Stream;
|
|
2798
|
+
module2.exports = legacy;
|
|
2799
|
+
function legacy(fs8) {
|
|
2800
|
+
return {
|
|
2801
|
+
ReadStream,
|
|
2802
|
+
WriteStream
|
|
2803
|
+
};
|
|
2804
|
+
function ReadStream(path8, options2) {
|
|
2805
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path8, options2);
|
|
2806
|
+
Stream.call(this);
|
|
2807
|
+
var self2 = this;
|
|
2808
|
+
this.path = path8;
|
|
2809
|
+
this.fd = null;
|
|
2810
|
+
this.readable = true;
|
|
2811
|
+
this.paused = false;
|
|
2812
|
+
this.flags = "r";
|
|
2813
|
+
this.mode = 438;
|
|
2814
|
+
this.bufferSize = 64 * 1024;
|
|
2815
|
+
options2 = options2 || {};
|
|
2816
|
+
var keys = Object.keys(options2);
|
|
2817
|
+
for (var index2 = 0, length = keys.length; index2 < length; index2++) {
|
|
2818
|
+
var key = keys[index2];
|
|
2819
|
+
this[key] = options2[key];
|
|
2820
|
+
}
|
|
2821
|
+
if (this.encoding) this.setEncoding(this.encoding);
|
|
2822
|
+
if (this.start !== void 0) {
|
|
2823
|
+
if ("number" !== typeof this.start) {
|
|
2824
|
+
throw TypeError("start must be a Number");
|
|
2825
|
+
}
|
|
2826
|
+
if (this.end === void 0) {
|
|
2827
|
+
this.end = Infinity;
|
|
2828
|
+
} else if ("number" !== typeof this.end) {
|
|
2829
|
+
throw TypeError("end must be a Number");
|
|
2830
|
+
}
|
|
2831
|
+
if (this.start > this.end) {
|
|
2832
|
+
throw new Error("start must be <= end");
|
|
2833
|
+
}
|
|
2834
|
+
this.pos = this.start;
|
|
2835
|
+
}
|
|
2836
|
+
if (this.fd !== null) {
|
|
2837
|
+
process.nextTick(function() {
|
|
2838
|
+
self2._read();
|
|
2839
|
+
});
|
|
2840
|
+
return;
|
|
2841
|
+
}
|
|
2842
|
+
fs8.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
2843
|
+
if (err) {
|
|
2844
|
+
self2.emit("error", err);
|
|
2845
|
+
self2.readable = false;
|
|
2846
|
+
return;
|
|
2847
|
+
}
|
|
2848
|
+
self2.fd = fd;
|
|
2849
|
+
self2.emit("open", fd);
|
|
2850
|
+
self2._read();
|
|
2851
|
+
});
|
|
2852
|
+
}
|
|
2853
|
+
function WriteStream(path8, options2) {
|
|
2854
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path8, options2);
|
|
2855
|
+
Stream.call(this);
|
|
2856
|
+
this.path = path8;
|
|
2857
|
+
this.fd = null;
|
|
2858
|
+
this.writable = true;
|
|
2859
|
+
this.flags = "w";
|
|
2860
|
+
this.encoding = "binary";
|
|
2861
|
+
this.mode = 438;
|
|
2862
|
+
this.bytesWritten = 0;
|
|
2863
|
+
options2 = options2 || {};
|
|
2864
|
+
var keys = Object.keys(options2);
|
|
2865
|
+
for (var index2 = 0, length = keys.length; index2 < length; index2++) {
|
|
2866
|
+
var key = keys[index2];
|
|
2867
|
+
this[key] = options2[key];
|
|
2868
|
+
}
|
|
2869
|
+
if (this.start !== void 0) {
|
|
2870
|
+
if ("number" !== typeof this.start) {
|
|
2871
|
+
throw TypeError("start must be a Number");
|
|
2872
|
+
}
|
|
2873
|
+
if (this.start < 0) {
|
|
2874
|
+
throw new Error("start must be >= zero");
|
|
2875
|
+
}
|
|
2876
|
+
this.pos = this.start;
|
|
2877
|
+
}
|
|
2878
|
+
this.busy = false;
|
|
2879
|
+
this._queue = [];
|
|
2880
|
+
if (this.fd === null) {
|
|
2881
|
+
this._open = fs8.open;
|
|
2882
|
+
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
2883
|
+
this.flush();
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
});
|
|
2889
|
+
var require_clone = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2890
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) {
|
|
2891
|
+
"use strict";
|
|
2892
|
+
module2.exports = clone;
|
|
2893
|
+
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
|
2894
|
+
return obj.__proto__;
|
|
2895
|
+
};
|
|
2896
|
+
function clone(obj) {
|
|
2897
|
+
if (obj === null || typeof obj !== "object")
|
|
2898
|
+
return obj;
|
|
2899
|
+
if (obj instanceof Object)
|
|
2900
|
+
var copy = { __proto__: getPrototypeOf(obj) };
|
|
2901
|
+
else
|
|
2902
|
+
var copy = /* @__PURE__ */ Object.create(null);
|
|
2903
|
+
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
|
2904
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
|
2905
|
+
});
|
|
2906
|
+
return copy;
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
});
|
|
2910
|
+
var require_graceful_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2911
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
2912
|
+
"use strict";
|
|
2913
|
+
var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
|
2914
|
+
var polyfills = require_polyfills();
|
|
2915
|
+
var legacy = require_legacy_streams();
|
|
2916
|
+
var clone = require_clone();
|
|
2917
|
+
var util = (0, import_chunk_WWAWV7DQ.__require)("util");
|
|
2918
|
+
var gracefulQueue;
|
|
2919
|
+
var previousSymbol;
|
|
2920
|
+
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
|
2921
|
+
gracefulQueue = Symbol.for("graceful-fs.queue");
|
|
2922
|
+
previousSymbol = Symbol.for("graceful-fs.previous");
|
|
2923
|
+
} else {
|
|
2924
|
+
gracefulQueue = "___graceful-fs.queue";
|
|
2925
|
+
previousSymbol = "___graceful-fs.previous";
|
|
2926
|
+
}
|
|
2927
|
+
function noop() {
|
|
2928
|
+
}
|
|
2929
|
+
function publishQueue(context, queue3) {
|
|
2930
|
+
Object.defineProperty(context, gracefulQueue, {
|
|
2931
|
+
get: function() {
|
|
2932
|
+
return queue3;
|
|
2933
|
+
}
|
|
2934
|
+
});
|
|
2935
|
+
}
|
|
2936
|
+
var debug8 = noop;
|
|
2937
|
+
if (util.debuglog)
|
|
2938
|
+
debug8 = util.debuglog("gfs4");
|
|
2939
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
2940
|
+
debug8 = function() {
|
|
2941
|
+
var m2 = util.format.apply(util, arguments);
|
|
2942
|
+
m2 = "GFS4: " + m2.split(/\n/).join("\nGFS4: ");
|
|
2943
|
+
console.error(m2);
|
|
2944
|
+
};
|
|
2945
|
+
if (!fs8[gracefulQueue]) {
|
|
2946
|
+
queue2 = global[gracefulQueue] || [];
|
|
2947
|
+
publishQueue(fs8, queue2);
|
|
2948
|
+
fs8.close = function(fs$close) {
|
|
2949
|
+
function close(fd, cb) {
|
|
2950
|
+
return fs$close.call(fs8, fd, function(err) {
|
|
2951
|
+
if (!err) {
|
|
2952
|
+
resetQueue();
|
|
2953
|
+
}
|
|
2954
|
+
if (typeof cb === "function")
|
|
2955
|
+
cb.apply(this, arguments);
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2958
|
+
Object.defineProperty(close, previousSymbol, {
|
|
2959
|
+
value: fs$close
|
|
2960
|
+
});
|
|
2961
|
+
return close;
|
|
2962
|
+
}(fs8.close);
|
|
2963
|
+
fs8.closeSync = function(fs$closeSync) {
|
|
2964
|
+
function closeSync(fd) {
|
|
2965
|
+
fs$closeSync.apply(fs8, arguments);
|
|
2966
|
+
resetQueue();
|
|
2967
|
+
}
|
|
2968
|
+
Object.defineProperty(closeSync, previousSymbol, {
|
|
2969
|
+
value: fs$closeSync
|
|
2970
|
+
});
|
|
2971
|
+
return closeSync;
|
|
2972
|
+
}(fs8.closeSync);
|
|
2973
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
2974
|
+
process.on("exit", function() {
|
|
2975
|
+
debug8(fs8[gracefulQueue]);
|
|
2976
|
+
(0, import_chunk_WWAWV7DQ.__require)("assert").equal(fs8[gracefulQueue].length, 0);
|
|
2977
|
+
});
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
var queue2;
|
|
2981
|
+
if (!global[gracefulQueue]) {
|
|
2982
|
+
publishQueue(global, fs8[gracefulQueue]);
|
|
2983
|
+
}
|
|
2984
|
+
module2.exports = patch(clone(fs8));
|
|
2985
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs8.__patched) {
|
|
2986
|
+
module2.exports = patch(fs8);
|
|
2987
|
+
fs8.__patched = true;
|
|
2988
|
+
}
|
|
2989
|
+
function patch(fs9) {
|
|
2990
|
+
polyfills(fs9);
|
|
2991
|
+
fs9.gracefulify = patch;
|
|
2992
|
+
fs9.createReadStream = createReadStream;
|
|
2993
|
+
fs9.createWriteStream = createWriteStream;
|
|
2994
|
+
var fs$readFile = fs9.readFile;
|
|
2995
|
+
fs9.readFile = readFile2;
|
|
2996
|
+
function readFile2(path8, options2, cb) {
|
|
2997
|
+
if (typeof options2 === "function")
|
|
2998
|
+
cb = options2, options2 = null;
|
|
2999
|
+
return go$readFile(path8, options2, cb);
|
|
3000
|
+
function go$readFile(path9, options3, cb2, startTime) {
|
|
3001
|
+
return fs$readFile(path9, options3, function(err) {
|
|
3002
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3003
|
+
enqueue([go$readFile, [path9, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3004
|
+
else {
|
|
3005
|
+
if (typeof cb2 === "function")
|
|
3006
|
+
cb2.apply(this, arguments);
|
|
3007
|
+
}
|
|
3008
|
+
});
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
var fs$writeFile = fs9.writeFile;
|
|
3012
|
+
fs9.writeFile = writeFile;
|
|
3013
|
+
function writeFile(path8, data, options2, cb) {
|
|
3014
|
+
if (typeof options2 === "function")
|
|
3015
|
+
cb = options2, options2 = null;
|
|
3016
|
+
return go$writeFile(path8, data, options2, cb);
|
|
3017
|
+
function go$writeFile(path9, data2, options3, cb2, startTime) {
|
|
3018
|
+
return fs$writeFile(path9, data2, options3, function(err) {
|
|
3019
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3020
|
+
enqueue([go$writeFile, [path9, data2, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3021
|
+
else {
|
|
3022
|
+
if (typeof cb2 === "function")
|
|
3023
|
+
cb2.apply(this, arguments);
|
|
3024
|
+
}
|
|
3025
|
+
});
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
var fs$appendFile = fs9.appendFile;
|
|
3029
|
+
if (fs$appendFile)
|
|
3030
|
+
fs9.appendFile = appendFile;
|
|
3031
|
+
function appendFile(path8, data, options2, cb) {
|
|
3032
|
+
if (typeof options2 === "function")
|
|
3033
|
+
cb = options2, options2 = null;
|
|
3034
|
+
return go$appendFile(path8, data, options2, cb);
|
|
3035
|
+
function go$appendFile(path9, data2, options3, cb2, startTime) {
|
|
3036
|
+
return fs$appendFile(path9, data2, options3, function(err) {
|
|
3037
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3038
|
+
enqueue([go$appendFile, [path9, data2, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3039
|
+
else {
|
|
3040
|
+
if (typeof cb2 === "function")
|
|
3041
|
+
cb2.apply(this, arguments);
|
|
3042
|
+
}
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
var fs$copyFile = fs9.copyFile;
|
|
3047
|
+
if (fs$copyFile)
|
|
3048
|
+
fs9.copyFile = copyFile;
|
|
3049
|
+
function copyFile(src, dest, flags, cb) {
|
|
3050
|
+
if (typeof flags === "function") {
|
|
3051
|
+
cb = flags;
|
|
3052
|
+
flags = 0;
|
|
3053
|
+
}
|
|
3054
|
+
return go$copyFile(src, dest, flags, cb);
|
|
3055
|
+
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
|
3056
|
+
return fs$copyFile(src2, dest2, flags2, function(err) {
|
|
3057
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3058
|
+
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3059
|
+
else {
|
|
3060
|
+
if (typeof cb2 === "function")
|
|
3061
|
+
cb2.apply(this, arguments);
|
|
3062
|
+
}
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
var fs$readdir = fs9.readdir;
|
|
3067
|
+
fs9.readdir = readdir;
|
|
3068
|
+
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
3069
|
+
function readdir(path8, options2, cb) {
|
|
3070
|
+
if (typeof options2 === "function")
|
|
3071
|
+
cb = options2, options2 = null;
|
|
3072
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path9, options3, cb2, startTime) {
|
|
3073
|
+
return fs$readdir(path9, fs$readdirCallback(
|
|
3074
|
+
path9,
|
|
3075
|
+
options3,
|
|
3076
|
+
cb2,
|
|
3077
|
+
startTime
|
|
3078
|
+
));
|
|
3079
|
+
} : function go$readdir2(path9, options3, cb2, startTime) {
|
|
3080
|
+
return fs$readdir(path9, options3, fs$readdirCallback(
|
|
3081
|
+
path9,
|
|
3082
|
+
options3,
|
|
3083
|
+
cb2,
|
|
3084
|
+
startTime
|
|
3085
|
+
));
|
|
3086
|
+
};
|
|
3087
|
+
return go$readdir(path8, options2, cb);
|
|
3088
|
+
function fs$readdirCallback(path9, options3, cb2, startTime) {
|
|
3089
|
+
return function(err, files) {
|
|
3090
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3091
|
+
enqueue([
|
|
3092
|
+
go$readdir,
|
|
3093
|
+
[path9, options3, cb2],
|
|
3094
|
+
err,
|
|
3095
|
+
startTime || Date.now(),
|
|
3096
|
+
Date.now()
|
|
3097
|
+
]);
|
|
3098
|
+
else {
|
|
3099
|
+
if (files && files.sort)
|
|
3100
|
+
files.sort();
|
|
3101
|
+
if (typeof cb2 === "function")
|
|
3102
|
+
cb2.call(this, err, files);
|
|
3103
|
+
}
|
|
3104
|
+
};
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
if (process.version.substr(0, 4) === "v0.8") {
|
|
3108
|
+
var legStreams = legacy(fs9);
|
|
3109
|
+
ReadStream = legStreams.ReadStream;
|
|
3110
|
+
WriteStream = legStreams.WriteStream;
|
|
3111
|
+
}
|
|
3112
|
+
var fs$ReadStream = fs9.ReadStream;
|
|
3113
|
+
if (fs$ReadStream) {
|
|
3114
|
+
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
3115
|
+
ReadStream.prototype.open = ReadStream$open;
|
|
3116
|
+
}
|
|
3117
|
+
var fs$WriteStream = fs9.WriteStream;
|
|
3118
|
+
if (fs$WriteStream) {
|
|
3119
|
+
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
3120
|
+
WriteStream.prototype.open = WriteStream$open;
|
|
3121
|
+
}
|
|
3122
|
+
Object.defineProperty(fs9, "ReadStream", {
|
|
3123
|
+
get: function() {
|
|
3124
|
+
return ReadStream;
|
|
3125
|
+
},
|
|
3126
|
+
set: function(val) {
|
|
3127
|
+
ReadStream = val;
|
|
3128
|
+
},
|
|
3129
|
+
enumerable: true,
|
|
3130
|
+
configurable: true
|
|
3131
|
+
});
|
|
3132
|
+
Object.defineProperty(fs9, "WriteStream", {
|
|
3133
|
+
get: function() {
|
|
3134
|
+
return WriteStream;
|
|
3135
|
+
},
|
|
3136
|
+
set: function(val) {
|
|
3137
|
+
WriteStream = val;
|
|
3138
|
+
},
|
|
3139
|
+
enumerable: true,
|
|
3140
|
+
configurable: true
|
|
3141
|
+
});
|
|
3142
|
+
var FileReadStream = ReadStream;
|
|
3143
|
+
Object.defineProperty(fs9, "FileReadStream", {
|
|
3144
|
+
get: function() {
|
|
3145
|
+
return FileReadStream;
|
|
3146
|
+
},
|
|
3147
|
+
set: function(val) {
|
|
3148
|
+
FileReadStream = val;
|
|
3149
|
+
},
|
|
3150
|
+
enumerable: true,
|
|
3151
|
+
configurable: true
|
|
3152
|
+
});
|
|
3153
|
+
var FileWriteStream = WriteStream;
|
|
3154
|
+
Object.defineProperty(fs9, "FileWriteStream", {
|
|
3155
|
+
get: function() {
|
|
3156
|
+
return FileWriteStream;
|
|
3157
|
+
},
|
|
3158
|
+
set: function(val) {
|
|
3159
|
+
FileWriteStream = val;
|
|
3160
|
+
},
|
|
3161
|
+
enumerable: true,
|
|
3162
|
+
configurable: true
|
|
3163
|
+
});
|
|
3164
|
+
function ReadStream(path8, options2) {
|
|
3165
|
+
if (this instanceof ReadStream)
|
|
3166
|
+
return fs$ReadStream.apply(this, arguments), this;
|
|
3167
|
+
else
|
|
3168
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
|
3169
|
+
}
|
|
3170
|
+
function ReadStream$open() {
|
|
3171
|
+
var that = this;
|
|
3172
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
3173
|
+
if (err) {
|
|
3174
|
+
if (that.autoClose)
|
|
3175
|
+
that.destroy();
|
|
3176
|
+
that.emit("error", err);
|
|
3177
|
+
} else {
|
|
3178
|
+
that.fd = fd;
|
|
3179
|
+
that.emit("open", fd);
|
|
3180
|
+
that.read();
|
|
3181
|
+
}
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
function WriteStream(path8, options2) {
|
|
3185
|
+
if (this instanceof WriteStream)
|
|
3186
|
+
return fs$WriteStream.apply(this, arguments), this;
|
|
3187
|
+
else
|
|
3188
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
3189
|
+
}
|
|
3190
|
+
function WriteStream$open() {
|
|
3191
|
+
var that = this;
|
|
3192
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
3193
|
+
if (err) {
|
|
3194
|
+
that.destroy();
|
|
3195
|
+
that.emit("error", err);
|
|
3196
|
+
} else {
|
|
3197
|
+
that.fd = fd;
|
|
3198
|
+
that.emit("open", fd);
|
|
3199
|
+
}
|
|
3200
|
+
});
|
|
3201
|
+
}
|
|
3202
|
+
function createReadStream(path8, options2) {
|
|
3203
|
+
return new fs9.ReadStream(path8, options2);
|
|
3204
|
+
}
|
|
3205
|
+
function createWriteStream(path8, options2) {
|
|
3206
|
+
return new fs9.WriteStream(path8, options2);
|
|
3207
|
+
}
|
|
3208
|
+
var fs$open = fs9.open;
|
|
3209
|
+
fs9.open = open;
|
|
3210
|
+
function open(path8, flags, mode, cb) {
|
|
3211
|
+
if (typeof mode === "function")
|
|
3212
|
+
cb = mode, mode = null;
|
|
3213
|
+
return go$open(path8, flags, mode, cb);
|
|
3214
|
+
function go$open(path9, flags2, mode2, cb2, startTime) {
|
|
3215
|
+
return fs$open(path9, flags2, mode2, function(err, fd) {
|
|
3216
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3217
|
+
enqueue([go$open, [path9, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3218
|
+
else {
|
|
3219
|
+
if (typeof cb2 === "function")
|
|
3220
|
+
cb2.apply(this, arguments);
|
|
3221
|
+
}
|
|
3222
|
+
});
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
return fs9;
|
|
3226
|
+
}
|
|
3227
|
+
function enqueue(elem) {
|
|
3228
|
+
debug8("ENQUEUE", elem[0].name, elem[1]);
|
|
3229
|
+
fs8[gracefulQueue].push(elem);
|
|
3230
|
+
retry2();
|
|
3231
|
+
}
|
|
3232
|
+
var retryTimer;
|
|
3233
|
+
function resetQueue() {
|
|
3234
|
+
var now = Date.now();
|
|
3235
|
+
for (var i = 0; i < fs8[gracefulQueue].length; ++i) {
|
|
3236
|
+
if (fs8[gracefulQueue][i].length > 2) {
|
|
3237
|
+
fs8[gracefulQueue][i][3] = now;
|
|
3238
|
+
fs8[gracefulQueue][i][4] = now;
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
retry2();
|
|
3242
|
+
}
|
|
3243
|
+
function retry2() {
|
|
3244
|
+
clearTimeout(retryTimer);
|
|
3245
|
+
retryTimer = void 0;
|
|
3246
|
+
if (fs8[gracefulQueue].length === 0)
|
|
3247
|
+
return;
|
|
3248
|
+
var elem = fs8[gracefulQueue].shift();
|
|
3249
|
+
var fn = elem[0];
|
|
3250
|
+
var args = elem[1];
|
|
3251
|
+
var err = elem[2];
|
|
3252
|
+
var startTime = elem[3];
|
|
3253
|
+
var lastTime = elem[4];
|
|
3254
|
+
if (startTime === void 0) {
|
|
3255
|
+
debug8("RETRY", fn.name, args);
|
|
3256
|
+
fn.apply(null, args);
|
|
3257
|
+
} else if (Date.now() - startTime >= 6e4) {
|
|
3258
|
+
debug8("TIMEOUT", fn.name, args);
|
|
3259
|
+
var cb = args.pop();
|
|
3260
|
+
if (typeof cb === "function")
|
|
3261
|
+
cb.call(null, err);
|
|
3262
|
+
} else {
|
|
3263
|
+
var sinceAttempt = Date.now() - lastTime;
|
|
3264
|
+
var sinceStart = Math.max(lastTime - startTime, 1);
|
|
3265
|
+
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
|
3266
|
+
if (sinceAttempt >= desiredDelay) {
|
|
3267
|
+
debug8("RETRY", fn.name, args);
|
|
3268
|
+
fn.apply(null, args.concat([startTime]));
|
|
3269
|
+
} else {
|
|
3270
|
+
fs8[gracefulQueue].push(elem);
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
if (retryTimer === void 0) {
|
|
3274
|
+
retryTimer = setTimeout(retry2, 0);
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
});
|
|
2510
3279
|
var require_process_nextick_args = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2511
3280
|
"../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js"(exports2, module2) {
|
|
2512
3281
|
"use strict";
|
|
@@ -8544,7 +9313,7 @@ var require_isPlainObject = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
8544
9313
|
var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8545
9314
|
"../../node_modules/.pnpm/archiver-utils@4.0.1/node_modules/archiver-utils/file.js"(exports2, module2) {
|
|
8546
9315
|
"use strict";
|
|
8547
|
-
var fs8 =
|
|
9316
|
+
var fs8 = require_graceful_fs();
|
|
8548
9317
|
var path8 = (0, import_chunk_WWAWV7DQ.__require)("path");
|
|
8549
9318
|
var flatten = require_flatten();
|
|
8550
9319
|
var difference = require_difference();
|
|
@@ -8696,7 +9465,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
8696
9465
|
var require_archiver_utils = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8697
9466
|
"../../node_modules/.pnpm/archiver-utils@4.0.1/node_modules/archiver-utils/index.js"(exports2, module2) {
|
|
8698
9467
|
"use strict";
|
|
8699
|
-
var fs8 =
|
|
9468
|
+
var fs8 = require_graceful_fs();
|
|
8700
9469
|
var path8 = (0, import_chunk_WWAWV7DQ.__require)("path");
|
|
8701
9470
|
var lazystream = require_lazystream();
|
|
8702
9471
|
var normalizePath = require_normalize_path();
|
|
@@ -14707,7 +15476,6 @@ var require_tmp = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
14707
15476
|
}
|
|
14708
15477
|
});
|
|
14709
15478
|
var import_find_up = (0, import_chunk_WWAWV7DQ.__toESM)(require_find_up());
|
|
14710
|
-
var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
|
|
14711
15479
|
var readFile = (0, import_util.promisify)(import_fs3.default.readFile);
|
|
14712
15480
|
var stat = (0, import_util.promisify)(import_fs3.default.stat);
|
|
14713
15481
|
var debug2 = (0, import_debug3.Debug)("prisma:getSchema");
|
|
@@ -14746,7 +15514,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
|
14746
15514
|
}
|
|
14747
15515
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
|
14748
15516
|
debug2("Loading config");
|
|
14749
|
-
const config2 = await (0,
|
|
15517
|
+
const config2 = await (0, import_chunk_JNJHLV4W.getConfig)({
|
|
14750
15518
|
datamodel: files,
|
|
14751
15519
|
ignoreEnvVarErrors: true
|
|
14752
15520
|
});
|
|
@@ -14813,14 +15581,9 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
|
|
|
14813
15581
|
if (defaultResult.ok) {
|
|
14814
15582
|
return defaultResult;
|
|
14815
15583
|
}
|
|
14816
|
-
const yarnResult = await getSchemaFromYarn1Workspace(cwd, defaultResult.error.failures);
|
|
14817
|
-
if (yarnResult.ok) {
|
|
14818
|
-
return yarnResult;
|
|
14819
|
-
}
|
|
14820
|
-
const finalError = yarnResult.error.kind === "Yarn1WorkspaceSchemaNotFound" ? defaultResult.error : yarnResult.error;
|
|
14821
15584
|
return {
|
|
14822
15585
|
ok: false,
|
|
14823
|
-
error:
|
|
15586
|
+
error: defaultResult.error
|
|
14824
15587
|
};
|
|
14825
15588
|
}
|
|
14826
15589
|
function renderLookupError(error) {
|
|
@@ -14895,47 +15658,6 @@ async function getSchemaFromPackageJson(cwd) {
|
|
|
14895
15658
|
}
|
|
14896
15659
|
return lookupResult;
|
|
14897
15660
|
}
|
|
14898
|
-
async function getSchemaFromYarn1Workspace(cwd, pastFailures) {
|
|
14899
|
-
if (!process.env.npm_config_user_agent?.includes("yarn")) {
|
|
14900
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
|
14901
|
-
}
|
|
14902
|
-
let workspaces;
|
|
14903
|
-
try {
|
|
14904
|
-
const { stdout: version3 } = await import_execa.default.command("yarn --version", {
|
|
14905
|
-
cwd
|
|
14906
|
-
});
|
|
14907
|
-
if (version3.startsWith("2")) {
|
|
14908
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
|
14909
|
-
}
|
|
14910
|
-
const { stdout } = await import_execa.default.command("yarn workspaces info --json", {
|
|
14911
|
-
cwd
|
|
14912
|
-
});
|
|
14913
|
-
const json = getJson(stdout);
|
|
14914
|
-
workspaces = Object.values(json);
|
|
14915
|
-
} catch {
|
|
14916
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
|
14917
|
-
}
|
|
14918
|
-
const workspaceRootDir = await findWorkspaceRoot(cwd);
|
|
14919
|
-
if (!workspaceRootDir) {
|
|
14920
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
|
14921
|
-
}
|
|
14922
|
-
for (const workspace of workspaces) {
|
|
14923
|
-
const workspacePath = import_path2.default.join(workspaceRootDir, workspace.location);
|
|
14924
|
-
const workspaceSchema = await tryWorkspacePath(workspacePath, pastFailures);
|
|
14925
|
-
if (workspaceSchema.ok) {
|
|
14926
|
-
return workspaceSchema;
|
|
14927
|
-
}
|
|
14928
|
-
}
|
|
14929
|
-
const rootPathSchema = await tryWorkspacePath(workspaceRootDir, pastFailures);
|
|
14930
|
-
return rootPathSchema;
|
|
14931
|
-
}
|
|
14932
|
-
async function tryWorkspacePath(cwd, pastFailures) {
|
|
14933
|
-
const pkgJson = await getSchemaFromPackageJson(cwd);
|
|
14934
|
-
if (pkgJson.ok) {
|
|
14935
|
-
return pkgJson;
|
|
14936
|
-
}
|
|
14937
|
-
return getDefaultSchema(cwd, pastFailures);
|
|
14938
|
-
}
|
|
14939
15661
|
async function getDefaultSchema(cwd, failures = []) {
|
|
14940
15662
|
const schemaPrisma = {
|
|
14941
15663
|
schemaPath: {
|
|
@@ -15014,44 +15736,6 @@ async function getSchema(schemaPathFromArgs) {
|
|
|
15014
15736
|
const schemaPathResult = await getSchemaWithPath(schemaPathFromArgs);
|
|
15015
15737
|
return schemaPathResult.schemas;
|
|
15016
15738
|
}
|
|
15017
|
-
function getJson(stdout) {
|
|
15018
|
-
const firstCurly = stdout.indexOf("{");
|
|
15019
|
-
const lastCurly = stdout.lastIndexOf("}");
|
|
15020
|
-
const sliced = stdout.slice(firstCurly, lastCurly + 1);
|
|
15021
|
-
return JSON.parse(sliced);
|
|
15022
|
-
}
|
|
15023
|
-
function isPkgJsonWorkspaceRoot(pkgJson) {
|
|
15024
|
-
const workspaces = pkgJson.workspaces;
|
|
15025
|
-
if (!workspaces) {
|
|
15026
|
-
return false;
|
|
15027
|
-
}
|
|
15028
|
-
return Array.isArray(workspaces) || workspaces.packages !== void 0;
|
|
15029
|
-
}
|
|
15030
|
-
async function isNearestPkgJsonWorkspaceRoot(cwd) {
|
|
15031
|
-
const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
|
|
15032
|
-
if (!pkgJson) {
|
|
15033
|
-
return null;
|
|
15034
|
-
}
|
|
15035
|
-
return {
|
|
15036
|
-
isRoot: isPkgJsonWorkspaceRoot(pkgJson.packageJson),
|
|
15037
|
-
path: pkgJson.path
|
|
15038
|
-
};
|
|
15039
|
-
}
|
|
15040
|
-
async function findWorkspaceRoot(cwd) {
|
|
15041
|
-
let pkgJson = await isNearestPkgJsonWorkspaceRoot(cwd);
|
|
15042
|
-
if (!pkgJson) {
|
|
15043
|
-
return null;
|
|
15044
|
-
}
|
|
15045
|
-
if (pkgJson.isRoot === true) {
|
|
15046
|
-
return import_path2.default.dirname(pkgJson.path);
|
|
15047
|
-
}
|
|
15048
|
-
const pkgJsonParentDir = import_path2.default.dirname(import_path2.default.dirname(pkgJson.path));
|
|
15049
|
-
pkgJson = await isNearestPkgJsonWorkspaceRoot(pkgJsonParentDir);
|
|
15050
|
-
if (!pkgJson || pkgJson.isRoot === false) {
|
|
15051
|
-
return null;
|
|
15052
|
-
}
|
|
15053
|
-
return import_path2.default.dirname(pkgJson.path);
|
|
15054
|
-
}
|
|
15055
15739
|
var debug3 = (0, import_debug2.default)("prisma:loadEnv");
|
|
15056
15740
|
async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
|
|
15057
15741
|
const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
|
|
@@ -15138,8 +15822,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
|
15138
15822
|
if (argName.includes("schema")) {
|
|
15139
15823
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
|
15140
15824
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
|
15141
|
-
const config2 = await (0,
|
|
15142
|
-
const url = (0,
|
|
15825
|
+
const config2 = await (0, import_chunk_JNJHLV4W.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
|
15826
|
+
const url = (0, import_chunk_JNJHLV4W.resolveUrl)((0, import_chunk_JNJHLV4W.getEffectiveUrl)(config2.datasources[0]));
|
|
15143
15827
|
if (url?.startsWith("prisma://")) {
|
|
15144
15828
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
|
15145
15829
|
}
|
|
@@ -15186,42 +15870,10 @@ async function checkTypeScriptVersion() {
|
|
|
15186
15870
|
} catch (e) {
|
|
15187
15871
|
}
|
|
15188
15872
|
}
|
|
15189
|
-
function checkYarnVersion() {
|
|
15190
|
-
if (process.env.npm_config_user_agent) {
|
|
15191
|
-
const match = parseUserAgentString(process.env.npm_config_user_agent);
|
|
15192
|
-
if (match) {
|
|
15193
|
-
const { agent, major, minor, patch } = match;
|
|
15194
|
-
if (agent === "yarn" && major === 1) {
|
|
15195
|
-
const currentYarnVersion = `${major}.${minor}.${patch}`;
|
|
15196
|
-
const minYarnVersion = "1.19.2";
|
|
15197
|
-
if ((0, import_chunk_EUTJYQDW.semverLt)(currentYarnVersion, minYarnVersion)) {
|
|
15198
|
-
import_chunk_AZNLB67U.logger_exports.warn(
|
|
15199
|
-
`Your ${(0, import_chunk_PG5FDKSF.bold)("yarn")} has version ${currentYarnVersion}, which is outdated. Please update it to ${(0, import_chunk_PG5FDKSF.bold)(
|
|
15200
|
-
minYarnVersion
|
|
15201
|
-
)} or ${(0, import_chunk_PG5FDKSF.bold)("newer")} in order to use Prisma.`
|
|
15202
|
-
);
|
|
15203
|
-
}
|
|
15204
|
-
}
|
|
15205
|
-
}
|
|
15206
|
-
}
|
|
15207
|
-
}
|
|
15208
|
-
function parseUserAgentString(str) {
|
|
15209
|
-
const userAgentRegex = /(\w+)\/(\d+)\.(\d+)\.(\d+)/;
|
|
15210
|
-
const match = userAgentRegex.exec(str);
|
|
15211
|
-
if (match) {
|
|
15212
|
-
const agent = match[1];
|
|
15213
|
-
const major = parseInt(match[2]);
|
|
15214
|
-
const minor = parseInt(match[3]);
|
|
15215
|
-
const patch = parseInt(match[4]);
|
|
15216
|
-
return { agent, major, minor, patch };
|
|
15217
|
-
}
|
|
15218
|
-
return null;
|
|
15219
|
-
}
|
|
15220
15873
|
var debug5 = (0, import_debug5.default)("prisma:generator");
|
|
15221
15874
|
async function prismaClientResolver(baseDir, version3) {
|
|
15222
15875
|
let prismaClientDir = await (0, import_chunk_KEBDP2C3.findPrismaClientDir)(baseDir);
|
|
15223
15876
|
debug5("baseDir", baseDir);
|
|
15224
|
-
checkYarnVersion();
|
|
15225
15877
|
await checkTypeScriptVersion();
|
|
15226
15878
|
if (!prismaClientDir && !process.env.PRISMA_GENERATE_SKIP_AUTOINSTALL) {
|
|
15227
15879
|
let projectRoot = (0, import_chunk_J77ZIDXB.longestCommonPathPrefix)(baseDir, process.cwd());
|
|
@@ -15343,7 +15995,7 @@ async function getGenerators(options) {
|
|
|
15343
15995
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
|
15344
15996
|
}
|
|
15345
15997
|
}
|
|
15346
|
-
const config = await (0,
|
|
15998
|
+
const config = await (0, import_chunk_JNJHLV4W.getConfig)({
|
|
15347
15999
|
datamodel: schemas,
|
|
15348
16000
|
datamodelPath: schemaPath,
|
|
15349
16001
|
prismaPath,
|
|
@@ -15354,7 +16006,7 @@ async function getGenerators(options) {
|
|
|
15354
16006
|
}
|
|
15355
16007
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
|
15356
16008
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
|
15357
|
-
const dmmf = await (0,
|
|
16009
|
+
const dmmf = await (0, import_chunk_4O5QP2B2.getDMMF)({
|
|
15358
16010
|
datamodel: schemas,
|
|
15359
16011
|
datamodelPath: schemaPath,
|
|
15360
16012
|
prismaPath,
|
|
@@ -15415,7 +16067,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
|
15415
16067
|
fromEnvVar: "null"
|
|
15416
16068
|
};
|
|
15417
16069
|
}
|
|
15418
|
-
const datamodel = (0,
|
|
16070
|
+
const datamodel = (0, import_chunk_INEWQP2H.mergeSchemas)({ schemas });
|
|
15419
16071
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
|
15420
16072
|
const options2 = {
|
|
15421
16073
|
datamodel,
|
|
@@ -15482,7 +16134,7 @@ generator gen {
|
|
|
15482
16134
|
}
|
|
15483
16135
|
}
|
|
15484
16136
|
debug6("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
15485
|
-
const binaryPathsByVersion = await (0,
|
|
16137
|
+
const binaryPathsByVersion = await (0, import_chunk_D4MCOTL5.getBinaryPathsByVersion)({
|
|
15486
16138
|
neededVersions,
|
|
15487
16139
|
binaryTarget,
|
|
15488
16140
|
version,
|
|
@@ -15498,7 +16150,7 @@ generator gen {
|
|
|
15498
16150
|
debug6({ generatorBinaryPaths });
|
|
15499
16151
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
15500
16152
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
15501
|
-
const customDmmf = await (0,
|
|
16153
|
+
const customDmmf = await (0, import_chunk_4O5QP2B2.getDMMF)({
|
|
15502
16154
|
datamodel: schemas,
|
|
15503
16155
|
datamodelPath: schemaPath,
|
|
15504
16156
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
|
@@ -15796,7 +16448,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
15796
16448
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
15797
16449
|
handleFormatPanic(
|
|
15798
16450
|
() => {
|
|
15799
|
-
|
|
16451
|
+
import_chunk_N2CJJE5H.prismaSchemaWasm.debug_panic();
|
|
15800
16452
|
},
|
|
15801
16453
|
{ schemas: schemas2 }
|
|
15802
16454
|
);
|
|
@@ -15816,12 +16468,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
15816
16468
|
() => {
|
|
15817
16469
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
|
15818
16470
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
15819
|
-
const lintDiagnostics2 = (0,
|
|
16471
|
+
const lintDiagnostics2 = (0, import_chunk_JHXUXGS2.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
15820
16472
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
15821
16473
|
},
|
|
15822
16474
|
{ schemas: schemas2 }
|
|
15823
16475
|
);
|
|
15824
|
-
const lintWarnings = (0,
|
|
16476
|
+
const lintWarnings = (0, import_chunk_JHXUXGS2.getLintWarningsAsText)(lintDiagnostics);
|
|
15825
16477
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
|
15826
16478
|
console.warn(lintWarnings);
|
|
15827
16479
|
}
|
|
@@ -15851,7 +16503,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
|
15851
16503
|
}
|
|
15852
16504
|
}
|
|
15853
16505
|
function formatWasm(schema, documentFormattingParams) {
|
|
15854
|
-
const formattedSchema =
|
|
16506
|
+
const formattedSchema = import_chunk_N2CJJE5H.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
15855
16507
|
return formattedSchema;
|
|
15856
16508
|
}
|
|
15857
16509
|
/*! Bundled license information:
|