@prisma/internals 5.23.0-dev.2 → 5.23.0-dev.21
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-SOG4ASAQ.js → chunk-4BT3MKRN.js} +6 -6
- package/dist/{chunk-5I4BOTBV.js → chunk-5MCWLJSR.js} +3 -9
- package/dist/{chunk-IABMG3F4.js → chunk-77IC3DNO.js} +5 -5
- package/dist/{chunk-4ILHL6B6.js → chunk-B3JXETHV.js} +5 -5
- package/dist/{chunk-4M4LPJPC.js → chunk-BJBH6WYP.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-FKO4FDX3.js → chunk-D77Y4LPV.js} +12 -12
- package/dist/{chunk-SZKPXBSP.js → chunk-DTEXPX36.js} +12 -12
- package/dist/{chunk-5UACJAAB.js → chunk-G5ET5ITV.js} +13 -13
- package/dist/{chunk-7NNOHWLC.js → chunk-HMF3VL6Z.js} +61 -172
- package/dist/{chunk-OSOXVAZB.js → chunk-HPF5G47V.js} +9 -9
- package/dist/{chunk-IAEMHQAC.js → chunk-I4467NNA.js} +5 -5
- package/dist/{chunk-LIB5PV7H.js → chunk-K6DMP57P.js} +5 -5
- package/dist/{chunk-7CTC3RVJ.js → chunk-KKG2ZZJE.js} +5 -5
- package/dist/{chunk-4NFLAUKD.js → chunk-KQOJB3ZW.js} +70 -70
- package/dist/{chunk-MJPMCOCJ.js → chunk-MBSK5CKY.js} +61 -172
- package/dist/{chunk-3U2ANLD3.js → chunk-MGZOEY6N.js} +6 -6
- package/dist/{chunk-BQTOCOYU.js → chunk-NBU7LQCG.js} +5 -5
- package/dist/{chunk-DI7BWNGL.js → chunk-PCKDOALV.js} +5 -5
- package/dist/{chunk-QEVSPE5U.js → chunk-QGJIIGDR.js} +5 -5
- package/dist/{chunk-CSRUIX22.js → chunk-RQ3C6TME.js} +11 -11
- package/dist/{chunk-PKY5WEUF.js → chunk-RTIHRKRR.js} +13 -13
- package/dist/{chunk-INHGTPT5.js → chunk-RUUX4JI7.js} +14 -14
- package/dist/{chunk-IXEZUAGW.js → chunk-S34YTBDJ.js} +5 -5
- package/dist/{chunk-FTS2IEWX.js → chunk-S57RMXZW.js} +5 -5
- package/dist/{chunk-XLYQ6PQW.js → chunk-SLBBRUQS.js} +15 -15
- package/dist/{chunk-KH4RKPJH.js → chunk-TQPOQV76.js} +14 -14
- package/dist/{chunk-WCRKL55L.js → chunk-V2ZF7ETH.js} +7 -7
- package/dist/{chunk-PK7HIANT.js → chunk-VEODS3ZR.js} +5 -5
- package/dist/{chunk-YDZVEVUG.js → chunk-VRT7T6MF.js} +73 -73
- package/dist/{chunk-ISIFDTAX.js → chunk-Z3TLRLU5.js} +11 -11
- 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 +9 -9
- 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,18 +26,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_RQ3C6TME_exports = {};
|
|
30
|
+
__export(chunk_RQ3C6TME_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_RQ3C6TME_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
36
|
+
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
|
37
|
+
var import_chunk_K6DMP57P = require("./chunk-K6DMP57P.js");
|
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_KKG2ZZJE = require("./chunk-KKG2ZZJE.js");
|
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
42
42
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
@@ -60,13 +60,13 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: getDmmf]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_K6DMP57P.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "GetDmmfError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
async function getDMMF(options) {
|
|
68
68
|
warnOnDeprecatedFeatureFlag(options.previewFeatures);
|
|
69
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_I4467NNA.createDebugErrorType)(debug, "getDmmfWasm");
|
|
70
70
|
debug(`Using getDmmf Wasm`);
|
|
71
71
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
72
72
|
(0, import_chunk_7MD6344A.tryCatch2)(
|
|
@@ -91,13 +91,13 @@ async function getDMMF(options) {
|
|
|
91
91
|
() => {
|
|
92
92
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
93
93
|
debug("Triggering a Rust panic...");
|
|
94
|
-
|
|
94
|
+
import_chunk_KKG2ZZJE.prismaSchemaWasm.debug_panic();
|
|
95
95
|
}
|
|
96
96
|
const params = JSON.stringify({
|
|
97
97
|
prismaSchema: datamodel,
|
|
98
98
|
noColor: Boolean(process.env.NO_COLOR)
|
|
99
99
|
});
|
|
100
|
-
const data =
|
|
100
|
+
const data = import_chunk_KKG2ZZJE.prismaSchemaWasm.get_dmmf(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(e) => ({
|
|
@@ -158,7 +158,7 @@ Datamodel path: "${e.datamodelPath}"`,
|
|
|
158
158
|
return panic;
|
|
159
159
|
}
|
|
160
160
|
const errorOutput = e.error.message;
|
|
161
|
-
return new GetDmmfError((0,
|
|
161
|
+
return new GetDmmfError((0, import_chunk_I4467NNA.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
162
162
|
}).with({ type: "parse-json" }, (e) => {
|
|
163
163
|
debugErrorType(e);
|
|
164
164
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.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_RTIHRKRR_exports = {};
|
|
30
|
+
__export(chunk_RTIHRKRR_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_RTIHRKRR_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_PCKDOALV = require("./chunk-PCKDOALV.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_QGJIIGDR = require("./chunk-QGJIIGDR.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_PCKDOALV.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_QGJIIGDR.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_QGJIIGDR.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
|
}
|
|
@@ -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_RUUX4JI7_exports = {};
|
|
30
|
+
__export(chunk_RUUX4JI7_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_RUUX4JI7_exports);
|
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
|
40
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
41
|
+
var import_chunk_K6DMP57P = require("./chunk-K6DMP57P.js");
|
|
42
42
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
43
43
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
44
|
-
var
|
|
44
|
+
var import_chunk_KKG2ZZJE = require("./chunk-KKG2ZZJE.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");
|
|
@@ -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_K6DMP57P.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_I4467NNA.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_KKG2ZZJE.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_KKG2ZZJE.prismaSchemaWasm.get_config(params);
|
|
102
102
|
return data;
|
|
103
103
|
},
|
|
104
104
|
(e) => ({
|
|
@@ -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_I4467NNA.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_I4467NNA.createSchemaValidationError)(e.reason),
|
|
169
169
|
message: formatErrors(e.error)
|
|
170
170
|
});
|
|
171
171
|
}).otherwise((e) => {
|
|
@@ -195,7 +195,7 @@ async function resolveBinaryTargets(generator) {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
function formatErrors(errors) {
|
|
198
|
-
const formattedErrors = errors.map((e) => (0,
|
|
198
|
+
const formattedErrors = errors.map((e) => (0, import_chunk_C47SCASR.relativizePathInPSLError)(e.message)).join("\n\n");
|
|
199
199
|
const errorCount = `Validation Error Count: ${errors.length}`;
|
|
200
200
|
return `${formattedErrors}
|
|
201
201
|
${errorCount}`;
|
|
@@ -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_S34YTBDJ_exports = {};
|
|
20
|
+
__export(chunk_S34YTBDJ_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_S34YTBDJ_exports);
|
|
24
|
+
var import_chunk_VEODS3ZR = require("./chunk-VEODS3ZR.js");
|
|
25
|
+
var packageJson = (0, import_chunk_VEODS3ZR.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -16,13 +16,13 @@ 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_S57RMXZW_exports = {};
|
|
20
|
+
__export(chunk_S57RMXZW_exports, {
|
|
21
21
|
isYarnUsed: () => isYarnUsed
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_S57RMXZW_exports);
|
|
24
|
+
var import_chunk_VRT7T6MF = require("./chunk-VRT7T6MF.js");
|
|
25
25
|
async function isYarnUsed(baseDir) {
|
|
26
|
-
const packageManager = await (0,
|
|
26
|
+
const packageManager = await (0, import_chunk_VRT7T6MF.detect)({ cwd: baseDir, autoInstall: false, programmatic: true });
|
|
27
27
|
return packageManager === "yarn" || packageManager === "yarn@berry";
|
|
28
28
|
}
|
|
@@ -26,21 +26,21 @@ 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_SLBBRUQS_exports = {};
|
|
30
|
+
__export(chunk_SLBBRUQS_exports, {
|
|
31
31
|
getGitHubIssueUrl: () => getGitHubIssueUrl,
|
|
32
32
|
wouldYouLikeToCreateANewIssue: () => wouldYouLikeToCreateANewIssue
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_SLBBRUQS_exports);
|
|
35
35
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
|
36
36
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
37
37
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
38
38
|
var import_get_platform = require("@prisma/get-platform");
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
39
|
+
var import_node_process = __toESM(require("node:process"));
|
|
40
|
+
var import_node_os = __toESM(require("node:os"));
|
|
41
|
+
var import_node_fs = __toESM(require("node:fs"));
|
|
42
|
+
var import_node_fs2 = __toESM(require("node:fs"));
|
|
43
|
+
var import_node_fs3 = __toESM(require("node:fs"));
|
|
44
44
|
var import_prompts = __toESM(require("prompts"));
|
|
45
45
|
var require_is_windows = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
46
46
|
"../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js"(exports, module2) {
|
|
@@ -309,7 +309,7 @@ var import_is_windows = (0, import_chunk_WWAWV7DQ.__toESM)(require_is_windows())
|
|
|
309
309
|
var isDockerCached;
|
|
310
310
|
function hasDockerEnv() {
|
|
311
311
|
try {
|
|
312
|
-
|
|
312
|
+
import_node_fs3.default.statSync("/.dockerenv");
|
|
313
313
|
return true;
|
|
314
314
|
} catch {
|
|
315
315
|
return false;
|
|
@@ -317,7 +317,7 @@ function hasDockerEnv() {
|
|
|
317
317
|
}
|
|
318
318
|
function hasDockerCGroup() {
|
|
319
319
|
try {
|
|
320
|
-
return
|
|
320
|
+
return import_node_fs3.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
321
321
|
} catch {
|
|
322
322
|
return false;
|
|
323
323
|
}
|
|
@@ -331,7 +331,7 @@ function isDocker() {
|
|
|
331
331
|
var cachedResult;
|
|
332
332
|
var hasContainerEnv = () => {
|
|
333
333
|
try {
|
|
334
|
-
|
|
334
|
+
import_node_fs2.default.statSync("/run/.containerenv");
|
|
335
335
|
return true;
|
|
336
336
|
} catch {
|
|
337
337
|
return false;
|
|
@@ -344,22 +344,22 @@ function isInsideContainer() {
|
|
|
344
344
|
return cachedResult;
|
|
345
345
|
}
|
|
346
346
|
var isWsl = () => {
|
|
347
|
-
if (
|
|
347
|
+
if (import_node_process.default.platform !== "linux") {
|
|
348
348
|
return false;
|
|
349
349
|
}
|
|
350
|
-
if (
|
|
350
|
+
if (import_node_os.default.release().toLowerCase().includes("microsoft")) {
|
|
351
351
|
if (isInsideContainer()) {
|
|
352
352
|
return false;
|
|
353
353
|
}
|
|
354
354
|
return true;
|
|
355
355
|
}
|
|
356
356
|
try {
|
|
357
|
-
return
|
|
357
|
+
return import_node_fs.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
358
358
|
} catch {
|
|
359
359
|
return false;
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
-
var is_wsl_default =
|
|
362
|
+
var is_wsl_default = import_node_process.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
363
363
|
var import_new_github_issue_url = (0, import_chunk_WWAWV7DQ.__toESM)(require_new_github_issue_url());
|
|
364
364
|
var import_open = (0, import_chunk_WWAWV7DQ.__toESM)(require_open());
|
|
365
365
|
var import_strip_ansi = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_ODI3VNBD.require_strip_ansi)());
|
|
@@ -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_TQPOQV76_exports = {};
|
|
30
|
+
__export(chunk_TQPOQV76_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_TQPOQV76_exports);
|
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var import_chunk_I4467NNA = require("./chunk-I4467NNA.js");
|
|
40
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
41
|
+
var import_chunk_PCKDOALV = require("./chunk-PCKDOALV.js");
|
|
42
42
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
43
43
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
44
|
-
var
|
|
44
|
+
var import_chunk_QGJIIGDR = require("./chunk-QGJIIGDR.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");
|
|
@@ -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_PCKDOALV.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_I4467NNA.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_QGJIIGDR.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_QGJIIGDR.prismaSchemaWasm.get_config(params);
|
|
102
102
|
return data;
|
|
103
103
|
},
|
|
104
104
|
(e) => ({
|
|
@@ -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_I4467NNA.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_I4467NNA.createSchemaValidationError)(e.reason),
|
|
169
169
|
message: formatErrors(e.error)
|
|
170
170
|
});
|
|
171
171
|
}).otherwise((e) => {
|
|
@@ -195,7 +195,7 @@ async function resolveBinaryTargets(generator) {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
function formatErrors(errors) {
|
|
198
|
-
const formattedErrors = errors.map((e) => (0,
|
|
198
|
+
const formattedErrors = errors.map((e) => (0, import_chunk_C47SCASR.relativizePathInPSLError)(e.message)).join("\n\n");
|
|
199
199
|
const errorCount = `Validation Error Count: ${errors.length}`;
|
|
200
200
|
return `${formattedErrors}
|
|
201
201
|
${errorCount}`;
|
|
@@ -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_V2ZF7ETH_exports = {};
|
|
20
|
+
__export(chunk_V2ZF7ETH_exports, {
|
|
21
21
|
FormData: () => FormData,
|
|
22
22
|
fetch_blob_default: () => fetch_blob_default,
|
|
23
23
|
file_default: () => file_default,
|
|
24
24
|
formDataToBlob: () => formDataToBlob
|
|
25
25
|
});
|
|
26
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(chunk_V2ZF7ETH_exports);
|
|
27
27
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
28
|
-
var
|
|
28
|
+
var import_node_fs = require("node:fs");
|
|
29
29
|
var require_ponyfill_es2018 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
30
30
|
"../../node_modules/.pnpm/web-streams-polyfill@3.2.1/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js"(exports, module2) {
|
|
31
31
|
"use strict";
|
|
@@ -3841,12 +3841,12 @@ var require_streams = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3841
3841
|
var POOL_SIZE2 = 65536;
|
|
3842
3842
|
if (!globalThis.ReadableStream) {
|
|
3843
3843
|
try {
|
|
3844
|
-
const process = (0, import_chunk_WWAWV7DQ.__require)("process");
|
|
3844
|
+
const process = (0, import_chunk_WWAWV7DQ.__require)("node:process");
|
|
3845
3845
|
const { emitWarning } = process;
|
|
3846
3846
|
try {
|
|
3847
3847
|
process.emitWarning = () => {
|
|
3848
3848
|
};
|
|
3849
|
-
Object.assign(globalThis, (0, import_chunk_WWAWV7DQ.__require)("stream/web"));
|
|
3849
|
+
Object.assign(globalThis, (0, import_chunk_WWAWV7DQ.__require)("node:stream/web"));
|
|
3850
3850
|
process.emitWarning = emitWarning;
|
|
3851
3851
|
} catch (error) {
|
|
3852
3852
|
process.emitWarning = emitWarning;
|
|
@@ -4218,7 +4218,7 @@ Content-Type: ${v.type || "application/octet-stream"}\r
|
|
|
4218
4218
|
return new B(c, { type: "multipart/form-data; boundary=" + b });
|
|
4219
4219
|
}
|
|
4220
4220
|
var import_node_domexception = (0, import_chunk_WWAWV7DQ.__toESM)(require_node_domexception(), 1);
|
|
4221
|
-
var { stat } =
|
|
4221
|
+
var { stat } = import_node_fs.promises;
|
|
4222
4222
|
/*! Bundled license information:
|
|
4223
4223
|
|
|
4224
4224
|
node-domexception/index.js:
|
|
@@ -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_VEODS3ZR_exports = {};
|
|
20
|
+
__export(chunk_VEODS3ZR_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_VEODS3ZR_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) {
|
|
@@ -66,7 +66,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
66
66
|
"checkpoint-client": "1.1.33",
|
|
67
67
|
"cli-truncate": "2.1.0",
|
|
68
68
|
dotenv: "16.0.3",
|
|
69
|
-
esbuild: "0.
|
|
69
|
+
esbuild: "0.24.0",
|
|
70
70
|
"escape-string-regexp": "4.0.0",
|
|
71
71
|
execa: "5.1.1",
|
|
72
72
|
"fast-glob": "3.3.2",
|
|
@@ -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": "5.
|
|
114
|
+
"@prisma/prisma-schema-wasm": "5.23.0-13.06d4b2f30bf4fc71a1cb03bdc0f69f8c2a5c2b9c",
|
|
115
115
|
"@prisma/schema-files-loader": "workspace:*",
|
|
116
116
|
arg: "5.0.2",
|
|
117
117
|
prompts: "2.4.2"
|