@prisma/internals 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.5 → 6.6.0-integration-mcp.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-TV34NMBZ.js → chunk-2H6XXXKO.js} +15 -12
- package/dist/{chunk-OIAO45HN.js → chunk-4GALNNB4.js} +5 -5
- package/dist/{chunk-244JZX3O.js → chunk-5GN2NAHV.js} +5 -5
- package/dist/{chunk-MSQTODVE.js → chunk-A6NMRQZI.js} +8 -8
- package/dist/{chunk-B2BBNLC5.js → chunk-AP52B62F.js} +5 -5
- package/dist/{chunk-M6JO5TM5.js → chunk-FAPPXX7W.js} +8 -8
- package/dist/{chunk-HX2VLZFY.js → chunk-GE4IXOQZ.js} +50 -111
- package/dist/{chunk-HZP4ATW5.js → chunk-GHEOQJJE.js} +5 -5
- package/dist/{chunk-BTWAF3S4.js → chunk-GV244NDE.js} +7 -7
- package/dist/{chunk-XQSHUIJ5.js → chunk-INKJI2U2.js} +8 -8
- package/dist/{chunk-5UDIJ23I.js → chunk-JZLLVWQG.js} +8 -8
- package/dist/{chunk-GIOVJ5SL.js → chunk-LWBLVV7Y.js} +8 -8
- package/dist/{chunk-Q3IVXLMC.js → chunk-OUQPIJFQ.js} +5 -5
- package/dist/{chunk-Z2MGSX7I.js → chunk-PING5S2U.js} +8 -8
- package/dist/{chunk-XKIMYV5V.js → chunk-Q5NGKLH6.js} +5 -5
- package/dist/{chunk-LHESHKC2.js → chunk-SNSJWJTA.js} +5 -5
- package/dist/{chunk-PQE76XRR.js → chunk-TJDTXGWV.js} +5 -5
- package/dist/{chunk-75AJJ2SV.js → chunk-VTJOX6HO.js} +5 -5
- package/dist/{chunk-ABTIXQDX.js → chunk-VYJSNZF3.js} +4 -4
- package/dist/{chunk-L2OMDDLG.js → chunk-W4ZUPFHQ.js} +50 -111
- package/dist/{chunk-R57AYZIS.js → chunk-Y3Q7GWBX.js} +7 -7
- package/dist/cli/checkUnsupportedDataProxy.js +13 -13
- package/dist/cli/directoryConfig.d.ts +1 -1
- package/dist/cli/directoryConfig.js +2 -2
- package/dist/cli/getSchema.d.ts +3 -28
- package/dist/cli/getSchema.js +16 -17
- package/dist/cli/hashes.d.ts +1 -2
- package/dist/cli/hashes.js +13 -13
- package/dist/cli/schemaContext.d.ts +4 -3
- package/dist/cli/schemaContext.js +13 -13
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +12 -12
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +21 -21
- 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/generatorResolvers/generatorResolvers.js +12 -12
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +12 -12
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +13 -13
- package/dist/get-generators/getGenerators.js +15 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +40 -41
- package/dist/utils/getEnvPaths.js +12 -12
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/loadEnvFile.js +12 -12
- package/dist/wasm.js +4 -4
- 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_JZLLVWQG_exports = {};
|
30
|
+
__export(chunk_JZLLVWQG_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_JZLLVWQG_exports);
|
35
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_TJDTXGWV = require("./chunk-TJDTXGWV.js");
|
38
|
+
var import_chunk_GHEOQJJE = require("./chunk-GHEOQJJE.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_TJDTXGWV.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_GHEOQJJE.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_GHEOQJJE.prismaSchemaWasm.get_dmmf(params);
|
80
80
|
return data;
|
81
81
|
},
|
82
82
|
(e) => ({
|
@@ -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_LWBLVV7Y_exports = {};
|
30
|
+
__export(chunk_LWBLVV7Y_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_LWBLVV7Y_exports);
|
35
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_AP52B62F = require("./chunk-AP52B62F.js");
|
38
|
+
var import_chunk_SNSJWJTA = require("./chunk-SNSJWJTA.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_AP52B62F.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_SNSJWJTA.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_SNSJWJTA.prismaSchemaWasm.get_dmmf(params);
|
80
80
|
return data;
|
81
81
|
},
|
82
82
|
(e) => ({
|
@@ -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_OUQPIJFQ_exports = {};
|
20
|
+
__export(chunk_OUQPIJFQ_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_OUQPIJFQ_exports);
|
28
|
+
var import_chunk_SNSJWJTA = require("./chunk-SNSJWJTA.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_SNSJWJTA.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_PING5S2U_exports = {};
|
30
|
+
__export(chunk_PING5S2U_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_PING5S2U_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_AP52B62F = require("./chunk-AP52B62F.js");
|
39
|
+
var import_chunk_SNSJWJTA = require("./chunk-SNSJWJTA.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_AP52B62F.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_SNSJWJTA.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_SNSJWJTA.prismaSchemaWasm.validate(params);
|
81
81
|
},
|
82
82
|
(e) => ({
|
83
83
|
type: "wasm-error",
|
@@ -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_Q5NGKLH6_exports = {};
|
20
|
+
__export(chunk_Q5NGKLH6_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_Q5NGKLH6_exports);
|
28
|
+
var import_chunk_GHEOQJJE = require("./chunk-GHEOQJJE.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_GHEOQJJE.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
34
34
|
return lintDiagnostics;
|
35
35
|
}
|
@@ -26,14 +26,14 @@ 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_SNSJWJTA_exports = {};
|
30
|
+
__export(chunk_SNSJWJTA_exports, {
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
33
33
|
wasm_exports: () => wasm_exports
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_SNSJWJTA_exports);
|
36
|
+
var import_chunk_VYJSNZF3 = require("./chunk-VYJSNZF3.js");
|
37
37
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
38
38
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
39
39
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
@@ -42,6 +42,6 @@ var wasm_exports = {};
|
|
42
42
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
43
43
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
44
44
|
});
|
45
|
-
var { dependencies } = (0,
|
45
|
+
var { dependencies } = (0, import_chunk_VYJSNZF3.require_package)();
|
46
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
47
47
|
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
@@ -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_TJDTXGWV_exports = {};
|
20
|
+
__export(chunk_TJDTXGWV_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_TJDTXGWV_exports);
|
24
|
+
var import_chunk_5GN2NAHV = require("./chunk-5GN2NAHV.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_5GN2NAHV.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_VTJOX6HO_exports = {};
|
20
|
+
__export(chunk_VTJOX6HO_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_VTJOX6HO_exports);
|
24
|
+
var import_chunk_VYJSNZF3 = require("./chunk-VYJSNZF3.js");
|
25
|
+
var packageJson = (0, import_chunk_VYJSNZF3.require_package)();
|
26
26
|
var version = packageJson.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_VYJSNZF3_exports = {};
|
20
|
+
__export(chunk_VYJSNZF3_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_VYJSNZF3_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) {
|
@@ -113,7 +113,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
113
113
|
"@prisma/generator": "workspace:*",
|
114
114
|
"@prisma/generator-helper": "workspace:*",
|
115
115
|
"@prisma/get-platform": "workspace:*",
|
116
|
-
"@prisma/prisma-schema-wasm": "6.6.0-
|
116
|
+
"@prisma/prisma-schema-wasm": "6.6.0-26.47cb872770bc2c9ff45909bd09f7326df36d9130",
|
117
117
|
"@prisma/schema-files-loader": "workspace:*",
|
118
118
|
arg: "5.0.2",
|
119
119
|
prompts: "2.4.2"
|
@@ -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_W4ZUPFHQ_exports = {};
|
30
|
+
__export(chunk_W4ZUPFHQ_exports, {
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
33
33
|
debug: () => debug4,
|
@@ -42,19 +42,18 @@ __export(chunk_L2OMDDLG_exports, {
|
|
42
42
|
getNodeAPIName: () => import_get_platform2.getNodeAPIName,
|
43
43
|
getPrismaConfigFromPackageJson: () => getPrismaConfigFromPackageJson,
|
44
44
|
getProjectHash: () => getProjectHash,
|
45
|
-
getSchema: () => getSchema,
|
46
|
-
getSchemaDir: () => getSchemaDir,
|
47
45
|
getSchemaFromPackageJson: () => getSchemaFromPackageJson,
|
48
46
|
getSchemaWithPath: () => getSchemaWithPath,
|
49
47
|
getSchemaWithPathOptional: () => getSchemaWithPathOptional,
|
50
48
|
knownBinaryTargets: () => knownBinaryTargets,
|
51
49
|
loadEnvFile: () => loadEnvFile,
|
52
50
|
loadSchemaContext: () => loadSchemaContext,
|
51
|
+
printSchemaLoadedMessage: () => printSchemaLoadedMessage,
|
53
52
|
prismaClientResolver: () => prismaClientResolver,
|
54
53
|
processSchemaResult: () => processSchemaResult,
|
55
54
|
skipIndex: () => skipIndex
|
56
55
|
});
|
57
|
-
module.exports = __toCommonJS(
|
56
|
+
module.exports = __toCommonJS(chunk_W4ZUPFHQ_exports);
|
58
57
|
var import_chunk_QGJH4P4N = require("./chunk-QGJH4P4N.js");
|
59
58
|
var import_chunk_GHHABGYW = require("./chunk-GHHABGYW.js");
|
60
59
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
@@ -73,11 +72,11 @@ var import_chunk_XLTQGAI2 = require("./chunk-XLTQGAI2.js");
|
|
73
72
|
var import_chunk_HAGJ64PM = require("./chunk-HAGJ64PM.js");
|
74
73
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
75
74
|
var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
|
76
|
-
var
|
77
|
-
var
|
78
|
-
var
|
79
|
-
var
|
80
|
-
var
|
75
|
+
var import_chunk_OUQPIJFQ = require("./chunk-OUQPIJFQ.js");
|
76
|
+
var import_chunk_GV244NDE = require("./chunk-GV244NDE.js");
|
77
|
+
var import_chunk_FAPPXX7W = require("./chunk-FAPPXX7W.js");
|
78
|
+
var import_chunk_LWBLVV7Y = require("./chunk-LWBLVV7Y.js");
|
79
|
+
var import_chunk_SNSJWJTA = require("./chunk-SNSJWJTA.js");
|
81
80
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
82
81
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
83
82
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
@@ -121,7 +120,7 @@ var debug = (0, import_debug2.default)("prisma:format");
|
|
121
120
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
122
121
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
123
122
|
handleFormatPanic(() => {
|
124
|
-
|
123
|
+
import_chunk_SNSJWJTA.prismaSchemaWasm.debug_panic();
|
125
124
|
});
|
126
125
|
}
|
127
126
|
const defaultFormattingOptions = {
|
@@ -138,10 +137,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
138
137
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
139
138
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
140
139
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
141
|
-
const lintDiagnostics2 = (0,
|
140
|
+
const lintDiagnostics2 = (0, import_chunk_OUQPIJFQ.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
142
141
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
143
142
|
});
|
144
|
-
const lintWarnings = (0,
|
143
|
+
const lintWarnings = (0, import_chunk_OUQPIJFQ.getLintWarningsAsText)(lintDiagnostics);
|
145
144
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
146
145
|
console.warn(lintWarnings);
|
147
146
|
}
|
@@ -168,7 +167,7 @@ function handleFormatPanic(tryCb) {
|
|
168
167
|
}
|
169
168
|
}
|
170
169
|
function formatWasm(schema, documentFormattingParams) {
|
171
|
-
const formattedSchema =
|
170
|
+
const formattedSchema = import_chunk_SNSJWJTA.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
172
171
|
return formattedSchema;
|
173
172
|
}
|
174
173
|
var readFile = (0, import_util.promisify)(import_fs.default.readFile);
|
@@ -188,6 +187,9 @@ async function getSchemaWithPathOptional(schemaPathFromArgs, schemaPathFromConfi
|
|
188
187
|
}
|
189
188
|
return null;
|
190
189
|
}
|
190
|
+
function printSchemaLoadedMessage(schemaPath2) {
|
191
|
+
process.stdout.write((0, import_chunk_PG5FDKSF.dim)(`Prisma schema loaded from ${import_path.default.relative(process.cwd(), schemaPath2)}`) + "\n");
|
192
|
+
}
|
191
193
|
async function readSchemaFromSingleFile(schemaPath2) {
|
192
194
|
debug2("Reading schema from single file", schemaPath2);
|
193
195
|
const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath2, "file");
|
@@ -209,7 +211,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
209
211
|
}
|
210
212
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
211
213
|
debug2("Loading config");
|
212
|
-
const config = await (0,
|
214
|
+
const config = await (0, import_chunk_FAPPXX7W.getConfig)({
|
213
215
|
datamodel: files,
|
214
216
|
ignoreEnvVarErrors: true
|
215
217
|
});
|
@@ -283,15 +285,16 @@ function renderLookupError(error) {
|
|
283
285
|
function renderDefaultLookupError(error, cwd) {
|
284
286
|
const parts = [
|
285
287
|
`Could not find Prisma Schema that is required for this command.`,
|
286
|
-
`You can either provide it with ${(0, import_chunk_PG5FDKSF.green)(
|
287
|
-
|
288
|
-
|
288
|
+
`You can either provide it with ${(0, import_chunk_PG5FDKSF.green)("`--schema`")} argument,`,
|
289
|
+
`set it in your ${(0, import_chunk_PG5FDKSF.green)("`prisma.config.ts`")},`,
|
290
|
+
`set it as ${(0, import_chunk_PG5FDKSF.green)("`prisma.schema`")} in your ${(0, import_chunk_PG5FDKSF.green)("package.json")},`,
|
291
|
+
`or put it into the default location (${(0, import_chunk_PG5FDKSF.green)("`./prisma/schema.prisma`")}, or ${(0, import_chunk_PG5FDKSF.green)("`./schema.prisma`")}.`,
|
289
292
|
"Checked following paths:\n"
|
290
293
|
];
|
291
294
|
const printedPaths = /* @__PURE__ */ new Set();
|
292
295
|
for (const failure of error.failures) {
|
293
|
-
const filePath = failure.
|
294
|
-
if (!printedPaths.has(failure.
|
296
|
+
const filePath = failure.path;
|
297
|
+
if (!printedPaths.has(failure.path)) {
|
295
298
|
parts.push(`${import_path.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
|
296
299
|
printedPaths.add(filePath);
|
297
300
|
}
|
@@ -317,21 +320,13 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
|
|
317
320
|
error: { kind: "PrismaConfigNotConfigured" }
|
318
321
|
};
|
319
322
|
}
|
320
|
-
|
321
|
-
if (
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
}
|
328
|
-
} else {
|
329
|
-
schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folderPath);
|
330
|
-
if (!schemaResult.ok) {
|
331
|
-
throw new Error(
|
332
|
-
`Could not load schema from folder \`${schemaPathFromConfig.folderPath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
|
333
|
-
);
|
334
|
-
}
|
323
|
+
const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig);
|
324
|
+
if (!schemaResult.ok) {
|
325
|
+
throw new Error(
|
326
|
+
`Could not load schema from \`${schemaPathFromConfig}\` provided by "prisma.config.ts"\`: ${renderLookupError(
|
327
|
+
schemaResult.error
|
328
|
+
)}`
|
329
|
+
);
|
335
330
|
}
|
336
331
|
return schemaResult;
|
337
332
|
}
|
@@ -366,51 +361,14 @@ async function getSchemaFromPackageJson(cwd) {
|
|
366
361
|
return lookupResult;
|
367
362
|
}
|
368
363
|
async function getDefaultSchema(cwd, failures = []) {
|
369
|
-
const
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
}
|
374
|
-
};
|
375
|
-
const prismaSchemaFile = {
|
376
|
-
schemaPath: {
|
377
|
-
path: import_path.default.join(cwd, "prisma", "schema.prisma"),
|
378
|
-
kind: "file"
|
379
|
-
},
|
380
|
-
conflictsWith: {
|
381
|
-
path: import_path.default.join(cwd, "prisma", "schema"),
|
382
|
-
kind: "directory"
|
383
|
-
}
|
384
|
-
};
|
385
|
-
const prismaSchemaFolder = {
|
386
|
-
schemaPath: {
|
387
|
-
path: import_path.default.join(cwd, "prisma", "schema"),
|
388
|
-
kind: "directory"
|
389
|
-
},
|
390
|
-
conflictsWith: {
|
391
|
-
path: import_path.default.join(cwd, "prisma", "schema.prisma"),
|
392
|
-
kind: "file"
|
393
|
-
}
|
394
|
-
};
|
395
|
-
const rules = [schemaPrisma, prismaSchemaFile, prismaSchemaFolder];
|
396
|
-
for (const rule of rules) {
|
397
|
-
debug2(`Checking existence of ${rule.schemaPath.path}`);
|
398
|
-
const schema = await loadSchemaFromDefaultLocation(rule.schemaPath);
|
364
|
+
const lookupPaths = [import_path.default.join(cwd, "schema.prisma"), import_path.default.join(cwd, "prisma", "schema.prisma")];
|
365
|
+
for (const path9 of lookupPaths) {
|
366
|
+
debug2(`Checking existence of ${path9}`);
|
367
|
+
const schema = await readSchemaFromSingleFile(path9);
|
399
368
|
if (!schema.ok) {
|
400
|
-
failures.push({
|
369
|
+
failures.push({ path: path9, error: schema.error });
|
401
370
|
continue;
|
402
371
|
}
|
403
|
-
if (rule.conflictsWith) {
|
404
|
-
const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
|
405
|
-
if (conflictingSchema.ok) {
|
406
|
-
throw new Error(
|
407
|
-
`Found Prisma Schemas at both \`${import_path.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path.default.relative(
|
408
|
-
cwd,
|
409
|
-
rule.conflictsWith.path
|
410
|
-
)}\`. Please remove one.`
|
411
|
-
);
|
412
|
-
}
|
413
|
-
}
|
414
372
|
return schema;
|
415
373
|
}
|
416
374
|
return {
|
@@ -421,28 +379,6 @@ async function getDefaultSchema(cwd, failures = []) {
|
|
421
379
|
}
|
422
380
|
};
|
423
381
|
}
|
424
|
-
async function loadSchemaFromDefaultLocation(lookupPath) {
|
425
|
-
switch (lookupPath.kind) {
|
426
|
-
case "file":
|
427
|
-
return readSchemaFromSingleFile(lookupPath.path);
|
428
|
-
case "directory":
|
429
|
-
return readSchemaFromDirectory(lookupPath.path);
|
430
|
-
}
|
431
|
-
}
|
432
|
-
async function getSchemaDir(schemaPathFromArgs) {
|
433
|
-
if (schemaPathFromArgs) {
|
434
|
-
return import_path.default.resolve(import_path.default.dirname(schemaPathFromArgs));
|
435
|
-
}
|
436
|
-
const schemaPathResult = await getSchemaWithPath();
|
437
|
-
if (!schemaPathResult) {
|
438
|
-
return null;
|
439
|
-
}
|
440
|
-
return import_path.default.dirname(schemaPathResult.schemaPath);
|
441
|
-
}
|
442
|
-
async function getSchema(schemaPathFromArgs, schemaPathFromConfig) {
|
443
|
-
const schemaPathResult = await getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig);
|
444
|
-
return schemaPathResult.schemas;
|
445
|
-
}
|
446
382
|
async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
|
447
383
|
const projectPath = (await getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
|
448
384
|
return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
|
@@ -457,32 +393,35 @@ async function loadSchemaContext({
|
|
457
393
|
printLoadMessage = true,
|
458
394
|
ignoreEnvVarErrors = false,
|
459
395
|
allowNull = false,
|
460
|
-
schemaPathArgumentName = "--schema"
|
396
|
+
schemaPathArgumentName = "--schema",
|
397
|
+
cwd = process.cwd()
|
461
398
|
} = {}) {
|
462
399
|
let schemaResult = null;
|
463
400
|
if (allowNull) {
|
464
401
|
schemaResult = await getSchemaWithPathOptional(schemaPathFromArg, schemaPathFromConfig, {
|
465
|
-
argumentName: schemaPathArgumentName
|
402
|
+
argumentName: schemaPathArgumentName,
|
403
|
+
cwd
|
466
404
|
});
|
467
405
|
if (!schemaResult) return null;
|
468
406
|
} else {
|
469
407
|
schemaResult = await getSchemaWithPath(schemaPathFromArg, schemaPathFromConfig, {
|
470
|
-
argumentName: schemaPathArgumentName
|
408
|
+
argumentName: schemaPathArgumentName,
|
409
|
+
cwd
|
471
410
|
});
|
472
411
|
}
|
473
|
-
return processSchemaResult({ schemaResult, printLoadMessage, ignoreEnvVarErrors });
|
412
|
+
return processSchemaResult({ schemaResult, printLoadMessage, ignoreEnvVarErrors, cwd });
|
474
413
|
}
|
475
414
|
async function processSchemaResult({
|
476
415
|
schemaResult,
|
477
416
|
printLoadMessage = true,
|
478
|
-
ignoreEnvVarErrors = false
|
417
|
+
ignoreEnvVarErrors = false,
|
418
|
+
cwd = process.cwd()
|
479
419
|
}) {
|
480
|
-
const cwd = process.cwd();
|
481
420
|
const loadedFromPathForLogMessages = import_path2.default.relative(cwd, schemaResult.schemaPath);
|
482
421
|
if (printLoadMessage) {
|
483
|
-
|
422
|
+
printSchemaLoadedMessage(loadedFromPathForLogMessages);
|
484
423
|
}
|
485
|
-
const configFromPsl = await (0,
|
424
|
+
const configFromPsl = await (0, import_chunk_FAPPXX7W.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
486
425
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
487
426
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
488
427
|
return {
|
@@ -652,7 +591,7 @@ async function getGenerators(options) {
|
|
652
591
|
}
|
653
592
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
654
593
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
655
|
-
const dmmf = await (0,
|
594
|
+
const dmmf = await (0, import_chunk_LWBLVV7Y.getDMMF)({
|
656
595
|
datamodel: schemaContext.schemaFiles,
|
657
596
|
previewFeatures
|
658
597
|
});
|
@@ -710,7 +649,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
710
649
|
fromEnvVar: null
|
711
650
|
};
|
712
651
|
}
|
713
|
-
const datamodel = (0,
|
652
|
+
const datamodel = (0, import_chunk_GV244NDE.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
714
653
|
const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generator.output.value });
|
715
654
|
const options2 = {
|
716
655
|
datamodel,
|
@@ -794,7 +733,7 @@ generator gen {
|
|
794
733
|
debug5({ generatorBinaryPaths });
|
795
734
|
generator.setBinaryPaths(generatorBinaryPaths);
|
796
735
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
797
|
-
const customDmmf = await (0,
|
736
|
+
const customDmmf = await (0, import_chunk_LWBLVV7Y.getDMMF)({
|
798
737
|
datamodel: schemaContext.schemaFiles,
|
799
738
|
previewFeatures
|
800
739
|
});
|
@@ -1069,7 +1008,7 @@ function checkUnsupportedDataProxy({
|
|
1069
1008
|
}
|
1070
1009
|
}
|
1071
1010
|
if (!schemaContext2?.primaryDatasource) return;
|
1072
|
-
const url = (0,
|
1011
|
+
const url = (0, import_chunk_FAPPXX7W.resolveUrl)((0, import_chunk_FAPPXX7W.getEffectiveUrl)(schemaContext2.primaryDatasource));
|
1073
1012
|
if (url?.startsWith("prisma://")) {
|
1074
1013
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
1075
1014
|
}
|
@@ -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_Y3Q7GWBX_exports = {};
|
30
|
+
__export(chunk_Y3Q7GWBX_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_Y3Q7GWBX_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_TJDTXGWV = require("./chunk-TJDTXGWV.js");
|
39
|
+
var import_chunk_GHEOQJJE = require("./chunk-GHEOQJJE.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_TJDTXGWV.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_GHEOQJJE.prismaSchemaWasm.merge_schemas(params);
|
76
76
|
},
|
77
77
|
(e) => ({
|
78
78
|
type: "wasm-error",
|