@prisma/internals 6.1.0-dev.3 → 6.1.0-dev.30
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-H3T4L34H.js → chunk-25RJ7YTB.js} +88 -83
- package/dist/{chunk-S4LINK5Y.js → chunk-2XRDQCIA.js} +5 -5
- package/dist/{chunk-HMGEWJDY.js → chunk-3BND5XB4.js} +232 -47
- package/dist/{chunk-JMZHUHCC.js → chunk-3DMEILBC.js} +13 -13
- package/dist/{chunk-X4K6SW2Y.js → chunk-433BZNLO.js} +13 -13
- package/dist/{chunk-D4MCOTL5.js → chunk-5XRQ7ONW.js} +5 -5
- package/dist/{chunk-I4467NNA.js → chunk-CXEMRKV4.js} +6 -6
- package/dist/{chunk-G7LL2H2O.js → chunk-EKBX4J6O.js} +7 -7
- package/dist/{chunk-2CHJ6JM2.js → chunk-FUWQQ4OU.js} +5 -5
- package/dist/{chunk-HM5POBB4.js → chunk-HANOM7ZO.js} +5 -5
- package/dist/{chunk-LEGPENYH.js → chunk-IMVWKJU5.js} +7 -7
- package/dist/{chunk-UIGFAS6M.js → chunk-IS6LGFUU.js} +14 -41
- package/dist/{chunk-6VXLRSIV.js → chunk-JB56QOGN.js} +13 -13
- package/dist/{chunk-GWBZ6Z6W.js → chunk-JXYVKREJ.js} +5 -5
- package/dist/{chunk-ZW637L2K.js → chunk-LEHBZGS4.js} +5 -5
- package/dist/{chunk-J4MA2JIK.js → chunk-N6K7M2HZ.js} +5 -5
- package/dist/{chunk-LVDENBX2.js → chunk-OBNSXASV.js} +5 -5
- package/dist/{chunk-WCWDW6XL.js → chunk-PQ4POE2Y.js} +36 -807
- package/dist/{chunk-7CXYD5ZJ.js → chunk-Q3MLJQAZ.js} +5 -5
- package/dist/{chunk-RQPDQSHK.js → chunk-QIVUAERL.js} +777 -4
- package/dist/{chunk-FPHZVRV4.js → chunk-QJZIYUVB.js} +5 -5
- package/dist/{chunk-SLBBRUQS.js → chunk-QTXYAZFX.js} +5 -5
- package/dist/{chunk-4RWCRJYD.js → chunk-TFSZCVKC.js} +5 -5
- package/dist/{chunk-HPF5G47V.js → chunk-UPIULDLZ.js} +5 -5
- package/dist/{chunk-ZADYZQO7.js → chunk-VJ46C5V4.js} +15 -15
- package/dist/{chunk-SODELJQA.js → chunk-VX7QGUBY.js} +14 -14
- package/dist/{chunk-HU3TYMTP.js → chunk-YNI2SMXZ.js} +5 -5
- package/dist/{chunk-26SJISVZ.js → chunk-YO2HQMQH.js} +6 -6
- package/dist/{chunk-EWWCVGRX.js → chunk-YOC6F62R.js} +5 -5
- package/dist/{chunk-UFRXTLJ3.js → chunk-YWSWNTSV.js} +14 -14
- package/dist/{chunk-UGN2IMJV.js → chunk-Z2BJHHA4.js} +36 -807
- package/dist/{chunk-XAL6KTHD.js → chunk-ZEJUQ43B.js} +14 -41
- package/dist/{chunk-W64BQ3QW.js → chunk-ZKQX4HDV.js} +15 -15
- package/dist/cli/checkUnsupportedDataProxy.js +25 -25
- package/dist/cli/getSchema.js +30 -30
- package/dist/cli/hashes.js +25 -25
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +24 -24
- package/dist/engine-commands/getConfig.js +12 -12
- package/dist/engine-commands/getDmmf.js +9 -9
- package/dist/engine-commands/getEngineVersion.js +8 -8
- package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
- package/dist/engine-commands/index.js +35 -35
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +9 -9
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +9 -9
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +24 -24
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +24 -24
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +25 -25
- package/dist/get-generators/getGenerators.js +27 -27
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/index.js +65 -65
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +24 -24
- package/dist/tracing/types.d.ts +26 -16
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/getEnvPaths.js +24 -24
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.js +3 -3
- package/dist/utils/handlePanic.js +24 -24
- package/dist/utils/load.js +4 -4
- package/dist/utils/loadEnvFile.js +24 -24
- package/dist/utils/tryLoadEnvs.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +10 -10
@@ -26,17 +26,17 @@ 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_QJZIYUVB_exports = {};
|
30
|
+
__export(chunk_QJZIYUVB_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_QJZIYUVB_exports);
|
38
38
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
39
|
-
var
|
39
|
+
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
40
40
|
var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
|
41
41
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
42
42
|
var import_chunk_TZCE3PWZ = require("./chunk-TZCE3PWZ.js");
|
@@ -46,7 +46,7 @@ var import_fetch_engine = require("@prisma/fetch-engine");
|
|
46
46
|
var import_get_platform = require("@prisma/get-platform");
|
47
47
|
var import_fs = __toESM2(require("fs"));
|
48
48
|
var import_path = __toESM2(require("path"));
|
49
|
-
var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
49
|
+
var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QIVUAERL.require_lib)());
|
50
50
|
var import_temp_dir = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_TZCE3PWZ.require_temp_dir)());
|
51
51
|
async function getBinaryName(name) {
|
52
52
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
@@ -26,14 +26,14 @@ 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_QTXYAZFX_exports = {};
|
30
|
+
__export(chunk_QTXYAZFX_exports, {
|
31
31
|
getGitHubIssueUrl: () => getGitHubIssueUrl,
|
32
32
|
wouldYouLikeToCreateANewIssue: () => wouldYouLikeToCreateANewIssue
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_QTXYAZFX_exports);
|
35
35
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
36
|
-
var
|
36
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
37
37
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
38
38
|
var import_get_platform = require("@prisma/get-platform");
|
39
39
|
var import_node_process = __toESM(require("node:process"));
|
@@ -379,7 +379,7 @@ function getGitHubIssueUrl({
|
|
379
379
|
});
|
380
380
|
}
|
381
381
|
async function wouldYouLikeToCreateANewIssue(options) {
|
382
|
-
const shouldCreateNewIssue = await (0,
|
382
|
+
const shouldCreateNewIssue = await (0, import_chunk_25RJ7YTB.z)(options.prompt).with(true, async () => {
|
383
383
|
const createNewIssueResponse = await (0, import_prompts.default)({
|
384
384
|
type: "select",
|
385
385
|
name: "value",
|
@@ -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_TFSZCVKC_exports = {};
|
20
|
+
__export(chunk_TFSZCVKC_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_TFSZCVKC_exports);
|
28
28
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
29
|
-
var
|
29
|
+
var import_chunk_QJZIYUVB = require("./chunk-QJZIYUVB.js");
|
30
30
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
32
32
|
var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
|
@@ -141,7 +141,7 @@ async function execaCommand({
|
|
141
141
|
schemaEnginePath,
|
142
142
|
engineCommandName
|
143
143
|
}) {
|
144
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
144
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_QJZIYUVB.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
145
145
|
try {
|
146
146
|
return await (0, import_execa.default)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
|
147
147
|
cwd,
|
@@ -26,12 +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_UPIULDLZ_exports = {};
|
30
|
+
__export(chunk_UPIULDLZ_exports, {
|
31
31
|
locateLocalCloudflareD1: () => locateLocalCloudflareD1
|
32
32
|
});
|
33
|
-
module.exports = __toCommonJS(
|
34
|
-
var
|
33
|
+
module.exports = __toCommonJS(chunk_UPIULDLZ_exports);
|
34
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
35
35
|
var import_chunk_KKMREGHN = require("./chunk-KKMREGHN.js");
|
36
36
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
37
37
|
var import_node_path = __toESM(require("node:path"));
|
@@ -50,7 +50,7 @@ async function locateLocalCloudflareD1({ arg }) {
|
|
50
50
|
);
|
51
51
|
}
|
52
52
|
if (d1Databases.length > 1) {
|
53
|
-
const { originalArg, recommendedArg } = (0,
|
53
|
+
const { originalArg, recommendedArg } = (0, import_chunk_25RJ7YTB.z)(arg).with("--to-local-d1", (originalArg2) => ({
|
54
54
|
originalArg: originalArg2,
|
55
55
|
recommendedArg: "--to-url file:"
|
56
56
|
})).with("--from-local-d1", (originalArg2) => ({
|
@@ -26,22 +26,22 @@ 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_VJ46C5V4_exports = {};
|
30
|
+
__export(chunk_VJ46C5V4_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_VJ46C5V4_exports);
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
39
|
-
var
|
39
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
40
40
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
41
|
-
var
|
41
|
+
var import_chunk_YNI2SMXZ = require("./chunk-YNI2SMXZ.js");
|
42
42
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
43
|
-
var
|
44
|
-
var
|
43
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
44
|
+
var import_chunk_Q3MLJQAZ = require("./chunk-Q3MLJQAZ.js");
|
45
45
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
46
46
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
47
47
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -53,7 +53,7 @@ var debug = (0, import_debug.default)("prisma:getConfig");
|
|
53
53
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
54
54
|
var GetConfigError = class extends Error {
|
55
55
|
constructor(params) {
|
56
|
-
const constructedErrorMessage = (0,
|
56
|
+
const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
57
57
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
58
58
|
return `${reason}
|
59
59
|
${errorCodeMessage}
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
65
65
|
}).exhaustive();
|
66
66
|
const errorMessageWithContext = `${constructedErrorMessage}
|
67
67
|
[Context: getConfig]`;
|
68
|
-
super((0,
|
68
|
+
super((0, import_chunk_YNI2SMXZ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
69
69
|
this.name = "GetConfigError";
|
70
70
|
}
|
71
71
|
};
|
@@ -83,14 +83,14 @@ function resolveUrl(envValue) {
|
|
83
83
|
return urlFromValue ?? urlEnvVarValue;
|
84
84
|
}
|
85
85
|
async function getConfig(options) {
|
86
|
-
const debugErrorType = (0,
|
86
|
+
const debugErrorType = (0, import_chunk_CXEMRKV4.createDebugErrorType)(debug, "getConfigWasm");
|
87
87
|
debug(`Using getConfig Wasm`);
|
88
88
|
const configEither = (0, import_function.pipe)(
|
89
89
|
(0, import_chunk_7MD6344A.tryCatch)(
|
90
90
|
() => {
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
92
92
|
debug("Triggering a Rust panic...");
|
93
|
-
|
93
|
+
import_chunk_Q3MLJQAZ.prismaSchemaWasm.debug_panic();
|
94
94
|
}
|
95
95
|
const params = JSON.stringify({
|
96
96
|
prismaSchema: options.datamodel,
|
@@ -98,7 +98,7 @@ async function getConfig(options) {
|
|
98
98
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
99
99
|
env: process.env
|
100
100
|
});
|
101
|
-
const data =
|
101
|
+
const data = import_chunk_Q3MLJQAZ.prismaSchemaWasm.get_config(params);
|
102
102
|
return data;
|
103
103
|
},
|
104
104
|
(e) => ({
|
@@ -140,7 +140,7 @@ async function getConfig(options) {
|
|
140
140
|
}
|
141
141
|
return Promise.resolve(data);
|
142
142
|
}
|
143
|
-
const error = (0,
|
143
|
+
const error = (0, import_chunk_25RJ7YTB.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
|
144
144
|
debugErrorType(e);
|
145
145
|
if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
|
146
146
|
const { message, stack } = (0, import_chunk_A4QWQE3W.getWasmError)(e.error);
|
@@ -160,12 +160,12 @@ async function getConfig(options) {
|
|
160
160
|
return panic;
|
161
161
|
}
|
162
162
|
const errorOutput = e.error.message;
|
163
|
-
return new GetConfigError((0,
|
163
|
+
return new GetConfigError((0, import_chunk_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
164
164
|
}).with({ type: "validation-error" }, (e) => {
|
165
165
|
return new GetConfigError({
|
166
166
|
_tag: "parsed",
|
167
167
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
168
|
-
reason: (0,
|
168
|
+
reason: (0, import_chunk_CXEMRKV4.createSchemaValidationError)(e.reason),
|
169
169
|
message: formatErrors(e.error)
|
170
170
|
});
|
171
171
|
}).otherwise((e) => {
|
@@ -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_VX7QGUBY_exports = {};
|
30
|
+
__export(chunk_VX7QGUBY_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_VX7QGUBY_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_YNI2SMXZ = require("./chunk-YNI2SMXZ.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
|
-
var
|
41
|
-
var
|
40
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
41
|
+
var import_chunk_Q3MLJQAZ = require("./chunk-Q3MLJQAZ.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -48,7 +48,7 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:validate");
|
49
49
|
var ValidateError = class extends Error {
|
50
50
|
constructor(params) {
|
51
|
-
const constructedErrorMessage = (0,
|
51
|
+
const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
52
52
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
53
53
|
return `${reason}
|
54
54
|
${errorCodeMessage}
|
@@ -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_YNI2SMXZ.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_CXEMRKV4.createDebugErrorType)(debug, "validateWasm");
|
69
69
|
debug(`Using validate Wasm`);
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
71
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_Q3MLJQAZ.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_Q3MLJQAZ.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|
@@ -90,7 +90,7 @@ function validate(options) {
|
|
90
90
|
if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
|
91
91
|
return;
|
92
92
|
}
|
93
|
-
const error = (0,
|
93
|
+
const error = (0, import_chunk_25RJ7YTB.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
94
94
|
debugErrorType(e);
|
95
95
|
console.error("");
|
96
96
|
if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
|
@@ -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_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
117
117
|
}).exhaustive();
|
118
118
|
throw error;
|
119
119
|
}
|
@@ -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_YNI2SMXZ_exports = {};
|
20
|
+
__export(chunk_YNI2SMXZ_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_YNI2SMXZ_exports);
|
24
|
+
var import_chunk_HANOM7ZO = require("./chunk-HANOM7ZO.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_HANOM7ZO.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_YO2HQMQH_exports = {};
|
20
|
+
__export(chunk_YO2HQMQH_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_YO2HQMQH_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) {
|
@@ -65,7 +65,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
65
65
|
archiver: "6.0.2",
|
66
66
|
"checkpoint-client": "1.1.33",
|
67
67
|
"cli-truncate": "2.1.0",
|
68
|
-
dotenv: "16.
|
68
|
+
dotenv: "16.4.7",
|
69
69
|
esbuild: "0.24.0",
|
70
70
|
"escape-string-regexp": "4.0.0",
|
71
71
|
execa: "5.1.1",
|
@@ -100,7 +100,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
100
100
|
"terminal-link": "2.1.1",
|
101
101
|
tmp: "0.2.3",
|
102
102
|
"ts-node": "10.9.2",
|
103
|
-
"ts-pattern": "5.
|
103
|
+
"ts-pattern": "5.6.0",
|
104
104
|
"ts-toolbelt": "9.6.0",
|
105
105
|
typescript: "5.4.5",
|
106
106
|
yarn: "1.22.22"
|
@@ -111,7 +111,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
111
111
|
"@prisma/fetch-engine": "workspace:*",
|
112
112
|
"@prisma/generator-helper": "workspace:*",
|
113
113
|
"@prisma/get-platform": "workspace:*",
|
114
|
-
"@prisma/prisma-schema-wasm": "6.1.0-
|
114
|
+
"@prisma/prisma-schema-wasm": "6.1.0-16.40232c93c80a22f3a8bae784b0386319a57a5aa0",
|
115
115
|
"@prisma/schema-files-loader": "workspace:*",
|
116
116
|
arg: "5.0.2",
|
117
117
|
prompts: "2.4.2"
|
@@ -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_YOC6F62R_exports = {};
|
20
|
+
__export(chunk_YOC6F62R_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_YOC6F62R_exports);
|
24
|
+
var import_chunk_OBNSXASV = require("./chunk-OBNSXASV.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_OBNSXASV.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_YWSWNTSV_exports = {};
|
30
|
+
__export(chunk_YWSWNTSV_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_YWSWNTSV_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_YOC6F62R = require("./chunk-YOC6F62R.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
|
-
var
|
41
|
-
var
|
40
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
41
|
+
var import_chunk_JXYVKREJ = require("./chunk-JXYVKREJ.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -48,7 +48,7 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:validate");
|
49
49
|
var ValidateError = class extends Error {
|
50
50
|
constructor(params) {
|
51
|
-
const constructedErrorMessage = (0,
|
51
|
+
const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
52
52
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
53
53
|
return `${reason}
|
54
54
|
${errorCodeMessage}
|
@@ -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_YOC6F62R.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_CXEMRKV4.createDebugErrorType)(debug, "validateWasm");
|
69
69
|
debug(`Using validate Wasm`);
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
71
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_JXYVKREJ.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_JXYVKREJ.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|
@@ -90,7 +90,7 @@ function validate(options) {
|
|
90
90
|
if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
|
91
91
|
return;
|
92
92
|
}
|
93
|
-
const error = (0,
|
93
|
+
const error = (0, import_chunk_25RJ7YTB.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
94
94
|
debugErrorType(e);
|
95
95
|
console.error("");
|
96
96
|
if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
|
@@ -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_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
117
117
|
}).exhaustive();
|
118
118
|
throw error;
|
119
119
|
}
|