@prisma/internals 7.7.0-dev.1 → 7.7.0-dev.3
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-KAFC7IGG.js → chunk-2HPKSKDE.js} +5 -5
- package/dist/{chunk-TMOVLDY3.js → chunk-57ZFKPEC.js} +8 -8
- package/dist/{chunk-AOVYEIA4.js → chunk-AYKHFUHB.js} +5 -5
- package/dist/{chunk-DECRNQAX.js → chunk-E644FVCY.js} +8 -8
- package/dist/{chunk-FLEBZERR.js → chunk-ELUS2FGF.js} +5 -4
- package/dist/{chunk-YHPLOIZP.js → chunk-FIDYCH4Q.js} +5 -5
- package/dist/chunk-H5RJM5KP.js +104 -0
- package/dist/{chunk-327ITEMP.js → chunk-IN7DJEWK.js} +7 -7
- package/dist/chunk-IVPOBWVG.js +104 -0
- package/dist/{chunk-55UUDRJ3.js → chunk-M32TYUAI.js} +5 -5
- package/dist/{chunk-FUDRGWAF.js → chunk-NWDOSRX2.js} +4 -3
- package/dist/{chunk-D27PKXGJ.js → chunk-OBFJDH7C.js} +8 -8
- package/dist/{chunk-OMJOKO7H.js → chunk-SZ735VHI.js} +5 -5
- package/dist/{chunk-OCIOQHKS.js → chunk-UINW4OZY.js} +5 -5
- package/dist/{chunk-LDN2T2EE.js → chunk-USHXVHZH.js} +7 -7
- package/dist/{chunk-DTWLDI62.js → chunk-VL7TE7XG.js} +5 -5
- package/dist/{chunk-6JKAPABH.js → chunk-VPHYIISP.js} +5 -5
- package/dist/{chunk-6S76OKUD.js → chunk-WJPDCCIW.js} +8 -8
- package/dist/{chunk-MIBKSCPH.js → chunk-XV2QLA4M.js} +15 -20
- package/dist/{chunk-VAD6ZZ6O.js → chunk-ZI7BX3VK.js} +15 -20
- 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.d.ts +1 -1
- package/dist/engine-commands/formatSchema.js +11 -11
- package/dist/engine-commands/getConfig.d.ts +1 -1
- package/dist/engine-commands/getConfig.js +7 -7
- package/dist/engine-commands/getDmmf.d.ts +3 -2
- package/dist/engine-commands/getDmmf.js +9 -8
- package/dist/engine-commands/index.d.ts +1 -1
- package/dist/engine-commands/index.js +20 -18
- package/dist/engine-commands/lintSchema.d.ts +1 -1
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.d.ts +1 -1
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.d.ts +1 -1
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/getGenerators.js +14 -14
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -27
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/schemaFileInput.d.ts +1 -4
- package/dist/utils/toSchemasContainer.d.ts +1 -1
- package/dist/wasm.js +5 -5
- package/package.json +12 -11
- package/dist/chunk-3SIYV325.js +0 -193
- package/dist/chunk-OPOVQ5PN.js +0 -193
|
@@ -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_2HPKSKDE_exports = {};
|
|
30
|
+
__export(chunk_2HPKSKDE_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_2HPKSKDE_exports);
|
|
37
|
+
var import_chunk_ELUS2FGF = require("./chunk-ELUS2FGF.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_ELUS2FGF.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_57ZFKPEC_exports = {};
|
|
30
|
+
__export(chunk_57ZFKPEC_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_57ZFKPEC_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_UINW4OZY = require("./chunk-UINW4OZY.js");
|
|
39
|
+
var import_chunk_2HPKSKDE = require("./chunk-2HPKSKDE.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_UINW4OZY.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_2HPKSKDE.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_2HPKSKDE.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -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_AYKHFUHB_exports = {};
|
|
30
|
+
__export(chunk_AYKHFUHB_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_AYKHFUHB_exports);
|
|
37
|
+
var import_chunk_NWDOSRX2 = require("./chunk-NWDOSRX2.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_NWDOSRX2.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_E644FVCY_exports = {};
|
|
30
|
+
__export(chunk_E644FVCY_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_E644FVCY_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_VL7TE7XG = require("./chunk-VL7TE7XG.js");
|
|
39
|
+
var import_chunk_AYKHFUHB = require("./chunk-AYKHFUHB.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_VL7TE7XG.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_AYKHFUHB.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_AYKHFUHB.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -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_ELUS2FGF_exports = {};
|
|
20
|
+
__export(chunk_ELUS2FGF_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_ELUS2FGF_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.7.0-dev.
|
|
29
|
+
version: "7.7.0-dev.3",
|
|
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",
|
|
@@ -99,6 +99,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
99
99
|
"@prisma/fetch-engine": "workspace:*",
|
|
100
100
|
"@prisma/generator": "workspace:*",
|
|
101
101
|
"@prisma/generator-helper": "workspace:*",
|
|
102
|
+
"@prisma/get-dmmf": "workspace:*",
|
|
102
103
|
"@prisma/get-platform": "workspace:*",
|
|
103
104
|
"@prisma/prisma-schema-wasm": "7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711",
|
|
104
105
|
"@prisma/schema-engine-wasm": "7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711",
|
|
@@ -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_FIDYCH4Q_exports = {};
|
|
20
|
+
__export(chunk_FIDYCH4Q_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_FIDYCH4Q_exports);
|
|
28
|
+
var import_chunk_AYKHFUHB = require("./chunk-AYKHFUHB.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_AYKHFUHB.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_H5RJM5KP_exports = {};
|
|
30
|
+
__export(chunk_H5RJM5KP_exports, {
|
|
31
|
+
GetDmmfError: () => GetDmmfError,
|
|
32
|
+
externalToInternalDmmf: () => import_get_dmmf2.externalToInternalDmmf,
|
|
33
|
+
getDMMF: () => getDMMF,
|
|
34
|
+
getInternalDMMF: () => getInternalDMMF
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(chunk_H5RJM5KP_exports);
|
|
37
|
+
var import_chunk_IL7PSY44 = require("./chunk-IL7PSY44.js");
|
|
38
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
39
|
+
var import_chunk_UINW4OZY = require("./chunk-UINW4OZY.js");
|
|
40
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
|
+
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
42
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
43
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
|
44
|
+
var import_get_dmmf = require("@prisma/get-dmmf");
|
|
45
|
+
var import_get_dmmf2 = require("@prisma/get-dmmf");
|
|
46
|
+
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
47
|
+
var debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
|
48
|
+
var GetDmmfError = class extends Error {
|
|
49
|
+
constructor(params) {
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_XKZ6CBLA.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
|
+
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
|
+
return `${reason}
|
|
53
|
+
${errorCodeMessage}
|
|
54
|
+
${message}`;
|
|
55
|
+
}).with({ _tag: "unparsed" }, ({ message, reason }) => {
|
|
56
|
+
const detailsHeader = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)("Details:"));
|
|
57
|
+
return `${reason}
|
|
58
|
+
${detailsHeader} ${message}`;
|
|
59
|
+
}).exhaustive();
|
|
60
|
+
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
|
+
[Context: getDmmf]`;
|
|
62
|
+
super((0, import_chunk_UINW4OZY.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
|
+
this.name = "GetDmmfError";
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
async function getDMMF(options) {
|
|
67
|
+
return Promise.resolve(handleGetDmmfResult((0, import_get_dmmf.getDMMF)(options)));
|
|
68
|
+
}
|
|
69
|
+
async function getInternalDMMF(options) {
|
|
70
|
+
return Promise.resolve(handleGetDmmfResult((0, import_get_dmmf.getInternalDMMF)(options)));
|
|
71
|
+
}
|
|
72
|
+
function handleGetDmmfResult(result) {
|
|
73
|
+
if ("error" in result) {
|
|
74
|
+
debugErrorType(result);
|
|
75
|
+
switch (result.type) {
|
|
76
|
+
case "wasm-error":
|
|
77
|
+
throw mapWasmPanicToGetDmmfError(result.error, result.reason);
|
|
78
|
+
case "parse-json":
|
|
79
|
+
throw new GetDmmfError({ _tag: "unparsed", message: result.error.message, reason: result.reason });
|
|
80
|
+
default:
|
|
81
|
+
(0, import_chunk_IL7PSY44.assertNever)(result.type, "Unknown getDmmf error type");
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function mapWasmPanicToGetDmmfError(error, reason) {
|
|
88
|
+
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(error)) {
|
|
89
|
+
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(error);
|
|
90
|
+
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
|
91
|
+
/* message */
|
|
92
|
+
message,
|
|
93
|
+
/* rustStack */
|
|
94
|
+
stack,
|
|
95
|
+
/* request */
|
|
96
|
+
"@prisma/prisma-schema-wasm get_dmmf",
|
|
97
|
+
"FMT_CLI"
|
|
98
|
+
/* FMT_CLI */
|
|
99
|
+
);
|
|
100
|
+
return panic;
|
|
101
|
+
}
|
|
102
|
+
const errorOutput = error.message;
|
|
103
|
+
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason }));
|
|
104
|
+
}
|
|
@@ -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_IN7DJEWK_exports = {};
|
|
30
|
+
__export(chunk_IN7DJEWK_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_IN7DJEWK_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_UINW4OZY = require("./chunk-UINW4OZY.js");
|
|
39
|
+
var import_chunk_2HPKSKDE = require("./chunk-2HPKSKDE.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_UINW4OZY.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_2HPKSKDE.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_IVPOBWVG_exports = {};
|
|
30
|
+
__export(chunk_IVPOBWVG_exports, {
|
|
31
|
+
GetDmmfError: () => GetDmmfError,
|
|
32
|
+
externalToInternalDmmf: () => import_get_dmmf2.externalToInternalDmmf,
|
|
33
|
+
getDMMF: () => getDMMF,
|
|
34
|
+
getInternalDMMF: () => getInternalDMMF
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(chunk_IVPOBWVG_exports);
|
|
37
|
+
var import_chunk_IL7PSY44 = require("./chunk-IL7PSY44.js");
|
|
38
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
39
|
+
var import_chunk_VL7TE7XG = require("./chunk-VL7TE7XG.js");
|
|
40
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
|
+
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
42
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
43
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
|
44
|
+
var import_get_dmmf = require("@prisma/get-dmmf");
|
|
45
|
+
var import_get_dmmf2 = require("@prisma/get-dmmf");
|
|
46
|
+
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
47
|
+
var debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
|
48
|
+
var GetDmmfError = class extends Error {
|
|
49
|
+
constructor(params) {
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_XKZ6CBLA.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
|
+
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
|
+
return `${reason}
|
|
53
|
+
${errorCodeMessage}
|
|
54
|
+
${message}`;
|
|
55
|
+
}).with({ _tag: "unparsed" }, ({ message, reason }) => {
|
|
56
|
+
const detailsHeader = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)("Details:"));
|
|
57
|
+
return `${reason}
|
|
58
|
+
${detailsHeader} ${message}`;
|
|
59
|
+
}).exhaustive();
|
|
60
|
+
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
|
+
[Context: getDmmf]`;
|
|
62
|
+
super((0, import_chunk_VL7TE7XG.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
|
+
this.name = "GetDmmfError";
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
async function getDMMF(options) {
|
|
67
|
+
return Promise.resolve(handleGetDmmfResult((0, import_get_dmmf.getDMMF)(options)));
|
|
68
|
+
}
|
|
69
|
+
async function getInternalDMMF(options) {
|
|
70
|
+
return Promise.resolve(handleGetDmmfResult((0, import_get_dmmf.getInternalDMMF)(options)));
|
|
71
|
+
}
|
|
72
|
+
function handleGetDmmfResult(result) {
|
|
73
|
+
if ("error" in result) {
|
|
74
|
+
debugErrorType(result);
|
|
75
|
+
switch (result.type) {
|
|
76
|
+
case "wasm-error":
|
|
77
|
+
throw mapWasmPanicToGetDmmfError(result.error, result.reason);
|
|
78
|
+
case "parse-json":
|
|
79
|
+
throw new GetDmmfError({ _tag: "unparsed", message: result.error.message, reason: result.reason });
|
|
80
|
+
default:
|
|
81
|
+
(0, import_chunk_IL7PSY44.assertNever)(result.type, "Unknown getDmmf error type");
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function mapWasmPanicToGetDmmfError(error, reason) {
|
|
88
|
+
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(error)) {
|
|
89
|
+
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(error);
|
|
90
|
+
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
|
91
|
+
/* message */
|
|
92
|
+
message,
|
|
93
|
+
/* rustStack */
|
|
94
|
+
stack,
|
|
95
|
+
/* request */
|
|
96
|
+
"@prisma/prisma-schema-wasm get_dmmf",
|
|
97
|
+
"FMT_CLI"
|
|
98
|
+
/* FMT_CLI */
|
|
99
|
+
);
|
|
100
|
+
return panic;
|
|
101
|
+
}
|
|
102
|
+
const errorOutput = error.message;
|
|
103
|
+
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason }));
|
|
104
|
+
}
|
|
@@ -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_M32TYUAI_exports = {};
|
|
20
|
+
__export(chunk_M32TYUAI_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_M32TYUAI_exports);
|
|
24
|
+
var import_chunk_ELUS2FGF = require("./chunk-ELUS2FGF.js");
|
|
25
|
+
var packageJson = (0, import_chunk_ELUS2FGF.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_NWDOSRX2_exports = {};
|
|
20
|
+
__export(chunk_NWDOSRX2_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_NWDOSRX2_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) {
|
|
@@ -99,6 +99,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
99
99
|
"@prisma/fetch-engine": "workspace:*",
|
|
100
100
|
"@prisma/generator": "workspace:*",
|
|
101
101
|
"@prisma/generator-helper": "workspace:*",
|
|
102
|
+
"@prisma/get-dmmf": "workspace:*",
|
|
102
103
|
"@prisma/get-platform": "workspace:*",
|
|
103
104
|
"@prisma/prisma-schema-wasm": "7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711",
|
|
104
105
|
"@prisma/schema-engine-wasm": "7.6.0-1.75cbdc1eb7150937890ad5465d861175c6624711",
|
|
@@ -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_OBFJDH7C_exports = {};
|
|
30
|
+
__export(chunk_OBFJDH7C_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_OBFJDH7C_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_UINW4OZY = require("./chunk-UINW4OZY.js");
|
|
39
|
+
var import_chunk_2HPKSKDE = require("./chunk-2HPKSKDE.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_UINW4OZY.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_2HPKSKDE.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_2HPKSKDE.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -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_SZ735VHI_exports = {};
|
|
20
|
+
__export(chunk_SZ735VHI_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_SZ735VHI_exports);
|
|
24
|
+
var import_chunk_NWDOSRX2 = require("./chunk-NWDOSRX2.js");
|
|
25
|
+
var packageJson = (0, import_chunk_NWDOSRX2.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_UINW4OZY_exports = {};
|
|
20
|
+
__export(chunk_UINW4OZY_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_UINW4OZY_exports);
|
|
24
|
+
var import_chunk_M32TYUAI = require("./chunk-M32TYUAI.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_M32TYUAI.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_USHXVHZH_exports = {};
|
|
30
|
+
__export(chunk_USHXVHZH_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_USHXVHZH_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_VL7TE7XG = require("./chunk-VL7TE7XG.js");
|
|
39
|
+
var import_chunk_AYKHFUHB = require("./chunk-AYKHFUHB.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_VL7TE7XG.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_AYKHFUHB.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
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_VL7TE7XG_exports = {};
|
|
20
|
+
__export(chunk_VL7TE7XG_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_VL7TE7XG_exports);
|
|
24
|
+
var import_chunk_SZ735VHI = require("./chunk-SZ735VHI.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_SZ735VHI.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|