@prisma/internals 6.19.0-integration-next.13 → 6.19.0-integration-feat-remove-library-engine.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-FC6CQUSK.js → chunk-22HIO2UL.js} +7 -7
- package/dist/{chunk-JOIIWB3U.js → chunk-2LOGW45F.js} +68 -33
- 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-B22EOFPW.js → chunk-5I4ERIIY.js} +3 -6
- package/dist/{chunk-5XFNC2RY.js → chunk-5MHUYAV3.js} +9 -9
- package/dist/{chunk-HD2CUQO5.js → chunk-AQ2QRXAM.js} +7 -7
- package/dist/{chunk-GSH4BXBI.js → chunk-BUQN4WLU.js} +6 -6
- package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
- package/dist/{chunk-HQAD5FY2.js → chunk-CJXYAE63.js} +5 -5
- package/dist/{chunk-EL4E3FQN.js → chunk-DDPSHUGC.js} +7 -7
- package/dist/{chunk-JD6JN3KX.js → chunk-DPCJTLZB.js} +8 -8
- package/dist/chunk-DYV47NUW.js +796 -0
- package/dist/{chunk-M63PXCZW.js → chunk-ENSTA5BR.js} +5 -5
- package/dist/{chunk-NSWABV42.js → chunk-EQCNGCBN.js} +8 -8
- package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
- package/dist/{chunk-VRGMXDRD.js → chunk-GJSFP4V4.js} +3 -6
- package/dist/{chunk-MURRA56K.js → chunk-GOBSH7KK.js} +5 -5
- package/dist/{chunk-SRZLJFU4.js → chunk-H5STSTVK.js} +7 -16
- package/dist/{chunk-7QC5VORA.js → chunk-H6PPJ5PX.js} +7 -7
- package/dist/{chunk-FYZCPL2Z.js → chunk-HNRMSI3R.js} +5 -8
- package/dist/{chunk-BJUIZZOW.js → chunk-HUWPK3JK.js} +32 -47
- package/dist/{chunk-D4VDA2TZ.js → chunk-IRWX4FCC.js} +6 -6
- package/dist/{chunk-KIFFN3IT.js → chunk-IU77SCOB.js} +9 -9
- package/dist/{chunk-HZ6U2UGL.js → chunk-JAPMBAH4.js} +8 -8
- package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
- package/dist/{chunk-VPVHYF3V.js → chunk-KX7TWSN7.js} +5 -5
- package/dist/{chunk-H7KAU5SR.js → chunk-LQIZ6LUX.js} +32 -47
- package/dist/{chunk-VIEJEAGW.js → chunk-MBVCEWIU.js} +5 -5
- package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
- package/dist/{chunk-TQFONRJP.js → chunk-MXAUURHG.js} +5 -5
- package/dist/{chunk-JWIV6YDD.js → chunk-NKHMKW44.js} +5 -5
- package/dist/{chunk-CAYOFOK7.js → chunk-NYK3WNI7.js} +8 -8
- package/dist/{chunk-EGJS32NP.js → chunk-O2SQX5UZ.js} +8 -8
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-XTWFEQXH.js → chunk-RKD25AFG.js} +5 -5
- package/dist/{chunk-RCQOUZB5.js → chunk-TRKBPEU4.js} +6 -6
- package/dist/{chunk-75BIJ5PX.js → chunk-UB2X7DGZ.js} +9 -9
- package/dist/{chunk-S553BGWR.js → chunk-UU3BLTM2.js} +5 -5
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/{chunk-UHI6VYFX.js → chunk-WJKBKH3Y.js} +5 -5
- package/dist/{chunk-6ASAML6M.js → chunk-WPXOKUNQ.js} +5 -5
- package/dist/{chunk-ZVZOKBG4.js → chunk-YQ2FQ7HK.js} +8 -8
- package/dist/cli/checkUnsupportedDataProxy.js +47 -49
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +47 -49
- package/dist/cli/schemaContext.js +47 -49
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +46 -48
- 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.js +7 -9
- package/dist/engine-commands/index.js +58 -60
- 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.js +49 -51
- 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 +88 -95
- 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/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +8 -8
- package/dist/utils/link.js +2 -2
- package/dist/utils/missingDatasource.js +5 -5
- package/dist/utils/missingGeneratorMessage.js +7 -7
- package/dist/wasm.js +5 -5
- package/package.json +13 -13
- 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,18 +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_GJSFP4V4_exports = {};
|
|
20
|
+
__export(chunk_GJSFP4V4_exports, {
|
|
21
21
|
engineTypeToBinaryType: () => engineTypeToBinaryType
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_GJSFP4V4_exports);
|
|
24
24
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
25
25
|
function engineTypeToBinaryType(engineType) {
|
|
26
26
|
if (engineType === "schemaEngine") {
|
|
27
27
|
return import_fetch_engine.BinaryType.SchemaEngineBinary;
|
|
28
28
|
}
|
|
29
|
-
if (engineType === "libqueryEngine") {
|
|
30
|
-
return import_fetch_engine.BinaryType.QueryEngineLibrary;
|
|
31
|
-
}
|
|
32
29
|
throw new Error(`Could not convert engine type ${engineType}`);
|
|
33
30
|
}
|
|
@@ -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_GOBSH7KK_exports = {};
|
|
20
|
+
__export(chunk_GOBSH7KK_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_GOBSH7KK_exports);
|
|
24
|
+
var import_chunk_RKD25AFG = require("./chunk-RKD25AFG.js");
|
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_RKD25AFG.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -16,29 +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_H5STSTVK_exports = {};
|
|
20
|
+
__export(chunk_H5STSTVK_exports, {
|
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var import_chunk_6TTRTZXU = require("./chunk-6TTRTZXU.js");
|
|
24
|
+
module.exports = __toCommonJS(chunk_H5STSTVK_exports);
|
|
26
25
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
27
|
-
var
|
|
26
|
+
var import_chunk_HNRMSI3R = require("./chunk-HNRMSI3R.js");
|
|
28
27
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
29
28
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
30
|
-
var import_get_platform = require("@prisma/get-platform");
|
|
31
29
|
async function getEngineVersion(enginePath, binaryName) {
|
|
32
|
-
enginePath = await (0,
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
(0, import_get_platform.assertNodeAPISupported)();
|
|
36
|
-
const QE = (0, import_chunk_6TTRTZXU.loadLibrary)(enginePath, platformInfo);
|
|
37
|
-
return `${import_fetch_engine.BinaryType.QueryEngineLibrary} ${QE.version().commit}`;
|
|
38
|
-
} else {
|
|
39
|
-
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
40
|
-
return stdout;
|
|
41
|
-
}
|
|
30
|
+
enginePath = await (0, import_chunk_HNRMSI3R.resolveBinary)(binaryName ?? import_fetch_engine.BinaryType.SchemaEngineBinary, enginePath);
|
|
31
|
+
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
32
|
+
return stdout;
|
|
42
33
|
}
|
|
43
34
|
function safeGetEngineVersion(enginePath, binaryName) {
|
|
44
35
|
return (0, import_chunk_5DBOS77Y.tryCatch2)(
|
|
@@ -16,25 +16,25 @@ 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_H6PPJ5PX_exports = {};
|
|
20
|
+
__export(chunk_H6PPJ5PX_exports, {
|
|
21
21
|
missingDatasource: () => missingDatasource
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_H6PPJ5PX_exports);
|
|
24
|
+
var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
|
|
25
|
+
var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
|
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
27
27
|
var missingDatasource = `
|
|
28
28
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("datasource")} defined in your ${(0, import_chunk_PG5FDKSF.bold)("schema.prisma")}.
|
|
29
29
|
You can define a datasource like this:
|
|
30
30
|
|
|
31
31
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
32
|
-
(0,
|
|
32
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`datasource db {
|
|
33
33
|
provider = "postgresql"
|
|
34
34
|
url = env("DB_URL")
|
|
35
35
|
}`)
|
|
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,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_HNRMSI3R_exports = {};
|
|
30
|
+
__export(chunk_HNRMSI3R_exports, {
|
|
31
31
|
BinaryType: () => import_fetch_engine.BinaryType,
|
|
32
32
|
engineEnvVarMap: () => import_fetch_engine.engineEnvVarMap,
|
|
33
33
|
maybeCopyToTmp: () => maybeCopyToTmp,
|
|
34
34
|
resolveBinary: () => resolveBinary,
|
|
35
35
|
safeResolveBinary: () => safeResolveBinary
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(chunk_HNRMSI3R_exports);
|
|
38
38
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
39
|
-
var
|
|
39
|
+
var import_chunk_FF7OLLBP = require("./chunk-FF7OLLBP.js");
|
|
40
40
|
var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
|
|
41
41
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
42
42
|
var import_chunk_5VQNKCKW = require("./chunk-5VQNKCKW.js");
|
|
@@ -46,14 +46,11 @@ var import_fetch_engine = require("@prisma/fetch-engine");
|
|
|
46
46
|
var import_get_platform = require("@prisma/get-platform");
|
|
47
47
|
var import_fs = __toESM(require("fs"));
|
|
48
48
|
var import_path = __toESM(require("path"));
|
|
49
|
-
var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
49
|
+
var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_FF7OLLBP.require_lib)());
|
|
50
50
|
var import_temp_dir = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_5VQNKCKW.require_temp_dir)());
|
|
51
51
|
async function getBinaryName(name) {
|
|
52
52
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
53
53
|
const extension = binaryTarget === "windows" ? ".exe" : "";
|
|
54
|
-
if (name === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
55
|
-
return (0, import_get_platform.getNodeAPIName)(binaryTarget, "fs");
|
|
56
|
-
}
|
|
57
54
|
return `${name}-${binaryTarget}${extension}`;
|
|
58
55
|
}
|
|
59
56
|
async function resolveBinary(name, proposedPath) {
|
|
@@ -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_HUWPK3JK_exports = {};
|
|
30
|
+
__export(chunk_HUWPK3JK_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
|
33
33
|
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
|
@@ -36,40 +36,37 @@ __export(chunk_BJUIZZOW_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_HUWPK3JK_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_5XFNC2RY = require("./chunk-5XFNC2RY.js");
|
|
50
|
-
var import_chunk_B22EOFPW = require("./chunk-B22EOFPW.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
|
|
51
|
+
var import_chunk_H6PPJ5PX = require("./chunk-H6PPJ5PX.js");
|
|
52
|
+
var import_chunk_33K2EQQZ = require("./chunk-33K2EQQZ.js");
|
|
55
53
|
var import_chunk_6QTN4DDB = require("./chunk-6QTN4DDB.js");
|
|
56
|
-
var
|
|
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
|
|
56
|
+
var import_chunk_JAPMBAH4 = require("./chunk-JAPMBAH4.js");
|
|
57
|
+
var import_chunk_EQCNGCBN = require("./chunk-EQCNGCBN.js");
|
|
58
|
+
var import_chunk_WPXOKUNQ = require("./chunk-WPXOKUNQ.js");
|
|
59
|
+
var import_chunk_AQ2QRXAM = require("./chunk-AQ2QRXAM.js");
|
|
62
60
|
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
63
|
-
var
|
|
61
|
+
var import_chunk_CJXYAE63 = require("./chunk-CJXYAE63.js");
|
|
64
62
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
65
63
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
66
|
-
var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
|
|
67
64
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
68
65
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
69
66
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
70
67
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
71
68
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
72
|
-
var
|
|
69
|
+
var import_chunk_32LLAKF4 = require("./chunk-32LLAKF4.js");
|
|
73
70
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
74
71
|
var import_path = __toESM(require("path"));
|
|
75
72
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -82,7 +79,7 @@ var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
|
|
|
82
79
|
Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
|
|
83
80
|
defining an ${(0, import_chunk_PG5FDKSF.green)(`adapter`)} in Prisma config file (e.g., ${(0, import_chunk_PG5FDKSF.green)(`\`prisma.config.ts\``)}).
|
|
84
81
|
|
|
85
|
-
More information about this limitation: ${(0,
|
|
82
|
+
More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/schema-engine-limitations")}
|
|
86
83
|
`;
|
|
87
84
|
function checkUnsupportedSchemaEngineWasm({
|
|
88
85
|
cmd,
|
|
@@ -103,7 +100,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
103
100
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
104
101
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
105
102
|
handleFormatPanic(() => {
|
|
106
|
-
|
|
103
|
+
import_chunk_CJXYAE63.prismaSchemaWasm.debug_panic();
|
|
107
104
|
});
|
|
108
105
|
}
|
|
109
106
|
const defaultFormattingOptions = {
|
|
@@ -120,10 +117,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
120
117
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
121
118
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
122
119
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
123
|
-
const lintDiagnostics2 = (0,
|
|
120
|
+
const lintDiagnostics2 = (0, import_chunk_WPXOKUNQ.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
124
121
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
125
122
|
});
|
|
126
|
-
const lintWarnings = (0,
|
|
123
|
+
const lintWarnings = (0, import_chunk_WPXOKUNQ.getLintWarningsAsText)(lintDiagnostics);
|
|
127
124
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
128
125
|
console.warn(lintWarnings);
|
|
129
126
|
}
|
|
@@ -150,7 +147,7 @@ function handleFormatPanic(tryCb) {
|
|
|
150
147
|
}
|
|
151
148
|
}
|
|
152
149
|
function formatWasm(schema, documentFormattingParams) {
|
|
153
|
-
const formattedSchema =
|
|
150
|
+
const formattedSchema = import_chunk_CJXYAE63.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
154
151
|
return formattedSchema;
|
|
155
152
|
}
|
|
156
153
|
async function loadSchemaContext({
|
|
@@ -190,7 +187,7 @@ async function processSchemaResult({
|
|
|
190
187
|
if (printLoadMessage) {
|
|
191
188
|
(0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
192
189
|
}
|
|
193
|
-
const configFromPsl = await (0,
|
|
190
|
+
const configFromPsl = await (0, import_chunk_JAPMBAH4.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
|
194
191
|
const datasourceFromPsl = configFromPsl.datasources.at(0);
|
|
195
192
|
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
|
|
196
193
|
const { url, directUrl, shadowDatabaseUrl } = datasource;
|
|
@@ -223,7 +220,7 @@ function getPrimaryDatasourceDirectory(primaryDatasource) {
|
|
|
223
220
|
}
|
|
224
221
|
return null;
|
|
225
222
|
}
|
|
226
|
-
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)());
|
|
227
224
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
228
225
|
async function getGenerators(options) {
|
|
229
226
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -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_EQCNGCBN.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,7 +308,7 @@ 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,
|
|
311
|
+
const datamodel = (0, import_chunk_AQ2QRXAM.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
315
312
|
const envPaths = (0, import_chunk_6QTN4DDB.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
|
316
313
|
const options2 = {
|
|
317
314
|
datamodel,
|
|
@@ -369,17 +366,16 @@ generator gen {
|
|
|
369
366
|
}
|
|
370
367
|
const generatorBinaryTargets = g.options?.generator?.binaryTargets;
|
|
371
368
|
if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
|
|
372
|
-
for (const
|
|
373
|
-
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value ===
|
|
374
|
-
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);
|
|
375
372
|
}
|
|
376
373
|
}
|
|
377
374
|
}
|
|
378
375
|
}
|
|
379
376
|
}
|
|
380
|
-
const queryEngineType = (0, import_chunk_B22EOFPW.binaryTypeToEngineType)(import_chunk_FYZCPL2Z.BinaryType.QueryEngineLibrary);
|
|
381
377
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
382
|
-
const { binaryPathsByVersion
|
|
378
|
+
const { binaryPathsByVersion } = await (0, import_chunk_5MHUYAV3.getBinaryPathsByVersion)({
|
|
383
379
|
neededVersions,
|
|
384
380
|
// We're lazily computing the binary target here, to avoid printing the
|
|
385
381
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -400,17 +396,6 @@ generator gen {
|
|
|
400
396
|
const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
|
|
401
397
|
debug2({ generatorBinaryPaths });
|
|
402
398
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
403
|
-
if (engineVersion !== version2 && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
404
|
-
const customDmmf = await (0, import_chunk_EGJS32NP.getDMMF)({
|
|
405
|
-
datamodel: schemaContext.schemaFiles,
|
|
406
|
-
previewFeatures
|
|
407
|
-
});
|
|
408
|
-
const options2 = { ...generator.options, dmmf: customDmmf };
|
|
409
|
-
debug2("generator.manifest.prettyName", generator.manifest.prettyName);
|
|
410
|
-
debug2("options", options2);
|
|
411
|
-
debug2("options.generator.binaryTargets", options2.generator.binaryTargets);
|
|
412
|
-
generator.setOptions(options2);
|
|
413
|
-
}
|
|
414
399
|
}
|
|
415
400
|
}
|
|
416
401
|
return generators;
|
|
@@ -498,7 +483,7 @@ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
|
498
483
|
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${command}`)} yet.
|
|
499
484
|
Please use a direct connection to your database via the datasource \`directUrl\` setting.
|
|
500
485
|
|
|
501
|
-
More information about this limitation: ${(0,
|
|
486
|
+
More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/accelerate-limitations")}
|
|
502
487
|
`;
|
|
503
488
|
function checkUnsupportedDataProxy({
|
|
504
489
|
cmd,
|
|
@@ -511,7 +496,7 @@ function checkUnsupportedDataProxy({
|
|
|
511
496
|
}
|
|
512
497
|
}
|
|
513
498
|
if (!schemaContext?.primaryDatasource) return;
|
|
514
|
-
const url = (0,
|
|
499
|
+
const url = (0, import_chunk_JAPMBAH4.resolveUrl)((0, import_chunk_JAPMBAH4.getEffectiveUrl)(schemaContext.primaryDatasource));
|
|
515
500
|
if (url?.startsWith("prisma://")) {
|
|
516
501
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
517
502
|
}
|
|
@@ -26,18 +26,18 @@ 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_IRWX4FCC_exports = {};
|
|
30
|
+
__export(chunk_IRWX4FCC_exports, {
|
|
31
31
|
locateLocalCloudflareD1: () => locateLocalCloudflareD1
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_IRWX4FCC_exports);
|
|
34
34
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_2LOGW45F = require("./chunk-2LOGW45F.js");
|
|
36
36
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
37
37
|
var import_node_path = __toESM(require("node:path"));
|
|
38
38
|
var import_node_process = __toESM(require("node:process"));
|
|
39
|
-
var import_fast_glob = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
40
|
-
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
39
|
+
var import_fast_glob = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_2LOGW45F.require_out)());
|
|
40
|
+
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_2LOGW45F.require_globby)());
|
|
41
41
|
var defaultD1DirPath = import_node_path.default.join(".wrangler", "state", "v3", "d1", "miniflare-D1DatabaseObject");
|
|
42
42
|
async function locateLocalCloudflareD1({ arg }) {
|
|
43
43
|
const cwd = import_node_process.default.cwd();
|
|
@@ -26,19 +26,19 @@ 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_IU77SCOB_exports = {};
|
|
30
|
+
__export(chunk_IU77SCOB_exports, {
|
|
31
31
|
handlePanic: () => handlePanic
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_IU77SCOB_exports);
|
|
34
|
+
var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
|
|
35
35
|
var import_chunk_7IKUTPWQ = require("./chunk-7IKUTPWQ.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
36
|
+
var import_chunk_R3J2O23S = require("./chunk-R3J2O23S.js");
|
|
37
|
+
var import_chunk_BUQN4WLU = require("./chunk-BUQN4WLU.js");
|
|
38
38
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
39
39
|
var import_prompts = __toESM(require("prompts"));
|
|
40
40
|
async function handlePanic(args) {
|
|
41
|
-
if (!(0,
|
|
41
|
+
if (!(0, import_chunk_R3J2O23S.canPrompt)()) {
|
|
42
42
|
throw args.error;
|
|
43
43
|
}
|
|
44
44
|
await panicDialog(args);
|
|
@@ -56,7 +56,7 @@ ${(0, import_chunk_PG5FDKSF.red)(errorMessage)}
|
|
|
56
56
|
|
|
57
57
|
${(0, import_chunk_PG5FDKSF.bold)("Please help us improve Prisma by submitting an error report.")}
|
|
58
58
|
${(0, import_chunk_PG5FDKSF.bold)("Error reports never contain personal or other sensitive information.")}
|
|
59
|
-
${(0, import_chunk_PG5FDKSF.dim)(`Learn more: ${(0,
|
|
59
|
+
${(0, import_chunk_PG5FDKSF.dim)(`Learn more: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/telemetry")}`)}
|
|
60
60
|
`);
|
|
61
61
|
const { value: shouldSubmitReport } = await (0, import_prompts.default)({
|
|
62
62
|
type: "select",
|
|
@@ -79,7 +79,7 @@ ${(0, import_chunk_PG5FDKSF.dim)(`Learn more: ${(0, import_chunk_I6WLABB2.link)(
|
|
|
79
79
|
if (shouldSubmitReport) {
|
|
80
80
|
try {
|
|
81
81
|
console.log("Submitting...");
|
|
82
|
-
const reportId = await (0,
|
|
82
|
+
const reportId = await (0, import_chunk_BUQN4WLU.sendPanic)({ error, cliVersion, enginesVersion, getDatabaseVersionSafe });
|
|
83
83
|
console.log(`
|
|
84
84
|
${(0, import_chunk_PG5FDKSF.bold)(`We successfully received the error report id: ${reportId}`)}`);
|
|
85
85
|
console.log(`
|
|
@@ -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_JAPMBAH4_exports = {};
|
|
30
|
+
__export(chunk_JAPMBAH4_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_JAPMBAH4_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_NKHMKW44 = require("./chunk-NKHMKW44.js");
|
|
42
|
+
var import_chunk_CJXYAE63 = require("./chunk-CJXYAE63.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_NKHMKW44.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_CJXYAE63.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_CJXYAE63.prismaSchemaWasm.get_config(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(e) => ({
|