@prisma/internals 6.6.0-integration-refactor-schema-path-less-migrate-class.1 → 6.6.0-integration-push-xmzqvqxpztks.2
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.d.ts +23 -5
- package/dist/Generator.js +5 -3
- package/dist/WasmPanicRegistry.js +3 -3
- package/dist/{chunk-PIPE5DSU.js → chunk-2H6XXXKO.js} +18 -21
- package/dist/chunk-2QTAK7KO.js +101 -0
- package/dist/{chunk-ZYW3HGSH.js → chunk-2ZSTFH6K.js} +49 -17
- package/dist/{chunk-UCHI3M2O.js → chunk-3DQANJMY.js} +10 -10
- package/dist/{chunk-LG5IW4IV.js → chunk-3R43ZQD7.js} +11 -10
- package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
- package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
- package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
- package/dist/{chunk-YXD4CJDK.js → chunk-67I7CEQJ.js} +30 -31
- package/dist/{chunk-6RMP4L37.js → chunk-6RI6YNS2.js} +20 -24
- package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
- package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
- package/dist/{chunk-JJBDZ3V4.js → chunk-7JDKTQ7P.js} +20 -24
- package/dist/{chunk-OEXSUUW2.js → chunk-AZV6HVKA.js} +7 -7
- package/dist/{chunk-SNY3IPJ5.js → chunk-C73SLFIL.js} +5 -5
- package/dist/{chunk-5MCWLJSR.js → chunk-CR3XKUEA.js} +10 -10
- package/dist/{chunk-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
- package/dist/{chunk-MUPZUVSI.js → chunk-D4VZUY3O.js} +14 -20
- package/dist/{chunk-DZXCMG6O.js → chunk-DFKSWLWX.js} +21 -25
- package/dist/{chunk-46YCXISN.js → chunk-DJD6ZF6T.js} +21 -25
- package/dist/chunk-DKBTEL4R.js +897 -0
- package/dist/{chunk-JMIU2AUX.js → chunk-DKSUHQGA.js} +8 -8
- package/dist/{chunk-EUTJYQDW.js → chunk-DODIJPCS.js} +13 -25
- package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
- package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
- package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
- package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
- package/dist/{chunk-XKNXU2N3.js → chunk-GYUTTTIT.js} +12 -11
- package/dist/{chunk-L6GBFCXG.js → chunk-HAGJ64PM.js} +142 -155
- package/dist/{chunk-HMRJXDNO.js → chunk-HG3YOAAE.js} +8 -8
- package/dist/{chunk-QY2YJCMB.js → chunk-I7D2TQUM.js} +11 -15
- package/dist/{chunk-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
- package/dist/{chunk-OZJAY6HP.js → chunk-IMOWQZSF.js} +21 -25
- package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
- package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
- package/dist/{chunk-VNXTMX7Q.js → chunk-KB5DKCI4.js} +11 -11
- package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
- package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
- package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
- package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
- package/dist/{chunk-C2WD2XUT.js → chunk-MJIP3FY5.js} +968 -1220
- package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
- package/dist/{chunk-OIEQY7MB.js → chunk-MSQY6G2A.js} +5 -5
- package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
- package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
- package/dist/{get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js → chunk-PFYALFCY.js} +7 -6
- package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
- package/dist/{chunk-YK5AZ3CV.js → chunk-RN2HKPE6.js} +21 -25
- package/dist/{chunk-UFYNZD7Y.js → chunk-S2R7ACYL.js} +22 -26
- package/dist/chunk-SZD3E6G4.js +897 -0
- package/dist/{chunk-X5YSMVVH.js → chunk-TGNGIHD7.js} +5 -5
- package/dist/{chunk-VNIE2AZB.js → chunk-TQCLUNM2.js} +4 -4
- package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
- package/dist/{chunk-Q2GXXFZU.js → chunk-UPQKNKIW.js} +9 -9
- package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
- package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
- package/dist/{chunk-EOWYER24.js → chunk-VBLLSZ2K.js} +9 -9
- package/dist/{chunk-4AC2JUM4.js → chunk-VBXYX7TQ.js} +22 -26
- package/dist/{chunk-OCPELPFI.js → chunk-VUJECDYH.js} +5 -5
- package/dist/{chunk-Y4PCD4YX.js → chunk-WSZXPLJQ.js} +7 -7
- package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
- package/dist/{chunk-WO5ENZU5.js → chunk-XLTQGAI2.js} +10 -10
- package/dist/{chunk-YG7D272D.js → chunk-XNFIABGN.js} +11 -15
- package/dist/chunk-YR5KNFKN.js +1834 -0
- package/dist/{chunk-AZNLB67U.js → chunk-ZJWZK45Z.js} +5 -5
- package/dist/chunk-ZSINRHD4.js +43 -0
- package/dist/cli/Help.js +1 -1
- package/dist/cli/checkUnsupportedDataProxy.d.ts +12 -17
- package/dist/cli/checkUnsupportedDataProxy.js +70 -72
- package/dist/cli/directoryConfig.d.ts +7 -0
- package/dist/{get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js → cli/directoryConfig.js} +6 -7
- package/dist/cli/getGeneratorSuccessMessage.js +1 -1
- package/dist/cli/getSchema.d.ts +3 -23
- package/dist/cli/getSchema.js +74 -76
- package/dist/cli/getTypescriptVersion.js +1 -1
- package/dist/cli/hashes.d.ts +1 -2
- package/dist/cli/hashes.js +70 -72
- package/dist/cli/schemaContext.d.ts +7 -5
- package/dist/cli/schemaContext.js +70 -72
- package/dist/cli/utils.js +5 -5
- package/dist/client/getClientEngineType.d.ts +1 -1
- package/dist/client/getClientEngineType.js +1 -1
- package/dist/convertCredentials.d.ts +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 +69 -71
- package/dist/engine-commands/getConfig.d.ts +1 -1
- package/dist/engine-commands/getConfig.js +16 -17
- package/dist/engine-commands/getDmmf.d.ts +2 -1
- package/dist/engine-commands/getDmmf.js +13 -14
- package/dist/engine-commands/getEngineVersion.js +11 -11
- package/dist/engine-commands/getEnginesMetaInfo.js +14 -14
- package/dist/engine-commands/index.js +80 -82
- package/dist/engine-commands/lintSchema.d.ts +1 -1
- package/dist/engine-commands/lintSchema.js +11 -12
- package/dist/engine-commands/mergeSchemas.js +13 -14
- package/dist/engine-commands/queryEngineCommons.js +8 -8
- package/dist/engine-commands/relativizePathInPSLError.js +1 -1
- package/dist/engine-commands/validate.js +13 -14
- package/dist/errorReporting.d.ts +0 -1
- package/dist/errorReporting.js +7 -7
- package/dist/get-generators/getGenerators.d.ts +10 -10
- package/dist/get-generators/getGenerators.js +72 -74
- package/dist/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
- package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
- package/dist/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
- package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
- package/dist/get-generators/utils/fixBinaryTargets.d.ts +1 -1
- package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
- package/dist/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
- package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
- package/dist/get-generators/utils/printGeneratorConfig.d.ts +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 +6 -7
- package/dist/index.js +138 -142
- package/dist/logger.js +9 -9
- package/dist/migrateTypes.d.ts +63 -0
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3AFJFP6K.js} +7 -7
- package/dist/panic.d.ts +1 -4
- package/dist/panic.js +7 -7
- package/dist/resolveBinary.js +9 -9
- package/dist/resolveOutput.js +1 -1
- package/dist/resolvePkg.d.ts +7 -0
- package/dist/resolvePkg.js +25 -0
- package/dist/schemaEngineCommands.js +12 -12
- package/dist/sendPanic.js +7 -110
- package/dist/types.d.ts +1 -1
- 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 +1 -1
- package/dist/utils/chmodPlusX.js +1 -1
- package/dist/utils/cloudflareD1.js +4 -4
- package/dist/utils/drawBox.js +1 -1
- package/dist/utils/extractPreviewFeatures.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/utils/getEnvPaths.js +69 -71
- package/dist/utils/getGitHubIssueUrl.js +5 -4
- 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 +11 -107
- 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 +69 -71
- 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.d.ts +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.d.ts +0 -4
- package/dist/utils/schemaFileInput.js +3 -7
- package/dist/utils/serializeQueryEngineName.js +1 -1
- package/dist/utils/setClassName.js +1 -1
- package/dist/utils/toSchemasContainer.d.ts +2 -3
- package/dist/utils/toSchemasContainer.js +4 -5
- 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 +14 -13
- package/dist/chunk-2SU4K35O.js +0 -15662
- package/dist/chunk-6IZLN4Z5.js +0 -15662
- package/dist/chunk-77IC3DNO.js +0 -35
- package/dist/chunk-AOQIUJT4.js +0 -41
- package/dist/chunk-MGZOEY6N.js +0 -28
- package/dist/chunk-S57RMXZW.js +0 -28
- package/dist/chunk-VRT7T6MF.js +0 -4959
- package/dist/chunk-YRBRUREX.js +0 -57
- package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +0 -134
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +0 -29
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +0 -134
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +0 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +0 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +0 -17
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +0 -135
@@ -26,16 +26,16 @@ 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_D4VZUY3O_exports = {};
|
30
|
+
__export(chunk_D4VZUY3O_exports, {
|
31
31
|
arg: () => arg,
|
32
32
|
format: () => format,
|
33
33
|
isError: () => isError
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_D4VZUY3O_exports);
|
36
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
37
37
|
var import_arg = __toESM(require("arg"));
|
38
|
-
var require_min_indent = (0,
|
38
|
+
var require_min_indent = (0, import_chunk_4VNS5WPM.__commonJS)({
|
39
39
|
"../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js"(exports, module2) {
|
40
40
|
"use strict";
|
41
41
|
module2.exports = (string) => {
|
@@ -47,23 +47,17 @@ var require_min_indent = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
47
47
|
};
|
48
48
|
}
|
49
49
|
});
|
50
|
-
var
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
const indent = minIndent(string);
|
56
|
-
if (indent === 0) {
|
57
|
-
return string;
|
58
|
-
}
|
59
|
-
const regex = new RegExp(`^[ \\t]{${indent}}`, "gm");
|
60
|
-
return string.replace(regex, "");
|
61
|
-
};
|
50
|
+
var import_min_indent = (0, import_chunk_4VNS5WPM.__toESM)(require_min_indent(), 1);
|
51
|
+
function stripIndent(string) {
|
52
|
+
const indent = (0, import_min_indent.default)(string);
|
53
|
+
if (indent === 0) {
|
54
|
+
return string;
|
62
55
|
}
|
63
|
-
});
|
64
|
-
|
56
|
+
const regex = new RegExp(`^[ \\t]{${indent}}`, "gm");
|
57
|
+
return string.replace(regex, "");
|
58
|
+
}
|
65
59
|
function format(input = "") {
|
66
|
-
return (
|
60
|
+
return stripIndent(input).trimRight() + "\n";
|
67
61
|
}
|
68
62
|
function arg(argv, spec, stopAtPositional = true, permissive = false) {
|
69
63
|
try {
|
@@ -26,25 +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_DFKSWLWX_exports = {};
|
30
|
+
__export(chunk_DFKSWLWX_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
36
|
-
var
|
37
|
-
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
34
|
+
module.exports = __toCommonJS(chunk_DFKSWLWX_exports);
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
36
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
|
-
var
|
40
|
-
var
|
41
|
-
var import_chunk_EOWYER24 = require("./chunk-EOWYER24.js");
|
42
|
-
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
38
|
+
var import_chunk_VUJECDYH = require("./chunk-VUJECDYH.js");
|
39
|
+
var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
|
43
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
41
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
42
|
+
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
44
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
45
|
-
var
|
44
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
46
45
|
var import_debug = __toESM(require("@prisma/debug"));
|
47
|
-
var import_function = (0,
|
46
|
+
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
48
47
|
var debug = (0, import_debug.default)("prisma:validate");
|
49
48
|
var ValidateError = class extends Error {
|
50
49
|
constructor(params) {
|
@@ -60,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
60
59
|
}).exhaustive();
|
61
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
61
|
[Context: validate]`;
|
63
|
-
super((0,
|
62
|
+
super((0, import_chunk_VUJECDYH.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
63
|
this.name = "ValidateError";
|
65
64
|
}
|
66
65
|
};
|
67
66
|
function validate(options) {
|
68
|
-
const debugErrorType = (0,
|
67
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "validateWasm");
|
69
68
|
debug(`Using validate Wasm`);
|
70
69
|
const validateEither = (0, import_function.pipe)(
|
71
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
72
71
|
() => {
|
73
72
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
74
73
|
debug("Triggering a Rust panic...");
|
75
|
-
|
74
|
+
import_chunk_VBLLSZ2K.prismaSchemaWasm.debug_panic();
|
76
75
|
}
|
77
76
|
const params = JSON.stringify({
|
78
77
|
prismaSchema: options.schemas,
|
79
78
|
noColor: Boolean(process.env.NO_COLOR)
|
80
79
|
});
|
81
|
-
|
80
|
+
import_chunk_VBLLSZ2K.prismaSchemaWasm.validate(params);
|
82
81
|
},
|
83
82
|
(e) => ({
|
84
83
|
type: "wasm-error",
|
@@ -93,27 +92,24 @@ function validate(options) {
|
|
93
92
|
const error = (0, import_chunk_XKZ6CBLA.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
94
93
|
debugErrorType(e);
|
95
94
|
console.error("");
|
96
|
-
if ((0,
|
97
|
-
const { message, stack } = (0,
|
95
|
+
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
96
|
+
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
98
97
|
debug(`Error validating schema: ${message}`);
|
99
98
|
debug(stack);
|
100
|
-
const panic = new
|
99
|
+
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
101
100
|
/* message */
|
102
101
|
message,
|
103
102
|
/* rustStack */
|
104
103
|
stack,
|
105
104
|
/* request */
|
106
105
|
"@prisma/prisma-schema-wasm validate",
|
107
|
-
"FMT_CLI"
|
108
|
-
/*
|
109
|
-
(0, import_chunk_YRBRUREX.debugMultipleSchemaPaths)(options.schemas),
|
110
|
-
/* schema */
|
111
|
-
options.schemas
|
106
|
+
"FMT_CLI"
|
107
|
+
/* FMT_CLI */
|
112
108
|
);
|
113
109
|
return panic;
|
114
110
|
}
|
115
111
|
const errorOutput = e.error.message;
|
116
|
-
return new ValidateError((0,
|
112
|
+
return new ValidateError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
117
113
|
}).exhaustive();
|
118
114
|
throw error;
|
119
115
|
}
|
@@ -26,24 +26,23 @@ 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_DJD6ZF6T_exports = {};
|
30
|
+
__export(chunk_DJD6ZF6T_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
36
|
-
var
|
37
|
-
var
|
38
|
-
var
|
39
|
-
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
40
|
-
var import_chunk_EOWYER24 = require("./chunk-EOWYER24.js");
|
41
|
-
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
34
|
+
module.exports = __toCommonJS(chunk_DJD6ZF6T_exports);
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
36
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
37
|
+
var import_chunk_VUJECDYH = require("./chunk-VUJECDYH.js");
|
38
|
+
var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
|
42
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
40
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
+
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
43
42
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
44
|
-
var
|
43
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
45
44
|
var import_debug = __toESM(require("@prisma/debug"));
|
46
|
-
var import_function = (0,
|
45
|
+
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
47
46
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
48
47
|
var GetDmmfError = class extends Error {
|
49
48
|
constructor(params) {
|
@@ -59,25 +58,25 @@ ${detailsHeader} ${message}`;
|
|
59
58
|
}).exhaustive();
|
60
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
61
60
|
[Context: getDmmf]`;
|
62
|
-
super((0,
|
61
|
+
super((0, import_chunk_VUJECDYH.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
63
62
|
this.name = "GetDmmfError";
|
64
63
|
}
|
65
64
|
};
|
66
65
|
async function getDMMF(options) {
|
67
|
-
const debugErrorType = (0,
|
66
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
68
67
|
debug(`Using getDmmf Wasm`);
|
69
68
|
const dmmfPipeline = (0, import_function.pipe)(
|
70
69
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
71
70
|
() => {
|
72
71
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
73
72
|
debug("Triggering a Rust panic...");
|
74
|
-
|
73
|
+
import_chunk_VBLLSZ2K.prismaSchemaWasm.debug_panic();
|
75
74
|
}
|
76
75
|
const params = JSON.stringify({
|
77
76
|
prismaSchema: options.datamodel,
|
78
77
|
noColor: Boolean(process.env.NO_COLOR)
|
79
78
|
});
|
80
|
-
const data =
|
79
|
+
const data = import_chunk_VBLLSZ2K.prismaSchemaWasm.get_dmmf(params);
|
81
80
|
return data;
|
82
81
|
},
|
83
82
|
(e) => ({
|
@@ -110,25 +109,22 @@ async function getDMMF(options) {
|
|
110
109
|
}
|
111
110
|
const error = (0, import_chunk_XKZ6CBLA.z)(dmmfEither.left).with({ type: "wasm-error" }, (e) => {
|
112
111
|
debugErrorType(e);
|
113
|
-
if ((0,
|
114
|
-
const { message, stack } = (0,
|
115
|
-
const panic = new
|
112
|
+
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
113
|
+
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
114
|
+
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
116
115
|
/* message */
|
117
116
|
message,
|
118
117
|
/* rustStack */
|
119
118
|
stack,
|
120
119
|
/* request */
|
121
120
|
"@prisma/prisma-schema-wasm get_dmmf",
|
122
|
-
"FMT_CLI"
|
123
|
-
/*
|
124
|
-
void 0,
|
125
|
-
/* schema */
|
126
|
-
(0, import_chunk_YRBRUREX.toMultipleSchemas)(options.datamodel)
|
121
|
+
"FMT_CLI"
|
122
|
+
/* FMT_CLI */
|
127
123
|
);
|
128
124
|
return panic;
|
129
125
|
}
|
130
126
|
const errorOutput = e.error.message;
|
131
|
-
return new GetDmmfError((0,
|
127
|
+
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
132
128
|
}).with({ type: "parse-json" }, (e) => {
|
133
129
|
debugErrorType(e);
|
134
130
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|