@prisma/internals 7.10.0-dev.3 → 7.10.0-dev.30
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-MD47SEWA.js → chunk-3EP7IZ7L.js} +14 -14
- package/dist/{chunk-EBLNHWW6.js → chunk-3VD46SL7.js} +9 -9
- package/dist/{chunk-3GIVRMID.js → chunk-4LTRNH4Z.js} +5 -5
- package/dist/{chunk-6PILE32P.js → chunk-6AW3B2B4.js} +17 -17
- package/dist/{chunk-TZJROXB3.js → chunk-6Z766KGR.js} +6 -6
- package/dist/{chunk-IPKNSP4P.js → chunk-7FWHB7EF.js} +5 -5
- package/dist/{chunk-NJZXXA7A.js → chunk-D3QHLD7N.js} +5 -5
- package/dist/{chunk-BVDV2U6E.js → chunk-DOHCKVAQ.js} +5 -5
- package/dist/{chunk-GZLJZGHX.js → chunk-DUDEWDFC.js} +7 -7
- package/dist/{chunk-LZ2DP3UC.js → chunk-EU5HJO5I.js} +7 -7
- package/dist/{chunk-YXCPS3WU.js → chunk-FRVJZOHP.js} +6 -6
- package/dist/{chunk-TJRH6ODW.js → chunk-HOJYTJQD.js} +17 -17
- package/dist/{chunk-RDLQUUAO.js → chunk-JMR4SZO6.js} +15 -15
- package/dist/{chunk-ZB2V476P.js → chunk-KSBCFGC7.js} +10 -10
- package/dist/{chunk-UL2ANZ4T.js → chunk-LX4XTVX3.js} +10 -10
- package/dist/{chunk-PP22IZ7I.js → chunk-LYHXD3TI.js} +5 -5
- package/dist/{chunk-GXBLKZRZ.js → chunk-MPMHSMG4.js} +13 -13
- package/dist/{chunk-L2BUQUNG.js → chunk-MROFRCW2.js} +5 -5
- package/dist/{chunk-WTEQJL7K.js → chunk-MUKYFGHX.js} +14 -14
- package/dist/{chunk-4YZJJPK2.js → chunk-OARSVH7C.js} +15 -15
- package/dist/{chunk-DDOXYDLT.js → chunk-QULAPYXI.js} +8 -8
- package/dist/{chunk-3SCIAX2U.js → chunk-WC7KCTJO.js} +5 -5
- package/dist/{chunk-5P4WR3QW.js → chunk-WL3XGKZO.js} +13 -13
- package/dist/{chunk-GZY7QBBF.js → chunk-XHPEM7UC.js} +5 -5
- package/dist/chunk-YNDZCLVL.js +307 -0
- package/dist/{chunk-7IKUTPWQ.js → chunk-YXB6APHS.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +18 -18
- package/dist/cli/schemaContext.js +19 -19
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +17 -17
- package/dist/engine-commands/getConfig.js +9 -9
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEnginesInfo.js +4 -4
- package/dist/engine-commands/index.js +28 -28
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +9 -9
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +9 -9
- package/dist/get-generators/getGenerators.js +20 -20
- package/dist/index.js +39 -39
- package/dist/sendPanic.js +3 -3
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +5 -5
- package/dist/wasm.js +5 -5
- package/package.json +16 -16
- package/dist/chunk-XKZ6CBLA.js +0 -281
|
@@ -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_JMR4SZO6_exports = {};
|
|
30
|
+
__export(chunk_JMR4SZO6_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_JMR4SZO6_exports);
|
|
35
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_XHPEM7UC = require("./chunk-XHPEM7UC.js");
|
|
39
|
+
var import_chunk_DOHCKVAQ = require("./chunk-DOHCKVAQ.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
44
44
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -49,7 +49,7 @@ var debug = (0, import_debug.default)("prisma:getConfig");
|
|
|
49
49
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
|
50
50
|
var GetConfigError = class extends Error {
|
|
51
51
|
constructor(params) {
|
|
52
|
-
const constructedErrorMessage = (0,
|
|
52
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
53
53
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
54
54
|
return `${reason}
|
|
55
55
|
${errorCodeMessage}
|
|
@@ -61,22 +61,22 @@ ${detailsHeader} ${message}`;
|
|
|
61
61
|
}).exhaustive();
|
|
62
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
63
63
|
[Context: getConfig]`;
|
|
64
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_XHPEM7UC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
65
65
|
this.name = "GetConfigError";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
async function getConfig(options) {
|
|
69
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "getConfigWasm");
|
|
70
70
|
debug(`Using getConfig Wasm`);
|
|
71
71
|
const configEither = (0, import_function.pipe)(
|
|
72
72
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
73
73
|
() => {
|
|
74
74
|
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
75
75
|
debug("Triggering a Rust panic...");
|
|
76
|
-
|
|
76
|
+
import_chunk_DOHCKVAQ.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_DOHCKVAQ.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -117,7 +117,7 @@ async function getConfig(options) {
|
|
|
117
117
|
}
|
|
118
118
|
return Promise.resolve(data);
|
|
119
119
|
}
|
|
120
|
-
const error = (0,
|
|
120
|
+
const error = (0, import_chunk_YNDZCLVL.M)(configEither.left).with({ type: "wasm-error" }, (e) => {
|
|
121
121
|
debugErrorType(e);
|
|
122
122
|
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
|
123
123
|
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
|
@@ -134,12 +134,12 @@ async function getConfig(options) {
|
|
|
134
134
|
return panic;
|
|
135
135
|
}
|
|
136
136
|
const errorOutput = e.error.message;
|
|
137
|
-
return new GetConfigError((0,
|
|
137
|
+
return new GetConfigError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
138
138
|
}).with({ type: "validation-error" }, (e) => {
|
|
139
139
|
return new GetConfigError({
|
|
140
140
|
_tag: "parsed",
|
|
141
141
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
142
|
-
reason: (0,
|
|
142
|
+
reason: (0, import_chunk_6Z766KGR.createSchemaValidationError)(e.reason),
|
|
143
143
|
message: formatErrors(e.error)
|
|
144
144
|
});
|
|
145
145
|
}).otherwise((e) => {
|
|
@@ -26,28 +26,28 @@ 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_KSBCFGC7_exports = {};
|
|
30
|
+
__export(chunk_KSBCFGC7_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
externalToInternalDmmf: () => import_get_dmmf2.externalToInternalDmmf,
|
|
33
33
|
getDMMF: () => getDMMF,
|
|
34
34
|
getInternalDMMF: () => getInternalDMMF
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(chunk_KSBCFGC7_exports);
|
|
37
37
|
var import_chunk_IL7PSY44 = require("./chunk-IL7PSY44.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
38
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
39
|
+
var import_chunk_7FWHB7EF = require("./chunk-7FWHB7EF.js");
|
|
40
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
42
42
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
43
43
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
44
44
|
var import_get_dmmf = require("@prisma/get-dmmf");
|
|
45
45
|
var import_get_dmmf2 = require("@prisma/get-dmmf");
|
|
46
46
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
47
|
-
var debugErrorType = (0,
|
|
47
|
+
var debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "getDmmfWasm");
|
|
48
48
|
var GetDmmfError = class extends Error {
|
|
49
49
|
constructor(params) {
|
|
50
|
-
const constructedErrorMessage = (0,
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
51
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
52
|
return `${reason}
|
|
53
53
|
${errorCodeMessage}
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: getDmmf]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_7FWHB7EF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "GetDmmfError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -100,5 +100,5 @@ function mapWasmPanicToGetDmmfError(error, reason) {
|
|
|
100
100
|
return panic;
|
|
101
101
|
}
|
|
102
102
|
const errorOutput = error.message;
|
|
103
|
-
return new GetDmmfError((0,
|
|
103
|
+
return new GetDmmfError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason }));
|
|
104
104
|
}
|
|
@@ -26,28 +26,28 @@ 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_LX4XTVX3_exports = {};
|
|
30
|
+
__export(chunk_LX4XTVX3_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
externalToInternalDmmf: () => import_get_dmmf2.externalToInternalDmmf,
|
|
33
33
|
getDMMF: () => getDMMF,
|
|
34
34
|
getInternalDMMF: () => getInternalDMMF
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(chunk_LX4XTVX3_exports);
|
|
37
37
|
var import_chunk_IL7PSY44 = require("./chunk-IL7PSY44.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
38
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
39
|
+
var import_chunk_XHPEM7UC = require("./chunk-XHPEM7UC.js");
|
|
40
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
42
42
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
43
43
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
44
44
|
var import_get_dmmf = require("@prisma/get-dmmf");
|
|
45
45
|
var import_get_dmmf2 = require("@prisma/get-dmmf");
|
|
46
46
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
47
|
-
var debugErrorType = (0,
|
|
47
|
+
var debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "getDmmfWasm");
|
|
48
48
|
var GetDmmfError = class extends Error {
|
|
49
49
|
constructor(params) {
|
|
50
|
-
const constructedErrorMessage = (0,
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
51
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
52
|
return `${reason}
|
|
53
53
|
${errorCodeMessage}
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: getDmmf]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_XHPEM7UC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "GetDmmfError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -100,5 +100,5 @@ function mapWasmPanicToGetDmmfError(error, reason) {
|
|
|
100
100
|
return panic;
|
|
101
101
|
}
|
|
102
102
|
const errorOutput = error.message;
|
|
103
|
-
return new GetDmmfError((0,
|
|
103
|
+
return new GetDmmfError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason }));
|
|
104
104
|
}
|
|
@@ -26,15 +26,15 @@ 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_LYHXD3TI_exports = {};
|
|
30
|
+
__export(chunk_LYHXD3TI_exports, {
|
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
|
33
33
|
schemaEngineWasmVersion: () => schemaEngineWasmVersion,
|
|
34
34
|
wasm_exports: () => wasm_exports
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_LYHXD3TI_exports);
|
|
37
|
+
var import_chunk_QULAPYXI = require("./chunk-QULAPYXI.js");
|
|
38
38
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
|
39
39
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
40
40
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
|
@@ -46,6 +46,6 @@ var wasm_exports = {};
|
|
|
46
46
|
});
|
|
47
47
|
var globalWithPanicRegistry = globalThis;
|
|
48
48
|
globalWithPanicRegistry.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
|
49
|
-
var { dependencies } = (0,
|
|
49
|
+
var { dependencies } = (0, import_chunk_QULAPYXI.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -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_MPMHSMG4_exports = {};
|
|
30
|
+
__export(chunk_MPMHSMG4_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_MPMHSMG4_exports);
|
|
35
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_7FWHB7EF = require("./chunk-7FWHB7EF.js");
|
|
39
|
+
var import_chunk_LYHXD3TI = require("./chunk-LYHXD3TI.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
44
44
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -47,7 +47,7 @@ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57
|
|
|
47
47
|
var debug = (0, import_debug.default)("prisma:mergeSchemas");
|
|
48
48
|
var MergeSchemasError = class extends Error {
|
|
49
49
|
constructor(params) {
|
|
50
|
-
const constructedErrorMessage = (0,
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
51
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
52
|
return `${reason}
|
|
53
53
|
${errorCodeMessage}
|
|
@@ -59,12 +59,12 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_7FWHB7EF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function mergeSchemas(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
68
68
|
debug(`Using mergeSchemas Wasm`);
|
|
69
69
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
|
|
|
72
72
|
const params = JSON.stringify({
|
|
73
73
|
schema: options.schemas
|
|
74
74
|
});
|
|
75
|
-
return
|
|
75
|
+
return import_chunk_LYHXD3TI.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -84,7 +84,7 @@ function mergeSchemas(options) {
|
|
|
84
84
|
if ((0, import_chunk_5DBOS77Y.isRight)(mergeSchemasEither)) {
|
|
85
85
|
return mergeSchemasEither.right;
|
|
86
86
|
}
|
|
87
|
-
const error = (0,
|
|
87
|
+
const error = (0, import_chunk_YNDZCLVL.M)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
|
88
88
|
debugErrorType(e);
|
|
89
89
|
console.error("");
|
|
90
90
|
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
|
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
|
|
|
104
104
|
return panic;
|
|
105
105
|
}
|
|
106
106
|
const errorOutput = e.error.message;
|
|
107
|
-
return new MergeSchemasError((0,
|
|
107
|
+
return new MergeSchemasError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
108
108
|
}).exhaustive();
|
|
109
109
|
throw error;
|
|
110
110
|
}
|
|
@@ -16,20 +16,20 @@ 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_MROFRCW2_exports = {};
|
|
20
|
+
__export(chunk_MROFRCW2_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(
|
|
28
|
-
var
|
|
27
|
+
module.exports = __toCommonJS(chunk_MROFRCW2_exports);
|
|
28
|
+
var import_chunk_LYHXD3TI = require("./chunk-LYHXD3TI.js");
|
|
29
29
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
30
30
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
31
31
|
function lintSchema({ schemas }) {
|
|
32
|
-
const lintResult =
|
|
32
|
+
const lintResult = import_chunk_LYHXD3TI.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -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_MUKYFGHX_exports = {};
|
|
30
|
+
__export(chunk_MUKYFGHX_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_MUKYFGHX_exports);
|
|
35
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_7FWHB7EF = require("./chunk-7FWHB7EF.js");
|
|
39
|
+
var import_chunk_LYHXD3TI = require("./chunk-LYHXD3TI.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
44
44
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -47,7 +47,7 @@ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57
|
|
|
47
47
|
var debug = (0, import_debug.default)("prisma:validate");
|
|
48
48
|
var ValidateError = class extends Error {
|
|
49
49
|
constructor(params) {
|
|
50
|
-
const constructedErrorMessage = (0,
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
51
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
52
|
return `${reason}
|
|
53
53
|
${errorCodeMessage}
|
|
@@ -59,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_7FWHB7EF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function validate(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "validateWasm");
|
|
68
68
|
debug(`Using validate Wasm`);
|
|
69
69
|
const validateEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
71
71
|
() => {
|
|
72
72
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_LYHXD3TI.prismaSchemaWasm.debug_panic();
|
|
75
75
|
}
|
|
76
76
|
const params = JSON.stringify({
|
|
77
77
|
prismaSchema: options.schemas,
|
|
78
78
|
noColor: Boolean(process.env.NO_COLOR)
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
import_chunk_LYHXD3TI.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -89,7 +89,7 @@ function validate(options) {
|
|
|
89
89
|
if ((0, import_chunk_5DBOS77Y.isRight)(validateEither)) {
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
const error = (0,
|
|
92
|
+
const error = (0, import_chunk_YNDZCLVL.M)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
|
93
93
|
debugErrorType(e);
|
|
94
94
|
console.error("");
|
|
95
95
|
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
|
@@ -109,7 +109,7 @@ function validate(options) {
|
|
|
109
109
|
return panic;
|
|
110
110
|
}
|
|
111
111
|
const errorOutput = e.error.message;
|
|
112
|
-
return new ValidateError((0,
|
|
112
|
+
return new ValidateError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
113
113
|
}).exhaustive();
|
|
114
114
|
throw error;
|
|
115
115
|
}
|
|
@@ -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_OARSVH7C_exports = {};
|
|
30
|
+
__export(chunk_OARSVH7C_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_OARSVH7C_exports);
|
|
35
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_7FWHB7EF = require("./chunk-7FWHB7EF.js");
|
|
39
|
+
var import_chunk_LYHXD3TI = require("./chunk-LYHXD3TI.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
44
44
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -49,7 +49,7 @@ var debug = (0, import_debug.default)("prisma:getConfig");
|
|
|
49
49
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
|
50
50
|
var GetConfigError = class extends Error {
|
|
51
51
|
constructor(params) {
|
|
52
|
-
const constructedErrorMessage = (0,
|
|
52
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
53
53
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
54
54
|
return `${reason}
|
|
55
55
|
${errorCodeMessage}
|
|
@@ -61,22 +61,22 @@ ${detailsHeader} ${message}`;
|
|
|
61
61
|
}).exhaustive();
|
|
62
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
63
63
|
[Context: getConfig]`;
|
|
64
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_7FWHB7EF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
65
65
|
this.name = "GetConfigError";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
async function getConfig(options) {
|
|
69
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "getConfigWasm");
|
|
70
70
|
debug(`Using getConfig Wasm`);
|
|
71
71
|
const configEither = (0, import_function.pipe)(
|
|
72
72
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
73
73
|
() => {
|
|
74
74
|
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
75
75
|
debug("Triggering a Rust panic...");
|
|
76
|
-
|
|
76
|
+
import_chunk_LYHXD3TI.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_LYHXD3TI.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -117,7 +117,7 @@ async function getConfig(options) {
|
|
|
117
117
|
}
|
|
118
118
|
return Promise.resolve(data);
|
|
119
119
|
}
|
|
120
|
-
const error = (0,
|
|
120
|
+
const error = (0, import_chunk_YNDZCLVL.M)(configEither.left).with({ type: "wasm-error" }, (e) => {
|
|
121
121
|
debugErrorType(e);
|
|
122
122
|
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
|
123
123
|
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
|
@@ -134,12 +134,12 @@ async function getConfig(options) {
|
|
|
134
134
|
return panic;
|
|
135
135
|
}
|
|
136
136
|
const errorOutput = e.error.message;
|
|
137
|
-
return new GetConfigError((0,
|
|
137
|
+
return new GetConfigError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
138
138
|
}).with({ type: "validation-error" }, (e) => {
|
|
139
139
|
return new GetConfigError({
|
|
140
140
|
_tag: "parsed",
|
|
141
141
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
142
|
-
reason: (0,
|
|
142
|
+
reason: (0, import_chunk_6Z766KGR.createSchemaValidationError)(e.reason),
|
|
143
143
|
message: formatErrors(e.error)
|
|
144
144
|
});
|
|
145
145
|
}).otherwise((e) => {
|
|
@@ -16,17 +16,17 @@ 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_QULAPYXI_exports = {};
|
|
20
|
+
__export(chunk_QULAPYXI_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_QULAPYXI_exports);
|
|
24
24
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
25
25
|
var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
27
27
|
module2.exports = {
|
|
28
28
|
name: "@prisma/internals",
|
|
29
|
-
version: "7.10.0-dev.
|
|
29
|
+
version: "7.10.0-dev.30",
|
|
30
30
|
description: "This package is intended for Prisma's internal use",
|
|
31
31
|
main: "dist/index.js",
|
|
32
32
|
types: "dist/index.d.ts",
|
|
@@ -62,7 +62,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
62
62
|
empathic: "2.0.0",
|
|
63
63
|
"escape-string-regexp": "5.0.0",
|
|
64
64
|
execa: "8.0.1",
|
|
65
|
-
"find-up": "
|
|
65
|
+
"find-up": "8.0.0",
|
|
66
66
|
"fp-ts": "2.16.9",
|
|
67
67
|
"fs-extra": "11.3.0",
|
|
68
68
|
"global-directory": "4.0.0",
|
|
@@ -85,7 +85,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
85
85
|
tempy: "1.0.1",
|
|
86
86
|
"terminal-link": "4.0.0",
|
|
87
87
|
tmp: "0.2.3",
|
|
88
|
-
"ts-pattern": "5.
|
|
88
|
+
"ts-pattern": "5.9.0",
|
|
89
89
|
"ts-toolbelt": "9.6.0",
|
|
90
90
|
typescript: "5.4.5",
|
|
91
91
|
yarn: "1.22.22"
|
|
@@ -101,8 +101,8 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
101
101
|
"@prisma/generator-helper": "workspace:*",
|
|
102
102
|
"@prisma/get-dmmf": "workspace:*",
|
|
103
103
|
"@prisma/get-platform": "workspace:*",
|
|
104
|
-
"@prisma/prisma-schema-wasm": "7.
|
|
105
|
-
"@prisma/schema-engine-wasm": "7.
|
|
104
|
+
"@prisma/prisma-schema-wasm": "7.10.0-1.6d040c802892de6d56c7e0061b7a10b3e6a0c7a0",
|
|
105
|
+
"@prisma/schema-engine-wasm": "7.10.0-1.6d040c802892de6d56c7e0061b7a10b3e6a0c7a0",
|
|
106
106
|
"@prisma/schema-files-loader": "workspace:*",
|
|
107
107
|
"@streamparser/json": "0.0.22",
|
|
108
108
|
arg: "5.0.2",
|
|
@@ -16,20 +16,20 @@ 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_WC7KCTJO_exports = {};
|
|
20
|
+
__export(chunk_WC7KCTJO_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(
|
|
28
|
-
var
|
|
27
|
+
module.exports = __toCommonJS(chunk_WC7KCTJO_exports);
|
|
28
|
+
var import_chunk_DOHCKVAQ = require("./chunk-DOHCKVAQ.js");
|
|
29
29
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
30
30
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
31
31
|
function lintSchema({ schemas }) {
|
|
32
|
-
const lintResult =
|
|
32
|
+
const lintResult = import_chunk_DOHCKVAQ.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|