@prisma/internals 6.20.0-dev.8 → 6.20.0-dev.9
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-73KNWD4T.js → chunk-57XKRBO4.js} +8 -10
- package/dist/{chunk-TQFONRJP.js → chunk-5BRXEOYH.js} +5 -5
- package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
- package/dist/chunk-5SAWCTGN.js +46 -0
- package/dist/{chunk-T4KYUNGO.js → chunk-63BLJTNP.js} +12 -12
- package/dist/{chunk-UHCUM4US.js → chunk-6AOQ56XS.js} +5 -5
- package/dist/{chunk-F7K755YZ.js → chunk-6XDWK3XF.js} +16 -38
- package/dist/{chunk-X24HKSTU.js → chunk-7AMQW56E.js} +5 -5
- package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
- package/dist/{chunk-OJS6PNYD.js → chunk-AYH4F3GT.js} +5 -5
- package/dist/{chunk-7QC5VORA.js → chunk-BGMZPA2F.js} +5 -6
- package/dist/{chunk-GIXAB3OO.js → chunk-BKZWG6HK.js} +52 -133
- package/dist/{chunk-BVJP43JS.js → chunk-BXIKQUP5.js} +7 -7
- package/dist/{chunk-C3H5LCW7.js → chunk-DZUMYQIA.js} +5 -5
- package/dist/{chunk-FYZCPL2Z.js → chunk-FASYSGWP.js} +3 -6
- package/dist/{chunk-TXQN2QQI.js → chunk-FBHUMCED.js} +11 -11
- package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
- package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
- package/dist/{chunk-UQUWZJVN.js → chunk-GZLJZGHX.js} +5 -5
- package/dist/{chunk-BREG3SXT.js → chunk-J2WU5F65.js} +12 -12
- package/dist/{chunk-G7PC6PUN.js → chunk-JBAD62EV.js} +13 -13
- package/dist/{chunk-AX5N26KG.js → chunk-K4IC7NPI.js} +15 -10
- package/dist/{chunk-R3S5ZHUO.js → chunk-KV5M6BWD.js} +13 -13
- package/dist/{chunk-OAT7ZJED.js → chunk-MNP6VO5F.js} +7 -20
- package/dist/{chunk-BCQZ6JQE.js → chunk-NBWRGVYR.js} +4 -6
- package/dist/{chunk-W2C5H5H4.js → chunk-NHM75P2J.js} +7 -9
- package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
- package/dist/{chunk-DT7GMC6R.js → chunk-PHCC4RQK.js} +11 -11
- package/dist/{chunk-F2OZV76L.js → chunk-PKOQQT7I.js} +7 -7
- package/dist/{chunk-75BIJ5PX.js → chunk-Q5XW7CMJ.js} +9 -9
- package/dist/{chunk-OSHZ4P3G.js → chunk-SP2ETLT2.js} +5 -5
- package/dist/{chunk-UHI6VYFX.js → chunk-TRAG7WPX.js} +15 -11
- package/dist/{chunk-27XVRCOV.js → chunk-UIA6QRTF.js} +5 -5
- package/dist/{chunk-HYJQ3CE6.js → chunk-UNTUCN6K.js} +16 -38
- package/dist/{chunk-QSE2V5UT.js → chunk-UUZVVTOP.js} +5 -5
- package/dist/{chunk-RF5CLPSL.js → chunk-UYMUOW4P.js} +52 -133
- package/dist/{chunk-GMW36QQF.js → chunk-V6DWK6TN.js} +7 -7
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
- package/dist/{chunk-LYKUEAOI.js → chunk-XV3WHAKH.js} +5 -5
- package/dist/{chunk-JOIIWB3U.js → chunk-YV4IFLW4.js} +128 -129
- package/dist/{chunk-HFFWZTVM.js → chunk-YXCPS3WU.js} +5 -15
- package/dist/{chunk-WPDUAPVD.js → chunk-YYNGIIPX.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.d.ts +7 -9
- package/dist/cli/checkUnsupportedDataProxy.js +52 -62
- package/dist/cli/directoryConfig.d.ts +5 -2
- package/dist/cli/directoryConfig.js +2 -2
- 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 +3 -20
- package/dist/cli/schemaContext.js +53 -62
- package/dist/cli/types.d.ts +1 -1
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +51 -61
- package/dist/engine-commands/getConfig.d.ts +1 -5
- package/dist/engine-commands/getConfig.js +10 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +4 -8
- package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
- package/dist/engine-commands/getEnginesInfo.js +5 -8
- package/dist/engine-commands/index.d.ts +1 -1
- package/dist/engine-commands/index.js +61 -73
- 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/get-generators/getGenerators.d.ts +0 -2
- package/dist/get-generators/getGenerators.js +54 -64
- 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 +4 -4
- package/dist/getPackedPackage.js +3 -3
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +4 -16
- package/dist/index.js +96 -120
- package/dist/resolveBinary.js +6 -6
- package/dist/schemaEngineCommands.js +7 -7
- package/dist/sendPanic.js +2 -3
- package/dist/types.d.ts +15 -0
- 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 +4 -5
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/utils/toSchemasContainer.d.ts +1 -1
- package/dist/utils/toSchemasContainer.js +3 -3
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +15 -0
- package/dist/utils/{handleEngineLoadingErrors.js → validatePrismaConfigWithDatasource.js} +7 -6
- package/dist/wasm.js +5 -5
- package/package.json +15 -17
- 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-HO5HRHFZ.js +0 -30
- package/dist/chunk-KDHESRKE.js +0 -49
- package/dist/chunk-PZMRR772.js +0 -41
- package/dist/chunk-RFB2U4GQ.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/__tests__/maskSchema.test.js +0 -23
- 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/getMigrateConfigDir.d.ts +0 -2
- package/dist/utils/getMigrateConfigDir.js +0 -25
- package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
- 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/maskSchema.d.ts +0 -4
- package/dist/utils/maskSchema.js +0 -27
- package/dist/utils/serializeQueryEngineName.d.ts +0 -4
- package/dist/utils/serializeQueryEngineName.js +0 -25
- package/dist/utils/tryLoadEnvs.d.ts +0 -25
- package/dist/utils/tryLoadEnvs.js +0 -30
|
@@ -16,17 +16,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_TRAG7WPX_exports = {};
|
|
20
|
+
__export(chunk_TRAG7WPX_exports, {
|
|
21
21
|
SchemaEngineExitCode: () => SchemaEngineExitCode,
|
|
22
22
|
canConnectToDatabase: () => canConnectToDatabase,
|
|
23
23
|
createDatabase: () => createDatabase,
|
|
24
24
|
dropDatabase: () => dropDatabase,
|
|
25
25
|
execaCommand: () => execaCommand
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(chunk_TRAG7WPX_exports);
|
|
28
28
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_FASYSGWP = require("./chunk-FASYSGWP.js");
|
|
30
30
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
31
31
|
var SchemaEngineExitCode = /* @__PURE__ */ ((SchemaEngineExitCode2) => {
|
|
32
32
|
SchemaEngineExitCode2[SchemaEngineExitCode2["Success"] = 0] = "Success";
|
|
@@ -139,15 +139,19 @@ async function execaCommand({
|
|
|
139
139
|
schemaEnginePath,
|
|
140
140
|
engineCommandName
|
|
141
141
|
}) {
|
|
142
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
|
142
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_FASYSGWP.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
|
143
143
|
try {
|
|
144
|
-
return await (0, import_chunk_JOIHHXR6.execa)(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
return await (0, import_chunk_JOIHHXR6.execa)(
|
|
145
|
+
schemaEnginePath,
|
|
146
|
+
["--datasource", JSON.stringify({ url: connectionString }), "cli", engineCommandName],
|
|
147
|
+
{
|
|
148
|
+
cwd,
|
|
149
|
+
env: {
|
|
150
|
+
RUST_BACKTRACE: process.env.RUST_BACKTRACE ?? "1",
|
|
151
|
+
RUST_LOG: process.env.RUST_LOG ?? "info"
|
|
152
|
+
}
|
|
149
153
|
}
|
|
150
|
-
|
|
154
|
+
);
|
|
151
155
|
} catch (_e) {
|
|
152
156
|
const e = _e;
|
|
153
157
|
if (e.message) {
|
|
@@ -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_UIA6QRTF_exports = {};
|
|
20
|
+
__export(chunk_UIA6QRTF_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_UIA6QRTF_exports);
|
|
28
|
+
var import_chunk_XV3WHAKH = require("./chunk-XV3WHAKH.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_XV3WHAKH.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -26,20 +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_UNTUCN6K_exports = {};
|
|
30
|
+
__export(chunk_UNTUCN6K_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
|
-
getConfig: () => getConfig
|
|
33
|
-
getDirectUrl: () => getDirectUrl,
|
|
34
|
-
getEffectiveUrl: () => getEffectiveUrl,
|
|
35
|
-
resolveUrl: () => resolveUrl
|
|
32
|
+
getConfig: () => getConfig
|
|
36
33
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
38
|
-
var
|
|
39
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_UNTUCN6K_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
40
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_DZUMYQIA = require("./chunk-DZUMYQIA.js");
|
|
39
|
+
var import_chunk_7AMQW56E = require("./chunk-7AMQW56E.js");
|
|
43
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
44
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
45
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -64,41 +61,22 @@ ${detailsHeader} ${message}`;
|
|
|
64
61
|
}).exhaustive();
|
|
65
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
66
63
|
[Context: getConfig]`;
|
|
67
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_DZUMYQIA.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
68
65
|
this.name = "GetConfigError";
|
|
69
66
|
}
|
|
70
67
|
};
|
|
71
|
-
function getEffectiveUrl(ds) {
|
|
72
|
-
if (ds.directUrl !== void 0) return ds.directUrl;
|
|
73
|
-
return ds.url;
|
|
74
|
-
}
|
|
75
|
-
function getDirectUrl(ds) {
|
|
76
|
-
return ds.directUrl;
|
|
77
|
-
}
|
|
78
|
-
function resolveUrl(envValue) {
|
|
79
|
-
const urlFromValue = envValue?.value;
|
|
80
|
-
const urlEnvVarName = envValue?.fromEnvVar;
|
|
81
|
-
const urlEnvVarValue = urlEnvVarName ? process.env[urlEnvVarName] : void 0;
|
|
82
|
-
return urlFromValue ?? urlEnvVarValue;
|
|
83
|
-
}
|
|
84
68
|
async function getConfig(options) {
|
|
85
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
|
|
86
70
|
debug(`Using getConfig Wasm`);
|
|
87
71
|
const configEither = (0, import_function.pipe)(
|
|
88
72
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
89
73
|
() => {
|
|
90
|
-
if (process.env.
|
|
74
|
+
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
91
75
|
debug("Triggering a Rust panic...");
|
|
92
|
-
|
|
76
|
+
import_chunk_7AMQW56E.prismaSchemaWasm.debug_panic();
|
|
93
77
|
}
|
|
94
|
-
const params = JSON.stringify({
|
|
95
|
-
|
|
96
|
-
datasourceOverrides: {},
|
|
97
|
-
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
|
98
|
-
env: process.env
|
|
99
|
-
});
|
|
100
|
-
const data = import_chunk_LYKUEAOI.prismaSchemaWasm.get_config(params);
|
|
101
|
-
return data;
|
|
78
|
+
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
+
return import_chunk_7AMQW56E.prismaSchemaWasm.get_config(params);
|
|
102
80
|
},
|
|
103
81
|
(e) => ({
|
|
104
82
|
type: "wasm-error",
|
|
@@ -156,12 +134,12 @@ async function getConfig(options) {
|
|
|
156
134
|
return panic;
|
|
157
135
|
}
|
|
158
136
|
const errorOutput = e.error.message;
|
|
159
|
-
return new GetConfigError((0,
|
|
137
|
+
return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
160
138
|
}).with({ type: "validation-error" }, (e) => {
|
|
161
139
|
return new GetConfigError({
|
|
162
140
|
_tag: "parsed",
|
|
163
141
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
164
|
-
reason: (0,
|
|
142
|
+
reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
|
|
165
143
|
message: formatErrors(e.error)
|
|
166
144
|
});
|
|
167
145
|
}).otherwise((e) => {
|
|
@@ -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_UUZVVTOP_exports = {};
|
|
20
|
+
__export(chunk_UUZVVTOP_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var import_chunk_OJS6PNYD = require("./chunk-OJS6PNYD.js");
|
|
23
|
+
module.exports = __toCommonJS(chunk_UUZVVTOP_exports);
|
|
25
24
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
+
var import_chunk_AYH4F3GT = require("./chunk-AYH4F3GT.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_AYH4F3GT.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -26,83 +26,58 @@ 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_UYMUOW4P_exports = {};
|
|
30
|
+
__export(chunk_UYMUOW4P_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
|
-
|
|
37
|
+
getSchemaDatasourceProvider: () => getSchemaDatasourceProvider,
|
|
40
38
|
knownBinaryTargets: () => knownBinaryTargets,
|
|
41
39
|
loadSchemaContext: () => loadSchemaContext,
|
|
42
40
|
processSchemaResult: () => processSchemaResult,
|
|
43
41
|
skipIndex: () => skipIndex
|
|
44
42
|
});
|
|
45
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_UYMUOW4P_exports);
|
|
44
|
+
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
|
+
var import_chunk_PKOQQT7I = require("./chunk-PKOQQT7I.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
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");
|
|
51
|
-
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
52
48
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
49
|
+
var import_chunk_K4IC7NPI = require("./chunk-K4IC7NPI.js");
|
|
50
|
+
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
51
|
+
var import_chunk_BGMZPA2F = require("./chunk-BGMZPA2F.js");
|
|
56
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
57
53
|
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");
|
|
54
|
+
var import_chunk_UIA6QRTF = require("./chunk-UIA6QRTF.js");
|
|
55
|
+
var import_chunk_PHCC4RQK = require("./chunk-PHCC4RQK.js");
|
|
56
|
+
var import_chunk_6XDWK3XF = require("./chunk-6XDWK3XF.js");
|
|
57
|
+
var import_chunk_63BLJTNP = require("./chunk-63BLJTNP.js");
|
|
58
|
+
var import_chunk_XV3WHAKH = require("./chunk-XV3WHAKH.js");
|
|
59
|
+
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
65
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
66
61
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
67
62
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
68
63
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
69
64
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
65
|
+
var import_chunk_BXIKQUP5 = require("./chunk-BXIKQUP5.js");
|
|
66
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
70
67
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
71
|
-
var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
|
|
72
68
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
73
|
-
var
|
|
69
|
+
var import_node_path = __toESM(require("node:path"));
|
|
74
70
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
75
71
|
var import_debug2 = __toESM(require("@prisma/debug"));
|
|
76
72
|
var import_engines = require("@prisma/engines");
|
|
77
73
|
var import_get_platform = require("@prisma/get-platform");
|
|
78
|
-
var
|
|
74
|
+
var import_path = __toESM(require("path"));
|
|
79
75
|
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
76
|
var debug = (0, import_debug.default)("prisma:format");
|
|
102
77
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
103
78
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
104
79
|
handleFormatPanic(() => {
|
|
105
|
-
|
|
80
|
+
import_chunk_XV3WHAKH.prismaSchemaWasm.debug_panic();
|
|
106
81
|
});
|
|
107
82
|
}
|
|
108
83
|
const defaultFormattingOptions = {
|
|
@@ -119,10 +94,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
119
94
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
120
95
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
121
96
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
122
|
-
const lintDiagnostics2 = (0,
|
|
97
|
+
const lintDiagnostics2 = (0, import_chunk_UIA6QRTF.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
123
98
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
124
99
|
});
|
|
125
|
-
const lintWarnings = (0,
|
|
100
|
+
const lintWarnings = (0, import_chunk_UIA6QRTF.getLintWarningsAsText)(lintDiagnostics);
|
|
126
101
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
127
102
|
console.warn(lintWarnings);
|
|
128
103
|
}
|
|
@@ -149,60 +124,44 @@ function handleFormatPanic(tryCb) {
|
|
|
149
124
|
}
|
|
150
125
|
}
|
|
151
126
|
function formatWasm(schema, documentFormattingParams) {
|
|
152
|
-
const formattedSchema =
|
|
127
|
+
const formattedSchema = import_chunk_XV3WHAKH.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
153
128
|
return formattedSchema;
|
|
154
129
|
}
|
|
155
130
|
async function loadSchemaContext({
|
|
156
131
|
schemaPathFromArg,
|
|
157
132
|
schemaPathFromConfig,
|
|
158
|
-
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,
|
|
151
|
+
return processSchemaResult({ schemaResult, printLoadMessage, cwd });
|
|
179
152
|
}
|
|
180
153
|
async function processSchemaResult({
|
|
181
154
|
schemaResult,
|
|
182
|
-
schemaEngineConfig,
|
|
183
155
|
printLoadMessage = true,
|
|
184
|
-
ignoreEnvVarErrors = false,
|
|
185
156
|
cwd = process.cwd()
|
|
186
157
|
}) {
|
|
187
|
-
const loadedFromPathForLogMessages =
|
|
158
|
+
const loadedFromPathForLogMessages = import_node_path.default.relative(cwd, schemaResult.schemaPath);
|
|
188
159
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
189
160
|
if (printLoadMessage) {
|
|
190
|
-
(0,
|
|
161
|
+
(0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
191
162
|
}
|
|
192
|
-
const configFromPsl = await (0,
|
|
193
|
-
const
|
|
194
|
-
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
|
|
195
|
-
const { url, directUrl, shadowDatabaseUrl } = datasource;
|
|
196
|
-
const primaryDatasource2 = {
|
|
197
|
-
...datasourceFromPsl,
|
|
198
|
-
url: { fromEnvVar: null, value: url },
|
|
199
|
-
directUrl: directUrl ? { fromEnvVar: null, value: directUrl } : void 0,
|
|
200
|
-
shadowDatabaseUrl: shadowDatabaseUrl ? { fromEnvVar: null, value: shadowDatabaseUrl } : void 0,
|
|
201
|
-
[Symbol.for("engine.classic")]: true
|
|
202
|
-
};
|
|
203
|
-
return primaryDatasource2;
|
|
204
|
-
}).otherwise(() => datasourceFromPsl);
|
|
205
|
-
const primaryDatasourceDirectory = getPrimaryDatasourceDirectory(datasourceFromPsl) || schemaRootDir;
|
|
163
|
+
const configFromPsl = await (0, import_chunk_6XDWK3XF.getConfig)({ datamodel: schemaResult.schemas });
|
|
164
|
+
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
206
165
|
return {
|
|
207
166
|
schemaFiles: schemaResult.schemas,
|
|
208
167
|
schemaPath: schemaResult.schemaPath,
|
|
@@ -210,19 +169,17 @@ async function processSchemaResult({
|
|
|
210
169
|
datasources: configFromPsl.datasources,
|
|
211
170
|
generators: configFromPsl.generators,
|
|
212
171
|
primaryDatasource,
|
|
213
|
-
primaryDatasourceDirectory,
|
|
214
172
|
warnings: configFromPsl.warnings,
|
|
215
173
|
loadedFromPathForLogMessages
|
|
216
174
|
};
|
|
217
175
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return import_path.default.dirname(datasourcePath);
|
|
176
|
+
function getSchemaDatasourceProvider(schemaContext) {
|
|
177
|
+
if (schemaContext.primaryDatasource === void 0) {
|
|
178
|
+
throw new Error("Schema must contain a datasource block");
|
|
222
179
|
}
|
|
223
|
-
return
|
|
180
|
+
return schemaContext.primaryDatasource.activeProvider;
|
|
224
181
|
}
|
|
225
|
-
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
182
|
+
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_BXIKQUP5.require_p_map)());
|
|
226
183
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
227
184
|
async function getGenerators(options) {
|
|
228
185
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -246,29 +203,27 @@ async function getGenerators(options) {
|
|
|
246
203
|
skipDownload,
|
|
247
204
|
binaryPathsOverride,
|
|
248
205
|
generatorNames = [],
|
|
249
|
-
postinstall,
|
|
250
|
-
noEngine,
|
|
251
206
|
allowNoModels = true,
|
|
252
207
|
typedSql
|
|
253
208
|
} = options;
|
|
254
|
-
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath
|
|
209
|
+
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath }) : options.schemaContext;
|
|
255
210
|
if (!schemaContext) {
|
|
256
211
|
throw new Error(`no schema provided for getGenerators`);
|
|
257
212
|
}
|
|
258
213
|
if (!schemaContext.primaryDatasource) {
|
|
259
|
-
throw new Error(
|
|
214
|
+
throw new Error(import_chunk_BGMZPA2F.missingDatasource);
|
|
260
215
|
}
|
|
261
216
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
262
217
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
263
|
-
const dmmf = await (0,
|
|
218
|
+
const dmmf = await (0, import_chunk_63BLJTNP.getDMMF)({
|
|
264
219
|
datamodel: schemaContext.schemaFiles,
|
|
265
220
|
previewFeatures
|
|
266
221
|
});
|
|
267
222
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
268
223
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
269
|
-
throw new Error(
|
|
224
|
+
throw new Error(import_chunk_K4IC7NPI.missingModelMessageMongoDB);
|
|
270
225
|
}
|
|
271
|
-
throw new Error(
|
|
226
|
+
throw new Error(import_chunk_K4IC7NPI.missingModelMessage);
|
|
272
227
|
}
|
|
273
228
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
274
229
|
await validateGenerators(generatorConfigs);
|
|
@@ -277,7 +232,7 @@ async function getGenerators(options) {
|
|
|
277
232
|
const generators = await (0, import_p_map.default)(
|
|
278
233
|
generatorConfigs,
|
|
279
234
|
async (generatorConfig, index) => {
|
|
280
|
-
const baseDir =
|
|
235
|
+
const baseDir = import_path.default.dirname(generatorConfig.sourceFilePath ?? schemaContext.schemaRootDir);
|
|
281
236
|
const providerValue = (0, import_chunk_IOIAK7V7.parseEnvValue)(generatorConfig.provider);
|
|
282
237
|
const generatorDefinition = registry[providerValue] ?? {
|
|
283
238
|
type: "rpc",
|
|
@@ -290,7 +245,7 @@ async function getGenerators(options) {
|
|
|
290
245
|
await generatorInstance.init();
|
|
291
246
|
if (generatorConfig.output) {
|
|
292
247
|
generatorConfig.output = {
|
|
293
|
-
value:
|
|
248
|
+
value: import_path.default.resolve(baseDir, (0, import_chunk_IOIAK7V7.parseEnvValue)(generatorConfig.output)),
|
|
294
249
|
fromEnvVar: null
|
|
295
250
|
};
|
|
296
251
|
generatorConfig.isCustomOutput = true;
|
|
@@ -311,8 +266,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
311
266
|
fromEnvVar: null
|
|
312
267
|
};
|
|
313
268
|
}
|
|
314
|
-
const datamodel = (0,
|
|
315
|
-
const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
|
269
|
+
const datamodel = (0, import_chunk_PHCC4RQK.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
316
270
|
const options2 = {
|
|
317
271
|
datamodel,
|
|
318
272
|
datasources: schemaContext.datasources,
|
|
@@ -323,10 +277,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
323
277
|
// TODO:(schemaPath) can we get rid of schema path passing here?
|
|
324
278
|
version: version2 || import_engines.enginesVersion,
|
|
325
279
|
// this version makes no sense anymore and should be ignored
|
|
326
|
-
postinstall,
|
|
327
|
-
noEngine,
|
|
328
280
|
allowNoModels,
|
|
329
|
-
envPaths,
|
|
330
281
|
typedSql
|
|
331
282
|
};
|
|
332
283
|
generatorInstance.setOptions(options2);
|
|
@@ -370,18 +321,16 @@ generator gen {
|
|
|
370
321
|
}
|
|
371
322
|
const generatorBinaryTargets = g.options?.generator?.binaryTargets;
|
|
372
323
|
if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
|
|
373
|
-
for (const
|
|
374
|
-
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value ===
|
|
375
|
-
neededVersions[neededVersion].binaryTargets.push(
|
|
324
|
+
for (const binaryTarget of generatorBinaryTargets) {
|
|
325
|
+
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget.value)) {
|
|
326
|
+
neededVersions[neededVersion].binaryTargets.push(binaryTarget);
|
|
376
327
|
}
|
|
377
328
|
}
|
|
378
329
|
}
|
|
379
330
|
}
|
|
380
331
|
}
|
|
381
|
-
const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
|
|
382
|
-
const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
|
|
383
332
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
384
|
-
const { binaryPathsByVersion
|
|
333
|
+
const { binaryPathsByVersion } = await (0, import_chunk_PKOQQT7I.getBinaryPathsByVersion)({
|
|
385
334
|
neededVersions,
|
|
386
335
|
// We're lazily computing the binary target here, to avoid printing the
|
|
387
336
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -402,17 +351,6 @@ generator gen {
|
|
|
402
351
|
const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
|
|
403
352
|
debug2({ generatorBinaryPaths });
|
|
404
353
|
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_T4KYUNGO.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
354
|
}
|
|
417
355
|
}
|
|
418
356
|
return generators;
|
|
@@ -437,17 +375,6 @@ var oldToNewBinaryTargetsMapping = {
|
|
|
437
375
|
async function validateGenerators(generators) {
|
|
438
376
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
439
377
|
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
378
|
if (generator.binaryTargets) {
|
|
452
379
|
const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
|
|
453
380
|
const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
|
|
@@ -507,25 +434,17 @@ function filterGenerators(generators, generatorNames) {
|
|
|
507
434
|
}
|
|
508
435
|
return filtered;
|
|
509
436
|
}
|
|
510
|
-
var forbiddenCmdWithDataProxyFlagMessage = (
|
|
511
|
-
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${
|
|
512
|
-
Please use a direct connection to your database
|
|
437
|
+
var forbiddenCmdWithDataProxyFlagMessage = (cmd) => `
|
|
438
|
+
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} yet.
|
|
439
|
+
Please use a direct connection to your database in \`prisma.config.ts\`.
|
|
513
440
|
|
|
514
441
|
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
|
|
515
442
|
`;
|
|
516
443
|
function checkUnsupportedDataProxy({
|
|
517
444
|
cmd,
|
|
518
|
-
|
|
519
|
-
urls = []
|
|
445
|
+
validatedConfig
|
|
520
446
|
}) {
|
|
521
|
-
|
|
522
|
-
if (url2 && url2.includes("prisma://")) {
|
|
523
|
-
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
if (!schemaContext?.primaryDatasource) return;
|
|
527
|
-
const url = (0, import_chunk_HYJQ3CE6.resolveUrl)((0, import_chunk_HYJQ3CE6.getEffectiveUrl)(schemaContext.primaryDatasource));
|
|
528
|
-
if (url?.startsWith("prisma://")) {
|
|
447
|
+
if (validatedConfig.datasource.url.startsWith("prisma://")) {
|
|
529
448
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
530
449
|
}
|
|
531
450
|
}
|
|
@@ -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_V6DWK6TN_exports = {};
|
|
30
|
+
__export(chunk_V6DWK6TN_exports, {
|
|
31
31
|
getEnginesInfo: () => getEnginesInfo,
|
|
32
32
|
resolveEngine: () => resolveEngine
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_V6DWK6TN_exports);
|
|
35
|
+
var import_chunk_MNP6VO5F = require("./chunk-MNP6VO5F.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_FASYSGWP = require("./chunk-FASYSGWP.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_FASYSGWP.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_MNP6VO5F.safeGetEngineVersion)(enginePath, binaryName);
|
|
143
143
|
})
|
|
144
144
|
)();
|
|
145
145
|
const engineInfo = {
|
|
@@ -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_VNIE2AZB_exports = {};
|
|
20
|
+
__export(chunk_VNIE2AZB_exports, {
|
|
21
21
|
highlightDatamodel: () => highlightDatamodel,
|
|
22
22
|
highlightSql: () => highlightSql,
|
|
23
23
|
highlightTS: () => highlightTS
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
-
var import_chunk_OIVPX3BR = require("./chunk-OIVPX3BR.js");
|
|
25
|
+
module.exports = __toCommonJS(chunk_VNIE2AZB_exports);
|
|
27
26
|
var import_chunk_CYAS6B5N = require("./chunk-CYAS6B5N.js");
|
|
27
|
+
var import_chunk_OIVPX3BR = require("./chunk-OIVPX3BR.js");
|
|
28
28
|
var import_chunk_HPVMQFIY = require("./chunk-HPVMQFIY.js");
|
|
29
29
|
function highlightDatamodel(str) {
|
|
30
30
|
return highlight(str, import_chunk_OIVPX3BR.dml);
|
|
@@ -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_WSZXPLJQ_exports = {};
|
|
30
|
+
__export(chunk_WSZXPLJQ_exports, {
|
|
31
31
|
createDebugErrorType: () => createDebugErrorType,
|
|
32
32
|
createSchemaValidationError: () => createSchemaValidationError,
|
|
33
33
|
parseQueryEngineError: () => parseQueryEngineError,
|
|
34
34
|
unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
36
|
+
module.exports = __toCommonJS(chunk_WSZXPLJQ_exports);
|
|
38
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.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_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|