@prisma/internals 5.19.0-dev.11 → 5.19.0-dev.13
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-QL3K6JIN.js → chunk-244YD7SK.js} +7 -7
- package/dist/{chunk-HAHFI7GL.js → chunk-34FTC6KK.js} +5 -5
- package/dist/{chunk-4M3AHCOO.js → chunk-42K3GPYJ.js} +5 -5
- package/dist/chunk-5XRQ7ONW.js +122 -0
- package/dist/{chunk-EMAUBLJD.js → chunk-6GTQHWWT.js} +6 -6
- package/dist/{chunk-CCD5D2JW.js → chunk-7KXMQZFT.js} +5 -5
- package/dist/{chunk-4A5ZK522.js → chunk-7MD6344A.js} +3 -3
- package/dist/{chunk-GHYJGM56.js → chunk-7SPHTPDV.js} +5 -5
- package/dist/{chunk-LUUFBSA2.js → chunk-CNKDIKWK.js} +16 -16
- package/dist/{chunk-KCFSBF52.js → chunk-CYKOCRN3.js} +15 -15
- package/dist/{chunk-JCTCVFAA.js → chunk-D3G3WRZU.js} +5 -5
- package/dist/{chunk-DFSKQSBC.js → chunk-DQMYNBP3.js} +5 -5
- package/dist/{chunk-SLGMG65I.js → chunk-EBLDSWRI.js} +20 -14
- package/dist/{chunk-PN2OFBAO.js → chunk-G4BGJ6IP.js} +5 -5
- package/dist/{chunk-EYOPVHNV.js → chunk-HD4N22SB.js} +28 -28
- package/dist/{chunk-E6FM43YJ.js → chunk-I3YDYYM2.js} +15 -15
- package/dist/{chunk-KUMD5MBR.js → chunk-IAEMHQAC.js} +10 -10
- package/dist/{chunk-TSFUK6LA.js → chunk-IB5PDCFO.js} +5 -5
- package/dist/{chunk-UDMTZDUY.js → chunk-IJUVQMZY.js} +5 -5
- package/dist/{chunk-4SQQL7FD.js → chunk-IY43XBPH.js} +16 -16
- package/dist/{chunk-5A455CWA.js → chunk-JPEBIQUM.js} +40 -811
- package/dist/{chunk-FDUCE6NS.js → chunk-KBVBWTBF.js} +23 -23
- package/dist/{chunk-YBKMK4T5.js → chunk-KK64NLNR.js} +5 -5
- package/dist/chunk-NDEGWMVS.js +177 -0
- package/dist/{chunk-JJGVUZW5.js → chunk-NK2ML3NJ.js} +5 -5
- package/dist/chunk-NXIWDQBF.js +110 -0
- package/dist/{chunk-QOTVZEEZ.js → chunk-PFLLVWZX.js} +4 -4
- package/dist/chunk-QIVUAERL.js +2202 -0
- package/dist/{chunk-6P6S7JQT.js → chunk-QQJZI2CR.js} +22 -22
- package/dist/{chunk-YM3CE76B.js → chunk-S3323RUL.js} +48 -48
- package/dist/{chunk-JY7LTP35.js → chunk-TZ2WAB57.js} +23 -23
- package/dist/chunk-X4GRUQLB.js +166 -0
- package/dist/chunk-X6M256IK.js +54 -0
- package/dist/{chunk-LPRHB4FZ.js → chunk-XKRUNUS5.js} +22 -22
- package/dist/{chunk-233LCB7N.js → chunk-YIJ776AZ.js} +35 -35
- package/dist/cli/checkUnsupportedDataProxy.js +21 -21
- package/dist/cli/getSchema.js +26 -26
- package/dist/cli/hashes.js +21 -21
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +20 -20
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +8 -8
- package/dist/engine-commands/index.js +31 -31
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/validate.js +10 -10
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +20 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +20 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +20 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +21 -21
- package/dist/get-generators/getGenerators.js +23 -23
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.js +59 -59
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +20 -20
- package/dist/utils/fs-functional.js +9 -9
- package/dist/utils/getEnvPaths.js +20 -20
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +20 -20
- package/dist/utils/loadEnvFile.js +20 -20
- package/dist/wasm.js +4 -4
- package/package.json +9 -9
|
@@ -16,16 +16,16 @@ 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_244YD7SK_exports = {};
|
|
20
|
+
__export(chunk_244YD7SK_exports, {
|
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_244YD7SK_exports);
|
|
25
25
|
var import_chunk_S4LINK5Y = require("./chunk-S4LINK5Y.js");
|
|
26
26
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
|
27
|
-
var
|
|
28
|
-
var
|
|
27
|
+
var import_chunk_7SPHTPDV = require("./chunk-7SPHTPDV.js");
|
|
28
|
+
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
29
29
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
30
30
|
var import_engines = require("@prisma/engines");
|
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
@@ -35,7 +35,7 @@ async function getEngineVersion(enginePath, binaryName) {
|
|
|
35
35
|
if (!binaryName) {
|
|
36
36
|
binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
|
|
37
37
|
}
|
|
38
|
-
enginePath = await (0,
|
|
38
|
+
enginePath = await (0, import_chunk_7SPHTPDV.resolveBinary)(binaryName, enginePath);
|
|
39
39
|
const platformInfo = await (0, import_get_platform.getPlatformInfo)();
|
|
40
40
|
if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
41
41
|
(0, import_get_platform.assertNodeAPISupported)();
|
|
@@ -47,7 +47,7 @@ async function getEngineVersion(enginePath, binaryName) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
function safeGetEngineVersion(enginePath, binaryName) {
|
|
50
|
-
return (0,
|
|
50
|
+
return (0, import_chunk_7MD6344A.tryCatch2)(
|
|
51
51
|
() => getEngineVersion(enginePath, binaryName),
|
|
52
52
|
(error) => error
|
|
53
53
|
);
|
|
@@ -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_34FTC6KK_exports = {};
|
|
20
|
+
__export(chunk_34FTC6KK_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_34FTC6KK_exports);
|
|
24
|
+
var import_chunk_6GTQHWWT = require("./chunk-6GTQHWWT.js");
|
|
25
|
+
var packageJson = (0, import_chunk_6GTQHWWT.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_42K3GPYJ_exports = {};
|
|
20
|
+
__export(chunk_42K3GPYJ_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_42K3GPYJ_exports);
|
|
24
24
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
25
|
var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
@@ -69,7 +69,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
69
69
|
execa: "5.1.1",
|
|
70
70
|
"fast-glob": "3.3.2",
|
|
71
71
|
"find-up": "5.0.0",
|
|
72
|
-
"fp-ts": "2.16.
|
|
72
|
+
"fp-ts": "2.16.9",
|
|
73
73
|
"fs-extra": "11.1.1",
|
|
74
74
|
"fs-jetpack": "5.1.0",
|
|
75
75
|
"global-dirs": "4.0.0",
|
|
@@ -107,7 +107,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
107
107
|
"@prisma/fetch-engine": "workspace:*",
|
|
108
108
|
"@prisma/generator-helper": "workspace:*",
|
|
109
109
|
"@prisma/get-platform": "workspace:*",
|
|
110
|
-
"@prisma/prisma-schema-wasm": "5.19.0-
|
|
110
|
+
"@prisma/prisma-schema-wasm": "5.19.0-23.c356d1b4064663e128504e183e2b0cbe5fcdb063",
|
|
111
111
|
"@prisma/schema-files-loader": "workspace:*",
|
|
112
112
|
arg: "5.0.2",
|
|
113
113
|
prompts: "2.4.2"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_5XRQ7ONW_exports = {};
|
|
30
|
+
__export(chunk_5XRQ7ONW_exports, {
|
|
31
|
+
getBinaryPathsByVersion: () => getBinaryPathsByVersion
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(chunk_5XRQ7ONW_exports);
|
|
34
|
+
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
|
35
|
+
var import_chunk_4CGPN5SR = require("./chunk-4CGPN5SR.js");
|
|
36
|
+
var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
|
|
37
|
+
var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
|
|
38
|
+
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
|
39
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
40
|
+
var import_engines = require("@prisma/engines");
|
|
41
|
+
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
42
|
+
var import_path = __toESM2(require("path"));
|
|
43
|
+
var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QIVUAERL.require_lib)());
|
|
44
|
+
async function getBinaryPathsByVersion({
|
|
45
|
+
neededVersions,
|
|
46
|
+
binaryTarget,
|
|
47
|
+
version,
|
|
48
|
+
printDownloadProgress,
|
|
49
|
+
skipDownload,
|
|
50
|
+
binaryPathsOverride
|
|
51
|
+
}) {
|
|
52
|
+
const binaryPathsByVersion = /* @__PURE__ */ Object.create(null);
|
|
53
|
+
for (const currentVersion in neededVersions) {
|
|
54
|
+
binaryPathsByVersion[currentVersion] = {};
|
|
55
|
+
const neededVersion = neededVersions[currentVersion];
|
|
56
|
+
if (neededVersion.binaryTargets.length === 0) {
|
|
57
|
+
neededVersion.binaryTargets = [{ fromEnvVar: null, value: binaryTarget }];
|
|
58
|
+
}
|
|
59
|
+
if (process.env.NETLIFY) {
|
|
60
|
+
const isNodeMajor20OrUp = parseInt(process.versions.node.split(".")[0]) >= 20;
|
|
61
|
+
const awsRuntimeVersion = (0, import_chunk_2SDPW6AX.parseAWSNodejsRuntimeEnvVarVersion)();
|
|
62
|
+
const isRuntimeEnvVar20OrUp = awsRuntimeVersion && awsRuntimeVersion >= 20;
|
|
63
|
+
const isRuntimeEnvVar18OrDown = awsRuntimeVersion && awsRuntimeVersion <= 18;
|
|
64
|
+
const isRhelBinaryTarget1xInNeededVersions = neededVersion.binaryTargets.find(
|
|
65
|
+
(object) => object.value === "rhel-openssl-1.0.x"
|
|
66
|
+
);
|
|
67
|
+
const isRhelBinaryTarget3xInNeededVersions = neededVersion.binaryTargets.find(
|
|
68
|
+
(object) => object.value === "rhel-openssl-3.0.x"
|
|
69
|
+
);
|
|
70
|
+
if (!isRhelBinaryTarget3xInNeededVersions && (isNodeMajor20OrUp || isRuntimeEnvVar20OrUp) && !isRuntimeEnvVar18OrDown) {
|
|
71
|
+
neededVersion.binaryTargets.push({
|
|
72
|
+
fromEnvVar: null,
|
|
73
|
+
value: "rhel-openssl-3.0.x"
|
|
74
|
+
});
|
|
75
|
+
} else if (!isRhelBinaryTarget1xInNeededVersions) {
|
|
76
|
+
neededVersion.binaryTargets.push({
|
|
77
|
+
fromEnvVar: null,
|
|
78
|
+
value: "rhel-openssl-1.0.x"
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
let binaryTargetBaseDir = eval(`require('path').join(__dirname, '..')`);
|
|
83
|
+
if (version !== currentVersion) {
|
|
84
|
+
binaryTargetBaseDir = import_path.default.join(binaryTargetBaseDir, `./engines/${currentVersion}/`);
|
|
85
|
+
await (0, import_fs_extra.ensureDir)(binaryTargetBaseDir).catch((e) => console.error(e));
|
|
86
|
+
}
|
|
87
|
+
const binariesConfig = neededVersion.engines.reduce((acc, curr) => {
|
|
88
|
+
if (!binaryPathsOverride?.[curr]) {
|
|
89
|
+
acc[(0, import_chunk_4CGPN5SR.engineTypeToBinaryType)(curr)] = binaryTargetBaseDir;
|
|
90
|
+
}
|
|
91
|
+
return acc;
|
|
92
|
+
}, /* @__PURE__ */ Object.create(null));
|
|
93
|
+
if (Object.values(binariesConfig).length > 0) {
|
|
94
|
+
const binaryTargets = neededVersion.binaryTargets.map(
|
|
95
|
+
(binaryTarget2) => binaryTarget2.value
|
|
96
|
+
);
|
|
97
|
+
const downloadParams = {
|
|
98
|
+
binaries: binariesConfig,
|
|
99
|
+
binaryTargets,
|
|
100
|
+
showProgress: typeof printDownloadProgress === "boolean" ? printDownloadProgress : true,
|
|
101
|
+
version: currentVersion && currentVersion !== "latest" ? currentVersion : import_engines.enginesVersion,
|
|
102
|
+
skipDownload
|
|
103
|
+
};
|
|
104
|
+
const binaryPathsWithEngineType = await (0, import_fetch_engine.download)(downloadParams);
|
|
105
|
+
const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType, import_chunk_RS2R7COT.binaryTypeToEngineType);
|
|
106
|
+
binaryPathsByVersion[currentVersion] = binaryPaths;
|
|
107
|
+
}
|
|
108
|
+
if (binaryPathsOverride) {
|
|
109
|
+
const overrideEngines = Object.keys(binaryPathsOverride);
|
|
110
|
+
const enginesCoveredByOverride = neededVersion.engines.filter((engine) => overrideEngines.includes(engine));
|
|
111
|
+
if (enginesCoveredByOverride.length > 0) {
|
|
112
|
+
for (const engine of enginesCoveredByOverride) {
|
|
113
|
+
const enginePath = binaryPathsOverride[engine];
|
|
114
|
+
binaryPathsByVersion[currentVersion][engine] = {
|
|
115
|
+
[binaryTarget]: enginePath
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return binaryPathsByVersion;
|
|
122
|
+
}
|
|
@@ -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_6GTQHWWT_exports = {};
|
|
20
|
+
__export(chunk_6GTQHWWT_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_6GTQHWWT_exports);
|
|
24
24
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
25
|
var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
27
27
|
module2.exports = {
|
|
28
28
|
name: "@prisma/internals",
|
|
29
|
-
version: "5.19.0-dev.
|
|
29
|
+
version: "5.19.0-dev.13",
|
|
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",
|
|
@@ -69,7 +69,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
69
69
|
execa: "5.1.1",
|
|
70
70
|
"fast-glob": "3.3.2",
|
|
71
71
|
"find-up": "5.0.0",
|
|
72
|
-
"fp-ts": "2.16.
|
|
72
|
+
"fp-ts": "2.16.9",
|
|
73
73
|
"fs-extra": "11.1.1",
|
|
74
74
|
"fs-jetpack": "5.1.0",
|
|
75
75
|
"global-dirs": "4.0.0",
|
|
@@ -107,7 +107,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
107
107
|
"@prisma/fetch-engine": "workspace:*",
|
|
108
108
|
"@prisma/generator-helper": "workspace:*",
|
|
109
109
|
"@prisma/get-platform": "workspace:*",
|
|
110
|
-
"@prisma/prisma-schema-wasm": "5.19.0-
|
|
110
|
+
"@prisma/prisma-schema-wasm": "5.19.0-23.c356d1b4064663e128504e183e2b0cbe5fcdb063",
|
|
111
111
|
"@prisma/schema-files-loader": "workspace:*",
|
|
112
112
|
arg: "5.0.2",
|
|
113
113
|
prompts: "2.4.2"
|
|
@@ -16,21 +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_7KXMQZFT_exports = {};
|
|
20
|
+
__export(chunk_7KXMQZFT_exports, {
|
|
21
21
|
getLintWarnings: () => getLintWarnings,
|
|
22
22
|
getLintWarningsAsText: () => getLintWarningsAsText,
|
|
23
23
|
handleLintPanic: () => handleLintPanic,
|
|
24
24
|
lintSchema: () => lintSchema,
|
|
25
25
|
warningToString: () => warningToString
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(chunk_7KXMQZFT_exports);
|
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_IJUVQMZY = require("./chunk-IJUVQMZY.js");
|
|
30
30
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
31
31
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
32
32
|
function lintSchema({ schemas }) {
|
|
33
|
-
const lintResult =
|
|
33
|
+
const lintResult = import_chunk_IJUVQMZY.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
35
35
|
return lintDiagnostics;
|
|
36
36
|
}
|
|
@@ -16,8 +16,8 @@ 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_7MD6344A_exports = {};
|
|
20
|
+
__export(chunk_7MD6344A_exports, {
|
|
21
21
|
as: () => as,
|
|
22
22
|
asUnit: () => asUnit,
|
|
23
23
|
chain: () => chain,
|
|
@@ -41,7 +41,7 @@ __export(chunk_4A5ZK522_exports, {
|
|
|
41
41
|
tryCatch: () => tryCatch,
|
|
42
42
|
tryCatch2: () => tryCatch2
|
|
43
43
|
});
|
|
44
|
-
module.exports = __toCommonJS(
|
|
44
|
+
module.exports = __toCommonJS(chunk_7MD6344A_exports);
|
|
45
45
|
var __spreadArray = function(to, from, pack) {
|
|
46
46
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
47
47
|
if (ar || !(i in from)) {
|
|
@@ -26,19 +26,19 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_7SPHTPDV_exports = {};
|
|
30
|
+
__export(chunk_7SPHTPDV_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_7SPHTPDV_exports);
|
|
38
38
|
var import_chunk_RQPDQSHK = require("./chunk-RQPDQSHK.js");
|
|
39
39
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
40
40
|
var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
42
42
|
var import_chunk_TZCE3PWZ = require("./chunk-TZCE3PWZ.js");
|
|
43
43
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
44
44
|
var import_engines = require("@prisma/engines");
|
|
@@ -90,7 +90,7 @@ async function resolveBinary(name, proposedPath) {
|
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
function safeResolveBinary(name, proposedPath) {
|
|
93
|
-
return (0,
|
|
93
|
+
return (0, import_chunk_7MD6344A.tryCatch2)(
|
|
94
94
|
() => resolveBinary(name, proposedPath),
|
|
95
95
|
(error) => error
|
|
96
96
|
);
|
|
@@ -26,25 +26,25 @@ 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_CNKDIKWK_exports = {};
|
|
30
|
+
__export(chunk_CNKDIKWK_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_CNKDIKWK_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_DQMYNBP3 = require("./chunk-DQMYNBP3.js");
|
|
39
|
+
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_KK64NLNR = require("./chunk-KK64NLNR.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
|
-
var
|
|
43
|
+
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
47
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
47
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:validate");
|
|
49
49
|
var ValidateError = class extends Error {
|
|
50
50
|
constructor(params) {
|
|
@@ -60,25 +60,25 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: validate]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_DQMYNBP3.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "ValidateError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
function validate(options) {
|
|
68
|
-
const debugErrorType = (0,
|
|
68
|
+
const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "validateWasm");
|
|
69
69
|
debug(`Using validate Wasm`);
|
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
|
71
|
-
(0,
|
|
71
|
+
(0, import_chunk_7MD6344A.tryCatch)(
|
|
72
72
|
() => {
|
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
74
74
|
debug("Triggering a Rust panic...");
|
|
75
|
-
|
|
75
|
+
import_chunk_KK64NLNR.prismaSchemaWasm.debug_panic();
|
|
76
76
|
}
|
|
77
77
|
const params = JSON.stringify({
|
|
78
78
|
prismaSchema: options.schemas,
|
|
79
79
|
noColor: Boolean(process.env.NO_COLOR)
|
|
80
80
|
});
|
|
81
|
-
|
|
81
|
+
import_chunk_KK64NLNR.prismaSchemaWasm.validate(params);
|
|
82
82
|
},
|
|
83
83
|
(e) => ({
|
|
84
84
|
type: "wasm-error",
|
|
@@ -87,7 +87,7 @@ function validate(options) {
|
|
|
87
87
|
})
|
|
88
88
|
)
|
|
89
89
|
);
|
|
90
|
-
if ((0,
|
|
90
|
+
if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
const error = (0, import_chunk_H3T4L34H.$)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
|
@@ -113,7 +113,7 @@ function validate(options) {
|
|
|
113
113
|
return panic;
|
|
114
114
|
}
|
|
115
115
|
const errorOutput = e.error.message;
|
|
116
|
-
return new ValidateError((0,
|
|
116
|
+
return new ValidateError((0, import_chunk_IAEMHQAC.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
117
117
|
}).exhaustive();
|
|
118
118
|
throw error;
|
|
119
119
|
}
|
|
@@ -26,25 +26,25 @@ 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_CYKOCRN3_exports = {};
|
|
30
|
+
__export(chunk_CYKOCRN3_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_CYKOCRN3_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_NK2ML3NJ = require("./chunk-NK2ML3NJ.js");
|
|
39
|
+
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_IJUVQMZY = require("./chunk-IJUVQMZY.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
|
-
var
|
|
43
|
+
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
47
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
47
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:mergeSchemas");
|
|
49
49
|
var MergeSchemasError = class extends Error {
|
|
50
50
|
constructor(params) {
|
|
@@ -60,20 +60,20 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: mergeSchemas]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_NK2ML3NJ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "MergeSchemasError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
function mergeSchemas(options) {
|
|
68
|
-
const debugErrorType = (0,
|
|
68
|
+
const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
71
|
-
(0,
|
|
71
|
+
(0, import_chunk_7MD6344A.tryCatch)(
|
|
72
72
|
() => {
|
|
73
73
|
const params = JSON.stringify({
|
|
74
74
|
schema: options.schemas
|
|
75
75
|
});
|
|
76
|
-
return
|
|
76
|
+
return import_chunk_IJUVQMZY.prismaSchemaWasm.merge_schemas(params);
|
|
77
77
|
},
|
|
78
78
|
(e) => ({
|
|
79
79
|
type: "wasm-error",
|
|
@@ -82,7 +82,7 @@ function mergeSchemas(options) {
|
|
|
82
82
|
})
|
|
83
83
|
)
|
|
84
84
|
);
|
|
85
|
-
if ((0,
|
|
85
|
+
if ((0, import_chunk_7MD6344A.isRight)(mergeSchemasEither)) {
|
|
86
86
|
return mergeSchemasEither.right;
|
|
87
87
|
}
|
|
88
88
|
const error = (0, import_chunk_H3T4L34H.$)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
|
108
108
|
return panic;
|
|
109
109
|
}
|
|
110
110
|
const errorOutput = e.error.message;
|
|
111
|
-
return new MergeSchemasError((0,
|
|
111
|
+
return new MergeSchemasError((0, import_chunk_IAEMHQAC.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
112
112
|
}).exhaustive();
|
|
113
113
|
throw error;
|
|
114
114
|
}
|
|
@@ -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_D3G3WRZU_exports = {};
|
|
20
|
+
__export(chunk_D3G3WRZU_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_D3G3WRZU_exports);
|
|
24
|
+
var import_chunk_42K3GPYJ = require("./chunk-42K3GPYJ.js");
|
|
25
|
+
var packageJson = (0, import_chunk_42K3GPYJ.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_DQMYNBP3_exports = {};
|
|
20
|
+
__export(chunk_DQMYNBP3_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_DQMYNBP3_exports);
|
|
24
|
+
var import_chunk_D3G3WRZU = require("./chunk-D3G3WRZU.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_D3G3WRZU.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|