@prisma/internals 6.3.0-dev.2 → 6.3.0-dev.20
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-5FR6MKWI.js → chunk-2VA75J2J.js} +5 -5
- package/dist/{chunk-CRE3EPKG.js → chunk-5D7NNXVG.js} +27 -27
- package/dist/{chunk-MNUFE5NC.js → chunk-6BD2SL6P.js} +7 -7
- package/dist/{chunk-DUFJPXLC.js → chunk-7KAR3MST.js} +8 -8
- package/dist/{chunk-CDYTUC4G.js → chunk-A6FIX424.js} +7 -7
- package/dist/{chunk-VWPYBYKT.js → chunk-FB74JFT6.js} +5 -5
- package/dist/{chunk-TFSZCVKC.js → chunk-G4BGJ6IP.js} +5 -5
- package/dist/chunk-HB2Q7X5H.js +30 -0
- package/dist/{chunk-6AIPTFLI.js → chunk-IHMHEVUM.js} +5 -5
- package/dist/{chunk-X4U4GLWH.js → chunk-KRWS7JB4.js} +5 -4
- package/dist/{chunk-EKBX4J6O.js → chunk-LAECCYFY.js} +5 -5
- package/dist/{chunk-VFAZLH4I.js → chunk-LEYFAVNZ.js} +27 -27
- package/dist/{chunk-2S5S7VUW.js → chunk-MCS2FDNN.js} +8 -8
- package/dist/{chunk-RH5CKOLU.js → chunk-NQWNTJWW.js} +5 -5
- package/dist/{chunk-L3GY3UOX.js → chunk-NUVGMN5Z.js} +5 -5
- package/dist/{chunk-QJZIYUVB.js → chunk-NXIWDQBF.js} +4 -4
- package/dist/{chunk-SB7SIP32.js → chunk-O22TNCJ2.js} +8 -8
- package/dist/{chunk-YWEUFYMK.js → chunk-QGXDUBHL.js} +5 -5
- package/dist/{chunk-CKNTB45N.js → chunk-QSAE23KV.js} +8 -3
- package/dist/{chunk-P6VBFLWR.js → chunk-QVVSDACW.js} +5 -5
- package/dist/{chunk-PNEBWOHX.js → chunk-S3RZL24I.js} +6 -6
- package/dist/{chunk-LOTU43BG.js → chunk-UPIGQND7.js} +5 -5
- package/dist/{chunk-UUUBQU5I.js → chunk-VETKNW6E.js} +8 -8
- package/dist/{chunk-R5QHTZTB.js → chunk-WGUMD3IB.js} +8 -8
- package/dist/{chunk-3DMEILBC.js → chunk-WKXWUB7U.js} +7 -7
- package/dist/{chunk-QWUCCALD.js → chunk-XEQLM63R.js} +5 -5
- package/dist/{chunk-67DWPPNQ.js → chunk-XO2EITXQ.js} +8 -8
- package/dist/{chunk-73Y2YJ3O.js → chunk-ZCNHO3ZG.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +28 -27
- package/dist/cli/getGeneratorSuccessMessage.js +3 -3
- package/dist/cli/getSchema.js +33 -32
- package/dist/cli/hashes.js +28 -27
- package/dist/client/getClientEngineType.d.ts +2 -1
- package/dist/client/getClientEngineType.js +4 -4
- package/dist/convertCredentials.js +5 -4
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +27 -26
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +7 -7
- package/dist/engine-commands/index.js +38 -37
- 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 +27 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +27 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +28 -27
- package/dist/get-generators/getGenerators.js +30 -29
- package/dist/index.d.ts +1 -0
- package/dist/index.js +77 -73
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +27 -26
- package/dist/utils/getEnvPaths.js +27 -26
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +27 -26
- package/dist/utils/loadEnvFile.js +27 -26
- package/dist/utils/prismaPostgres.d.ts +3 -0
- package/dist/utils/prismaPostgres.js +27 -0
- package/dist/utils/prismaPostgres.test.d.ts +1 -0
- package/dist/utils/prismaPostgres.test.js +15 -0
- package/dist/wasm.js +4 -4
- package/package.json +9 -9
@@ -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_2VA75J2J_exports = {};
|
30
|
+
__export(chunk_2VA75J2J_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_2VA75J2J_exports);
|
36
|
+
var import_chunk_S3RZL24I = require("./chunk-S3RZL24I.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_S3RZL24I.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_5D7NNXVG_exports = {};
|
30
|
+
__export2(chunk_5D7NNXVG_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug5,
|
@@ -55,22 +55,22 @@ __export2(chunk_CRE3EPKG_exports, {
|
|
55
55
|
sendPanic: () => sendPanic,
|
56
56
|
skipIndex: () => skipIndex
|
57
57
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
58
|
+
module.exports = __toCommonJS2(chunk_5D7NNXVG_exports);
|
59
|
+
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
60
|
+
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
59
61
|
var import_chunk_KEBDP2C3 = require("./chunk-KEBDP2C3.js");
|
60
62
|
var import_chunk_77IC3DNO = require("./chunk-77IC3DNO.js");
|
61
63
|
var import_chunk_MGZOEY6N = require("./chunk-MGZOEY6N.js");
|
62
64
|
var import_chunk_S57RMXZW = require("./chunk-S57RMXZW.js");
|
63
|
-
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
64
|
-
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
65
|
-
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
66
|
-
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
67
65
|
var import_chunk_5XRQ7ONW = require("./chunk-5XRQ7ONW.js");
|
68
|
-
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
69
66
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
70
|
-
var
|
71
|
-
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
67
|
+
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
72
68
|
var import_chunk_JHQHVXIR = require("./chunk-JHQHVXIR.js");
|
73
69
|
var import_chunk_3BND5XB4 = require("./chunk-3BND5XB4.js");
|
70
|
+
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
71
|
+
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
72
|
+
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
73
|
+
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
74
74
|
var import_chunk_BGFWFIPR = require("./chunk-BGFWFIPR.js");
|
75
75
|
var import_chunk_2MWIMEFK = require("./chunk-2MWIMEFK.js");
|
76
76
|
var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
|
@@ -80,18 +80,18 @@ var import_chunk_QTXYAZFX = require("./chunk-QTXYAZFX.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
|
83
|
+
var import_chunk_ZCNHO3ZG = require("./chunk-ZCNHO3ZG.js");
|
84
|
+
var import_chunk_6BD2SL6P = require("./chunk-6BD2SL6P.js");
|
85
85
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
86
|
-
var
|
87
|
-
var
|
86
|
+
var import_chunk_XO2EITXQ = require("./chunk-XO2EITXQ.js");
|
87
|
+
var import_chunk_WGUMD3IB = require("./chunk-WGUMD3IB.js");
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
89
89
|
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
90
|
-
var
|
90
|
+
var import_chunk_2VA75J2J = require("./chunk-2VA75J2J.js");
|
91
91
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
92
92
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
93
|
-
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
94
93
|
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
94
|
+
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
95
95
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
96
96
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
97
97
|
var import_chunk_KQOJB3ZW = require("./chunk-KQOJB3ZW.js");
|
@@ -14751,7 +14751,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
14751
14751
|
}
|
14752
14752
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
14753
14753
|
debug2("Loading config");
|
14754
|
-
const config2 = await (0,
|
14754
|
+
const config2 = await (0, import_chunk_XO2EITXQ.getConfig)({
|
14755
14755
|
datamodel: files,
|
14756
14756
|
ignoreEnvVarErrors: true
|
14757
14757
|
});
|
@@ -15059,8 +15059,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
15059
15059
|
if (argName.includes("schema")) {
|
15060
15060
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
15061
15061
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
15062
|
-
const config2 = await (0,
|
15063
|
-
const url = (0,
|
15062
|
+
const config2 = await (0, import_chunk_XO2EITXQ.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
15063
|
+
const url = (0, import_chunk_XO2EITXQ.resolveUrl)((0, import_chunk_XO2EITXQ.getEffectiveUrl)(config2.datasources[0]));
|
15064
15064
|
if (url?.startsWith("prisma://")) {
|
15065
15065
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
15066
15066
|
}
|
@@ -15232,7 +15232,7 @@ async function getGenerators(options) {
|
|
15232
15232
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
15233
15233
|
}
|
15234
15234
|
}
|
15235
|
-
const config = await (0,
|
15235
|
+
const config = await (0, import_chunk_XO2EITXQ.getConfig)({
|
15236
15236
|
datamodel: schemas,
|
15237
15237
|
datamodelPath: schemaPath,
|
15238
15238
|
prismaPath,
|
@@ -15243,7 +15243,7 @@ async function getGenerators(options) {
|
|
15243
15243
|
}
|
15244
15244
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
15245
15245
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
15246
|
-
const dmmf = await (0,
|
15246
|
+
const dmmf = await (0, import_chunk_WGUMD3IB.getDMMF)({
|
15247
15247
|
datamodel: schemas,
|
15248
15248
|
datamodelPath: schemaPath,
|
15249
15249
|
prismaPath,
|
@@ -15304,7 +15304,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
15304
15304
|
fromEnvVar: "null"
|
15305
15305
|
};
|
15306
15306
|
}
|
15307
|
-
const datamodel = (0,
|
15307
|
+
const datamodel = (0, import_chunk_6BD2SL6P.mergeSchemas)({ schemas });
|
15308
15308
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
15309
15309
|
const options2 = {
|
15310
15310
|
datamodel,
|
@@ -15387,7 +15387,7 @@ generator gen {
|
|
15387
15387
|
debug6({ generatorBinaryPaths });
|
15388
15388
|
generator.setBinaryPaths(generatorBinaryPaths);
|
15389
15389
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
15390
|
-
const customDmmf = await (0,
|
15390
|
+
const customDmmf = await (0, import_chunk_WGUMD3IB.getDMMF)({
|
15391
15391
|
datamodel: schemas,
|
15392
15392
|
datamodelPath: schemaPath,
|
15393
15393
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
@@ -15685,7 +15685,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15685
15685
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
15686
15686
|
handleFormatPanic(
|
15687
15687
|
() => {
|
15688
|
-
|
15688
|
+
import_chunk_2VA75J2J.prismaSchemaWasm.debug_panic();
|
15689
15689
|
},
|
15690
15690
|
{ schemas: schemas2 }
|
15691
15691
|
);
|
@@ -15705,12 +15705,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15705
15705
|
() => {
|
15706
15706
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
15707
15707
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
15708
|
-
const lintDiagnostics2 = (0,
|
15708
|
+
const lintDiagnostics2 = (0, import_chunk_ZCNHO3ZG.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
15709
15709
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
15710
15710
|
},
|
15711
15711
|
{ schemas: schemas2 }
|
15712
15712
|
);
|
15713
|
-
const lintWarnings = (0,
|
15713
|
+
const lintWarnings = (0, import_chunk_ZCNHO3ZG.getLintWarningsAsText)(lintDiagnostics);
|
15714
15714
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
15715
15715
|
console.warn(lintWarnings);
|
15716
15716
|
}
|
@@ -15740,7 +15740,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
15740
15740
|
}
|
15741
15741
|
}
|
15742
15742
|
function formatWasm(schema, documentFormattingParams) {
|
15743
|
-
const formattedSchema =
|
15743
|
+
const formattedSchema = import_chunk_2VA75J2J.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
15744
15744
|
return formattedSchema;
|
15745
15745
|
}
|
15746
15746
|
/*! 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_6BD2SL6P_exports = {};
|
30
|
+
__export(chunk_6BD2SL6P_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_6BD2SL6P_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_FB74JFT6 = require("./chunk-FB74JFT6.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
41
|
-
var
|
41
|
+
var import_chunk_2VA75J2J = require("./chunk-2VA75J2J.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_FB74JFT6.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_2VA75J2J.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -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_7KAR3MST_exports = {};
|
30
|
+
__export(chunk_7KAR3MST_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_7KAR3MST_exports);
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
39
39
|
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
40
40
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
41
|
-
var
|
41
|
+
var import_chunk_NQWNTJWW = require("./chunk-NQWNTJWW.js");
|
42
42
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
43
43
|
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
44
|
-
var
|
44
|
+
var import_chunk_QGXDUBHL = require("./chunk-QGXDUBHL.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_NQWNTJWW.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_QGXDUBHL.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_QGXDUBHL.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_A6FIX424_exports = {};
|
30
|
+
__export(chunk_A6FIX424_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_A6FIX424_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_NQWNTJWW = require("./chunk-NQWNTJWW.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
41
|
-
var
|
41
|
+
var import_chunk_QGXDUBHL = require("./chunk-QGXDUBHL.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_NQWNTJWW.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_QGXDUBHL.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
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_FB74JFT6_exports = {};
|
20
|
+
__export(chunk_FB74JFT6_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_FB74JFT6_exports);
|
24
|
+
var import_chunk_UPIGQND7 = require("./chunk-UPIGQND7.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_UPIGQND7.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_G4BGJ6IP_exports = {};
|
20
|
+
__export(chunk_G4BGJ6IP_exports, {
|
21
21
|
SchemaEngineExitCode: () => SchemaEngineExitCode,
|
22
22
|
canConnectToDatabase: () => canConnectToDatabase,
|
23
23
|
createDatabase: () => createDatabase,
|
24
24
|
dropDatabase: () => dropDatabase,
|
25
25
|
execaCommand: () => execaCommand
|
26
26
|
});
|
27
|
-
module.exports = __toCommonJS(
|
27
|
+
module.exports = __toCommonJS(chunk_G4BGJ6IP_exports);
|
28
28
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
29
|
-
var
|
29
|
+
var import_chunk_NXIWDQBF = require("./chunk-NXIWDQBF.js");
|
30
30
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
32
32
|
var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
|
@@ -141,7 +141,7 @@ async function execaCommand({
|
|
141
141
|
schemaEnginePath,
|
142
142
|
engineCommandName
|
143
143
|
}) {
|
144
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
144
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_NXIWDQBF.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
145
145
|
try {
|
146
146
|
return await (0, import_execa.default)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
|
147
147
|
cwd,
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
var chunk_HB2Q7X5H_exports = {};
|
20
|
+
__export(chunk_HB2Q7X5H_exports, {
|
21
|
+
PRISMA_POSTGRES_PROTOCOL: () => PRISMA_POSTGRES_PROTOCOL,
|
22
|
+
PRISMA_POSTGRES_PROVIDER: () => PRISMA_POSTGRES_PROVIDER,
|
23
|
+
isPrismaPostgres: () => isPrismaPostgres
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(chunk_HB2Q7X5H_exports);
|
26
|
+
var PRISMA_POSTGRES_PROVIDER = "prisma+postgres";
|
27
|
+
var PRISMA_POSTGRES_PROTOCOL = `${PRISMA_POSTGRES_PROVIDER}:`;
|
28
|
+
function isPrismaPostgres(connectionString) {
|
29
|
+
return connectionString?.startsWith(`${PRISMA_POSTGRES_PROTOCOL}//`) ?? false;
|
30
|
+
}
|
@@ -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_IHMHEVUM_exports = {};
|
20
|
+
__export(chunk_IHMHEVUM_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_IHMHEVUM_exports);
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
29
|
-
var
|
29
|
+
var import_chunk_QGXDUBHL = require("./chunk-QGXDUBHL.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_QGXDUBHL.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
35
35
|
return lintDiagnostics;
|
36
36
|
}
|
@@ -26,13 +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_KRWS7JB4_exports = {};
|
30
|
+
__export(chunk_KRWS7JB4_exports, {
|
31
31
|
credentialsToUri: () => credentialsToUri,
|
32
32
|
protocolToConnectorType: () => protocolToConnectorType,
|
33
33
|
uriToCredentials: () => uriToCredentials
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
35
|
+
module.exports = __toCommonJS(chunk_KRWS7JB4_exports);
|
36
|
+
var import_chunk_HB2Q7X5H = require("./chunk-HB2Q7X5H.js");
|
36
37
|
var import_path = __toESM(require("path"));
|
37
38
|
var NodeURL = __toESM(require("url"));
|
38
39
|
function credentialsToUri(credentials) {
|
@@ -151,7 +152,7 @@ function protocolToConnectorType(protocol) {
|
|
151
152
|
switch (protocol) {
|
152
153
|
case "postgresql:":
|
153
154
|
case "postgres:":
|
154
|
-
case
|
155
|
+
case import_chunk_HB2Q7X5H.PRISMA_POSTGRES_PROTOCOL:
|
155
156
|
return "postgresql";
|
156
157
|
case "mongodb+srv:":
|
157
158
|
case "mongodb:":
|
@@ -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_LAECCYFY_exports = {};
|
20
|
+
__export(chunk_LAECCYFY_exports, {
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
23
23
|
});
|
24
|
-
module.exports = __toCommonJS(
|
24
|
+
module.exports = __toCommonJS(chunk_LAECCYFY_exports);
|
25
25
|
var import_chunk_2XRDQCIA = require("./chunk-2XRDQCIA.js");
|
26
26
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
27
|
-
var
|
27
|
+
var import_chunk_NXIWDQBF = require("./chunk-NXIWDQBF.js");
|
28
28
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
29
29
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
30
30
|
var import_engines = require("@prisma/engines");
|
@@ -35,7 +35,7 @@ async function getEngineVersion(enginePath, binaryName) {
|
|
35
35
|
if (!binaryName) {
|
36
36
|
binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
|
37
37
|
}
|
38
|
-
enginePath = await (0,
|
38
|
+
enginePath = await (0, import_chunk_NXIWDQBF.resolveBinary)(binaryName, enginePath);
|
39
39
|
const platformInfo = await (0, import_get_platform.getPlatformInfo)();
|
40
40
|
if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
41
41
|
(0, import_get_platform.assertNodeAPISupported)();
|
@@ -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_LEYFAVNZ_exports = {};
|
30
|
+
__export2(chunk_LEYFAVNZ_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug5,
|
@@ -55,22 +55,22 @@ __export2(chunk_VFAZLH4I_exports, {
|
|
55
55
|
sendPanic: () => sendPanic,
|
56
56
|
skipIndex: () => skipIndex
|
57
57
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
58
|
+
module.exports = __toCommonJS2(chunk_LEYFAVNZ_exports);
|
59
|
+
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
60
|
+
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
59
61
|
var import_chunk_KEBDP2C3 = require("./chunk-KEBDP2C3.js");
|
60
62
|
var import_chunk_77IC3DNO = require("./chunk-77IC3DNO.js");
|
61
63
|
var import_chunk_MGZOEY6N = require("./chunk-MGZOEY6N.js");
|
62
64
|
var import_chunk_S57RMXZW = require("./chunk-S57RMXZW.js");
|
63
|
-
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
64
|
-
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
65
|
-
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
66
|
-
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
67
65
|
var import_chunk_5XRQ7ONW = require("./chunk-5XRQ7ONW.js");
|
68
|
-
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
69
66
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
70
|
-
var
|
71
|
-
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
67
|
+
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
72
68
|
var import_chunk_JHQHVXIR = require("./chunk-JHQHVXIR.js");
|
73
69
|
var import_chunk_3BND5XB4 = require("./chunk-3BND5XB4.js");
|
70
|
+
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
71
|
+
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
72
|
+
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
73
|
+
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
74
74
|
var import_chunk_BGFWFIPR = require("./chunk-BGFWFIPR.js");
|
75
75
|
var import_chunk_2MWIMEFK = require("./chunk-2MWIMEFK.js");
|
76
76
|
var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
|
@@ -80,18 +80,18 @@ var import_chunk_QTXYAZFX = require("./chunk-QTXYAZFX.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
|
83
|
+
var import_chunk_IHMHEVUM = require("./chunk-IHMHEVUM.js");
|
84
|
+
var import_chunk_A6FIX424 = require("./chunk-A6FIX424.js");
|
85
85
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
86
|
-
var
|
87
|
-
var
|
86
|
+
var import_chunk_7KAR3MST = require("./chunk-7KAR3MST.js");
|
87
|
+
var import_chunk_MCS2FDNN = require("./chunk-MCS2FDNN.js");
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
89
89
|
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
90
|
-
var
|
90
|
+
var import_chunk_QGXDUBHL = require("./chunk-QGXDUBHL.js");
|
91
91
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
92
92
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
93
|
-
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
94
93
|
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
94
|
+
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
95
95
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
96
96
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
97
97
|
var import_chunk_KQOJB3ZW = require("./chunk-KQOJB3ZW.js");
|
@@ -14751,7 +14751,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
14751
14751
|
}
|
14752
14752
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
14753
14753
|
debug2("Loading config");
|
14754
|
-
const config2 = await (0,
|
14754
|
+
const config2 = await (0, import_chunk_7KAR3MST.getConfig)({
|
14755
14755
|
datamodel: files,
|
14756
14756
|
ignoreEnvVarErrors: true
|
14757
14757
|
});
|
@@ -15059,8 +15059,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
15059
15059
|
if (argName.includes("schema")) {
|
15060
15060
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
15061
15061
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
15062
|
-
const config2 = await (0,
|
15063
|
-
const url = (0,
|
15062
|
+
const config2 = await (0, import_chunk_7KAR3MST.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
15063
|
+
const url = (0, import_chunk_7KAR3MST.resolveUrl)((0, import_chunk_7KAR3MST.getEffectiveUrl)(config2.datasources[0]));
|
15064
15064
|
if (url?.startsWith("prisma://")) {
|
15065
15065
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
15066
15066
|
}
|
@@ -15232,7 +15232,7 @@ async function getGenerators(options) {
|
|
15232
15232
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
15233
15233
|
}
|
15234
15234
|
}
|
15235
|
-
const config = await (0,
|
15235
|
+
const config = await (0, import_chunk_7KAR3MST.getConfig)({
|
15236
15236
|
datamodel: schemas,
|
15237
15237
|
datamodelPath: schemaPath,
|
15238
15238
|
prismaPath,
|
@@ -15243,7 +15243,7 @@ async function getGenerators(options) {
|
|
15243
15243
|
}
|
15244
15244
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
15245
15245
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
15246
|
-
const dmmf = await (0,
|
15246
|
+
const dmmf = await (0, import_chunk_MCS2FDNN.getDMMF)({
|
15247
15247
|
datamodel: schemas,
|
15248
15248
|
datamodelPath: schemaPath,
|
15249
15249
|
prismaPath,
|
@@ -15304,7 +15304,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
15304
15304
|
fromEnvVar: "null"
|
15305
15305
|
};
|
15306
15306
|
}
|
15307
|
-
const datamodel = (0,
|
15307
|
+
const datamodel = (0, import_chunk_A6FIX424.mergeSchemas)({ schemas });
|
15308
15308
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
15309
15309
|
const options2 = {
|
15310
15310
|
datamodel,
|
@@ -15387,7 +15387,7 @@ generator gen {
|
|
15387
15387
|
debug6({ generatorBinaryPaths });
|
15388
15388
|
generator.setBinaryPaths(generatorBinaryPaths);
|
15389
15389
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
15390
|
-
const customDmmf = await (0,
|
15390
|
+
const customDmmf = await (0, import_chunk_MCS2FDNN.getDMMF)({
|
15391
15391
|
datamodel: schemas,
|
15392
15392
|
datamodelPath: schemaPath,
|
15393
15393
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
@@ -15685,7 +15685,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15685
15685
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
15686
15686
|
handleFormatPanic(
|
15687
15687
|
() => {
|
15688
|
-
|
15688
|
+
import_chunk_QGXDUBHL.prismaSchemaWasm.debug_panic();
|
15689
15689
|
},
|
15690
15690
|
{ schemas: schemas2 }
|
15691
15691
|
);
|
@@ -15705,12 +15705,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
15705
15705
|
() => {
|
15706
15706
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
15707
15707
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
15708
|
-
const lintDiagnostics2 = (0,
|
15708
|
+
const lintDiagnostics2 = (0, import_chunk_IHMHEVUM.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
15709
15709
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
15710
15710
|
},
|
15711
15711
|
{ schemas: schemas2 }
|
15712
15712
|
);
|
15713
|
-
const lintWarnings = (0,
|
15713
|
+
const lintWarnings = (0, import_chunk_IHMHEVUM.getLintWarningsAsText)(lintDiagnostics);
|
15714
15714
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
15715
15715
|
console.warn(lintWarnings);
|
15716
15716
|
}
|
@@ -15740,7 +15740,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
15740
15740
|
}
|
15741
15741
|
}
|
15742
15742
|
function formatWasm(schema, documentFormattingParams) {
|
15743
|
-
const formattedSchema =
|
15743
|
+
const formattedSchema = import_chunk_QGXDUBHL.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
15744
15744
|
return formattedSchema;
|
15745
15745
|
}
|
15746
15746
|
/*! Bundled license information:
|