@prisma/internals 6.19.0-integration-engines-6-19-0-30-push-otuqumlrponx-17ff4a7bd0bffdf0b40b58a399869660f7f0e368.1 → 6.19.0-integration-feat-remove-library-engine.3
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-JOIIWB3U.js → chunk-2LOGW45F.js} +68 -33
- package/dist/{chunk-SVOYDVK6.js → chunk-2MJNNWBQ.js} +8 -8
- package/dist/{chunk-BVJP43JS.js → chunk-32LLAKF4.js} +13 -784
- package/dist/{chunk-AX5N26KG.js → chunk-33K2EQQZ.js} +10 -10
- package/dist/{chunk-I6WLABB2.js → chunk-3WXUQZS7.js} +14 -5
- package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
- package/dist/{chunk-F2OZV76L.js → chunk-5MHUYAV3.js} +9 -9
- package/dist/{chunk-HO5HRHFZ.js → chunk-5W3BSMTH.js} +3 -6
- package/dist/{chunk-46ABODUM.js → chunk-6QTN4DDB.js} +6 -21
- package/dist/{chunk-72WT7DK3.js → chunk-7TNL2X5G.js} +5 -5
- package/dist/{chunk-YQECHDTJ.js → chunk-AAXLNSYL.js} +5 -5
- package/dist/{chunk-6MRKNTJD.js → chunk-AOJ2N25Z.js} +8 -8
- package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
- package/dist/{chunk-HFFWZTVM.js → chunk-BUQN4WLU.js} +7 -9
- package/dist/{chunk-MEMPRTWR.js → chunk-BZV6PVWV.js} +8 -8
- package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
- package/dist/{chunk-47SAWGTD.js → chunk-D7L3VT6R.js} +8 -8
- package/dist/chunk-DYV47NUW.js +796 -0
- package/dist/{chunk-C4DCOB35.js → chunk-EBJBIVXN.js} +5 -5
- package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
- package/dist/{chunk-ECMR3OBL.js → chunk-FSQCVENL.js} +7 -7
- package/dist/{chunk-PZMRR772.js → chunk-FURGECAD.js} +6 -6
- 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-7QC5VORA.js → chunk-H6PPJ5PX.js} +7 -7
- package/dist/{chunk-FYZCPL2Z.js → chunk-HNRMSI3R.js} +5 -8
- package/dist/{chunk-D4VDA2TZ.js → chunk-IRWX4FCC.js} +6 -6
- package/dist/{chunk-UQUWZJVN.js → chunk-IU77SCOB.js} +9 -9
- package/dist/{chunk-FXUEE7XX.js → chunk-KD7PGGJP.js} +8 -8
- package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
- package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
- package/dist/{chunk-L5ZWEYO7.js → chunk-MUZJUPDX.js} +7 -7
- package/dist/{chunk-TQFONRJP.js → chunk-MXAUURHG.js} +5 -5
- package/dist/{chunk-PPB7JLDO.js → chunk-NNYJV66S.js} +5 -5
- package/dist/{chunk-ZBUC6PZX.js → chunk-NVSVTFPX.js} +5 -5
- package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
- package/dist/{chunk-46MGVXWZ.js → chunk-P4JEYG25.js} +5 -5
- package/dist/{chunk-VMKOB234.js → chunk-QQRYY5P4.js} +8 -8
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-4L35EYLD.js → chunk-SFKBYZWG.js} +38 -66
- package/dist/{chunk-AMETUICR.js → chunk-TAKL4AGJ.js} +8 -8
- package/dist/{chunk-75BIJ5PX.js → chunk-UB2X7DGZ.js} +9 -9
- package/dist/{chunk-W7LDAWJF.js → chunk-UMB3Y33W.js} +7 -7
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/{chunk-UHI6VYFX.js → chunk-WJKBKH3Y.js} +5 -5
- package/dist/{chunk-ZCMRWYQK.js → chunk-Z2IPE4NA.js} +38 -66
- package/dist/{chunk-DRMVYKKF.js → chunk-ZEBJSCAV.js} +5 -5
- package/dist/{chunk-ZY7BAIKC.js → chunk-ZVTQSH5K.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +52 -54
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +52 -54
- 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.js +52 -54
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +51 -53
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- 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 +63 -65
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/getGenerators.d.ts +0 -1
- package/dist/get-generators/getGenerators.js +54 -56
- 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/highlight/highlight.js +5 -5
- package/dist/index.d.ts +1 -4
- package/dist/index.js +102 -109
- 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/canPrompt.js +3 -3
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/drawBox.js +2 -2
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getEnvPaths.d.ts +1 -1
- package/dist/utils/getEnvPaths.js +2 -3
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +8 -8
- package/dist/utils/link.js +2 -2
- package/dist/utils/loadEnvFile.d.ts +1 -1
- package/dist/utils/loadEnvFile.js +3 -4
- package/dist/utils/missingDatasource.js +5 -5
- package/dist/utils/missingGeneratorMessage.js +7 -7
- package/dist/utils/serializeQueryEngineName.js +2 -2
- package/dist/wasm.js +5 -5
- package/package.json +15 -15
- package/dist/chunk-6TTRTZXU.js +0 -37
- package/dist/chunk-DZYINYAA.js +0 -68
- package/dist/chunk-ERSH2BQA.js +0 -58
- package/dist/client/getClientEngineType.d.ts +0 -7
- 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
|
@@ -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_TAKL4AGJ_exports = {};
|
|
30
|
+
__export(chunk_TAKL4AGJ_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(
|
|
37
|
+
module.exports = __toCommonJS(chunk_TAKL4AGJ_exports);
|
|
38
38
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
39
39
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
40
40
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var import_chunk_P4JEYG25 = require("./chunk-P4JEYG25.js");
|
|
42
|
+
var import_chunk_AAXLNSYL = require("./chunk-AAXLNSYL.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_P4JEYG25.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
68
68
|
this.name = "GetConfigError";
|
|
69
69
|
}
|
|
70
70
|
};
|
|
@@ -89,7 +89,7 @@ async function getConfig(options) {
|
|
|
89
89
|
() => {
|
|
90
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
|
91
91
|
debug("Triggering a Rust panic...");
|
|
92
|
-
|
|
92
|
+
import_chunk_AAXLNSYL.prismaSchemaWasm.debug_panic();
|
|
93
93
|
}
|
|
94
94
|
const params = JSON.stringify({
|
|
95
95
|
prismaSchema: options.datamodel,
|
|
@@ -97,7 +97,7 @@ async function getConfig(options) {
|
|
|
97
97
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
|
98
98
|
env: process.env
|
|
99
99
|
});
|
|
100
|
-
const data =
|
|
100
|
+
const data = import_chunk_AAXLNSYL.prismaSchemaWasm.get_config(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(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_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,
|
|
@@ -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_UMB3Y33W_exports = {};
|
|
30
|
+
__export(chunk_UMB3Y33W_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_UMB3Y33W_exports);
|
|
35
35
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_EBJBIVXN = require("./chunk-EBJBIVXN.js");
|
|
39
|
+
var import_chunk_ZVTQSH5K = require("./chunk-ZVTQSH5K.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,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_EBJBIVXN.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -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_ZVTQSH5K.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -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);
|
|
@@ -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_WJKBKH3Y_exports = {};
|
|
20
|
+
__export(chunk_WJKBKH3Y_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_WJKBKH3Y_exports);
|
|
28
28
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_HNRMSI3R = require("./chunk-HNRMSI3R.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,7 +139,7 @@ async function execaCommand({
|
|
|
139
139
|
schemaEnginePath,
|
|
140
140
|
engineCommandName
|
|
141
141
|
}) {
|
|
142
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
|
142
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_HNRMSI3R.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
|
143
143
|
try {
|
|
144
144
|
return await (0, import_chunk_JOIHHXR6.execa)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
|
|
145
145
|
cwd,
|
|
@@ -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_Z2IPE4NA_exports = {};
|
|
30
|
+
__export(chunk_Z2IPE4NA_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
|
33
33
|
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
|
@@ -36,31 +36,29 @@ __export(chunk_ZCMRWYQK_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(
|
|
44
|
+
module.exports = __toCommonJS(chunk_Z2IPE4NA_exports);
|
|
45
|
+
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
46
|
+
var import_chunk_5MHUYAV3 = require("./chunk-5MHUYAV3.js");
|
|
46
47
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
48
|
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
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
|
|
56
|
-
var
|
|
51
|
+
var import_chunk_H6PPJ5PX = require("./chunk-H6PPJ5PX.js");
|
|
52
|
+
var import_chunk_33K2EQQZ = require("./chunk-33K2EQQZ.js");
|
|
53
|
+
var import_chunk_6QTN4DDB = require("./chunk-6QTN4DDB.js");
|
|
54
|
+
var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
|
|
57
55
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
56
|
+
var import_chunk_D7L3VT6R = require("./chunk-D7L3VT6R.js");
|
|
57
|
+
var import_chunk_BZV6PVWV = require("./chunk-BZV6PVWV.js");
|
|
58
|
+
var import_chunk_NNYJV66S = require("./chunk-NNYJV66S.js");
|
|
59
|
+
var import_chunk_UMB3Y33W = require("./chunk-UMB3Y33W.js");
|
|
60
|
+
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
61
|
+
var import_chunk_ZVTQSH5K = require("./chunk-ZVTQSH5K.js");
|
|
64
62
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
65
63
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
66
64
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
@@ -68,7 +66,7 @@ var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
|
68
66
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
69
67
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
70
68
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
71
|
-
var
|
|
69
|
+
var import_chunk_32LLAKF4 = require("./chunk-32LLAKF4.js");
|
|
72
70
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
73
71
|
var import_path = __toESM(require("path"));
|
|
74
72
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -81,7 +79,7 @@ var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
|
|
|
81
79
|
Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
|
|
82
80
|
defining an ${(0, import_chunk_PG5FDKSF.green)(`adapter`)} in Prisma config file (e.g., ${(0, import_chunk_PG5FDKSF.green)(`\`prisma.config.ts\``)}).
|
|
83
81
|
|
|
84
|
-
More information about this limitation: ${(0,
|
|
82
|
+
More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/schema-engine-limitations")}
|
|
85
83
|
`;
|
|
86
84
|
function checkUnsupportedSchemaEngineWasm({
|
|
87
85
|
cmd,
|
|
@@ -102,7 +100,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
102
100
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
103
101
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
104
102
|
handleFormatPanic(() => {
|
|
105
|
-
|
|
103
|
+
import_chunk_ZVTQSH5K.prismaSchemaWasm.debug_panic();
|
|
106
104
|
});
|
|
107
105
|
}
|
|
108
106
|
const defaultFormattingOptions = {
|
|
@@ -119,10 +117,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
119
117
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
120
118
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
121
119
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
122
|
-
const lintDiagnostics2 = (0,
|
|
120
|
+
const lintDiagnostics2 = (0, import_chunk_NNYJV66S.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
123
121
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
124
122
|
});
|
|
125
|
-
const lintWarnings = (0,
|
|
123
|
+
const lintWarnings = (0, import_chunk_NNYJV66S.getLintWarningsAsText)(lintDiagnostics);
|
|
126
124
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
127
125
|
console.warn(lintWarnings);
|
|
128
126
|
}
|
|
@@ -149,7 +147,7 @@ function handleFormatPanic(tryCb) {
|
|
|
149
147
|
}
|
|
150
148
|
}
|
|
151
149
|
function formatWasm(schema, documentFormattingParams) {
|
|
152
|
-
const formattedSchema =
|
|
150
|
+
const formattedSchema = import_chunk_ZVTQSH5K.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
153
151
|
return formattedSchema;
|
|
154
152
|
}
|
|
155
153
|
async function loadSchemaContext({
|
|
@@ -164,13 +162,13 @@ async function loadSchemaContext({
|
|
|
164
162
|
} = {}) {
|
|
165
163
|
let schemaResult = null;
|
|
166
164
|
if (allowNull) {
|
|
167
|
-
schemaResult = await (0,
|
|
165
|
+
schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
|
|
168
166
|
argumentName: schemaPathArgumentName,
|
|
169
167
|
cwd
|
|
170
168
|
});
|
|
171
169
|
if (!schemaResult) return null;
|
|
172
170
|
} else {
|
|
173
|
-
schemaResult = await (0,
|
|
171
|
+
schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
|
|
174
172
|
argumentName: schemaPathArgumentName,
|
|
175
173
|
cwd
|
|
176
174
|
});
|
|
@@ -187,9 +185,9 @@ async function processSchemaResult({
|
|
|
187
185
|
const loadedFromPathForLogMessages = import_path.default.relative(cwd, schemaResult.schemaPath);
|
|
188
186
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
189
187
|
if (printLoadMessage) {
|
|
190
|
-
(0,
|
|
188
|
+
(0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
191
189
|
}
|
|
192
|
-
const configFromPsl = await (0,
|
|
190
|
+
const configFromPsl = await (0, import_chunk_D7L3VT6R.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
|
193
191
|
const datasourceFromPsl = configFromPsl.datasources.at(0);
|
|
194
192
|
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
|
|
195
193
|
const { url, directUrl, shadowDatabaseUrl } = datasource;
|
|
@@ -222,7 +220,7 @@ function getPrimaryDatasourceDirectory(primaryDatasource) {
|
|
|
222
220
|
}
|
|
223
221
|
return null;
|
|
224
222
|
}
|
|
225
|
-
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
223
|
+
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_32LLAKF4.require_p_map)());
|
|
226
224
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
227
225
|
async function getGenerators(options) {
|
|
228
226
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -247,7 +245,6 @@ async function getGenerators(options) {
|
|
|
247
245
|
binaryPathsOverride,
|
|
248
246
|
generatorNames = [],
|
|
249
247
|
postinstall,
|
|
250
|
-
noEngine,
|
|
251
248
|
allowNoModels = true,
|
|
252
249
|
typedSql
|
|
253
250
|
} = options;
|
|
@@ -256,19 +253,19 @@ async function getGenerators(options) {
|
|
|
256
253
|
throw new Error(`no schema provided for getGenerators`);
|
|
257
254
|
}
|
|
258
255
|
if (!schemaContext.primaryDatasource) {
|
|
259
|
-
throw new Error(
|
|
256
|
+
throw new Error(import_chunk_H6PPJ5PX.missingDatasource);
|
|
260
257
|
}
|
|
261
258
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
262
259
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
263
|
-
const dmmf = await (0,
|
|
260
|
+
const dmmf = await (0, import_chunk_BZV6PVWV.getDMMF)({
|
|
264
261
|
datamodel: schemaContext.schemaFiles,
|
|
265
262
|
previewFeatures
|
|
266
263
|
});
|
|
267
264
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
268
265
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
269
|
-
throw new Error(
|
|
266
|
+
throw new Error(import_chunk_33K2EQQZ.missingModelMessageMongoDB);
|
|
270
267
|
}
|
|
271
|
-
throw new Error(
|
|
268
|
+
throw new Error(import_chunk_33K2EQQZ.missingModelMessage);
|
|
272
269
|
}
|
|
273
270
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
274
271
|
await validateGenerators(generatorConfigs);
|
|
@@ -311,8 +308,8 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
311
308
|
fromEnvVar: null
|
|
312
309
|
};
|
|
313
310
|
}
|
|
314
|
-
const datamodel = (0,
|
|
315
|
-
const envPaths =
|
|
311
|
+
const datamodel = (0, import_chunk_UMB3Y33W.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
312
|
+
const envPaths = (0, import_chunk_6QTN4DDB.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
|
316
313
|
const options2 = {
|
|
317
314
|
datamodel,
|
|
318
315
|
datasources: schemaContext.datasources,
|
|
@@ -324,7 +321,6 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
324
321
|
version: version2 || import_engines.enginesVersion,
|
|
325
322
|
// this version makes no sense anymore and should be ignored
|
|
326
323
|
postinstall,
|
|
327
|
-
noEngine,
|
|
328
324
|
allowNoModels,
|
|
329
325
|
envPaths,
|
|
330
326
|
typedSql
|
|
@@ -370,18 +366,16 @@ generator gen {
|
|
|
370
366
|
}
|
|
371
367
|
const generatorBinaryTargets = g.options?.generator?.binaryTargets;
|
|
372
368
|
if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
|
|
373
|
-
for (const
|
|
374
|
-
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value ===
|
|
375
|
-
neededVersions[neededVersion].binaryTargets.push(
|
|
369
|
+
for (const binaryTarget of generatorBinaryTargets) {
|
|
370
|
+
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget.value)) {
|
|
371
|
+
neededVersions[neededVersion].binaryTargets.push(binaryTarget);
|
|
376
372
|
}
|
|
377
373
|
}
|
|
378
374
|
}
|
|
379
375
|
}
|
|
380
376
|
}
|
|
381
|
-
const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
|
|
382
|
-
const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
|
|
383
377
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
384
|
-
const { binaryPathsByVersion
|
|
378
|
+
const { binaryPathsByVersion } = await (0, import_chunk_5MHUYAV3.getBinaryPathsByVersion)({
|
|
385
379
|
neededVersions,
|
|
386
380
|
// We're lazily computing the binary target here, to avoid printing the
|
|
387
381
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -402,17 +396,6 @@ generator gen {
|
|
|
402
396
|
const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
|
|
403
397
|
debug2({ generatorBinaryPaths });
|
|
404
398
|
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_SVOYDVK6.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
399
|
}
|
|
417
400
|
}
|
|
418
401
|
return generators;
|
|
@@ -437,17 +420,6 @@ var oldToNewBinaryTargetsMapping = {
|
|
|
437
420
|
async function validateGenerators(generators) {
|
|
438
421
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
439
422
|
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
423
|
if (generator.binaryTargets) {
|
|
452
424
|
const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
|
|
453
425
|
const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
|
|
@@ -511,7 +483,7 @@ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
|
511
483
|
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${command}`)} yet.
|
|
512
484
|
Please use a direct connection to your database via the datasource \`directUrl\` setting.
|
|
513
485
|
|
|
514
|
-
More information about this limitation: ${(0,
|
|
486
|
+
More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/accelerate-limitations")}
|
|
515
487
|
`;
|
|
516
488
|
function checkUnsupportedDataProxy({
|
|
517
489
|
cmd,
|
|
@@ -524,7 +496,7 @@ function checkUnsupportedDataProxy({
|
|
|
524
496
|
}
|
|
525
497
|
}
|
|
526
498
|
if (!schemaContext?.primaryDatasource) return;
|
|
527
|
-
const url = (0,
|
|
499
|
+
const url = (0, import_chunk_D7L3VT6R.resolveUrl)((0, import_chunk_D7L3VT6R.getEffectiveUrl)(schemaContext.primaryDatasource));
|
|
528
500
|
if (url?.startsWith("prisma://")) {
|
|
529
501
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
530
502
|
}
|
|
@@ -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_ZEBJSCAV_exports = {};
|
|
20
|
+
__export(chunk_ZEBJSCAV_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_ZEBJSCAV_exports);
|
|
24
|
+
var import_chunk_QQRYY5P4 = require("./chunk-QQRYY5P4.js");
|
|
25
|
+
var packageJson = (0, import_chunk_QQRYY5P4.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_ZVTQSH5K_exports = {};
|
|
30
|
+
__export(chunk_ZVTQSH5K_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_ZVTQSH5K_exports);
|
|
37
|
+
var import_chunk_MUZJUPDX = require("./chunk-MUZJUPDX.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_MUZJUPDX.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|