@prisma/internals 6.1.0-dev.9 → 6.1.0-integration-engines-6-1-0-17-fixup-wasm-response-json-serialization-span-18513eab509bdb5aef5cdd9c553594c3924d18cb.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-H3T4L34H.js → chunk-25RJ7YTB.js} +88 -83
- package/dist/{chunk-S4LINK5Y.js → chunk-2XRDQCIA.js} +5 -5
- package/dist/{chunk-WKAFAOO2.js → chunk-3ASW3CGI.js} +13 -13
- package/dist/{chunk-HMGEWJDY.js → chunk-3BND5XB4.js} +232 -47
- package/dist/{chunk-2DXAGCPS.js → chunk-3DMEILBC.js} +11 -11
- package/dist/{chunk-2PP7BHKH.js → chunk-AAZZAQOE.js} +5 -5
- package/dist/{chunk-PC46MJ4M.js → chunk-B52IGVII.js} +15 -15
- package/dist/{chunk-I4467NNA.js → chunk-CXEMRKV4.js} +6 -6
- package/dist/{chunk-EPKZPJC5.js → chunk-D6VUGYBS.js} +14 -14
- package/dist/{chunk-PWZWCXZX.js → chunk-DGNLSRCY.js} +31 -31
- package/dist/{chunk-V2VWODV3.js → chunk-EKBX4J6O.js} +5 -5
- package/dist/{chunk-YFP62N4M.js → chunk-F52NCIY5.js} +5 -5
- package/dist/{chunk-ZY3W4EW3.js → chunk-FDOOT64Z.js} +14 -14
- package/dist/{chunk-7DWJWDHJ.js → chunk-FVXXNYMS.js} +5 -5
- package/dist/{chunk-PDG6GFQR.js → chunk-GOFT6EIK.js} +5 -5
- package/dist/{chunk-ZXNJKAEL.js → chunk-HWCHG5HD.js} +36 -807
- package/dist/{chunk-NM5GRZUZ.js → chunk-MAJETUEE.js} +14 -14
- package/dist/{chunk-SSAACALQ.js → chunk-MOK5UDDV.js} +7 -7
- package/dist/{chunk-J4MA2JIK.js → chunk-N6K7M2HZ.js} +5 -5
- package/dist/{chunk-PDN6PMRL.js → chunk-NRYK4LKU.js} +14 -14
- package/dist/{chunk-SLBBRUQS.js → chunk-QTXYAZFX.js} +5 -5
- package/dist/{chunk-LATZTP6I.js → chunk-RHEUYES2.js} +5 -5
- package/dist/{chunk-L63XBXSS.js → chunk-TGQAFFN2.js} +5 -5
- package/dist/{chunk-HPF5G47V.js → chunk-UPIULDLZ.js} +5 -5
- package/dist/{chunk-RFYKY4ZX.js → chunk-URBQKHGP.js} +13 -13
- package/dist/{chunk-SM6BW5WS.js → chunk-XDAECYBQ.js} +5 -5
- package/dist/{chunk-4FP36VCM.js → chunk-XQ6LGRQH.js} +15 -15
- package/dist/{chunk-2X43WLN3.js → chunk-XVPAWY3Y.js} +5 -5
- package/dist/{chunk-T2RTHBYQ.js → chunk-Y2TENLBY.js} +6 -6
- package/dist/cli/checkUnsupportedDataProxy.js +25 -25
- package/dist/cli/getSchema.js +30 -30
- package/dist/cli/hashes.js +25 -25
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +24 -24
- package/dist/engine-commands/getConfig.js +12 -12
- package/dist/engine-commands/getDmmf.js +9 -9
- package/dist/engine-commands/getEngineVersion.js +8 -8
- package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
- package/dist/engine-commands/index.js +35 -35
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +9 -9
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +9 -9
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +24 -24
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +24 -24
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +25 -25
- package/dist/get-generators/getGenerators.js +27 -27
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/index.js +65 -65
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +24 -24
- package/dist/tracing/types.d.ts +26 -16
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/getEnvPaths.js +24 -24
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.js +3 -3
- package/dist/utils/handlePanic.js +24 -24
- package/dist/utils/load.js +4 -4
- package/dist/utils/loadEnvFile.js +24 -24
- package/dist/utils/tryLoadEnvs.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +10 -10
- package/dist/chunk-4RWCRJYD.js +0 -166
- package/dist/chunk-D4MCOTL5.js +0 -122
- package/dist/chunk-FPHZVRV4.js +0 -110
- package/dist/chunk-G7LL2H2O.js +0 -54
- package/dist/chunk-JMZHUHCC.js +0 -177
- package/dist/chunk-RQPDQSHK.js +0 -1429
@@ -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_DGNLSRCY_exports = {};
|
30
|
+
__export2(chunk_DGNLSRCY_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug5,
|
@@ -55,7 +55,7 @@ __export2(chunk_PWZWCXZX_exports, {
|
|
55
55
|
sendPanic: () => sendPanic,
|
56
56
|
skipIndex: () => skipIndex
|
57
57
|
});
|
58
|
-
module.exports = __toCommonJS2(
|
58
|
+
module.exports = __toCommonJS2(chunk_DGNLSRCY_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");
|
@@ -70,23 +70,23 @@ var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
|
70
70
|
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
71
71
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
72
72
|
var import_chunk_JHQHVXIR = require("./chunk-JHQHVXIR.js");
|
73
|
-
var
|
73
|
+
var import_chunk_3BND5XB4 = require("./chunk-3BND5XB4.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");
|
77
77
|
var import_chunk_KDHESRKE = require("./chunk-KDHESRKE.js");
|
78
78
|
var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
|
79
|
-
var
|
79
|
+
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
|
85
|
-
var
|
86
|
-
var
|
83
|
+
var import_chunk_GOFT6EIK = require("./chunk-GOFT6EIK.js");
|
84
|
+
var import_chunk_3ASW3CGI = require("./chunk-3ASW3CGI.js");
|
85
|
+
var import_chunk_B52IGVII = require("./chunk-B52IGVII.js");
|
86
|
+
var import_chunk_NRYK4LKU = require("./chunk-NRYK4LKU.js");
|
87
87
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
88
|
-
var
|
89
|
-
var
|
88
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
89
|
+
var import_chunk_FVXXNYMS = require("./chunk-FVXXNYMS.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");
|
@@ -13397,7 +13397,7 @@ var require_ci_info = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
13397
13397
|
}
|
13398
13398
|
});
|
13399
13399
|
var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
13400
|
-
"../../node_modules/.pnpm/checkpoint-client@1.1.
|
13400
|
+
"../../node_modules/.pnpm/checkpoint-client@1.1.33_encoding@0.1.13/node_modules/checkpoint-client/dist/index.js"(exports, module) {
|
13401
13401
|
"use strict";
|
13402
13402
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13403
13403
|
var path$2 = (0, import_chunk_WWAWV7DQ.__require)("path");
|
@@ -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_B52IGVII.getConfig)({
|
14755
14755
|
datamodel: files,
|
14756
14756
|
ignoreEnvVarErrors: true
|
14757
14757
|
});
|
@@ -14988,7 +14988,7 @@ async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
|
|
14988
14988
|
"./.env"
|
14989
14989
|
// 4 - Check cwd for .env
|
14990
14990
|
];
|
14991
|
-
const schemaEnvPath = schemaEnvPaths.find(
|
14991
|
+
const schemaEnvPath = schemaEnvPaths.find(import_chunk_3BND5XB4.exists);
|
14992
14992
|
return { rootEnvPath, schemaEnvPath };
|
14993
14993
|
}
|
14994
14994
|
async function readSchemaPathFromPkgJson() {
|
@@ -15036,7 +15036,7 @@ async function loadEnvFile({
|
|
15036
15036
|
printMessage = false
|
15037
15037
|
} = {}) {
|
15038
15038
|
const envPaths2 = await getEnvPaths(schemaPath2);
|
15039
|
-
const envData = (0,
|
15039
|
+
const envData = (0, import_chunk_3BND5XB4.tryLoadEnvs)(envPaths2, { conflictCheck: "error" });
|
15040
15040
|
if (printMessage && envData && envData.message) {
|
15041
15041
|
process.stdout.write(envData.message + "\n");
|
15042
15042
|
}
|
@@ -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_B52IGVII.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
15063
|
+
const url = (0, import_chunk_B52IGVII.resolveUrl)((0, import_chunk_B52IGVII.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_B52IGVII.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_NRYK4LKU.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_3ASW3CGI.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_NRYK4LKU.getDMMF)({
|
15391
15391
|
datamodel: schemas,
|
15392
15392
|
datamodelPath: schemaPath,
|
15393
15393
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
@@ -15505,23 +15505,23 @@ async function sendPanic({
|
|
15505
15505
|
enginesVersion: enginesVersion2,
|
15506
15506
|
getDatabaseVersionSafe
|
15507
15507
|
}) {
|
15508
|
-
const schema = await (0,
|
15508
|
+
const schema = await (0, import_chunk_25RJ7YTB.z)(error).with({ schemaPath: import_chunk_25RJ7YTB.N.not(import_chunk_25RJ7YTB.N.nullish) }, (err) => {
|
15509
15509
|
return getSchema(err.schemaPath);
|
15510
|
-
}).with({ schema:
|
15510
|
+
}).with({ schema: import_chunk_25RJ7YTB.N.not(import_chunk_25RJ7YTB.N.nullish) }, (err) => Promise.resolve(err.schema)).otherwise(() => void 0);
|
15511
15511
|
const maskedSchema = schema ? (0, import_chunk_KDHESRKE.maskSchemas)(schema) : void 0;
|
15512
15512
|
let dbVersion;
|
15513
15513
|
if (error.area === "LIFT_CLI") {
|
15514
|
-
const getDatabaseVersionParams = (0,
|
15514
|
+
const getDatabaseVersionParams = (0, import_chunk_25RJ7YTB.z)({
|
15515
15515
|
schema,
|
15516
15516
|
introspectionUrl: error.introspectionUrl
|
15517
|
-
}).with({ schema:
|
15517
|
+
}).with({ schema: import_chunk_25RJ7YTB.N.not(void 0) }, ({ schema: schema2 }) => {
|
15518
15518
|
return {
|
15519
15519
|
datasource: {
|
15520
15520
|
tag: "Schema",
|
15521
15521
|
...(0, import_chunk_JHQHVXIR.toSchemasContainer)(schema2)
|
15522
15522
|
}
|
15523
15523
|
};
|
15524
|
-
}).with({ introspectionUrl:
|
15524
|
+
}).with({ introspectionUrl: import_chunk_25RJ7YTB.N.not(void 0) }, ({ introspectionUrl }) => {
|
15525
15525
|
return {
|
15526
15526
|
datasource: {
|
15527
15527
|
tag: "ConnectionString",
|
@@ -15671,7 +15671,7 @@ ${(0, import_chunk_PG5FDKSF.bold)("Thanks a lot for your help! \u{1F64F}")}`);
|
|
15671
15671
|
console.error(`${(0, import_chunk_PG5FDKSF.gray)("Error report submission failed due to: ")}`, error2);
|
15672
15672
|
}
|
15673
15673
|
}
|
15674
|
-
await (0,
|
15674
|
+
await (0, import_chunk_QTXYAZFX.wouldYouLikeToCreateANewIssue)({
|
15675
15675
|
prompt: !shouldSubmitReport,
|
15676
15676
|
error,
|
15677
15677
|
cliVersion: cliVersion2,
|
@@ -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_FVXXNYMS.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_GOFT6EIK.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_GOFT6EIK.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_FVXXNYMS.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
15744
15744
|
return formattedSchema;
|
15745
15745
|
}
|
15746
15746
|
/*! Bundled license information:
|
@@ -16,13 +16,13 @@ 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_EKBX4J6O_exports = {};
|
20
|
+
__export(chunk_EKBX4J6O_exports, {
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
23
23
|
});
|
24
|
-
module.exports = __toCommonJS(
|
25
|
-
var
|
24
|
+
module.exports = __toCommonJS(chunk_EKBX4J6O_exports);
|
25
|
+
var import_chunk_2XRDQCIA = require("./chunk-2XRDQCIA.js");
|
26
26
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
27
27
|
var import_chunk_QJZIYUVB = require("./chunk-QJZIYUVB.js");
|
28
28
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
@@ -39,7 +39,7 @@ async function getEngineVersion(enginePath, binaryName) {
|
|
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)();
|
42
|
-
const QE = (0,
|
42
|
+
const QE = (0, import_chunk_2XRDQCIA.loadLibrary)(enginePath, platformInfo);
|
43
43
|
return `${import_fetch_engine.BinaryType.QueryEngineLibrary} ${QE.version().commit}`;
|
44
44
|
} else {
|
45
45
|
const { stdout } = await (0, import_execa.default)(enginePath, ["--version"]);
|
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
19
|
+
var chunk_F52NCIY5_exports = {};
|
20
|
+
__export(chunk_F52NCIY5_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_F52NCIY5_exports);
|
24
|
+
var import_chunk_AAZZAQOE = require("./chunk-AAZZAQOE.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_AAZZAQOE.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_FDOOT64Z_exports = {};
|
30
|
+
__export(chunk_FDOOT64Z_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_FDOOT64Z_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
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_F52NCIY5 = require("./chunk-F52NCIY5.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
|
-
var
|
41
|
-
var
|
40
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
41
|
+
var import_chunk_FVXXNYMS = require("./chunk-FVXXNYMS.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");
|
@@ -48,7 +48,7 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:validate");
|
49
49
|
var ValidateError = class extends Error {
|
50
50
|
constructor(params) {
|
51
|
-
const constructedErrorMessage = (0,
|
51
|
+
const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
52
52
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
53
53
|
return `${reason}
|
54
54
|
${errorCodeMessage}
|
@@ -60,25 +60,25 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: validate]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_F52NCIY5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "ValidateError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function validate(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_CXEMRKV4.createDebugErrorType)(debug, "validateWasm");
|
69
69
|
debug(`Using validate Wasm`);
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
71
71
|
(0, import_chunk_7MD6344A.tryCatch)(
|
72
72
|
() => {
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
74
74
|
debug("Triggering a Rust panic...");
|
75
|
-
|
75
|
+
import_chunk_FVXXNYMS.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_FVXXNYMS.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|
@@ -90,7 +90,7 @@ function validate(options) {
|
|
90
90
|
if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
|
91
91
|
return;
|
92
92
|
}
|
93
|
-
const error = (0,
|
93
|
+
const error = (0, import_chunk_25RJ7YTB.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
94
94
|
debugErrorType(e);
|
95
95
|
console.error("");
|
96
96
|
if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
|
@@ -113,7 +113,7 @@ function validate(options) {
|
|
113
113
|
return panic;
|
114
114
|
}
|
115
115
|
const errorOutput = e.error.message;
|
116
|
-
return new ValidateError((0,
|
116
|
+
return new ValidateError((0, import_chunk_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
117
117
|
}).exhaustive();
|
118
118
|
throw error;
|
119
119
|
}
|
@@ -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_FVXXNYMS_exports = {};
|
30
|
+
__export(chunk_FVXXNYMS_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_FVXXNYMS_exports);
|
36
|
+
var import_chunk_MOK5UDDV = require("./chunk-MOK5UDDV.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_MOK5UDDV.require_package)();
|
46
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
47
47
|
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_HOZFIXMD.WasmPanicRegistry();
|
@@ -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_GOFT6EIK_exports = {};
|
20
|
+
__export(chunk_GOFT6EIK_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_GOFT6EIK_exports);
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
29
|
-
var
|
29
|
+
var import_chunk_FVXXNYMS = require("./chunk-FVXXNYMS.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_FVXXNYMS.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
35
35
|
return lintDiagnostics;
|
36
36
|
}
|