@prisma/internals 6.3.0-integration-simpler-typeinfo-query.1 → 6.3.0-integration-fix-subcommands-esm-projects.1
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-COFXY6NH.js → chunk-4B7GQDQF.js} +14 -41
- package/dist/{chunk-5R7AZFMV.js → chunk-4SIGCPK2.js} +5 -5
- package/dist/{chunk-KROMVQBD.js → chunk-57OBCDVS.js} +10 -10
- package/dist/{chunk-5I4BOTBV.js → chunk-5MCWLJSR.js} +3 -9
- package/dist/{chunk-OHBFHT5Q.js → chunk-5VDOZL24.js} +15 -15
- package/dist/{chunk-IABMG3F4.js → chunk-77IC3DNO.js} +5 -5
- package/dist/{chunk-UR3LUZY3.js → chunk-7KAR3MST.js} +17 -17
- package/dist/{chunk-JBUUTZQL.js → chunk-A6FIX424.js} +15 -15
- package/dist/chunk-BONFK27U.js +47 -0
- package/dist/{chunk-WMIBAVWZ.js → chunk-C47SCASR.js} +5 -5
- package/dist/{chunk-IAEMHQAC.js → chunk-CXEMRKV4.js} +8 -8
- package/dist/{chunk-J3JE5NVO.js → chunk-CZDIXJEO.js} +56 -32
- package/dist/{chunk-TFSZCVKC.js → chunk-G4BGJ6IP.js} +5 -5
- package/dist/chunk-HB2Q7X5H.js +30 -0
- package/dist/{chunk-DFG3425X.js → chunk-HUHYNLS4.js} +16 -16
- package/dist/{chunk-B44XJG7K.js → chunk-IHMHEVUM.js} +5 -5
- package/dist/{chunk-4NFLAUKD.js → chunk-KQOJB3ZW.js} +70 -70
- package/dist/{chunk-X4U4GLWH.js → chunk-KRWS7JB4.js} +5 -4
- package/dist/{chunk-V2VWODV3.js → chunk-LAECCYFY.js} +7 -7
- package/dist/{chunk-VJQK3LHU.js → chunk-LEYFAVNZ.js} +76 -187
- package/dist/{chunk-MUJIYA44.js → chunk-MAWSAR5P.js} +5 -5
- package/dist/{chunk-44JHENE6.js → chunk-MCS2FDNN.js} +14 -41
- package/dist/{chunk-3U2ANLD3.js → chunk-MGZOEY6N.js} +6 -6
- package/dist/{chunk-J4MA2JIK.js → chunk-N6K7M2HZ.js} +5 -5
- package/dist/{chunk-67KWF6KB.js → chunk-NQWNTJWW.js} +5 -5
- package/dist/{chunk-KPVPQQGU.js → chunk-NUVGMN5Z.js} +5 -5
- package/dist/{chunk-QJZIYUVB.js → chunk-NXIWDQBF.js} +4 -4
- package/dist/{chunk-LXIE6UJ2.js → chunk-PFUDUATX.js} +80 -962
- package/dist/chunk-PPCNLYSB.js +47 -0
- package/dist/{chunk-2WJPHJ2I.js → chunk-QGXDUBHL.js} +5 -5
- package/dist/{chunk-CKNTB45N.js → chunk-QSAE23KV.js} +8 -3
- package/dist/{chunk-XLYQ6PQW.js → chunk-QTXYAZFX.js} +17 -17
- package/dist/{chunk-P6VBFLWR.js → chunk-QVVSDACW.js} +5 -5
- package/dist/{chunk-FTS2IEWX.js → chunk-S57RMXZW.js} +5 -5
- package/dist/{chunk-5UJZARUY.js → chunk-SX5UKRZS.js} +17 -17
- package/dist/{chunk-KNNIRRTO.js → chunk-UKDMRXVN.js} +5 -5
- package/dist/{chunk-OSOXVAZB.js → chunk-UPIULDLZ.js} +11 -11
- package/dist/{chunk-WCRKL55L.js → chunk-V2ZF7ETH.js} +7 -7
- package/dist/{chunk-VFU3I6P6.js → chunk-VETKNW6E.js} +16 -16
- package/dist/{chunk-YDZVEVUG.js → chunk-VRT7T6MF.js} +73 -73
- package/dist/{chunk-2DXAGCPS.js → chunk-WKXWUB7U.js} +13 -13
- package/dist/{chunk-CKVVVLEH.js → chunk-XEQLM63R.js} +9 -9
- package/dist/{chunk-WYTN2XGW.js → chunk-XNUQWNLF.js} +5 -5
- package/dist/{chunk-ZA3RMW2P.js → chunk-ZKAW5JSN.js} +5 -8
- package/dist/cli/checkUnsupportedDataProxy.js +47 -45
- package/dist/cli/getGeneratorSuccessMessage.js +3 -3
- package/dist/cli/getSchema.js +52 -50
- package/dist/cli/getTypescriptVersion.d.ts +1 -0
- package/dist/cli/getTypescriptVersion.js +25 -0
- package/dist/cli/hashes.js +47 -45
- package/dist/client/getClientEngineType.d.ts +2 -1
- package/dist/client/getClientEngineType.js +4 -4
- package/dist/convertCredentials.js +5 -4
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +46 -44
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +8 -8
- package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
- package/dist/engine-commands/index.js +57 -55
- 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/relativizePathInPSLError.js +2 -2
- package/dist/engine-commands/validate.js +10 -10
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +46 -44
- 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 +46 -44
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +47 -45
- package/dist/get-generators/getGenerators.js +49 -47
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +106 -100
- package/dist/{multipart-parser-LCETWFPE.js → multipart-parser-32AROPTR.js} +9 -6
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +46 -44
- package/dist/tracing/types.d.ts +26 -16
- package/dist/typescript-AILDXN3I.js +205230 -0
- package/dist/typescript-WN4QH2CP.js +205192 -0
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +46 -44
- 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 +46 -44
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/load.js +4 -4
- package/dist/utils/loadEnvFile.js +46 -44
- package/dist/utils/prismaPostgres.d.ts +3 -0
- package/dist/utils/prismaPostgres.js +27 -0
- package/dist/utils/prismaPostgres.test.d.ts +1 -0
- package/dist/utils/prismaPostgres.test.js +15 -0
- package/dist/utils/tryLoadEnvs.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +13 -13
- package/dist/chunk-4RWCRJYD.js +0 -166
- package/dist/chunk-D4MCOTL5.js +0 -122
- package/dist/chunk-FPHZVRV4.js +0 -110
- package/dist/chunk-G7LL2H2O.js +0 -54
- package/dist/chunk-JMZHUHCC.js +0 -177
- package/dist/chunk-RQPDQSHK.js +0 -1429
- 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,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_5VDOZL24_exports = {};
|
|
30
|
+
__export(chunk_5VDOZL24_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_5VDOZL24_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
36
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_UKDMRXVN = require("./chunk-UKDMRXVN.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_MAWSAR5P = require("./chunk-MAWSAR5P.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,11 +48,11 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
|
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:mergeSchemas");
|
|
49
49
|
var MergeSchemasError = 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}
|
|
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,12 +60,12 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: mergeSchemas]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_UKDMRXVN.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_CXEMRKV4.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
71
71
|
(0, import_chunk_7MD6344A.tryCatch)(
|
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
|
73
73
|
const params = JSON.stringify({
|
|
74
74
|
schema: options.schemas
|
|
75
75
|
});
|
|
76
|
-
return
|
|
76
|
+
return import_chunk_MAWSAR5P.prismaSchemaWasm.merge_schemas(params);
|
|
77
77
|
},
|
|
78
78
|
(e) => ({
|
|
79
79
|
type: "wasm-error",
|
|
@@ -85,7 +85,7 @@ function mergeSchemas(options) {
|
|
|
85
85
|
if ((0, import_chunk_7MD6344A.isRight)(mergeSchemasEither)) {
|
|
86
86
|
return mergeSchemasEither.right;
|
|
87
87
|
}
|
|
88
|
-
const error = (0,
|
|
88
|
+
const error = (0, import_chunk_25RJ7YTB.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
|
89
89
|
debugErrorType(e);
|
|
90
90
|
console.error("");
|
|
91
91
|
if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
|
|
@@ -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_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
112
112
|
}).exhaustive();
|
|
113
113
|
throw error;
|
|
114
114
|
}
|
|
@@ -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_77IC3DNO_exports = {};
|
|
20
|
+
__export(chunk_77IC3DNO_exports, {
|
|
21
21
|
runPackageCmd: () => runPackageCmd
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_77IC3DNO_exports);
|
|
24
|
+
var import_chunk_MGZOEY6N = require("./chunk-MGZOEY6N.js");
|
|
25
25
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
|
26
26
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
27
27
|
var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
|
|
28
28
|
async function runPackageCmd(cwd, cmd, ...args) {
|
|
29
|
-
await import_execa.default.command(await (0,
|
|
29
|
+
await import_execa.default.command(await (0, import_chunk_MGZOEY6N.getPackageCmd)(cwd, cmd, ...args), {
|
|
30
30
|
// we skip this because we are already in the generator
|
|
31
31
|
env: { PRISMA_SKIP_POSTINSTALL_GENERATE: "true" },
|
|
32
32
|
stdio: "inherit",
|
|
@@ -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_7KAR3MST_exports = {};
|
|
30
|
+
__export(chunk_7KAR3MST_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_7KAR3MST_exports);
|
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
|
40
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
41
|
+
var import_chunk_NQWNTJWW = require("./chunk-NQWNTJWW.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_QGXDUBHL = require("./chunk-QGXDUBHL.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_NQWNTJWW.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_QGXDUBHL.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_QGXDUBHL.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) => {
|
|
@@ -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}`;
|
|
@@ -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_A6FIX424_exports = {};
|
|
30
|
+
__export(chunk_A6FIX424_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_A6FIX424_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
36
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_NQWNTJWW = require("./chunk-NQWNTJWW.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_QGXDUBHL = require("./chunk-QGXDUBHL.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,11 +48,11 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
|
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:mergeSchemas");
|
|
49
49
|
var MergeSchemasError = 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}
|
|
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,12 +60,12 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: mergeSchemas]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_NQWNTJWW.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_CXEMRKV4.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
71
71
|
(0, import_chunk_7MD6344A.tryCatch)(
|
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
|
73
73
|
const params = JSON.stringify({
|
|
74
74
|
schema: options.schemas
|
|
75
75
|
});
|
|
76
|
-
return
|
|
76
|
+
return import_chunk_QGXDUBHL.prismaSchemaWasm.merge_schemas(params);
|
|
77
77
|
},
|
|
78
78
|
(e) => ({
|
|
79
79
|
type: "wasm-error",
|
|
@@ -85,7 +85,7 @@ function mergeSchemas(options) {
|
|
|
85
85
|
if ((0, import_chunk_7MD6344A.isRight)(mergeSchemasEither)) {
|
|
86
86
|
return mergeSchemasEither.right;
|
|
87
87
|
}
|
|
88
|
-
const error = (0,
|
|
88
|
+
const error = (0, import_chunk_25RJ7YTB.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
|
89
89
|
debugErrorType(e);
|
|
90
90
|
console.error("");
|
|
91
91
|
if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
|
|
@@ -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_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
112
112
|
}).exhaustive();
|
|
113
113
|
throw error;
|
|
114
114
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 __toESM = (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_BONFK27U_exports = {};
|
|
30
|
+
__export(chunk_BONFK27U_exports, {
|
|
31
|
+
getTypescriptVersion: () => getTypescriptVersion
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(chunk_BONFK27U_exports);
|
|
34
|
+
async function getProcessObject() {
|
|
35
|
+
try {
|
|
36
|
+
return await import("node:process");
|
|
37
|
+
} catch (_) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function getTypescriptVersion() {
|
|
42
|
+
try {
|
|
43
|
+
return (await import("./typescript-WN4QH2CP.js")).default.version;
|
|
44
|
+
} catch (_) {
|
|
45
|
+
return (await getProcessObject())?.versions.typescript || "unknown";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -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_C47SCASR_exports = {};
|
|
30
|
+
__export(chunk_C47SCASR_exports, {
|
|
31
31
|
relativizePathInPSLError: () => relativizePathInPSLError
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_C47SCASR_exports);
|
|
34
|
+
var import_node_path = __toESM(require("node:path"));
|
|
35
35
|
function relativizePathInPSLError(error) {
|
|
36
|
-
return error.replaceAll(process.cwd() +
|
|
36
|
+
return error.replaceAll(process.cwd() + import_node_path.default.sep, "");
|
|
37
37
|
}
|
|
@@ -26,17 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_CXEMRKV4_exports = {};
|
|
30
|
+
__export(chunk_CXEMRKV4_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_CXEMRKV4_exports);
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
39
|
-
var
|
|
39
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
|
40
40
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
41
41
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
42
42
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
@@ -71,13 +71,13 @@ 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,
|
|
75
|
-
const getConfigErrorInit = (0,
|
|
74
|
+
const defaultMessage = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)((0, import_chunk_C47SCASR.relativizePathInPSLError)(errorOutputAsJSON.message)));
|
|
75
|
+
const getConfigErrorInit = (0, import_chunk_25RJ7YTB.z)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
|
|
76
76
|
return {
|
|
77
77
|
reason: createSchemaValidationError(reason),
|
|
78
78
|
errorCode: eJSON.error_code
|
|
79
79
|
};
|
|
80
|
-
}).with({ error_code:
|
|
80
|
+
}).with({ error_code: import_chunk_25RJ7YTB.N.string }, (eJSON) => {
|
|
81
81
|
return {
|
|
82
82
|
reason,
|
|
83
83
|
errorCode: eJSON.error_code
|