@prisma/internals 6.20.0-integration-merge-release-workflows2.1 → 6.20.0-integration-next.4
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-GMW36QQF.js → chunk-22HIO2UL.js} +7 -7
- package/dist/{chunk-TBR6SNKL.js → chunk-2Z7PH5WX.js} +5 -5
- package/dist/{chunk-2GUGGLPK.js → chunk-3D4RRUYX.js} +56 -129
- package/dist/{chunk-I6WLABB2.js → chunk-3WXUQZS7.js} +14 -5
- package/dist/{chunk-HFFWZTVM.js → chunk-4B7YT7EE.js} +8 -18
- package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
- package/dist/{chunk-F2OZV76L.js → chunk-5MHUYAV3.js} +9 -9
- package/dist/{chunk-FRE4ZWRR.js → chunk-65KNJHQS.js} +13 -13
- package/dist/{chunk-WYQJ4JWO.js → chunk-6WBK35XU.js} +13 -13
- package/dist/{chunk-7QC5VORA.js → chunk-7SF6QSKE.js} +7 -8
- package/dist/{chunk-TH33KD3E.js → chunk-7VXI23OO.js} +5 -5
- package/dist/{chunk-E7DQNMQJ.js → chunk-7X4RB4O5.js} +5 -5
- package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
- package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
- package/dist/{chunk-AX5N26KG.js → chunk-CIGXHXCG.js} +18 -13
- package/dist/{chunk-FHZ5QJLR.js → chunk-D4EKBLXK.js} +5 -5
- package/dist/chunk-DYV47NUW.js +796 -0
- package/dist/{chunk-DVRZSMZ2.js → chunk-E4PYP2ZV.js} +5 -5
- package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
- package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
- package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
- package/dist/{chunk-LV27YCGC.js → chunk-H4QG5ONG.js} +12 -12
- package/dist/{chunk-OAT7ZJED.js → chunk-H5STSTVK.js} +7 -20
- package/dist/{chunk-FYZCPL2Z.js → chunk-HNRMSI3R.js} +5 -8
- package/dist/{chunk-CCLAMTCA.js → chunk-HQDG2BBX.js} +7 -9
- package/dist/{chunk-W26QS5OG.js → chunk-J757IEPK.js} +56 -129
- package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
- package/dist/{chunk-UQUWZJVN.js → chunk-LHTJCI5U.js} +7 -7
- package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
- package/dist/{chunk-TQFONRJP.js → chunk-MLFKBBDL.js} +5 -5
- package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
- package/dist/{chunk-T4UGPDF4.js → chunk-OSMLJTQN.js} +8 -10
- package/dist/{chunk-E4H6V3Z4.js → chunk-OV3PWX3C.js} +11 -11
- package/dist/{chunk-DYM2NTAG.js → chunk-Q5EKGHVB.js} +5 -5
- package/dist/{chunk-JOIIWB3U.js → chunk-QOZ7USPD.js} +193 -159
- package/dist/{chunk-BVJP43JS.js → chunk-QSVWJ2S2.js} +13 -784
- package/dist/{chunk-QJ3QPUM5.js → chunk-QWXKO4HW.js} +5 -5
- package/dist/{chunk-J32M37NY.js → chunk-R7L5ID34.js} +12 -12
- package/dist/{chunk-75BIJ5PX.js → chunk-SMJRM3EM.js} +9 -9
- package/dist/{chunk-JTS4UPHJ.js → chunk-TQZ7VRPF.js} +5 -5
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
- package/dist/{chunk-UQK76B5E.js → chunk-X6TWTGK6.js} +11 -11
- package/dist/{chunk-JYBUBKFO.js → chunk-XHZ4TZUD.js} +16 -38
- package/dist/{chunk-UHI6VYFX.js → chunk-XIYRAW5R.js} +15 -11
- package/dist/{chunk-SOKSKSEX.js → chunk-YJSJK7EC.js} +16 -38
- package/dist/cli/checkUnsupportedDataProxy.d.ts +3 -4
- package/dist/cli/checkUnsupportedDataProxy.js +56 -65
- package/dist/cli/getGeneratorSuccessMessage.js +2 -3
- package/dist/cli/getSchema.d.ts +1 -15
- package/dist/cli/getSchema.js +4 -5
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +3 -12
- package/dist/cli/schemaContext.js +57 -65
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +55 -64
- package/dist/engine-commands/getConfig.d.ts +1 -5
- package/dist/engine-commands/getConfig.js +10 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +6 -9
- package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
- package/dist/engine-commands/getEnginesInfo.js +7 -9
- package/dist/engine-commands/index.d.ts +1 -1
- package/dist/engine-commands/index.js +65 -76
- 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 +0 -2
- package/dist/get-generators/getGenerators.js +58 -67
- 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 +6 -5
- package/dist/getPackedPackage.js +4 -3
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +2 -14
- package/dist/index.js +98 -121
- package/dist/{multipart-parser-3AFJFP6K.js → multipart-parser-UV3WZSWW.js} +6 -6
- package/dist/resolveBinary.js +8 -7
- package/dist/schemaEngineCommands.js +9 -8
- package/dist/sendPanic.js +4 -5
- 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/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +6 -7
- package/dist/utils/link.js +2 -2
- package/dist/utils/missingDatasource.js +5 -5
- package/dist/utils/missingGeneratorMessage.js +7 -7
- package/dist/wasm.js +5 -5
- package/package.json +15 -17
- package/dist/chunk-3FP46GUV.js +0 -471
- package/dist/chunk-46ABODUM.js +0 -186
- package/dist/chunk-6TTRTZXU.js +0 -37
- package/dist/chunk-D4VDA2TZ.js +0 -66
- package/dist/chunk-DZYINYAA.js +0 -68
- package/dist/chunk-ERSH2BQA.js +0 -58
- package/dist/chunk-HO5HRHFZ.js +0 -30
- package/dist/chunk-KDHESRKE.js +0 -49
- package/dist/chunk-PZMRR772.js +0 -41
- package/dist/chunk-T2PM5TKT.js +0 -55
- package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +0 -22
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +0 -135
- package/dist/client/getClientEngineType.d.ts +0 -7
- package/dist/client/getClientEngineType.js +0 -26
- package/dist/dotenvExpand.d.ts +0 -35
- package/dist/dotenvExpand.js +0 -25
- package/dist/utils/__tests__/maskSchema.test.js +0 -23
- package/dist/utils/cloudflareD1.d.ts +0 -5
- package/dist/utils/cloudflareD1.js +0 -27
- package/dist/utils/getEnvPaths.d.ts +0 -14
- package/dist/utils/getEnvPaths.js +0 -29
- package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
- package/dist/utils/handleEngineLoadingErrors.js +0 -27
- package/dist/utils/load.d.ts +0 -6
- package/dist/utils/load.js +0 -28
- package/dist/utils/loadEnvFile.d.ts +0 -10
- package/dist/utils/loadEnvFile.js +0 -30
- package/dist/utils/maskSchema.d.ts +0 -4
- package/dist/utils/maskSchema.js +0 -27
- package/dist/utils/serializeQueryEngineName.d.ts +0 -4
- package/dist/utils/serializeQueryEngineName.js +0 -25
- package/dist/utils/tryLoadEnvs.d.ts +0 -25
- package/dist/utils/tryLoadEnvs.js +0 -30
|
@@ -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_QWXKO4HW_exports = {};
|
|
20
|
+
__export(chunk_QWXKO4HW_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_QWXKO4HW_exports);
|
|
24
|
+
var import_chunk_HQDG2BBX = require("./chunk-HQDG2BBX.js");
|
|
25
|
+
var packageJson = (0, import_chunk_HQDG2BBX.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_R7L5ID34_exports = {};
|
|
30
|
+
__export(chunk_R7L5ID34_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_R7L5ID34_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_7VXI23OO = require("./chunk-7VXI23OO.js");
|
|
38
|
+
var import_chunk_D4EKBLXK = require("./chunk-D4EKBLXK.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_7VXI23OO.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_WSZXPLJQ.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
|
-
if (process.env.
|
|
71
|
+
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_D4EKBLXK.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_D4EKBLXK.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_WSZXPLJQ.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 });
|
|
@@ -26,8 +26,8 @@ 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_SMJRM3EM_exports = {};
|
|
30
|
+
__export(chunk_SMJRM3EM_exports, {
|
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists2,
|
|
32
32
|
fs_functional_exports: () => fs_functional_exports,
|
|
33
33
|
getFilesInDir: () => getFilesInDir2,
|
|
@@ -37,8 +37,8 @@ __export(chunk_75BIJ5PX_exports, {
|
|
|
37
37
|
removeFile: () => removeFile,
|
|
38
38
|
writeFile: () => writeFile2
|
|
39
39
|
});
|
|
40
|
-
module.exports = __toCommonJS(
|
|
41
|
-
var
|
|
40
|
+
module.exports = __toCommonJS(chunk_SMJRM3EM_exports);
|
|
41
|
+
var import_chunk_MLFKBBDL = require("./chunk-MLFKBBDL.js");
|
|
42
42
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
43
43
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
44
44
|
var import_promises = __toESM(require("fs/promises"));
|
|
@@ -3981,13 +3981,13 @@ var fs_functional_exports = {};
|
|
|
3981
3981
|
});
|
|
3982
3982
|
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
|
3983
3983
|
var TE = (0, import_chunk_4VNS5WPM.__toESM)(require_TaskEither());
|
|
3984
|
-
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0,
|
|
3985
|
-
var writeFile2 = (params) => TE.tryCatch(() => (0,
|
|
3986
|
-
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0,
|
|
3984
|
+
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_MLFKBBDL.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
|
|
3985
|
+
var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_MLFKBBDL.writeFile)(params), createTaggedSystemError("fs-write-file", params));
|
|
3986
|
+
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_MLFKBBDL.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
|
|
3987
3987
|
var removeDir = (dir) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.rm(dir, { recursive: true }), createTaggedSystemError("fs-remove-dir", { dir })));
|
|
3988
3988
|
var removeFile = (filePath) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.unlink(filePath), createTaggedSystemError("fs-remove-file", { filePath })));
|
|
3989
|
-
var getNestedFoldersInDir2 = (dir) => () => (0,
|
|
3990
|
-
var getFilesInDir2 = (dir, pattern = "**") => () => (0,
|
|
3989
|
+
var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_MLFKBBDL.getNestedFoldersInDir)(dir);
|
|
3990
|
+
var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_MLFKBBDL.getFilesInDir)(dir, pattern);
|
|
3991
3991
|
function createTaggedSystemError(type, meta) {
|
|
3992
3992
|
return (e) => ({
|
|
3993
3993
|
type,
|
|
@@ -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_TQZ7VRPF_exports = {};
|
|
20
|
+
__export(chunk_TQZ7VRPF_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var import_chunk_QJ3QPUM5 = require("./chunk-QJ3QPUM5.js");
|
|
23
|
+
module.exports = __toCommonJS(chunk_TQZ7VRPF_exports);
|
|
25
24
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
+
var import_chunk_7X4RB4O5 = require("./chunk-7X4RB4O5.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_7X4RB4O5.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -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_VNIE2AZB_exports = {};
|
|
20
|
+
__export(chunk_VNIE2AZB_exports, {
|
|
21
21
|
highlightDatamodel: () => highlightDatamodel,
|
|
22
22
|
highlightSql: () => highlightSql,
|
|
23
23
|
highlightTS: () => highlightTS
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
-
var import_chunk_OIVPX3BR = require("./chunk-OIVPX3BR.js");
|
|
25
|
+
module.exports = __toCommonJS(chunk_VNIE2AZB_exports);
|
|
27
26
|
var import_chunk_CYAS6B5N = require("./chunk-CYAS6B5N.js");
|
|
27
|
+
var import_chunk_OIVPX3BR = require("./chunk-OIVPX3BR.js");
|
|
28
28
|
var import_chunk_HPVMQFIY = require("./chunk-HPVMQFIY.js");
|
|
29
29
|
function highlightDatamodel(str) {
|
|
30
30
|
return highlight(str, import_chunk_OIVPX3BR.dml);
|
|
@@ -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_WSZXPLJQ_exports = {};
|
|
30
|
+
__export(chunk_WSZXPLJQ_exports, {
|
|
31
31
|
createDebugErrorType: () => createDebugErrorType,
|
|
32
32
|
createSchemaValidationError: () => createSchemaValidationError,
|
|
33
33
|
parseQueryEngineError: () => parseQueryEngineError,
|
|
34
34
|
unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
36
|
+
module.exports = __toCommonJS(chunk_WSZXPLJQ_exports);
|
|
38
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.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_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
@@ -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_X6TWTGK6_exports = {};
|
|
30
|
+
__export(chunk_X6TWTGK6_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_X6TWTGK6_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_TQZ7VRPF = require("./chunk-TQZ7VRPF.js");
|
|
39
|
+
var import_chunk_Q5EKGHVB = require("./chunk-Q5EKGHVB.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_TQZ7VRPF.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_WSZXPLJQ.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_Q5EKGHVB.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_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
108
108
|
}).exhaustive();
|
|
109
109
|
throw error;
|
|
110
110
|
}
|
|
@@ -26,20 +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_XHZ4TZUD_exports = {};
|
|
30
|
+
__export(chunk_XHZ4TZUD_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
|
-
getConfig: () => getConfig
|
|
33
|
-
getDirectUrl: () => getDirectUrl,
|
|
34
|
-
getEffectiveUrl: () => getEffectiveUrl,
|
|
35
|
-
resolveUrl: () => resolveUrl
|
|
32
|
+
getConfig: () => getConfig
|
|
36
33
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
38
|
-
var
|
|
39
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_XHZ4TZUD_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
40
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_7VXI23OO = require("./chunk-7VXI23OO.js");
|
|
39
|
+
var import_chunk_D4EKBLXK = require("./chunk-D4EKBLXK.js");
|
|
43
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
44
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
45
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -64,41 +61,22 @@ ${detailsHeader} ${message}`;
|
|
|
64
61
|
}).exhaustive();
|
|
65
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
66
63
|
[Context: getConfig]`;
|
|
67
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_7VXI23OO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
68
65
|
this.name = "GetConfigError";
|
|
69
66
|
}
|
|
70
67
|
};
|
|
71
|
-
function getEffectiveUrl(ds) {
|
|
72
|
-
if (ds.directUrl !== void 0) return ds.directUrl;
|
|
73
|
-
return ds.url;
|
|
74
|
-
}
|
|
75
|
-
function getDirectUrl(ds) {
|
|
76
|
-
return ds.directUrl;
|
|
77
|
-
}
|
|
78
|
-
function resolveUrl(envValue) {
|
|
79
|
-
const urlFromValue = envValue?.value;
|
|
80
|
-
const urlEnvVarName = envValue?.fromEnvVar;
|
|
81
|
-
const urlEnvVarValue = urlEnvVarName ? process.env[urlEnvVarName] : void 0;
|
|
82
|
-
return urlFromValue ?? urlEnvVarValue;
|
|
83
|
-
}
|
|
84
68
|
async function getConfig(options) {
|
|
85
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
|
|
86
70
|
debug(`Using getConfig Wasm`);
|
|
87
71
|
const configEither = (0, import_function.pipe)(
|
|
88
72
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
89
73
|
() => {
|
|
90
|
-
if (process.env.
|
|
74
|
+
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
91
75
|
debug("Triggering a Rust panic...");
|
|
92
|
-
|
|
76
|
+
import_chunk_D4EKBLXK.prismaSchemaWasm.debug_panic();
|
|
93
77
|
}
|
|
94
|
-
const params = JSON.stringify({
|
|
95
|
-
|
|
96
|
-
datasourceOverrides: {},
|
|
97
|
-
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
|
98
|
-
env: process.env
|
|
99
|
-
});
|
|
100
|
-
const data = import_chunk_DYM2NTAG.prismaSchemaWasm.get_config(params);
|
|
101
|
-
return data;
|
|
78
|
+
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
+
return import_chunk_D4EKBLXK.prismaSchemaWasm.get_config(params);
|
|
102
80
|
},
|
|
103
81
|
(e) => ({
|
|
104
82
|
type: "wasm-error",
|
|
@@ -156,12 +134,12 @@ async function getConfig(options) {
|
|
|
156
134
|
return panic;
|
|
157
135
|
}
|
|
158
136
|
const errorOutput = e.error.message;
|
|
159
|
-
return new GetConfigError((0,
|
|
137
|
+
return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
160
138
|
}).with({ type: "validation-error" }, (e) => {
|
|
161
139
|
return new GetConfigError({
|
|
162
140
|
_tag: "parsed",
|
|
163
141
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
164
|
-
reason: (0,
|
|
142
|
+
reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
|
|
165
143
|
message: formatErrors(e.error)
|
|
166
144
|
});
|
|
167
145
|
}).otherwise((e) => {
|
|
@@ -16,17 +16,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_XIYRAW5R_exports = {};
|
|
20
|
+
__export(chunk_XIYRAW5R_exports, {
|
|
21
21
|
SchemaEngineExitCode: () => SchemaEngineExitCode,
|
|
22
22
|
canConnectToDatabase: () => canConnectToDatabase,
|
|
23
23
|
createDatabase: () => createDatabase,
|
|
24
24
|
dropDatabase: () => dropDatabase,
|
|
25
25
|
execaCommand: () => execaCommand
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(chunk_XIYRAW5R_exports);
|
|
28
28
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_HNRMSI3R = require("./chunk-HNRMSI3R.js");
|
|
30
30
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
31
31
|
var SchemaEngineExitCode = /* @__PURE__ */ ((SchemaEngineExitCode2) => {
|
|
32
32
|
SchemaEngineExitCode2[SchemaEngineExitCode2["Success"] = 0] = "Success";
|
|
@@ -139,15 +139,19 @@ async function execaCommand({
|
|
|
139
139
|
schemaEnginePath,
|
|
140
140
|
engineCommandName
|
|
141
141
|
}) {
|
|
142
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
|
142
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_HNRMSI3R.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
|
143
143
|
try {
|
|
144
|
-
return await (0, import_chunk_JOIHHXR6.execa)(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
return await (0, import_chunk_JOIHHXR6.execa)(
|
|
145
|
+
schemaEnginePath,
|
|
146
|
+
["--datasource", JSON.stringify({ url: connectionString }), "cli", engineCommandName],
|
|
147
|
+
{
|
|
148
|
+
cwd,
|
|
149
|
+
env: {
|
|
150
|
+
RUST_BACKTRACE: process.env.RUST_BACKTRACE ?? "1",
|
|
151
|
+
RUST_LOG: process.env.RUST_LOG ?? "info"
|
|
152
|
+
}
|
|
149
153
|
}
|
|
150
|
-
|
|
154
|
+
);
|
|
151
155
|
} catch (_e) {
|
|
152
156
|
const e = _e;
|
|
153
157
|
if (e.message) {
|
|
@@ -26,20 +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_YJSJK7EC_exports = {};
|
|
30
|
+
__export(chunk_YJSJK7EC_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
|
-
getConfig: () => getConfig
|
|
33
|
-
getDirectUrl: () => getDirectUrl,
|
|
34
|
-
getEffectiveUrl: () => getEffectiveUrl,
|
|
35
|
-
resolveUrl: () => resolveUrl
|
|
32
|
+
getConfig: () => getConfig
|
|
36
33
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
38
|
-
var
|
|
39
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_YJSJK7EC_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
40
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_TQZ7VRPF = require("./chunk-TQZ7VRPF.js");
|
|
39
|
+
var import_chunk_Q5EKGHVB = require("./chunk-Q5EKGHVB.js");
|
|
43
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
44
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
45
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -64,41 +61,22 @@ ${detailsHeader} ${message}`;
|
|
|
64
61
|
}).exhaustive();
|
|
65
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
66
63
|
[Context: getConfig]`;
|
|
67
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_TQZ7VRPF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
68
65
|
this.name = "GetConfigError";
|
|
69
66
|
}
|
|
70
67
|
};
|
|
71
|
-
function getEffectiveUrl(ds) {
|
|
72
|
-
if (ds.directUrl !== void 0) return ds.directUrl;
|
|
73
|
-
return ds.url;
|
|
74
|
-
}
|
|
75
|
-
function getDirectUrl(ds) {
|
|
76
|
-
return ds.directUrl;
|
|
77
|
-
}
|
|
78
|
-
function resolveUrl(envValue) {
|
|
79
|
-
const urlFromValue = envValue?.value;
|
|
80
|
-
const urlEnvVarName = envValue?.fromEnvVar;
|
|
81
|
-
const urlEnvVarValue = urlEnvVarName ? process.env[urlEnvVarName] : void 0;
|
|
82
|
-
return urlFromValue ?? urlEnvVarValue;
|
|
83
|
-
}
|
|
84
68
|
async function getConfig(options) {
|
|
85
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
|
|
86
70
|
debug(`Using getConfig Wasm`);
|
|
87
71
|
const configEither = (0, import_function.pipe)(
|
|
88
72
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
89
73
|
() => {
|
|
90
|
-
if (process.env.
|
|
74
|
+
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
91
75
|
debug("Triggering a Rust panic...");
|
|
92
|
-
|
|
76
|
+
import_chunk_Q5EKGHVB.prismaSchemaWasm.debug_panic();
|
|
93
77
|
}
|
|
94
|
-
const params = JSON.stringify({
|
|
95
|
-
|
|
96
|
-
datasourceOverrides: {},
|
|
97
|
-
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
|
98
|
-
env: process.env
|
|
99
|
-
});
|
|
100
|
-
const data = import_chunk_FHZ5QJLR.prismaSchemaWasm.get_config(params);
|
|
101
|
-
return data;
|
|
78
|
+
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
+
return import_chunk_Q5EKGHVB.prismaSchemaWasm.get_config(params);
|
|
102
80
|
},
|
|
103
81
|
(e) => ({
|
|
104
82
|
type: "wasm-error",
|
|
@@ -156,12 +134,12 @@ async function getConfig(options) {
|
|
|
156
134
|
return panic;
|
|
157
135
|
}
|
|
158
136
|
const errorOutput = e.error.message;
|
|
159
|
-
return new GetConfigError((0,
|
|
137
|
+
return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
160
138
|
}).with({ type: "validation-error" }, (e) => {
|
|
161
139
|
return new GetConfigError({
|
|
162
140
|
_tag: "parsed",
|
|
163
141
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
164
|
-
reason: (0,
|
|
142
|
+
reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
|
|
165
143
|
message: formatErrors(e.error)
|
|
166
144
|
});
|
|
167
145
|
}).otherwise((e) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PrismaConfigInternal } from '@prisma/config';
|
|
2
2
|
/**
|
|
3
3
|
* Get the message to display when a command is forbidden with a data proxy flag
|
|
4
4
|
* @param command the cli command (eg. db push)
|
|
@@ -11,8 +11,7 @@ export declare const forbiddenCmdWithDataProxyFlagMessage: (command: string) =>
|
|
|
11
11
|
* @param urls list of urls to check
|
|
12
12
|
* @param schemaContexts list of schema contexts to check
|
|
13
13
|
*/
|
|
14
|
-
export declare function checkUnsupportedDataProxy({ cmd,
|
|
14
|
+
export declare function checkUnsupportedDataProxy({ cmd, config }: {
|
|
15
15
|
cmd: string;
|
|
16
|
-
|
|
17
|
-
urls?: (string | undefined)[];
|
|
16
|
+
config?: PrismaConfigInternal;
|
|
18
17
|
}): void;
|