@prisma/internals 6.20.0-integration-merge-release-workflows.1 → 6.20.0-integration-feat-prisma-7-config.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-GMW36QQF.js → chunk-22HIO2UL.js} +7 -7
- package/dist/{chunk-LV27YCGC.js → chunk-24ZPBDBI.js} +11 -11
- package/dist/{chunk-4LVRVSNF.js → chunk-2Q43C56O.js} +5 -5
- package/dist/{chunk-I6WLABB2.js → chunk-3WXUQZS7.js} +14 -5
- package/dist/{chunk-UCCQQTFO.js → chunk-3ZWEK4N6.js} +5 -5
- package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
- package/dist/{chunk-F2OZV76L.js → chunk-5MHUYAV3.js} +9 -9
- package/dist/{chunk-KU7SAWN3.js → chunk-5SJXW6MS.js} +5 -5
- package/dist/{chunk-HO5HRHFZ.js → chunk-5W3BSMTH.js} +3 -6
- package/dist/{chunk-2GUGGLPK.js → chunk-5ZSVGCMS.js} +40 -96
- package/dist/{chunk-TBR6SNKL.js → chunk-73HXEN2A.js} +5 -5
- package/dist/{chunk-JXNFYOZ5.js → chunk-ANOE4NZ5.js} +8 -9
- package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
- package/dist/{chunk-CCLAMTCA.js → chunk-B2BNIZB2.js} +7 -8
- package/dist/{chunk-UQUWZJVN.js → chunk-BM3JIFQT.js} +7 -7
- package/dist/{chunk-HFFWZTVM.js → chunk-BUQN4WLU.js} +7 -9
- package/dist/{chunk-PPOIVSLU.js → chunk-C5YUUOQW.js} +12 -12
- package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
- package/dist/{chunk-WYQJ4JWO.js → chunk-COA7HD3T.js} +12 -12
- package/dist/{chunk-XAMLDQ2P.js → chunk-DOY5PWV6.js} +40 -96
- package/dist/chunk-DYV47NUW.js +796 -0
- package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
- package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
- package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
- package/dist/{chunk-OAT7ZJED.js → chunk-H5STSTVK.js} +7 -20
- package/dist/{chunk-FYZCPL2Z.js → chunk-HNRMSI3R.js} +5 -8
- package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
- package/dist/{chunk-DGWDDGWN.js → chunk-LA5QBRTU.js} +14 -20
- package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
- package/dist/{chunk-TQFONRJP.js → chunk-MLFKBBDL.js} +5 -5
- package/dist/{chunk-7QC5VORA.js → chunk-MYLPCGTT.js} +5 -5
- package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
- package/dist/{chunk-SOKSKSEX.js → chunk-QGQTFZOZ.js} +14 -20
- package/dist/{chunk-JTS4UPHJ.js → chunk-QJDVKII7.js} +5 -5
- package/dist/{chunk-JOIIWB3U.js → chunk-QOZ7USPD.js} +193 -159
- package/dist/{chunk-BVJP43JS.js → chunk-QSVWJ2S2.js} +13 -784
- package/dist/{chunk-FQ2QMQS3.js → chunk-RVTU2FIM.js} +11 -11
- package/dist/{chunk-75BIJ5PX.js → chunk-SMJRM3EM.js} +9 -9
- package/dist/{chunk-AX5N26KG.js → chunk-TGA7DC5A.js} +14 -9
- package/dist/{chunk-QJ3QPUM5.js → chunk-VFZCLI5X.js} +5 -5
- package/dist/{chunk-E4H6V3Z4.js → chunk-VHE2A7YV.js} +11 -11
- package/dist/{chunk-FHZ5QJLR.js → chunk-VITPVRRI.js} +5 -5
- package/dist/{chunk-OOYVI2NK.js → chunk-WITEP52Z.js} +5 -5
- package/dist/{chunk-UHI6VYFX.js → chunk-WJKBKH3Y.js} +5 -5
- package/dist/{chunk-ZGPBFCUN.js → chunk-WKOGDEF4.js} +11 -11
- package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
- package/dist/cli/checkUnsupportedDataProxy.js +53 -60
- package/dist/cli/getGeneratorSuccessMessage.js +2 -3
- package/dist/cli/getSchema.d.ts +1 -15
- package/dist/cli/getSchema.js +4 -5
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +2 -11
- package/dist/cli/schemaContext.js +53 -60
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +52 -59
- package/dist/engine-commands/getConfig.d.ts +0 -1
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +6 -9
- package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
- package/dist/engine-commands/getEnginesInfo.js +7 -9
- package/dist/engine-commands/index.js +64 -71
- 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 +0 -1
- package/dist/get-generators/getGenerators.js +55 -62
- 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 +6 -5
- package/dist/getPackedPackage.js +4 -3
- package/dist/index.d.ts +1 -10
- package/dist/index.js +95 -112
- package/dist/{multipart-parser-3AFJFP6K.js → multipart-parser-UV3WZSWW.js} +6 -6
- package/dist/resolveBinary.js +8 -7
- package/dist/schemaEngineCommands.js +9 -8
- package/dist/sendPanic.js +4 -4
- 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/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +6 -6
- package/dist/utils/link.js +2 -2
- package/dist/utils/missingDatasource.js +3 -3
- package/dist/utils/missingGeneratorMessage.js +5 -5
- package/dist/utils/serializeQueryEngineName.js +2 -2
- package/dist/wasm.js +5 -5
- package/package.json +15 -16
- package/dist/chunk-3FP46GUV.js +0 -471
- package/dist/chunk-46ABODUM.js +0 -186
- package/dist/chunk-6TTRTZXU.js +0 -37
- package/dist/chunk-D4VDA2TZ.js +0 -66
- package/dist/chunk-DZYINYAA.js +0 -68
- package/dist/chunk-ERSH2BQA.js +0 -58
- package/dist/chunk-PZMRR772.js +0 -41
- package/dist/chunk-T2PM5TKT.js +0 -55
- package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +0 -22
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +0 -135
- package/dist/client/getClientEngineType.d.ts +0 -7
- package/dist/client/getClientEngineType.js +0 -26
- package/dist/dotenvExpand.d.ts +0 -35
- package/dist/dotenvExpand.js +0 -25
- package/dist/utils/cloudflareD1.d.ts +0 -5
- package/dist/utils/cloudflareD1.js +0 -27
- package/dist/utils/getEnvPaths.d.ts +0 -14
- package/dist/utils/getEnvPaths.js +0 -29
- package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
- package/dist/utils/handleEngineLoadingErrors.js +0 -27
- package/dist/utils/load.d.ts +0 -6
- package/dist/utils/load.js +0 -28
- package/dist/utils/loadEnvFile.d.ts +0 -10
- package/dist/utils/loadEnvFile.js +0 -30
- package/dist/utils/tryLoadEnvs.d.ts +0 -25
- package/dist/utils/tryLoadEnvs.js +0 -30
|
@@ -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_22HIO2UL_exports = {};
|
|
30
|
+
__export(chunk_22HIO2UL_exports, {
|
|
31
31
|
getEnginesInfo: () => getEnginesInfo,
|
|
32
32
|
resolveEngine: () => resolveEngine
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_22HIO2UL_exports);
|
|
35
|
+
var import_chunk_H5STSTVK = require("./chunk-H5STSTVK.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_HNRMSI3R = require("./chunk-HNRMSI3R.js");
|
|
38
38
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
39
39
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
40
40
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -131,7 +131,7 @@ async function resolveEngine(binaryName) {
|
|
|
131
131
|
const enginePathEither = await (0, import_function2.pipe)(
|
|
132
132
|
pathFromEnvOption,
|
|
133
133
|
fold(
|
|
134
|
-
() => (0,
|
|
134
|
+
() => (0, import_chunk_HNRMSI3R.safeResolveBinary)(binaryName),
|
|
135
135
|
(pathFromEnv) => (0, import_chunk_5DBOS77Y.right2)(pathFromEnv.path)
|
|
136
136
|
)
|
|
137
137
|
)();
|
|
@@ -139,7 +139,7 @@ async function resolveEngine(binaryName) {
|
|
|
139
139
|
enginePathEither,
|
|
140
140
|
import_chunk_5DBOS77Y.fromEither,
|
|
141
141
|
(0, import_chunk_5DBOS77Y.chain)((enginePath) => {
|
|
142
|
-
return (0,
|
|
142
|
+
return (0, import_chunk_H5STSTVK.safeGetEngineVersion)(enginePath, binaryName);
|
|
143
143
|
})
|
|
144
144
|
)();
|
|
145
145
|
const engineInfo = {
|
|
@@ -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_24ZPBDBI_exports = {};
|
|
30
|
+
__export(chunk_24ZPBDBI_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_24ZPBDBI_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_2Q43C56O = require("./chunk-2Q43C56O.js");
|
|
38
|
+
var import_chunk_3ZWEK4N6 = require("./chunk-3ZWEK4N6.js");
|
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -58,25 +58,25 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_2Q43C56O.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
async function getDMMF(options) {
|
|
66
|
-
const debugErrorType = (0,
|
|
66
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
|
67
67
|
debug(`Using getDmmf Wasm`);
|
|
68
68
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
69
69
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
70
70
|
() => {
|
|
71
71
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_3ZWEK4N6.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_3ZWEK4N6.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
@@ -124,7 +124,7 @@ async function getDMMF(options) {
|
|
|
124
124
|
return panic;
|
|
125
125
|
}
|
|
126
126
|
const errorOutput = e.error.message;
|
|
127
|
-
return new GetDmmfError((0,
|
|
127
|
+
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
128
128
|
}).with({ type: "parse-json" }, (e) => {
|
|
129
129
|
debugErrorType(e);
|
|
130
130
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
|
@@ -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_2Q43C56O_exports = {};
|
|
20
|
+
__export(chunk_2Q43C56O_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var import_chunk_OOYVI2NK = require("./chunk-OOYVI2NK.js");
|
|
23
|
+
module.exports = __toCommonJS(chunk_2Q43C56O_exports);
|
|
25
24
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
+
var import_chunk_VFZCLI5X = require("./chunk-VFZCLI5X.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_VFZCLI5X.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -26,11 +26,11 @@ 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_3WXUQZS7_exports = {};
|
|
30
|
+
__export(chunk_3WXUQZS7_exports, {
|
|
31
31
|
link: () => link2
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_3WXUQZS7_exports);
|
|
34
34
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
35
35
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
36
36
|
var import_node_process = __toESM(require("node:process"));
|
|
@@ -245,9 +245,11 @@ var require_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
245
245
|
});
|
|
246
246
|
var base_exports = {};
|
|
247
247
|
(0, import_chunk_4VNS5WPM.__export)(base_exports, {
|
|
248
|
+
ConEmu: () => ConEmu,
|
|
248
249
|
beep: () => beep,
|
|
249
250
|
clearScreen: () => clearScreen,
|
|
250
251
|
clearTerminal: () => clearTerminal,
|
|
252
|
+
clearViewport: () => clearViewport,
|
|
251
253
|
cursorBackward: () => cursorBackward,
|
|
252
254
|
cursorDown: () => cursorDown,
|
|
253
255
|
cursorForward: () => cursorForward,
|
|
@@ -275,7 +277,8 @@ var base_exports = {};
|
|
|
275
277
|
image: () => image,
|
|
276
278
|
link: () => link,
|
|
277
279
|
scrollDown: () => scrollDown,
|
|
278
|
-
scrollUp: () => scrollUp
|
|
280
|
+
scrollUp: () => scrollUp,
|
|
281
|
+
setCwd: () => setCwd
|
|
279
282
|
});
|
|
280
283
|
var isBrowser = globalThis.window?.document !== void 0;
|
|
281
284
|
var isNode = globalThis.process?.versions?.node !== void 0;
|
|
@@ -359,6 +362,7 @@ var eraseScreen = ESC + "2J";
|
|
|
359
362
|
var scrollUp = ESC + "S";
|
|
360
363
|
var scrollDown = ESC + "T";
|
|
361
364
|
var clearScreen = "\x1Bc";
|
|
365
|
+
var clearViewport = `${eraseScreen}${ESC}H`;
|
|
362
366
|
var clearTerminal = isWindows2 ? `${eraseScreen}${ESC}0f` : `${eraseScreen}${ESC}3J${ESC}H`;
|
|
363
367
|
var enterAlternativeScreen = ESC + "?1049h";
|
|
364
368
|
var exitAlternativeScreen = ESC + "?1049l";
|
|
@@ -388,7 +392,8 @@ var image = (data, options = {}) => {
|
|
|
388
392
|
if (options.preserveAspectRatio === false) {
|
|
389
393
|
returnValue += ";preserveAspectRatio=0";
|
|
390
394
|
}
|
|
391
|
-
|
|
395
|
+
const imageBuffer = Buffer.from(data);
|
|
396
|
+
return returnValue + `;size=${imageBuffer.byteLength}:` + imageBuffer.toString("base64") + BEL;
|
|
392
397
|
};
|
|
393
398
|
var iTerm = {
|
|
394
399
|
setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
@@ -409,6 +414,10 @@ var iTerm = {
|
|
|
409
414
|
return returnValue + BEL;
|
|
410
415
|
}
|
|
411
416
|
};
|
|
417
|
+
var ConEmu = {
|
|
418
|
+
setCwd: (cwd = cwdFunction()) => `${OSC}9;9;${cwd}${BEL}`
|
|
419
|
+
};
|
|
420
|
+
var setCwd = (cwd = cwdFunction()) => iTerm.setCwd(cwd) + ConEmu.setCwd(cwd);
|
|
412
421
|
var import_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__toESM)(require_supports_hyperlinks(), 1);
|
|
413
422
|
function terminalLink(text, url, { target = "stdout", ...options } = {}) {
|
|
414
423
|
if (!import_supports_hyperlinks.default[target]) {
|
|
@@ -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_3ZWEK4N6_exports = {};
|
|
30
|
+
__export(chunk_3ZWEK4N6_exports, {
|
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
|
33
33
|
schemaEngineWasmVersion: () => schemaEngineWasmVersion,
|
|
34
34
|
wasm_exports: () => wasm_exports
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_3ZWEK4N6_exports);
|
|
37
|
+
var import_chunk_B2BNIZB2 = require("./chunk-B2BNIZB2.js");
|
|
38
38
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
|
39
39
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
40
40
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
|
@@ -46,6 +46,6 @@ var wasm_exports = {};
|
|
|
46
46
|
});
|
|
47
47
|
var globalWithPanicRegistry = globalThis;
|
|
48
48
|
globalWithPanicRegistry.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
|
49
|
-
var { dependencies } = (0,
|
|
49
|
+
var { dependencies } = (0, import_chunk_B2BNIZB2.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -16,21 +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_5I4ERIIY_exports = {};
|
|
20
|
+
__export(chunk_5I4ERIIY_exports, {
|
|
21
21
|
binaryTypeToEngineType: () => binaryTypeToEngineType
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_5I4ERIIY_exports);
|
|
24
24
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
25
25
|
function binaryTypeToEngineType(binaryType) {
|
|
26
26
|
if (binaryType === import_fetch_engine.BinaryType.SchemaEngineBinary) {
|
|
27
27
|
return "schemaEngine";
|
|
28
28
|
}
|
|
29
|
-
if (binaryType === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
30
|
-
return "libqueryEngine";
|
|
31
|
-
}
|
|
32
|
-
if (binaryType === import_fetch_engine.BinaryType.QueryEngineBinary) {
|
|
33
|
-
return "queryEngine";
|
|
34
|
-
}
|
|
35
29
|
throw new Error(`Could not convert binary type ${binaryType}`);
|
|
36
30
|
}
|
|
@@ -26,21 +26,21 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_5MHUYAV3_exports = {};
|
|
30
|
+
__export(chunk_5MHUYAV3_exports, {
|
|
31
31
|
getBinaryPathsByVersion: () => getBinaryPathsByVersion
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_5MHUYAV3_exports);
|
|
34
|
+
var import_chunk_5I4ERIIY = require("./chunk-5I4ERIIY.js");
|
|
35
|
+
var import_chunk_GJSFP4V4 = require("./chunk-GJSFP4V4.js");
|
|
36
36
|
var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
|
|
37
37
|
var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_FF7OLLBP = require("./chunk-FF7OLLBP.js");
|
|
39
39
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
40
40
|
var import_engines = require("@prisma/engines");
|
|
41
41
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
42
42
|
var import_path = __toESM2(require("path"));
|
|
43
|
-
var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
43
|
+
var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_FF7OLLBP.require_lib)());
|
|
44
44
|
async function getBinaryPathsByVersion({
|
|
45
45
|
neededVersions,
|
|
46
46
|
detectBinaryTarget,
|
|
@@ -91,7 +91,7 @@ async function getBinaryPathsByVersion({
|
|
|
91
91
|
}
|
|
92
92
|
const binariesConfig = neededVersion.engines.reduce((acc, curr) => {
|
|
93
93
|
if (!binaryPathsOverride?.[curr]) {
|
|
94
|
-
acc[(0,
|
|
94
|
+
acc[(0, import_chunk_GJSFP4V4.engineTypeToBinaryType)(curr)] = binaryTargetBaseDir;
|
|
95
95
|
}
|
|
96
96
|
return acc;
|
|
97
97
|
}, /* @__PURE__ */ Object.create(null));
|
|
@@ -107,7 +107,7 @@ async function getBinaryPathsByVersion({
|
|
|
107
107
|
skipDownload
|
|
108
108
|
};
|
|
109
109
|
const binaryPathsWithEngineType = await (0, import_fetch_engine.download)(downloadParams);
|
|
110
|
-
const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType,
|
|
110
|
+
const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType, import_chunk_5I4ERIIY.binaryTypeToEngineType);
|
|
111
111
|
binaryPathsByVersion[currentVersion] = binaryPaths;
|
|
112
112
|
}
|
|
113
113
|
if (binaryPathsOverride) {
|
|
@@ -16,20 +16,20 @@ 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_5SJXW6MS_exports = {};
|
|
20
|
+
__export(chunk_5SJXW6MS_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(
|
|
28
|
-
var
|
|
27
|
+
module.exports = __toCommonJS(chunk_5SJXW6MS_exports);
|
|
28
|
+
var import_chunk_VITPVRRI = require("./chunk-VITPVRRI.js");
|
|
29
29
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
30
30
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
31
31
|
function lintSchema({ schemas }) {
|
|
32
|
-
const lintResult =
|
|
32
|
+
const lintResult = import_chunk_VITPVRRI.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -16,15 +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_5W3BSMTH_exports = {};
|
|
20
|
+
__export(chunk_5W3BSMTH_exports, {
|
|
21
21
|
serializeQueryEngineName: () => serializeQueryEngineName
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_5W3BSMTH_exports);
|
|
24
24
|
function serializeQueryEngineName(message) {
|
|
25
25
|
const normalizedName = "query-engine-NORMALIZED";
|
|
26
|
-
if (process.env.PRISMA_CLI_QUERY_ENGINE_TYPE === "binary") {
|
|
27
|
-
return message.replace(/query-engine binary/g, normalizedName);
|
|
28
|
-
}
|
|
29
26
|
return message.replace(/query-engine-node-api library/g, normalizedName);
|
|
30
27
|
}
|
|
@@ -26,49 +26,44 @@ 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_5ZSVGCMS_exports = {};
|
|
30
|
+
__export(chunk_5ZSVGCMS_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
|
-
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
|
33
|
-
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
|
34
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
35
33
|
formatSchema: () => formatSchema,
|
|
36
34
|
getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
|
|
37
35
|
getGenerator: () => getGenerator,
|
|
38
36
|
getGenerators: () => getGenerators,
|
|
39
|
-
getNodeAPIName: () => import_get_platform2.getNodeAPIName,
|
|
40
37
|
knownBinaryTargets: () => knownBinaryTargets,
|
|
41
38
|
loadSchemaContext: () => loadSchemaContext,
|
|
42
39
|
processSchemaResult: () => processSchemaResult,
|
|
43
40
|
skipIndex: () => skipIndex
|
|
44
41
|
});
|
|
45
|
-
module.exports = __toCommonJS(
|
|
46
|
-
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
42
|
+
module.exports = __toCommonJS(chunk_5ZSVGCMS_exports);
|
|
47
43
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
49
|
-
var
|
|
50
|
-
var
|
|
45
|
+
var import_chunk_5MHUYAV3 = require("./chunk-5MHUYAV3.js");
|
|
46
|
+
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
51
47
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
52
48
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
49
|
+
var import_chunk_MYLPCGTT = require("./chunk-MYLPCGTT.js");
|
|
50
|
+
var import_chunk_TGA7DC5A = require("./chunk-TGA7DC5A.js");
|
|
51
|
+
var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
|
|
57
52
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
53
|
+
var import_chunk_5SJXW6MS = require("./chunk-5SJXW6MS.js");
|
|
54
|
+
var import_chunk_WKOGDEF4 = require("./chunk-WKOGDEF4.js");
|
|
55
|
+
var import_chunk_QGQTFZOZ = require("./chunk-QGQTFZOZ.js");
|
|
56
|
+
var import_chunk_RVTU2FIM = require("./chunk-RVTU2FIM.js");
|
|
57
|
+
var import_chunk_VITPVRRI = require("./chunk-VITPVRRI.js");
|
|
58
|
+
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
65
59
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
66
60
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
67
61
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
68
62
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
69
63
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
64
|
+
var import_chunk_QSVWJ2S2 = require("./chunk-QSVWJ2S2.js");
|
|
65
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
70
66
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
71
|
-
var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
|
|
72
67
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
73
68
|
var import_path = __toESM(require("path"));
|
|
74
69
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -77,32 +72,11 @@ var import_engines = require("@prisma/engines");
|
|
|
77
72
|
var import_get_platform = require("@prisma/get-platform");
|
|
78
73
|
var import_path2 = __toESM(require("path"));
|
|
79
74
|
var import_get_platform2 = require("@prisma/get-platform");
|
|
80
|
-
var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
|
|
81
|
-
Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
|
|
82
|
-
defining an ${(0, import_chunk_PG5FDKSF.green)(`adapter`)} in Prisma config file (e.g., ${(0, import_chunk_PG5FDKSF.green)(`\`prisma.config.ts\``)}).
|
|
83
|
-
|
|
84
|
-
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/schema-engine-limitations")}
|
|
85
|
-
`;
|
|
86
|
-
function checkUnsupportedSchemaEngineWasm({
|
|
87
|
-
cmd,
|
|
88
|
-
config,
|
|
89
|
-
args,
|
|
90
|
-
flags
|
|
91
|
-
}) {
|
|
92
|
-
if (config.engine !== "js") {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
for (const flag of flags) {
|
|
96
|
-
if (args[flag] !== void 0) {
|
|
97
|
-
throw new Error(forbiddenCmdFlagWithSchemaEngineWasm({ cmd, flag }));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
75
|
var debug = (0, import_debug.default)("prisma:format");
|
|
102
76
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
103
77
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
104
78
|
handleFormatPanic(() => {
|
|
105
|
-
|
|
79
|
+
import_chunk_VITPVRRI.prismaSchemaWasm.debug_panic();
|
|
106
80
|
});
|
|
107
81
|
}
|
|
108
82
|
const defaultFormattingOptions = {
|
|
@@ -119,10 +93,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
119
93
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
120
94
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
121
95
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
122
|
-
const lintDiagnostics2 = (0,
|
|
96
|
+
const lintDiagnostics2 = (0, import_chunk_5SJXW6MS.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
123
97
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
124
98
|
});
|
|
125
|
-
const lintWarnings = (0,
|
|
99
|
+
const lintWarnings = (0, import_chunk_5SJXW6MS.getLintWarningsAsText)(lintDiagnostics);
|
|
126
100
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
127
101
|
console.warn(lintWarnings);
|
|
128
102
|
}
|
|
@@ -149,7 +123,7 @@ function handleFormatPanic(tryCb) {
|
|
|
149
123
|
}
|
|
150
124
|
}
|
|
151
125
|
function formatWasm(schema, documentFormattingParams) {
|
|
152
|
-
const formattedSchema =
|
|
126
|
+
const formattedSchema = import_chunk_VITPVRRI.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
153
127
|
return formattedSchema;
|
|
154
128
|
}
|
|
155
129
|
async function loadSchemaContext({
|
|
@@ -157,48 +131,46 @@ async function loadSchemaContext({
|
|
|
157
131
|
schemaPathFromConfig,
|
|
158
132
|
schemaEngineConfig,
|
|
159
133
|
printLoadMessage = true,
|
|
160
|
-
ignoreEnvVarErrors = false,
|
|
161
134
|
allowNull = false,
|
|
162
135
|
schemaPathArgumentName = "--schema",
|
|
163
136
|
cwd = process.cwd()
|
|
164
137
|
} = {}) {
|
|
165
138
|
let schemaResult = null;
|
|
166
139
|
if (allowNull) {
|
|
167
|
-
schemaResult = await (0,
|
|
140
|
+
schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
|
|
168
141
|
argumentName: schemaPathArgumentName,
|
|
169
142
|
cwd
|
|
170
143
|
});
|
|
171
144
|
if (!schemaResult) return null;
|
|
172
145
|
} else {
|
|
173
|
-
schemaResult = await (0,
|
|
146
|
+
schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
|
|
174
147
|
argumentName: schemaPathArgumentName,
|
|
175
148
|
cwd
|
|
176
149
|
});
|
|
177
150
|
}
|
|
178
|
-
return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage,
|
|
151
|
+
return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, cwd });
|
|
179
152
|
}
|
|
180
153
|
async function processSchemaResult({
|
|
181
154
|
schemaResult,
|
|
182
155
|
schemaEngineConfig,
|
|
183
156
|
printLoadMessage = true,
|
|
184
|
-
ignoreEnvVarErrors = false,
|
|
185
157
|
cwd = process.cwd()
|
|
186
158
|
}) {
|
|
187
159
|
const loadedFromPathForLogMessages = import_path.default.relative(cwd, schemaResult.schemaPath);
|
|
188
160
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
189
161
|
if (printLoadMessage) {
|
|
190
|
-
(0,
|
|
162
|
+
(0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
191
163
|
}
|
|
192
|
-
const configFromPsl = await (0,
|
|
164
|
+
const configFromPsl = await (0, import_chunk_QGQTFZOZ.getConfig)({ datamodel: schemaResult.schemas });
|
|
193
165
|
const datasourceFromPsl = configFromPsl.datasources.at(0);
|
|
194
|
-
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with(
|
|
166
|
+
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with(import_chunk_XKZ6CBLA.N.not(import_chunk_XKZ6CBLA.N.nullish), ({ datasource }) => {
|
|
195
167
|
const { url, directUrl, shadowDatabaseUrl } = datasource;
|
|
196
168
|
const primaryDatasource2 = {
|
|
197
169
|
...datasourceFromPsl,
|
|
198
170
|
url: { fromEnvVar: null, value: url },
|
|
199
171
|
directUrl: directUrl ? { fromEnvVar: null, value: directUrl } : void 0,
|
|
200
172
|
shadowDatabaseUrl: shadowDatabaseUrl ? { fromEnvVar: null, value: shadowDatabaseUrl } : void 0,
|
|
201
|
-
[Symbol.for("
|
|
173
|
+
[Symbol.for("config.datasource")]: true
|
|
202
174
|
};
|
|
203
175
|
return primaryDatasource2;
|
|
204
176
|
}).otherwise(() => datasourceFromPsl);
|
|
@@ -222,7 +194,7 @@ function getPrimaryDatasourceDirectory(primaryDatasource) {
|
|
|
222
194
|
}
|
|
223
195
|
return null;
|
|
224
196
|
}
|
|
225
|
-
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
197
|
+
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_QSVWJ2S2.require_p_map)());
|
|
226
198
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
227
199
|
async function getGenerators(options) {
|
|
228
200
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -247,28 +219,27 @@ async function getGenerators(options) {
|
|
|
247
219
|
binaryPathsOverride,
|
|
248
220
|
generatorNames = [],
|
|
249
221
|
postinstall,
|
|
250
|
-
noEngine,
|
|
251
222
|
allowNoModels = true,
|
|
252
223
|
typedSql
|
|
253
224
|
} = options;
|
|
254
|
-
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath
|
|
225
|
+
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath }) : options.schemaContext;
|
|
255
226
|
if (!schemaContext) {
|
|
256
227
|
throw new Error(`no schema provided for getGenerators`);
|
|
257
228
|
}
|
|
258
229
|
if (!schemaContext.primaryDatasource) {
|
|
259
|
-
throw new Error(
|
|
230
|
+
throw new Error(import_chunk_MYLPCGTT.missingDatasource);
|
|
260
231
|
}
|
|
261
232
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
262
233
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
263
|
-
const dmmf = await (0,
|
|
234
|
+
const dmmf = await (0, import_chunk_RVTU2FIM.getDMMF)({
|
|
264
235
|
datamodel: schemaContext.schemaFiles,
|
|
265
236
|
previewFeatures
|
|
266
237
|
});
|
|
267
238
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
268
239
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
269
|
-
throw new Error(
|
|
240
|
+
throw new Error(import_chunk_TGA7DC5A.missingModelMessageMongoDB);
|
|
270
241
|
}
|
|
271
|
-
throw new Error(
|
|
242
|
+
throw new Error(import_chunk_TGA7DC5A.missingModelMessage);
|
|
272
243
|
}
|
|
273
244
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
274
245
|
await validateGenerators(generatorConfigs);
|
|
@@ -311,8 +282,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
311
282
|
fromEnvVar: null
|
|
312
283
|
};
|
|
313
284
|
}
|
|
314
|
-
const datamodel = (0,
|
|
315
|
-
const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
|
285
|
+
const datamodel = (0, import_chunk_WKOGDEF4.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
316
286
|
const options2 = {
|
|
317
287
|
datamodel,
|
|
318
288
|
datasources: schemaContext.datasources,
|
|
@@ -324,9 +294,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
324
294
|
version: version2 || import_engines.enginesVersion,
|
|
325
295
|
// this version makes no sense anymore and should be ignored
|
|
326
296
|
postinstall,
|
|
327
|
-
noEngine,
|
|
328
297
|
allowNoModels,
|
|
329
|
-
envPaths,
|
|
330
298
|
typedSql
|
|
331
299
|
};
|
|
332
300
|
generatorInstance.setOptions(options2);
|
|
@@ -370,18 +338,16 @@ generator gen {
|
|
|
370
338
|
}
|
|
371
339
|
const generatorBinaryTargets = g.options?.generator?.binaryTargets;
|
|
372
340
|
if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
|
|
373
|
-
for (const
|
|
374
|
-
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value ===
|
|
375
|
-
neededVersions[neededVersion].binaryTargets.push(
|
|
341
|
+
for (const binaryTarget of generatorBinaryTargets) {
|
|
342
|
+
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget.value)) {
|
|
343
|
+
neededVersions[neededVersion].binaryTargets.push(binaryTarget);
|
|
376
344
|
}
|
|
377
345
|
}
|
|
378
346
|
}
|
|
379
347
|
}
|
|
380
348
|
}
|
|
381
|
-
const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
|
|
382
|
-
const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
|
|
383
349
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
384
|
-
const { binaryPathsByVersion
|
|
350
|
+
const { binaryPathsByVersion } = await (0, import_chunk_5MHUYAV3.getBinaryPathsByVersion)({
|
|
385
351
|
neededVersions,
|
|
386
352
|
// We're lazily computing the binary target here, to avoid printing the
|
|
387
353
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -402,17 +368,6 @@ generator gen {
|
|
|
402
368
|
const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
|
|
403
369
|
debug2({ generatorBinaryPaths });
|
|
404
370
|
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_LV27YCGC.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
|
-
}
|
|
416
371
|
}
|
|
417
372
|
}
|
|
418
373
|
return generators;
|
|
@@ -437,17 +392,6 @@ var oldToNewBinaryTargetsMapping = {
|
|
|
437
392
|
async function validateGenerators(generators) {
|
|
438
393
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
439
394
|
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
|
-
}
|
|
451
395
|
if (generator.binaryTargets) {
|
|
452
396
|
const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
|
|
453
397
|
const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
|
|
@@ -511,7 +455,7 @@ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
|
511
455
|
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${command}`)} yet.
|
|
512
456
|
Please use a direct connection to your database via the datasource \`directUrl\` setting.
|
|
513
457
|
|
|
514
|
-
More information about this limitation: ${(0,
|
|
458
|
+
More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/accelerate-limitations")}
|
|
515
459
|
`;
|
|
516
460
|
function checkUnsupportedDataProxy({
|
|
517
461
|
cmd,
|
|
@@ -524,7 +468,7 @@ function checkUnsupportedDataProxy({
|
|
|
524
468
|
}
|
|
525
469
|
}
|
|
526
470
|
if (!schemaContext?.primaryDatasource) return;
|
|
527
|
-
const url = (0,
|
|
471
|
+
const url = (0, import_chunk_QGQTFZOZ.resolveUrl)((0, import_chunk_QGQTFZOZ.getEffectiveUrl)(schemaContext.primaryDatasource));
|
|
528
472
|
if (url?.startsWith("prisma://")) {
|
|
529
473
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
530
474
|
}
|