@prisma/internals 7.6.0-dev.12 → 7.6.0-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-LGH2GFMP.js → chunk-4W2GEXLC.js} +7 -7
- package/dist/{chunk-UH7XYXGI.js → chunk-6JKAPABH.js} +5 -5
- package/dist/{chunk-OSCUI3NE.js → chunk-6S76OKUD.js} +8 -8
- package/dist/{chunk-OSJR4HV3.js → chunk-A2A7J4CL.js} +5 -5
- package/dist/{chunk-D2NLAZXG.js → chunk-BGTWHIOA.js} +8 -8
- package/dist/{chunk-4COTOG2R.js → chunk-D27PKXGJ.js} +8 -8
- package/dist/{chunk-S7PC5CGS.js → chunk-DTWLDI62.js} +5 -5
- package/dist/{chunk-5XZSZIW7.js → chunk-FUDRGWAF.js} +4 -3
- package/dist/{chunk-CGT7376Z.js → chunk-H2YUKKTK.js} +5 -5
- package/dist/{chunk-256IZNRN.js → chunk-K2OZ5PRA.js} +5 -5
- package/dist/{chunk-TONUGBHE.js → chunk-KAFC7IGG.js} +5 -5
- package/dist/{chunk-LEZLQ2UY.js → chunk-LDN2T2EE.js} +7 -7
- package/dist/{chunk-DPKC4AB7.js → chunk-NCDOEXGP.js} +89 -29
- package/dist/{chunk-4TKGDI5G.js → chunk-OMJOKO7H.js} +5 -5
- package/dist/{chunk-INRRRBSA.js → chunk-OPOVQ5PN.js} +89 -29
- package/dist/{chunk-3Q4G6SE7.js → chunk-SME75DVW.js} +5 -4
- package/dist/{chunk-E7YC3XCV.js → chunk-THULZW6L.js} +15 -15
- package/dist/{chunk-W4MKJKCW.js → chunk-VAD6ZZ6O.js} +15 -15
- package/dist/{chunk-VYYPYIH6.js → chunk-VJTVMK5E.js} +8 -8
- package/dist/{chunk-OSBQLLRQ.js → chunk-VKPTNDJS.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +12 -12
- package/dist/cli/schemaContext.js +13 -13
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +11 -11
- package/dist/engine-commands/getConfig.js +7 -7
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +18 -18
- 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/getGenerators.js +14 -14
- package/dist/index.js +27 -27
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/wasm.js +5 -5
- package/package.json +12 -11
|
@@ -26,17 +26,17 @@ 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_4W2GEXLC_exports = {};
|
|
30
|
+
__export(chunk_4W2GEXLC_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_4W2GEXLC_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_A2A7J4CL = require("./chunk-A2A7J4CL.js");
|
|
39
|
+
var import_chunk_K2OZ5PRA = require("./chunk-K2OZ5PRA.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_A2A7J4CL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -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_K2OZ5PRA.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -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_6JKAPABH_exports = {};
|
|
20
|
+
__export(chunk_6JKAPABH_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_6JKAPABH_exports);
|
|
28
|
+
var import_chunk_KAFC7IGG = require("./chunk-KAFC7IGG.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_KAFC7IGG.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -26,17 +26,17 @@ 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_6S76OKUD_exports = {};
|
|
30
|
+
__export(chunk_6S76OKUD_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_6S76OKUD_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_DTWLDI62 = require("./chunk-DTWLDI62.js");
|
|
39
|
+
var import_chunk_KAFC7IGG = require("./chunk-KAFC7IGG.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -61,7 +61,7 @@ ${detailsHeader} ${message}`;
|
|
|
61
61
|
}).exhaustive();
|
|
62
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
63
63
|
[Context: getConfig]`;
|
|
64
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_DTWLDI62.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
65
65
|
this.name = "GetConfigError";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -73,10 +73,10 @@ async function getConfig(options) {
|
|
|
73
73
|
() => {
|
|
74
74
|
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
75
75
|
debug("Triggering a Rust panic...");
|
|
76
|
-
|
|
76
|
+
import_chunk_KAFC7IGG.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_KAFC7IGG.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -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_A2A7J4CL_exports = {};
|
|
20
|
+
__export(chunk_A2A7J4CL_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_A2A7J4CL_exports);
|
|
24
|
+
var import_chunk_H2YUKKTK = require("./chunk-H2YUKKTK.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_H2YUKKTK.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -26,17 +26,17 @@ 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_BGTWHIOA_exports = {};
|
|
30
|
+
__export(chunk_BGTWHIOA_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_BGTWHIOA_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_A2A7J4CL = require("./chunk-A2A7J4CL.js");
|
|
39
|
+
var import_chunk_K2OZ5PRA = require("./chunk-K2OZ5PRA.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -61,7 +61,7 @@ ${detailsHeader} ${message}`;
|
|
|
61
61
|
}).exhaustive();
|
|
62
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
63
63
|
[Context: getConfig]`;
|
|
64
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_A2A7J4CL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
65
65
|
this.name = "GetConfigError";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -73,10 +73,10 @@ async function getConfig(options) {
|
|
|
73
73
|
() => {
|
|
74
74
|
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
75
75
|
debug("Triggering a Rust panic...");
|
|
76
|
-
|
|
76
|
+
import_chunk_K2OZ5PRA.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_K2OZ5PRA.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -26,17 +26,17 @@ 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_D27PKXGJ_exports = {};
|
|
30
|
+
__export(chunk_D27PKXGJ_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_D27PKXGJ_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_DTWLDI62 = require("./chunk-DTWLDI62.js");
|
|
39
|
+
var import_chunk_KAFC7IGG = require("./chunk-KAFC7IGG.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_DTWLDI62.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -71,13 +71,13 @@ function validate(options) {
|
|
|
71
71
|
() => {
|
|
72
72
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_KAFC7IGG.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_KAFC7IGG.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -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_DTWLDI62_exports = {};
|
|
20
|
+
__export(chunk_DTWLDI62_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_DTWLDI62_exports);
|
|
24
|
+
var import_chunk_OMJOKO7H = require("./chunk-OMJOKO7H.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_OMJOKO7H.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -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_FUDRGWAF_exports = {};
|
|
20
|
+
__export(chunk_FUDRGWAF_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_FUDRGWAF_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) {
|
|
@@ -103,6 +103,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
103
103
|
"@prisma/prisma-schema-wasm": "7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711",
|
|
104
104
|
"@prisma/schema-engine-wasm": "7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711",
|
|
105
105
|
"@prisma/schema-files-loader": "workspace:*",
|
|
106
|
+
"@streamparser/json": "0.0.22",
|
|
106
107
|
arg: "5.0.2",
|
|
107
108
|
prompts: "2.4.2"
|
|
108
109
|
},
|
|
@@ -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_H2YUKKTK_exports = {};
|
|
20
|
+
__export(chunk_H2YUKKTK_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_H2YUKKTK_exports);
|
|
24
|
+
var import_chunk_SME75DVW = require("./chunk-SME75DVW.js");
|
|
25
|
+
var packageJson = (0, import_chunk_SME75DVW.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_K2OZ5PRA_exports = {};
|
|
30
|
+
__export(chunk_K2OZ5PRA_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_K2OZ5PRA_exports);
|
|
37
|
+
var import_chunk_SME75DVW = require("./chunk-SME75DVW.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_SME75DVW.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -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_KAFC7IGG_exports = {};
|
|
30
|
+
__export(chunk_KAFC7IGG_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_KAFC7IGG_exports);
|
|
37
|
+
var import_chunk_FUDRGWAF = require("./chunk-FUDRGWAF.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_FUDRGWAF.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -26,17 +26,17 @@ 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_LDN2T2EE_exports = {};
|
|
30
|
+
__export(chunk_LDN2T2EE_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_LDN2T2EE_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_DTWLDI62 = require("./chunk-DTWLDI62.js");
|
|
39
|
+
var import_chunk_KAFC7IGG = require("./chunk-KAFC7IGG.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_DTWLDI62.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -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_KAFC7IGG.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -26,24 +26,26 @@ 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_NCDOEXGP_exports = {};
|
|
30
|
+
__export(chunk_NCDOEXGP_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_NCDOEXGP_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_A2A7J4CL = require("./chunk-A2A7J4CL.js");
|
|
38
|
+
var import_chunk_K2OZ5PRA = require("./chunk-K2OZ5PRA.js");
|
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.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_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
44
44
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
45
|
+
var import_json = require("@streamparser/json");
|
|
45
46
|
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
|
46
47
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
48
|
+
var debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
|
47
49
|
var GetDmmfError = class extends Error {
|
|
48
50
|
constructor(params) {
|
|
49
51
|
const constructedErrorMessage = (0, import_chunk_XKZ6CBLA.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
@@ -58,25 +60,61 @@ ${detailsHeader} ${message}`;
|
|
|
58
60
|
}).exhaustive();
|
|
59
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
62
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_A2A7J4CL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
64
|
this.name = "GetDmmfError";
|
|
63
65
|
}
|
|
64
66
|
};
|
|
67
|
+
function isV8StringLimitError(error) {
|
|
68
|
+
return error instanceof Error && "code" in error && error.code === "ERR_STRING_TOO_LONG";
|
|
69
|
+
}
|
|
70
|
+
function getDMMFBuffered(params) {
|
|
71
|
+
const CHUNK_SIZE = 16 * 1024 * 1024;
|
|
72
|
+
if (typeof import_chunk_K2OZ5PRA.prismaSchemaWasm.get_dmmf_buffered !== "function") {
|
|
73
|
+
throw new Error(
|
|
74
|
+
"Buffered DMMF API not available. It's required for schemas that do not fit within the default V8 memory limit. Ensure you are using latest @prisma/prisma-schema-wasm."
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
const buffer = import_chunk_K2OZ5PRA.prismaSchemaWasm.get_dmmf_buffered(params);
|
|
78
|
+
try {
|
|
79
|
+
const totalBytes = buffer.len();
|
|
80
|
+
debug(`DMMF buffered: ${totalBytes} bytes (${(totalBytes / 1024 / 1024).toFixed(1)}MB)`);
|
|
81
|
+
const parser = new import_json.JSONParser();
|
|
82
|
+
let result;
|
|
83
|
+
parser.onValue = ({ value, stack }) => {
|
|
84
|
+
if (stack.length === 0 && value !== void 0) {
|
|
85
|
+
result = value;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
let offset = 0;
|
|
89
|
+
while (offset < totalBytes) {
|
|
90
|
+
const len = Math.min(CHUNK_SIZE, totalBytes - offset);
|
|
91
|
+
const chunk = buffer.read_chunk(offset, len);
|
|
92
|
+
parser.write(chunk);
|
|
93
|
+
offset += len;
|
|
94
|
+
}
|
|
95
|
+
if (result === void 0) {
|
|
96
|
+
throw new Error("Streaming JSON parse produced no result");
|
|
97
|
+
}
|
|
98
|
+
debug(`DMMF parsed via streaming parser (${(totalBytes / 1024 / 1024).toFixed(1)}MB)`);
|
|
99
|
+
return result;
|
|
100
|
+
} finally {
|
|
101
|
+
buffer.free();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
65
104
|
async function getDMMF(options) {
|
|
66
|
-
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
|
67
105
|
debug(`Using getDmmf Wasm`);
|
|
106
|
+
const params = JSON.stringify({
|
|
107
|
+
prismaSchema: options.datamodel,
|
|
108
|
+
noColor: Boolean(process.env.NO_COLOR)
|
|
109
|
+
});
|
|
68
110
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
69
111
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
70
112
|
() => {
|
|
71
113
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
72
114
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
115
|
+
import_chunk_K2OZ5PRA.prismaSchemaWasm.debug_panic();
|
|
74
116
|
}
|
|
75
|
-
const
|
|
76
|
-
prismaSchema: options.datamodel,
|
|
77
|
-
noColor: Boolean(process.env.NO_COLOR)
|
|
78
|
-
});
|
|
79
|
-
const data = import_chunk_TONUGBHE.prismaSchemaWasm.get_dmmf(params);
|
|
117
|
+
const data = import_chunk_K2OZ5PRA.prismaSchemaWasm.get_dmmf(params);
|
|
80
118
|
return data;
|
|
81
119
|
},
|
|
82
120
|
(e) => ({
|
|
@@ -107,27 +145,49 @@ async function getDMMF(options) {
|
|
|
107
145
|
const { right: data } = dmmfEither;
|
|
108
146
|
return Promise.resolve(data);
|
|
109
147
|
}
|
|
148
|
+
const leftError = dmmfEither.left;
|
|
149
|
+
if (leftError.type === "wasm-error" && isV8StringLimitError(leftError.error)) {
|
|
150
|
+
debug("V8 string limit hit, falling back to buffered DMMF API");
|
|
151
|
+
try {
|
|
152
|
+
const data = getDMMFBuffered(params);
|
|
153
|
+
debug("dmmf data retrieved via buffered API");
|
|
154
|
+
return data;
|
|
155
|
+
} catch (error2) {
|
|
156
|
+
if (error2 instanceof Error) {
|
|
157
|
+
debugErrorType({ type: "wasm-error", reason: "(get-dmmf-buffered wasm)", error: error2 });
|
|
158
|
+
throw mapWasmPanicToGetDmmfError(error2, "(get-dmmf-buffered wasm)");
|
|
159
|
+
}
|
|
160
|
+
throw new GetDmmfError({
|
|
161
|
+
_tag: "unparsed",
|
|
162
|
+
message: `Unknown error during buffered DMMF retrieval: ${error2}`,
|
|
163
|
+
reason: "(get-dmmf-buffered wasm)"
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
110
167
|
const error = (0, import_chunk_XKZ6CBLA.z)(dmmfEither.left).with({ type: "wasm-error" }, (e) => {
|
|
111
168
|
debugErrorType(e);
|
|
112
|
-
|
|
113
|
-
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
|
114
|
-
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
|
115
|
-
/* message */
|
|
116
|
-
message,
|
|
117
|
-
/* rustStack */
|
|
118
|
-
stack,
|
|
119
|
-
/* request */
|
|
120
|
-
"@prisma/prisma-schema-wasm get_dmmf",
|
|
121
|
-
"FMT_CLI"
|
|
122
|
-
/* FMT_CLI */
|
|
123
|
-
);
|
|
124
|
-
return panic;
|
|
125
|
-
}
|
|
126
|
-
const errorOutput = e.error.message;
|
|
127
|
-
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
169
|
+
return mapWasmPanicToGetDmmfError(e.error, e.reason);
|
|
128
170
|
}).with({ type: "parse-json" }, (e) => {
|
|
129
171
|
debugErrorType(e);
|
|
130
172
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
|
131
173
|
}).exhaustive();
|
|
132
174
|
throw error;
|
|
133
175
|
}
|
|
176
|
+
function mapWasmPanicToGetDmmfError(error, reason) {
|
|
177
|
+
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(error)) {
|
|
178
|
+
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(error);
|
|
179
|
+
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
|
180
|
+
/* message */
|
|
181
|
+
message,
|
|
182
|
+
/* rustStack */
|
|
183
|
+
stack,
|
|
184
|
+
/* request */
|
|
185
|
+
"@prisma/prisma-schema-wasm get_dmmf",
|
|
186
|
+
"FMT_CLI"
|
|
187
|
+
/* FMT_CLI */
|
|
188
|
+
);
|
|
189
|
+
return panic;
|
|
190
|
+
}
|
|
191
|
+
const errorOutput = error.message;
|
|
192
|
+
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason }));
|
|
193
|
+
}
|
|
@@ -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_OMJOKO7H_exports = {};
|
|
20
|
+
__export(chunk_OMJOKO7H_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_OMJOKO7H_exports);
|
|
24
|
+
var import_chunk_FUDRGWAF = require("./chunk-FUDRGWAF.js");
|
|
25
|
+
var packageJson = (0, import_chunk_FUDRGWAF.require_package)();
|
|
26
26
|
var version = packageJson.version;
|