@prisma/internals 6.6.0-dev.3 → 6.6.0-dev.31
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/Generator.js +3 -3
- package/dist/WasmPanicRegistry.js +3 -3
- package/dist/{chunk-YXD4CJDK.js → chunk-23MPYLL6.js} +27 -27
- package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
- package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
- package/dist/{chunk-AC6EAR56.js → chunk-2T4NJDHK.js} +40 -21
- package/dist/{chunk-7XNZDY2V.js → chunk-2WR3PY2L.js} +60 -60
- package/dist/{chunk-BGFWFIPR.js → chunk-2ZPYYZJB.js} +7 -7
- package/dist/{chunk-BEKX6YEU.js → chunk-4VX3SCSY.js} +17 -17
- package/dist/{chunk-IZKGRA7W.js → chunk-5ELQCMKU.js} +8 -8
- package/dist/{chunk-TZCE3PWZ.js → chunk-6TVEFPKE.js} +7 -7
- package/dist/{chunk-MGZOEY6N.js → chunk-72UZXEBG.js} +6 -6
- package/dist/{chunk-IO5N2P4Y.js → chunk-AMOV4PS4.js} +420 -376
- package/dist/{chunk-VRT7T6MF.js → chunk-BWGDP6B5.js} +94 -105
- package/dist/{chunk-ATFQZVBS.js → chunk-CCQRDM7X.js} +10 -11
- package/dist/{chunk-I7W4ZRX4.js → chunk-CWDC4DAA.js} +5 -5
- package/dist/{chunk-PIPE5DSU.js → chunk-DGZO4GAJ.js} +6 -6
- package/dist/chunk-DODIJPCS.js +34 -0
- package/dist/{chunk-ZYW3HGSH.js → chunk-DYVL6P7F.js} +7 -8
- package/dist/{chunk-NJQWZ447.js → chunk-EIERU2IM.js} +6 -6
- package/dist/{chunk-KTBNIQ7N.js → chunk-EORSBI5P.js} +8 -8
- package/dist/{chunk-77IC3DNO.js → chunk-ETNCBIDF.js} +8 -8
- package/dist/{chunk-CZL7DCL2.js → chunk-EWKNNPH2.js} +6 -6
- package/dist/{chunk-SHJNE6T7.js → chunk-F46BPOEO.js} +7 -7
- package/dist/{chunk-L6GBFCXG.js → chunk-FNA4EAZ6.js} +142 -155
- package/dist/{chunk-S57RMXZW.js → chunk-GHHABGYW.js} +5 -5
- package/dist/{chunk-CHMJ5V7I.js → chunk-H5XZKD22.js} +7 -7
- package/dist/{chunk-KKGIKPIK.js → chunk-HHG4DGHC.js} +5 -82
- package/dist/{chunk-TN26CEXA.js → chunk-HI3MXINR.js} +5 -5
- package/dist/{chunk-2MWIMEFK.js → chunk-HL5VFJX4.js} +10 -10
- package/dist/{chunk-ONHKZPSV.js → chunk-IKQFIRRX.js} +6 -6
- package/dist/{chunk-OG2B76U6.js → chunk-JHBF6WAI.js} +19 -19
- package/dist/{chunk-TXY5QNTI.js → chunk-KP7BBU6A.js} +17 -17
- package/dist/{chunk-4E7A3GDU.js → chunk-KR25OQ6F.js} +5 -5
- package/dist/{chunk-XLGODPZH.js → chunk-KTB2HCCO.js} +10 -10
- package/dist/{chunk-C2WD2XUT.js → chunk-KYMYLH7F.js} +971 -988
- package/dist/{chunk-QWCOEHP3.js → chunk-LJAZFFBF.js} +10 -10
- package/dist/{chunk-I7IEEULS.js → chunk-LSYWDURQ.js} +5 -5
- package/dist/{chunk-AZNLB67U.js → chunk-MBB2KJWX.js} +5 -5
- package/dist/{chunk-TATYN3T2.js → chunk-MM4PIVNT.js} +10 -10
- package/dist/{chunk-QJLOQH3Y.js → chunk-MRLXY5TT.js} +5 -5
- package/dist/{chunk-KQOJB3ZW.js → chunk-NLYH6XB4.js} +10 -10
- package/dist/{chunk-6KWNGQHF.js → chunk-NRKSZ6TI.js} +9 -9
- package/dist/{chunk-KUITHSVG.js → chunk-OHWUV5HY.js} +5 -5
- package/dist/{chunk-5RV3EMX6.js → chunk-ORR3O5RU.js} +57 -57
- package/dist/{chunk-MUPZUVSI.js → chunk-PORKIX5G.js} +14 -20
- package/dist/{chunk-6TXVGFQA.js → chunk-PSYMCJ4B.js} +6 -6
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-GXDYIY4M.js → chunk-RAYPCPVU.js} +56 -56
- package/dist/{chunk-UNUCCAXA.js → chunk-SYCT2PLK.js} +5 -5
- package/dist/{chunk-Y3OWT3K2.js → chunk-T7EWI7A3.js} +7 -7
- package/dist/{chunk-GNN2TWXT.js → chunk-TOIDXLDJ.js} +8 -8
- package/dist/{chunk-XAU776BW.js → chunk-U76NRW2U.js} +18 -18
- package/dist/{chunk-ZKAW5JSN.js → chunk-UETN3RLH.js} +5 -5
- package/dist/{chunk-7WJ2IM2C.js → chunk-UFIAUYAF.js} +18 -18
- package/dist/{chunk-53LS3WUO.js → chunk-V37JTUKZ.js} +116 -116
- package/dist/{chunk-FYOYC5PA.js → chunk-VCLRUTLD.js} +18 -18
- package/dist/{chunk-V2ZF7ETH.js → chunk-VLGS4WJI.js} +66 -68
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/{chunk-5MCWLJSR.js → chunk-WEATFJ6G.js} +10 -10
- package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
- package/dist/{chunk-XLUWN3HM.js → chunk-XJVOTQI7.js} +18 -18
- package/dist/{chunk-3ERIN7PH.js → chunk-YBYBY7QI.js} +8 -8
- package/dist/{chunk-PQPIPZMI.js → chunk-YQN27FEK.js} +11 -11
- package/dist/{chunk-Y244AH7F.js → chunk-YU6PNVRN.js} +19 -19
- package/dist/{chunk-UI6HIQ23.js → chunk-Z5AKGOBB.js} +420 -376
- package/dist/{chunk-3BND5XB4.js → chunk-ZCVVZ6U6.js} +11 -11
- package/dist/{chunk-PFLLVWZX.js → chunk-ZGAIRZ32.js} +5 -5
- package/dist/{chunk-H3D6XCA2.js → chunk-ZWMDT3A7.js} +9 -9
- package/dist/cli/Help.js +1 -1
- package/dist/cli/checkUnsupportedDataProxy.js +66 -67
- package/dist/cli/getGeneratorSuccessMessage.js +1 -1
- package/dist/cli/getSchema.js +70 -71
- package/dist/cli/getTypescriptVersion.js +1 -1
- package/dist/cli/hashes.js +66 -67
- package/dist/cli/schemaContext.d.ts +43 -0
- package/dist/cli/schemaContext.js +135 -0
- package/dist/cli/utils.js +5 -5
- package/dist/client/getClientEngineType.js +1 -1
- package/dist/convertCredentials.js +1 -1
- package/dist/dotenvExpand.js +1 -1
- package/dist/engine-commands/errorHelpers.js +5 -5
- package/dist/engine-commands/formatSchema.js +65 -66
- package/dist/engine-commands/getConfig.js +15 -15
- package/dist/engine-commands/getDmmf.js +12 -12
- package/dist/engine-commands/getEngineVersion.js +10 -10
- package/dist/engine-commands/getEnginesMetaInfo.js +13 -13
- package/dist/engine-commands/index.js +76 -77
- package/dist/engine-commands/lintSchema.js +11 -11
- package/dist/engine-commands/mergeSchemas.js +12 -12
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/relativizePathInPSLError.js +1 -1
- package/dist/engine-commands/validate.js +12 -12
- package/dist/errorReporting.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +65 -66
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +7 -7
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +65 -66
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js +1 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +1 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +66 -67
- package/dist/get-generators/getGenerators.js +68 -69
- package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
- package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.js +1 -1
- package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
- package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
- package/dist/get-generators/utils/printGeneratorConfig.js +7 -7
- package/dist/getPackedPackage.js +9 -9
- package/dist/highlight/highlight.js +6 -6
- package/dist/highlight/languages/dml.js +1 -1
- package/dist/highlight/languages/sql.js +1 -1
- package/dist/highlight/prism.js +1 -1
- package/dist/highlight/theme.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +131 -131
- package/dist/logger.js +9 -9
- package/dist/migrateTypes.d.ts +63 -0
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3E7JBBYS.js} +7 -7
- package/dist/panic.js +7 -7
- package/dist/resolveBinary.js +9 -9
- package/dist/resolveOutput.js +1 -1
- package/dist/schemaEngineCommands.js +12 -12
- package/dist/sendPanic.js +65 -66
- package/dist/utils/__tests__/isCi.test.js +1 -1
- package/dist/utils/__tests__/isInteractive.test.js +1 -1
- package/dist/utils/__tests__/maskSchema.test.js +1 -1
- package/dist/utils/assertAlways.js +1 -1
- package/dist/utils/assertNever.js +1 -1
- package/dist/utils/binaryTargetRegex.js +3 -3
- package/dist/utils/byline.js +1 -1
- package/dist/utils/callOnce.js +1 -1
- package/dist/utils/callOnce.test.js +1 -1
- package/dist/utils/canPrompt.js +4 -4
- package/dist/utils/chmodPlusX.js +1 -1
- package/dist/utils/cloudflareD1.js +4 -4
- package/dist/utils/drawBox.js +3 -4
- package/dist/utils/extractPreviewFeatures.js +1 -1
- package/dist/utils/formatTable.js +1 -1
- package/dist/utils/formatms.js +1 -1
- package/dist/utils/fs-functional.js +12 -12
- package/dist/utils/fs-utils.js +9 -9
- package/dist/utils/getCommandWithExecutor.js +4 -4
- package/dist/utils/getEnvPaths.js +65 -66
- package/dist/utils/getGitHubIssueUrl.js +4 -5
- package/dist/utils/getMigrateConfigDir.js +1 -1
- package/dist/utils/getVersionFromPackageJson.js +4 -4
- package/dist/utils/handleEngineLoadingErrors.js +1 -1
- package/dist/utils/handlePanic.js +65 -66
- package/dist/utils/hasOwnProperty.js +1 -1
- package/dist/utils/isCi.js +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +3 -3
- package/dist/utils/isInContainer.js +1 -1
- package/dist/utils/isInNpmLifecycleHook.js +1 -1
- package/dist/utils/isInteractive.js +1 -1
- package/dist/utils/isPromiseLike.js +1 -1
- package/dist/utils/isValidJsIdentifier.js +4 -4
- package/dist/utils/keyBy.js +1 -1
- package/dist/utils/link.js +3 -3
- package/dist/utils/load.js +3 -3
- package/dist/utils/loadEnvFile.js +65 -66
- package/dist/utils/mapKeys.js +1 -1
- package/dist/utils/mapObjectValues.js +1 -1
- package/dist/utils/maskSchema.js +1 -1
- package/dist/utils/max.js +1 -1
- package/dist/utils/max.test.js +1 -1
- package/dist/utils/maybeInGitHook.js +1 -1
- package/dist/utils/missingDatasource.js +6 -6
- package/dist/utils/missingGeneratorMessage.js +8 -8
- package/dist/utils/now.js +1 -1
- package/dist/utils/omit.js +1 -1
- package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +1 -1
- package/dist/utils/parseEnvValue.js +1 -1
- package/dist/utils/path.js +1 -1
- package/dist/utils/path.test.js +1 -1
- package/dist/utils/pick.js +1 -1
- package/dist/utils/printConfigWarnings.js +1 -1
- package/dist/utils/prismaPostgres.js +1 -1
- package/dist/utils/prismaPostgres.test.js +1 -1
- package/dist/utils/schemaFileInput.js +1 -1
- package/dist/utils/serializeQueryEngineName.js +1 -1
- package/dist/utils/setClassName.js +1 -1
- package/dist/utils/toSchemasContainer.js +1 -1
- package/dist/utils/tryLoadEnvs.js +6 -6
- package/dist/utils/unique.js +1 -1
- package/dist/utils/vercelPkgPathRegex.js +1 -1
- package/dist/warnOnce.js +4 -4
- package/dist/wasm.js +6 -6
- package/package.json +13 -13
- package/dist/chunk-AOQIUJT4.js +0 -41
- package/dist/chunk-ODI3VNBD.js +0 -43
@@ -26,29 +26,29 @@ 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_JHBF6WAI_exports = {};
|
30
|
+
__export(chunk_JHBF6WAI_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_JHBF6WAI_exports);
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
39
|
-
var
|
39
|
+
var import_chunk_PSYMCJ4B = require("./chunk-PSYMCJ4B.js");
|
40
|
+
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
40
41
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
41
|
-
var
|
42
|
-
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
42
|
+
var import_chunk_CWDC4DAA = require("./chunk-CWDC4DAA.js");
|
43
43
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
44
|
-
var
|
45
|
-
var
|
44
|
+
var import_chunk_ZWMDT3A7 = require("./chunk-ZWMDT3A7.js");
|
45
|
+
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
46
46
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
47
47
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
48
|
-
var
|
48
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
49
49
|
var import_debug = __toESM(require("@prisma/debug"));
|
50
50
|
var import_get_platform = require("@prisma/get-platform");
|
51
|
-
var import_function = (0,
|
51
|
+
var import_function = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_ZGAIRZ32.require_function)());
|
52
52
|
var debug = (0, import_debug.default)("prisma:getConfig");
|
53
53
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
54
54
|
var GetConfigError = class extends Error {
|
@@ -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_CWDC4DAA.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_PSYMCJ4B.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_ZWMDT3A7.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_ZWMDT3A7.prismaSchemaWasm.get_config(params);
|
102
102
|
return data;
|
103
103
|
},
|
104
104
|
(e) => ({
|
@@ -142,9 +142,9 @@ async function getConfig(options) {
|
|
142
142
|
}
|
143
143
|
const error = (0, import_chunk_XKZ6CBLA.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
|
144
144
|
debugErrorType(e);
|
145
|
-
if ((0,
|
146
|
-
const { message, stack } = (0,
|
147
|
-
const panic = new
|
145
|
+
if ((0, import_chunk_CCQRDM7X.isWasmPanic)(e.error)) {
|
146
|
+
const { message, stack } = (0, import_chunk_CCQRDM7X.getWasmError)(e.error);
|
147
|
+
const panic = new import_chunk_CCQRDM7X.RustPanic(
|
148
148
|
/* message */
|
149
149
|
message,
|
150
150
|
/* rustStack */
|
@@ -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_PSYMCJ4B.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_PSYMCJ4B.createSchemaValidationError)(e.reason),
|
169
169
|
message: formatErrors(e.error)
|
170
170
|
});
|
171
171
|
}).otherwise((e) => {
|
@@ -26,25 +26,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_KP7BBU6A_exports = {};
|
30
|
+
__export(chunk_KP7BBU6A_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_KP7BBU6A_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_PSYMCJ4B = require("./chunk-PSYMCJ4B.js");
|
37
|
+
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
37
38
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
39
|
-
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
39
|
+
var import_chunk_CWDC4DAA = require("./chunk-CWDC4DAA.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
42
|
-
var
|
41
|
+
var import_chunk_ZWMDT3A7 = require("./chunk-ZWMDT3A7.js");
|
42
|
+
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
45
|
-
var
|
45
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
47
|
-
var import_function = (0,
|
47
|
+
var import_function = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_ZGAIRZ32.require_function)());
|
48
48
|
var debug = (0, import_debug.default)("prisma:mergeSchemas");
|
49
49
|
var MergeSchemasError = class extends Error {
|
50
50
|
constructor(params) {
|
@@ -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_CWDC4DAA.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_PSYMCJ4B.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_ZWMDT3A7.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -88,11 +88,11 @@ function mergeSchemas(options) {
|
|
88
88
|
const error = (0, import_chunk_XKZ6CBLA.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
89
89
|
debugErrorType(e);
|
90
90
|
console.error("");
|
91
|
-
if ((0,
|
92
|
-
const { message, stack } = (0,
|
91
|
+
if ((0, import_chunk_CCQRDM7X.isWasmPanic)(e.error)) {
|
92
|
+
const { message, stack } = (0, import_chunk_CCQRDM7X.getWasmError)(e.error);
|
93
93
|
debug(`Error merging schemas: ${message}`);
|
94
94
|
debug(stack);
|
95
|
-
const panic = new
|
95
|
+
const panic = new import_chunk_CCQRDM7X.RustPanic(
|
96
96
|
/* message */
|
97
97
|
message,
|
98
98
|
/* rustStack */
|
@@ -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_PSYMCJ4B.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -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_KR25OQ6F_exports = {};
|
20
|
+
__export(chunk_KR25OQ6F_exports, {
|
21
21
|
require_is_stream: () => require_is_stream
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var require_is_stream = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_KR25OQ6F_exports);
|
24
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
25
|
+
var require_is_stream = (0, import_chunk_2ESYSVXG.__commonJS)({
|
26
26
|
"../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports, module2) {
|
27
27
|
"use strict";
|
28
28
|
var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
@@ -16,30 +16,30 @@ 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_KTB2HCCO_exports = {};
|
20
|
+
__export(chunk_KTB2HCCO_exports, {
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
23
23
|
});
|
24
|
-
module.exports = __toCommonJS(
|
25
|
-
var
|
26
|
-
var
|
27
|
-
var
|
24
|
+
module.exports = __toCommonJS(chunk_KTB2HCCO_exports);
|
25
|
+
var import_chunk_LSYWDURQ = require("./chunk-LSYWDURQ.js");
|
26
|
+
var import_chunk_2WR3PY2L = require("./chunk-2WR3PY2L.js");
|
27
|
+
var import_chunk_YBYBY7QI = require("./chunk-YBYBY7QI.js");
|
28
28
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
29
|
-
var
|
29
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
30
30
|
var import_engines = require("@prisma/engines");
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
32
32
|
var import_get_platform = require("@prisma/get-platform");
|
33
|
-
var import_execa = (0,
|
33
|
+
var import_execa = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_2WR3PY2L.require_execa)());
|
34
34
|
async function getEngineVersion(enginePath, binaryName) {
|
35
35
|
if (!binaryName) {
|
36
36
|
binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
|
37
37
|
}
|
38
|
-
enginePath = await (0,
|
38
|
+
enginePath = await (0, import_chunk_YBYBY7QI.resolveBinary)(binaryName, enginePath);
|
39
39
|
const platformInfo = await (0, import_get_platform.getPlatformInfo)();
|
40
40
|
if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
41
41
|
(0, import_get_platform.assertNodeAPISupported)();
|
42
|
-
const QE = (0,
|
42
|
+
const QE = (0, import_chunk_LSYWDURQ.loadLibrary)(enginePath, platformInfo);
|
43
43
|
return `${import_fetch_engine.BinaryType.QueryEngineLibrary} ${QE.version().commit}`;
|
44
44
|
} else {
|
45
45
|
const { stdout } = await (0, import_execa.default)(enginePath, ["--version"]);
|