@prisma/internals 6.20.0-integration-feat-prisma-7-config.4 → 6.20.0-integration-engines-6-20-0-1-integration-oidc-truster-publishers-e28d8c7807dc95db08a9a866250934b3aac2c89b.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-B2BNIZB2.js → chunk-2NO2JKZ5.js} +8 -7
- package/dist/{chunk-N6RUOMFQ.js → chunk-2NYEQR5W.js} +5 -5
- package/dist/{chunk-USWUUAD2.js → chunk-2O3VYQLI.js} +11 -11
- package/dist/chunk-3FP46GUV.js +471 -0
- package/dist/{chunk-VHE2A7YV.js → chunk-3U76J22D.js} +11 -11
- package/dist/chunk-46ABODUM.js +186 -0
- package/dist/{chunk-GJSFP4V4.js → chunk-4CGPN5SR.js} +9 -3
- package/dist/{chunk-GL7OANR6.js → chunk-4JCVHBYR.js} +5 -5
- package/dist/{chunk-MEOOYUIZ.js → chunk-5AI4FIZ3.js} +10 -10
- package/dist/{chunk-YN4MD4NY.js → chunk-6NU5L5WI.js} +12 -12
- package/dist/chunk-6TTRTZXU.js +37 -0
- package/dist/{chunk-SMJRM3EM.js → chunk-75BIJ5PX.js} +9 -9
- package/dist/{chunk-WBLG3WYC.js → chunk-77IREUT5.js} +20 -14
- package/dist/{chunk-MYLPCGTT.js → chunk-7QC5VORA.js} +5 -5
- package/dist/{chunk-TGA7DC5A.js → chunk-AX5N26KG.js} +9 -14
- package/dist/{chunk-5FTKVAG5.js → chunk-BAKQDFDR.js} +97 -40
- package/dist/{chunk-TLOMW2S7.js → chunk-BFR6BYIF.js} +97 -40
- package/dist/{chunk-QSVWJ2S2.js → chunk-BVJP43JS.js} +784 -13
- package/dist/{chunk-3ZWEK4N6.js → chunk-CXIZ2XKS.js} +5 -5
- package/dist/chunk-D4VDA2TZ.js +66 -0
- package/dist/chunk-DZYINYAA.js +68 -0
- package/dist/chunk-ERSH2BQA.js +58 -0
- package/dist/{chunk-OKVM3CW4.js → chunk-EYVG6XQS.js} +39 -3
- package/dist/{chunk-5MHUYAV3.js → chunk-F2OZV76L.js} +9 -9
- package/dist/{chunk-24ZPBDBI.js → chunk-FOLY7PXH.js} +11 -11
- package/dist/{chunk-2Q43C56O.js → chunk-FQYGFHOV.js} +5 -5
- package/dist/{chunk-HNRMSI3R.js → chunk-FYZCPL2Z.js} +8 -5
- package/dist/{chunk-VFZCLI5X.js → chunk-GLZZMW23.js} +5 -5
- package/dist/{chunk-22HIO2UL.js → chunk-GMW36QQF.js} +7 -7
- package/dist/{chunk-BUQN4WLU.js → chunk-HFFWZTVM.js} +9 -7
- package/dist/{chunk-CGLLQXZE.js → chunk-HHG4DGHC.js} +12 -11
- package/dist/{chunk-5W3BSMTH.js → chunk-HO5HRHFZ.js} +6 -3
- package/dist/{chunk-3WXUQZS7.js → chunk-I6WLABB2.js} +5 -14
- package/dist/{chunk-FF7OLLBP.js → chunk-IDINCQMN.js} +784 -12
- package/dist/{chunk-QOZ7USPD.js → chunk-JOIIWB3U.js} +159 -193
- package/dist/{chunk-73HXEN2A.js → chunk-JW3XTFPO.js} +5 -5
- package/dist/{chunk-UHN4BR3K.js → chunk-KI2DKJN3.js} +5 -5
- package/dist/{chunk-YWVCZKBM.js → chunk-KNRW6B23.js} +11 -11
- package/dist/{chunk-KNNTV7IN.js → chunk-NVNI2SRU.js} +213 -687
- package/dist/{chunk-H5STSTVK.js → chunk-OAT7ZJED.js} +20 -7
- package/dist/{chunk-SVJBSZKZ.js → chunk-PEE6ENIU.js} +9 -8
- package/dist/chunk-PZMRR772.js +41 -0
- package/dist/{chunk-SPQV2DVP.js → chunk-ROIGE6HI.js} +5 -5
- package/dist/{chunk-5I4ERIIY.js → chunk-RS2R7COT.js} +9 -3
- package/dist/chunk-T2PM5TKT.js +55 -0
- package/dist/{chunk-MLFKBBDL.js → chunk-TQFONRJP.js} +5 -5
- package/dist/{chunk-WSZXPLJQ.js → chunk-TZJROXB3.js} +4 -4
- package/dist/{chunk-WJKBKH3Y.js → chunk-UHI6VYFX.js} +5 -5
- package/dist/{chunk-BM3JIFQT.js → chunk-UQUWZJVN.js} +7 -7
- package/dist/{chunk-ARC7TW3L.js → chunk-WFNB7VRA.js} +14 -4
- package/dist/{chunk-LA5QBRTU.js → chunk-X5SLQREP.js} +20 -14
- package/dist/{chunk-66KS6FZC.js → chunk-XZ2N3HZX.js} +5 -5
- package/dist/{chunk-C5YUUOQW.js → chunk-YUX64XCQ.js} +12 -12
- package/dist/cli/checkUnsupportedDataProxy.js +60 -53
- package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +22 -0
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +135 -0
- package/dist/cli/getGeneratorSuccessMessage.js +3 -2
- package/dist/cli/getSchema.d.ts +15 -1
- package/dist/cli/getSchema.js +5 -4
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +11 -2
- package/dist/cli/schemaContext.js +60 -53
- package/dist/client/getClientEngineType.d.ts +7 -0
- package/dist/client/getClientEngineType.js +26 -0
- package/dist/dotenvExpand.d.ts +35 -0
- package/dist/dotenvExpand.js +25 -0
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +59 -52
- package/dist/engine-commands/getConfig.d.ts +1 -0
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +9 -6
- package/dist/engine-commands/getEnginesInfo.d.ts +1 -0
- package/dist/engine-commands/getEnginesInfo.js +9 -7
- package/dist/engine-commands/index.js +71 -64
- package/dist/engine-commands/lintSchema.js +9 -9
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +10 -10
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/getGenerators.d.ts +1 -0
- package/dist/get-generators/getGenerators.js +62 -55
- package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
- package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +5 -6
- package/dist/getPackedPackage.js +3 -4
- package/dist/index.d.ts +10 -1
- package/dist/index.js +112 -95
- package/dist/{multipart-parser-UV3WZSWW.js → multipart-parser-3AFJFP6K.js} +6 -6
- package/dist/resolveBinary.js +7 -8
- package/dist/schemaEngineCommands.js +8 -9
- package/dist/sendPanic.js +4 -4
- package/dist/utils/cloudflareD1.d.ts +5 -0
- package/dist/utils/cloudflareD1.js +27 -0
- package/dist/utils/drawBox.js +2 -2
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getEnvPaths.d.ts +14 -0
- package/dist/utils/getEnvPaths.js +29 -0
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.d.ts +8 -0
- package/dist/utils/handleEngineLoadingErrors.js +27 -0
- package/dist/utils/handlePanic.js +6 -6
- package/dist/utils/link.js +2 -2
- package/dist/utils/load.d.ts +6 -0
- package/dist/utils/load.js +28 -0
- package/dist/utils/loadEnvFile.d.ts +10 -0
- package/dist/utils/loadEnvFile.js +30 -0
- package/dist/utils/missingDatasource.js +3 -3
- package/dist/utils/missingGeneratorMessage.js +5 -5
- package/dist/utils/serializeQueryEngineName.js +2 -2
- package/dist/utils/tryLoadEnvs.d.ts +25 -0
- package/dist/utils/tryLoadEnvs.js +30 -0
- package/dist/wasm.js +5 -5
- package/package.json +16 -15
- package/dist/chunk-DYV47NUW.js +0 -796
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_2NO2JKZ5_exports = {};
|
|
20
|
+
__export(chunk_2NO2JKZ5_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_2NO2JKZ5_exports);
|
|
24
24
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
25
25
|
var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
@@ -59,11 +59,12 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
59
59
|
"@swc/jest": "0.2.37",
|
|
60
60
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
|
61
61
|
"@types/jest": "29.5.14",
|
|
62
|
-
"@types/node": "
|
|
62
|
+
"@types/node": "18.19.76",
|
|
63
63
|
"@types/resolve": "1.20.6",
|
|
64
64
|
archiver: "6.0.2",
|
|
65
65
|
"checkpoint-client": "1.1.33",
|
|
66
66
|
"cli-truncate": "4.0.0",
|
|
67
|
+
dotenv: "16.5.0",
|
|
67
68
|
empathic: "2.0.0",
|
|
68
69
|
"escape-string-regexp": "5.0.0",
|
|
69
70
|
execa: "8.0.1",
|
|
@@ -108,14 +109,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
108
109
|
"@prisma/generator": "workspace:*",
|
|
109
110
|
"@prisma/generator-helper": "workspace:*",
|
|
110
111
|
"@prisma/get-platform": "workspace:*",
|
|
111
|
-
"@prisma/prisma-schema-wasm": "6.
|
|
112
|
-
"@prisma/schema-engine-wasm": "6.
|
|
112
|
+
"@prisma/prisma-schema-wasm": "6.20.0-1.integration-oidc-truster-publishers-e28d8c7807dc95db08a9a866250934b3aac2c89b",
|
|
113
|
+
"@prisma/schema-engine-wasm": "6.20.0-1.integration-oidc-truster-publishers-e28d8c7807dc95db08a9a866250934b3aac2c89b",
|
|
113
114
|
"@prisma/schema-files-loader": "workspace:*",
|
|
114
115
|
arg: "5.0.2",
|
|
115
116
|
prompts: "2.4.2"
|
|
116
117
|
},
|
|
117
118
|
peerDependencies: {
|
|
118
|
-
typescript: ">=5.
|
|
119
|
+
typescript: ">=5.1.0"
|
|
119
120
|
},
|
|
120
121
|
peerDependenciesMeta: {
|
|
121
122
|
typescript: {
|
|
@@ -16,15 +16,15 @@ 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_2NYEQR5W_exports = {};
|
|
20
|
+
__export(chunk_2NYEQR5W_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_2NYEQR5W_exports);
|
|
24
|
+
var import_chunk_XZ2N3HZX = require("./chunk-XZ2N3HZX.js");
|
|
24
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
-
var import_chunk_66KS6FZC = require("./chunk-66KS6FZC.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_XZ2N3HZX.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -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_2O3VYQLI_exports = {};
|
|
30
|
+
__export(chunk_2O3VYQLI_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_2O3VYQLI_exports);
|
|
35
|
+
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_FQYGFHOV = require("./chunk-FQYGFHOV.js");
|
|
38
|
+
var import_chunk_CXIZ2XKS = require("./chunk-CXIZ2XKS.js");
|
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -58,25 +58,25 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_FQYGFHOV.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
async function getDMMF(options) {
|
|
66
|
-
const debugErrorType = (0,
|
|
66
|
+
const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "getDmmfWasm");
|
|
67
67
|
debug(`Using getDmmf Wasm`);
|
|
68
68
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
69
69
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
70
70
|
() => {
|
|
71
71
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_CXIZ2XKS.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_CXIZ2XKS.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
@@ -124,7 +124,7 @@ async function getDMMF(options) {
|
|
|
124
124
|
return panic;
|
|
125
125
|
}
|
|
126
126
|
const errorOutput = e.error.message;
|
|
127
|
-
return new GetDmmfError((0,
|
|
127
|
+
return new GetDmmfError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
128
128
|
}).with({ type: "parse-json" }, (e) => {
|
|
129
129
|
debugErrorType(e);
|
|
130
130
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
|
@@ -0,0 +1,471 @@
|
|
|
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_3FP46GUV_exports = {};
|
|
30
|
+
__export(chunk_3FP46GUV_exports, {
|
|
31
|
+
exists: () => exists,
|
|
32
|
+
loadEnv: () => loadEnv,
|
|
33
|
+
pathsEqual: () => pathsEqual,
|
|
34
|
+
tryLoadEnvs: () => tryLoadEnvs
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(chunk_3FP46GUV_exports);
|
|
37
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
38
|
+
var import_chunk_T2PM5TKT = require("./chunk-T2PM5TKT.js");
|
|
39
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
40
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
|
41
|
+
var import_fs = __toESM(require("fs"));
|
|
42
|
+
var import_path = __toESM(require("path"));
|
|
43
|
+
var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
44
|
+
"../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json"(exports, module2) {
|
|
45
|
+
module2.exports = {
|
|
46
|
+
name: "dotenv",
|
|
47
|
+
version: "16.5.0",
|
|
48
|
+
description: "Loads environment variables from .env file",
|
|
49
|
+
main: "lib/main.js",
|
|
50
|
+
types: "lib/main.d.ts",
|
|
51
|
+
exports: {
|
|
52
|
+
".": {
|
|
53
|
+
types: "./lib/main.d.ts",
|
|
54
|
+
require: "./lib/main.js",
|
|
55
|
+
default: "./lib/main.js"
|
|
56
|
+
},
|
|
57
|
+
"./config": "./config.js",
|
|
58
|
+
"./config.js": "./config.js",
|
|
59
|
+
"./lib/env-options": "./lib/env-options.js",
|
|
60
|
+
"./lib/env-options.js": "./lib/env-options.js",
|
|
61
|
+
"./lib/cli-options": "./lib/cli-options.js",
|
|
62
|
+
"./lib/cli-options.js": "./lib/cli-options.js",
|
|
63
|
+
"./package.json": "./package.json"
|
|
64
|
+
},
|
|
65
|
+
scripts: {
|
|
66
|
+
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
67
|
+
lint: "standard",
|
|
68
|
+
pretest: "npm run lint && npm run dts-check",
|
|
69
|
+
test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
70
|
+
"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",
|
|
71
|
+
prerelease: "npm test",
|
|
72
|
+
release: "standard-version"
|
|
73
|
+
},
|
|
74
|
+
repository: {
|
|
75
|
+
type: "git",
|
|
76
|
+
url: "git://github.com/motdotla/dotenv.git"
|
|
77
|
+
},
|
|
78
|
+
homepage: "https://github.com/motdotla/dotenv#readme",
|
|
79
|
+
funding: "https://dotenvx.com",
|
|
80
|
+
keywords: [
|
|
81
|
+
"dotenv",
|
|
82
|
+
"env",
|
|
83
|
+
".env",
|
|
84
|
+
"environment",
|
|
85
|
+
"variables",
|
|
86
|
+
"config",
|
|
87
|
+
"settings"
|
|
88
|
+
],
|
|
89
|
+
readmeFilename: "README.md",
|
|
90
|
+
license: "BSD-2-Clause",
|
|
91
|
+
devDependencies: {
|
|
92
|
+
"@types/node": "^18.11.3",
|
|
93
|
+
decache: "^4.6.2",
|
|
94
|
+
sinon: "^14.0.1",
|
|
95
|
+
standard: "^17.0.0",
|
|
96
|
+
"standard-version": "^9.5.0",
|
|
97
|
+
tap: "^19.2.0",
|
|
98
|
+
typescript: "^4.8.4"
|
|
99
|
+
},
|
|
100
|
+
engines: {
|
|
101
|
+
node: ">=12"
|
|
102
|
+
},
|
|
103
|
+
browser: {
|
|
104
|
+
fs: false
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
var require_main = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
110
|
+
"../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js"(exports, module2) {
|
|
111
|
+
"use strict";
|
|
112
|
+
var fs2 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
|
113
|
+
var path2 = (0, import_chunk_4VNS5WPM.__require)("path");
|
|
114
|
+
var os = (0, import_chunk_4VNS5WPM.__require)("os");
|
|
115
|
+
var crypto = (0, import_chunk_4VNS5WPM.__require)("crypto");
|
|
116
|
+
var packageJson = require_package();
|
|
117
|
+
var version = packageJson.version;
|
|
118
|
+
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
119
|
+
function parse(src) {
|
|
120
|
+
const obj = {};
|
|
121
|
+
let lines = src.toString();
|
|
122
|
+
lines = lines.replace(/\r\n?/mg, "\n");
|
|
123
|
+
let match;
|
|
124
|
+
while ((match = LINE.exec(lines)) != null) {
|
|
125
|
+
const key = match[1];
|
|
126
|
+
let value = match[2] || "";
|
|
127
|
+
value = value.trim();
|
|
128
|
+
const maybeQuote = value[0];
|
|
129
|
+
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
|
|
130
|
+
if (maybeQuote === '"') {
|
|
131
|
+
value = value.replace(/\\n/g, "\n");
|
|
132
|
+
value = value.replace(/\\r/g, "\r");
|
|
133
|
+
}
|
|
134
|
+
obj[key] = value;
|
|
135
|
+
}
|
|
136
|
+
return obj;
|
|
137
|
+
}
|
|
138
|
+
function _parseVault(options) {
|
|
139
|
+
const vaultPath = _vaultPath(options);
|
|
140
|
+
const result = DotenvModule.configDotenv({ path: vaultPath });
|
|
141
|
+
if (!result.parsed) {
|
|
142
|
+
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
143
|
+
err.code = "MISSING_DATA";
|
|
144
|
+
throw err;
|
|
145
|
+
}
|
|
146
|
+
const keys = _dotenvKey(options).split(",");
|
|
147
|
+
const length = keys.length;
|
|
148
|
+
let decrypted;
|
|
149
|
+
for (let i = 0; i < length; i++) {
|
|
150
|
+
try {
|
|
151
|
+
const key = keys[i].trim();
|
|
152
|
+
const attrs = _instructions(result, key);
|
|
153
|
+
decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
|
|
154
|
+
break;
|
|
155
|
+
} catch (error) {
|
|
156
|
+
if (i + 1 >= length) {
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return DotenvModule.parse(decrypted);
|
|
162
|
+
}
|
|
163
|
+
function _warn(message) {
|
|
164
|
+
console.log(`[dotenv@${version}][WARN] ${message}`);
|
|
165
|
+
}
|
|
166
|
+
function _debug(message) {
|
|
167
|
+
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
|
168
|
+
}
|
|
169
|
+
function _dotenvKey(options) {
|
|
170
|
+
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
|
|
171
|
+
return options.DOTENV_KEY;
|
|
172
|
+
}
|
|
173
|
+
if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
|
|
174
|
+
return process.env.DOTENV_KEY;
|
|
175
|
+
}
|
|
176
|
+
return "";
|
|
177
|
+
}
|
|
178
|
+
function _instructions(result, dotenvKey) {
|
|
179
|
+
let uri;
|
|
180
|
+
try {
|
|
181
|
+
uri = new URL(dotenvKey);
|
|
182
|
+
} catch (error) {
|
|
183
|
+
if (error.code === "ERR_INVALID_URL") {
|
|
184
|
+
const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
185
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
186
|
+
throw err;
|
|
187
|
+
}
|
|
188
|
+
throw error;
|
|
189
|
+
}
|
|
190
|
+
const key = uri.password;
|
|
191
|
+
if (!key) {
|
|
192
|
+
const err = new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
193
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
194
|
+
throw err;
|
|
195
|
+
}
|
|
196
|
+
const environment = uri.searchParams.get("environment");
|
|
197
|
+
if (!environment) {
|
|
198
|
+
const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
199
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
200
|
+
throw err;
|
|
201
|
+
}
|
|
202
|
+
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
|
203
|
+
const ciphertext = result.parsed[environmentKey];
|
|
204
|
+
if (!ciphertext) {
|
|
205
|
+
const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
206
|
+
err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
207
|
+
throw err;
|
|
208
|
+
}
|
|
209
|
+
return { ciphertext, key };
|
|
210
|
+
}
|
|
211
|
+
function _vaultPath(options) {
|
|
212
|
+
let possibleVaultPath = null;
|
|
213
|
+
if (options && options.path && options.path.length > 0) {
|
|
214
|
+
if (Array.isArray(options.path)) {
|
|
215
|
+
for (const filepath of options.path) {
|
|
216
|
+
if (fs2.existsSync(filepath)) {
|
|
217
|
+
possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
} else {
|
|
221
|
+
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
222
|
+
}
|
|
223
|
+
} else {
|
|
224
|
+
possibleVaultPath = path2.resolve(process.cwd(), ".env.vault");
|
|
225
|
+
}
|
|
226
|
+
if (fs2.existsSync(possibleVaultPath)) {
|
|
227
|
+
return possibleVaultPath;
|
|
228
|
+
}
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
function _resolveHome(envPath) {
|
|
232
|
+
return envPath[0] === "~" ? path2.join(os.homedir(), envPath.slice(1)) : envPath;
|
|
233
|
+
}
|
|
234
|
+
function _configVault(options) {
|
|
235
|
+
const debug2 = Boolean(options && options.debug);
|
|
236
|
+
if (debug2) {
|
|
237
|
+
_debug("Loading env from encrypted .env.vault");
|
|
238
|
+
}
|
|
239
|
+
const parsed = DotenvModule._parseVault(options);
|
|
240
|
+
let processEnv = process.env;
|
|
241
|
+
if (options && options.processEnv != null) {
|
|
242
|
+
processEnv = options.processEnv;
|
|
243
|
+
}
|
|
244
|
+
DotenvModule.populate(processEnv, parsed, options);
|
|
245
|
+
return { parsed };
|
|
246
|
+
}
|
|
247
|
+
function configDotenv(options) {
|
|
248
|
+
const dotenvPath = path2.resolve(process.cwd(), ".env");
|
|
249
|
+
let encoding = "utf8";
|
|
250
|
+
const debug2 = Boolean(options && options.debug);
|
|
251
|
+
if (options && options.encoding) {
|
|
252
|
+
encoding = options.encoding;
|
|
253
|
+
} else {
|
|
254
|
+
if (debug2) {
|
|
255
|
+
_debug("No encoding is specified. UTF-8 is used by default");
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
let optionPaths = [dotenvPath];
|
|
259
|
+
if (options && options.path) {
|
|
260
|
+
if (!Array.isArray(options.path)) {
|
|
261
|
+
optionPaths = [_resolveHome(options.path)];
|
|
262
|
+
} else {
|
|
263
|
+
optionPaths = [];
|
|
264
|
+
for (const filepath of options.path) {
|
|
265
|
+
optionPaths.push(_resolveHome(filepath));
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
let lastError;
|
|
270
|
+
const parsedAll = {};
|
|
271
|
+
for (const path3 of optionPaths) {
|
|
272
|
+
try {
|
|
273
|
+
const parsed = DotenvModule.parse(fs2.readFileSync(path3, { encoding }));
|
|
274
|
+
DotenvModule.populate(parsedAll, parsed, options);
|
|
275
|
+
} catch (e) {
|
|
276
|
+
if (debug2) {
|
|
277
|
+
_debug(`Failed to load ${path3} ${e.message}`);
|
|
278
|
+
}
|
|
279
|
+
lastError = e;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
let processEnv = process.env;
|
|
283
|
+
if (options && options.processEnv != null) {
|
|
284
|
+
processEnv = options.processEnv;
|
|
285
|
+
}
|
|
286
|
+
DotenvModule.populate(processEnv, parsedAll, options);
|
|
287
|
+
if (lastError) {
|
|
288
|
+
return { parsed: parsedAll, error: lastError };
|
|
289
|
+
} else {
|
|
290
|
+
return { parsed: parsedAll };
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function config(options) {
|
|
294
|
+
if (_dotenvKey(options).length === 0) {
|
|
295
|
+
return DotenvModule.configDotenv(options);
|
|
296
|
+
}
|
|
297
|
+
const vaultPath = _vaultPath(options);
|
|
298
|
+
if (!vaultPath) {
|
|
299
|
+
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
|
|
300
|
+
return DotenvModule.configDotenv(options);
|
|
301
|
+
}
|
|
302
|
+
return DotenvModule._configVault(options);
|
|
303
|
+
}
|
|
304
|
+
function decrypt(encrypted, keyStr) {
|
|
305
|
+
const key = Buffer.from(keyStr.slice(-64), "hex");
|
|
306
|
+
let ciphertext = Buffer.from(encrypted, "base64");
|
|
307
|
+
const nonce = ciphertext.subarray(0, 12);
|
|
308
|
+
const authTag = ciphertext.subarray(-16);
|
|
309
|
+
ciphertext = ciphertext.subarray(12, -16);
|
|
310
|
+
try {
|
|
311
|
+
const aesgcm = crypto.createDecipheriv("aes-256-gcm", key, nonce);
|
|
312
|
+
aesgcm.setAuthTag(authTag);
|
|
313
|
+
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
|
|
314
|
+
} catch (error) {
|
|
315
|
+
const isRange = error instanceof RangeError;
|
|
316
|
+
const invalidKeyLength = error.message === "Invalid key length";
|
|
317
|
+
const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
|
|
318
|
+
if (isRange || invalidKeyLength) {
|
|
319
|
+
const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
320
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
321
|
+
throw err;
|
|
322
|
+
} else if (decryptionFailed) {
|
|
323
|
+
const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
324
|
+
err.code = "DECRYPTION_FAILED";
|
|
325
|
+
throw err;
|
|
326
|
+
} else {
|
|
327
|
+
throw error;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function populate(processEnv, parsed, options = {}) {
|
|
332
|
+
const debug2 = Boolean(options && options.debug);
|
|
333
|
+
const override = Boolean(options && options.override);
|
|
334
|
+
if (typeof parsed !== "object") {
|
|
335
|
+
const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
336
|
+
err.code = "OBJECT_REQUIRED";
|
|
337
|
+
throw err;
|
|
338
|
+
}
|
|
339
|
+
for (const key of Object.keys(parsed)) {
|
|
340
|
+
if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
|
341
|
+
if (override === true) {
|
|
342
|
+
processEnv[key] = parsed[key];
|
|
343
|
+
}
|
|
344
|
+
if (debug2) {
|
|
345
|
+
if (override === true) {
|
|
346
|
+
_debug(`"${key}" is already defined and WAS overwritten`);
|
|
347
|
+
} else {
|
|
348
|
+
_debug(`"${key}" is already defined and was NOT overwritten`);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
} else {
|
|
352
|
+
processEnv[key] = parsed[key];
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
var DotenvModule = {
|
|
357
|
+
configDotenv,
|
|
358
|
+
_configVault,
|
|
359
|
+
_parseVault,
|
|
360
|
+
config,
|
|
361
|
+
decrypt,
|
|
362
|
+
parse,
|
|
363
|
+
populate
|
|
364
|
+
};
|
|
365
|
+
module2.exports.configDotenv = DotenvModule.configDotenv;
|
|
366
|
+
module2.exports._configVault = DotenvModule._configVault;
|
|
367
|
+
module2.exports._parseVault = DotenvModule._parseVault;
|
|
368
|
+
module2.exports.config = DotenvModule.config;
|
|
369
|
+
module2.exports.decrypt = DotenvModule.decrypt;
|
|
370
|
+
module2.exports.parse = DotenvModule.parse;
|
|
371
|
+
module2.exports.populate = DotenvModule.populate;
|
|
372
|
+
module2.exports = DotenvModule;
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
var import_dotenv = (0, import_chunk_4VNS5WPM.__toESM)(require_main());
|
|
376
|
+
var debug = (0, import_debug.default)("prisma:tryLoadEnv");
|
|
377
|
+
function tryLoadEnvs({
|
|
378
|
+
rootEnvPath,
|
|
379
|
+
schemaEnvPath
|
|
380
|
+
}, opts = {
|
|
381
|
+
conflictCheck: "none"
|
|
382
|
+
}) {
|
|
383
|
+
const rootEnvInfo = loadEnv(rootEnvPath);
|
|
384
|
+
if (opts.conflictCheck !== "none") {
|
|
385
|
+
checkForConflicts(rootEnvInfo, schemaEnvPath, opts.conflictCheck);
|
|
386
|
+
}
|
|
387
|
+
let schemaEnvInfo = null;
|
|
388
|
+
if (!pathsEqual(rootEnvInfo?.path, schemaEnvPath)) {
|
|
389
|
+
schemaEnvInfo = loadEnv(schemaEnvPath);
|
|
390
|
+
}
|
|
391
|
+
if (!rootEnvInfo && !schemaEnvInfo) {
|
|
392
|
+
debug("No Environment variables loaded");
|
|
393
|
+
}
|
|
394
|
+
if (schemaEnvInfo?.dotenvResult.error) {
|
|
395
|
+
return console.error((0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)("Schema Env Error: ")) + schemaEnvInfo.dotenvResult.error);
|
|
396
|
+
}
|
|
397
|
+
const messages = [rootEnvInfo?.message, schemaEnvInfo?.message].filter(Boolean);
|
|
398
|
+
return {
|
|
399
|
+
message: messages.join("\n"),
|
|
400
|
+
parsed: {
|
|
401
|
+
...rootEnvInfo?.dotenvResult?.parsed,
|
|
402
|
+
...schemaEnvInfo?.dotenvResult?.parsed
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
function checkForConflicts(rootEnvInfo, envPath, type) {
|
|
407
|
+
const parsedRootEnv = rootEnvInfo?.dotenvResult.parsed;
|
|
408
|
+
const areNotTheSame = !pathsEqual(rootEnvInfo?.path, envPath);
|
|
409
|
+
if (parsedRootEnv && envPath && areNotTheSame && import_fs.default.existsSync(envPath)) {
|
|
410
|
+
const envConfig = import_dotenv.default.parse(import_fs.default.readFileSync(envPath));
|
|
411
|
+
const conflicts = [];
|
|
412
|
+
for (const k in envConfig) {
|
|
413
|
+
if (parsedRootEnv[k] === envConfig[k]) {
|
|
414
|
+
conflicts.push(k);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
if (conflicts.length > 0) {
|
|
418
|
+
const relativeRootEnvPath = import_path.default.relative(process.cwd(), rootEnvInfo.path);
|
|
419
|
+
const relativeEnvPath = import_path.default.relative(process.cwd(), envPath);
|
|
420
|
+
if (type === "error") {
|
|
421
|
+
const message = `There is a conflict between env var${conflicts.length > 1 ? "s" : ""} in ${(0, import_chunk_PG5FDKSF.underline)(
|
|
422
|
+
relativeRootEnvPath
|
|
423
|
+
)} and ${(0, import_chunk_PG5FDKSF.underline)(relativeEnvPath)}
|
|
424
|
+
Conflicting env vars:
|
|
425
|
+
${conflicts.map((conflict) => ` ${(0, import_chunk_PG5FDKSF.bold)(conflict)}`).join("\n")}
|
|
426
|
+
|
|
427
|
+
We suggest to move the contents of ${(0, import_chunk_PG5FDKSF.underline)(relativeEnvPath)} to ${(0, import_chunk_PG5FDKSF.underline)(
|
|
428
|
+
relativeRootEnvPath
|
|
429
|
+
)} to consolidate your env vars.
|
|
430
|
+
`;
|
|
431
|
+
throw new Error(message);
|
|
432
|
+
} else if (type === "warn") {
|
|
433
|
+
const message = `Conflict for env var${conflicts.length > 1 ? "s" : ""} ${conflicts.map((c) => (0, import_chunk_PG5FDKSF.bold)(c)).join(", ")} in ${(0, import_chunk_PG5FDKSF.underline)(relativeRootEnvPath)} and ${(0, import_chunk_PG5FDKSF.underline)(relativeEnvPath)}
|
|
434
|
+
Env vars from ${(0, import_chunk_PG5FDKSF.underline)(relativeEnvPath)} overwrite the ones from ${(0, import_chunk_PG5FDKSF.underline)(relativeRootEnvPath)}
|
|
435
|
+
`;
|
|
436
|
+
console.warn(`${(0, import_chunk_PG5FDKSF.yellow)("warn(prisma)")} ${message}`);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
function loadEnv(envPath) {
|
|
442
|
+
if (exists(envPath)) {
|
|
443
|
+
debug(`Environment variables loaded from ${envPath}`);
|
|
444
|
+
const dotenvOutput = import_dotenv.default.config({
|
|
445
|
+
path: envPath,
|
|
446
|
+
// Useful to debug dotenv parsing, prints errors & warnings
|
|
447
|
+
// Set to any value to enable
|
|
448
|
+
// Example for empty .env file
|
|
449
|
+
// [dotenv][DEBUG] did not match key and value when parsing line 1:
|
|
450
|
+
//
|
|
451
|
+
// Value needs to be null or undefined, false is truthy
|
|
452
|
+
// https://github.com/motdotla/dotenv/blob/7301ac9be0b2c766f865bbe24280bf82586d25aa/lib/main.js#L89-L91
|
|
453
|
+
debug: process.env.DOTENV_CONFIG_DEBUG ? true : void 0
|
|
454
|
+
});
|
|
455
|
+
const dotenvExpandOutput = (0, import_chunk_T2PM5TKT.dotenvExpand)(dotenvOutput);
|
|
456
|
+
return {
|
|
457
|
+
dotenvResult: dotenvExpandOutput,
|
|
458
|
+
message: (0, import_chunk_PG5FDKSF.dim)(`Environment variables loaded from ${import_path.default.relative(process.cwd(), envPath)}`),
|
|
459
|
+
path: envPath
|
|
460
|
+
};
|
|
461
|
+
} else {
|
|
462
|
+
debug(`Environment variables not found at ${envPath}`);
|
|
463
|
+
}
|
|
464
|
+
return null;
|
|
465
|
+
}
|
|
466
|
+
function pathsEqual(path1, path2) {
|
|
467
|
+
return path1 && path2 && import_path.default.resolve(path1) === import_path.default.resolve(path2);
|
|
468
|
+
}
|
|
469
|
+
function exists(p) {
|
|
470
|
+
return Boolean(p && import_fs.default.existsSync(p));
|
|
471
|
+
}
|
|
@@ -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_3U76J22D_exports = {};
|
|
30
|
+
__export(chunk_3U76J22D_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_3U76J22D_exports);
|
|
35
|
+
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
37
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
+
var import_chunk_2NYEQR5W = require("./chunk-2NYEQR5W.js");
|
|
39
|
+
var import_chunk_KI2DKJN3 = require("./chunk-KI2DKJN3.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,12 +59,12 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_2NYEQR5W.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function mergeSchemas(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
68
68
|
debug(`Using mergeSchemas Wasm`);
|
|
69
69
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
|
|
|
72
72
|
const params = JSON.stringify({
|
|
73
73
|
schema: options.schemas
|
|
74
74
|
});
|
|
75
|
-
return
|
|
75
|
+
return import_chunk_KI2DKJN3.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
|
|
|
104
104
|
return panic;
|
|
105
105
|
}
|
|
106
106
|
const errorOutput = e.error.message;
|
|
107
|
-
return new MergeSchemasError((0,
|
|
107
|
+
return new MergeSchemasError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
108
108
|
}).exhaustive();
|
|
109
109
|
throw error;
|
|
110
110
|
}
|