@prisma/internals 6.3.0-integration-engines-6-3-0-6-integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03.1 → 6.3.0-integration-simpler-typeinfo-query.1
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-3DMEILBC.js → chunk-2DXAGCPS.js} +11 -11
- package/dist/{chunk-4B7QW7H5.js → chunk-2WJPHJ2I.js} +5 -5
- package/dist/{chunk-MGZOEY6N.js → chunk-3U2ANLD3.js} +6 -6
- package/dist/{chunk-MPJLR4LI.js → chunk-44JHENE6.js} +41 -14
- package/dist/{chunk-KQOJB3ZW.js → chunk-4NFLAUKD.js} +70 -70
- package/dist/chunk-4RWCRJYD.js +166 -0
- package/dist/{chunk-5MCWLJSR.js → chunk-5I4BOTBV.js} +9 -3
- package/dist/{chunk-ITRA3ERO.js → chunk-5R7AZFMV.js} +5 -5
- package/dist/{chunk-LDTCWMJN.js → chunk-5UJZARUY.js} +17 -17
- package/dist/{chunk-E2GS2B3X.js → chunk-67KWF6KB.js} +5 -5
- package/dist/{chunk-ZZLZJFQD.js → chunk-B44XJG7K.js} +5 -5
- package/dist/{chunk-6HMDWGVB.js → chunk-CKVVVLEH.js} +8 -8
- package/dist/{chunk-UWA3O2GR.js → chunk-COFXY6NH.js} +41 -14
- package/dist/chunk-D4MCOTL5.js +122 -0
- package/dist/{chunk-3M6SPBPE.js → chunk-DFG3425X.js} +16 -16
- package/dist/chunk-FPHZVRV4.js +110 -0
- package/dist/{chunk-S57RMXZW.js → chunk-FTS2IEWX.js} +5 -5
- package/dist/chunk-G7LL2H2O.js +54 -0
- package/dist/{chunk-25RJ7YTB.js → chunk-H3T4L34H.js} +83 -88
- package/dist/{chunk-3BND5XB4.js → chunk-HMGEWJDY.js} +47 -232
- package/dist/{chunk-77IC3DNO.js → chunk-IABMG3F4.js} +5 -5
- package/dist/{chunk-CXEMRKV4.js → chunk-IAEMHQAC.js} +8 -8
- package/dist/{chunk-CZDIXJEO.js → chunk-J3JE5NVO.js} +32 -56
- package/dist/{chunk-N6K7M2HZ.js → chunk-J4MA2JIK.js} +5 -5
- package/dist/{chunk-FQ3NGUFC.js → chunk-JBUUTZQL.js} +15 -15
- package/dist/chunk-JMZHUHCC.js +177 -0
- package/dist/{chunk-D6NVMO5B.js → chunk-KNNIRRTO.js} +5 -5
- package/dist/{chunk-PC7HPZQJ.js → chunk-KPVPQQGU.js} +5 -5
- package/dist/{chunk-PJLZHXCV.js → chunk-KROMVQBD.js} +9 -9
- package/dist/{chunk-Z74VDPVS.js → chunk-LXIE6UJ2.js} +961 -79
- package/dist/{chunk-NZDTAI2U.js → chunk-MUJIYA44.js} +5 -5
- package/dist/{chunk-CGFXOUVQ.js → chunk-OHBFHT5Q.js} +15 -15
- package/dist/{chunk-UPIULDLZ.js → chunk-OSOXVAZB.js} +11 -11
- package/dist/chunk-RQPDQSHK.js +1429 -0
- package/dist/{chunk-2XRDQCIA.js → chunk-S4LINK5Y.js} +5 -5
- package/dist/{chunk-D3VAE4HY.js → chunk-UR3LUZY3.js} +17 -17
- package/dist/{chunk-EKBX4J6O.js → chunk-V2VWODV3.js} +5 -5
- package/dist/{chunk-FT32HRUC.js → chunk-VFU3I6P6.js} +16 -16
- package/dist/{chunk-TR2BJI77.js → chunk-VJQK3LHU.js} +185 -74
- package/dist/{chunk-V2ZF7ETH.js → chunk-WCRKL55L.js} +7 -7
- package/dist/{chunk-C47SCASR.js → chunk-WMIBAVWZ.js} +5 -5
- package/dist/{chunk-DRPRJIUE.js → chunk-WYTN2XGW.js} +5 -5
- package/dist/{chunk-QTXYAZFX.js → chunk-XLYQ6PQW.js} +17 -17
- package/dist/{chunk-VRT7T6MF.js → chunk-YDZVEVUG.js} +73 -73
- package/dist/{chunk-ZKAW5JSN.js → chunk-ZA3RMW2P.js} +8 -5
- package/dist/cli/checkUnsupportedDataProxy.js +40 -41
- package/dist/cli/getSchema.js +45 -46
- package/dist/cli/hashes.js +40 -41
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +39 -40
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +8 -8
- package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
- package/dist/engine-commands/index.js +50 -51
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/relativizePathInPSLError.js +2 -2
- package/dist/engine-commands/validate.js +10 -10
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +39 -40
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +39 -40
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +9 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +132 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +40 -41
- package/dist/get-generators/getGenerators.js +42 -43
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +85 -87
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-LCETWFPE.js} +6 -9
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +39 -40
- package/dist/tracing/types.d.ts +16 -26
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +39 -40
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.js +3 -3
- package/dist/utils/handlePanic.js +39 -40
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/load.js +4 -4
- package/dist/utils/loadEnvFile.js +39 -40
- package/dist/utils/tryLoadEnvs.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +12 -12
- package/dist/chunk-BONFK27U.js +0 -47
- package/dist/chunk-PPCNLYSB.js +0 -47
- package/dist/cli/getTypescriptVersion.d.ts +0 -1
- package/dist/cli/getTypescriptVersion.js +0 -25
- package/dist/typescript-AILDXN3I.js +0 -205230
- package/dist/typescript-WN4QH2CP.js +0 -205192
@@ -26,10 +26,11 @@ 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_LXIE6UJ2_exports = {};
|
30
|
+
__export2(chunk_LXIE6UJ2_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
|
+
checkYarnVersion: () => checkYarnVersion,
|
33
34
|
debug: () => debug5,
|
34
35
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
35
36
|
formatSchema: () => formatSchema,
|
@@ -55,47 +56,47 @@ __export2(chunk_Z74VDPVS_exports, {
|
|
55
56
|
sendPanic: () => sendPanic,
|
56
57
|
skipIndex: () => skipIndex
|
57
58
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
59
|
-
var
|
60
|
-
var
|
61
|
-
var
|
62
|
-
var import_chunk_S57RMXZW = require("./chunk-S57RMXZW.js");
|
59
|
+
module.exports = __toCommonJS2(chunk_LXIE6UJ2_exports);
|
60
|
+
var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
|
61
|
+
var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
|
62
|
+
var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
|
63
63
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
64
|
-
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
65
64
|
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
65
|
+
var import_chunk_KEBDP2C3 = require("./chunk-KEBDP2C3.js");
|
66
66
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
67
|
-
var
|
67
|
+
var import_chunk_D4MCOTL5 = require("./chunk-D4MCOTL5.js");
|
68
68
|
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
69
69
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
70
|
+
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
70
71
|
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
71
72
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
72
73
|
var import_chunk_JHQHVXIR = require("./chunk-JHQHVXIR.js");
|
73
|
-
var
|
74
|
+
var import_chunk_HMGEWJDY = require("./chunk-HMGEWJDY.js");
|
74
75
|
var import_chunk_BGFWFIPR = require("./chunk-BGFWFIPR.js");
|
75
76
|
var import_chunk_2MWIMEFK = require("./chunk-2MWIMEFK.js");
|
76
77
|
var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
|
77
78
|
var import_chunk_KDHESRKE = require("./chunk-KDHESRKE.js");
|
78
79
|
var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
|
79
|
-
var
|
80
|
+
var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
|
80
81
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
81
82
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
82
83
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
83
|
-
var
|
84
|
-
var
|
85
|
-
var
|
86
|
-
var
|
87
|
-
var import_chunk_UWA3O2GR = require("./chunk-UWA3O2GR.js");
|
84
|
+
var import_chunk_B44XJG7K = require("./chunk-B44XJG7K.js");
|
85
|
+
var import_chunk_JBUUTZQL = require("./chunk-JBUUTZQL.js");
|
86
|
+
var import_chunk_UR3LUZY3 = require("./chunk-UR3LUZY3.js");
|
87
|
+
var import_chunk_44JHENE6 = require("./chunk-44JHENE6.js");
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
89
|
-
var
|
90
|
-
var
|
89
|
+
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
90
|
+
var import_chunk_MUJIYA44 = require("./chunk-MUJIYA44.js");
|
91
|
+
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
91
92
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
92
93
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
94
|
+
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
93
95
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
94
|
-
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
95
96
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
96
97
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
97
|
-
var
|
98
|
-
var
|
98
|
+
var import_chunk_4NFLAUKD = require("./chunk-4NFLAUKD.js");
|
99
|
+
var import_chunk_J3JE5NVO = require("./chunk-J3JE5NVO.js");
|
99
100
|
var import_chunk_FUUQ6FJ4 = require("./chunk-FUUQ6FJ4.js");
|
100
101
|
var import_chunk_KKMREGHN = require("./chunk-KKMREGHN.js");
|
101
102
|
var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
|
@@ -439,7 +440,7 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
439
440
|
module2.exports = readdirGlob;
|
440
441
|
var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
441
442
|
var { EventEmitter } = (0, import_chunk_WWAWV7DQ.__require)("events");
|
442
|
-
var { Minimatch } = (0,
|
443
|
+
var { Minimatch } = (0, import_chunk_J3JE5NVO.require_minimatch)();
|
443
444
|
var { resolve } = (0, import_chunk_WWAWV7DQ.__require)("path");
|
444
445
|
function readdir(dir2, strict) {
|
445
446
|
return new Promise((resolve2, reject2) => {
|
@@ -454,16 +455,12 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
454
455
|
}
|
455
456
|
break;
|
456
457
|
case "ENOTSUP":
|
457
|
-
// Operation not supported
|
458
458
|
case "ENOENT":
|
459
|
-
// No such file or directory
|
460
459
|
case "ENAMETOOLONG":
|
461
|
-
// Filename too long
|
462
460
|
case "UNKNOWN":
|
463
461
|
resolve2([]);
|
464
462
|
break;
|
465
463
|
case "ELOOP":
|
466
|
-
// Too many levels of symbolic links
|
467
464
|
default:
|
468
465
|
reject2(err);
|
469
466
|
break;
|
@@ -2509,6 +2506,778 @@ var init_async = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
2509
2506
|
async_default = index;
|
2510
2507
|
}
|
2511
2508
|
});
|
2509
|
+
var require_polyfills = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
2510
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
|
2511
|
+
"use strict";
|
2512
|
+
var constants2 = (0, import_chunk_WWAWV7DQ.__require)("constants");
|
2513
|
+
var origCwd = process.cwd;
|
2514
|
+
var cwd = null;
|
2515
|
+
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
2516
|
+
process.cwd = function() {
|
2517
|
+
if (!cwd)
|
2518
|
+
cwd = origCwd.call(process);
|
2519
|
+
return cwd;
|
2520
|
+
};
|
2521
|
+
try {
|
2522
|
+
process.cwd();
|
2523
|
+
} catch (er) {
|
2524
|
+
}
|
2525
|
+
if (typeof process.chdir === "function") {
|
2526
|
+
chdir = process.chdir;
|
2527
|
+
process.chdir = function(d2) {
|
2528
|
+
cwd = null;
|
2529
|
+
chdir.call(process, d2);
|
2530
|
+
};
|
2531
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
2532
|
+
}
|
2533
|
+
var chdir;
|
2534
|
+
module2.exports = patch;
|
2535
|
+
function patch(fs8) {
|
2536
|
+
if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
2537
|
+
patchLchmod(fs8);
|
2538
|
+
}
|
2539
|
+
if (!fs8.lutimes) {
|
2540
|
+
patchLutimes(fs8);
|
2541
|
+
}
|
2542
|
+
fs8.chown = chownFix(fs8.chown);
|
2543
|
+
fs8.fchown = chownFix(fs8.fchown);
|
2544
|
+
fs8.lchown = chownFix(fs8.lchown);
|
2545
|
+
fs8.chmod = chmodFix(fs8.chmod);
|
2546
|
+
fs8.fchmod = chmodFix(fs8.fchmod);
|
2547
|
+
fs8.lchmod = chmodFix(fs8.lchmod);
|
2548
|
+
fs8.chownSync = chownFixSync(fs8.chownSync);
|
2549
|
+
fs8.fchownSync = chownFixSync(fs8.fchownSync);
|
2550
|
+
fs8.lchownSync = chownFixSync(fs8.lchownSync);
|
2551
|
+
fs8.chmodSync = chmodFixSync(fs8.chmodSync);
|
2552
|
+
fs8.fchmodSync = chmodFixSync(fs8.fchmodSync);
|
2553
|
+
fs8.lchmodSync = chmodFixSync(fs8.lchmodSync);
|
2554
|
+
fs8.stat = statFix(fs8.stat);
|
2555
|
+
fs8.fstat = statFix(fs8.fstat);
|
2556
|
+
fs8.lstat = statFix(fs8.lstat);
|
2557
|
+
fs8.statSync = statFixSync(fs8.statSync);
|
2558
|
+
fs8.fstatSync = statFixSync(fs8.fstatSync);
|
2559
|
+
fs8.lstatSync = statFixSync(fs8.lstatSync);
|
2560
|
+
if (fs8.chmod && !fs8.lchmod) {
|
2561
|
+
fs8.lchmod = function(path8, mode, cb) {
|
2562
|
+
if (cb) process.nextTick(cb);
|
2563
|
+
};
|
2564
|
+
fs8.lchmodSync = function() {
|
2565
|
+
};
|
2566
|
+
}
|
2567
|
+
if (fs8.chown && !fs8.lchown) {
|
2568
|
+
fs8.lchown = function(path8, uid, gid, cb) {
|
2569
|
+
if (cb) process.nextTick(cb);
|
2570
|
+
};
|
2571
|
+
fs8.lchownSync = function() {
|
2572
|
+
};
|
2573
|
+
}
|
2574
|
+
if (platform === "win32") {
|
2575
|
+
fs8.rename = typeof fs8.rename !== "function" ? fs8.rename : function(fs$rename) {
|
2576
|
+
function rename(from, to, cb) {
|
2577
|
+
var start = Date.now();
|
2578
|
+
var backoff = 0;
|
2579
|
+
fs$rename(from, to, function CB(er) {
|
2580
|
+
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
2581
|
+
setTimeout(function() {
|
2582
|
+
fs8.stat(to, function(stater, st) {
|
2583
|
+
if (stater && stater.code === "ENOENT")
|
2584
|
+
fs$rename(from, to, CB);
|
2585
|
+
else
|
2586
|
+
cb(er);
|
2587
|
+
});
|
2588
|
+
}, backoff);
|
2589
|
+
if (backoff < 100)
|
2590
|
+
backoff += 10;
|
2591
|
+
return;
|
2592
|
+
}
|
2593
|
+
if (cb) cb(er);
|
2594
|
+
});
|
2595
|
+
}
|
2596
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
2597
|
+
return rename;
|
2598
|
+
}(fs8.rename);
|
2599
|
+
}
|
2600
|
+
fs8.read = typeof fs8.read !== "function" ? fs8.read : function(fs$read) {
|
2601
|
+
function read(fd, buffer, offset, length, position, callback_) {
|
2602
|
+
var callback;
|
2603
|
+
if (callback_ && typeof callback_ === "function") {
|
2604
|
+
var eagCounter = 0;
|
2605
|
+
callback = function(er, _2, __) {
|
2606
|
+
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
2607
|
+
eagCounter++;
|
2608
|
+
return fs$read.call(fs8, fd, buffer, offset, length, position, callback);
|
2609
|
+
}
|
2610
|
+
callback_.apply(this, arguments);
|
2611
|
+
};
|
2612
|
+
}
|
2613
|
+
return fs$read.call(fs8, fd, buffer, offset, length, position, callback);
|
2614
|
+
}
|
2615
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
2616
|
+
return read;
|
2617
|
+
}(fs8.read);
|
2618
|
+
fs8.readSync = typeof fs8.readSync !== "function" ? fs8.readSync : /* @__PURE__ */ function(fs$readSync) {
|
2619
|
+
return function(fd, buffer, offset, length, position) {
|
2620
|
+
var eagCounter = 0;
|
2621
|
+
while (true) {
|
2622
|
+
try {
|
2623
|
+
return fs$readSync.call(fs8, fd, buffer, offset, length, position);
|
2624
|
+
} catch (er) {
|
2625
|
+
if (er.code === "EAGAIN" && eagCounter < 10) {
|
2626
|
+
eagCounter++;
|
2627
|
+
continue;
|
2628
|
+
}
|
2629
|
+
throw er;
|
2630
|
+
}
|
2631
|
+
}
|
2632
|
+
};
|
2633
|
+
}(fs8.readSync);
|
2634
|
+
function patchLchmod(fs9) {
|
2635
|
+
fs9.lchmod = function(path8, mode, callback) {
|
2636
|
+
fs9.open(
|
2637
|
+
path8,
|
2638
|
+
constants2.O_WRONLY | constants2.O_SYMLINK,
|
2639
|
+
mode,
|
2640
|
+
function(err, fd) {
|
2641
|
+
if (err) {
|
2642
|
+
if (callback) callback(err);
|
2643
|
+
return;
|
2644
|
+
}
|
2645
|
+
fs9.fchmod(fd, mode, function(err2) {
|
2646
|
+
fs9.close(fd, function(err22) {
|
2647
|
+
if (callback) callback(err2 || err22);
|
2648
|
+
});
|
2649
|
+
});
|
2650
|
+
}
|
2651
|
+
);
|
2652
|
+
};
|
2653
|
+
fs9.lchmodSync = function(path8, mode) {
|
2654
|
+
var fd = fs9.openSync(path8, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
|
2655
|
+
var threw = true;
|
2656
|
+
var ret;
|
2657
|
+
try {
|
2658
|
+
ret = fs9.fchmodSync(fd, mode);
|
2659
|
+
threw = false;
|
2660
|
+
} finally {
|
2661
|
+
if (threw) {
|
2662
|
+
try {
|
2663
|
+
fs9.closeSync(fd);
|
2664
|
+
} catch (er) {
|
2665
|
+
}
|
2666
|
+
} else {
|
2667
|
+
fs9.closeSync(fd);
|
2668
|
+
}
|
2669
|
+
}
|
2670
|
+
return ret;
|
2671
|
+
};
|
2672
|
+
}
|
2673
|
+
function patchLutimes(fs9) {
|
2674
|
+
if (constants2.hasOwnProperty("O_SYMLINK") && fs9.futimes) {
|
2675
|
+
fs9.lutimes = function(path8, at, mt, cb) {
|
2676
|
+
fs9.open(path8, constants2.O_SYMLINK, function(er, fd) {
|
2677
|
+
if (er) {
|
2678
|
+
if (cb) cb(er);
|
2679
|
+
return;
|
2680
|
+
}
|
2681
|
+
fs9.futimes(fd, at, mt, function(er2) {
|
2682
|
+
fs9.close(fd, function(er22) {
|
2683
|
+
if (cb) cb(er2 || er22);
|
2684
|
+
});
|
2685
|
+
});
|
2686
|
+
});
|
2687
|
+
};
|
2688
|
+
fs9.lutimesSync = function(path8, at, mt) {
|
2689
|
+
var fd = fs9.openSync(path8, constants2.O_SYMLINK);
|
2690
|
+
var ret;
|
2691
|
+
var threw = true;
|
2692
|
+
try {
|
2693
|
+
ret = fs9.futimesSync(fd, at, mt);
|
2694
|
+
threw = false;
|
2695
|
+
} finally {
|
2696
|
+
if (threw) {
|
2697
|
+
try {
|
2698
|
+
fs9.closeSync(fd);
|
2699
|
+
} catch (er) {
|
2700
|
+
}
|
2701
|
+
} else {
|
2702
|
+
fs9.closeSync(fd);
|
2703
|
+
}
|
2704
|
+
}
|
2705
|
+
return ret;
|
2706
|
+
};
|
2707
|
+
} else if (fs9.futimes) {
|
2708
|
+
fs9.lutimes = function(_a, _b, _c, cb) {
|
2709
|
+
if (cb) process.nextTick(cb);
|
2710
|
+
};
|
2711
|
+
fs9.lutimesSync = function() {
|
2712
|
+
};
|
2713
|
+
}
|
2714
|
+
}
|
2715
|
+
function chmodFix(orig) {
|
2716
|
+
if (!orig) return orig;
|
2717
|
+
return function(target, mode, cb) {
|
2718
|
+
return orig.call(fs8, target, mode, function(er) {
|
2719
|
+
if (chownErOk(er)) er = null;
|
2720
|
+
if (cb) cb.apply(this, arguments);
|
2721
|
+
});
|
2722
|
+
};
|
2723
|
+
}
|
2724
|
+
function chmodFixSync(orig) {
|
2725
|
+
if (!orig) return orig;
|
2726
|
+
return function(target, mode) {
|
2727
|
+
try {
|
2728
|
+
return orig.call(fs8, target, mode);
|
2729
|
+
} catch (er) {
|
2730
|
+
if (!chownErOk(er)) throw er;
|
2731
|
+
}
|
2732
|
+
};
|
2733
|
+
}
|
2734
|
+
function chownFix(orig) {
|
2735
|
+
if (!orig) return orig;
|
2736
|
+
return function(target, uid, gid, cb) {
|
2737
|
+
return orig.call(fs8, target, uid, gid, function(er) {
|
2738
|
+
if (chownErOk(er)) er = null;
|
2739
|
+
if (cb) cb.apply(this, arguments);
|
2740
|
+
});
|
2741
|
+
};
|
2742
|
+
}
|
2743
|
+
function chownFixSync(orig) {
|
2744
|
+
if (!orig) return orig;
|
2745
|
+
return function(target, uid, gid) {
|
2746
|
+
try {
|
2747
|
+
return orig.call(fs8, target, uid, gid);
|
2748
|
+
} catch (er) {
|
2749
|
+
if (!chownErOk(er)) throw er;
|
2750
|
+
}
|
2751
|
+
};
|
2752
|
+
}
|
2753
|
+
function statFix(orig) {
|
2754
|
+
if (!orig) return orig;
|
2755
|
+
return function(target, options2, cb) {
|
2756
|
+
if (typeof options2 === "function") {
|
2757
|
+
cb = options2;
|
2758
|
+
options2 = null;
|
2759
|
+
}
|
2760
|
+
function callback(er, stats) {
|
2761
|
+
if (stats) {
|
2762
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
2763
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
2764
|
+
}
|
2765
|
+
if (cb) cb.apply(this, arguments);
|
2766
|
+
}
|
2767
|
+
return options2 ? orig.call(fs8, target, options2, callback) : orig.call(fs8, target, callback);
|
2768
|
+
};
|
2769
|
+
}
|
2770
|
+
function statFixSync(orig) {
|
2771
|
+
if (!orig) return orig;
|
2772
|
+
return function(target, options2) {
|
2773
|
+
var stats = options2 ? orig.call(fs8, target, options2) : orig.call(fs8, target);
|
2774
|
+
if (stats) {
|
2775
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
2776
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
2777
|
+
}
|
2778
|
+
return stats;
|
2779
|
+
};
|
2780
|
+
}
|
2781
|
+
function chownErOk(er) {
|
2782
|
+
if (!er)
|
2783
|
+
return true;
|
2784
|
+
if (er.code === "ENOSYS")
|
2785
|
+
return true;
|
2786
|
+
var nonroot = !process.getuid || process.getuid() !== 0;
|
2787
|
+
if (nonroot) {
|
2788
|
+
if (er.code === "EINVAL" || er.code === "EPERM")
|
2789
|
+
return true;
|
2790
|
+
}
|
2791
|
+
return false;
|
2792
|
+
}
|
2793
|
+
}
|
2794
|
+
}
|
2795
|
+
});
|
2796
|
+
var require_legacy_streams = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
2797
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
2798
|
+
"use strict";
|
2799
|
+
var Stream = (0, import_chunk_WWAWV7DQ.__require)("stream").Stream;
|
2800
|
+
module2.exports = legacy;
|
2801
|
+
function legacy(fs8) {
|
2802
|
+
return {
|
2803
|
+
ReadStream,
|
2804
|
+
WriteStream
|
2805
|
+
};
|
2806
|
+
function ReadStream(path8, options2) {
|
2807
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path8, options2);
|
2808
|
+
Stream.call(this);
|
2809
|
+
var self2 = this;
|
2810
|
+
this.path = path8;
|
2811
|
+
this.fd = null;
|
2812
|
+
this.readable = true;
|
2813
|
+
this.paused = false;
|
2814
|
+
this.flags = "r";
|
2815
|
+
this.mode = 438;
|
2816
|
+
this.bufferSize = 64 * 1024;
|
2817
|
+
options2 = options2 || {};
|
2818
|
+
var keys = Object.keys(options2);
|
2819
|
+
for (var index2 = 0, length = keys.length; index2 < length; index2++) {
|
2820
|
+
var key = keys[index2];
|
2821
|
+
this[key] = options2[key];
|
2822
|
+
}
|
2823
|
+
if (this.encoding) this.setEncoding(this.encoding);
|
2824
|
+
if (this.start !== void 0) {
|
2825
|
+
if ("number" !== typeof this.start) {
|
2826
|
+
throw TypeError("start must be a Number");
|
2827
|
+
}
|
2828
|
+
if (this.end === void 0) {
|
2829
|
+
this.end = Infinity;
|
2830
|
+
} else if ("number" !== typeof this.end) {
|
2831
|
+
throw TypeError("end must be a Number");
|
2832
|
+
}
|
2833
|
+
if (this.start > this.end) {
|
2834
|
+
throw new Error("start must be <= end");
|
2835
|
+
}
|
2836
|
+
this.pos = this.start;
|
2837
|
+
}
|
2838
|
+
if (this.fd !== null) {
|
2839
|
+
process.nextTick(function() {
|
2840
|
+
self2._read();
|
2841
|
+
});
|
2842
|
+
return;
|
2843
|
+
}
|
2844
|
+
fs8.open(this.path, this.flags, this.mode, function(err, fd) {
|
2845
|
+
if (err) {
|
2846
|
+
self2.emit("error", err);
|
2847
|
+
self2.readable = false;
|
2848
|
+
return;
|
2849
|
+
}
|
2850
|
+
self2.fd = fd;
|
2851
|
+
self2.emit("open", fd);
|
2852
|
+
self2._read();
|
2853
|
+
});
|
2854
|
+
}
|
2855
|
+
function WriteStream(path8, options2) {
|
2856
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path8, options2);
|
2857
|
+
Stream.call(this);
|
2858
|
+
this.path = path8;
|
2859
|
+
this.fd = null;
|
2860
|
+
this.writable = true;
|
2861
|
+
this.flags = "w";
|
2862
|
+
this.encoding = "binary";
|
2863
|
+
this.mode = 438;
|
2864
|
+
this.bytesWritten = 0;
|
2865
|
+
options2 = options2 || {};
|
2866
|
+
var keys = Object.keys(options2);
|
2867
|
+
for (var index2 = 0, length = keys.length; index2 < length; index2++) {
|
2868
|
+
var key = keys[index2];
|
2869
|
+
this[key] = options2[key];
|
2870
|
+
}
|
2871
|
+
if (this.start !== void 0) {
|
2872
|
+
if ("number" !== typeof this.start) {
|
2873
|
+
throw TypeError("start must be a Number");
|
2874
|
+
}
|
2875
|
+
if (this.start < 0) {
|
2876
|
+
throw new Error("start must be >= zero");
|
2877
|
+
}
|
2878
|
+
this.pos = this.start;
|
2879
|
+
}
|
2880
|
+
this.busy = false;
|
2881
|
+
this._queue = [];
|
2882
|
+
if (this.fd === null) {
|
2883
|
+
this._open = fs8.open;
|
2884
|
+
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
2885
|
+
this.flush();
|
2886
|
+
}
|
2887
|
+
}
|
2888
|
+
}
|
2889
|
+
}
|
2890
|
+
});
|
2891
|
+
var require_clone = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
2892
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) {
|
2893
|
+
"use strict";
|
2894
|
+
module2.exports = clone;
|
2895
|
+
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
2896
|
+
return obj.__proto__;
|
2897
|
+
};
|
2898
|
+
function clone(obj) {
|
2899
|
+
if (obj === null || typeof obj !== "object")
|
2900
|
+
return obj;
|
2901
|
+
if (obj instanceof Object)
|
2902
|
+
var copy = { __proto__: getPrototypeOf(obj) };
|
2903
|
+
else
|
2904
|
+
var copy = /* @__PURE__ */ Object.create(null);
|
2905
|
+
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
2906
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
2907
|
+
});
|
2908
|
+
return copy;
|
2909
|
+
}
|
2910
|
+
}
|
2911
|
+
});
|
2912
|
+
var require_graceful_fs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
2913
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
2914
|
+
"use strict";
|
2915
|
+
var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
2916
|
+
var polyfills = require_polyfills();
|
2917
|
+
var legacy = require_legacy_streams();
|
2918
|
+
var clone = require_clone();
|
2919
|
+
var util = (0, import_chunk_WWAWV7DQ.__require)("util");
|
2920
|
+
var gracefulQueue;
|
2921
|
+
var previousSymbol;
|
2922
|
+
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
2923
|
+
gracefulQueue = Symbol.for("graceful-fs.queue");
|
2924
|
+
previousSymbol = Symbol.for("graceful-fs.previous");
|
2925
|
+
} else {
|
2926
|
+
gracefulQueue = "___graceful-fs.queue";
|
2927
|
+
previousSymbol = "___graceful-fs.previous";
|
2928
|
+
}
|
2929
|
+
function noop() {
|
2930
|
+
}
|
2931
|
+
function publishQueue(context, queue3) {
|
2932
|
+
Object.defineProperty(context, gracefulQueue, {
|
2933
|
+
get: function() {
|
2934
|
+
return queue3;
|
2935
|
+
}
|
2936
|
+
});
|
2937
|
+
}
|
2938
|
+
var debug8 = noop;
|
2939
|
+
if (util.debuglog)
|
2940
|
+
debug8 = util.debuglog("gfs4");
|
2941
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
2942
|
+
debug8 = function() {
|
2943
|
+
var m2 = util.format.apply(util, arguments);
|
2944
|
+
m2 = "GFS4: " + m2.split(/\n/).join("\nGFS4: ");
|
2945
|
+
console.error(m2);
|
2946
|
+
};
|
2947
|
+
if (!fs8[gracefulQueue]) {
|
2948
|
+
queue2 = global[gracefulQueue] || [];
|
2949
|
+
publishQueue(fs8, queue2);
|
2950
|
+
fs8.close = function(fs$close) {
|
2951
|
+
function close(fd, cb) {
|
2952
|
+
return fs$close.call(fs8, fd, function(err) {
|
2953
|
+
if (!err) {
|
2954
|
+
resetQueue();
|
2955
|
+
}
|
2956
|
+
if (typeof cb === "function")
|
2957
|
+
cb.apply(this, arguments);
|
2958
|
+
});
|
2959
|
+
}
|
2960
|
+
Object.defineProperty(close, previousSymbol, {
|
2961
|
+
value: fs$close
|
2962
|
+
});
|
2963
|
+
return close;
|
2964
|
+
}(fs8.close);
|
2965
|
+
fs8.closeSync = function(fs$closeSync) {
|
2966
|
+
function closeSync(fd) {
|
2967
|
+
fs$closeSync.apply(fs8, arguments);
|
2968
|
+
resetQueue();
|
2969
|
+
}
|
2970
|
+
Object.defineProperty(closeSync, previousSymbol, {
|
2971
|
+
value: fs$closeSync
|
2972
|
+
});
|
2973
|
+
return closeSync;
|
2974
|
+
}(fs8.closeSync);
|
2975
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
2976
|
+
process.on("exit", function() {
|
2977
|
+
debug8(fs8[gracefulQueue]);
|
2978
|
+
(0, import_chunk_WWAWV7DQ.__require)("assert").equal(fs8[gracefulQueue].length, 0);
|
2979
|
+
});
|
2980
|
+
}
|
2981
|
+
}
|
2982
|
+
var queue2;
|
2983
|
+
if (!global[gracefulQueue]) {
|
2984
|
+
publishQueue(global, fs8[gracefulQueue]);
|
2985
|
+
}
|
2986
|
+
module2.exports = patch(clone(fs8));
|
2987
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs8.__patched) {
|
2988
|
+
module2.exports = patch(fs8);
|
2989
|
+
fs8.__patched = true;
|
2990
|
+
}
|
2991
|
+
function patch(fs9) {
|
2992
|
+
polyfills(fs9);
|
2993
|
+
fs9.gracefulify = patch;
|
2994
|
+
fs9.createReadStream = createReadStream;
|
2995
|
+
fs9.createWriteStream = createWriteStream;
|
2996
|
+
var fs$readFile = fs9.readFile;
|
2997
|
+
fs9.readFile = readFile2;
|
2998
|
+
function readFile2(path8, options2, cb) {
|
2999
|
+
if (typeof options2 === "function")
|
3000
|
+
cb = options2, options2 = null;
|
3001
|
+
return go$readFile(path8, options2, cb);
|
3002
|
+
function go$readFile(path9, options3, cb2, startTime) {
|
3003
|
+
return fs$readFile(path9, options3, function(err) {
|
3004
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
3005
|
+
enqueue([go$readFile, [path9, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
3006
|
+
else {
|
3007
|
+
if (typeof cb2 === "function")
|
3008
|
+
cb2.apply(this, arguments);
|
3009
|
+
}
|
3010
|
+
});
|
3011
|
+
}
|
3012
|
+
}
|
3013
|
+
var fs$writeFile = fs9.writeFile;
|
3014
|
+
fs9.writeFile = writeFile;
|
3015
|
+
function writeFile(path8, data, options2, cb) {
|
3016
|
+
if (typeof options2 === "function")
|
3017
|
+
cb = options2, options2 = null;
|
3018
|
+
return go$writeFile(path8, data, options2, cb);
|
3019
|
+
function go$writeFile(path9, data2, options3, cb2, startTime) {
|
3020
|
+
return fs$writeFile(path9, data2, options3, function(err) {
|
3021
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
3022
|
+
enqueue([go$writeFile, [path9, data2, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
3023
|
+
else {
|
3024
|
+
if (typeof cb2 === "function")
|
3025
|
+
cb2.apply(this, arguments);
|
3026
|
+
}
|
3027
|
+
});
|
3028
|
+
}
|
3029
|
+
}
|
3030
|
+
var fs$appendFile = fs9.appendFile;
|
3031
|
+
if (fs$appendFile)
|
3032
|
+
fs9.appendFile = appendFile;
|
3033
|
+
function appendFile(path8, data, options2, cb) {
|
3034
|
+
if (typeof options2 === "function")
|
3035
|
+
cb = options2, options2 = null;
|
3036
|
+
return go$appendFile(path8, data, options2, cb);
|
3037
|
+
function go$appendFile(path9, data2, options3, cb2, startTime) {
|
3038
|
+
return fs$appendFile(path9, data2, options3, function(err) {
|
3039
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
3040
|
+
enqueue([go$appendFile, [path9, data2, options3, cb2], err, startTime || Date.now(), Date.now()]);
|
3041
|
+
else {
|
3042
|
+
if (typeof cb2 === "function")
|
3043
|
+
cb2.apply(this, arguments);
|
3044
|
+
}
|
3045
|
+
});
|
3046
|
+
}
|
3047
|
+
}
|
3048
|
+
var fs$copyFile = fs9.copyFile;
|
3049
|
+
if (fs$copyFile)
|
3050
|
+
fs9.copyFile = copyFile;
|
3051
|
+
function copyFile(src, dest, flags, cb) {
|
3052
|
+
if (typeof flags === "function") {
|
3053
|
+
cb = flags;
|
3054
|
+
flags = 0;
|
3055
|
+
}
|
3056
|
+
return go$copyFile(src, dest, flags, cb);
|
3057
|
+
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
3058
|
+
return fs$copyFile(src2, dest2, flags2, function(err) {
|
3059
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
3060
|
+
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
3061
|
+
else {
|
3062
|
+
if (typeof cb2 === "function")
|
3063
|
+
cb2.apply(this, arguments);
|
3064
|
+
}
|
3065
|
+
});
|
3066
|
+
}
|
3067
|
+
}
|
3068
|
+
var fs$readdir = fs9.readdir;
|
3069
|
+
fs9.readdir = readdir;
|
3070
|
+
var noReaddirOptionVersions = /^v[0-5]\./;
|
3071
|
+
function readdir(path8, options2, cb) {
|
3072
|
+
if (typeof options2 === "function")
|
3073
|
+
cb = options2, options2 = null;
|
3074
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path9, options3, cb2, startTime) {
|
3075
|
+
return fs$readdir(path9, fs$readdirCallback(
|
3076
|
+
path9,
|
3077
|
+
options3,
|
3078
|
+
cb2,
|
3079
|
+
startTime
|
3080
|
+
));
|
3081
|
+
} : function go$readdir2(path9, options3, cb2, startTime) {
|
3082
|
+
return fs$readdir(path9, options3, fs$readdirCallback(
|
3083
|
+
path9,
|
3084
|
+
options3,
|
3085
|
+
cb2,
|
3086
|
+
startTime
|
3087
|
+
));
|
3088
|
+
};
|
3089
|
+
return go$readdir(path8, options2, cb);
|
3090
|
+
function fs$readdirCallback(path9, options3, cb2, startTime) {
|
3091
|
+
return function(err, files) {
|
3092
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
3093
|
+
enqueue([
|
3094
|
+
go$readdir,
|
3095
|
+
[path9, options3, cb2],
|
3096
|
+
err,
|
3097
|
+
startTime || Date.now(),
|
3098
|
+
Date.now()
|
3099
|
+
]);
|
3100
|
+
else {
|
3101
|
+
if (files && files.sort)
|
3102
|
+
files.sort();
|
3103
|
+
if (typeof cb2 === "function")
|
3104
|
+
cb2.call(this, err, files);
|
3105
|
+
}
|
3106
|
+
};
|
3107
|
+
}
|
3108
|
+
}
|
3109
|
+
if (process.version.substr(0, 4) === "v0.8") {
|
3110
|
+
var legStreams = legacy(fs9);
|
3111
|
+
ReadStream = legStreams.ReadStream;
|
3112
|
+
WriteStream = legStreams.WriteStream;
|
3113
|
+
}
|
3114
|
+
var fs$ReadStream = fs9.ReadStream;
|
3115
|
+
if (fs$ReadStream) {
|
3116
|
+
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
3117
|
+
ReadStream.prototype.open = ReadStream$open;
|
3118
|
+
}
|
3119
|
+
var fs$WriteStream = fs9.WriteStream;
|
3120
|
+
if (fs$WriteStream) {
|
3121
|
+
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
3122
|
+
WriteStream.prototype.open = WriteStream$open;
|
3123
|
+
}
|
3124
|
+
Object.defineProperty(fs9, "ReadStream", {
|
3125
|
+
get: function() {
|
3126
|
+
return ReadStream;
|
3127
|
+
},
|
3128
|
+
set: function(val) {
|
3129
|
+
ReadStream = val;
|
3130
|
+
},
|
3131
|
+
enumerable: true,
|
3132
|
+
configurable: true
|
3133
|
+
});
|
3134
|
+
Object.defineProperty(fs9, "WriteStream", {
|
3135
|
+
get: function() {
|
3136
|
+
return WriteStream;
|
3137
|
+
},
|
3138
|
+
set: function(val) {
|
3139
|
+
WriteStream = val;
|
3140
|
+
},
|
3141
|
+
enumerable: true,
|
3142
|
+
configurable: true
|
3143
|
+
});
|
3144
|
+
var FileReadStream = ReadStream;
|
3145
|
+
Object.defineProperty(fs9, "FileReadStream", {
|
3146
|
+
get: function() {
|
3147
|
+
return FileReadStream;
|
3148
|
+
},
|
3149
|
+
set: function(val) {
|
3150
|
+
FileReadStream = val;
|
3151
|
+
},
|
3152
|
+
enumerable: true,
|
3153
|
+
configurable: true
|
3154
|
+
});
|
3155
|
+
var FileWriteStream = WriteStream;
|
3156
|
+
Object.defineProperty(fs9, "FileWriteStream", {
|
3157
|
+
get: function() {
|
3158
|
+
return FileWriteStream;
|
3159
|
+
},
|
3160
|
+
set: function(val) {
|
3161
|
+
FileWriteStream = val;
|
3162
|
+
},
|
3163
|
+
enumerable: true,
|
3164
|
+
configurable: true
|
3165
|
+
});
|
3166
|
+
function ReadStream(path8, options2) {
|
3167
|
+
if (this instanceof ReadStream)
|
3168
|
+
return fs$ReadStream.apply(this, arguments), this;
|
3169
|
+
else
|
3170
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
3171
|
+
}
|
3172
|
+
function ReadStream$open() {
|
3173
|
+
var that = this;
|
3174
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
3175
|
+
if (err) {
|
3176
|
+
if (that.autoClose)
|
3177
|
+
that.destroy();
|
3178
|
+
that.emit("error", err);
|
3179
|
+
} else {
|
3180
|
+
that.fd = fd;
|
3181
|
+
that.emit("open", fd);
|
3182
|
+
that.read();
|
3183
|
+
}
|
3184
|
+
});
|
3185
|
+
}
|
3186
|
+
function WriteStream(path8, options2) {
|
3187
|
+
if (this instanceof WriteStream)
|
3188
|
+
return fs$WriteStream.apply(this, arguments), this;
|
3189
|
+
else
|
3190
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
3191
|
+
}
|
3192
|
+
function WriteStream$open() {
|
3193
|
+
var that = this;
|
3194
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
3195
|
+
if (err) {
|
3196
|
+
that.destroy();
|
3197
|
+
that.emit("error", err);
|
3198
|
+
} else {
|
3199
|
+
that.fd = fd;
|
3200
|
+
that.emit("open", fd);
|
3201
|
+
}
|
3202
|
+
});
|
3203
|
+
}
|
3204
|
+
function createReadStream(path8, options2) {
|
3205
|
+
return new fs9.ReadStream(path8, options2);
|
3206
|
+
}
|
3207
|
+
function createWriteStream(path8, options2) {
|
3208
|
+
return new fs9.WriteStream(path8, options2);
|
3209
|
+
}
|
3210
|
+
var fs$open = fs9.open;
|
3211
|
+
fs9.open = open;
|
3212
|
+
function open(path8, flags, mode, cb) {
|
3213
|
+
if (typeof mode === "function")
|
3214
|
+
cb = mode, mode = null;
|
3215
|
+
return go$open(path8, flags, mode, cb);
|
3216
|
+
function go$open(path9, flags2, mode2, cb2, startTime) {
|
3217
|
+
return fs$open(path9, flags2, mode2, function(err, fd) {
|
3218
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
3219
|
+
enqueue([go$open, [path9, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
3220
|
+
else {
|
3221
|
+
if (typeof cb2 === "function")
|
3222
|
+
cb2.apply(this, arguments);
|
3223
|
+
}
|
3224
|
+
});
|
3225
|
+
}
|
3226
|
+
}
|
3227
|
+
return fs9;
|
3228
|
+
}
|
3229
|
+
function enqueue(elem) {
|
3230
|
+
debug8("ENQUEUE", elem[0].name, elem[1]);
|
3231
|
+
fs8[gracefulQueue].push(elem);
|
3232
|
+
retry2();
|
3233
|
+
}
|
3234
|
+
var retryTimer;
|
3235
|
+
function resetQueue() {
|
3236
|
+
var now = Date.now();
|
3237
|
+
for (var i = 0; i < fs8[gracefulQueue].length; ++i) {
|
3238
|
+
if (fs8[gracefulQueue][i].length > 2) {
|
3239
|
+
fs8[gracefulQueue][i][3] = now;
|
3240
|
+
fs8[gracefulQueue][i][4] = now;
|
3241
|
+
}
|
3242
|
+
}
|
3243
|
+
retry2();
|
3244
|
+
}
|
3245
|
+
function retry2() {
|
3246
|
+
clearTimeout(retryTimer);
|
3247
|
+
retryTimer = void 0;
|
3248
|
+
if (fs8[gracefulQueue].length === 0)
|
3249
|
+
return;
|
3250
|
+
var elem = fs8[gracefulQueue].shift();
|
3251
|
+
var fn = elem[0];
|
3252
|
+
var args = elem[1];
|
3253
|
+
var err = elem[2];
|
3254
|
+
var startTime = elem[3];
|
3255
|
+
var lastTime = elem[4];
|
3256
|
+
if (startTime === void 0) {
|
3257
|
+
debug8("RETRY", fn.name, args);
|
3258
|
+
fn.apply(null, args);
|
3259
|
+
} else if (Date.now() - startTime >= 6e4) {
|
3260
|
+
debug8("TIMEOUT", fn.name, args);
|
3261
|
+
var cb = args.pop();
|
3262
|
+
if (typeof cb === "function")
|
3263
|
+
cb.call(null, err);
|
3264
|
+
} else {
|
3265
|
+
var sinceAttempt = Date.now() - lastTime;
|
3266
|
+
var sinceStart = Math.max(lastTime - startTime, 1);
|
3267
|
+
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
3268
|
+
if (sinceAttempt >= desiredDelay) {
|
3269
|
+
debug8("RETRY", fn.name, args);
|
3270
|
+
fn.apply(null, args.concat([startTime]));
|
3271
|
+
} else {
|
3272
|
+
fs8[gracefulQueue].push(elem);
|
3273
|
+
}
|
3274
|
+
}
|
3275
|
+
if (retryTimer === void 0) {
|
3276
|
+
retryTimer = setTimeout(retry2, 0);
|
3277
|
+
}
|
3278
|
+
}
|
3279
|
+
}
|
3280
|
+
});
|
2512
3281
|
var require_process_nextick_args = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
2513
3282
|
"../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js"(exports2, module2) {
|
2514
3283
|
"use strict";
|
@@ -2850,7 +3619,7 @@ var require_stream_writable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2850
3619
|
var Duplex;
|
2851
3620
|
Writable.WritableState = WritableState;
|
2852
3621
|
var util = Object.create(require_util());
|
2853
|
-
util.inherits = (0,
|
3622
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
2854
3623
|
var internalUtil = {
|
2855
3624
|
deprecate: require_node()
|
2856
3625
|
};
|
@@ -3288,7 +4057,7 @@ var require_stream_duplex = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3288
4057
|
};
|
3289
4058
|
module2.exports = Duplex;
|
3290
4059
|
var util = Object.create(require_util());
|
3291
|
-
util.inherits = (0,
|
4060
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
3292
4061
|
var Readable = require_stream_readable();
|
3293
4062
|
var Writable = require_stream_writable();
|
3294
4063
|
util.inherits(Duplex, Readable);
|
@@ -3609,7 +4378,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3609
4378
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
3610
4379
|
}
|
3611
4380
|
var util = Object.create(require_util());
|
3612
|
-
util.inherits = (0,
|
4381
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
3613
4382
|
var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
|
3614
4383
|
var debug8 = void 0;
|
3615
4384
|
if (debugUtil && debugUtil.debuglog) {
|
@@ -4276,7 +5045,7 @@ var require_stream_transform = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4276
5045
|
module2.exports = Transform;
|
4277
5046
|
var Duplex = require_stream_duplex();
|
4278
5047
|
var util = Object.create(require_util());
|
4279
|
-
util.inherits = (0,
|
5048
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
4280
5049
|
util.inherits(Transform, Duplex);
|
4281
5050
|
function afterTransform(er, data) {
|
4282
5051
|
var ts = this._transformState;
|
@@ -4374,7 +5143,7 @@ var require_stream_passthrough = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4374
5143
|
module2.exports = PassThrough;
|
4375
5144
|
var Transform = require_stream_transform();
|
4376
5145
|
var util = Object.create(require_util());
|
4377
|
-
util.inherits = (0,
|
5146
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
4378
5147
|
util.inherits(PassThrough, Transform);
|
4379
5148
|
function PassThrough(options2) {
|
4380
5149
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
@@ -5660,7 +6429,7 @@ var require_stream_writable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5660
6429
|
var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
|
5661
6430
|
var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
|
5662
6431
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
5663
|
-
(0,
|
6432
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Writable, Stream);
|
5664
6433
|
function nop() {
|
5665
6434
|
}
|
5666
6435
|
function WritableState(options2, stream, isDuplex) {
|
@@ -6102,7 +6871,7 @@ var require_stream_duplex2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6102
6871
|
module2.exports = Duplex;
|
6103
6872
|
var Readable = require_stream_readable2();
|
6104
6873
|
var Writable = require_stream_writable2();
|
6105
|
-
(0,
|
6874
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Duplex, Readable);
|
6106
6875
|
{
|
6107
6876
|
keys = objectKeys(Writable.prototype);
|
6108
6877
|
for (v = 0; v < keys.length; v++) {
|
@@ -6879,7 +7648,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6879
7648
|
var StringDecoder;
|
6880
7649
|
var createReadableStreamAsyncIterator;
|
6881
7650
|
var from;
|
6882
|
-
(0,
|
7651
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Readable, Stream);
|
6883
7652
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
6884
7653
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
6885
7654
|
function prependListener(emitter, event, fn) {
|
@@ -7584,7 +8353,7 @@ var require_stream_transform2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7584
8353
|
var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
|
7585
8354
|
var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
|
7586
8355
|
var Duplex = require_stream_duplex2();
|
7587
|
-
(0,
|
8356
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Transform, Duplex);
|
7588
8357
|
function afterTransform(er, data) {
|
7589
8358
|
var ts = this._transformState;
|
7590
8359
|
ts.transforming = false;
|
@@ -7678,7 +8447,7 @@ var require_stream_passthrough2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7678
8447
|
"use strict";
|
7679
8448
|
module2.exports = PassThrough;
|
7680
8449
|
var Transform = require_stream_transform2();
|
7681
|
-
(0,
|
8450
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(PassThrough, Transform);
|
7682
8451
|
function PassThrough(options2) {
|
7683
8452
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
7684
8453
|
Transform.call(this, options2);
|
@@ -8546,13 +9315,13 @@ var require_isPlainObject = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8546
9315
|
var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
8547
9316
|
"../../node_modules/.pnpm/archiver-utils@4.0.1/node_modules/archiver-utils/file.js"(exports2, module2) {
|
8548
9317
|
"use strict";
|
8549
|
-
var fs8 =
|
9318
|
+
var fs8 = require_graceful_fs();
|
8550
9319
|
var path8 = (0, import_chunk_WWAWV7DQ.__require)("path");
|
8551
9320
|
var flatten = require_flatten();
|
8552
9321
|
var difference = require_difference();
|
8553
9322
|
var union = require_union();
|
8554
9323
|
var isPlainObject = require_isPlainObject();
|
8555
|
-
var glob = (0,
|
9324
|
+
var glob = (0, import_chunk_J3JE5NVO.require_glob)();
|
8556
9325
|
var file = module2.exports = {};
|
8557
9326
|
var pathSeparatorRe = /[\/\\]/g;
|
8558
9327
|
var processPatterns = function(patterns, fn) {
|
@@ -8698,7 +9467,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8698
9467
|
var require_archiver_utils = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
8699
9468
|
"../../node_modules/.pnpm/archiver-utils@4.0.1/node_modules/archiver-utils/index.js"(exports2, module2) {
|
8700
9469
|
"use strict";
|
8701
|
-
var fs8 =
|
9470
|
+
var fs8 = require_graceful_fs();
|
8702
9471
|
var path8 = (0, import_chunk_WWAWV7DQ.__require)("path");
|
8703
9472
|
var lazystream = require_lazystream();
|
8704
9473
|
var normalizePath = require_normalize_path();
|
@@ -13397,7 +14166,7 @@ var require_ci_info = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
13397
14166
|
}
|
13398
14167
|
});
|
13399
14168
|
var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
13400
|
-
"../../node_modules/.pnpm/checkpoint-client@1.1.
|
14169
|
+
"../../node_modules/.pnpm/checkpoint-client@1.1.33/node_modules/checkpoint-client/dist/index.js"(exports, module) {
|
13401
14170
|
"use strict";
|
13402
14171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13403
14172
|
var path$2 = (0, import_chunk_WWAWV7DQ.__require)("path");
|
@@ -13802,8 +14571,6 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
13802
14571
|
this.inc("patch", identifier, identifierBase);
|
13803
14572
|
this.inc("pre", identifier, identifierBase);
|
13804
14573
|
break;
|
13805
|
-
// If the input is a non-prerelease version, this acts the same as
|
13806
|
-
// prepatch.
|
13807
14574
|
case "prerelease":
|
13808
14575
|
if (this.prerelease.length === 0) {
|
13809
14576
|
this.inc("patch", identifier, identifierBase);
|
@@ -13831,8 +14598,6 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
13831
14598
|
}
|
13832
14599
|
this.prerelease = [];
|
13833
14600
|
break;
|
13834
|
-
// This probably shouldn't be used publicly.
|
13835
|
-
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
13836
14601
|
case "pre": {
|
13837
14602
|
const base = Number(identifierBase) ? 1 : 0;
|
13838
14603
|
if (!identifier && identifierBase === false) {
|
@@ -14713,6 +15478,7 @@ var require_tmp = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
14713
15478
|
}
|
14714
15479
|
});
|
14715
15480
|
var import_find_up = (0, import_chunk_WWAWV7DQ.__toESM)(require_find_up());
|
15481
|
+
var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
|
14716
15482
|
var readFile = (0, import_util.promisify)(import_fs3.default.readFile);
|
14717
15483
|
var stat = (0, import_util.promisify)(import_fs3.default.stat);
|
14718
15484
|
var debug2 = (0, import_debug3.Debug)("prisma:getSchema");
|
@@ -14751,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
14751
15517
|
}
|
14752
15518
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
14753
15519
|
debug2("Loading config");
|
14754
|
-
const config2 = await (0,
|
15520
|
+
const config2 = await (0, import_chunk_UR3LUZY3.getConfig)({
|
14755
15521
|
datamodel: files,
|
14756
15522
|
ignoreEnvVarErrors: true
|
14757
15523
|
});
|
@@ -14818,9 +15584,14 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
|
|
14818
15584
|
if (defaultResult.ok) {
|
14819
15585
|
return defaultResult;
|
14820
15586
|
}
|
15587
|
+
const yarnResult = await getSchemaFromYarn1Workspace(cwd, defaultResult.error.failures);
|
15588
|
+
if (yarnResult.ok) {
|
15589
|
+
return yarnResult;
|
15590
|
+
}
|
15591
|
+
const finalError = yarnResult.error.kind === "Yarn1WorkspaceSchemaNotFound" ? defaultResult.error : yarnResult.error;
|
14821
15592
|
return {
|
14822
15593
|
ok: false,
|
14823
|
-
error:
|
15594
|
+
error: finalError
|
14824
15595
|
};
|
14825
15596
|
}
|
14826
15597
|
function renderLookupError(error) {
|
@@ -14855,7 +15626,7 @@ function renderDefaultLookupError(error, cwd) {
|
|
14855
15626
|
return parts.join("\n");
|
14856
15627
|
}
|
14857
15628
|
async function getPrismaConfigFromPackageJson(cwd) {
|
14858
|
-
const pkgJson = await (0,
|
15629
|
+
const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
|
14859
15630
|
const prismaPropertyFromPkgJson = pkgJson?.packageJson?.prisma;
|
14860
15631
|
if (!pkgJson) {
|
14861
15632
|
return null;
|
@@ -14895,6 +15666,47 @@ async function getSchemaFromPackageJson(cwd) {
|
|
14895
15666
|
}
|
14896
15667
|
return lookupResult;
|
14897
15668
|
}
|
15669
|
+
async function getSchemaFromYarn1Workspace(cwd, pastFailures) {
|
15670
|
+
if (!process.env.npm_config_user_agent?.includes("yarn")) {
|
15671
|
+
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
15672
|
+
}
|
15673
|
+
let workspaces;
|
15674
|
+
try {
|
15675
|
+
const { stdout: version3 } = await import_execa.default.command("yarn --version", {
|
15676
|
+
cwd
|
15677
|
+
});
|
15678
|
+
if (version3.startsWith("2")) {
|
15679
|
+
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
15680
|
+
}
|
15681
|
+
const { stdout } = await import_execa.default.command("yarn workspaces info --json", {
|
15682
|
+
cwd
|
15683
|
+
});
|
15684
|
+
const json = getJson(stdout);
|
15685
|
+
workspaces = Object.values(json);
|
15686
|
+
} catch {
|
15687
|
+
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
15688
|
+
}
|
15689
|
+
const workspaceRootDir = await findWorkspaceRoot(cwd);
|
15690
|
+
if (!workspaceRootDir) {
|
15691
|
+
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
15692
|
+
}
|
15693
|
+
for (const workspace of workspaces) {
|
15694
|
+
const workspacePath = import_path2.default.join(workspaceRootDir, workspace.location);
|
15695
|
+
const workspaceSchema = await tryWorkspacePath(workspacePath, pastFailures);
|
15696
|
+
if (workspaceSchema.ok) {
|
15697
|
+
return workspaceSchema;
|
15698
|
+
}
|
15699
|
+
}
|
15700
|
+
const rootPathSchema = await tryWorkspacePath(workspaceRootDir, pastFailures);
|
15701
|
+
return rootPathSchema;
|
15702
|
+
}
|
15703
|
+
async function tryWorkspacePath(cwd, pastFailures) {
|
15704
|
+
const pkgJson = await getSchemaFromPackageJson(cwd);
|
15705
|
+
if (pkgJson.ok) {
|
15706
|
+
return pkgJson;
|
15707
|
+
}
|
15708
|
+
return getDefaultSchema(cwd, pastFailures);
|
15709
|
+
}
|
14898
15710
|
async function getDefaultSchema(cwd, failures = []) {
|
14899
15711
|
const schemaPrisma = {
|
14900
15712
|
schemaPath: {
|
@@ -14973,6 +15785,44 @@ async function getSchema(schemaPathFromArgs) {
|
|
14973
15785
|
const schemaPathResult = await getSchemaWithPath(schemaPathFromArgs);
|
14974
15786
|
return schemaPathResult.schemas;
|
14975
15787
|
}
|
15788
|
+
function getJson(stdout) {
|
15789
|
+
const firstCurly = stdout.indexOf("{");
|
15790
|
+
const lastCurly = stdout.lastIndexOf("}");
|
15791
|
+
const sliced = stdout.slice(firstCurly, lastCurly + 1);
|
15792
|
+
return JSON.parse(sliced);
|
15793
|
+
}
|
15794
|
+
function isPkgJsonWorkspaceRoot(pkgJson) {
|
15795
|
+
const workspaces = pkgJson.workspaces;
|
15796
|
+
if (!workspaces) {
|
15797
|
+
return false;
|
15798
|
+
}
|
15799
|
+
return Array.isArray(workspaces) || workspaces.packages !== void 0;
|
15800
|
+
}
|
15801
|
+
async function isNearestPkgJsonWorkspaceRoot(cwd) {
|
15802
|
+
const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
|
15803
|
+
if (!pkgJson) {
|
15804
|
+
return null;
|
15805
|
+
}
|
15806
|
+
return {
|
15807
|
+
isRoot: isPkgJsonWorkspaceRoot(pkgJson.packageJson),
|
15808
|
+
path: pkgJson.path
|
15809
|
+
};
|
15810
|
+
}
|
15811
|
+
async function findWorkspaceRoot(cwd) {
|
15812
|
+
let pkgJson = await isNearestPkgJsonWorkspaceRoot(cwd);
|
15813
|
+
if (!pkgJson) {
|
15814
|
+
return null;
|
15815
|
+
}
|
15816
|
+
if (pkgJson.isRoot === true) {
|
15817
|
+
return import_path2.default.dirname(pkgJson.path);
|
15818
|
+
}
|
15819
|
+
const pkgJsonParentDir = import_path2.default.dirname(import_path2.default.dirname(pkgJson.path));
|
15820
|
+
pkgJson = await isNearestPkgJsonWorkspaceRoot(pkgJsonParentDir);
|
15821
|
+
if (!pkgJson || pkgJson.isRoot === false) {
|
15822
|
+
return null;
|
15823
|
+
}
|
15824
|
+
return import_path2.default.dirname(pkgJson.path);
|
15825
|
+
}
|
14976
15826
|
var debug3 = (0, import_debug2.default)("prisma:loadEnv");
|
14977
15827
|
async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
|
14978
15828
|
const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
|
@@ -14988,7 +15838,7 @@ async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
|
|
14988
15838
|
"./.env"
|
14989
15839
|
// 4 - Check cwd for .env
|
14990
15840
|
];
|
14991
|
-
const schemaEnvPath = schemaEnvPaths.find(
|
15841
|
+
const schemaEnvPath = schemaEnvPaths.find(import_chunk_HMGEWJDY.exists);
|
14992
15842
|
return { rootEnvPath, schemaEnvPath };
|
14993
15843
|
}
|
14994
15844
|
async function readSchemaPathFromPkgJson() {
|
@@ -15036,7 +15886,7 @@ async function loadEnvFile({
|
|
15036
15886
|
printMessage = false
|
15037
15887
|
} = {}) {
|
15038
15888
|
const envPaths2 = await getEnvPaths(schemaPath2);
|
15039
|
-
const envData = (0,
|
15889
|
+
const envData = (0, import_chunk_HMGEWJDY.tryLoadEnvs)(envPaths2, { conflictCheck: "error" });
|
15040
15890
|
if (printMessage && envData && envData.message) {
|
15041
15891
|
process.stdout.write(envData.message + "\n");
|
15042
15892
|
}
|
@@ -15059,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
15059
15909
|
if (argName.includes("schema")) {
|
15060
15910
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
15061
15911
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
15062
|
-
const config2 = await (0,
|
15063
|
-
const url = (0,
|
15912
|
+
const config2 = await (0, import_chunk_UR3LUZY3.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
15913
|
+
const url = (0, import_chunk_UR3LUZY3.resolveUrl)((0, import_chunk_UR3LUZY3.getEffectiveUrl)(config2.datasources[0]));
|
15064
15914
|
if (url?.startsWith("prisma://")) {
|
15065
15915
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
15066
15916
|
}
|
@@ -15081,7 +15931,7 @@ function getCLIPathHash() {
|
|
15081
15931
|
const cliPath = process.argv[1];
|
15082
15932
|
return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
|
15083
15933
|
}
|
15084
|
-
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
15934
|
+
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_J3JE5NVO.require_p_map)());
|
15085
15935
|
var debug4 = (0, import_debug6.default)("prisma:generator");
|
15086
15936
|
async function checkTypeScriptVersion() {
|
15087
15937
|
const minVersion = "4.1.0";
|
@@ -15107,10 +15957,42 @@ async function checkTypeScriptVersion() {
|
|
15107
15957
|
} catch (e) {
|
15108
15958
|
}
|
15109
15959
|
}
|
15960
|
+
function checkYarnVersion() {
|
15961
|
+
if (process.env.npm_config_user_agent) {
|
15962
|
+
const match = parseUserAgentString(process.env.npm_config_user_agent);
|
15963
|
+
if (match) {
|
15964
|
+
const { agent, major, minor, patch } = match;
|
15965
|
+
if (agent === "yarn" && major === 1) {
|
15966
|
+
const currentYarnVersion = `${major}.${minor}.${patch}`;
|
15967
|
+
const minYarnVersion = "1.19.2";
|
15968
|
+
if ((0, import_chunk_EUTJYQDW.semverLt)(currentYarnVersion, minYarnVersion)) {
|
15969
|
+
import_chunk_AZNLB67U.logger_exports.warn(
|
15970
|
+
`Your ${(0, import_chunk_PG5FDKSF.bold)("yarn")} has version ${currentYarnVersion}, which is outdated. Please update it to ${(0, import_chunk_PG5FDKSF.bold)(
|
15971
|
+
minYarnVersion
|
15972
|
+
)} or ${(0, import_chunk_PG5FDKSF.bold)("newer")} in order to use Prisma.`
|
15973
|
+
);
|
15974
|
+
}
|
15975
|
+
}
|
15976
|
+
}
|
15977
|
+
}
|
15978
|
+
}
|
15979
|
+
function parseUserAgentString(str) {
|
15980
|
+
const userAgentRegex = /(\w+)\/(\d+)\.(\d+)\.(\d+)/;
|
15981
|
+
const match = userAgentRegex.exec(str);
|
15982
|
+
if (match) {
|
15983
|
+
const agent = match[1];
|
15984
|
+
const major = parseInt(match[2]);
|
15985
|
+
const minor = parseInt(match[3]);
|
15986
|
+
const patch = parseInt(match[4]);
|
15987
|
+
return { agent, major, minor, patch };
|
15988
|
+
}
|
15989
|
+
return null;
|
15990
|
+
}
|
15110
15991
|
var debug5 = (0, import_debug5.default)("prisma:generator");
|
15111
15992
|
async function prismaClientResolver(baseDir, version3) {
|
15112
15993
|
let prismaClientDir = await (0, import_chunk_KEBDP2C3.findPrismaClientDir)(baseDir);
|
15113
15994
|
debug5("baseDir", baseDir);
|
15995
|
+
checkYarnVersion();
|
15114
15996
|
await checkTypeScriptVersion();
|
15115
15997
|
if (!prismaClientDir && !process.env.PRISMA_GENERATE_SKIP_AUTOINSTALL) {
|
15116
15998
|
let projectRoot = (0, import_chunk_J77ZIDXB.longestCommonPathPrefix)(baseDir, process.cwd());
|
@@ -15136,30 +16018,30 @@ async function prismaClientResolver(baseDir, version3) {
|
|
15136
16018
|
);
|
15137
16019
|
}
|
15138
16020
|
const prismaCliDir = await (0, import_chunk_FUUQ6FJ4.resolvePkg)("prisma", { basedir: baseDir });
|
15139
|
-
if (process.platform === "win32" && await (0,
|
16021
|
+
if (process.platform === "win32" && await (0, import_chunk_FTS2IEWX.isYarnUsed)(baseDir)) {
|
15140
16022
|
const hasCli = (s2) => prismaCliDir !== void 0 ? s2 : "";
|
15141
16023
|
const missingCli = (s2) => prismaCliDir === void 0 ? s2 : "";
|
15142
16024
|
throw new Error(
|
15143
16025
|
`Could not resolve ${missingCli(`${(0, import_chunk_PG5FDKSF.bold)("prisma")} and `)}${(0, import_chunk_PG5FDKSF.bold)(
|
15144
16026
|
"@prisma/client"
|
15145
16027
|
)} in the current project. Please install ${hasCli("it")}${missingCli("them")} with ${missingCli(
|
15146
|
-
`${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)(`${await (0,
|
15147
|
-
)}${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)(`${await (0,
|
15148
|
-
await (0,
|
16028
|
+
`${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)(`${await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "add", "prisma", "-D")}`))} and `
|
16029
|
+
)}${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)(`${await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "add", "@prisma/client")}`))}, and rerun ${(0, import_chunk_PG5FDKSF.bold)(
|
16030
|
+
await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "execute", "prisma generate")
|
15149
16031
|
)} \u{1F64F}.`
|
15150
16032
|
);
|
15151
16033
|
}
|
15152
16034
|
if (!prismaCliDir) {
|
15153
|
-
await (0,
|
16035
|
+
await (0, import_chunk_IABMG3F4.runPackageCmd)(projectRoot, "add", `prisma@${version3 ?? "latest"}`, "-D", "--silent");
|
15154
16036
|
}
|
15155
|
-
await (0,
|
16037
|
+
await (0, import_chunk_IABMG3F4.runPackageCmd)(projectRoot, "add", `@prisma/client@${version3 ?? "latest"}`, "--silent");
|
15156
16038
|
prismaClientDir = await (0, import_chunk_KEBDP2C3.findPrismaClientDir)(import_path4.default.join(".", baseDir));
|
15157
16039
|
if (!prismaClientDir) {
|
15158
16040
|
throw new Error(
|
15159
16041
|
`Could not resolve @prisma/client despite the installation that we just tried.
|
15160
16042
|
Please try to install it by hand with ${(0, import_chunk_PG5FDKSF.bold)(
|
15161
|
-
(0, import_chunk_PG5FDKSF.green)(`${await (0,
|
15162
|
-
)} and rerun ${(0, import_chunk_PG5FDKSF.bold)(await (0,
|
16043
|
+
(0, import_chunk_PG5FDKSF.green)(`${await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "add", "@prisma/client")}`)
|
16044
|
+
)} and rerun ${(0, import_chunk_PG5FDKSF.bold)(await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "execute", "prisma generate"))} \u{1F64F}.`
|
15163
16045
|
);
|
15164
16046
|
}
|
15165
16047
|
console.info(
|
@@ -15171,7 +16053,7 @@ Please try to install it by hand with ${(0, import_chunk_PG5FDKSF.bold)(
|
|
15171
16053
|
throw new Error(
|
15172
16054
|
`Could not resolve @prisma/client.
|
15173
16055
|
Please try to install it with ${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)("npm install @prisma/client"))} and rerun ${(0, import_chunk_PG5FDKSF.bold)(
|
15174
|
-
await (0,
|
16056
|
+
await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "execute", "prisma generate")
|
15175
16057
|
)} \u{1F64F}.`
|
15176
16058
|
);
|
15177
16059
|
}
|
@@ -15232,7 +16114,7 @@ async function getGenerators(options) {
|
|
15232
16114
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
15233
16115
|
}
|
15234
16116
|
}
|
15235
|
-
const config = await (0,
|
16117
|
+
const config = await (0, import_chunk_UR3LUZY3.getConfig)({
|
15236
16118
|
datamodel: schemas,
|
15237
16119
|
datamodelPath: schemaPath,
|
15238
16120
|
prismaPath,
|
@@ -15243,7 +16125,7 @@ async function getGenerators(options) {
|
|
15243
16125
|
}
|
15244
16126
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
15245
16127
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
15246
|
-
const dmmf = await (0,
|
16128
|
+
const dmmf = await (0, import_chunk_44JHENE6.getDMMF)({
|
15247
16129
|
datamodel: schemas,
|
15248
16130
|
datamodelPath: schemaPath,
|
15249
16131
|
prismaPath,
|
@@ -15304,7 +16186,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
15304
16186
|
fromEnvVar: "null"
|
15305
16187
|
};
|
15306
16188
|
}
|
15307
|
-
const datamodel = (0,
|
16189
|
+
const datamodel = (0, import_chunk_JBUUTZQL.mergeSchemas)({ schemas });
|
15308
16190
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
15309
16191
|
const options2 = {
|
15310
16192
|
datamodel,
|
@@ -15371,7 +16253,7 @@ generator gen {
|
|
15371
16253
|
}
|
15372
16254
|
}
|
15373
16255
|
debug6("neededVersions", JSON.stringify(neededVersions, null, 2));
|
15374
|
-
const binaryPathsByVersion = await (0,
|
16256
|
+
const binaryPathsByVersion = await (0, import_chunk_D4MCOTL5.getBinaryPathsByVersion)({
|
15375
16257
|
neededVersions,
|
15376
16258
|
binaryTarget,
|
15377
16259
|
version,
|
@@ -15387,7 +16269,7 @@ generator gen {
|
|
15387
16269
|
debug6({ generatorBinaryPaths });
|
15388
16270
|
generator.setBinaryPaths(generatorBinaryPaths);
|
15389
16271
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
15390
|
-
const customDmmf = await (0,
|
16272
|
+
const customDmmf = await (0, import_chunk_44JHENE6.getDMMF)({
|
15391
16273
|
datamodel: schemas,
|
15392
16274
|
datamodelPath: schemaPath,
|
15393
16275
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
@@ -15505,23 +16387,23 @@ async function sendPanic({
|
|
15505
16387
|
enginesVersion: enginesVersion2,
|
15506
16388
|
getDatabaseVersionSafe
|
15507
16389
|
}) {
|
15508
|
-
const schema = await (0,
|
16390
|
+
const schema = await (0, import_chunk_H3T4L34H.$)(error).with({ schemaPath: import_chunk_H3T4L34H.N.not(import_chunk_H3T4L34H.N.nullish) }, (err) => {
|
15509
16391
|
return getSchema(err.schemaPath);
|
15510
|
-
}).with({ schema:
|
16392
|
+
}).with({ schema: import_chunk_H3T4L34H.N.not(import_chunk_H3T4L34H.N.nullish) }, (err) => Promise.resolve(err.schema)).otherwise(() => void 0);
|
15511
16393
|
const maskedSchema = schema ? (0, import_chunk_KDHESRKE.maskSchemas)(schema) : void 0;
|
15512
16394
|
let dbVersion;
|
15513
16395
|
if (error.area === "LIFT_CLI") {
|
15514
|
-
const getDatabaseVersionParams = (0,
|
16396
|
+
const getDatabaseVersionParams = (0, import_chunk_H3T4L34H.$)({
|
15515
16397
|
schema,
|
15516
16398
|
introspectionUrl: error.introspectionUrl
|
15517
|
-
}).with({ schema:
|
16399
|
+
}).with({ schema: import_chunk_H3T4L34H.N.not(void 0) }, ({ schema: schema2 }) => {
|
15518
16400
|
return {
|
15519
16401
|
datasource: {
|
15520
16402
|
tag: "Schema",
|
15521
16403
|
...(0, import_chunk_JHQHVXIR.toSchemasContainer)(schema2)
|
15522
16404
|
}
|
15523
16405
|
};
|
15524
|
-
}).with({ introspectionUrl:
|
16406
|
+
}).with({ introspectionUrl: import_chunk_H3T4L34H.N.not(void 0) }, ({ introspectionUrl }) => {
|
15525
16407
|
return {
|
15526
16408
|
datasource: {
|
15527
16409
|
tag: "ConnectionString",
|
@@ -15555,16 +16437,16 @@ async function sendPanic({
|
|
15555
16437
|
sqlDump: void 0,
|
15556
16438
|
dbVersion
|
15557
16439
|
};
|
15558
|
-
const signedUrl = await (0,
|
16440
|
+
const signedUrl = await (0, import_chunk_4NFLAUKD.createErrorReport)(params);
|
15559
16441
|
try {
|
15560
16442
|
if (error.schemaPath) {
|
15561
16443
|
const zip = await makeErrorZip(error);
|
15562
|
-
await (0,
|
16444
|
+
await (0, import_chunk_4NFLAUKD.uploadZip)(zip, signedUrl);
|
15563
16445
|
}
|
15564
16446
|
} catch (zipUploadError) {
|
15565
16447
|
console.error(`Error uploading zip file: ${zipUploadError.message}`);
|
15566
16448
|
}
|
15567
|
-
const id = await (0,
|
16449
|
+
const id = await (0, import_chunk_4NFLAUKD.makeErrorReportCompleted)(signedUrl);
|
15568
16450
|
return id;
|
15569
16451
|
}
|
15570
16452
|
function concatSchemaForReport(schemaFiles) {
|
@@ -15671,7 +16553,7 @@ ${(0, import_chunk_PG5FDKSF.bold)("Thanks a lot for your help! \u{1F64F}")}`);
|
|
15671
16553
|
console.error(`${(0, import_chunk_PG5FDKSF.gray)("Error report submission failed due to: ")}`, error2);
|
15672
16554
|
}
|
15673
16555
|
}
|
15674
|
-
await (0,
|
16556
|
+
await (0, import_chunk_XLYQ6PQW.wouldYouLikeToCreateANewIssue)({
|
15675
16557
|
prompt: !shouldSubmitReport,
|
15676
16558
|
error,
|
15677
16559
|
cliVersion: cliVersion2,
|
@@ -15685,7 +16567,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15685
16567
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
15686
16568
|
handleFormatPanic(
|
15687
16569
|
() => {
|
15688
|
-
|
16570
|
+
import_chunk_MUJIYA44.prismaSchemaWasm.debug_panic();
|
15689
16571
|
},
|
15690
16572
|
{ schemas: schemas2 }
|
15691
16573
|
);
|
@@ -15705,12 +16587,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15705
16587
|
() => {
|
15706
16588
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
15707
16589
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
15708
|
-
const lintDiagnostics2 = (0,
|
16590
|
+
const lintDiagnostics2 = (0, import_chunk_B44XJG7K.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
15709
16591
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
15710
16592
|
},
|
15711
16593
|
{ schemas: schemas2 }
|
15712
16594
|
);
|
15713
|
-
const lintWarnings = (0,
|
16595
|
+
const lintWarnings = (0, import_chunk_B44XJG7K.getLintWarningsAsText)(lintDiagnostics);
|
15714
16596
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
15715
16597
|
console.warn(lintWarnings);
|
15716
16598
|
}
|
@@ -15740,7 +16622,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
15740
16622
|
}
|
15741
16623
|
}
|
15742
16624
|
function formatWasm(schema, documentFormattingParams) {
|
15743
|
-
const formattedSchema =
|
16625
|
+
const formattedSchema = import_chunk_MUJIYA44.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
15744
16626
|
return formattedSchema;
|
15745
16627
|
}
|
15746
16628
|
/*! Bundled license information:
|