@prisma/internals 6.1.0-dev.1 → 6.1.0-dev.2
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-QDOMMF5G.js → chunk-2QSNILRH.js} +19 -19
- package/dist/{chunk-3PBQDKPK.js → chunk-AFWVDOPK.js} +5 -5
- package/dist/{chunk-SBSURDHK.js → chunk-BMDD7WQX.js} +8 -8
- package/dist/{chunk-WVGKD3KM.js → chunk-CO56NBYR.js} +5 -5
- package/dist/{chunk-5RRTA2GZ.js → chunk-DUZ25E6S.js} +19 -19
- package/dist/{chunk-VCUPZJX2.js → chunk-FCSFS3ED.js} +7 -7
- package/dist/{chunk-HRCVABJC.js → chunk-FZA7UXNP.js} +5 -5
- package/dist/{chunk-CCGCZ6T3.js → chunk-OLKRUSOM.js} +8 -8
- package/dist/{chunk-KNBPQSE7.js → chunk-PKX4IW2Y.js} +7 -7
- package/dist/{chunk-KFFXIB4M.js → chunk-QGYKPH55.js} +8 -8
- package/dist/{chunk-AV3YRAF7.js → chunk-QRT26ULD.js} +5 -5
- package/dist/{chunk-YNPUNJMZ.js → chunk-R5SKCJDO.js} +8 -8
- package/dist/{chunk-R3WQECNL.js → chunk-REPCDWZ2.js} +5 -5
- package/dist/{chunk-BNRRMKGX.js → chunk-SV7K7BEF.js} +8 -8
- package/dist/{chunk-GUD2WGWW.js → chunk-UHMT3MWW.js} +5 -5
- package/dist/{chunk-MIOYH7IR.js → chunk-UPOOOCZ4.js} +4 -4
- package/dist/{chunk-UFZF4RUO.js → chunk-VAPKCPNH.js} +8 -8
- package/dist/{chunk-YARHADMO.js → chunk-XXYXWXRT.js} +5 -5
- package/dist/{chunk-Z7ROEU4E.js → chunk-YALATXKM.js} +5 -5
- package/dist/{chunk-UQJVO3AP.js → chunk-YRALI4Z5.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +12 -12
- package/dist/cli/getSchema.js +17 -17
- package/dist/cli/hashes.js +12 -12
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +11 -11
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +20 -20
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +11 -11
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +11 -11
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +12 -12
- package/dist/get-generators/getGenerators.js +14 -14
- package/dist/index.js +39 -39
- package/dist/sendPanic.js +11 -11
- package/dist/utils/getEnvPaths.js +11 -11
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +11 -11
- package/dist/utils/loadEnvFile.js +11 -11
- package/dist/wasm.js +4 -4
- package/package.json +8 -8
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export2(
|
29
|
+
var chunk_2QSNILRH_exports = {};
|
30
|
+
__export2(chunk_2QSNILRH_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug5,
|
@@ -55,7 +55,7 @@ __export2(chunk_QDOMMF5G_exports, {
|
|
55
55
|
sendPanic: () => sendPanic,
|
56
56
|
skipIndex: () => skipIndex
|
57
57
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
58
|
+
module.exports = __toCommonJS2(chunk_2QSNILRH_exports);
|
59
59
|
var import_chunk_77IC3DNO = require("./chunk-77IC3DNO.js");
|
60
60
|
var import_chunk_MGZOEY6N = require("./chunk-MGZOEY6N.js");
|
61
61
|
var import_chunk_S57RMXZW = require("./chunk-S57RMXZW.js");
|
@@ -80,13 +80,13 @@ var import_chunk_SLBBRUQS = require("./chunk-SLBBRUQS.js");
|
|
80
80
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
81
81
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
82
82
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
83
|
-
var
|
84
|
-
var
|
85
|
-
var
|
86
|
-
var
|
83
|
+
var import_chunk_XXYXWXRT = require("./chunk-XXYXWXRT.js");
|
84
|
+
var import_chunk_FCSFS3ED = require("./chunk-FCSFS3ED.js");
|
85
|
+
var import_chunk_SV7K7BEF = require("./chunk-SV7K7BEF.js");
|
86
|
+
var import_chunk_VAPKCPNH = require("./chunk-VAPKCPNH.js");
|
87
87
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
88
88
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
89
|
-
var
|
89
|
+
var import_chunk_CO56NBYR = require("./chunk-CO56NBYR.js");
|
90
90
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
91
91
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
92
92
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
@@ -15522,7 +15522,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
15522
15522
|
}
|
15523
15523
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
15524
15524
|
debug2("Loading config");
|
15525
|
-
const config2 = await (0,
|
15525
|
+
const config2 = await (0, import_chunk_SV7K7BEF.getConfig)({
|
15526
15526
|
datamodel: files,
|
15527
15527
|
ignoreEnvVarErrors: true
|
15528
15528
|
});
|
@@ -15830,8 +15830,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
15830
15830
|
if (argName.includes("schema")) {
|
15831
15831
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
15832
15832
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
15833
|
-
const config2 = await (0,
|
15834
|
-
const url = (0,
|
15833
|
+
const config2 = await (0, import_chunk_SV7K7BEF.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
15834
|
+
const url = (0, import_chunk_SV7K7BEF.resolveUrl)((0, import_chunk_SV7K7BEF.getEffectiveUrl)(config2.datasources[0]));
|
15835
15835
|
if (url?.startsWith("prisma://")) {
|
15836
15836
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
15837
15837
|
}
|
@@ -16003,7 +16003,7 @@ async function getGenerators(options) {
|
|
16003
16003
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
16004
16004
|
}
|
16005
16005
|
}
|
16006
|
-
const config = await (0,
|
16006
|
+
const config = await (0, import_chunk_SV7K7BEF.getConfig)({
|
16007
16007
|
datamodel: schemas,
|
16008
16008
|
datamodelPath: schemaPath,
|
16009
16009
|
prismaPath,
|
@@ -16014,7 +16014,7 @@ async function getGenerators(options) {
|
|
16014
16014
|
}
|
16015
16015
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
16016
16016
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
16017
|
-
const dmmf = await (0,
|
16017
|
+
const dmmf = await (0, import_chunk_VAPKCPNH.getDMMF)({
|
16018
16018
|
datamodel: schemas,
|
16019
16019
|
datamodelPath: schemaPath,
|
16020
16020
|
prismaPath,
|
@@ -16075,7 +16075,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
16075
16075
|
fromEnvVar: "null"
|
16076
16076
|
};
|
16077
16077
|
}
|
16078
|
-
const datamodel = (0,
|
16078
|
+
const datamodel = (0, import_chunk_FCSFS3ED.mergeSchemas)({ schemas });
|
16079
16079
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
16080
16080
|
const options2 = {
|
16081
16081
|
datamodel,
|
@@ -16158,7 +16158,7 @@ generator gen {
|
|
16158
16158
|
debug6({ generatorBinaryPaths });
|
16159
16159
|
generator.setBinaryPaths(generatorBinaryPaths);
|
16160
16160
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
16161
|
-
const customDmmf = await (0,
|
16161
|
+
const customDmmf = await (0, import_chunk_VAPKCPNH.getDMMF)({
|
16162
16162
|
datamodel: schemas,
|
16163
16163
|
datamodelPath: schemaPath,
|
16164
16164
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
@@ -16456,7 +16456,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
16456
16456
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
16457
16457
|
handleFormatPanic(
|
16458
16458
|
() => {
|
16459
|
-
|
16459
|
+
import_chunk_CO56NBYR.prismaSchemaWasm.debug_panic();
|
16460
16460
|
},
|
16461
16461
|
{ schemas: schemas2 }
|
16462
16462
|
);
|
@@ -16476,12 +16476,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
16476
16476
|
() => {
|
16477
16477
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
16478
16478
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
16479
|
-
const lintDiagnostics2 = (0,
|
16479
|
+
const lintDiagnostics2 = (0, import_chunk_XXYXWXRT.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
16480
16480
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
16481
16481
|
},
|
16482
16482
|
{ schemas: schemas2 }
|
16483
16483
|
);
|
16484
|
-
const lintWarnings = (0,
|
16484
|
+
const lintWarnings = (0, import_chunk_XXYXWXRT.getLintWarningsAsText)(lintDiagnostics);
|
16485
16485
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
16486
16486
|
console.warn(lintWarnings);
|
16487
16487
|
}
|
@@ -16511,7 +16511,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
16511
16511
|
}
|
16512
16512
|
}
|
16513
16513
|
function formatWasm(schema, documentFormattingParams) {
|
16514
|
-
const formattedSchema =
|
16514
|
+
const formattedSchema = import_chunk_CO56NBYR.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
16515
16515
|
return formattedSchema;
|
16516
16516
|
}
|
16517
16517
|
/*! Bundled license information:
|
@@ -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_AFWVDOPK_exports = {};
|
20
|
+
__export(chunk_AFWVDOPK_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_AFWVDOPK_exports);
|
24
|
+
var import_chunk_YALATXKM = require("./chunk-YALATXKM.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_YALATXKM.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -26,19 +26,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_BMDD7WQX_exports = {};
|
30
|
+
__export(chunk_BMDD7WQX_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_BMDD7WQX_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_YRALI4Z5 = require("./chunk-YRALI4Z5.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
41
|
-
var
|
41
|
+
var import_chunk_FZA7UXNP = require("./chunk-FZA7UXNP.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: validate]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_YRALI4Z5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "ValidateError";
|
65
65
|
}
|
66
66
|
};
|
@@ -72,13 +72,13 @@ function validate(options) {
|
|
72
72
|
() => {
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
74
74
|
debug("Triggering a Rust panic...");
|
75
|
-
|
75
|
+
import_chunk_FZA7UXNP.prismaSchemaWasm.debug_panic();
|
76
76
|
}
|
77
77
|
const params = JSON.stringify({
|
78
78
|
prismaSchema: options.schemas,
|
79
79
|
noColor: Boolean(process.env.NO_COLOR)
|
80
80
|
});
|
81
|
-
|
81
|
+
import_chunk_FZA7UXNP.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|
@@ -26,14 +26,14 @@ 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_CO56NBYR_exports = {};
|
30
|
+
__export(chunk_CO56NBYR_exports, {
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
33
33
|
wasm_exports: () => wasm_exports
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_CO56NBYR_exports);
|
36
|
+
var import_chunk_UPOOOCZ4 = require("./chunk-UPOOOCZ4.js");
|
37
37
|
var import_chunk_HOZFIXMD = require("./chunk-HOZFIXMD.js");
|
38
38
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
39
39
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
@@ -42,6 +42,6 @@ var wasm_exports = {};
|
|
42
42
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
43
43
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
44
44
|
});
|
45
|
-
var { dependencies } = (0,
|
45
|
+
var { dependencies } = (0, import_chunk_UPOOOCZ4.require_package)();
|
46
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
47
47
|
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_HOZFIXMD.WasmPanicRegistry();
|
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export2(
|
29
|
+
var chunk_DUZ25E6S_exports = {};
|
30
|
+
__export2(chunk_DUZ25E6S_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug5,
|
@@ -55,7 +55,7 @@ __export2(chunk_5RRTA2GZ_exports, {
|
|
55
55
|
sendPanic: () => sendPanic,
|
56
56
|
skipIndex: () => skipIndex
|
57
57
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
58
|
+
module.exports = __toCommonJS2(chunk_DUZ25E6S_exports);
|
59
59
|
var import_chunk_77IC3DNO = require("./chunk-77IC3DNO.js");
|
60
60
|
var import_chunk_MGZOEY6N = require("./chunk-MGZOEY6N.js");
|
61
61
|
var import_chunk_S57RMXZW = require("./chunk-S57RMXZW.js");
|
@@ -80,13 +80,13 @@ var import_chunk_SLBBRUQS = require("./chunk-SLBBRUQS.js");
|
|
80
80
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
81
81
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
82
82
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
83
|
-
var
|
84
|
-
var
|
85
|
-
var
|
86
|
-
var
|
83
|
+
var import_chunk_UHMT3MWW = require("./chunk-UHMT3MWW.js");
|
84
|
+
var import_chunk_PKX4IW2Y = require("./chunk-PKX4IW2Y.js");
|
85
|
+
var import_chunk_OLKRUSOM = require("./chunk-OLKRUSOM.js");
|
86
|
+
var import_chunk_QGYKPH55 = require("./chunk-QGYKPH55.js");
|
87
87
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
88
88
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
89
|
-
var
|
89
|
+
var import_chunk_FZA7UXNP = require("./chunk-FZA7UXNP.js");
|
90
90
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
91
91
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
92
92
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
@@ -15522,7 +15522,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
15522
15522
|
}
|
15523
15523
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
15524
15524
|
debug2("Loading config");
|
15525
|
-
const config2 = await (0,
|
15525
|
+
const config2 = await (0, import_chunk_OLKRUSOM.getConfig)({
|
15526
15526
|
datamodel: files,
|
15527
15527
|
ignoreEnvVarErrors: true
|
15528
15528
|
});
|
@@ -15830,8 +15830,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
15830
15830
|
if (argName.includes("schema")) {
|
15831
15831
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
15832
15832
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
15833
|
-
const config2 = await (0,
|
15834
|
-
const url = (0,
|
15833
|
+
const config2 = await (0, import_chunk_OLKRUSOM.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
15834
|
+
const url = (0, import_chunk_OLKRUSOM.resolveUrl)((0, import_chunk_OLKRUSOM.getEffectiveUrl)(config2.datasources[0]));
|
15835
15835
|
if (url?.startsWith("prisma://")) {
|
15836
15836
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
15837
15837
|
}
|
@@ -16003,7 +16003,7 @@ async function getGenerators(options) {
|
|
16003
16003
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
16004
16004
|
}
|
16005
16005
|
}
|
16006
|
-
const config = await (0,
|
16006
|
+
const config = await (0, import_chunk_OLKRUSOM.getConfig)({
|
16007
16007
|
datamodel: schemas,
|
16008
16008
|
datamodelPath: schemaPath,
|
16009
16009
|
prismaPath,
|
@@ -16014,7 +16014,7 @@ async function getGenerators(options) {
|
|
16014
16014
|
}
|
16015
16015
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
16016
16016
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
16017
|
-
const dmmf = await (0,
|
16017
|
+
const dmmf = await (0, import_chunk_QGYKPH55.getDMMF)({
|
16018
16018
|
datamodel: schemas,
|
16019
16019
|
datamodelPath: schemaPath,
|
16020
16020
|
prismaPath,
|
@@ -16075,7 +16075,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
16075
16075
|
fromEnvVar: "null"
|
16076
16076
|
};
|
16077
16077
|
}
|
16078
|
-
const datamodel = (0,
|
16078
|
+
const datamodel = (0, import_chunk_PKX4IW2Y.mergeSchemas)({ schemas });
|
16079
16079
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
16080
16080
|
const options2 = {
|
16081
16081
|
datamodel,
|
@@ -16158,7 +16158,7 @@ generator gen {
|
|
16158
16158
|
debug6({ generatorBinaryPaths });
|
16159
16159
|
generator.setBinaryPaths(generatorBinaryPaths);
|
16160
16160
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
16161
|
-
const customDmmf = await (0,
|
16161
|
+
const customDmmf = await (0, import_chunk_QGYKPH55.getDMMF)({
|
16162
16162
|
datamodel: schemas,
|
16163
16163
|
datamodelPath: schemaPath,
|
16164
16164
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
@@ -16456,7 +16456,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
16456
16456
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
16457
16457
|
handleFormatPanic(
|
16458
16458
|
() => {
|
16459
|
-
|
16459
|
+
import_chunk_FZA7UXNP.prismaSchemaWasm.debug_panic();
|
16460
16460
|
},
|
16461
16461
|
{ schemas: schemas2 }
|
16462
16462
|
);
|
@@ -16476,12 +16476,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
16476
16476
|
() => {
|
16477
16477
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
16478
16478
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
16479
|
-
const lintDiagnostics2 = (0,
|
16479
|
+
const lintDiagnostics2 = (0, import_chunk_UHMT3MWW.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
16480
16480
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
16481
16481
|
},
|
16482
16482
|
{ schemas: schemas2 }
|
16483
16483
|
);
|
16484
|
-
const lintWarnings = (0,
|
16484
|
+
const lintWarnings = (0, import_chunk_UHMT3MWW.getLintWarningsAsText)(lintDiagnostics);
|
16485
16485
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
16486
16486
|
console.warn(lintWarnings);
|
16487
16487
|
}
|
@@ -16511,7 +16511,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
16511
16511
|
}
|
16512
16512
|
}
|
16513
16513
|
function formatWasm(schema, documentFormattingParams) {
|
16514
|
-
const formattedSchema =
|
16514
|
+
const formattedSchema = import_chunk_FZA7UXNP.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
16515
16515
|
return formattedSchema;
|
16516
16516
|
}
|
16517
16517
|
/*! Bundled license information:
|
@@ -26,19 +26,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_FCSFS3ED_exports = {};
|
30
|
+
__export(chunk_FCSFS3ED_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_FCSFS3ED_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_AFWVDOPK = require("./chunk-AFWVDOPK.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
41
|
-
var
|
41
|
+
var import_chunk_CO56NBYR = require("./chunk-CO56NBYR.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_AFWVDOPK.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_CO56NBYR.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -26,14 +26,14 @@ 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_FZA7UXNP_exports = {};
|
30
|
+
__export(chunk_FZA7UXNP_exports, {
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
33
33
|
wasm_exports: () => wasm_exports
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_FZA7UXNP_exports);
|
36
|
+
var import_chunk_REPCDWZ2 = require("./chunk-REPCDWZ2.js");
|
37
37
|
var import_chunk_HOZFIXMD = require("./chunk-HOZFIXMD.js");
|
38
38
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
39
39
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
@@ -42,6 +42,6 @@ var wasm_exports = {};
|
|
42
42
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
43
43
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
44
44
|
});
|
45
|
-
var { dependencies } = (0,
|
45
|
+
var { dependencies } = (0, import_chunk_REPCDWZ2.require_package)();
|
46
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
47
47
|
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_HOZFIXMD.WasmPanicRegistry();
|
@@ -26,22 +26,22 @@ 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_OLKRUSOM_exports = {};
|
30
|
+
__export(chunk_OLKRUSOM_exports, {
|
31
31
|
GetConfigError: () => GetConfigError,
|
32
32
|
getConfig: () => getConfig,
|
33
33
|
getDirectUrl: () => getDirectUrl,
|
34
34
|
getEffectiveUrl: () => getEffectiveUrl,
|
35
35
|
resolveUrl: () => resolveUrl
|
36
36
|
});
|
37
|
-
module.exports = __toCommonJS(
|
37
|
+
module.exports = __toCommonJS(chunk_OLKRUSOM_exports);
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
39
39
|
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
40
40
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
41
|
-
var
|
41
|
+
var import_chunk_YRALI4Z5 = require("./chunk-YRALI4Z5.js");
|
42
42
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
43
43
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
44
|
-
var
|
44
|
+
var import_chunk_FZA7UXNP = require("./chunk-FZA7UXNP.js");
|
45
45
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
46
46
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
47
47
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
65
65
|
}).exhaustive();
|
66
66
|
const errorMessageWithContext = `${constructedErrorMessage}
|
67
67
|
[Context: getConfig]`;
|
68
|
-
super((0,
|
68
|
+
super((0, import_chunk_YRALI4Z5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
69
69
|
this.name = "GetConfigError";
|
70
70
|
}
|
71
71
|
};
|
@@ -90,7 +90,7 @@ async function getConfig(options) {
|
|
90
90
|
() => {
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
92
92
|
debug("Triggering a Rust panic...");
|
93
|
-
|
93
|
+
import_chunk_FZA7UXNP.prismaSchemaWasm.debug_panic();
|
94
94
|
}
|
95
95
|
const params = JSON.stringify({
|
96
96
|
prismaSchema: options.datamodel,
|
@@ -98,7 +98,7 @@ async function getConfig(options) {
|
|
98
98
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
99
99
|
env: process.env
|
100
100
|
});
|
101
|
-
const data =
|
101
|
+
const data = import_chunk_FZA7UXNP.prismaSchemaWasm.get_config(params);
|
102
102
|
return data;
|
103
103
|
},
|
104
104
|
(e) => ({
|
@@ -26,19 +26,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_PKX4IW2Y_exports = {};
|
30
|
+
__export(chunk_PKX4IW2Y_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_PKX4IW2Y_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_YRALI4Z5 = require("./chunk-YRALI4Z5.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
41
|
-
var
|
41
|
+
var import_chunk_FZA7UXNP = require("./chunk-FZA7UXNP.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_YRALI4Z5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_FZA7UXNP.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -26,18 +26,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_QGYKPH55_exports = {};
|
30
|
+
__export(chunk_QGYKPH55_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_QGYKPH55_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
37
|
-
var
|
37
|
+
var import_chunk_YRALI4Z5 = require("./chunk-YRALI4Z5.js");
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
40
|
-
var
|
40
|
+
var import_chunk_FZA7UXNP = require("./chunk-FZA7UXNP.js");
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
42
42
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: getDmmf]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_YRALI4Z5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "GetDmmfError";
|
65
65
|
}
|
66
66
|
};
|
@@ -91,13 +91,13 @@ async function getDMMF(options) {
|
|
91
91
|
() => {
|
92
92
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
93
93
|
debug("Triggering a Rust panic...");
|
94
|
-
|
94
|
+
import_chunk_FZA7UXNP.prismaSchemaWasm.debug_panic();
|
95
95
|
}
|
96
96
|
const params = JSON.stringify({
|
97
97
|
prismaSchema: datamodel,
|
98
98
|
noColor: Boolean(process.env.NO_COLOR)
|
99
99
|
});
|
100
|
-
const data =
|
100
|
+
const data = import_chunk_FZA7UXNP.prismaSchemaWasm.get_dmmf(params);
|
101
101
|
return data;
|
102
102
|
},
|
103
103
|
(e) => ({
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
19
|
+
var chunk_QRT26ULD_exports = {};
|
20
|
+
__export(chunk_QRT26ULD_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_QRT26ULD_exports);
|
24
|
+
var import_chunk_REPCDWZ2 = require("./chunk-REPCDWZ2.js");
|
25
|
+
var packageJson = (0, import_chunk_REPCDWZ2.require_package)();
|
26
26
|
var version = packageJson.version;
|
@@ -26,19 +26,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_R5SKCJDO_exports = {};
|
30
|
+
__export(chunk_R5SKCJDO_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_R5SKCJDO_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_AFWVDOPK = require("./chunk-AFWVDOPK.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
41
|
-
var
|
41
|
+
var import_chunk_CO56NBYR = require("./chunk-CO56NBYR.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: validate]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_AFWVDOPK.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "ValidateError";
|
65
65
|
}
|
66
66
|
};
|
@@ -72,13 +72,13 @@ function validate(options) {
|
|
72
72
|
() => {
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
74
74
|
debug("Triggering a Rust panic...");
|
75
|
-
|
75
|
+
import_chunk_CO56NBYR.prismaSchemaWasm.debug_panic();
|
76
76
|
}
|
77
77
|
const params = JSON.stringify({
|
78
78
|
prismaSchema: options.schemas,
|
79
79
|
noColor: Boolean(process.env.NO_COLOR)
|
80
80
|
});
|
81
|
-
|
81
|
+
import_chunk_CO56NBYR.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|