@prisma/internals 6.19.0-integration-next.16 → 6.19.0-integration-feat-remove-library-engine.5
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-2ONERNWE.js → chunk-2KREE2OX.js} +5 -5
- package/dist/{chunk-JOIIWB3U.js → chunk-2LOGW45F.js} +68 -33
- package/dist/{chunk-RXUFT5US.js → chunk-2THJ6XVV.js} +12 -12
- package/dist/{chunk-BVJP43JS.js → chunk-32LLAKF4.js} +13 -784
- package/dist/{chunk-INJO27TY.js → chunk-33FYCEWF.js} +13 -13
- package/dist/{chunk-5NV3W7KM.js → chunk-3CAPLXKF.js} +5 -8
- package/dist/{chunk-I6WLABB2.js → chunk-3WXUQZS7.js} +14 -5
- package/dist/{chunk-63H7LVQK.js → chunk-4AHWN4VZ.js} +5 -5
- package/dist/{chunk-5FUXDJAN.js → chunk-4YDN7W7B.js} +7 -16
- package/dist/{chunk-3GU5WOTV.js → chunk-4ZYCASUI.js} +5 -5
- package/dist/{chunk-SVPXYUIM.js → chunk-5B5U2HVK.js} +4 -4
- package/dist/{chunk-B22EOFPW.js → chunk-5I4ERIIY.js} +3 -6
- package/dist/{chunk-5XFNC2RY.js → chunk-5MHUYAV3.js} +9 -9
- package/dist/{chunk-SIMRXUXR.js → chunk-6FP5PMMX.js} +5 -5
- package/dist/{chunk-CAACRLTC.js → chunk-6QTJ35DP.js} +12 -12
- package/dist/{chunk-XQFPAFQE.js → chunk-7PEHIVPK.js} +5 -5
- package/dist/{chunk-GSH4BXBI.js → chunk-BUQN4WLU.js} +6 -6
- package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
- package/dist/{chunk-HL6M6I6N.js → chunk-DOO45FN6.js} +7 -7
- package/dist/chunk-DYV47NUW.js +796 -0
- package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
- package/dist/{chunk-R3RVIOOH.js → chunk-FP5T5YD3.js} +5 -5
- package/dist/{chunk-VRGMXDRD.js → chunk-GJSFP4V4.js} +3 -6
- package/dist/{chunk-25QIR2OA.js → chunk-HBU4ZVCA.js} +11 -11
- package/dist/{chunk-FMYHDVAC.js → chunk-HQE53CGA.js} +11 -11
- package/dist/{chunk-SYOFVVNN.js → chunk-IHC4ZVPQ.js} +5 -5
- package/dist/{chunk-D4VDA2TZ.js → chunk-IRWX4FCC.js} +6 -6
- package/dist/{chunk-BLBFB7XV.js → chunk-IU77SCOB.js} +7 -7
- package/dist/{chunk-6GH4RAXF.js → chunk-JGAJWFOG.js} +5 -5
- package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
- package/dist/{chunk-XCUYCN3Z.js → chunk-KZ5SMOBR.js} +5 -5
- package/dist/{chunk-AX5N26KG.js → chunk-L2CX3ZWZ.js} +6 -6
- package/dist/{chunk-6OLUZD6G.js → chunk-LQA25XWD.js} +13 -13
- package/dist/{chunk-A7LJSXBL.js → chunk-M6PZRD57.js} +32 -47
- package/dist/{chunk-I6IIL2R7.js → chunk-MEBZK5AR.js} +5 -5
- package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
- package/dist/{chunk-MH5DW7MH.js → chunk-MK4IWFSR.js} +11 -11
- package/dist/{chunk-TQFONRJP.js → chunk-MXAUURHG.js} +5 -5
- package/dist/{chunk-7QC5VORA.js → chunk-MYLPCGTT.js} +5 -5
- package/dist/{chunk-NDSHLEAN.js → chunk-PSACKRZB.js} +11 -11
- package/dist/{chunk-75BIJ5PX.js → chunk-UB2X7DGZ.js} +9 -9
- package/dist/{chunk-HC7ALJJ2.js → chunk-WC5A3H4V.js} +32 -47
- package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
- package/dist/cli/checkUnsupportedDataProxy.js +46 -48
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +46 -48
- package/dist/cli/schemaContext.js +46 -48
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +45 -47
- package/dist/engine-commands/getConfig.js +12 -12
- package/dist/engine-commands/getDmmf.js +9 -9
- package/dist/engine-commands/getEngineVersion.js +6 -9
- package/dist/engine-commands/getEnginesInfo.js +7 -9
- package/dist/engine-commands/index.js +57 -59
- 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/errorReporting.js +6 -6
- package/dist/get-generators/getGenerators.js +48 -50
- 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 -4
- package/dist/index.js +83 -90
- 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/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/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/wasm.js +5 -5
- package/package.json +12 -12
- package/dist/chunk-6TTRTZXU.js +0 -37
- package/dist/chunk-DZYINYAA.js +0 -68
- package/dist/chunk-FUYRCYVL.js +0 -53
- package/dist/client/getClientEngineType.d.ts +0 -6
- package/dist/client/getClientEngineType.js +0 -26
- 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
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_KZ5SMOBR_exports = {};
|
|
20
|
+
__export(chunk_KZ5SMOBR_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_KZ5SMOBR_exports);
|
|
24
|
+
var import_chunk_5B5U2HVK = require("./chunk-5B5U2HVK.js");
|
|
25
|
+
var packageJson = (0, import_chunk_5B5U2HVK.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -16,14 +16,14 @@ 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_L2CX3ZWZ_exports = {};
|
|
20
|
+
__export(chunk_L2CX3ZWZ_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_L2CX3ZWZ_exports);
|
|
26
|
+
var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.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 = `
|
|
@@ -52,7 +52,7 @@ ${(0, import_chunk_PG5FDKSF.bold)(
|
|
|
52
52
|
)}
|
|
53
53
|
|
|
54
54
|
More information in our documentation:
|
|
55
|
-
${(0,
|
|
55
|
+
${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
|
|
56
56
|
`;
|
|
57
57
|
var missingModelMessageMongoDB = `
|
|
58
58
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
|
@@ -69,5 +69,5 @@ ${(0, import_chunk_PG5FDKSF.bold)(
|
|
|
69
69
|
)}
|
|
70
70
|
|
|
71
71
|
More information in our documentation:
|
|
72
|
-
${(0,
|
|
72
|
+
${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
|
|
73
73
|
`;
|
|
@@ -26,20 +26,20 @@ 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_LQA25XWD_exports = {};
|
|
30
|
+
__export(chunk_LQA25XWD_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig,
|
|
33
33
|
getDirectUrl: () => getDirectUrl,
|
|
34
34
|
getEffectiveUrl: () => getEffectiveUrl,
|
|
35
35
|
resolveUrl: () => resolveUrl
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
38
|
-
var
|
|
39
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
|
+
module.exports = __toCommonJS(chunk_LQA25XWD_exports);
|
|
38
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
40
39
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
40
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
41
|
+
var import_chunk_4AHWN4VZ = require("./chunk-4AHWN4VZ.js");
|
|
42
|
+
var import_chunk_FP5T5YD3 = require("./chunk-FP5T5YD3.js");
|
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
44
44
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
45
45
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
|
|
|
64
64
|
}).exhaustive();
|
|
65
65
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
66
66
|
[Context: getConfig]`;
|
|
67
|
-
super((0,
|
|
67
|
+
super((0, import_chunk_4AHWN4VZ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
68
68
|
this.name = "GetConfigError";
|
|
69
69
|
}
|
|
70
70
|
};
|
|
@@ -82,17 +82,17 @@ function resolveUrl(envValue) {
|
|
|
82
82
|
return urlFromValue ?? urlEnvVarValue;
|
|
83
83
|
}
|
|
84
84
|
async function getConfig(options) {
|
|
85
|
-
const debugErrorType = (0,
|
|
85
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
|
|
86
86
|
debug(`Using getConfig Wasm`);
|
|
87
87
|
const configEither = (0, import_function.pipe)(
|
|
88
88
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
89
89
|
() => {
|
|
90
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
|
91
91
|
debug("Triggering a Rust panic...");
|
|
92
|
-
|
|
92
|
+
import_chunk_FP5T5YD3.prismaSchemaWasm.debug_panic();
|
|
93
93
|
}
|
|
94
94
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
95
|
-
return
|
|
95
|
+
return import_chunk_FP5T5YD3.prismaSchemaWasm.get_config(params);
|
|
96
96
|
},
|
|
97
97
|
(e) => ({
|
|
98
98
|
type: "wasm-error",
|
|
@@ -150,12 +150,12 @@ async function getConfig(options) {
|
|
|
150
150
|
return panic;
|
|
151
151
|
}
|
|
152
152
|
const errorOutput = e.error.message;
|
|
153
|
-
return new GetConfigError((0,
|
|
153
|
+
return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
154
154
|
}).with({ type: "validation-error" }, (e) => {
|
|
155
155
|
return new GetConfigError({
|
|
156
156
|
_tag: "parsed",
|
|
157
157
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
158
|
-
reason: (0,
|
|
158
|
+
reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
|
|
159
159
|
message: formatErrors(e.error)
|
|
160
160
|
});
|
|
161
161
|
}).otherwise((e) => {
|
|
@@ -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_M6PZRD57_exports = {};
|
|
30
|
+
__export(chunk_M6PZRD57_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
|
33
33
|
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
|
@@ -36,37 +36,34 @@ __export(chunk_A7LJSXBL_exports, {
|
|
|
36
36
|
getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
|
|
37
37
|
getGenerator: () => getGenerator,
|
|
38
38
|
getGenerators: () => getGenerators,
|
|
39
|
-
getNodeAPIName: () => import_get_platform2.getNodeAPIName,
|
|
40
39
|
knownBinaryTargets: () => knownBinaryTargets,
|
|
41
40
|
loadSchemaContext: () => loadSchemaContext,
|
|
42
41
|
processSchemaResult: () => processSchemaResult,
|
|
43
42
|
skipIndex: () => skipIndex
|
|
44
43
|
});
|
|
45
|
-
module.exports = __toCommonJS(
|
|
46
|
-
var
|
|
47
|
-
var import_chunk_5XFNC2RY = require("./chunk-5XFNC2RY.js");
|
|
48
|
-
var import_chunk_B22EOFPW = require("./chunk-B22EOFPW.js");
|
|
44
|
+
module.exports = __toCommonJS(chunk_M6PZRD57_exports);
|
|
45
|
+
var import_chunk_5MHUYAV3 = require("./chunk-5MHUYAV3.js");
|
|
49
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
50
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
|
+
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
51
49
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
52
50
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
51
|
+
var import_chunk_MYLPCGTT = require("./chunk-MYLPCGTT.js");
|
|
52
|
+
var import_chunk_L2CX3ZWZ = require("./chunk-L2CX3ZWZ.js");
|
|
53
|
+
var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
|
|
56
54
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
55
|
+
var import_chunk_HBU4ZVCA = require("./chunk-HBU4ZVCA.js");
|
|
56
|
+
var import_chunk_6FP5PMMX = require("./chunk-6FP5PMMX.js");
|
|
57
|
+
var import_chunk_HQE53CGA = require("./chunk-HQE53CGA.js");
|
|
58
|
+
var import_chunk_33FYCEWF = require("./chunk-33FYCEWF.js");
|
|
59
|
+
var import_chunk_MEBZK5AR = require("./chunk-MEBZK5AR.js");
|
|
62
60
|
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
63
61
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
64
|
-
var import_chunk_5NV3W7KM = require("./chunk-5NV3W7KM.js");
|
|
65
62
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
66
63
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
67
64
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
68
65
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
69
|
-
var
|
|
66
|
+
var import_chunk_32LLAKF4 = require("./chunk-32LLAKF4.js");
|
|
70
67
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
71
68
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
72
69
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -81,7 +78,7 @@ var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
|
|
|
81
78
|
Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
|
|
82
79
|
defining an ${(0, import_chunk_PG5FDKSF.green)(`adapter`)} in Prisma config file (e.g., ${(0, import_chunk_PG5FDKSF.green)(`\`prisma.config.ts\``)}).
|
|
83
80
|
|
|
84
|
-
More information about this limitation: ${(0,
|
|
81
|
+
More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/schema-engine-limitations")}
|
|
85
82
|
`;
|
|
86
83
|
function checkUnsupportedSchemaEngineWasm({
|
|
87
84
|
cmd,
|
|
@@ -102,7 +99,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
102
99
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
103
100
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
104
101
|
handleFormatPanic(() => {
|
|
105
|
-
|
|
102
|
+
import_chunk_MEBZK5AR.prismaSchemaWasm.debug_panic();
|
|
106
103
|
});
|
|
107
104
|
}
|
|
108
105
|
const defaultFormattingOptions = {
|
|
@@ -119,10 +116,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
119
116
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
120
117
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
121
118
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
122
|
-
const lintDiagnostics2 = (0,
|
|
119
|
+
const lintDiagnostics2 = (0, import_chunk_6FP5PMMX.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
123
120
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
124
121
|
});
|
|
125
|
-
const lintWarnings = (0,
|
|
122
|
+
const lintWarnings = (0, import_chunk_6FP5PMMX.getLintWarningsAsText)(lintDiagnostics);
|
|
126
123
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
127
124
|
console.warn(lintWarnings);
|
|
128
125
|
}
|
|
@@ -149,7 +146,7 @@ function handleFormatPanic(tryCb) {
|
|
|
149
146
|
}
|
|
150
147
|
}
|
|
151
148
|
function formatWasm(schema, documentFormattingParams) {
|
|
152
|
-
const formattedSchema =
|
|
149
|
+
const formattedSchema = import_chunk_MEBZK5AR.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
153
150
|
return formattedSchema;
|
|
154
151
|
}
|
|
155
152
|
async function loadSchemaContext({
|
|
@@ -187,7 +184,7 @@ async function processSchemaResult({
|
|
|
187
184
|
if (printLoadMessage) {
|
|
188
185
|
(0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
189
186
|
}
|
|
190
|
-
const configFromPsl = await (0,
|
|
187
|
+
const configFromPsl = await (0, import_chunk_33FYCEWF.getConfig)({ datamodel: schemaResult.schemas });
|
|
191
188
|
const datasourceFromPsl = configFromPsl.datasources.at(0);
|
|
192
189
|
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
|
|
193
190
|
const { url, directUrl, shadowDatabaseUrl } = datasource;
|
|
@@ -220,7 +217,7 @@ function getPrimaryDatasourceDirectory(primaryDatasource) {
|
|
|
220
217
|
}
|
|
221
218
|
return null;
|
|
222
219
|
}
|
|
223
|
-
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
220
|
+
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_32LLAKF4.require_p_map)());
|
|
224
221
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
225
222
|
async function getGenerators(options) {
|
|
226
223
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -253,19 +250,19 @@ async function getGenerators(options) {
|
|
|
253
250
|
throw new Error(`no schema provided for getGenerators`);
|
|
254
251
|
}
|
|
255
252
|
if (!schemaContext.primaryDatasource) {
|
|
256
|
-
throw new Error(
|
|
253
|
+
throw new Error(import_chunk_MYLPCGTT.missingDatasource);
|
|
257
254
|
}
|
|
258
255
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
259
256
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
260
|
-
const dmmf = await (0,
|
|
257
|
+
const dmmf = await (0, import_chunk_HBU4ZVCA.getDMMF)({
|
|
261
258
|
datamodel: schemaContext.schemaFiles,
|
|
262
259
|
previewFeatures
|
|
263
260
|
});
|
|
264
261
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
265
262
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
266
|
-
throw new Error(
|
|
263
|
+
throw new Error(import_chunk_L2CX3ZWZ.missingModelMessageMongoDB);
|
|
267
264
|
}
|
|
268
|
-
throw new Error(
|
|
265
|
+
throw new Error(import_chunk_L2CX3ZWZ.missingModelMessage);
|
|
269
266
|
}
|
|
270
267
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
271
268
|
await validateGenerators(generatorConfigs);
|
|
@@ -308,7 +305,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
308
305
|
fromEnvVar: null
|
|
309
306
|
};
|
|
310
307
|
}
|
|
311
|
-
const datamodel = (0,
|
|
308
|
+
const datamodel = (0, import_chunk_HQE53CGA.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
312
309
|
const options2 = {
|
|
313
310
|
datamodel,
|
|
314
311
|
datasources: schemaContext.datasources,
|
|
@@ -364,17 +361,16 @@ generator gen {
|
|
|
364
361
|
}
|
|
365
362
|
const generatorBinaryTargets = g.options?.generator?.binaryTargets;
|
|
366
363
|
if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
|
|
367
|
-
for (const
|
|
368
|
-
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value ===
|
|
369
|
-
neededVersions[neededVersion].binaryTargets.push(
|
|
364
|
+
for (const binaryTarget of generatorBinaryTargets) {
|
|
365
|
+
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget.value)) {
|
|
366
|
+
neededVersions[neededVersion].binaryTargets.push(binaryTarget);
|
|
370
367
|
}
|
|
371
368
|
}
|
|
372
369
|
}
|
|
373
370
|
}
|
|
374
371
|
}
|
|
375
|
-
const queryEngineType = (0, import_chunk_B22EOFPW.binaryTypeToEngineType)(import_chunk_5NV3W7KM.BinaryType.QueryEngineLibrary);
|
|
376
372
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
377
|
-
const { binaryPathsByVersion
|
|
373
|
+
const { binaryPathsByVersion } = await (0, import_chunk_5MHUYAV3.getBinaryPathsByVersion)({
|
|
378
374
|
neededVersions,
|
|
379
375
|
// We're lazily computing the binary target here, to avoid printing the
|
|
380
376
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -395,17 +391,6 @@ generator gen {
|
|
|
395
391
|
const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
|
|
396
392
|
debug2({ generatorBinaryPaths });
|
|
397
393
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
398
|
-
if (engineVersion !== version2 && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
399
|
-
const customDmmf = await (0, import_chunk_NDSHLEAN.getDMMF)({
|
|
400
|
-
datamodel: schemaContext.schemaFiles,
|
|
401
|
-
previewFeatures
|
|
402
|
-
});
|
|
403
|
-
const options2 = { ...generator.options, dmmf: customDmmf };
|
|
404
|
-
debug2("generator.manifest.prettyName", generator.manifest.prettyName);
|
|
405
|
-
debug2("options", options2);
|
|
406
|
-
debug2("options.generator.binaryTargets", options2.generator.binaryTargets);
|
|
407
|
-
generator.setOptions(options2);
|
|
408
|
-
}
|
|
409
394
|
}
|
|
410
395
|
}
|
|
411
396
|
return generators;
|
|
@@ -493,7 +478,7 @@ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
|
493
478
|
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${command}`)} yet.
|
|
494
479
|
Please use a direct connection to your database via the datasource \`directUrl\` setting.
|
|
495
480
|
|
|
496
|
-
More information about this limitation: ${(0,
|
|
481
|
+
More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/accelerate-limitations")}
|
|
497
482
|
`;
|
|
498
483
|
function checkUnsupportedDataProxy({
|
|
499
484
|
cmd,
|
|
@@ -506,7 +491,7 @@ function checkUnsupportedDataProxy({
|
|
|
506
491
|
}
|
|
507
492
|
}
|
|
508
493
|
if (!schemaContext?.primaryDatasource) return;
|
|
509
|
-
const url = (0,
|
|
494
|
+
const url = (0, import_chunk_33FYCEWF.resolveUrl)((0, import_chunk_33FYCEWF.getEffectiveUrl)(schemaContext.primaryDatasource));
|
|
510
495
|
if (url?.startsWith("prisma://")) {
|
|
511
496
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
512
497
|
}
|
|
@@ -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_MEBZK5AR_exports = {};
|
|
30
|
+
__export(chunk_MEBZK5AR_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_MEBZK5AR_exports);
|
|
37
|
+
var import_chunk_5B5U2HVK = require("./chunk-5B5U2HVK.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_5B5U2HVK.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -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_MEOOYUIZ_exports = {};
|
|
30
|
+
__export(chunk_MEOOYUIZ_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_MEOOYUIZ_exports);
|
|
37
|
+
var import_chunk_KNNTV7IN = require("./chunk-KNNTV7IN.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_KNNTV7IN.FormData) {
|
|
155
|
+
body = (0, import_chunk_KNNTV7IN.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_KNNTV7IN.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-UV3WZSWW.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_KNNTV7IN.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_KNNTV7IN.FormData) {
|
|
346
346
|
return `multipart/form-data; boundary=${request2[INTERNALS].boundary}`;
|
|
347
347
|
}
|
|
348
348
|
if (body && typeof body.getBoundary === "function") {
|
|
@@ -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_MK4IWFSR_exports = {};
|
|
30
|
+
__export(chunk_MK4IWFSR_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_MK4IWFSR_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_4AHWN4VZ = require("./chunk-4AHWN4VZ.js");
|
|
39
|
+
var import_chunk_FP5T5YD3 = require("./chunk-FP5T5YD3.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,12 +59,12 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_4AHWN4VZ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function mergeSchemas(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
68
68
|
debug(`Using mergeSchemas Wasm`);
|
|
69
69
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
|
|
|
72
72
|
const params = JSON.stringify({
|
|
73
73
|
schema: options.schemas
|
|
74
74
|
});
|
|
75
|
-
return
|
|
75
|
+
return import_chunk_FP5T5YD3.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
|
|
|
104
104
|
return panic;
|
|
105
105
|
}
|
|
106
106
|
const errorOutput = e.error.message;
|
|
107
|
-
return new MergeSchemasError((0,
|
|
107
|
+
return new MergeSchemasError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
108
108
|
}).exhaustive();
|
|
109
109
|
throw error;
|
|
110
110
|
}
|
|
@@ -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_MXAUURHG_exports = {};
|
|
30
|
+
__export(chunk_MXAUURHG_exports, {
|
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists,
|
|
32
32
|
fs_utils_exports: () => fs_utils_exports,
|
|
33
33
|
getFilesInDir: () => getFilesInDir,
|
|
@@ -36,9 +36,9 @@ __export(chunk_TQFONRJP_exports, {
|
|
|
36
36
|
removeEmptyDirs: () => removeEmptyDirs,
|
|
37
37
|
writeFile: () => writeFile
|
|
38
38
|
});
|
|
39
|
-
module.exports = __toCommonJS(
|
|
39
|
+
module.exports = __toCommonJS(chunk_MXAUURHG_exports);
|
|
40
40
|
var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_2LOGW45F = require("./chunk-2LOGW45F.js");
|
|
42
42
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
43
43
|
var import_promises = __toESM(require("fs/promises"));
|
|
44
44
|
var import_path = __toESM(require("path"));
|
|
@@ -51,7 +51,7 @@ var fs_utils_exports = {};
|
|
|
51
51
|
removeEmptyDirs: () => removeEmptyDirs,
|
|
52
52
|
writeFile: () => writeFile
|
|
53
53
|
});
|
|
54
|
-
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
54
|
+
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_2LOGW45F.require_globby)());
|
|
55
55
|
function createDirIfNotExists(dir) {
|
|
56
56
|
return import_promises.default.mkdir(dir, { recursive: true });
|
|
57
57
|
}
|
|
@@ -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_MYLPCGTT_exports = {};
|
|
20
|
+
__export(chunk_MYLPCGTT_exports, {
|
|
21
21
|
missingDatasource: () => missingDatasource
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_MYLPCGTT_exports);
|
|
24
|
+
var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.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_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
|
|
40
40
|
`;
|
|
@@ -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_PSACKRZB_exports = {};
|
|
30
|
+
__export(chunk_PSACKRZB_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_PSACKRZB_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_4AHWN4VZ = require("./chunk-4AHWN4VZ.js");
|
|
38
|
+
var import_chunk_FP5T5YD3 = require("./chunk-FP5T5YD3.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_4AHWN4VZ.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_FP5T5YD3.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_FP5T5YD3.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 });
|
|
@@ -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_UB2X7DGZ_exports = {};
|
|
30
|
+
__export(chunk_UB2X7DGZ_exports, {
|
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists2,
|
|
32
32
|
fs_functional_exports: () => fs_functional_exports,
|
|
33
33
|
getFilesInDir: () => getFilesInDir2,
|
|
@@ -37,8 +37,8 @@ __export(chunk_75BIJ5PX_exports, {
|
|
|
37
37
|
removeFile: () => removeFile,
|
|
38
38
|
writeFile: () => writeFile2
|
|
39
39
|
});
|
|
40
|
-
module.exports = __toCommonJS(
|
|
41
|
-
var
|
|
40
|
+
module.exports = __toCommonJS(chunk_UB2X7DGZ_exports);
|
|
41
|
+
var import_chunk_MXAUURHG = require("./chunk-MXAUURHG.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_MXAUURHG.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
|
|
3985
|
+
var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_MXAUURHG.writeFile)(params), createTaggedSystemError("fs-write-file", params));
|
|
3986
|
+
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_MXAUURHG.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_MXAUURHG.getNestedFoldersInDir)(dir);
|
|
3990
|
+
var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_MXAUURHG.getFilesInDir)(dir, pattern);
|
|
3991
3991
|
function createTaggedSystemError(type, meta) {
|
|
3992
3992
|
return (e) => ({
|
|
3993
3993
|
type,
|