@prisma/internals 5.17.0 → 5.18.0-dev.1
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-D5RDZNDT.js → chunk-4GJJVUUX.js} +5 -5
- package/dist/{chunk-4S2YTWAX.js → chunk-5ODCXJCI.js} +4 -4
- package/dist/{chunk-MFESV73I.js → chunk-AHN4NB7N.js} +8 -8
- package/dist/{chunk-2M6NEPUJ.js → chunk-AOTGBPMZ.js} +7 -7
- package/dist/{chunk-QSYJIWIT.js → chunk-AS3FWIXC.js} +19 -19
- package/dist/{chunk-WMUQJRSW.js → chunk-D4D2OCAW.js} +19 -19
- package/dist/{chunk-ZAGUBUYU.js → chunk-DG7PVT4X.js} +5 -5
- package/dist/{chunk-U7ELKJX6.js → chunk-FUMDEEOR.js} +8 -8
- package/dist/{chunk-DK6DHT4J.js → chunk-IAF4BO4R.js} +8 -8
- package/dist/{chunk-YTW3UAIV.js → chunk-JEJZEPXR.js} +8 -8
- package/dist/{chunk-4SMQAIG6.js → chunk-LFHSRT6P.js} +5 -5
- package/dist/{chunk-H34DHTRO.js → chunk-PAWESUJ5.js} +8 -8
- package/dist/{chunk-USCCELUI.js → chunk-QD2X42DV.js} +5 -5
- package/dist/{chunk-W65Z4BE5.js → chunk-QNL6OYAX.js} +5 -5
- package/dist/{chunk-7Q7CW433.js → chunk-RCAX3U3K.js} +7 -7
- package/dist/{chunk-ML5DM6H7.js → chunk-RUSQQOJG.js} +8 -8
- package/dist/{chunk-MSWHYTVI.js → chunk-U7DPSUFB.js} +5 -5
- package/dist/{chunk-CSPSJX4D.js → chunk-X5HENBAX.js} +5 -5
- package/dist/{chunk-PENOHVFV.js → chunk-YS7UTAGM.js} +5 -5
- package/dist/{chunk-MQCBDPO4.js → chunk-ZSTHWFVT.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/check-dependencies/checkYarnVersion.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
|
@@ -16,21 +16,21 @@ 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_4GJJVUUX_exports = {};
|
|
20
|
+
__export(chunk_4GJJVUUX_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(
|
|
27
|
+
module.exports = __toCommonJS(chunk_4GJJVUUX_exports);
|
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_QNL6OYAX = require("./chunk-QNL6OYAX.js");
|
|
30
30
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
31
31
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
32
32
|
function lintSchema({ schemas }) {
|
|
33
|
-
const lintResult =
|
|
33
|
+
const lintResult = import_chunk_QNL6OYAX.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
35
35
|
return lintDiagnostics;
|
|
36
36
|
}
|
|
@@ -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_5ODCXJCI_exports = {};
|
|
20
|
+
__export(chunk_5ODCXJCI_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_5ODCXJCI_exports);
|
|
24
24
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
25
|
var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
@@ -107,7 +107,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
107
107
|
"@prisma/fetch-engine": "workspace:*",
|
|
108
108
|
"@prisma/generator-helper": "workspace:*",
|
|
109
109
|
"@prisma/get-platform": "workspace:*",
|
|
110
|
-
"@prisma/prisma-schema-wasm": "5.
|
|
110
|
+
"@prisma/prisma-schema-wasm": "5.18.0-1.7484fd8557ad7be2d029bb2d4d43b6ef68a0200a",
|
|
111
111
|
"@prisma/schema-files-loader": "workspace:*",
|
|
112
112
|
arg: "5.0.2",
|
|
113
113
|
prompts: "2.4.2"
|
|
@@ -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_AHN4NB7N_exports = {};
|
|
30
|
+
__export(chunk_AHN4NB7N_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_AHN4NB7N_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
36
|
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_X5HENBAX = require("./chunk-X5HENBAX.js");
|
|
38
38
|
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_QNL6OYAX = require("./chunk-QNL6OYAX.js");
|
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
42
42
|
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.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_X5HENBAX.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_QNL6OYAX.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_QNL6OYAX.prismaSchemaWasm.get_dmmf(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(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_AOTGBPMZ_exports = {};
|
|
30
|
+
__export(chunk_AOTGBPMZ_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_AOTGBPMZ_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
36
|
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_X5HENBAX = require("./chunk-X5HENBAX.js");
|
|
39
39
|
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_QNL6OYAX = require("./chunk-QNL6OYAX.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
43
|
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.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_X5HENBAX.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_QNL6OYAX.prismaSchemaWasm.merge_schemas(params);
|
|
77
77
|
},
|
|
78
78
|
(e) => ({
|
|
79
79
|
type: "wasm-error",
|
|
@@ -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_AS3FWIXC_exports = {};
|
|
30
|
+
__export2(chunk_AS3FWIXC_exports, {
|
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
33
33
|
checkYarnVersion: () => checkYarnVersion,
|
|
@@ -56,7 +56,7 @@ __export2(chunk_QSYJIWIT_exports, {
|
|
|
56
56
|
sendPanic: () => sendPanic,
|
|
57
57
|
skipIndex: () => skipIndex
|
|
58
58
|
});
|
|
59
|
-
module.exports = __toCommonJS2(
|
|
59
|
+
module.exports = __toCommonJS2(chunk_AS3FWIXC_exports);
|
|
60
60
|
var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
|
|
61
61
|
var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
|
|
62
62
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
|
@@ -81,13 +81,13 @@ var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
|
|
|
81
81
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
|
82
82
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
|
83
83
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
84
|
+
var import_chunk_LFHSRT6P = require("./chunk-LFHSRT6P.js");
|
|
85
|
+
var import_chunk_RCAX3U3K = require("./chunk-RCAX3U3K.js");
|
|
86
|
+
var import_chunk_PAWESUJ5 = require("./chunk-PAWESUJ5.js");
|
|
87
|
+
var import_chunk_FUMDEEOR = require("./chunk-FUMDEEOR.js");
|
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
89
89
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
90
|
-
var
|
|
90
|
+
var import_chunk_QD2X42DV = require("./chunk-QD2X42DV.js");
|
|
91
91
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
|
92
92
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
93
93
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
@@ -15517,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
|
15517
15517
|
}
|
|
15518
15518
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
|
15519
15519
|
debug2("Loading config");
|
|
15520
|
-
const config2 = await (0,
|
|
15520
|
+
const config2 = await (0, import_chunk_PAWESUJ5.getConfig)({
|
|
15521
15521
|
datamodel: files,
|
|
15522
15522
|
ignoreEnvVarErrors: true
|
|
15523
15523
|
});
|
|
@@ -15909,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
|
15909
15909
|
if (argName.includes("schema")) {
|
|
15910
15910
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
|
15911
15911
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
|
15912
|
-
const config2 = await (0,
|
|
15913
|
-
const url = (0,
|
|
15912
|
+
const config2 = await (0, import_chunk_PAWESUJ5.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
|
15913
|
+
const url = (0, import_chunk_PAWESUJ5.resolveUrl)((0, import_chunk_PAWESUJ5.getEffectiveUrl)(config2.datasources[0]));
|
|
15914
15914
|
if (url?.startsWith("prisma://")) {
|
|
15915
15915
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
|
15916
15916
|
}
|
|
@@ -16113,7 +16113,7 @@ async function getGenerators(options) {
|
|
|
16113
16113
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
|
16114
16114
|
}
|
|
16115
16115
|
}
|
|
16116
|
-
const config = await (0,
|
|
16116
|
+
const config = await (0, import_chunk_PAWESUJ5.getConfig)({
|
|
16117
16117
|
datamodel: schemas,
|
|
16118
16118
|
datamodelPath: schemaPath,
|
|
16119
16119
|
prismaPath,
|
|
@@ -16124,7 +16124,7 @@ async function getGenerators(options) {
|
|
|
16124
16124
|
}
|
|
16125
16125
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
|
16126
16126
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
|
16127
|
-
const dmmf = await (0,
|
|
16127
|
+
const dmmf = await (0, import_chunk_FUMDEEOR.getDMMF)({
|
|
16128
16128
|
datamodel: schemas,
|
|
16129
16129
|
datamodelPath: schemaPath,
|
|
16130
16130
|
prismaPath,
|
|
@@ -16185,7 +16185,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
|
16185
16185
|
fromEnvVar: "null"
|
|
16186
16186
|
};
|
|
16187
16187
|
}
|
|
16188
|
-
const datamodel = (0,
|
|
16188
|
+
const datamodel = (0, import_chunk_RCAX3U3K.mergeSchemas)({ schemas });
|
|
16189
16189
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
|
16190
16190
|
const options2 = {
|
|
16191
16191
|
datamodel,
|
|
@@ -16267,7 +16267,7 @@ generator gen {
|
|
|
16267
16267
|
debug6({ generatorBinaryPaths });
|
|
16268
16268
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
16269
16269
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
16270
|
-
const customDmmf = await (0,
|
|
16270
|
+
const customDmmf = await (0, import_chunk_FUMDEEOR.getDMMF)({
|
|
16271
16271
|
datamodel: schemas,
|
|
16272
16272
|
datamodelPath: schemaPath,
|
|
16273
16273
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
|
@@ -16565,7 +16565,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16565
16565
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
16566
16566
|
handleFormatPanic(
|
|
16567
16567
|
() => {
|
|
16568
|
-
|
|
16568
|
+
import_chunk_QD2X42DV.prismaSchemaWasm.debug_panic();
|
|
16569
16569
|
},
|
|
16570
16570
|
{ schemas: schemas2 }
|
|
16571
16571
|
);
|
|
@@ -16585,12 +16585,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16585
16585
|
() => {
|
|
16586
16586
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
|
16587
16587
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
16588
|
-
const lintDiagnostics2 = (0,
|
|
16588
|
+
const lintDiagnostics2 = (0, import_chunk_LFHSRT6P.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
16589
16589
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
16590
16590
|
},
|
|
16591
16591
|
{ schemas: schemas2 }
|
|
16592
16592
|
);
|
|
16593
|
-
const lintWarnings = (0,
|
|
16593
|
+
const lintWarnings = (0, import_chunk_LFHSRT6P.getLintWarningsAsText)(lintDiagnostics);
|
|
16594
16594
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
|
16595
16595
|
console.warn(lintWarnings);
|
|
16596
16596
|
}
|
|
@@ -16620,7 +16620,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
|
16620
16620
|
}
|
|
16621
16621
|
}
|
|
16622
16622
|
function formatWasm(schema, documentFormattingParams) {
|
|
16623
|
-
const formattedSchema =
|
|
16623
|
+
const formattedSchema = import_chunk_QD2X42DV.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
16624
16624
|
return formattedSchema;
|
|
16625
16625
|
}
|
|
16626
16626
|
/*! Bundled license information:
|
|
@@ -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_D4D2OCAW_exports = {};
|
|
30
|
+
__export2(chunk_D4D2OCAW_exports, {
|
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
33
33
|
checkYarnVersion: () => checkYarnVersion,
|
|
@@ -56,7 +56,7 @@ __export2(chunk_WMUQJRSW_exports, {
|
|
|
56
56
|
sendPanic: () => sendPanic,
|
|
57
57
|
skipIndex: () => skipIndex
|
|
58
58
|
});
|
|
59
|
-
module.exports = __toCommonJS2(
|
|
59
|
+
module.exports = __toCommonJS2(chunk_D4D2OCAW_exports);
|
|
60
60
|
var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
|
|
61
61
|
var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
|
|
62
62
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
|
@@ -81,13 +81,13 @@ var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
|
|
|
81
81
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
|
82
82
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
|
83
83
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
84
|
+
var import_chunk_4GJJVUUX = require("./chunk-4GJJVUUX.js");
|
|
85
|
+
var import_chunk_AOTGBPMZ = require("./chunk-AOTGBPMZ.js");
|
|
86
|
+
var import_chunk_RUSQQOJG = require("./chunk-RUSQQOJG.js");
|
|
87
|
+
var import_chunk_AHN4NB7N = require("./chunk-AHN4NB7N.js");
|
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
89
89
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
90
|
-
var
|
|
90
|
+
var import_chunk_QNL6OYAX = require("./chunk-QNL6OYAX.js");
|
|
91
91
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
|
92
92
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
93
93
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
@@ -15517,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
|
15517
15517
|
}
|
|
15518
15518
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
|
15519
15519
|
debug2("Loading config");
|
|
15520
|
-
const config2 = await (0,
|
|
15520
|
+
const config2 = await (0, import_chunk_RUSQQOJG.getConfig)({
|
|
15521
15521
|
datamodel: files,
|
|
15522
15522
|
ignoreEnvVarErrors: true
|
|
15523
15523
|
});
|
|
@@ -15909,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
|
15909
15909
|
if (argName.includes("schema")) {
|
|
15910
15910
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
|
15911
15911
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
|
15912
|
-
const config2 = await (0,
|
|
15913
|
-
const url = (0,
|
|
15912
|
+
const config2 = await (0, import_chunk_RUSQQOJG.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
|
15913
|
+
const url = (0, import_chunk_RUSQQOJG.resolveUrl)((0, import_chunk_RUSQQOJG.getEffectiveUrl)(config2.datasources[0]));
|
|
15914
15914
|
if (url?.startsWith("prisma://")) {
|
|
15915
15915
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
|
15916
15916
|
}
|
|
@@ -16113,7 +16113,7 @@ async function getGenerators(options) {
|
|
|
16113
16113
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
|
16114
16114
|
}
|
|
16115
16115
|
}
|
|
16116
|
-
const config = await (0,
|
|
16116
|
+
const config = await (0, import_chunk_RUSQQOJG.getConfig)({
|
|
16117
16117
|
datamodel: schemas,
|
|
16118
16118
|
datamodelPath: schemaPath,
|
|
16119
16119
|
prismaPath,
|
|
@@ -16124,7 +16124,7 @@ async function getGenerators(options) {
|
|
|
16124
16124
|
}
|
|
16125
16125
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
|
16126
16126
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
|
16127
|
-
const dmmf = await (0,
|
|
16127
|
+
const dmmf = await (0, import_chunk_AHN4NB7N.getDMMF)({
|
|
16128
16128
|
datamodel: schemas,
|
|
16129
16129
|
datamodelPath: schemaPath,
|
|
16130
16130
|
prismaPath,
|
|
@@ -16185,7 +16185,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
|
16185
16185
|
fromEnvVar: "null"
|
|
16186
16186
|
};
|
|
16187
16187
|
}
|
|
16188
|
-
const datamodel = (0,
|
|
16188
|
+
const datamodel = (0, import_chunk_AOTGBPMZ.mergeSchemas)({ schemas });
|
|
16189
16189
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
|
16190
16190
|
const options2 = {
|
|
16191
16191
|
datamodel,
|
|
@@ -16267,7 +16267,7 @@ generator gen {
|
|
|
16267
16267
|
debug6({ generatorBinaryPaths });
|
|
16268
16268
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
16269
16269
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
16270
|
-
const customDmmf = await (0,
|
|
16270
|
+
const customDmmf = await (0, import_chunk_AHN4NB7N.getDMMF)({
|
|
16271
16271
|
datamodel: schemas,
|
|
16272
16272
|
datamodelPath: schemaPath,
|
|
16273
16273
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
|
@@ -16565,7 +16565,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16565
16565
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
16566
16566
|
handleFormatPanic(
|
|
16567
16567
|
() => {
|
|
16568
|
-
|
|
16568
|
+
import_chunk_QNL6OYAX.prismaSchemaWasm.debug_panic();
|
|
16569
16569
|
},
|
|
16570
16570
|
{ schemas: schemas2 }
|
|
16571
16571
|
);
|
|
@@ -16585,12 +16585,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16585
16585
|
() => {
|
|
16586
16586
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
|
16587
16587
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
16588
|
-
const lintDiagnostics2 = (0,
|
|
16588
|
+
const lintDiagnostics2 = (0, import_chunk_4GJJVUUX.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
16589
16589
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
16590
16590
|
},
|
|
16591
16591
|
{ schemas: schemas2 }
|
|
16592
16592
|
);
|
|
16593
|
-
const lintWarnings = (0,
|
|
16593
|
+
const lintWarnings = (0, import_chunk_4GJJVUUX.getLintWarningsAsText)(lintDiagnostics);
|
|
16594
16594
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
|
16595
16595
|
console.warn(lintWarnings);
|
|
16596
16596
|
}
|
|
@@ -16620,7 +16620,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
|
16620
16620
|
}
|
|
16621
16621
|
}
|
|
16622
16622
|
function formatWasm(schema, documentFormattingParams) {
|
|
16623
|
-
const formattedSchema =
|
|
16623
|
+
const formattedSchema = import_chunk_QNL6OYAX.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
16624
16624
|
return formattedSchema;
|
|
16625
16625
|
}
|
|
16626
16626
|
/*! Bundled license information:
|
|
@@ -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_DG7PVT4X_exports = {};
|
|
20
|
+
__export(chunk_DG7PVT4X_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_DG7PVT4X_exports);
|
|
24
24
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
25
|
var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
27
27
|
module2.exports = {
|
|
28
28
|
name: "@prisma/internals",
|
|
29
|
-
version: "5.
|
|
29
|
+
version: "5.18.0-dev.1",
|
|
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,7 +107,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
107
107
|
"@prisma/fetch-engine": "workspace:*",
|
|
108
108
|
"@prisma/generator-helper": "workspace:*",
|
|
109
109
|
"@prisma/get-platform": "workspace:*",
|
|
110
|
-
"@prisma/prisma-schema-wasm": "5.
|
|
110
|
+
"@prisma/prisma-schema-wasm": "5.18.0-1.7484fd8557ad7be2d029bb2d4d43b6ef68a0200a",
|
|
111
111
|
"@prisma/schema-files-loader": "workspace:*",
|
|
112
112
|
arg: "5.0.2",
|
|
113
113
|
prompts: "2.4.2"
|
|
@@ -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_FUMDEEOR_exports = {};
|
|
30
|
+
__export(chunk_FUMDEEOR_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_FUMDEEOR_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
36
|
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_ZSTHWFVT = require("./chunk-ZSTHWFVT.js");
|
|
38
38
|
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_QD2X42DV = require("./chunk-QD2X42DV.js");
|
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
42
42
|
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.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_ZSTHWFVT.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_QD2X42DV.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_QD2X42DV.prismaSchemaWasm.get_dmmf(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(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_IAF4BO4R_exports = {};
|
|
30
|
+
__export(chunk_IAF4BO4R_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_IAF4BO4R_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
36
|
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_ZSTHWFVT = require("./chunk-ZSTHWFVT.js");
|
|
39
39
|
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_QD2X42DV = require("./chunk-QD2X42DV.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
43
|
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.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_ZSTHWFVT.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_QD2X42DV.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_QD2X42DV.prismaSchemaWasm.validate(params);
|
|
82
82
|
},
|
|
83
83
|
(e) => ({
|
|
84
84
|
type: "wasm-error",
|
|
@@ -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_JEJZEPXR_exports = {};
|
|
30
|
+
__export(chunk_JEJZEPXR_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_JEJZEPXR_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
36
|
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_X5HENBAX = require("./chunk-X5HENBAX.js");
|
|
39
39
|
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_QNL6OYAX = require("./chunk-QNL6OYAX.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
43
|
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.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_X5HENBAX.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_QNL6OYAX.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_QNL6OYAX.prismaSchemaWasm.validate(params);
|
|
82
82
|
},
|
|
83
83
|
(e) => ({
|
|
84
84
|
type: "wasm-error",
|
|
@@ -16,21 +16,21 @@ 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_LFHSRT6P_exports = {};
|
|
20
|
+
__export(chunk_LFHSRT6P_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(
|
|
27
|
+
module.exports = __toCommonJS(chunk_LFHSRT6P_exports);
|
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_QD2X42DV = require("./chunk-QD2X42DV.js");
|
|
30
30
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
31
31
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
32
32
|
function lintSchema({ schemas }) {
|
|
33
|
-
const lintResult =
|
|
33
|
+
const lintResult = import_chunk_QD2X42DV.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
35
35
|
return lintDiagnostics;
|
|
36
36
|
}
|