@prisma/internals 6.6.0 → 6.7.0-dev.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-S7FWTZ4D.js → chunk-4PHQ7HQG.js} +8 -8
- package/dist/{chunk-HG3YOAAE.js → chunk-FYZCPL2Z.js} +7 -8
- package/dist/{chunk-B4AYGGZW.js → chunk-GVN3PSGS.js} +8 -8
- package/dist/{chunk-CFIXRANP.js → chunk-KGXZALRV.js} +4 -4
- package/dist/{chunk-RKUASVCY.js → chunk-KLIYXRK4.js} +7 -7
- package/dist/{chunk-DKSUHQGA.js → chunk-ONPT5QRX.js} +5 -5
- package/dist/{chunk-EVK7A7GF.js → chunk-P2P2TQOV.js} +5 -5
- package/dist/{chunk-R2TLNOWM.js → chunk-PCL2SAJW.js} +5 -5
- package/dist/{chunk-3DQANJMY.js → chunk-PRGTOMXU.js} +5 -5
- package/dist/{chunk-37SOLWL3.js → chunk-QM37NSCR.js} +5 -5
- package/dist/{chunk-KB5DKCI4.js → chunk-W67YF34Y.js} +7 -7
- package/dist/{chunk-A4GRMJJI.js → chunk-WIUZIXXO.js} +18 -18
- package/dist/{chunk-I7NBPZBO.js → chunk-XOM4ZXOK.js} +5 -5
- package/dist/{chunk-C6CLGEHZ.js → chunk-YUHEK6XR.js} +8 -8
- package/dist/cli/checkUnsupportedDataProxy.js +16 -16
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +16 -16
- package/dist/cli/getSchema.js +19 -19
- package/dist/cli/hashes.js +16 -16
- package/dist/cli/schemaContext.js +16 -16
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +15 -15
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +4 -4
- package/dist/engine-commands/getEnginesMetaInfo.js +6 -6
- package/dist/engine-commands/index.js +26 -26
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/getGenerators.js +18 -18
- package/dist/index.js +52 -52
- package/dist/resolveBinary.js +6 -6
- package/dist/schemaEngineCommands.js +7 -7
- package/dist/utils/getEnvPaths.js +15 -15
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/loadEnvFile.js +15 -15
- package/dist/wasm.js +5 -5
- package/package.json +11 -11
@@ -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_4PHQ7HQG_exports = {};
|
30
|
+
__export(chunk_4PHQ7HQG_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_4PHQ7HQG_exports);
|
35
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_P2P2TQOV = require("./chunk-P2P2TQOV.js");
|
38
|
+
var import_chunk_QM37NSCR = require("./chunk-QM37NSCR.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,7 +58,7 @@ ${detailsHeader} ${message}`;
|
|
58
58
|
}).exhaustive();
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
60
60
|
[Context: getDmmf]`;
|
61
|
-
super((0,
|
61
|
+
super((0, import_chunk_P2P2TQOV.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
62
62
|
this.name = "GetDmmfError";
|
63
63
|
}
|
64
64
|
};
|
@@ -70,13 +70,13 @@ async function getDMMF(options) {
|
|
70
70
|
() => {
|
71
71
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
72
72
|
debug("Triggering a Rust panic...");
|
73
|
-
|
73
|
+
import_chunk_QM37NSCR.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_QM37NSCR.prismaSchemaWasm.get_dmmf(params);
|
80
80
|
return data;
|
81
81
|
},
|
82
82
|
(e) => ({
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
}
|
18
18
|
return to;
|
19
19
|
};
|
20
|
-
var
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
22
22
|
// file that has been converted to a CommonJS file using a Babel-
|
23
23
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
@@ -26,15 +26,15 @@ 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_FYZCPL2Z_exports = {};
|
30
|
+
__export(chunk_FYZCPL2Z_exports, {
|
31
31
|
BinaryType: () => import_fetch_engine.BinaryType,
|
32
32
|
engineEnvVarMap: () => import_fetch_engine.engineEnvVarMap,
|
33
33
|
maybeCopyToTmp: () => maybeCopyToTmp,
|
34
34
|
resolveBinary: () => resolveBinary,
|
35
35
|
safeResolveBinary: () => safeResolveBinary
|
36
36
|
});
|
37
|
-
module.exports = __toCommonJS(
|
37
|
+
module.exports = __toCommonJS(chunk_FYZCPL2Z_exports);
|
38
38
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
39
39
|
var import_chunk_IDINCQMN = require("./chunk-IDINCQMN.js");
|
40
40
|
var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
|
@@ -44,8 +44,8 @@ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
44
44
|
var import_engines = require("@prisma/engines");
|
45
45
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
46
46
|
var import_get_platform = require("@prisma/get-platform");
|
47
|
-
var import_fs =
|
48
|
-
var import_path =
|
47
|
+
var import_fs = __toESM(require("fs"));
|
48
|
+
var import_path = __toESM(require("path"));
|
49
49
|
var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_IDINCQMN.require_lib)());
|
50
50
|
var import_temp_dir = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_5VQNKCKW.require_temp_dir)());
|
51
51
|
async function getBinaryName(name) {
|
@@ -96,8 +96,7 @@ function safeResolveBinary(name, proposedPath) {
|
|
96
96
|
);
|
97
97
|
}
|
98
98
|
async function maybeCopyToTmp(file) {
|
99
|
-
|
100
|
-
if (dir.match(import_chunk_M3GBKLGE.vercelPkgPathRegex)) {
|
99
|
+
if (__dirname.match(import_chunk_M3GBKLGE.vercelPkgPathRegex)) {
|
101
100
|
const targetDir = import_path.default.join(import_temp_dir.default, "prisma-binaries");
|
102
101
|
await (0, import_fs_extra.ensureDir)(targetDir);
|
103
102
|
const target = import_path.default.join(targetDir, import_path.default.basename(file));
|
@@ -26,20 +26,20 @@ 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_GVN3PSGS_exports = {};
|
30
|
+
__export(chunk_GVN3PSGS_exports, {
|
31
31
|
GetConfigError: () => GetConfigError,
|
32
32
|
getConfig: () => getConfig,
|
33
33
|
getDirectUrl: () => getDirectUrl,
|
34
34
|
getEffectiveUrl: () => getEffectiveUrl,
|
35
35
|
resolveUrl: () => resolveUrl
|
36
36
|
});
|
37
|
-
module.exports = __toCommonJS(
|
37
|
+
module.exports = __toCommonJS(chunk_GVN3PSGS_exports);
|
38
38
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
39
39
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
40
40
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
41
|
-
var
|
42
|
-
var
|
41
|
+
var import_chunk_P2P2TQOV = require("./chunk-P2P2TQOV.js");
|
42
|
+
var import_chunk_QM37NSCR = require("./chunk-QM37NSCR.js");
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
45
45
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
|
|
64
64
|
}).exhaustive();
|
65
65
|
const errorMessageWithContext = `${constructedErrorMessage}
|
66
66
|
[Context: getConfig]`;
|
67
|
-
super((0,
|
67
|
+
super((0, import_chunk_P2P2TQOV.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
68
68
|
this.name = "GetConfigError";
|
69
69
|
}
|
70
70
|
};
|
@@ -89,7 +89,7 @@ async function getConfig(options) {
|
|
89
89
|
() => {
|
90
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
91
91
|
debug("Triggering a Rust panic...");
|
92
|
-
|
92
|
+
import_chunk_QM37NSCR.prismaSchemaWasm.debug_panic();
|
93
93
|
}
|
94
94
|
const params = JSON.stringify({
|
95
95
|
prismaSchema: options.datamodel,
|
@@ -97,7 +97,7 @@ async function getConfig(options) {
|
|
97
97
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
98
98
|
env: process.env
|
99
99
|
});
|
100
|
-
const data =
|
100
|
+
const data = import_chunk_QM37NSCR.prismaSchemaWasm.get_config(params);
|
101
101
|
return data;
|
102
102
|
},
|
103
103
|
(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_KGXZALRV_exports = {};
|
20
|
+
__export(chunk_KGXZALRV_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_KGXZALRV_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: "6.
|
29
|
+
version: "6.7.0-dev.1",
|
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_KLIYXRK4_exports = {};
|
30
|
+
__export(chunk_KLIYXRK4_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_KLIYXRK4_exports);
|
35
35
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
-
var
|
39
|
-
var
|
38
|
+
var import_chunk_P2P2TQOV = require("./chunk-P2P2TQOV.js");
|
39
|
+
var import_chunk_QM37NSCR = require("./chunk-QM37NSCR.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_P2P2TQOV.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_QM37NSCR.prismaSchemaWasm.merge_schemas(params);
|
76
76
|
},
|
77
77
|
(e) => ({
|
78
78
|
type: "wasm-error",
|
@@ -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_ONPT5QRX_exports = {};
|
20
|
+
__export(chunk_ONPT5QRX_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_ONPT5QRX_exports);
|
28
28
|
var import_chunk_ETYWYJBX = require("./chunk-ETYWYJBX.js");
|
29
|
-
var
|
29
|
+
var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
|
30
30
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
32
32
|
var import_execa = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_ETYWYJBX.require_execa)());
|
@@ -141,7 +141,7 @@ async function execaCommand({
|
|
141
141
|
schemaEnginePath,
|
142
142
|
engineCommandName
|
143
143
|
}) {
|
144
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
144
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_FYZCPL2Z.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
145
145
|
try {
|
146
146
|
return await (0, import_execa.default)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
|
147
147
|
cwd,
|
@@ -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_P2P2TQOV_exports = {};
|
20
|
+
__export(chunk_P2P2TQOV_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_P2P2TQOV_exports);
|
24
|
+
var import_chunk_PCL2SAJW = require("./chunk-PCL2SAJW.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_PCL2SAJW.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_PCL2SAJW_exports = {};
|
20
|
+
__export(chunk_PCL2SAJW_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_PCL2SAJW_exports);
|
24
|
+
var import_chunk_KGXZALRV = require("./chunk-KGXZALRV.js");
|
25
|
+
var packageJson = (0, import_chunk_KGXZALRV.require_package)();
|
26
26
|
var version = packageJson.version;
|
@@ -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_PRGTOMXU_exports = {};
|
20
|
+
__export(chunk_PRGTOMXU_exports, {
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
23
23
|
});
|
24
|
-
module.exports = __toCommonJS(
|
24
|
+
module.exports = __toCommonJS(chunk_PRGTOMXU_exports);
|
25
25
|
var import_chunk_6TTRTZXU = require("./chunk-6TTRTZXU.js");
|
26
26
|
var import_chunk_ETYWYJBX = require("./chunk-ETYWYJBX.js");
|
27
|
-
var
|
27
|
+
var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
|
28
28
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
29
29
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
30
30
|
var import_engines = require("@prisma/engines");
|
@@ -35,7 +35,7 @@ async function getEngineVersion(enginePath, binaryName) {
|
|
35
35
|
if (!binaryName) {
|
36
36
|
binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
|
37
37
|
}
|
38
|
-
enginePath = await (0,
|
38
|
+
enginePath = await (0, import_chunk_FYZCPL2Z.resolveBinary)(binaryName, enginePath);
|
39
39
|
const platformInfo = await (0, import_get_platform.getPlatformInfo)();
|
40
40
|
if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
41
41
|
(0, import_get_platform.assertNodeAPISupported)();
|
@@ -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_QM37NSCR_exports = {};
|
30
|
+
__export(chunk_QM37NSCR_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_QM37NSCR_exports);
|
37
|
+
var import_chunk_KGXZALRV = require("./chunk-KGXZALRV.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"));
|
@@ -45,6 +45,6 @@ var wasm_exports = {};
|
|
45
45
|
schemaEngineWasmVersion: () => schemaEngineWasmVersion
|
46
46
|
});
|
47
47
|
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
48
|
-
var { dependencies } = (0,
|
48
|
+
var { dependencies } = (0, import_chunk_KGXZALRV.require_package)();
|
49
49
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
50
50
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
@@ -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_W67YF34Y_exports = {};
|
30
|
+
__export(chunk_W67YF34Y_exports, {
|
31
31
|
getEnginesInfo: () => getEnginesInfo,
|
32
32
|
getEnginesMetaInfo: () => getEnginesMetaInfo,
|
33
33
|
resolveEngine: () => resolveEngine
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_W67YF34Y_exports);
|
36
|
+
var import_chunk_PRGTOMXU = require("./chunk-PRGTOMXU.js");
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
-
var
|
38
|
+
var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.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_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
@@ -157,7 +157,7 @@ async function resolveEngine(binaryName) {
|
|
157
157
|
const enginePathEither = await (0, import_function2.pipe)(
|
158
158
|
pathFromEnvOption,
|
159
159
|
fold(
|
160
|
-
() => (0,
|
160
|
+
() => (0, import_chunk_FYZCPL2Z.safeResolveBinary)(binaryName),
|
161
161
|
(pathFromEnv) => (0, import_chunk_5DBOS77Y.right2)(pathFromEnv.path)
|
162
162
|
)
|
163
163
|
)();
|
@@ -165,7 +165,7 @@ async function resolveEngine(binaryName) {
|
|
165
165
|
enginePathEither,
|
166
166
|
import_chunk_5DBOS77Y.fromEither,
|
167
167
|
(0, import_chunk_5DBOS77Y.chain)((enginePath) => {
|
168
|
-
return (0,
|
168
|
+
return (0, import_chunk_PRGTOMXU.safeGetEngineVersion)(enginePath, binaryName);
|
169
169
|
})
|
170
170
|
)();
|
171
171
|
const engineInfo = {
|
@@ -26,8 +26,8 @@ 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_WIUZIXXO_exports = {};
|
30
|
+
__export(chunk_WIUZIXXO_exports, {
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
32
32
|
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
33
33
|
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
@@ -51,7 +51,7 @@ __export(chunk_A4GRMJJI_exports, {
|
|
51
51
|
processSchemaResult: () => processSchemaResult,
|
52
52
|
skipIndex: () => skipIndex
|
53
53
|
});
|
54
|
-
module.exports = __toCommonJS(
|
54
|
+
module.exports = __toCommonJS(chunk_WIUZIXXO_exports);
|
55
55
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
56
56
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
57
57
|
var import_chunk_2IP7H3BQ = require("./chunk-2IP7H3BQ.js");
|
@@ -64,11 +64,11 @@ var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
|
|
64
64
|
var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
|
65
65
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
66
66
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
67
|
-
var
|
68
|
-
var
|
69
|
-
var
|
70
|
-
var
|
71
|
-
var
|
67
|
+
var import_chunk_GVN3PSGS = require("./chunk-GVN3PSGS.js");
|
68
|
+
var import_chunk_4PHQ7HQG = require("./chunk-4PHQ7HQG.js");
|
69
|
+
var import_chunk_XOM4ZXOK = require("./chunk-XOM4ZXOK.js");
|
70
|
+
var import_chunk_KLIYXRK4 = require("./chunk-KLIYXRK4.js");
|
71
|
+
var import_chunk_QM37NSCR = require("./chunk-QM37NSCR.js");
|
72
72
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
73
73
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
74
74
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
@@ -127,7 +127,7 @@ var debug = (0, import_debug2.default)("prisma:format");
|
|
127
127
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
128
128
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
129
129
|
handleFormatPanic(() => {
|
130
|
-
|
130
|
+
import_chunk_QM37NSCR.prismaSchemaWasm.debug_panic();
|
131
131
|
});
|
132
132
|
}
|
133
133
|
const defaultFormattingOptions = {
|
@@ -144,10 +144,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
144
144
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
145
145
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
146
146
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
147
|
-
const lintDiagnostics2 = (0,
|
147
|
+
const lintDiagnostics2 = (0, import_chunk_XOM4ZXOK.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
148
148
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
149
149
|
});
|
150
|
-
const lintWarnings = (0,
|
150
|
+
const lintWarnings = (0, import_chunk_XOM4ZXOK.getLintWarningsAsText)(lintDiagnostics);
|
151
151
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
152
152
|
console.warn(lintWarnings);
|
153
153
|
}
|
@@ -174,7 +174,7 @@ function handleFormatPanic(tryCb) {
|
|
174
174
|
}
|
175
175
|
}
|
176
176
|
function formatWasm(schema, documentFormattingParams) {
|
177
|
-
const formattedSchema =
|
177
|
+
const formattedSchema = import_chunk_QM37NSCR.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
178
178
|
return formattedSchema;
|
179
179
|
}
|
180
180
|
var readFile = (0, import_util.promisify)(import_fs.default.readFile);
|
@@ -218,7 +218,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
218
218
|
}
|
219
219
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
220
220
|
debug2("Loading config");
|
221
|
-
const config = await (0,
|
221
|
+
const config = await (0, import_chunk_GVN3PSGS.getConfig)({
|
222
222
|
datamodel: files,
|
223
223
|
ignoreEnvVarErrors: true
|
224
224
|
});
|
@@ -428,7 +428,7 @@ async function processSchemaResult({
|
|
428
428
|
if (printLoadMessage) {
|
429
429
|
printSchemaLoadedMessage(loadedFromPathForLogMessages);
|
430
430
|
}
|
431
|
-
const configFromPsl = await (0,
|
431
|
+
const configFromPsl = await (0, import_chunk_GVN3PSGS.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
432
432
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
433
433
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
434
434
|
return {
|
@@ -506,7 +506,7 @@ async function getGenerators(options) {
|
|
506
506
|
}
|
507
507
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
508
508
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
509
|
-
const dmmf = await (0,
|
509
|
+
const dmmf = await (0, import_chunk_4PHQ7HQG.getDMMF)({
|
510
510
|
datamodel: schemaContext.schemaFiles,
|
511
511
|
previewFeatures
|
512
512
|
});
|
@@ -557,7 +557,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
557
557
|
fromEnvVar: null
|
558
558
|
};
|
559
559
|
}
|
560
|
-
const datamodel = (0,
|
560
|
+
const datamodel = (0, import_chunk_KLIYXRK4.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
561
561
|
const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
562
562
|
const options2 = {
|
563
563
|
datamodel,
|
@@ -641,7 +641,7 @@ generator gen {
|
|
641
641
|
debug3({ generatorBinaryPaths });
|
642
642
|
generator.setBinaryPaths(generatorBinaryPaths);
|
643
643
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
644
|
-
const customDmmf = await (0,
|
644
|
+
const customDmmf = await (0, import_chunk_4PHQ7HQG.getDMMF)({
|
645
645
|
datamodel: schemaContext.schemaFiles,
|
646
646
|
previewFeatures
|
647
647
|
});
|
@@ -916,7 +916,7 @@ function checkUnsupportedDataProxy({
|
|
916
916
|
}
|
917
917
|
}
|
918
918
|
if (!schemaContext2?.primaryDatasource) return;
|
919
|
-
const url = (0,
|
919
|
+
const url = (0, import_chunk_GVN3PSGS.resolveUrl)((0, import_chunk_GVN3PSGS.getEffectiveUrl)(schemaContext2.primaryDatasource));
|
920
920
|
if (url?.startsWith("prisma://")) {
|
921
921
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
922
922
|
}
|
@@ -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_XOM4ZXOK_exports = {};
|
20
|
+
__export(chunk_XOM4ZXOK_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_XOM4ZXOK_exports);
|
28
|
+
var import_chunk_QM37NSCR = require("./chunk-QM37NSCR.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_QM37NSCR.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
34
34
|
return lintDiagnostics;
|
35
35
|
}
|
@@ -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_YUHEK6XR_exports = {};
|
30
|
+
__export(chunk_YUHEK6XR_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_YUHEK6XR_exports);
|
35
35
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
-
var
|
39
|
-
var
|
38
|
+
var import_chunk_P2P2TQOV = require("./chunk-P2P2TQOV.js");
|
39
|
+
var import_chunk_QM37NSCR = require("./chunk-QM37NSCR.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_P2P2TQOV.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_QUERY_ENGINE_GET_DMMF) {
|
73
73
|
debug("Triggering a Rust panic...");
|
74
|
-
|
74
|
+
import_chunk_QM37NSCR.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_QM37NSCR.prismaSchemaWasm.validate(params);
|
81
81
|
},
|
82
82
|
(e) => ({
|
83
83
|
type: "wasm-error",
|