@prisma/internals 6.4.0-dev.5 → 6.4.0-dev.6
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-F5VBX6Y4.js → chunk-56HBFBUF.js} +7 -7
- package/dist/{chunk-XC3NYQVT.js → chunk-7BHXAYOW.js} +8 -8
- package/dist/{chunk-LJRCWTLC.js → chunk-7FF4ZVCI.js} +5 -5
- package/dist/{chunk-YCOIQECP.js → chunk-CXZ6YCPF.js} +5 -5
- package/dist/{chunk-XBUCP3DT.js → chunk-F2IGKXTU.js} +34 -34
- package/dist/{chunk-MBTZNEEC.js → chunk-FZPBKCKA.js} +5 -5
- package/dist/{chunk-5UBNMSJR.js → chunk-IRYJZDWL.js} +18 -18
- package/dist/{chunk-L5KCWFB7.js → chunk-IT6GZE75.js} +8 -8
- package/dist/{chunk-PPGT7NVR.js → chunk-R5G2JGBH.js} +8 -8
- package/dist/{chunk-GWEYKYPW.js → chunk-RFSMNKLH.js} +4 -4
- package/dist/{chunk-B2T5HDW7.js → chunk-RL3K4V2J.js} +29 -15
- package/dist/{chunk-WVHOPIMV.js → chunk-SZ5HYXCG.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +13 -13
- package/dist/cli/getSchema.js +18 -18
- package/dist/cli/hashes.js +13 -13
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +12 -12
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +21 -21
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +12 -12
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +12 -12
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +13 -13
- package/dist/get-generators/getGenerators.js +15 -15
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.js +41 -41
- package/dist/sendPanic.js +12 -12
- package/dist/utils/getEnvPaths.js +12 -12
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +12 -12
- package/dist/utils/loadEnvFile.js +12 -12
- package/dist/wasm.js +4 -4
- package/package.json +7 -7
@@ -26,19 +26,19 @@ 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_56HBFBUF_exports = {};
|
30
|
+
__export(chunk_56HBFBUF_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_56HBFBUF_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_CXZ6YCPF = require("./chunk-CXZ6YCPF.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
41
|
+
var import_chunk_SZ5HYXCG = require("./chunk-SZ5HYXCG.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_CXZ6YCPF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_SZ5HYXCG.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -26,18 +26,18 @@ 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_7BHXAYOW_exports = {};
|
30
|
+
__export(chunk_7BHXAYOW_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_7BHXAYOW_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
|
37
|
-
var
|
37
|
+
var import_chunk_CXZ6YCPF = require("./chunk-CXZ6YCPF.js");
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
39
39
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
40
|
-
var
|
40
|
+
var import_chunk_SZ5HYXCG = require("./chunk-SZ5HYXCG.js");
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
42
42
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: getDmmf]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_CXZ6YCPF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "GetDmmfError";
|
65
65
|
}
|
66
66
|
};
|
@@ -90,13 +90,13 @@ async function getDMMF(options) {
|
|
90
90
|
() => {
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
92
92
|
debug("Triggering a Rust panic...");
|
93
|
-
|
93
|
+
import_chunk_SZ5HYXCG.prismaSchemaWasm.debug_panic();
|
94
94
|
}
|
95
95
|
const params = JSON.stringify({
|
96
96
|
prismaSchema: datamodel,
|
97
97
|
noColor: Boolean(process.env.NO_COLOR)
|
98
98
|
});
|
99
|
-
const data =
|
99
|
+
const data = import_chunk_SZ5HYXCG.prismaSchemaWasm.get_dmmf(params);
|
100
100
|
return data;
|
101
101
|
},
|
102
102
|
(e) => ({
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
19
|
+
var chunk_7FF4ZVCI_exports = {};
|
20
|
+
__export(chunk_7FF4ZVCI_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_7FF4ZVCI_exports);
|
24
|
+
var import_chunk_RFSMNKLH = require("./chunk-RFSMNKLH.js");
|
25
|
+
var packageJson = (0, import_chunk_RFSMNKLH.require_package)();
|
26
26
|
var version = packageJson.version;
|
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
19
|
+
var chunk_CXZ6YCPF_exports = {};
|
20
|
+
__export(chunk_CXZ6YCPF_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_CXZ6YCPF_exports);
|
24
|
+
var import_chunk_7FF4ZVCI = require("./chunk-7FF4ZVCI.js");
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
27
|
-
const rows = [["Prisma CLI Version",
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_7FF4ZVCI.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_F2IGKXTU_exports = {};
|
30
|
+
__export2(chunk_F2IGKXTU_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug5,
|
@@ -55,7 +55,7 @@ __export2(chunk_XBUCP3DT_exports, {
|
|
55
55
|
sendPanic: () => sendPanic,
|
56
56
|
skipIndex: () => skipIndex
|
57
57
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
58
|
+
module.exports = __toCommonJS2(chunk_F2IGKXTU_exports);
|
59
59
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
60
60
|
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
61
61
|
var import_chunk_PIPE5DSU = require("./chunk-PIPE5DSU.js");
|
@@ -80,14 +80,14 @@ var import_chunk_AC6EAR56 = require("./chunk-AC6EAR56.js");
|
|
80
80
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
81
81
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
82
82
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
83
|
-
var
|
84
|
-
var
|
83
|
+
var import_chunk_FZPBKCKA = require("./chunk-FZPBKCKA.js");
|
84
|
+
var import_chunk_56HBFBUF = require("./chunk-56HBFBUF.js");
|
85
85
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
86
|
-
var
|
87
|
-
var
|
86
|
+
var import_chunk_R5G2JGBH = require("./chunk-R5G2JGBH.js");
|
87
|
+
var import_chunk_7BHXAYOW = require("./chunk-7BHXAYOW.js");
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
89
89
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
90
|
-
var
|
90
|
+
var import_chunk_SZ5HYXCG = require("./chunk-SZ5HYXCG.js");
|
91
91
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
92
92
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
93
93
|
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
@@ -95,7 +95,7 @@ var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
95
95
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
96
96
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
97
97
|
var import_chunk_KQOJB3ZW = require("./chunk-KQOJB3ZW.js");
|
98
|
-
var
|
98
|
+
var import_chunk_RL3K4V2J = require("./chunk-RL3K4V2J.js");
|
99
99
|
var import_chunk_YXD4CJDK = require("./chunk-YXD4CJDK.js");
|
100
100
|
var import_chunk_53LS3WUO = require("./chunk-53LS3WUO.js");
|
101
101
|
var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
|
@@ -439,7 +439,7 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
439
439
|
module2.exports = readdirGlob;
|
440
440
|
var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
441
441
|
var { EventEmitter } = (0, import_chunk_WWAWV7DQ.__require)("events");
|
442
|
-
var { Minimatch } = (0,
|
442
|
+
var { Minimatch } = (0, import_chunk_RL3K4V2J.require_minimatch)();
|
443
443
|
var { resolve } = (0, import_chunk_WWAWV7DQ.__require)("path");
|
444
444
|
function readdir(dir2, strict) {
|
445
445
|
return new Promise((resolve2, reject2) => {
|
@@ -2850,7 +2850,7 @@ var require_stream_writable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2850
2850
|
var Duplex;
|
2851
2851
|
Writable.WritableState = WritableState;
|
2852
2852
|
var util = Object.create(require_util());
|
2853
|
-
util.inherits = (0,
|
2853
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
2854
2854
|
var internalUtil = {
|
2855
2855
|
deprecate: require_node()
|
2856
2856
|
};
|
@@ -3288,7 +3288,7 @@ var require_stream_duplex = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3288
3288
|
};
|
3289
3289
|
module2.exports = Duplex;
|
3290
3290
|
var util = Object.create(require_util());
|
3291
|
-
util.inherits = (0,
|
3291
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
3292
3292
|
var Readable = require_stream_readable();
|
3293
3293
|
var Writable = require_stream_writable();
|
3294
3294
|
util.inherits(Duplex, Readable);
|
@@ -3609,7 +3609,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3609
3609
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
3610
3610
|
}
|
3611
3611
|
var util = Object.create(require_util());
|
3612
|
-
util.inherits = (0,
|
3612
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
3613
3613
|
var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
|
3614
3614
|
var debug8 = void 0;
|
3615
3615
|
if (debugUtil && debugUtil.debuglog) {
|
@@ -4276,7 +4276,7 @@ var require_stream_transform = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4276
4276
|
module2.exports = Transform;
|
4277
4277
|
var Duplex = require_stream_duplex();
|
4278
4278
|
var util = Object.create(require_util());
|
4279
|
-
util.inherits = (0,
|
4279
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
4280
4280
|
util.inherits(Transform, Duplex);
|
4281
4281
|
function afterTransform(er, data) {
|
4282
4282
|
var ts = this._transformState;
|
@@ -4374,7 +4374,7 @@ var require_stream_passthrough = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4374
4374
|
module2.exports = PassThrough;
|
4375
4375
|
var Transform = require_stream_transform();
|
4376
4376
|
var util = Object.create(require_util());
|
4377
|
-
util.inherits = (0,
|
4377
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
4378
4378
|
util.inherits(PassThrough, Transform);
|
4379
4379
|
function PassThrough(options2) {
|
4380
4380
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
@@ -5660,7 +5660,7 @@ var require_stream_writable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5660
5660
|
var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
|
5661
5661
|
var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
|
5662
5662
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
5663
|
-
(0,
|
5663
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Writable, Stream);
|
5664
5664
|
function nop() {
|
5665
5665
|
}
|
5666
5666
|
function WritableState(options2, stream, isDuplex) {
|
@@ -6102,7 +6102,7 @@ var require_stream_duplex2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6102
6102
|
module2.exports = Duplex;
|
6103
6103
|
var Readable = require_stream_readable2();
|
6104
6104
|
var Writable = require_stream_writable2();
|
6105
|
-
(0,
|
6105
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Duplex, Readable);
|
6106
6106
|
{
|
6107
6107
|
keys = objectKeys(Writable.prototype);
|
6108
6108
|
for (v = 0; v < keys.length; v++) {
|
@@ -6879,7 +6879,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6879
6879
|
var StringDecoder;
|
6880
6880
|
var createReadableStreamAsyncIterator;
|
6881
6881
|
var from;
|
6882
|
-
(0,
|
6882
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Readable, Stream);
|
6883
6883
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
6884
6884
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
6885
6885
|
function prependListener(emitter, event, fn) {
|
@@ -7584,7 +7584,7 @@ var require_stream_transform2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7584
7584
|
var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
|
7585
7585
|
var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
|
7586
7586
|
var Duplex = require_stream_duplex2();
|
7587
|
-
(0,
|
7587
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Transform, Duplex);
|
7588
7588
|
function afterTransform(er, data) {
|
7589
7589
|
var ts = this._transformState;
|
7590
7590
|
ts.transforming = false;
|
@@ -7678,7 +7678,7 @@ var require_stream_passthrough2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7678
7678
|
"use strict";
|
7679
7679
|
module2.exports = PassThrough;
|
7680
7680
|
var Transform = require_stream_transform2();
|
7681
|
-
(0,
|
7681
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(PassThrough, Transform);
|
7682
7682
|
function PassThrough(options2) {
|
7683
7683
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
7684
7684
|
Transform.call(this, options2);
|
@@ -8552,7 +8552,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8552
8552
|
var difference = require_difference();
|
8553
8553
|
var union = require_union();
|
8554
8554
|
var isPlainObject = require_isPlainObject();
|
8555
|
-
var glob = (0,
|
8555
|
+
var glob = (0, import_chunk_RL3K4V2J.require_glob)();
|
8556
8556
|
var file = module2.exports = {};
|
8557
8557
|
var pathSeparatorRe = /[\/\\]/g;
|
8558
8558
|
var processPatterns = function(patterns, fn) {
|
@@ -14751,7 +14751,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
14751
14751
|
}
|
14752
14752
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
14753
14753
|
debug2("Loading config");
|
14754
|
-
const config2 = await (0,
|
14754
|
+
const config2 = await (0, import_chunk_R5G2JGBH.getConfig)({
|
14755
14755
|
datamodel: files,
|
14756
14756
|
ignoreEnvVarErrors: true
|
14757
14757
|
});
|
@@ -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_RL3K4V2J.readPackageUp)({ cwd, normalize: false });
|
14859
14859
|
const prismaPropertyFromPkgJson = pkgJson?.packageJson?.prisma;
|
14860
14860
|
if (!pkgJson) {
|
14861
14861
|
return null;
|
@@ -15059,8 +15059,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
15059
15059
|
if (argName.includes("schema")) {
|
15060
15060
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
15061
15061
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
15062
|
-
const config2 = await (0,
|
15063
|
-
const url = (0,
|
15062
|
+
const config2 = await (0, import_chunk_R5G2JGBH.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
15063
|
+
const url = (0, import_chunk_R5G2JGBH.resolveUrl)((0, import_chunk_R5G2JGBH.getEffectiveUrl)(config2.datasources[0]));
|
15064
15064
|
if (url?.startsWith("prisma://")) {
|
15065
15065
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
15066
15066
|
}
|
@@ -15081,7 +15081,7 @@ function getCLIPathHash() {
|
|
15081
15081
|
const cliPath = process.argv[1];
|
15082
15082
|
return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
|
15083
15083
|
}
|
15084
|
-
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
15084
|
+
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_RL3K4V2J.require_p_map)());
|
15085
15085
|
var debug4 = (0, import_debug6.default)("prisma:generator");
|
15086
15086
|
async function checkTypeScriptVersion() {
|
15087
15087
|
const minVersion = "4.1.0";
|
@@ -15232,7 +15232,7 @@ async function getGenerators(options) {
|
|
15232
15232
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
15233
15233
|
}
|
15234
15234
|
}
|
15235
|
-
const config = await (0,
|
15235
|
+
const config = await (0, import_chunk_R5G2JGBH.getConfig)({
|
15236
15236
|
datamodel: schemas,
|
15237
15237
|
datamodelPath: schemaPath,
|
15238
15238
|
prismaPath,
|
@@ -15243,7 +15243,7 @@ async function getGenerators(options) {
|
|
15243
15243
|
}
|
15244
15244
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
15245
15245
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
15246
|
-
const dmmf = await (0,
|
15246
|
+
const dmmf = await (0, import_chunk_7BHXAYOW.getDMMF)({
|
15247
15247
|
datamodel: schemas,
|
15248
15248
|
datamodelPath: schemaPath,
|
15249
15249
|
prismaPath,
|
@@ -15304,7 +15304,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
15304
15304
|
fromEnvVar: "null"
|
15305
15305
|
};
|
15306
15306
|
}
|
15307
|
-
const datamodel = (0,
|
15307
|
+
const datamodel = (0, import_chunk_56HBFBUF.mergeSchemas)({ schemas });
|
15308
15308
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
15309
15309
|
const options2 = {
|
15310
15310
|
datamodel,
|
@@ -15387,7 +15387,7 @@ generator gen {
|
|
15387
15387
|
debug6({ generatorBinaryPaths });
|
15388
15388
|
generator.setBinaryPaths(generatorBinaryPaths);
|
15389
15389
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
15390
|
-
const customDmmf = await (0,
|
15390
|
+
const customDmmf = await (0, import_chunk_7BHXAYOW.getDMMF)({
|
15391
15391
|
datamodel: schemas,
|
15392
15392
|
datamodelPath: schemaPath,
|
15393
15393
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
@@ -15685,7 +15685,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15685
15685
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
15686
15686
|
handleFormatPanic(
|
15687
15687
|
() => {
|
15688
|
-
|
15688
|
+
import_chunk_SZ5HYXCG.prismaSchemaWasm.debug_panic();
|
15689
15689
|
},
|
15690
15690
|
{ schemas: schemas2 }
|
15691
15691
|
);
|
@@ -15705,12 +15705,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15705
15705
|
() => {
|
15706
15706
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
15707
15707
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
15708
|
-
const lintDiagnostics2 = (0,
|
15708
|
+
const lintDiagnostics2 = (0, import_chunk_FZPBKCKA.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
15709
15709
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
15710
15710
|
},
|
15711
15711
|
{ schemas: schemas2 }
|
15712
15712
|
);
|
15713
|
-
const lintWarnings = (0,
|
15713
|
+
const lintWarnings = (0, import_chunk_FZPBKCKA.getLintWarningsAsText)(lintDiagnostics);
|
15714
15714
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
15715
15715
|
console.warn(lintWarnings);
|
15716
15716
|
}
|
@@ -15740,7 +15740,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
15740
15740
|
}
|
15741
15741
|
}
|
15742
15742
|
function formatWasm(schema, documentFormattingParams) {
|
15743
|
-
const formattedSchema =
|
15743
|
+
const formattedSchema = import_chunk_SZ5HYXCG.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
15744
15744
|
return formattedSchema;
|
15745
15745
|
}
|
15746
15746
|
/*! Bundled license information:
|
@@ -16,21 +16,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
19
|
+
var chunk_FZPBKCKA_exports = {};
|
20
|
+
__export(chunk_FZPBKCKA_exports, {
|
21
21
|
getLintWarnings: () => getLintWarnings,
|
22
22
|
getLintWarningsAsText: () => getLintWarningsAsText,
|
23
23
|
handleLintPanic: () => handleLintPanic,
|
24
24
|
lintSchema: () => lintSchema,
|
25
25
|
warningToString: () => warningToString
|
26
26
|
});
|
27
|
-
module.exports = __toCommonJS(
|
27
|
+
module.exports = __toCommonJS(chunk_FZPBKCKA_exports);
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
29
|
-
var
|
29
|
+
var import_chunk_SZ5HYXCG = require("./chunk-SZ5HYXCG.js");
|
30
30
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
31
31
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
32
32
|
function lintSchema({ schemas }) {
|
33
|
-
const lintResult =
|
33
|
+
const lintResult = import_chunk_SZ5HYXCG.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
35
35
|
return lintDiagnostics;
|
36
36
|
}
|
@@ -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_IRYJZDWL_exports = {};
|
30
|
+
__export2(chunk_IRYJZDWL_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug5,
|
@@ -55,7 +55,7 @@ __export2(chunk_5UBNMSJR_exports, {
|
|
55
55
|
sendPanic: () => sendPanic,
|
56
56
|
skipIndex: () => skipIndex
|
57
57
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
58
|
+
module.exports = __toCommonJS2(chunk_IRYJZDWL_exports);
|
59
59
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
60
60
|
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
61
61
|
var import_chunk_PIPE5DSU = require("./chunk-PIPE5DSU.js");
|
@@ -95,7 +95,7 @@ var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
95
95
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
96
96
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
97
97
|
var import_chunk_KQOJB3ZW = require("./chunk-KQOJB3ZW.js");
|
98
|
-
var
|
98
|
+
var import_chunk_RL3K4V2J = require("./chunk-RL3K4V2J.js");
|
99
99
|
var import_chunk_YXD4CJDK = require("./chunk-YXD4CJDK.js");
|
100
100
|
var import_chunk_53LS3WUO = require("./chunk-53LS3WUO.js");
|
101
101
|
var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
|
@@ -439,7 +439,7 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
439
439
|
module2.exports = readdirGlob;
|
440
440
|
var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
441
441
|
var { EventEmitter } = (0, import_chunk_WWAWV7DQ.__require)("events");
|
442
|
-
var { Minimatch } = (0,
|
442
|
+
var { Minimatch } = (0, import_chunk_RL3K4V2J.require_minimatch)();
|
443
443
|
var { resolve } = (0, import_chunk_WWAWV7DQ.__require)("path");
|
444
444
|
function readdir(dir2, strict) {
|
445
445
|
return new Promise((resolve2, reject2) => {
|
@@ -2850,7 +2850,7 @@ var require_stream_writable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
2850
2850
|
var Duplex;
|
2851
2851
|
Writable.WritableState = WritableState;
|
2852
2852
|
var util = Object.create(require_util());
|
2853
|
-
util.inherits = (0,
|
2853
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
2854
2854
|
var internalUtil = {
|
2855
2855
|
deprecate: require_node()
|
2856
2856
|
};
|
@@ -3288,7 +3288,7 @@ var require_stream_duplex = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3288
3288
|
};
|
3289
3289
|
module2.exports = Duplex;
|
3290
3290
|
var util = Object.create(require_util());
|
3291
|
-
util.inherits = (0,
|
3291
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
3292
3292
|
var Readable = require_stream_readable();
|
3293
3293
|
var Writable = require_stream_writable();
|
3294
3294
|
util.inherits(Duplex, Readable);
|
@@ -3609,7 +3609,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
3609
3609
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
3610
3610
|
}
|
3611
3611
|
var util = Object.create(require_util());
|
3612
|
-
util.inherits = (0,
|
3612
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
3613
3613
|
var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
|
3614
3614
|
var debug8 = void 0;
|
3615
3615
|
if (debugUtil && debugUtil.debuglog) {
|
@@ -4276,7 +4276,7 @@ var require_stream_transform = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4276
4276
|
module2.exports = Transform;
|
4277
4277
|
var Duplex = require_stream_duplex();
|
4278
4278
|
var util = Object.create(require_util());
|
4279
|
-
util.inherits = (0,
|
4279
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
4280
4280
|
util.inherits(Transform, Duplex);
|
4281
4281
|
function afterTransform(er, data) {
|
4282
4282
|
var ts = this._transformState;
|
@@ -4374,7 +4374,7 @@ var require_stream_passthrough = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4374
4374
|
module2.exports = PassThrough;
|
4375
4375
|
var Transform = require_stream_transform();
|
4376
4376
|
var util = Object.create(require_util());
|
4377
|
-
util.inherits = (0,
|
4377
|
+
util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
|
4378
4378
|
util.inherits(PassThrough, Transform);
|
4379
4379
|
function PassThrough(options2) {
|
4380
4380
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
@@ -5660,7 +5660,7 @@ var require_stream_writable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5660
5660
|
var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
|
5661
5661
|
var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
|
5662
5662
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
5663
|
-
(0,
|
5663
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Writable, Stream);
|
5664
5664
|
function nop() {
|
5665
5665
|
}
|
5666
5666
|
function WritableState(options2, stream, isDuplex) {
|
@@ -6102,7 +6102,7 @@ var require_stream_duplex2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6102
6102
|
module2.exports = Duplex;
|
6103
6103
|
var Readable = require_stream_readable2();
|
6104
6104
|
var Writable = require_stream_writable2();
|
6105
|
-
(0,
|
6105
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Duplex, Readable);
|
6106
6106
|
{
|
6107
6107
|
keys = objectKeys(Writable.prototype);
|
6108
6108
|
for (v = 0; v < keys.length; v++) {
|
@@ -6879,7 +6879,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6879
6879
|
var StringDecoder;
|
6880
6880
|
var createReadableStreamAsyncIterator;
|
6881
6881
|
var from;
|
6882
|
-
(0,
|
6882
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Readable, Stream);
|
6883
6883
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
6884
6884
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
6885
6885
|
function prependListener(emitter, event, fn) {
|
@@ -7584,7 +7584,7 @@ var require_stream_transform2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7584
7584
|
var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
|
7585
7585
|
var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
|
7586
7586
|
var Duplex = require_stream_duplex2();
|
7587
|
-
(0,
|
7587
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(Transform, Duplex);
|
7588
7588
|
function afterTransform(er, data) {
|
7589
7589
|
var ts = this._transformState;
|
7590
7590
|
ts.transforming = false;
|
@@ -7678,7 +7678,7 @@ var require_stream_passthrough2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
7678
7678
|
"use strict";
|
7679
7679
|
module2.exports = PassThrough;
|
7680
7680
|
var Transform = require_stream_transform2();
|
7681
|
-
(0,
|
7681
|
+
(0, import_chunk_RL3K4V2J.require_inherits)()(PassThrough, Transform);
|
7682
7682
|
function PassThrough(options2) {
|
7683
7683
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
7684
7684
|
Transform.call(this, options2);
|
@@ -8552,7 +8552,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
8552
8552
|
var difference = require_difference();
|
8553
8553
|
var union = require_union();
|
8554
8554
|
var isPlainObject = require_isPlainObject();
|
8555
|
-
var glob = (0,
|
8555
|
+
var glob = (0, import_chunk_RL3K4V2J.require_glob)();
|
8556
8556
|
var file = module2.exports = {};
|
8557
8557
|
var pathSeparatorRe = /[\/\\]/g;
|
8558
8558
|
var processPatterns = function(patterns, fn) {
|
@@ -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_RL3K4V2J.readPackageUp)({ cwd, normalize: false });
|
14859
14859
|
const prismaPropertyFromPkgJson = pkgJson?.packageJson?.prisma;
|
14860
14860
|
if (!pkgJson) {
|
14861
14861
|
return null;
|
@@ -15081,7 +15081,7 @@ function getCLIPathHash() {
|
|
15081
15081
|
const cliPath = process.argv[1];
|
15082
15082
|
return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
|
15083
15083
|
}
|
15084
|
-
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
15084
|
+
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_RL3K4V2J.require_p_map)());
|
15085
15085
|
var debug4 = (0, import_debug6.default)("prisma:generator");
|
15086
15086
|
async function checkTypeScriptVersion() {
|
15087
15087
|
const minVersion = "4.1.0";
|
@@ -26,19 +26,19 @@ 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_IT6GZE75_exports = {};
|
30
|
+
__export(chunk_IT6GZE75_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_IT6GZE75_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_CXZ6YCPF = require("./chunk-CXZ6YCPF.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
41
|
+
var import_chunk_SZ5HYXCG = require("./chunk-SZ5HYXCG.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: validate]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_CXZ6YCPF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "ValidateError";
|
65
65
|
}
|
66
66
|
};
|
@@ -72,13 +72,13 @@ function validate(options) {
|
|
72
72
|
() => {
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
74
74
|
debug("Triggering a Rust panic...");
|
75
|
-
|
75
|
+
import_chunk_SZ5HYXCG.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_SZ5HYXCG.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|