@prisma/internals 7.1.0-dev.7 → 7.1.0-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-6XDWK3XF.js → chunk-5PSKRIDD.js} +8 -8
- package/dist/{chunk-XV3WHAKH.js → chunk-67VG7D7O.js} +5 -5
- package/dist/{chunk-OSZLIH2O.js → chunk-6QBIOHAP.js} +5 -5
- package/dist/{chunk-7EHSYU4M.js → chunk-A2USANLU.js} +15 -15
- package/dist/{chunk-37MFPCCH.js → chunk-BENPILNZ.js} +8 -8
- package/dist/{chunk-63BLJTNP.js → chunk-EVTO2FBN.js} +8 -8
- package/dist/{chunk-U6QNOIH7.js → chunk-HPNH7TNS.js} +8 -8
- package/dist/{chunk-6CBEJKSD.js → chunk-HRG6U4YH.js} +6 -6
- package/dist/{chunk-KV5M6BWD.js → chunk-IFWLRTB6.js} +8 -8
- package/dist/{chunk-UUZVVTOP.js → chunk-JLGCENV5.js} +5 -5
- package/dist/{chunk-UIA6QRTF.js → chunk-JNCQK5XD.js} +5 -5
- package/dist/{chunk-X7WVXCBB.js → chunk-MWQ2Y7KM.js} +7 -7
- package/dist/{chunk-AYH4F3GT.js → chunk-NXZUGHMS.js} +5 -5
- package/dist/{chunk-UYMUOW4P.js → chunk-O5F4ECCR.js} +15 -15
- package/dist/{chunk-DIBNN6Y3.js → chunk-OJNWNV3P.js} +5 -5
- package/dist/{chunk-NHM75P2J.js → chunk-QXSCGG3B.js} +5 -5
- package/dist/{chunk-5XPHYAC5.js → chunk-RBTEBPRE.js} +5 -5
- package/dist/{chunk-DM6LMAL6.js → chunk-S26FTO4G.js} +5 -5
- package/dist/{chunk-CFSNTJU3.js → chunk-Y4HP7ICO.js} +8 -8
- package/dist/{chunk-PHCC4RQK.js → chunk-ZBUCDPSY.js} +7 -7
- 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 +13 -13
|
@@ -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_5PSKRIDD_exports = {};
|
|
30
|
+
__export(chunk_5PSKRIDD_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_5PSKRIDD_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_JLGCENV5 = require("./chunk-JLGCENV5.js");
|
|
39
|
+
var import_chunk_RBTEBPRE = require("./chunk-RBTEBPRE.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_JLGCENV5.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_RBTEBPRE.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_RBTEBPRE.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_67VG7D7O_exports = {};
|
|
30
|
+
__export(chunk_67VG7D7O_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_67VG7D7O_exports);
|
|
37
|
+
var import_chunk_QXSCGG3B = require("./chunk-QXSCGG3B.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_QXSCGG3B.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -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_6QBIOHAP_exports = {};
|
|
20
|
+
__export(chunk_6QBIOHAP_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_6QBIOHAP_exports);
|
|
28
|
+
var import_chunk_67VG7D7O = require("./chunk-67VG7D7O.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_67VG7D7O.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_A2USANLU_exports = {};
|
|
30
|
+
__export(chunk_A2USANLU_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,7 +40,7 @@ __export(chunk_7EHSYU4M_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_A2USANLU_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
45
|
var import_chunk_PKOQQT7I = require("./chunk-PKOQQT7I.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
@@ -51,11 +51,11 @@ var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
|
51
51
|
var import_chunk_BGMZPA2F = require("./chunk-BGMZPA2F.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
53
53
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
54
|
+
var import_chunk_6QBIOHAP = require("./chunk-6QBIOHAP.js");
|
|
55
|
+
var import_chunk_MWQ2Y7KM = require("./chunk-MWQ2Y7KM.js");
|
|
56
|
+
var import_chunk_Y4HP7ICO = require("./chunk-Y4HP7ICO.js");
|
|
57
|
+
var import_chunk_HPNH7TNS = require("./chunk-HPNH7TNS.js");
|
|
58
|
+
var import_chunk_67VG7D7O = require("./chunk-67VG7D7O.js");
|
|
59
59
|
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
60
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
61
61
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
@@ -77,7 +77,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
77
77
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
78
78
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
79
79
|
handleFormatPanic(() => {
|
|
80
|
-
|
|
80
|
+
import_chunk_67VG7D7O.prismaSchemaWasm.debug_panic();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
const defaultFormattingOptions = {
|
|
@@ -94,10 +94,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
94
94
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
95
95
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
96
96
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
97
|
-
const lintDiagnostics2 = (0,
|
|
97
|
+
const lintDiagnostics2 = (0, import_chunk_6QBIOHAP.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
98
98
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
99
99
|
});
|
|
100
|
-
const lintWarnings = (0,
|
|
100
|
+
const lintWarnings = (0, import_chunk_6QBIOHAP.getLintWarningsAsText)(lintDiagnostics);
|
|
101
101
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
102
102
|
console.warn(lintWarnings);
|
|
103
103
|
}
|
|
@@ -124,7 +124,7 @@ function handleFormatPanic(tryCb) {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function formatWasm(schema, documentFormattingParams) {
|
|
127
|
-
const formattedSchema =
|
|
127
|
+
const formattedSchema = import_chunk_67VG7D7O.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
128
128
|
return formattedSchema;
|
|
129
129
|
}
|
|
130
130
|
async function loadSchemaContext({
|
|
@@ -160,7 +160,7 @@ async function processSchemaResult({
|
|
|
160
160
|
if (printLoadMessage) {
|
|
161
161
|
(0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
162
162
|
}
|
|
163
|
-
const configFromPsl = await (0,
|
|
163
|
+
const configFromPsl = await (0, import_chunk_Y4HP7ICO.getConfig)({ datamodel: schemaResult.schemas });
|
|
164
164
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
165
165
|
return {
|
|
166
166
|
schemaFiles: schemaResult.schemas,
|
|
@@ -215,7 +215,7 @@ async function getGenerators(options) {
|
|
|
215
215
|
}
|
|
216
216
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
217
217
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
218
|
-
const dmmf = await (0,
|
|
218
|
+
const dmmf = await (0, import_chunk_HPNH7TNS.getDMMF)({
|
|
219
219
|
datamodel: schemaContext.schemaFiles,
|
|
220
220
|
previewFeatures
|
|
221
221
|
});
|
|
@@ -266,7 +266,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
266
266
|
fromEnvVar: null
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
const datamodel = (0,
|
|
269
|
+
const datamodel = (0, import_chunk_MWQ2Y7KM.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
270
270
|
const options2 = {
|
|
271
271
|
datamodel,
|
|
272
272
|
datasources: schemaContext.datasources,
|
|
@@ -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_BENPILNZ_exports = {};
|
|
30
|
+
__export(chunk_BENPILNZ_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_BENPILNZ_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_OJNWNV3P = require("./chunk-OJNWNV3P.js");
|
|
39
|
+
var import_chunk_67VG7D7O = require("./chunk-67VG7D7O.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_OJNWNV3P.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_67VG7D7O.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_67VG7D7O.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -26,16 +26,16 @@ 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_EVTO2FBN_exports = {};
|
|
30
|
+
__export(chunk_EVTO2FBN_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_EVTO2FBN_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_JLGCENV5 = require("./chunk-JLGCENV5.js");
|
|
38
|
+
var import_chunk_RBTEBPRE = require("./chunk-RBTEBPRE.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");
|
|
@@ -58,7 +58,7 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_JLGCENV5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -70,13 +70,13 @@ async function getDMMF(options) {
|
|
|
70
70
|
() => {
|
|
71
71
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_RBTEBPRE.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_RBTEBPRE.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
@@ -26,16 +26,16 @@ 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_HPNH7TNS_exports = {};
|
|
30
|
+
__export(chunk_HPNH7TNS_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_HPNH7TNS_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_OJNWNV3P = require("./chunk-OJNWNV3P.js");
|
|
38
|
+
var import_chunk_67VG7D7O = require("./chunk-67VG7D7O.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");
|
|
@@ -58,7 +58,7 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_OJNWNV3P.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -70,13 +70,13 @@ async function getDMMF(options) {
|
|
|
70
70
|
() => {
|
|
71
71
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_67VG7D7O.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_67VG7D7O.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(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_HRG6U4YH_exports = {};
|
|
20
|
+
__export(chunk_HRG6U4YH_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_HRG6U4YH_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.1.0-dev.
|
|
29
|
+
version: "7.1.0-dev.9",
|
|
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",
|
|
@@ -107,8 +107,8 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
107
107
|
"@prisma/generator": "workspace:*",
|
|
108
108
|
"@prisma/generator-helper": "workspace:*",
|
|
109
109
|
"@prisma/get-platform": "workspace:*",
|
|
110
|
-
"@prisma/prisma-schema-wasm": "
|
|
111
|
-
"@prisma/schema-engine-wasm": "
|
|
110
|
+
"@prisma/prisma-schema-wasm": "7.1.0-2.f09f2815f091dbba658cdcd2264306d88bb5bda6",
|
|
111
|
+
"@prisma/schema-engine-wasm": "7.1.0-2.f09f2815f091dbba658cdcd2264306d88bb5bda6",
|
|
112
112
|
"@prisma/schema-files-loader": "workspace:*",
|
|
113
113
|
arg: "5.0.2",
|
|
114
114
|
prompts: "2.4.2"
|
|
@@ -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_IFWLRTB6_exports = {};
|
|
30
|
+
__export(chunk_IFWLRTB6_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_IFWLRTB6_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_JLGCENV5 = require("./chunk-JLGCENV5.js");
|
|
39
|
+
var import_chunk_RBTEBPRE = require("./chunk-RBTEBPRE.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_JLGCENV5.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_RBTEBPRE.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_RBTEBPRE.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_JLGCENV5_exports = {};
|
|
20
|
+
__export(chunk_JLGCENV5_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_JLGCENV5_exports);
|
|
24
24
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_NXZUGHMS = require("./chunk-NXZUGHMS.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_NXZUGHMS.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -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_JNCQK5XD_exports = {};
|
|
20
|
+
__export(chunk_JNCQK5XD_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_JNCQK5XD_exports);
|
|
28
|
+
var import_chunk_RBTEBPRE = require("./chunk-RBTEBPRE.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_RBTEBPRE.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_MWQ2Y7KM_exports = {};
|
|
30
|
+
__export(chunk_MWQ2Y7KM_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_MWQ2Y7KM_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_OJNWNV3P = require("./chunk-OJNWNV3P.js");
|
|
39
|
+
var import_chunk_67VG7D7O = require("./chunk-67VG7D7O.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_OJNWNV3P.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_67VG7D7O.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
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_NXZUGHMS_exports = {};
|
|
20
|
+
__export(chunk_NXZUGHMS_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_NXZUGHMS_exports);
|
|
24
|
+
var import_chunk_HRG6U4YH = require("./chunk-HRG6U4YH.js");
|
|
25
|
+
var packageJson = (0, import_chunk_HRG6U4YH.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_O5F4ECCR_exports = {};
|
|
30
|
+
__export(chunk_O5F4ECCR_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,7 +40,7 @@ __export(chunk_UYMUOW4P_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_O5F4ECCR_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
45
|
var import_chunk_PKOQQT7I = require("./chunk-PKOQQT7I.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
@@ -51,11 +51,11 @@ var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
|
51
51
|
var import_chunk_BGMZPA2F = require("./chunk-BGMZPA2F.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
53
53
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
54
|
+
var import_chunk_JNCQK5XD = require("./chunk-JNCQK5XD.js");
|
|
55
|
+
var import_chunk_ZBUCDPSY = require("./chunk-ZBUCDPSY.js");
|
|
56
|
+
var import_chunk_5PSKRIDD = require("./chunk-5PSKRIDD.js");
|
|
57
|
+
var import_chunk_EVTO2FBN = require("./chunk-EVTO2FBN.js");
|
|
58
|
+
var import_chunk_RBTEBPRE = require("./chunk-RBTEBPRE.js");
|
|
59
59
|
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
60
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
61
61
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
@@ -77,7 +77,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
77
77
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
78
78
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
79
79
|
handleFormatPanic(() => {
|
|
80
|
-
|
|
80
|
+
import_chunk_RBTEBPRE.prismaSchemaWasm.debug_panic();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
const defaultFormattingOptions = {
|
|
@@ -94,10 +94,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
94
94
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
95
95
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
96
96
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
97
|
-
const lintDiagnostics2 = (0,
|
|
97
|
+
const lintDiagnostics2 = (0, import_chunk_JNCQK5XD.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
98
98
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
99
99
|
});
|
|
100
|
-
const lintWarnings = (0,
|
|
100
|
+
const lintWarnings = (0, import_chunk_JNCQK5XD.getLintWarningsAsText)(lintDiagnostics);
|
|
101
101
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
102
102
|
console.warn(lintWarnings);
|
|
103
103
|
}
|
|
@@ -124,7 +124,7 @@ function handleFormatPanic(tryCb) {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function formatWasm(schema, documentFormattingParams) {
|
|
127
|
-
const formattedSchema =
|
|
127
|
+
const formattedSchema = import_chunk_RBTEBPRE.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
128
128
|
return formattedSchema;
|
|
129
129
|
}
|
|
130
130
|
async function loadSchemaContext({
|
|
@@ -160,7 +160,7 @@ async function processSchemaResult({
|
|
|
160
160
|
if (printLoadMessage) {
|
|
161
161
|
(0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
162
162
|
}
|
|
163
|
-
const configFromPsl = await (0,
|
|
163
|
+
const configFromPsl = await (0, import_chunk_5PSKRIDD.getConfig)({ datamodel: schemaResult.schemas });
|
|
164
164
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
165
165
|
return {
|
|
166
166
|
schemaFiles: schemaResult.schemas,
|
|
@@ -215,7 +215,7 @@ async function getGenerators(options) {
|
|
|
215
215
|
}
|
|
216
216
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
217
217
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
218
|
-
const dmmf = await (0,
|
|
218
|
+
const dmmf = await (0, import_chunk_EVTO2FBN.getDMMF)({
|
|
219
219
|
datamodel: schemaContext.schemaFiles,
|
|
220
220
|
previewFeatures
|
|
221
221
|
});
|
|
@@ -266,7 +266,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
266
266
|
fromEnvVar: null
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
const datamodel = (0,
|
|
269
|
+
const datamodel = (0, import_chunk_ZBUCDPSY.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
270
270
|
const options2 = {
|
|
271
271
|
datamodel,
|
|
272
272
|
datasources: schemaContext.datasources,
|
|
@@ -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_OJNWNV3P_exports = {};
|
|
20
|
+
__export(chunk_OJNWNV3P_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_OJNWNV3P_exports);
|
|
24
24
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_S26FTO4G = require("./chunk-S26FTO4G.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_S26FTO4G.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|