@prisma/internals 5.19.0-integration-feat-typed-sql.8 → 5.19.0-integration-feat-typed-sql.9
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-3L4K6SFM.js → chunk-2DXAGCPS.js} +28 -28
- package/dist/{chunk-YQSFRPI6.js → chunk-3UILSHKO.js} +5 -5
- package/dist/{chunk-AYHYONDC.js → chunk-4RWCRJYD.js} +5 -5
- package/dist/{chunk-HJNLILFB.js → chunk-4TSX7RLM.js} +6 -6
- package/dist/{chunk-2GPGVL5I.js → chunk-7BO6PZ7Z.js} +5 -5
- package/dist/{chunk-4A5ZK522.js → chunk-7MD6344A.js} +3 -3
- package/dist/{chunk-GV7EVZ74.js → chunk-C2GFMSSM.js} +5 -5
- package/dist/{chunk-LDLVJEIV.js → chunk-CWDPU7YC.js} +5 -5
- package/dist/{chunk-EBDMVBGN.js → chunk-FIJEBQKU.js} +15 -15
- package/dist/{chunk-YHTJPMCB.js → chunk-FPHZVRV4.js} +5 -5
- package/dist/{chunk-JD6UDOYA.js → chunk-G7LL2H2O.js} +7 -7
- package/dist/{chunk-KUMD5MBR.js → chunk-IAEMHQAC.js} +10 -10
- package/dist/{chunk-WFCJDIUO.js → chunk-IEUYYIGM.js} +16 -16
- package/dist/{chunk-W3JESPUN.js → chunk-IKCJCV3I.js} +5 -5
- package/dist/{chunk-22WJY2FV.js → chunk-IRA3RQXI.js} +22 -22
- package/dist/{chunk-FXT7RHHM.js → chunk-IU5SDZ7K.js} +35 -35
- package/dist/{chunk-ESY3UZBI.js → chunk-J3JE5NVO.js} +20 -14
- package/dist/{chunk-FS7ZNLYQ.js → chunk-J5VHVBMJ.js} +16 -16
- package/dist/{chunk-CSV3AVJ4.js → chunk-JMZHUHCC.js} +28 -28
- package/dist/{chunk-TZUE7543.js → chunk-JSI3G2US.js} +5 -5
- package/dist/{chunk-SVCA3BMU.js → chunk-KECNKSWT.js} +23 -23
- package/dist/{chunk-YSQAVBOZ.js → chunk-LDZYLW23.js} +15 -15
- package/dist/{chunk-QOTVZEEZ.js → chunk-PFLLVWZX.js} +4 -4
- package/dist/{chunk-54SO32EX.js → chunk-PWZ47TAW.js} +5 -5
- package/dist/{chunk-JXQEYT4S.js → chunk-QJZIYUVB.js} +5 -5
- package/dist/{chunk-SNM5X2II.js → chunk-R7QPZWRB.js} +35 -35
- package/dist/{chunk-JNWPENVU.js → chunk-RCKN2EPU.js} +22 -22
- package/dist/{chunk-YM3CE76B.js → chunk-S3323RUL.js} +48 -48
- package/dist/{chunk-LZIL2VER.js → chunk-TFSZCVKC.js} +5 -5
- package/dist/{chunk-3VLJQQOA.js → chunk-V2VWODV3.js} +7 -7
- package/dist/{chunk-3WLATYJE.js → chunk-VQDT7YM5.js} +5 -5
- package/dist/{chunk-I3DYN2FY.js → chunk-W7XMAIEV.js} +23 -23
- package/dist/{chunk-Y2QSXBQI.js → chunk-YLJPJLF6.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +21 -21
- package/dist/cli/getSchema.js +26 -26
- package/dist/cli/hashes.js +21 -21
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +20 -20
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +8 -8
- package/dist/engine-commands/index.js +31 -31
- 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/validate.js +10 -10
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +20 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +20 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +20 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +21 -21
- package/dist/get-generators/getGenerators.js +23 -23
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.js +59 -59
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +20 -20
- package/dist/utils/fs-functional.js +9 -9
- package/dist/utils/getEnvPaths.js +20 -20
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +20 -20
- package/dist/utils/loadEnvFile.js +20 -20
- package/dist/wasm.js +4 -4
- package/package.json +9 -9
|
@@ -26,25 +26,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_IRA3RQXI_exports = {};
|
|
30
|
+
__export(chunk_IRA3RQXI_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_IRA3RQXI_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
36
|
+
var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
|
|
37
|
+
var import_chunk_CWDPU7YC = require("./chunk-CWDPU7YC.js");
|
|
38
|
+
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_YLJPJLF6 = require("./chunk-YLJPJLF6.js");
|
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
42
|
-
var
|
|
42
|
+
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
44
44
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
45
45
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
46
46
|
var import_fs = __toESM(require("fs"));
|
|
47
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
47
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
49
49
|
var GetDmmfError = class extends Error {
|
|
50
50
|
constructor(params) {
|
|
@@ -60,16 +60,16 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: getDmmf]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_CWDPU7YC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "GetDmmfError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
async function getDMMF(options) {
|
|
68
68
|
warnOnDeprecatedFeatureFlag(options.previewFeatures);
|
|
69
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "getDmmfWasm");
|
|
70
70
|
debug(`Using getDmmf Wasm`);
|
|
71
71
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
72
|
-
(0,
|
|
72
|
+
(0, import_chunk_7MD6344A.tryCatch2)(
|
|
73
73
|
() => {
|
|
74
74
|
if (options.datamodel) {
|
|
75
75
|
debug("Using given datamodel");
|
|
@@ -85,19 +85,19 @@ async function getDMMF(options) {
|
|
|
85
85
|
datamodelPath: options.datamodelPath
|
|
86
86
|
})
|
|
87
87
|
),
|
|
88
|
-
(0,
|
|
88
|
+
(0, import_chunk_7MD6344A.chainW2)((datamodel) => {
|
|
89
89
|
return (0, import_function.pipe)(
|
|
90
|
-
(0,
|
|
90
|
+
(0, import_chunk_7MD6344A.tryCatch)(
|
|
91
91
|
() => {
|
|
92
92
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
93
93
|
debug("Triggering a Rust panic...");
|
|
94
|
-
|
|
94
|
+
import_chunk_YLJPJLF6.prismaSchemaWasm.debug_panic();
|
|
95
95
|
}
|
|
96
96
|
const params = JSON.stringify({
|
|
97
97
|
prismaSchema: datamodel,
|
|
98
98
|
noColor: Boolean(process.env.NO_COLOR)
|
|
99
99
|
});
|
|
100
|
-
const data =
|
|
100
|
+
const data = import_chunk_YLJPJLF6.prismaSchemaWasm.get_dmmf(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(e) => ({
|
|
@@ -106,11 +106,11 @@ async function getDMMF(options) {
|
|
|
106
106
|
error: e
|
|
107
107
|
})
|
|
108
108
|
),
|
|
109
|
-
(0,
|
|
110
|
-
(0,
|
|
109
|
+
(0, import_chunk_7MD6344A.map)((result) => ({ result })),
|
|
110
|
+
(0, import_chunk_7MD6344A.chainW)(
|
|
111
111
|
({ result }) => (
|
|
112
112
|
// NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
|
|
113
|
-
(0,
|
|
113
|
+
(0, import_chunk_7MD6344A.tryCatch)(
|
|
114
114
|
() => JSON.parse(result),
|
|
115
115
|
(e) => ({
|
|
116
116
|
type: "parse-json",
|
|
@@ -120,12 +120,12 @@ async function getDMMF(options) {
|
|
|
120
120
|
)
|
|
121
121
|
)
|
|
122
122
|
),
|
|
123
|
-
|
|
123
|
+
import_chunk_7MD6344A.fromEither
|
|
124
124
|
);
|
|
125
125
|
})
|
|
126
126
|
);
|
|
127
127
|
const dmmfEither = await dmmfPipeline();
|
|
128
|
-
if ((0,
|
|
128
|
+
if ((0, import_chunk_7MD6344A.isRight)(dmmfEither)) {
|
|
129
129
|
debug("dmmf data retrieved without errors in getDmmf Wasm");
|
|
130
130
|
const { right: data } = dmmfEither;
|
|
131
131
|
return Promise.resolve(data);
|
|
@@ -158,7 +158,7 @@ Datamodel path: "${e.datamodelPath}"`,
|
|
|
158
158
|
return panic;
|
|
159
159
|
}
|
|
160
160
|
const errorOutput = e.error.message;
|
|
161
|
-
return new GetDmmfError((0,
|
|
161
|
+
return new GetDmmfError((0, import_chunk_IAEMHQAC.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
162
162
|
}).with({ type: "parse-json" }, (e) => {
|
|
163
163
|
debugErrorType(e);
|
|
164
164
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
|
@@ -26,8 +26,8 @@ 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_IU5SDZ7K_exports = {};
|
|
30
|
+
__export2(chunk_IU5SDZ7K_exports, {
|
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
33
33
|
checkYarnVersion: () => checkYarnVersion,
|
|
@@ -56,7 +56,7 @@ __export2(chunk_FXT7RHHM_exports, {
|
|
|
56
56
|
sendPanic: () => sendPanic,
|
|
57
57
|
skipIndex: () => skipIndex
|
|
58
58
|
});
|
|
59
|
-
module.exports = __toCommonJS2(
|
|
59
|
+
module.exports = __toCommonJS2(chunk_IU5SDZ7K_exports);
|
|
60
60
|
var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
|
|
61
61
|
var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
|
|
62
62
|
var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
|
|
@@ -81,13 +81,13 @@ var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
|
|
|
81
81
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
|
82
82
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
|
83
83
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
84
|
+
var import_chunk_PWZ47TAW = require("./chunk-PWZ47TAW.js");
|
|
85
|
+
var import_chunk_FIJEBQKU = require("./chunk-FIJEBQKU.js");
|
|
86
|
+
var import_chunk_KECNKSWT = require("./chunk-KECNKSWT.js");
|
|
87
|
+
var import_chunk_IRA3RQXI = require("./chunk-IRA3RQXI.js");
|
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
89
89
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
90
|
-
var
|
|
90
|
+
var import_chunk_YLJPJLF6 = require("./chunk-YLJPJLF6.js");
|
|
91
91
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
|
92
92
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
93
93
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
@@ -97,7 +97,7 @@ var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
|
|
97
97
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
|
98
98
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
99
99
|
var import_chunk_4NFLAUKD = require("./chunk-4NFLAUKD.js");
|
|
100
|
-
var
|
|
100
|
+
var import_chunk_J3JE5NVO = require("./chunk-J3JE5NVO.js");
|
|
101
101
|
var import_chunk_FUUQ6FJ4 = require("./chunk-FUUQ6FJ4.js");
|
|
102
102
|
var import_chunk_KKMREGHN = require("./chunk-KKMREGHN.js");
|
|
103
103
|
var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
|
|
@@ -441,7 +441,7 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
441
441
|
module2.exports = readdirGlob;
|
|
442
442
|
var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
|
443
443
|
var { EventEmitter } = (0, import_chunk_WWAWV7DQ.__require)("events");
|
|
444
|
-
var { Minimatch } = (0,
|
|
444
|
+
var { Minimatch } = (0, import_chunk_J3JE5NVO.require_minimatch)();
|
|
445
445
|
var { resolve } = (0, import_chunk_WWAWV7DQ.__require)("path");
|
|
446
446
|
function readdir(dir2, strict) {
|
|
447
447
|
return new Promise((resolve2, reject2) => {
|
|
@@ -2848,7 +2848,7 @@ var require_stream_writable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2848
2848
|
var Duplex;
|
|
2849
2849
|
Writable.WritableState = WritableState;
|
|
2850
2850
|
var util = Object.create(require_util());
|
|
2851
|
-
util.inherits = (0,
|
|
2851
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
2852
2852
|
var internalUtil = {
|
|
2853
2853
|
deprecate: require_node()
|
|
2854
2854
|
};
|
|
@@ -3286,7 +3286,7 @@ var require_stream_duplex = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3286
3286
|
};
|
|
3287
3287
|
module2.exports = Duplex;
|
|
3288
3288
|
var util = Object.create(require_util());
|
|
3289
|
-
util.inherits = (0,
|
|
3289
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
3290
3290
|
var Readable = require_stream_readable();
|
|
3291
3291
|
var Writable = require_stream_writable();
|
|
3292
3292
|
util.inherits(Duplex, Readable);
|
|
@@ -3607,7 +3607,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3607
3607
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
3608
3608
|
}
|
|
3609
3609
|
var util = Object.create(require_util());
|
|
3610
|
-
util.inherits = (0,
|
|
3610
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
3611
3611
|
var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
|
|
3612
3612
|
var debug8 = void 0;
|
|
3613
3613
|
if (debugUtil && debugUtil.debuglog) {
|
|
@@ -4274,7 +4274,7 @@ var require_stream_transform = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
4274
4274
|
module2.exports = Transform;
|
|
4275
4275
|
var Duplex = require_stream_duplex();
|
|
4276
4276
|
var util = Object.create(require_util());
|
|
4277
|
-
util.inherits = (0,
|
|
4277
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
4278
4278
|
util.inherits(Transform, Duplex);
|
|
4279
4279
|
function afterTransform(er, data) {
|
|
4280
4280
|
var ts = this._transformState;
|
|
@@ -4372,7 +4372,7 @@ var require_stream_passthrough = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
4372
4372
|
module2.exports = PassThrough;
|
|
4373
4373
|
var Transform = require_stream_transform();
|
|
4374
4374
|
var util = Object.create(require_util());
|
|
4375
|
-
util.inherits = (0,
|
|
4375
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
4376
4376
|
util.inherits(PassThrough, Transform);
|
|
4377
4377
|
function PassThrough(options2) {
|
|
4378
4378
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
|
@@ -5658,7 +5658,7 @@ var require_stream_writable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5658
5658
|
var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
|
|
5659
5659
|
var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
|
|
5660
5660
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
5661
|
-
(0,
|
|
5661
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Writable, Stream);
|
|
5662
5662
|
function nop() {
|
|
5663
5663
|
}
|
|
5664
5664
|
function WritableState(options2, stream, isDuplex) {
|
|
@@ -6100,7 +6100,7 @@ var require_stream_duplex2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6100
6100
|
module2.exports = Duplex;
|
|
6101
6101
|
var Readable = require_stream_readable2();
|
|
6102
6102
|
var Writable = require_stream_writable2();
|
|
6103
|
-
(0,
|
|
6103
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Duplex, Readable);
|
|
6104
6104
|
{
|
|
6105
6105
|
keys = objectKeys(Writable.prototype);
|
|
6106
6106
|
for (v = 0; v < keys.length; v++) {
|
|
@@ -6877,7 +6877,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6877
6877
|
var StringDecoder;
|
|
6878
6878
|
var createReadableStreamAsyncIterator;
|
|
6879
6879
|
var from;
|
|
6880
|
-
(0,
|
|
6880
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Readable, Stream);
|
|
6881
6881
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
6882
6882
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
6883
6883
|
function prependListener(emitter, event, fn) {
|
|
@@ -7582,7 +7582,7 @@ var require_stream_transform2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
7582
7582
|
var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
|
|
7583
7583
|
var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
|
|
7584
7584
|
var Duplex = require_stream_duplex2();
|
|
7585
|
-
(0,
|
|
7585
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Transform, Duplex);
|
|
7586
7586
|
function afterTransform(er, data) {
|
|
7587
7587
|
var ts = this._transformState;
|
|
7588
7588
|
ts.transforming = false;
|
|
@@ -7676,7 +7676,7 @@ var require_stream_passthrough2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
7676
7676
|
"use strict";
|
|
7677
7677
|
module2.exports = PassThrough;
|
|
7678
7678
|
var Transform = require_stream_transform2();
|
|
7679
|
-
(0,
|
|
7679
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(PassThrough, Transform);
|
|
7680
7680
|
function PassThrough(options2) {
|
|
7681
7681
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
|
7682
7682
|
Transform.call(this, options2);
|
|
@@ -8550,7 +8550,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
8550
8550
|
var difference = require_difference();
|
|
8551
8551
|
var union = require_union();
|
|
8552
8552
|
var isPlainObject = require_isPlainObject();
|
|
8553
|
-
var glob = (0,
|
|
8553
|
+
var glob = (0, import_chunk_J3JE5NVO.require_glob)();
|
|
8554
8554
|
var file = module2.exports = {};
|
|
8555
8555
|
var pathSeparatorRe = /[\/\\]/g;
|
|
8556
8556
|
var processPatterns = function(patterns, fn) {
|
|
@@ -14746,7 +14746,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
|
14746
14746
|
}
|
|
14747
14747
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
|
14748
14748
|
debug2("Loading config");
|
|
14749
|
-
const config2 = await (0,
|
|
14749
|
+
const config2 = await (0, import_chunk_KECNKSWT.getConfig)({
|
|
14750
14750
|
datamodel: files,
|
|
14751
14751
|
ignoreEnvVarErrors: true
|
|
14752
14752
|
});
|
|
@@ -14855,7 +14855,7 @@ function renderDefaultLookupError(error, cwd) {
|
|
|
14855
14855
|
return parts.join("\n");
|
|
14856
14856
|
}
|
|
14857
14857
|
async function getPrismaConfigFromPackageJson(cwd) {
|
|
14858
|
-
const pkgJson = await (0,
|
|
14858
|
+
const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
|
|
14859
14859
|
const prismaPropertyFromPkgJson = pkgJson?.packageJson?.prisma;
|
|
14860
14860
|
if (!pkgJson) {
|
|
14861
14861
|
return null;
|
|
@@ -15028,7 +15028,7 @@ function isPkgJsonWorkspaceRoot(pkgJson) {
|
|
|
15028
15028
|
return Array.isArray(workspaces) || workspaces.packages !== void 0;
|
|
15029
15029
|
}
|
|
15030
15030
|
async function isNearestPkgJsonWorkspaceRoot(cwd) {
|
|
15031
|
-
const pkgJson = await (0,
|
|
15031
|
+
const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
|
|
15032
15032
|
if (!pkgJson) {
|
|
15033
15033
|
return null;
|
|
15034
15034
|
}
|
|
@@ -15138,8 +15138,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
|
15138
15138
|
if (argName.includes("schema")) {
|
|
15139
15139
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
|
15140
15140
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
|
15141
|
-
const config2 = await (0,
|
|
15142
|
-
const url = (0,
|
|
15141
|
+
const config2 = await (0, import_chunk_KECNKSWT.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
|
15142
|
+
const url = (0, import_chunk_KECNKSWT.resolveUrl)((0, import_chunk_KECNKSWT.getEffectiveUrl)(config2.datasources[0]));
|
|
15143
15143
|
if (url?.startsWith("prisma://")) {
|
|
15144
15144
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
|
15145
15145
|
}
|
|
@@ -15160,7 +15160,7 @@ function getCLIPathHash() {
|
|
|
15160
15160
|
const cliPath = process.argv[1];
|
|
15161
15161
|
return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
|
|
15162
15162
|
}
|
|
15163
|
-
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
15163
|
+
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_J3JE5NVO.require_p_map)());
|
|
15164
15164
|
var debug4 = (0, import_debug6.default)("prisma:generator");
|
|
15165
15165
|
async function checkTypeScriptVersion() {
|
|
15166
15166
|
const minVersion = "4.1.0";
|
|
@@ -15343,7 +15343,7 @@ async function getGenerators(options) {
|
|
|
15343
15343
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
|
15344
15344
|
}
|
|
15345
15345
|
}
|
|
15346
|
-
const config = await (0,
|
|
15346
|
+
const config = await (0, import_chunk_KECNKSWT.getConfig)({
|
|
15347
15347
|
datamodel: schemas,
|
|
15348
15348
|
datamodelPath: schemaPath,
|
|
15349
15349
|
prismaPath,
|
|
@@ -15354,7 +15354,7 @@ async function getGenerators(options) {
|
|
|
15354
15354
|
}
|
|
15355
15355
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
|
15356
15356
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
|
15357
|
-
const dmmf = await (0,
|
|
15357
|
+
const dmmf = await (0, import_chunk_IRA3RQXI.getDMMF)({
|
|
15358
15358
|
datamodel: schemas,
|
|
15359
15359
|
datamodelPath: schemaPath,
|
|
15360
15360
|
prismaPath,
|
|
@@ -15415,7 +15415,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
|
15415
15415
|
fromEnvVar: "null"
|
|
15416
15416
|
};
|
|
15417
15417
|
}
|
|
15418
|
-
const datamodel = (0,
|
|
15418
|
+
const datamodel = (0, import_chunk_FIJEBQKU.mergeSchemas)({ schemas });
|
|
15419
15419
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
|
15420
15420
|
const options2 = {
|
|
15421
15421
|
datamodel,
|
|
@@ -15498,7 +15498,7 @@ generator gen {
|
|
|
15498
15498
|
debug6({ generatorBinaryPaths });
|
|
15499
15499
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
15500
15500
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
15501
|
-
const customDmmf = await (0,
|
|
15501
|
+
const customDmmf = await (0, import_chunk_IRA3RQXI.getDMMF)({
|
|
15502
15502
|
datamodel: schemas,
|
|
15503
15503
|
datamodelPath: schemaPath,
|
|
15504
15504
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
|
@@ -15796,7 +15796,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
15796
15796
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
15797
15797
|
handleFormatPanic(
|
|
15798
15798
|
() => {
|
|
15799
|
-
|
|
15799
|
+
import_chunk_YLJPJLF6.prismaSchemaWasm.debug_panic();
|
|
15800
15800
|
},
|
|
15801
15801
|
{ schemas: schemas2 }
|
|
15802
15802
|
);
|
|
@@ -15816,12 +15816,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
15816
15816
|
() => {
|
|
15817
15817
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
|
15818
15818
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
15819
|
-
const lintDiagnostics2 = (0,
|
|
15819
|
+
const lintDiagnostics2 = (0, import_chunk_PWZ47TAW.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
15820
15820
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
15821
15821
|
},
|
|
15822
15822
|
{ schemas: schemas2 }
|
|
15823
15823
|
);
|
|
15824
|
-
const lintWarnings = (0,
|
|
15824
|
+
const lintWarnings = (0, import_chunk_PWZ47TAW.getLintWarningsAsText)(lintDiagnostics);
|
|
15825
15825
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
|
15826
15826
|
console.warn(lintWarnings);
|
|
15827
15827
|
}
|
|
@@ -15851,7 +15851,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
|
15851
15851
|
}
|
|
15852
15852
|
}
|
|
15853
15853
|
function formatWasm(schema, documentFormattingParams) {
|
|
15854
|
-
const formattedSchema =
|
|
15854
|
+
const formattedSchema = import_chunk_YLJPJLF6.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
15855
15855
|
return formattedSchema;
|
|
15856
15856
|
}
|
|
15857
15857
|
/*! Bundled license information:
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_J3JE5NVO_exports = {};
|
|
30
|
+
__export(chunk_J3JE5NVO_exports, {
|
|
31
31
|
getPackedPackage: () => getPackedPackage,
|
|
32
32
|
readPackageUp: () => readPackageUp,
|
|
33
33
|
require_glob: () => require_glob,
|
|
@@ -35,7 +35,7 @@ __export(chunk_ESY3UZBI_exports, {
|
|
|
35
35
|
require_minimatch: () => require_minimatch,
|
|
36
36
|
require_p_map: () => require_p_map
|
|
37
37
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
38
|
+
module.exports = __toCommonJS(chunk_J3JE5NVO_exports);
|
|
39
39
|
var import_chunk_FUUQ6FJ4 = require("./chunk-FUUQ6FJ4.js");
|
|
40
40
|
var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
|
|
41
41
|
var import_chunk_T5RACBRF = require("./chunk-T5RACBRF.js");
|
|
@@ -5005,7 +5005,7 @@ ${frame}`;
|
|
|
5005
5005
|
}
|
|
5006
5006
|
});
|
|
5007
5007
|
var require_debug = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5008
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5008
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js"(exports, module2) {
|
|
5009
5009
|
"use strict";
|
|
5010
5010
|
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
5011
5011
|
};
|
|
@@ -5013,7 +5013,7 @@ var require_debug = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5013
5013
|
}
|
|
5014
5014
|
});
|
|
5015
5015
|
var require_constants = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5016
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5016
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js"(exports, module2) {
|
|
5017
5017
|
"use strict";
|
|
5018
5018
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
5019
5019
|
var MAX_LENGTH = 256;
|
|
@@ -5043,7 +5043,7 @@ var require_constants = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5043
5043
|
}
|
|
5044
5044
|
});
|
|
5045
5045
|
var require_re = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5046
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5046
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js"(exports, module2) {
|
|
5047
5047
|
"use strict";
|
|
5048
5048
|
var {
|
|
5049
5049
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
@@ -5127,7 +5127,7 @@ var require_re = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5127
5127
|
}
|
|
5128
5128
|
});
|
|
5129
5129
|
var require_parse_options = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5130
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5130
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js"(exports, module2) {
|
|
5131
5131
|
"use strict";
|
|
5132
5132
|
var looseOption = Object.freeze({ loose: true });
|
|
5133
5133
|
var emptyOpts = Object.freeze({});
|
|
@@ -5144,7 +5144,7 @@ var require_parse_options = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5144
5144
|
}
|
|
5145
5145
|
});
|
|
5146
5146
|
var require_identifiers = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5147
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5147
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js"(exports, module2) {
|
|
5148
5148
|
"use strict";
|
|
5149
5149
|
var numeric = /^[0-9]+$/;
|
|
5150
5150
|
var compareIdentifiers = (a, b) => {
|
|
@@ -5164,7 +5164,7 @@ var require_identifiers = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5164
5164
|
}
|
|
5165
5165
|
});
|
|
5166
5166
|
var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5167
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5167
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js"(exports, module2) {
|
|
5168
5168
|
"use strict";
|
|
5169
5169
|
var debug = require_debug();
|
|
5170
5170
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
@@ -5405,7 +5405,7 @@ var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5405
5405
|
}
|
|
5406
5406
|
});
|
|
5407
5407
|
var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5408
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5408
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js"(exports, module2) {
|
|
5409
5409
|
"use strict";
|
|
5410
5410
|
var SemVer = require_semver();
|
|
5411
5411
|
var parse = (version, options, throwErrors = false) => {
|
|
@@ -5425,7 +5425,7 @@ var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5425
5425
|
}
|
|
5426
5426
|
});
|
|
5427
5427
|
var require_valid = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5428
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5428
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js"(exports, module2) {
|
|
5429
5429
|
"use strict";
|
|
5430
5430
|
var parse = require_parse();
|
|
5431
5431
|
var valid = (version, options) => {
|
|
@@ -5436,7 +5436,7 @@ var require_valid = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5436
5436
|
}
|
|
5437
5437
|
});
|
|
5438
5438
|
var require_clean = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5439
|
-
"../../node_modules/.pnpm/semver@7.6.
|
|
5439
|
+
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js"(exports, module2) {
|
|
5440
5440
|
"use strict";
|
|
5441
5441
|
var parse = require_parse();
|
|
5442
5442
|
var clean = (version, options) => {
|
|
@@ -5447,7 +5447,7 @@ var require_clean = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5447
5447
|
}
|
|
5448
5448
|
});
|
|
5449
5449
|
var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5450
|
-
"../../node_modules/.pnpm/spdx-license-ids@3.0.
|
|
5450
|
+
"../../node_modules/.pnpm/spdx-license-ids@3.0.20/node_modules/spdx-license-ids/index.json"(exports, module2) {
|
|
5451
5451
|
module2.exports = [
|
|
5452
5452
|
"0BSD",
|
|
5453
5453
|
"3D-Slicer-1.0",
|
|
@@ -5647,6 +5647,8 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5647
5647
|
"DRL-1.0",
|
|
5648
5648
|
"DRL-1.1",
|
|
5649
5649
|
"DSDP",
|
|
5650
|
+
"DocBook-Schema",
|
|
5651
|
+
"DocBook-XML",
|
|
5650
5652
|
"Dotseqn",
|
|
5651
5653
|
"ECL-1.0",
|
|
5652
5654
|
"ECL-2.0",
|
|
@@ -5710,6 +5712,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5710
5712
|
"Glulxe",
|
|
5711
5713
|
"Graphics-Gems",
|
|
5712
5714
|
"Gutmann",
|
|
5715
|
+
"HIDAPI",
|
|
5713
5716
|
"HP-1986",
|
|
5714
5717
|
"HP-1989",
|
|
5715
5718
|
"HPND",
|
|
@@ -5720,6 +5723,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5720
5723
|
"HPND-Kevlin-Henney",
|
|
5721
5724
|
"HPND-MIT-disclaimer",
|
|
5722
5725
|
"HPND-Markus-Kuhn",
|
|
5726
|
+
"HPND-Netrek",
|
|
5723
5727
|
"HPND-Pbmplus",
|
|
5724
5728
|
"HPND-UC",
|
|
5725
5729
|
"HPND-UC-export-US",
|
|
@@ -5853,7 +5857,6 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5853
5857
|
"NTP",
|
|
5854
5858
|
"NTP-0",
|
|
5855
5859
|
"Naumen",
|
|
5856
|
-
"Net-SNMP",
|
|
5857
5860
|
"NetCDF",
|
|
5858
5861
|
"Newsletr",
|
|
5859
5862
|
"Nokia",
|
|
@@ -5935,6 +5938,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5935
5938
|
"RSCPL",
|
|
5936
5939
|
"Rdisc",
|
|
5937
5940
|
"Ruby",
|
|
5941
|
+
"Ruby-pty",
|
|
5938
5942
|
"SAX-PD",
|
|
5939
5943
|
"SAX-PD-2.0",
|
|
5940
5944
|
"SCEA",
|
|
@@ -5991,6 +5995,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5991
5995
|
"UMich-Merit",
|
|
5992
5996
|
"UPL-1.0",
|
|
5993
5997
|
"URT-RLE",
|
|
5998
|
+
"Ubuntu-font-1.0",
|
|
5994
5999
|
"Unicode-3.0",
|
|
5995
6000
|
"Unicode-DFS-2015",
|
|
5996
6001
|
"Unicode-DFS-2016",
|
|
@@ -6009,6 +6014,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6009
6014
|
"Wsuipa",
|
|
6010
6015
|
"X11",
|
|
6011
6016
|
"X11-distribute-modifications-variant",
|
|
6017
|
+
"X11-swapped",
|
|
6012
6018
|
"XFree86-1.1",
|
|
6013
6019
|
"XSkat",
|
|
6014
6020
|
"Xdebug-1.03",
|
|
@@ -26,25 +26,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_J5VHVBMJ_exports = {};
|
|
30
|
+
__export(chunk_J5VHVBMJ_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_J5VHVBMJ_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_CWDPU7YC = require("./chunk-CWDPU7YC.js");
|
|
39
|
+
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_YLJPJLF6 = require("./chunk-YLJPJLF6.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
|
-
var
|
|
43
|
+
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
47
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
47
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:validate");
|
|
49
49
|
var ValidateError = class extends Error {
|
|
50
50
|
constructor(params) {
|
|
@@ -60,25 +60,25 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: validate]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_CWDPU7YC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "ValidateError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
function validate(options) {
|
|
68
|
-
const debugErrorType = (0,
|
|
68
|
+
const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "validateWasm");
|
|
69
69
|
debug(`Using validate Wasm`);
|
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
|
71
|
-
(0,
|
|
71
|
+
(0, import_chunk_7MD6344A.tryCatch)(
|
|
72
72
|
() => {
|
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
74
74
|
debug("Triggering a Rust panic...");
|
|
75
|
-
|
|
75
|
+
import_chunk_YLJPJLF6.prismaSchemaWasm.debug_panic();
|
|
76
76
|
}
|
|
77
77
|
const params = JSON.stringify({
|
|
78
78
|
prismaSchema: options.schemas,
|
|
79
79
|
noColor: Boolean(process.env.NO_COLOR)
|
|
80
80
|
});
|
|
81
|
-
|
|
81
|
+
import_chunk_YLJPJLF6.prismaSchemaWasm.validate(params);
|
|
82
82
|
},
|
|
83
83
|
(e) => ({
|
|
84
84
|
type: "wasm-error",
|
|
@@ -87,7 +87,7 @@ function validate(options) {
|
|
|
87
87
|
})
|
|
88
88
|
)
|
|
89
89
|
);
|
|
90
|
-
if ((0,
|
|
90
|
+
if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
const error = (0, import_chunk_H3T4L34H.$)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
|
@@ -113,7 +113,7 @@ function validate(options) {
|
|
|
113
113
|
return panic;
|
|
114
114
|
}
|
|
115
115
|
const errorOutput = e.error.message;
|
|
116
|
-
return new ValidateError((0,
|
|
116
|
+
return new ValidateError((0, import_chunk_IAEMHQAC.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
117
117
|
}).exhaustive();
|
|
118
118
|
throw error;
|
|
119
119
|
}
|