@prisma/internals 5.23.0-dev.3 → 5.23.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-INHGTPT5.js → chunk-2QKZVM2V.js} +14 -14
- package/dist/{chunk-CSRUIX22.js → chunk-2V6E3NJE.js} +11 -11
- package/dist/{chunk-QEVSPE5U.js → chunk-4UICZCJY.js} +5 -5
- package/dist/{chunk-5I4BOTBV.js → chunk-5MCWLJSR.js} +3 -9
- package/dist/{chunk-IABMG3F4.js → chunk-77IC3DNO.js} +5 -5
- package/dist/{chunk-WMIBAVWZ.js → chunk-C47SCASR.js} +5 -5
- package/dist/{chunk-J3JE5NVO.js → chunk-CZDIXJEO.js} +56 -32
- package/dist/{chunk-4ILHL6B6.js → chunk-D3LFVZLN.js} +5 -5
- package/dist/{chunk-U5YRV2DX.js → chunk-FVGHMKZ4.js} +12 -12
- package/dist/{chunk-OSOXVAZB.js → chunk-HPF5G47V.js} +9 -9
- package/dist/{chunk-IAEMHQAC.js → chunk-I4467NNA.js} +5 -5
- package/dist/{chunk-5UACJAAB.js → chunk-IU2KEKIW.js} +13 -13
- package/dist/{chunk-ARF6SWJF.js → chunk-JATUFQUW.js} +61 -172
- package/dist/{chunk-4NFLAUKD.js → chunk-KQOJB3ZW.js} +70 -70
- package/dist/{chunk-LIB5PV7H.js → chunk-KVN6IW67.js} +5 -5
- package/dist/{chunk-KRKPM7DP.js → chunk-L7ZGUCB6.js} +5 -5
- package/dist/{chunk-3U2ANLD3.js → chunk-MGZOEY6N.js} +6 -6
- package/dist/{chunk-KVN73FD7.js → chunk-O42DIVPW.js} +11 -11
- package/dist/{chunk-SZKPXBSP.js → chunk-OF2M4ACU.js} +12 -12
- package/dist/{chunk-ZMMFFAZY.js → chunk-QTR66D2H.js} +5 -5
- package/dist/{chunk-7NNOHWLC.js → chunk-R4E6C4CX.js} +837 -177
- package/dist/{chunk-FTS2IEWX.js → chunk-S57RMXZW.js} +5 -5
- package/dist/{chunk-XLYQ6PQW.js → chunk-SLBBRUQS.js} +15 -15
- package/dist/{chunk-ZY4F5GPM.js → chunk-TCUF6GAF.js} +5 -5
- package/dist/{chunk-WJNKNGND.js → chunk-TGTMHYII.js} +13 -13
- package/dist/{chunk-PK7HIANT.js → chunk-TROE7RQA.js} +7 -7
- package/dist/{chunk-WCRKL55L.js → chunk-V2ZF7ETH.js} +7 -7
- package/dist/{chunk-RAJSVWMK.js → chunk-V77BRSP2.js} +14 -14
- package/dist/{chunk-4M4LPJPC.js → chunk-VAAPHITN.js} +5 -5
- package/dist/{chunk-YDZVEVUG.js → chunk-VRT7T6MF.js} +73 -73
- package/dist/{chunk-CCFQQATH.js → chunk-W423I6QD.js} +5 -5
- package/dist/{chunk-BATSRJXK.js → chunk-WBU4GQXU.js} +8 -8
- package/dist/{chunk-ZA3RMW2P.js → chunk-ZKAW5JSN.js} +5 -8
- 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/index.js +33 -33
- 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/relativizePathInPSLError.js +2 -2
- package/dist/engine-commands/validate.js +9 -9
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +24 -24
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +24 -24
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +25 -25
- package/dist/get-generators/getGenerators.js +27 -27
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.js +58 -58
- package/dist/{multipart-parser-LCETWFPE.js → multipart-parser-32AROPTR.js} +9 -6
- package/dist/sendPanic.js +24 -24
- package/dist/utils/cloudflareD1.js +2 -2
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +24 -24
- package/dist/utils/getGitHubIssueUrl.js +3 -3
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +24 -24
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/loadEnvFile.js +24 -24
- package/dist/wasm.js +4 -4
- package/package.json +11 -11
- package/dist/chunk-2DXAGCPS.js +0 -177
- package/dist/chunk-5XRQ7ONW.js +0 -122
- package/dist/chunk-QIVUAERL.js +0 -2202
- package/dist/chunk-QJZIYUVB.js +0 -110
- package/dist/chunk-TFSZCVKC.js +0 -166
- package/dist/chunk-V2VWODV3.js +0 -54
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +0 -132
|
@@ -26,24 +26,24 @@ 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_HPF5G47V_exports = {};
|
|
30
|
+
__export(chunk_HPF5G47V_exports, {
|
|
31
31
|
locateLocalCloudflareD1: () => locateLocalCloudflareD1
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_HPF5G47V_exports);
|
|
34
34
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
35
35
|
var import_chunk_KKMREGHN = require("./chunk-KKMREGHN.js");
|
|
36
36
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_node_path = __toESM(require("node:path"));
|
|
38
|
+
var import_node_process = __toESM(require("node:process"));
|
|
39
39
|
var import_fast_glob = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_KKMREGHN.require_out)());
|
|
40
40
|
var import_globby = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_KKMREGHN.require_globby)());
|
|
41
|
-
var defaultD1DirPath =
|
|
41
|
+
var defaultD1DirPath = import_node_path.default.join(".wrangler", "state", "v3", "d1", "miniflare-D1DatabaseObject");
|
|
42
42
|
async function locateLocalCloudflareD1({ arg }) {
|
|
43
|
-
const cwd =
|
|
44
|
-
const d1DirPath =
|
|
43
|
+
const cwd = import_node_process.default.cwd();
|
|
44
|
+
const d1DirPath = import_node_path.default.posix.join(cwd, defaultD1DirPath);
|
|
45
45
|
const pathConverted = (0, import_fast_glob.convertPathToPattern)(d1DirPath);
|
|
46
|
-
const d1Databases = await (0, import_globby.default)(
|
|
46
|
+
const d1Databases = await (0, import_globby.default)(import_node_path.default.posix.join(pathConverted, "*.sqlite"), {});
|
|
47
47
|
if (d1Databases.length === 0) {
|
|
48
48
|
throw new Error(
|
|
49
49
|
`No Cloudflare D1 databases found in ${defaultD1DirPath}. Did you run \`wrangler d1 create <DATABASE_NAME>\` and \`wrangler dev\`?`
|
|
@@ -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_I4467NNA_exports = {};
|
|
30
|
+
__export(chunk_I4467NNA_exports, {
|
|
31
31
|
createDebugErrorType: () => createDebugErrorType,
|
|
32
32
|
createSchemaValidationError: () => createSchemaValidationError,
|
|
33
33
|
parseQueryEngineError: () => parseQueryEngineError,
|
|
34
34
|
unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_I4467NNA_exports);
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
40
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
@@ -71,7 +71,7 @@ function parseQueryEngineError({ errorOutput, reason }) {
|
|
|
71
71
|
() => ({ _tag: "unparsed", message: errorOutput, reason })
|
|
72
72
|
),
|
|
73
73
|
(0, import_chunk_7MD6344A.map)((errorOutputAsJSON) => {
|
|
74
|
-
const defaultMessage = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)((0,
|
|
74
|
+
const defaultMessage = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)((0, import_chunk_C47SCASR.relativizePathInPSLError)(errorOutputAsJSON.message)));
|
|
75
75
|
const getConfigErrorInit = (0, import_chunk_H3T4L34H.$)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
|
|
76
76
|
return {
|
|
77
77
|
reason: createSchemaValidationError(reason),
|
|
@@ -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_IU2KEKIW_exports = {};
|
|
30
|
+
__export(chunk_IU2KEKIW_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_IU2KEKIW_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
36
|
+
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_TCUF6GAF = require("./chunk-TCUF6GAF.js");
|
|
39
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_4UICZCJY = require("./chunk-4UICZCJY.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");
|
|
@@ -52,7 +52,7 @@ var ValidateError = class extends Error {
|
|
|
52
52
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
53
53
|
return `${reason}
|
|
54
54
|
${errorCodeMessage}
|
|
55
|
-
${(0,
|
|
55
|
+
${(0, import_chunk_C47SCASR.relativizePathInPSLError)(message)}`;
|
|
56
56
|
}).with({ _tag: "unparsed" }, ({ message, reason }) => {
|
|
57
57
|
const detailsHeader = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)("Details:"));
|
|
58
58
|
return `${reason}
|
|
@@ -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_TCUF6GAF.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_I4467NNA.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_4UICZCJY.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_4UICZCJY.prismaSchemaWasm.validate(params);
|
|
82
82
|
},
|
|
83
83
|
(e) => ({
|
|
84
84
|
type: "wasm-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_I4467NNA.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
117
117
|
}).exhaustive();
|
|
118
118
|
throw error;
|
|
119
119
|
}
|