@prisma/internals 7.6.0-dev.3 → 7.6.0-dev.5
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/built-in-provider.d.ts +5 -0
- package/dist/built-in-provider.js +25 -0
- package/dist/{chunk-TB2GTMOH.js → chunk-3BXWQSWI.js} +5 -5
- package/dist/{chunk-ARC7TW3L.js → chunk-3ZHE2IX4.js} +5 -4
- package/dist/{chunk-PO5EZYGY.js → chunk-5PNGBEL4.js} +5 -5
- package/dist/{chunk-ZKEUDXPQ.js → chunk-B2PXIDH3.js} +8 -8
- package/dist/{chunk-CRVLHWC5.js → chunk-EKGEKB22.js} +5 -4
- package/dist/{chunk-IU33VV7Z.js → chunk-F4GDDYOI.js} +7 -7
- package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
- package/dist/{chunk-NYNXYKR4.js → chunk-GZLJZGHX.js} +5 -5
- package/dist/{chunk-JJD6RJOV.js → chunk-H3XI6LFU.js} +21 -21
- package/dist/chunk-MCS5ZY6Y.js +27 -0
- package/dist/{chunk-GPCXWSNO.js → chunk-NWQ2WTBK.js} +10 -10
- package/dist/{chunk-VIHX6L7P.js → chunk-OW4HI4KF.js} +5 -5
- package/dist/{chunk-GH2WAX5Y.js → chunk-PKOQQT7I.js} +4 -4
- package/dist/{chunk-2WVADZUX.js → chunk-PLQO752N.js} +5 -5
- package/dist/{chunk-HZ7JW3YT.js → chunk-VB43HE5G.js} +4 -4
- package/dist/{chunk-36R6DZZ4.js → chunk-ZQYBIYTQ.js} +8 -8
- package/dist/{chunk-2CJNDY62.js → chunk-ZXJKNOPN.js} +8 -8
- package/dist/cli/checkUnsupportedDataProxy.js +24 -23
- package/dist/cli/getGeneratorSuccessMessage.js +3 -2
- package/dist/cli/schemaContext.js +25 -24
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +23 -22
- package/dist/engine-commands/getConfig.js +8 -8
- package/dist/engine-commands/getDmmf.js +8 -8
- package/dist/engine-commands/index.js +30 -29
- package/dist/engine-commands/lintSchema.js +9 -9
- package/dist/engine-commands/mergeSchemas.js +8 -8
- package/dist/engine-commands/validate.js +8 -8
- package/dist/get-generators/getGenerators.js +26 -25
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -42
- package/dist/utils/canPrompt.js +3 -3
- package/dist/utils/extractPreviewFeatures.js +3 -2
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +5 -5
- package/dist/wasm.js +5 -5
- package/package.json +11 -11
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var built_in_provider_exports = {};
|
|
20
|
+
__export(built_in_provider_exports, {
|
|
21
|
+
BuiltInProvider: () => import_chunk_MCS5ZY6Y.BuiltInProvider
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(built_in_provider_exports);
|
|
24
|
+
var import_chunk_MCS5ZY6Y = require("./chunk-MCS5ZY6Y.js");
|
|
25
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -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_3BXWQSWI_exports = {};
|
|
20
|
+
__export(chunk_3BXWQSWI_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_3BXWQSWI_exports);
|
|
24
|
+
var import_chunk_5PNGBEL4 = require("./chunk-5PNGBEL4.js");
|
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_5PNGBEL4.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -26,14 +26,15 @@ 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_3ZHE2IX4_exports = {};
|
|
30
|
+
__export(chunk_3ZHE2IX4_exports, {
|
|
31
31
|
getGeneratorSuccessMessage: () => getGeneratorSuccessMessage
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_3ZHE2IX4_exports);
|
|
34
34
|
var import_chunk_XYCIH36R = require("./chunk-XYCIH36R.js");
|
|
35
35
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
36
36
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
37
|
+
var import_chunk_MCS5ZY6Y = require("./chunk-MCS5ZY6Y.js");
|
|
37
38
|
var import_path = __toESM(require("path"));
|
|
38
39
|
function getGeneratorSuccessMessage(generator, time) {
|
|
39
40
|
const name = generator.getPrettyName();
|
|
@@ -43,7 +44,7 @@ function getGeneratorSuccessMessage(generator, time) {
|
|
|
43
44
|
}
|
|
44
45
|
function formatVersion(generator) {
|
|
45
46
|
const version = generator.manifest?.version;
|
|
46
|
-
if (generator.getProvider() ===
|
|
47
|
+
if (generator.getProvider() === import_chunk_MCS5ZY6Y.BuiltInProvider.PrismaClientJs) {
|
|
47
48
|
return `v${version ?? "?.?.?"}`;
|
|
48
49
|
}
|
|
49
50
|
return version;
|
|
@@ -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_5PNGBEL4_exports = {};
|
|
20
|
+
__export(chunk_5PNGBEL4_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_5PNGBEL4_exports);
|
|
24
|
+
var import_chunk_VB43HE5G = require("./chunk-VB43HE5G.js");
|
|
25
|
+
var packageJson = (0, import_chunk_VB43HE5G.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_B2PXIDH3_exports = {};
|
|
30
|
+
__export(chunk_B2PXIDH3_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_B2PXIDH3_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_3BXWQSWI = require("./chunk-3BXWQSWI.js");
|
|
39
|
+
var import_chunk_OW4HI4KF = require("./chunk-OW4HI4KF.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,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_3BXWQSWI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -71,13 +71,13 @@ function validate(options) {
|
|
|
71
71
|
() => {
|
|
72
72
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_OW4HI4KF.prismaSchemaWasm.debug_panic();
|
|
75
75
|
}
|
|
76
76
|
const params = JSON.stringify({
|
|
77
77
|
prismaSchema: options.schemas,
|
|
78
78
|
noColor: Boolean(process.env.NO_COLOR)
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
import_chunk_OW4HI4KF.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -16,12 +16,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_EKGEKB22_exports = {};
|
|
20
|
+
__export(chunk_EKGEKB22_exports, {
|
|
21
21
|
extractPreviewFeatures: () => extractPreviewFeatures
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_EKGEKB22_exports);
|
|
24
24
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
25
|
+
var import_chunk_MCS5ZY6Y = require("./chunk-MCS5ZY6Y.js");
|
|
25
26
|
function extractPreviewFeatures(generators) {
|
|
26
|
-
return generators.find((g) => (0, import_chunk_IOIAK7V7.parseEnvValue)(g.provider) ===
|
|
27
|
+
return generators.find((g) => (0, import_chunk_IOIAK7V7.parseEnvValue)(g.provider) === import_chunk_MCS5ZY6Y.BuiltInProvider.PrismaClientJs)?.previewFeatures || [];
|
|
27
28
|
}
|
|
@@ -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_F4GDDYOI_exports = {};
|
|
30
|
+
__export(chunk_F4GDDYOI_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_F4GDDYOI_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_3BXWQSWI = require("./chunk-3BXWQSWI.js");
|
|
39
|
+
var import_chunk_OW4HI4KF = require("./chunk-OW4HI4KF.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,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_3BXWQSWI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -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_OW4HI4KF.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -26,13 +26,13 @@ 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_FCYHZHVW_exports = {};
|
|
30
|
+
__export(chunk_FCYHZHVW_exports, {
|
|
31
31
|
canPrompt: () => canPrompt
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
|
|
33
|
+
module.exports = __toCommonJS(chunk_FCYHZHVW_exports);
|
|
35
34
|
var import_chunk_H4NI2RIK = require("./chunk-H4NI2RIK.js");
|
|
35
|
+
var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
|
|
36
36
|
var import_prompts = __toESM(require("prompts"));
|
|
37
37
|
var canPrompt = () => {
|
|
38
38
|
const injectedCount = import_prompts.default._injected?.length;
|
|
@@ -26,19 +26,19 @@ 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_GZLJZGHX_exports = {};
|
|
30
|
+
__export(chunk_GZLJZGHX_exports, {
|
|
31
31
|
handlePanic: () => handlePanic
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_GZLJZGHX_exports);
|
|
34
34
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
35
35
|
var import_chunk_7IKUTPWQ = require("./chunk-7IKUTPWQ.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_FCYHZHVW = require("./chunk-FCYHZHVW.js");
|
|
37
37
|
var import_chunk_YXCPS3WU = require("./chunk-YXCPS3WU.js");
|
|
38
38
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
39
39
|
var import_prompts = __toESM(require("prompts"));
|
|
40
40
|
async function handlePanic(args) {
|
|
41
|
-
if (!(0,
|
|
41
|
+
if (!(0, import_chunk_FCYHZHVW.canPrompt)()) {
|
|
42
42
|
throw args.error;
|
|
43
43
|
}
|
|
44
44
|
await panicDialog(args);
|
|
@@ -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_H3XI6LFU_exports = {};
|
|
30
|
+
__export(chunk_H3XI6LFU_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,9 +40,9 @@ __export(chunk_JJD6RJOV_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_H3XI6LFU_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
|
-
var
|
|
45
|
+
var import_chunk_PKOQQT7I = require("./chunk-PKOQQT7I.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
48
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
@@ -50,21 +50,21 @@ var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
|
50
50
|
var import_chunk_DXWYZA7B = require("./chunk-DXWYZA7B.js");
|
|
51
51
|
var import_chunk_DRWHCM7T = require("./chunk-DRWHCM7T.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
53
|
+
var import_chunk_EKGEKB22 = require("./chunk-EKGEKB22.js");
|
|
54
|
+
var import_chunk_ZXJKNOPN = require("./chunk-ZXJKNOPN.js");
|
|
55
|
+
var import_chunk_PLQO752N = require("./chunk-PLQO752N.js");
|
|
56
|
+
var import_chunk_F4GDDYOI = require("./chunk-F4GDDYOI.js");
|
|
57
|
+
var import_chunk_ZQYBIYTQ = require("./chunk-ZQYBIYTQ.js");
|
|
58
|
+
var import_chunk_OW4HI4KF = require("./chunk-OW4HI4KF.js");
|
|
59
59
|
var import_chunk_2BXDHSSY = require("./chunk-2BXDHSSY.js");
|
|
60
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
60
61
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
61
62
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
62
63
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
63
64
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
64
65
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
65
|
-
var import_chunk_BXIKQUP5 = require("./chunk-BXIKQUP5.js");
|
|
66
|
-
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
67
66
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
67
|
+
var import_chunk_BXIKQUP5 = require("./chunk-BXIKQUP5.js");
|
|
68
68
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
69
69
|
var import_node_path = __toESM(require("node:path"));
|
|
70
70
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -77,7 +77,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
77
77
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
78
78
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
79
79
|
handleFormatPanic(() => {
|
|
80
|
-
|
|
80
|
+
import_chunk_OW4HI4KF.prismaSchemaWasm.debug_panic();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
const defaultFormattingOptions = {
|
|
@@ -94,10 +94,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
94
94
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
95
95
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
96
96
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
97
|
-
const lintDiagnostics2 = (0,
|
|
97
|
+
const lintDiagnostics2 = (0, import_chunk_PLQO752N.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
98
98
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
99
99
|
});
|
|
100
|
-
const lintWarnings = (0,
|
|
100
|
+
const lintWarnings = (0, import_chunk_PLQO752N.getLintWarningsAsText)(lintDiagnostics);
|
|
101
101
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
102
102
|
console.warn(lintWarnings);
|
|
103
103
|
}
|
|
@@ -124,7 +124,7 @@ function handleFormatPanic(tryCb) {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function formatWasm(schema, documentFormattingParams) {
|
|
127
|
-
const formattedSchema =
|
|
127
|
+
const formattedSchema = import_chunk_OW4HI4KF.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
128
128
|
return formattedSchema;
|
|
129
129
|
}
|
|
130
130
|
async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, schemaPathArgumentName, cwd } = {
|
|
@@ -153,7 +153,7 @@ async function processSchemaResult({
|
|
|
153
153
|
if (printLoadMessage) {
|
|
154
154
|
(0, import_chunk_2BXDHSSY.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
155
155
|
}
|
|
156
|
-
const configFromPsl = await (0,
|
|
156
|
+
const configFromPsl = await (0, import_chunk_ZQYBIYTQ.getConfig)({ datamodel: schemaResult.schemas });
|
|
157
157
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
158
158
|
return {
|
|
159
159
|
schemaFiles: schemaResult.schemas,
|
|
@@ -207,8 +207,8 @@ async function getGenerators(options) {
|
|
|
207
207
|
throw new Error(import_chunk_DXWYZA7B.missingDatasource);
|
|
208
208
|
}
|
|
209
209
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
210
|
-
const previewFeatures = (0,
|
|
211
|
-
const dmmf = await (0,
|
|
210
|
+
const previewFeatures = (0, import_chunk_EKGEKB22.extractPreviewFeatures)(schemaContext.generators);
|
|
211
|
+
const dmmf = await (0, import_chunk_ZXJKNOPN.getDMMF)({
|
|
212
212
|
datamodel: schemaContext.schemaFiles,
|
|
213
213
|
previewFeatures
|
|
214
214
|
});
|
|
@@ -259,7 +259,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
259
259
|
fromEnvVar: null
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
const datamodel = (0,
|
|
262
|
+
const datamodel = (0, import_chunk_F4GDDYOI.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
263
263
|
const options2 = {
|
|
264
264
|
datamodel,
|
|
265
265
|
datasources: schemaContext.datasources,
|
|
@@ -323,7 +323,7 @@ generator gen {
|
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
326
|
-
const { binaryPathsByVersion } = await (0,
|
|
326
|
+
const { binaryPathsByVersion } = await (0, import_chunk_PKOQQT7I.getBinaryPathsByVersion)({
|
|
327
327
|
neededVersions,
|
|
328
328
|
// We're lazily computing the binary target here, to avoid printing the
|
|
329
329
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_MCS5ZY6Y_exports = {};
|
|
20
|
+
__export(chunk_MCS5ZY6Y_exports, {
|
|
21
|
+
BuiltInProvider: () => BuiltInProvider
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(chunk_MCS5ZY6Y_exports);
|
|
24
|
+
var BuiltInProvider = {
|
|
25
|
+
PrismaClientJs: "prisma-client-js",
|
|
26
|
+
PrismaClientTs: "prisma-client"
|
|
27
|
+
};
|
|
@@ -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_NWQ2WTBK_exports = {};
|
|
30
|
+
__export(chunk_NWQ2WTBK_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,9 +40,9 @@ __export(chunk_GPCXWSNO_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_NWQ2WTBK_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
|
-
var
|
|
45
|
+
var import_chunk_PKOQQT7I = require("./chunk-PKOQQT7I.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
48
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
@@ -50,21 +50,21 @@ var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
|
50
50
|
var import_chunk_DXWYZA7B = require("./chunk-DXWYZA7B.js");
|
|
51
51
|
var import_chunk_DRWHCM7T = require("./chunk-DRWHCM7T.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
53
|
-
var
|
|
53
|
+
var import_chunk_EKGEKB22 = require("./chunk-EKGEKB22.js");
|
|
54
|
+
var import_chunk_WS75TKHZ = require("./chunk-WS75TKHZ.js");
|
|
54
55
|
var import_chunk_WQZ5YH6L = require("./chunk-WQZ5YH6L.js");
|
|
55
56
|
var import_chunk_YOT64SO3 = require("./chunk-YOT64SO3.js");
|
|
56
57
|
var import_chunk_6YLZXNMI = require("./chunk-6YLZXNMI.js");
|
|
57
|
-
var import_chunk_WS75TKHZ = require("./chunk-WS75TKHZ.js");
|
|
58
58
|
var import_chunk_HXMDA5QL = require("./chunk-HXMDA5QL.js");
|
|
59
59
|
var import_chunk_2BXDHSSY = require("./chunk-2BXDHSSY.js");
|
|
60
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
60
61
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
61
62
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
62
63
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
63
64
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
64
65
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
65
|
-
var import_chunk_BXIKQUP5 = require("./chunk-BXIKQUP5.js");
|
|
66
|
-
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
67
66
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
67
|
+
var import_chunk_BXIKQUP5 = require("./chunk-BXIKQUP5.js");
|
|
68
68
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
69
69
|
var import_node_path = __toESM(require("node:path"));
|
|
70
70
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -207,7 +207,7 @@ async function getGenerators(options) {
|
|
|
207
207
|
throw new Error(import_chunk_DXWYZA7B.missingDatasource);
|
|
208
208
|
}
|
|
209
209
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
210
|
-
const previewFeatures = (0,
|
|
210
|
+
const previewFeatures = (0, import_chunk_EKGEKB22.extractPreviewFeatures)(schemaContext.generators);
|
|
211
211
|
const dmmf = await (0, import_chunk_WS75TKHZ.getDMMF)({
|
|
212
212
|
datamodel: schemaContext.schemaFiles,
|
|
213
213
|
previewFeatures
|
|
@@ -323,7 +323,7 @@ generator gen {
|
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
326
|
-
const { binaryPathsByVersion } = await (0,
|
|
326
|
+
const { binaryPathsByVersion } = await (0, import_chunk_PKOQQT7I.getBinaryPathsByVersion)({
|
|
327
327
|
neededVersions,
|
|
328
328
|
// We're lazily computing the binary target here, to avoid printing the
|
|
329
329
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -26,15 +26,15 @@ 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_OW4HI4KF_exports = {};
|
|
30
|
+
__export(chunk_OW4HI4KF_exports, {
|
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
|
33
33
|
schemaEngineWasmVersion: () => schemaEngineWasmVersion,
|
|
34
34
|
wasm_exports: () => wasm_exports
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_OW4HI4KF_exports);
|
|
37
|
+
var import_chunk_VB43HE5G = require("./chunk-VB43HE5G.js");
|
|
38
38
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
|
39
39
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
40
40
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
|
@@ -46,6 +46,6 @@ var wasm_exports = {};
|
|
|
46
46
|
});
|
|
47
47
|
var globalWithPanicRegistry = globalThis;
|
|
48
48
|
globalWithPanicRegistry.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
|
49
|
-
var { dependencies } = (0,
|
|
49
|
+
var { dependencies } = (0, import_chunk_VB43HE5G.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -26,13 +26,13 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_PKOQQT7I_exports = {};
|
|
30
|
+
__export(chunk_PKOQQT7I_exports, {
|
|
31
31
|
getBinaryPathsByVersion: () => getBinaryPathsByVersion
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var import_chunk_GJSFP4V4 = require("./chunk-GJSFP4V4.js");
|
|
33
|
+
module.exports = __toCommonJS(chunk_PKOQQT7I_exports);
|
|
35
34
|
var import_chunk_5I4ERIIY = require("./chunk-5I4ERIIY.js");
|
|
35
|
+
var import_chunk_GJSFP4V4 = require("./chunk-GJSFP4V4.js");
|
|
36
36
|
var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
|
|
37
37
|
var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
|
|
38
38
|
var import_chunk_IDINCQMN = require("./chunk-IDINCQMN.js");
|
|
@@ -16,20 +16,20 @@ 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_PLQO752N_exports = {};
|
|
20
|
+
__export(chunk_PLQO752N_exports, {
|
|
21
21
|
getLintWarnings: () => getLintWarnings,
|
|
22
22
|
getLintWarningsAsText: () => getLintWarningsAsText,
|
|
23
23
|
handleLintPanic: () => handleLintPanic,
|
|
24
24
|
lintSchema: () => lintSchema,
|
|
25
25
|
warningToString: () => warningToString
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
28
|
-
var
|
|
27
|
+
module.exports = __toCommonJS(chunk_PLQO752N_exports);
|
|
28
|
+
var import_chunk_OW4HI4KF = require("./chunk-OW4HI4KF.js");
|
|
29
29
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
30
30
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
31
31
|
function lintSchema({ schemas }) {
|
|
32
|
-
const lintResult =
|
|
32
|
+
const lintResult = import_chunk_OW4HI4KF.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -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_VB43HE5G_exports = {};
|
|
20
|
+
__export(chunk_VB43HE5G_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_VB43HE5G_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) {
|
|
27
27
|
module2.exports = {
|
|
28
28
|
name: "@prisma/internals",
|
|
29
|
-
version: "7.6.0-dev.
|
|
29
|
+
version: "7.6.0-dev.5",
|
|
30
30
|
description: "This package is intended for Prisma's internal use",
|
|
31
31
|
main: "dist/index.js",
|
|
32
32
|
types: "dist/index.d.ts",
|
|
@@ -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_ZQYBIYTQ_exports = {};
|
|
30
|
+
__export(chunk_ZQYBIYTQ_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_ZQYBIYTQ_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_3BXWQSWI = require("./chunk-3BXWQSWI.js");
|
|
39
|
+
var import_chunk_OW4HI4KF = require("./chunk-OW4HI4KF.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");
|
|
@@ -61,7 +61,7 @@ ${detailsHeader} ${message}`;
|
|
|
61
61
|
}).exhaustive();
|
|
62
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
63
63
|
[Context: getConfig]`;
|
|
64
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_3BXWQSWI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
65
65
|
this.name = "GetConfigError";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -73,10 +73,10 @@ async function getConfig(options) {
|
|
|
73
73
|
() => {
|
|
74
74
|
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
75
75
|
debug("Triggering a Rust panic...");
|
|
76
|
-
|
|
76
|
+
import_chunk_OW4HI4KF.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_OW4HI4KF.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|