@prisma/internals 6.19.0-integration-next.22 → 6.19.0
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-W6ZWX546.js → chunk-2GUGGLPK.js} +71 -38
- package/dist/chunk-3FP46GUV.js +471 -0
- package/dist/chunk-46ABODUM.js +186 -0
- package/dist/{chunk-GJSFP4V4.js → chunk-4CGPN5SR.js} +9 -3
- package/dist/{chunk-GL7OANR6.js → chunk-4JCVHBYR.js} +5 -5
- package/dist/{chunk-MEOOYUIZ.js → chunk-5AI4FIZ3.js} +10 -10
- package/dist/{chunk-EK3NXGEC.js → chunk-5IQ5L5E4.js} +71 -38
- package/dist/chunk-6TTRTZXU.js +37 -0
- package/dist/{chunk-UB2X7DGZ.js → chunk-75BIJ5PX.js} +9 -9
- package/dist/{chunk-MYLPCGTT.js → chunk-7QC5VORA.js} +5 -5
- package/dist/{chunk-6QTJ35DP.js → chunk-AP3F7M3T.js} +12 -12
- package/dist/{chunk-TGA7DC5A.js → chunk-AX5N26KG.js} +9 -14
- package/dist/{chunk-32LLAKF4.js → chunk-BVJP43JS.js} +784 -13
- package/dist/{chunk-G4R3KIUK.js → chunk-C7SAKLK2.js} +11 -11
- package/dist/{chunk-5B5U2HVK.js → chunk-CCLAMTCA.js} +8 -7
- package/dist/{chunk-IRWX4FCC.js → chunk-D4VDA2TZ.js} +6 -6
- package/dist/{chunk-SU3YFXA4.js → chunk-D7OTFXCP.js} +5 -5
- package/dist/chunk-DZYINYAA.js +68 -0
- package/dist/{chunk-HQE53CGA.js → chunk-E4H6V3Z4.js} +11 -11
- package/dist/{chunk-6FP5PMMX.js → chunk-E6MOBIU5.js} +5 -5
- package/dist/chunk-ERSH2BQA.js +58 -0
- package/dist/{chunk-OKVM3CW4.js → chunk-EYVG6XQS.js} +39 -3
- package/dist/{chunk-5MHUYAV3.js → chunk-F2OZV76L.js} +9 -9
- package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
- package/dist/{chunk-BKHAMV6G.js → chunk-FGU7IK4W.js} +9 -8
- package/dist/{chunk-STBFWZNS.js → chunk-FHZ5QJLR.js} +5 -5
- package/dist/{chunk-3CAPLXKF.js → chunk-FYZCPL2Z.js} +8 -5
- package/dist/{chunk-DOO45FN6.js → chunk-GMW36QQF.js} +7 -7
- package/dist/{chunk-BUQN4WLU.js → chunk-HFFWZTVM.js} +9 -7
- package/dist/{chunk-CGLLQXZE.js → chunk-HHG4DGHC.js} +12 -11
- package/dist/{chunk-5W3BSMTH.js → chunk-HO5HRHFZ.js} +6 -3
- package/dist/{chunk-3WXUQZS7.js → chunk-I6WLABB2.js} +5 -14
- package/dist/{chunk-FF7OLLBP.js → chunk-IDINCQMN.js} +784 -12
- package/dist/{chunk-2LOGW45F.js → chunk-JOIIWB3U.js} +33 -68
- package/dist/{chunk-2KREE2OX.js → chunk-JTS4UPHJ.js} +5 -5
- package/dist/{chunk-33FYCEWF.js → chunk-LFFCR67R.js} +20 -14
- package/dist/{chunk-AZFHZFLX.js → chunk-LU7NT333.js} +11 -11
- package/dist/{chunk-HBU4ZVCA.js → chunk-LV27YCGC.js} +11 -11
- package/dist/{chunk-KNNTV7IN.js → chunk-NVNI2SRU.js} +213 -687
- package/dist/{chunk-4YDN7W7B.js → chunk-OAT7ZJED.js} +20 -7
- package/dist/{chunk-25ON3V6C.js → chunk-PHFQSMQF.js} +5 -5
- package/dist/chunk-PZMRR772.js +41 -0
- package/dist/{chunk-KZ5SMOBR.js → chunk-QJ3QPUM5.js} +5 -5
- package/dist/{chunk-5I4ERIIY.js → chunk-RS2R7COT.js} +9 -3
- package/dist/{chunk-A547MKQQ.js → chunk-SOKSKSEX.js} +20 -14
- package/dist/chunk-T2PM5TKT.js +55 -0
- package/dist/{chunk-UCO5QBOS.js → chunk-TBR6SNKL.js} +5 -5
- package/dist/{chunk-MXAUURHG.js → chunk-TQFONRJP.js} +5 -5
- package/dist/{chunk-WSZXPLJQ.js → chunk-TZJROXB3.js} +4 -4
- package/dist/{chunk-IHC4ZVPQ.js → chunk-UHI6VYFX.js} +5 -5
- package/dist/{chunk-IU77SCOB.js → chunk-UQUWZJVN.js} +9 -9
- package/dist/{chunk-ARC7TW3L.js → chunk-WFNB7VRA.js} +14 -4
- package/dist/{chunk-TU4SG3WD.js → chunk-WYQJ4JWO.js} +12 -12
- package/dist/{chunk-MEBZK5AR.js → chunk-Y7XBA7JY.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +62 -56
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +62 -56
- package/dist/cli/getGeneratorSuccessMessage.js +3 -2
- package/dist/cli/getSchema.d.ts +15 -1
- package/dist/cli/getSchema.js +5 -4
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +3 -1
- package/dist/cli/schemaContext.js +62 -56
- package/dist/client/getClientEngineType.d.ts +7 -0
- package/dist/client/getClientEngineType.js +26 -0
- package/dist/dotenvExpand.d.ts +35 -0
- package/dist/dotenvExpand.js +25 -0
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +61 -55
- package/dist/engine-commands/getConfig.d.ts +1 -0
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +9 -6
- package/dist/engine-commands/getEnginesInfo.d.ts +1 -0
- package/dist/engine-commands/getEnginesInfo.js +9 -7
- package/dist/engine-commands/index.js +73 -67
- package/dist/engine-commands/lintSchema.js +9 -9
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +10 -10
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/getGenerators.d.ts +1 -0
- package/dist/get-generators/getGenerators.js +64 -58
- package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
- package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +5 -6
- package/dist/getPackedPackage.js +3 -4
- package/dist/index.d.ts +8 -1
- package/dist/index.js +115 -101
- package/dist/{multipart-parser-UV3WZSWW.js → multipart-parser-3AFJFP6K.js} +6 -6
- package/dist/resolveBinary.js +7 -8
- package/dist/schemaEngineCommands.js +8 -9
- package/dist/sendPanic.js +4 -4
- package/dist/utils/canPrompt.js +3 -3
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/drawBox.js +2 -2
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getEnvPaths.d.ts +14 -0
- package/dist/utils/getEnvPaths.js +29 -0
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.d.ts +8 -0
- package/dist/utils/handleEngineLoadingErrors.js +27 -0
- package/dist/utils/handlePanic.js +8 -8
- package/dist/utils/link.js +2 -2
- package/dist/utils/load.d.ts +6 -0
- package/dist/utils/load.js +28 -0
- package/dist/utils/loadEnvFile.d.ts +10 -0
- package/dist/utils/loadEnvFile.js +30 -0
- package/dist/utils/missingDatasource.js +3 -3
- package/dist/utils/missingGeneratorMessage.js +5 -5
- package/dist/utils/serializeQueryEngineName.js +2 -2
- package/dist/utils/tryLoadEnvs.d.ts +25 -0
- package/dist/utils/tryLoadEnvs.js +30 -0
- package/dist/wasm.js +5 -5
- package/package.json +16 -15
- package/dist/chunk-DYV47NUW.js +0 -796
|
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_4JCVHBYR_exports = {};
|
|
30
|
+
__export(chunk_4JCVHBYR_exports, {
|
|
31
31
|
getCLIPathHash: () => getCLIPathHash,
|
|
32
32
|
getProjectHash: () => getProjectHash
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_4JCVHBYR_exports);
|
|
35
|
+
var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
|
|
36
36
|
var import_crypto = __toESM(require("crypto"));
|
|
37
37
|
async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
|
|
38
|
-
const projectPath = (await (0,
|
|
38
|
+
const projectPath = (await (0, import_chunk_EYVG6XQS.getSchemaWithPath)(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
|
|
39
39
|
return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
|
|
40
40
|
}
|
|
41
41
|
function getCLIPathHash() {
|
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_5AI4FIZ3_exports = {};
|
|
30
|
+
__export(chunk_5AI4FIZ3_exports, {
|
|
31
31
|
ErrorKind: () => ErrorKind,
|
|
32
32
|
createErrorReport: () => createErrorReport,
|
|
33
33
|
makeErrorReportCompleted: () => makeErrorReportCompleted,
|
|
34
34
|
uploadZip: () => uploadZip
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_5AI4FIZ3_exports);
|
|
37
|
+
var import_chunk_NVNI2SRU = require("./chunk-NVNI2SRU.js");
|
|
38
38
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
39
39
|
var import_node_http = __toESM(require("node:http"));
|
|
40
40
|
var import_node_https = __toESM(require("node:https"));
|
|
@@ -151,8 +151,8 @@ var Body = class {
|
|
|
151
151
|
} else if (ArrayBuffer.isView(body)) {
|
|
152
152
|
body = import_node_buffer2.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
|
153
153
|
} else if (body instanceof import_node_stream2.default) {
|
|
154
|
-
} else if (body instanceof
|
|
155
|
-
body = (0,
|
|
154
|
+
} else if (body instanceof import_chunk_NVNI2SRU.FormData) {
|
|
155
|
+
body = (0, import_chunk_NVNI2SRU.formDataToBlob)(body);
|
|
156
156
|
boundary = body.type.split("=")[1];
|
|
157
157
|
} else {
|
|
158
158
|
body = import_node_buffer2.Buffer.from(String(body));
|
|
@@ -196,14 +196,14 @@ var Body = class {
|
|
|
196
196
|
async formData() {
|
|
197
197
|
const ct = this.headers.get("content-type");
|
|
198
198
|
if (ct.startsWith("application/x-www-form-urlencoded")) {
|
|
199
|
-
const formData = new
|
|
199
|
+
const formData = new import_chunk_NVNI2SRU.FormData();
|
|
200
200
|
const parameters = new URLSearchParams(await this.text());
|
|
201
201
|
for (const [name, value] of parameters) {
|
|
202
202
|
formData.append(name, value);
|
|
203
203
|
}
|
|
204
204
|
return formData;
|
|
205
205
|
}
|
|
206
|
-
const { toFormData } = await import("./multipart-parser-
|
|
206
|
+
const { toFormData } = await import("./multipart-parser-3AFJFP6K.js");
|
|
207
207
|
return toFormData(this.body, ct);
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
@@ -214,7 +214,7 @@ var Body = class {
|
|
|
214
214
|
async blob() {
|
|
215
215
|
const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
|
|
216
216
|
const buf = await this.arrayBuffer();
|
|
217
|
-
return new
|
|
217
|
+
return new import_chunk_NVNI2SRU.fetch_blob_default([buf], {
|
|
218
218
|
type: ct
|
|
219
219
|
});
|
|
220
220
|
}
|
|
@@ -342,7 +342,7 @@ var extractContentType = (body, request2) => {
|
|
|
342
342
|
if (import_node_buffer2.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
|
343
343
|
return null;
|
|
344
344
|
}
|
|
345
|
-
if (body instanceof
|
|
345
|
+
if (body instanceof import_chunk_NVNI2SRU.FormData) {
|
|
346
346
|
return `multipart/form-data; boundary=${request2[INTERNALS].boundary}`;
|
|
347
347
|
}
|
|
348
348
|
if (body && typeof body.getBoundary === "function") {
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_5IQ5L5E4_exports = {};
|
|
30
|
+
__export(chunk_5IQ5L5E4_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
|
33
33
|
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
|
@@ -36,36 +36,39 @@ __export(chunk_EK3NXGEC_exports, {
|
|
|
36
36
|
getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
|
|
37
37
|
getGenerator: () => getGenerator,
|
|
38
38
|
getGenerators: () => getGenerators,
|
|
39
|
+
getNodeAPIName: () => import_get_platform2.getNodeAPIName,
|
|
39
40
|
knownBinaryTargets: () => knownBinaryTargets,
|
|
40
41
|
loadSchemaContext: () => loadSchemaContext,
|
|
41
42
|
processSchemaResult: () => processSchemaResult,
|
|
42
43
|
skipIndex: () => skipIndex
|
|
43
44
|
});
|
|
44
|
-
module.exports = __toCommonJS(
|
|
45
|
-
var import_chunk_5MHUYAV3 = require("./chunk-5MHUYAV3.js");
|
|
45
|
+
module.exports = __toCommonJS(chunk_5IQ5L5E4_exports);
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
48
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
49
|
+
var import_chunk_F2OZV76L = require("./chunk-F2OZV76L.js");
|
|
50
|
+
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
|
49
51
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
50
52
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
53
|
+
var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
|
|
54
|
+
var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
|
|
55
|
+
var import_chunk_46ABODUM = require("./chunk-46ABODUM.js");
|
|
56
|
+
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
54
57
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
58
|
+
var import_chunk_LFFCR67R = require("./chunk-LFFCR67R.js");
|
|
59
|
+
var import_chunk_C7SAKLK2 = require("./chunk-C7SAKLK2.js");
|
|
60
|
+
var import_chunk_E6MOBIU5 = require("./chunk-E6MOBIU5.js");
|
|
61
|
+
var import_chunk_LU7NT333 = require("./chunk-LU7NT333.js");
|
|
62
|
+
var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
|
|
63
|
+
var import_chunk_Y7XBA7JY = require("./chunk-Y7XBA7JY.js");
|
|
64
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
61
65
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
62
66
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
63
67
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
64
68
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
65
69
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
66
|
-
var import_chunk_32LLAKF4 = require("./chunk-32LLAKF4.js");
|
|
67
|
-
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
68
70
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
71
|
+
var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
|
|
69
72
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
70
73
|
var import_path = __toESM(require("path"));
|
|
71
74
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -78,7 +81,7 @@ var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
|
|
|
78
81
|
Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
|
|
79
82
|
defining an ${(0, import_chunk_PG5FDKSF.green)(`adapter`)} in Prisma config file (e.g., ${(0, import_chunk_PG5FDKSF.green)(`\`prisma.config.ts\``)}).
|
|
80
83
|
|
|
81
|
-
More information about this limitation: ${(0,
|
|
84
|
+
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/schema-engine-limitations")}
|
|
82
85
|
`;
|
|
83
86
|
function checkUnsupportedSchemaEngineWasm({
|
|
84
87
|
cmd,
|
|
@@ -99,7 +102,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
99
102
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
100
103
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
101
104
|
handleFormatPanic(() => {
|
|
102
|
-
|
|
105
|
+
import_chunk_Y7XBA7JY.prismaSchemaWasm.debug_panic();
|
|
103
106
|
});
|
|
104
107
|
}
|
|
105
108
|
const defaultFormattingOptions = {
|
|
@@ -116,10 +119,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
116
119
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
117
120
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
118
121
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
119
|
-
const lintDiagnostics2 = (0,
|
|
122
|
+
const lintDiagnostics2 = (0, import_chunk_E6MOBIU5.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
120
123
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
121
124
|
});
|
|
122
|
-
const lintWarnings = (0,
|
|
125
|
+
const lintWarnings = (0, import_chunk_E6MOBIU5.getLintWarningsAsText)(lintDiagnostics);
|
|
123
126
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
124
127
|
console.warn(lintWarnings);
|
|
125
128
|
}
|
|
@@ -146,7 +149,7 @@ function handleFormatPanic(tryCb) {
|
|
|
146
149
|
}
|
|
147
150
|
}
|
|
148
151
|
function formatWasm(schema, documentFormattingParams) {
|
|
149
|
-
const formattedSchema =
|
|
152
|
+
const formattedSchema = import_chunk_Y7XBA7JY.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
150
153
|
return formattedSchema;
|
|
151
154
|
}
|
|
152
155
|
async function loadSchemaContext({
|
|
@@ -154,37 +157,39 @@ async function loadSchemaContext({
|
|
|
154
157
|
schemaPathFromConfig,
|
|
155
158
|
schemaEngineConfig,
|
|
156
159
|
printLoadMessage = true,
|
|
160
|
+
ignoreEnvVarErrors = false,
|
|
157
161
|
allowNull = false,
|
|
158
162
|
schemaPathArgumentName = "--schema",
|
|
159
163
|
cwd = process.cwd()
|
|
160
164
|
} = {}) {
|
|
161
165
|
let schemaResult = null;
|
|
162
166
|
if (allowNull) {
|
|
163
|
-
schemaResult = await (0,
|
|
167
|
+
schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
|
|
164
168
|
argumentName: schemaPathArgumentName,
|
|
165
169
|
cwd
|
|
166
170
|
});
|
|
167
171
|
if (!schemaResult) return null;
|
|
168
172
|
} else {
|
|
169
|
-
schemaResult = await (0,
|
|
173
|
+
schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
|
|
170
174
|
argumentName: schemaPathArgumentName,
|
|
171
175
|
cwd
|
|
172
176
|
});
|
|
173
177
|
}
|
|
174
|
-
return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, cwd });
|
|
178
|
+
return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, ignoreEnvVarErrors, cwd });
|
|
175
179
|
}
|
|
176
180
|
async function processSchemaResult({
|
|
177
181
|
schemaResult,
|
|
178
182
|
schemaEngineConfig,
|
|
179
183
|
printLoadMessage = true,
|
|
184
|
+
ignoreEnvVarErrors = false,
|
|
180
185
|
cwd = process.cwd()
|
|
181
186
|
}) {
|
|
182
187
|
const loadedFromPathForLogMessages = import_path.default.relative(cwd, schemaResult.schemaPath);
|
|
183
188
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
184
189
|
if (printLoadMessage) {
|
|
185
|
-
(0,
|
|
190
|
+
(0, import_chunk_EYVG6XQS.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
186
191
|
}
|
|
187
|
-
const configFromPsl = await (0,
|
|
192
|
+
const configFromPsl = await (0, import_chunk_LFFCR67R.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
|
188
193
|
const datasourceFromPsl = configFromPsl.datasources.at(0);
|
|
189
194
|
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
|
|
190
195
|
const { url, directUrl, shadowDatabaseUrl } = datasource;
|
|
@@ -217,7 +222,7 @@ function getPrimaryDatasourceDirectory(primaryDatasource) {
|
|
|
217
222
|
}
|
|
218
223
|
return null;
|
|
219
224
|
}
|
|
220
|
-
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
225
|
+
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_BVJP43JS.require_p_map)());
|
|
221
226
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
222
227
|
async function getGenerators(options) {
|
|
223
228
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -242,27 +247,28 @@ async function getGenerators(options) {
|
|
|
242
247
|
binaryPathsOverride,
|
|
243
248
|
generatorNames = [],
|
|
244
249
|
postinstall,
|
|
250
|
+
noEngine,
|
|
245
251
|
allowNoModels = true,
|
|
246
252
|
typedSql
|
|
247
253
|
} = options;
|
|
248
|
-
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath }) : options.schemaContext;
|
|
254
|
+
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath, ignoreEnvVarErrors: true }) : options.schemaContext;
|
|
249
255
|
if (!schemaContext) {
|
|
250
256
|
throw new Error(`no schema provided for getGenerators`);
|
|
251
257
|
}
|
|
252
258
|
if (!schemaContext.primaryDatasource) {
|
|
253
|
-
throw new Error(
|
|
259
|
+
throw new Error(import_chunk_7QC5VORA.missingDatasource);
|
|
254
260
|
}
|
|
255
261
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
256
262
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
257
|
-
const dmmf = await (0,
|
|
263
|
+
const dmmf = await (0, import_chunk_C7SAKLK2.getDMMF)({
|
|
258
264
|
datamodel: schemaContext.schemaFiles,
|
|
259
265
|
previewFeatures
|
|
260
266
|
});
|
|
261
267
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
262
268
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
263
|
-
throw new Error(
|
|
269
|
+
throw new Error(import_chunk_AX5N26KG.missingModelMessageMongoDB);
|
|
264
270
|
}
|
|
265
|
-
throw new Error(
|
|
271
|
+
throw new Error(import_chunk_AX5N26KG.missingModelMessage);
|
|
266
272
|
}
|
|
267
273
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
268
274
|
await validateGenerators(generatorConfigs);
|
|
@@ -305,7 +311,8 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
305
311
|
fromEnvVar: null
|
|
306
312
|
};
|
|
307
313
|
}
|
|
308
|
-
const datamodel = (0,
|
|
314
|
+
const datamodel = (0, import_chunk_LU7NT333.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
315
|
+
const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
|
309
316
|
const options2 = {
|
|
310
317
|
datamodel,
|
|
311
318
|
datasources: schemaContext.datasources,
|
|
@@ -317,7 +324,9 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
317
324
|
version: version2 || import_engines.enginesVersion,
|
|
318
325
|
// this version makes no sense anymore and should be ignored
|
|
319
326
|
postinstall,
|
|
327
|
+
noEngine,
|
|
320
328
|
allowNoModels,
|
|
329
|
+
envPaths,
|
|
321
330
|
typedSql
|
|
322
331
|
};
|
|
323
332
|
generatorInstance.setOptions(options2);
|
|
@@ -361,16 +370,18 @@ generator gen {
|
|
|
361
370
|
}
|
|
362
371
|
const generatorBinaryTargets = g.options?.generator?.binaryTargets;
|
|
363
372
|
if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
|
|
364
|
-
for (const
|
|
365
|
-
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value ===
|
|
366
|
-
neededVersions[neededVersion].binaryTargets.push(
|
|
373
|
+
for (const binaryTarget2 of generatorBinaryTargets) {
|
|
374
|
+
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget2.value)) {
|
|
375
|
+
neededVersions[neededVersion].binaryTargets.push(binaryTarget2);
|
|
367
376
|
}
|
|
368
377
|
}
|
|
369
378
|
}
|
|
370
379
|
}
|
|
371
380
|
}
|
|
381
|
+
const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
|
|
382
|
+
const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
|
|
372
383
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
373
|
-
const { binaryPathsByVersion } = await (0,
|
|
384
|
+
const { binaryPathsByVersion, binaryTarget } = await (0, import_chunk_F2OZV76L.getBinaryPathsByVersion)({
|
|
374
385
|
neededVersions,
|
|
375
386
|
// We're lazily computing the binary target here, to avoid printing the
|
|
376
387
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -391,6 +402,17 @@ generator gen {
|
|
|
391
402
|
const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
|
|
392
403
|
debug2({ generatorBinaryPaths });
|
|
393
404
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
405
|
+
if (engineVersion !== version2 && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
406
|
+
const customDmmf = await (0, import_chunk_C7SAKLK2.getDMMF)({
|
|
407
|
+
datamodel: schemaContext.schemaFiles,
|
|
408
|
+
previewFeatures
|
|
409
|
+
});
|
|
410
|
+
const options2 = { ...generator.options, dmmf: customDmmf };
|
|
411
|
+
debug2("generator.manifest.prettyName", generator.manifest.prettyName);
|
|
412
|
+
debug2("options", options2);
|
|
413
|
+
debug2("options.generator.binaryTargets", options2.generator.binaryTargets);
|
|
414
|
+
generator.setOptions(options2);
|
|
415
|
+
}
|
|
394
416
|
}
|
|
395
417
|
}
|
|
396
418
|
return generators;
|
|
@@ -415,6 +437,17 @@ var oldToNewBinaryTargetsMapping = {
|
|
|
415
437
|
async function validateGenerators(generators) {
|
|
416
438
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
417
439
|
for (const generator of generators) {
|
|
440
|
+
if (generator.config.platforms) {
|
|
441
|
+
throw new Error(
|
|
442
|
+
`The \`platforms\` field on the generator definition is deprecated. Please rename it to \`binaryTargets\`.`
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
if (generator.config.pinnedBinaryTargets) {
|
|
446
|
+
throw new Error(
|
|
447
|
+
`The \`pinnedBinaryTargets\` field on the generator definition is deprecated.
|
|
448
|
+
Please use the PRISMA_QUERY_ENGINE_BINARY env var instead to pin the binary target.`
|
|
449
|
+
);
|
|
450
|
+
}
|
|
418
451
|
if (generator.binaryTargets) {
|
|
419
452
|
const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
|
|
420
453
|
const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
|
|
@@ -478,7 +511,7 @@ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
|
478
511
|
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${command}`)} yet.
|
|
479
512
|
Please use a direct connection to your database via the datasource \`directUrl\` setting.
|
|
480
513
|
|
|
481
|
-
More information about this limitation: ${(0,
|
|
514
|
+
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
|
|
482
515
|
`;
|
|
483
516
|
function checkUnsupportedDataProxy({
|
|
484
517
|
cmd,
|
|
@@ -491,7 +524,7 @@ function checkUnsupportedDataProxy({
|
|
|
491
524
|
}
|
|
492
525
|
}
|
|
493
526
|
if (!schemaContext?.primaryDatasource) return;
|
|
494
|
-
const url = (0,
|
|
527
|
+
const url = (0, import_chunk_LFFCR67R.resolveUrl)((0, import_chunk_LFFCR67R.getEffectiveUrl)(schemaContext.primaryDatasource));
|
|
495
528
|
if (url?.startsWith("prisma://")) {
|
|
496
529
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
497
530
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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_6TTRTZXU_exports = {};
|
|
20
|
+
__export(chunk_6TTRTZXU_exports, {
|
|
21
|
+
loadLibrary: () => loadLibrary
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(chunk_6TTRTZXU_exports);
|
|
24
|
+
var import_chunk_DZYINYAA = require("./chunk-DZYINYAA.js");
|
|
25
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
26
|
+
function loadLibrary(id, platformInfo) {
|
|
27
|
+
try {
|
|
28
|
+
return (0, import_chunk_4VNS5WPM.__require)(id);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
const errorMessage = (0, import_chunk_DZYINYAA.handleLibraryLoadingErrors)({
|
|
31
|
+
e,
|
|
32
|
+
platformInfo,
|
|
33
|
+
id
|
|
34
|
+
});
|
|
35
|
+
throw new Error(errorMessage);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_75BIJ5PX_exports = {};
|
|
30
|
+
__export(chunk_75BIJ5PX_exports, {
|
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists2,
|
|
32
32
|
fs_functional_exports: () => fs_functional_exports,
|
|
33
33
|
getFilesInDir: () => getFilesInDir2,
|
|
@@ -37,8 +37,8 @@ __export(chunk_UB2X7DGZ_exports, {
|
|
|
37
37
|
removeFile: () => removeFile,
|
|
38
38
|
writeFile: () => writeFile2
|
|
39
39
|
});
|
|
40
|
-
module.exports = __toCommonJS(
|
|
41
|
-
var
|
|
40
|
+
module.exports = __toCommonJS(chunk_75BIJ5PX_exports);
|
|
41
|
+
var import_chunk_TQFONRJP = require("./chunk-TQFONRJP.js");
|
|
42
42
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
43
43
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
44
44
|
var import_promises = __toESM(require("fs/promises"));
|
|
@@ -3981,13 +3981,13 @@ var fs_functional_exports = {};
|
|
|
3981
3981
|
});
|
|
3982
3982
|
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
|
3983
3983
|
var TE = (0, import_chunk_4VNS5WPM.__toESM)(require_TaskEither());
|
|
3984
|
-
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0,
|
|
3985
|
-
var writeFile2 = (params) => TE.tryCatch(() => (0,
|
|
3986
|
-
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0,
|
|
3984
|
+
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
|
|
3985
|
+
var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.writeFile)(params), createTaggedSystemError("fs-write-file", params));
|
|
3986
|
+
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
|
|
3987
3987
|
var removeDir = (dir) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.rm(dir, { recursive: true }), createTaggedSystemError("fs-remove-dir", { dir })));
|
|
3988
3988
|
var removeFile = (filePath) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.unlink(filePath), createTaggedSystemError("fs-remove-file", { filePath })));
|
|
3989
|
-
var getNestedFoldersInDir2 = (dir) => () => (0,
|
|
3990
|
-
var getFilesInDir2 = (dir, pattern = "**") => () => (0,
|
|
3989
|
+
var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_TQFONRJP.getNestedFoldersInDir)(dir);
|
|
3990
|
+
var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_TQFONRJP.getFilesInDir)(dir, pattern);
|
|
3991
3991
|
function createTaggedSystemError(type, meta) {
|
|
3992
3992
|
return (e) => ({
|
|
3993
3993
|
type,
|
|
@@ -16,12 +16,12 @@ 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_7QC5VORA_exports = {};
|
|
20
|
+
__export(chunk_7QC5VORA_exports, {
|
|
21
21
|
missingDatasource: () => missingDatasource
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_7QC5VORA_exports);
|
|
24
|
+
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
25
25
|
var import_chunk_TQCLUNM2 = require("./chunk-TQCLUNM2.js");
|
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
27
27
|
var missingDatasource = `
|
|
@@ -36,5 +36,5 @@ ${(0, import_chunk_PG5FDKSF.bold)(
|
|
|
36
36
|
)}
|
|
37
37
|
|
|
38
38
|
More information in our documentation:
|
|
39
|
-
${(0,
|
|
39
|
+
${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
|
|
40
40
|
`;
|
|
@@ -26,17 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_AP3F7M3T_exports = {};
|
|
30
|
+
__export(chunk_AP3F7M3T_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_AP3F7M3T_exports);
|
|
35
|
+
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
37
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
+
var import_chunk_D7OTFXCP = require("./chunk-D7OTFXCP.js");
|
|
39
|
+
var import_chunk_Y7XBA7JY = require("./chunk-Y7XBA7JY.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_D7OTFXCP.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function validate(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "validateWasm");
|
|
68
68
|
debug(`Using validate Wasm`);
|
|
69
69
|
const validateEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
71
71
|
() => {
|
|
72
72
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_Y7XBA7JY.prismaSchemaWasm.debug_panic();
|
|
75
75
|
}
|
|
76
76
|
const params = JSON.stringify({
|
|
77
77
|
prismaSchema: options.schemas,
|
|
78
78
|
noColor: Boolean(process.env.NO_COLOR)
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
import_chunk_Y7XBA7JY.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -109,7 +109,7 @@ function validate(options) {
|
|
|
109
109
|
return panic;
|
|
110
110
|
}
|
|
111
111
|
const errorOutput = e.error.message;
|
|
112
|
-
return new ValidateError((0,
|
|
112
|
+
return new ValidateError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
113
113
|
}).exhaustive();
|
|
114
114
|
throw error;
|
|
115
115
|
}
|
|
@@ -16,32 +16,27 @@ 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_AX5N26KG_exports = {};
|
|
20
|
+
__export(chunk_AX5N26KG_exports, {
|
|
21
21
|
missingGeneratorMessage: () => missingGeneratorMessage,
|
|
22
22
|
missingModelMessage: () => missingModelMessage,
|
|
23
23
|
missingModelMessageMongoDB: () => missingModelMessageMongoDB
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
-
var
|
|
25
|
+
module.exports = __toCommonJS(chunk_AX5N26KG_exports);
|
|
26
|
+
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
27
27
|
var import_chunk_TQCLUNM2 = require("./chunk-TQCLUNM2.js");
|
|
28
28
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
29
29
|
var missingGeneratorMessage = `
|
|
30
30
|
${(0, import_chunk_PG5FDKSF.blue)("info")} You don't have any generators defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
|
31
31
|
"schema.prisma"
|
|
32
32
|
)}, so nothing will be generated.
|
|
33
|
-
|
|
33
|
+
You can define them like this:
|
|
34
34
|
|
|
35
35
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
36
36
|
(0, import_chunk_TQCLUNM2.highlightDatamodel)(`generator client {
|
|
37
|
-
provider = "prisma-client"
|
|
38
|
-
output = "../src/generated/prisma"
|
|
37
|
+
provider = "prisma-client-js"
|
|
39
38
|
}`)
|
|
40
|
-
)}
|
|
41
|
-
|
|
42
|
-
More information in our documentation:
|
|
43
|
-
${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
|
|
44
|
-
`;
|
|
39
|
+
)}`;
|
|
45
40
|
var missingModelMessage = `
|
|
46
41
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
|
47
42
|
"schema.prisma"
|
|
@@ -57,7 +52,7 @@ ${(0, import_chunk_PG5FDKSF.bold)(
|
|
|
57
52
|
)}
|
|
58
53
|
|
|
59
54
|
More information in our documentation:
|
|
60
|
-
${(0,
|
|
55
|
+
${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
|
|
61
56
|
`;
|
|
62
57
|
var missingModelMessageMongoDB = `
|
|
63
58
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
|
@@ -74,5 +69,5 @@ ${(0, import_chunk_PG5FDKSF.bold)(
|
|
|
74
69
|
)}
|
|
75
70
|
|
|
76
71
|
More information in our documentation:
|
|
77
|
-
${(0,
|
|
72
|
+
${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
|
|
78
73
|
`;
|