@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_57XKRBO4_exports = {};
|
|
20
|
+
__export(chunk_57XKRBO4_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_57XKRBO4_exports);
|
|
24
24
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
25
25
|
var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
27
27
|
module2.exports = {
|
|
28
28
|
name: "@prisma/internals",
|
|
29
|
-
version: "6.20.0-dev.
|
|
29
|
+
version: "6.20.0-dev.9",
|
|
30
30
|
description: "This package is intended for Prisma's internal use",
|
|
31
31
|
main: "dist/index.js",
|
|
32
32
|
types: "dist/index.d.ts",
|
|
@@ -48,7 +48,6 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
48
48
|
files: [
|
|
49
49
|
"README.md",
|
|
50
50
|
"dist",
|
|
51
|
-
"!**/libquery_engine*",
|
|
52
51
|
"!dist/get-generators/engines/*",
|
|
53
52
|
"scripts"
|
|
54
53
|
],
|
|
@@ -59,12 +58,11 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
59
58
|
"@swc/jest": "0.2.37",
|
|
60
59
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
|
61
60
|
"@types/jest": "29.5.14",
|
|
62
|
-
"@types/node": "
|
|
61
|
+
"@types/node": "~20.19.24",
|
|
63
62
|
"@types/resolve": "1.20.6",
|
|
64
63
|
archiver: "6.0.2",
|
|
65
64
|
"checkpoint-client": "1.1.33",
|
|
66
65
|
"cli-truncate": "4.0.0",
|
|
67
|
-
dotenv: "16.5.0",
|
|
68
66
|
empathic: "2.0.0",
|
|
69
67
|
"escape-string-regexp": "5.0.0",
|
|
70
68
|
execa: "8.0.1",
|
|
@@ -109,14 +107,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
109
107
|
"@prisma/generator": "workspace:*",
|
|
110
108
|
"@prisma/generator-helper": "workspace:*",
|
|
111
109
|
"@prisma/get-platform": "workspace:*",
|
|
112
|
-
"@prisma/prisma-schema-wasm": "6.20.0-
|
|
113
|
-
"@prisma/schema-engine-wasm": "6.20.0-
|
|
110
|
+
"@prisma/prisma-schema-wasm": "6.20.0-16.next-0c19ccc313cf9911a90d99d2ac2eb0280c76c513",
|
|
111
|
+
"@prisma/schema-engine-wasm": "6.20.0-16.next-0c19ccc313cf9911a90d99d2ac2eb0280c76c513",
|
|
114
112
|
"@prisma/schema-files-loader": "workspace:*",
|
|
115
113
|
arg: "5.0.2",
|
|
116
114
|
prompts: "2.4.2"
|
|
117
115
|
},
|
|
118
116
|
peerDependencies: {
|
|
119
|
-
typescript: ">=5.
|
|
117
|
+
typescript: ">=5.4.0"
|
|
120
118
|
},
|
|
121
119
|
peerDependenciesMeta: {
|
|
122
120
|
typescript: {
|
|
@@ -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_5BRXEOYH_exports = {};
|
|
30
|
+
__export(chunk_5BRXEOYH_exports, {
|
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists,
|
|
32
32
|
fs_utils_exports: () => fs_utils_exports,
|
|
33
33
|
getFilesInDir: () => getFilesInDir,
|
|
@@ -36,9 +36,9 @@ __export(chunk_TQFONRJP_exports, {
|
|
|
36
36
|
removeEmptyDirs: () => removeEmptyDirs,
|
|
37
37
|
writeFile: () => writeFile
|
|
38
38
|
});
|
|
39
|
-
module.exports = __toCommonJS(
|
|
39
|
+
module.exports = __toCommonJS(chunk_5BRXEOYH_exports);
|
|
40
40
|
var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_YV4IFLW4 = require("./chunk-YV4IFLW4.js");
|
|
42
42
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
43
43
|
var import_promises = __toESM(require("fs/promises"));
|
|
44
44
|
var import_path = __toESM(require("path"));
|
|
@@ -51,7 +51,7 @@ var fs_utils_exports = {};
|
|
|
51
51
|
removeEmptyDirs: () => removeEmptyDirs,
|
|
52
52
|
writeFile: () => writeFile
|
|
53
53
|
});
|
|
54
|
-
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
54
|
+
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_YV4IFLW4.require_globby)());
|
|
55
55
|
function createDirIfNotExists(dir) {
|
|
56
56
|
return import_promises.default.mkdir(dir, { recursive: true });
|
|
57
57
|
}
|
|
@@ -16,21 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_5I4ERIIY_exports = {};
|
|
20
|
+
__export(chunk_5I4ERIIY_exports, {
|
|
21
21
|
binaryTypeToEngineType: () => binaryTypeToEngineType
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_5I4ERIIY_exports);
|
|
24
24
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
25
25
|
function binaryTypeToEngineType(binaryType) {
|
|
26
26
|
if (binaryType === import_fetch_engine.BinaryType.SchemaEngineBinary) {
|
|
27
27
|
return "schemaEngine";
|
|
28
28
|
}
|
|
29
|
-
if (binaryType === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
30
|
-
return "libqueryEngine";
|
|
31
|
-
}
|
|
32
|
-
if (binaryType === import_fetch_engine.BinaryType.QueryEngineBinary) {
|
|
33
|
-
return "queryEngine";
|
|
34
|
-
}
|
|
35
29
|
throw new Error(`Could not convert binary type ${binaryType}`);
|
|
36
30
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_5SAWCTGN_exports = {};
|
|
20
|
+
__export(chunk_5SAWCTGN_exports, {
|
|
21
|
+
ConfigValidationError: () => ConfigValidationError,
|
|
22
|
+
validatePrismaConfigWithDatasource: () => validatePrismaConfigWithDatasource
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(chunk_5SAWCTGN_exports);
|
|
25
|
+
var import_chunk_ANU3HEGF = require("./chunk-ANU3HEGF.js");
|
|
26
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
27
|
+
var ConfigValidationError = class extends Error {
|
|
28
|
+
constructor(message) {
|
|
29
|
+
super(message);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
(0, import_chunk_ANU3HEGF.setClassName)(ConfigValidationError, "ConfigValidationError");
|
|
33
|
+
function isValidPrismaConfig(prismaConfig) {
|
|
34
|
+
return prismaConfig.datasource !== void 0;
|
|
35
|
+
}
|
|
36
|
+
function validatePrismaConfigWithDatasource({
|
|
37
|
+
config,
|
|
38
|
+
cmd
|
|
39
|
+
}) {
|
|
40
|
+
if (!isValidPrismaConfig(config)) {
|
|
41
|
+
throw new ConfigValidationError(
|
|
42
|
+
`The ${(0, import_chunk_PG5FDKSF.red)(`datasource`)} property is required in your Prisma config file when using ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)}.`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
return config;
|
|
46
|
+
}
|
|
@@ -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_63BLJTNP_exports = {};
|
|
30
|
+
__export(chunk_63BLJTNP_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_63BLJTNP_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_UUZVVTOP = require("./chunk-UUZVVTOP.js");
|
|
38
|
+
var import_chunk_XV3WHAKH = require("./chunk-XV3WHAKH.js");
|
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -58,25 +58,25 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_UUZVVTOP.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
async function getDMMF(options) {
|
|
66
|
-
const debugErrorType = (0,
|
|
66
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
|
67
67
|
debug(`Using getDmmf Wasm`);
|
|
68
68
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
69
69
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
70
70
|
() => {
|
|
71
|
-
if (process.env.
|
|
71
|
+
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_XV3WHAKH.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_XV3WHAKH.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
@@ -124,7 +124,7 @@ async function getDMMF(options) {
|
|
|
124
124
|
return panic;
|
|
125
125
|
}
|
|
126
126
|
const errorOutput = e.error.message;
|
|
127
|
-
return new GetDmmfError((0,
|
|
127
|
+
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
128
128
|
}).with({ type: "parse-json" }, (e) => {
|
|
129
129
|
debugErrorType(e);
|
|
130
130
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
|
@@ -16,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_6AOQ56XS_exports = {};
|
|
20
|
+
__export(chunk_6AOQ56XS_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_6AOQ56XS_exports);
|
|
24
|
+
var import_chunk_57XKRBO4 = require("./chunk-57XKRBO4.js");
|
|
25
|
+
var packageJson = (0, import_chunk_57XKRBO4.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_6XDWK3XF_exports = {};
|
|
30
|
+
__export(chunk_6XDWK3XF_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_6XDWK3XF_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_UUZVVTOP = require("./chunk-UUZVVTOP.js");
|
|
39
|
+
var import_chunk_XV3WHAKH = require("./chunk-XV3WHAKH.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_UUZVVTOP.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_XV3WHAKH.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_X24HKSTU.prismaSchemaWasm.get_config(params);
|
|
101
|
-
return data;
|
|
78
|
+
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
+
return import_chunk_XV3WHAKH.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) => {
|
|
@@ -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_7AMQW56E_exports = {};
|
|
30
|
+
__export(chunk_7AMQW56E_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_7AMQW56E_exports);
|
|
37
|
+
var import_chunk_57XKRBO4 = require("./chunk-57XKRBO4.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_57XKRBO4.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -26,13 +26,12 @@ 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_ARC7TW3L_exports = {};
|
|
30
|
+
__export(chunk_ARC7TW3L_exports, {
|
|
31
31
|
getGeneratorSuccessMessage: () => getGeneratorSuccessMessage
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_ARC7TW3L_exports);
|
|
34
34
|
var import_chunk_XYCIH36R = require("./chunk-XYCIH36R.js");
|
|
35
|
-
var import_chunk_ERSH2BQA = require("./chunk-ERSH2BQA.js");
|
|
36
35
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
37
36
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
38
37
|
var import_path = __toESM(require("path"));
|
|
@@ -45,16 +44,7 @@ function getGeneratorSuccessMessage(generator, time) {
|
|
|
45
44
|
function formatVersion(generator) {
|
|
46
45
|
const version = generator.manifest?.version;
|
|
47
46
|
if (generator.getProvider() === "prisma-client-js") {
|
|
48
|
-
|
|
49
|
-
let engineHint = "";
|
|
50
|
-
if (generator.options?.noEngine) {
|
|
51
|
-
engineHint = ", engine=none";
|
|
52
|
-
} else if (engineType === "binary") {
|
|
53
|
-
engineHint = ", engine=binary";
|
|
54
|
-
} else if (engineType === "library") {
|
|
55
|
-
engineHint = "";
|
|
56
|
-
}
|
|
57
|
-
return `v${version ?? "?.?.?"}${engineHint}`;
|
|
47
|
+
return `v${version ?? "?.?.?"}`;
|
|
58
48
|
}
|
|
59
49
|
return version;
|
|
60
50
|
}
|
|
@@ -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_AYH4F3GT_exports = {};
|
|
20
|
+
__export(chunk_AYH4F3GT_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_AYH4F3GT_exports);
|
|
24
|
+
var import_chunk_NHM75P2J = require("./chunk-NHM75P2J.js");
|
|
25
|
+
var packageJson = (0, import_chunk_NHM75P2J.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -16,22 +16,21 @@ 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_BGMZPA2F_exports = {};
|
|
20
|
+
__export(chunk_BGMZPA2F_exports, {
|
|
21
21
|
missingDatasource: () => missingDatasource
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_BGMZPA2F_exports);
|
|
24
24
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
25
|
-
var
|
|
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
|
-
url = env("DB_URL")
|
|
35
34
|
}`)
|
|
36
35
|
)}
|
|
37
36
|
|