@prisma/internals 6.6.0-integration-refactor-schema-path-less-migrate-class.1 → 6.6.0-integration-push-xmzqvqxpztks.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/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-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
- package/dist/{chunk-SNY3IPJ5.js → chunk-6YPRKPWR.js} +5 -5
- package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
- package/dist/{chunk-DZXCMG6O.js → chunk-76QFLC66.js} +21 -25
- package/dist/{chunk-6RMP4L37.js → chunk-7JDKTQ7P.js} +20 -24
- package/dist/chunk-AADL5UHK.js +897 -0
- package/dist/{chunk-OEXSUUW2.js → chunk-AZV6HVKA.js} +7 -7
- package/dist/{chunk-XKNXU2N3.js → chunk-BL6JTZ5B.js} +12 -11
- package/dist/{chunk-OCPELPFI.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-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-UFYNZD7Y.js → chunk-ETVM6IV5.js} +22 -26
- package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
- package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
- package/dist/{chunk-L6GBFCXG.js → chunk-HAGJ64PM.js} +142 -155
- package/dist/{chunk-HMRJXDNO.js → chunk-HG3YOAAE.js} +8 -8
- 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-Q2GXXFZU.js → chunk-LS2NTQLX.js} +9 -9
- package/dist/{chunk-QY2YJCMB.js → chunk-LVUBW3T7.js} +11 -15
- package/dist/{chunk-C2WD2XUT.js → chunk-MJIP3FY5.js} +968 -1220
- package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.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-46YCXISN.js → chunk-PUKEXBI4.js} +21 -25
- package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
- package/dist/{chunk-YK5AZ3CV.js → chunk-RN2HKPE6.js} +21 -25
- package/dist/{chunk-4AC2JUM4.js → chunk-S2R7ACYL.js} +22 -26
- package/dist/chunk-SZD3E6G4.js +897 -0
- package/dist/{chunk-OIEQY7MB.js → chunk-TAP5I7K3.js} +5 -5
- 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-EOWYER24.js → chunk-UPQKNKIW.js} +9 -9
- package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
- package/dist/{chunk-JJBDZ3V4.js → chunk-UZI5CEWB.js} +20 -24
- package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
- 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,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_RN2HKPE6_exports = {};
|
30
|
+
__export(chunk_RN2HKPE6_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_Q2GXXFZU = require("./chunk-Q2GXXFZU.js");
|
41
|
-
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
34
|
+
module.exports = __toCommonJS(chunk_RN2HKPE6_exports);
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
36
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
37
|
+
var import_chunk_C73SLFIL = require("./chunk-C73SLFIL.js");
|
38
|
+
var import_chunk_UPQKNKIW = require("./chunk-UPQKNKIW.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_C73SLFIL.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_UPQKNKIW.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_UPQKNKIW.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 });
|
@@ -26,29 +26,28 @@ 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_S2R7ACYL_exports = {};
|
30
|
+
__export(chunk_S2R7ACYL_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(
|
38
|
-
var
|
39
|
-
var
|
40
|
-
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
37
|
+
module.exports = __toCommonJS(chunk_S2R7ACYL_exports);
|
38
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
39
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
41
40
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
42
|
-
var
|
43
|
-
var
|
44
|
-
var import_chunk_EOWYER24 = require("./chunk-EOWYER24.js");
|
45
|
-
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
41
|
+
var import_chunk_C73SLFIL = require("./chunk-C73SLFIL.js");
|
42
|
+
var import_chunk_UPQKNKIW = require("./chunk-UPQKNKIW.js");
|
46
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
45
|
+
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
47
46
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
48
|
-
var
|
47
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
49
48
|
var import_debug = __toESM(require("@prisma/debug"));
|
50
49
|
var import_get_platform = require("@prisma/get-platform");
|
51
|
-
var import_function = (0,
|
50
|
+
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
52
51
|
var debug = (0, import_debug.default)("prisma:getConfig");
|
53
52
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
54
53
|
var GetConfigError = class extends Error {
|
@@ -65,7 +64,7 @@ ${detailsHeader} ${message}`;
|
|
65
64
|
}).exhaustive();
|
66
65
|
const errorMessageWithContext = `${constructedErrorMessage}
|
67
66
|
[Context: getConfig]`;
|
68
|
-
super((0,
|
67
|
+
super((0, import_chunk_C73SLFIL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
69
68
|
this.name = "GetConfigError";
|
70
69
|
}
|
71
70
|
};
|
@@ -83,14 +82,14 @@ function resolveUrl(envValue) {
|
|
83
82
|
return urlFromValue ?? urlEnvVarValue;
|
84
83
|
}
|
85
84
|
async function getConfig(options) {
|
86
|
-
const debugErrorType = (0,
|
85
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
|
87
86
|
debug(`Using getConfig Wasm`);
|
88
87
|
const configEither = (0, import_function.pipe)(
|
89
88
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
90
89
|
() => {
|
91
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
92
91
|
debug("Triggering a Rust panic...");
|
93
|
-
|
92
|
+
import_chunk_UPQKNKIW.prismaSchemaWasm.debug_panic();
|
94
93
|
}
|
95
94
|
const params = JSON.stringify({
|
96
95
|
prismaSchema: options.datamodel,
|
@@ -98,7 +97,7 @@ async function getConfig(options) {
|
|
98
97
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
99
98
|
env: process.env
|
100
99
|
});
|
101
|
-
const data =
|
100
|
+
const data = import_chunk_UPQKNKIW.prismaSchemaWasm.get_config(params);
|
102
101
|
return data;
|
103
102
|
},
|
104
103
|
(e) => ({
|
@@ -142,30 +141,27 @@ async function getConfig(options) {
|
|
142
141
|
}
|
143
142
|
const error = (0, import_chunk_XKZ6CBLA.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
|
144
143
|
debugErrorType(e);
|
145
|
-
if ((0,
|
146
|
-
const { message, stack } = (0,
|
147
|
-
const panic = new
|
144
|
+
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
145
|
+
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
146
|
+
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
148
147
|
/* message */
|
149
148
|
message,
|
150
149
|
/* rustStack */
|
151
150
|
stack,
|
152
151
|
/* request */
|
153
152
|
"@prisma/prisma-schema-wasm get_config",
|
154
|
-
"FMT_CLI"
|
155
|
-
/*
|
156
|
-
void 0,
|
157
|
-
/* schema */
|
158
|
-
(0, import_chunk_YRBRUREX.toMultipleSchemas)(options.datamodel)
|
153
|
+
"FMT_CLI"
|
154
|
+
/* FMT_CLI */
|
159
155
|
);
|
160
156
|
return panic;
|
161
157
|
}
|
162
158
|
const errorOutput = e.error.message;
|
163
|
-
return new GetConfigError((0,
|
159
|
+
return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
164
160
|
}).with({ type: "validation-error" }, (e) => {
|
165
161
|
return new GetConfigError({
|
166
162
|
_tag: "parsed",
|
167
163
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
168
|
-
reason: (0,
|
164
|
+
reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
|
169
165
|
message: formatErrors(e.error)
|
170
166
|
});
|
171
167
|
}).otherwise((e) => {
|